/* tslint:disable */
/* eslint-disable */
export function rawTxFromProtobuf(tx: PbCom2RawTransaction): RawTx;
/**
 * Convert raw transaction into protobuf format.
 *
 * Protobuf format is the one used by the Nockchain's gRPC interface, and the initial iris
 * extension format. The new iris transaction signing API moves away from this format to use
 * `NockchainTx`, as it includes the necessary spend condition and note information.
 */
export function rawTxToProtobuf(tx: RawTxV1): PbCom2RawTransaction;
export function initPanicHook(): void;
/**
 * Convert native SpendCondition to protobuf format.
 * Returns the protobuf format used by the Nockchain gRPC interface and external dApps.
 */
export function spendConditionToProtobuf(value: SpendCondition): PbCom2SpendCondition;
export function digestFromProtobuf(value: PbCom1Hash): Digest;
export function noteFromProtobuf(value: PbCom2Note): Note;
/**
 * Convert protobuf spend condition to native SpendCondition.
 * Accepts the protobuf format used by the Nockchain gRPC interface and external dApps
 */
export function spendConditionFromProtobuf(value: PbCom2SpendCondition): SpendCondition;
export function digestToProtobuf(d: Digest): PbCom1Hash;
/**
 * Return default transaction engine settings for V1 signing.
 */
export function txEngineSettingsV1Default(): TxEngineSettings;
export function noteToProtobuf(note: Note): PbCom2Note;
/**
 * Return default transaction engine settings for V1 Bythos signing.
 */
export function txEngineSettingsV1BythosDefault(): TxEngineSettings;
/**
 * Convert an Atom into a string.
 */
export function untas(noun: Noun): string;
/**
 * Convert an Atom to belts.
 */
export function atomToBelts(atom: Noun): Noun;
/**
 * Encode a Noun as a Uint8Array of bytes.
 */
export function jam(noun: Noun): Uint8Array;
/**
 * Convert a string to sequence of Belts.
 *
 * This is equivalent to `atom_to_belts(tas(s))`.
 *
 * Belts are Atoms that fit the goldilocks prime field.
 *
 * If a transaction contains non-based (not-fitting) atoms, it will be rejected.
 */
export function tasBelts(s: string): Noun;
/**
 * Convert string to an Atom.
 */
export function tas(s: string): Noun;
/**
 * Cue a jammed Uint8Array into a Noun (see `jam`).
 */
export function cue(jam: Uint8Array): Noun;
/**
 * Convert a sequence of belts back into one atom.
 */
export function beltsToAtom(noun: Noun): Noun;
/**
 * Derive master key from BIP39 mnemonic phrase
 */
export function deriveMasterKeyFromMnemonic(mnemonic: string, passphrase?: string | null): ExtendedKey;
/**
 * Hash a hax preimage (jam as input)
 */
export function hashPreimage(preimage_jam: Uint8Array): Digest;
/**
 * Hash a u64 value
 */
export function hashU64(value: bigint): string;
/**
 * Derive master key from seed bytes
 */
export function deriveMasterKey(seed: Uint8Array): ExtendedKey;
/**
 * Hash a noun (jam as input)
 */
export function hashNoun(noun: Uint8Array): string;
/**
 * Hash a public key to get its digest (for use in PKH)
 */
export function hashPublicKey(public_key_bytes: Uint8Array): string;
/**
 * Verify a signature with a public key
 */
export function verifySignature(public_key_bytes: Uint8Array, signature: Signature, message: string): boolean;
/**
 * Sign a message string with a private key
 */
export function signMessage(private_key_bytes: Uint8Array, message: string): Signature;
export function seedV0Hash(v: SeedV0): Digest;
/**
 * r" Convert into `Noun`.
 */
export function seedV0ToNoun(v: SeedV0): Noun;
/**
 * r" Convert from `Noun`.
 */
export function seedV0FromNoun(noun: Noun): SeedV0;
export function pageMsgHash(v: PageMsg): Digest;
/**
 * r" Convert from `Noun`.
 */
export function pageMsgFromNoun(noun: Noun): PageMsg;
/**
 * r" Convert into `Noun`.
 */
export function pageMsgToNoun(v: PageMsg): Noun;
/**
 * r" Convert into `Noun`.
 */
export function outputV0ToNoun(v: OutputV0): Noun;
export function outputV0Hash(v: OutputV0): Digest;
/**
 * r" Convert from `Noun`.
 */
export function outputV0FromNoun(noun: Noun): OutputV0;
export function haxHash(v: Hax): Digest;
/**
 * r" Convert into `Noun`.
 */
export function haxToNoun(v: Hax): Noun;
/**
 * r" Convert from `Noun`.
 */
export function haxFromNoun(noun: Noun): Hax;
export function spendConditionHash(v: SpendCondition): Digest;
/**
 * r" Convert from `Noun`.
 */
export function spendConditionFromNoun(noun: Noun): SpendCondition;
/**
 * r" Convert into `Noun`.
 */
export function spendConditionToNoun(v: SpendCondition): Noun;
export function spendConditionPkh(obj: SpendCondition): Pkh[];
export function spendConditionHax(obj: SpendCondition): Hax[];
export function spendConditionNewPkh(pkh: Pkh): SpendCondition;
export function spendConditionTim(obj: SpendCondition): LockTim[];
export function spendConditionBrn(obj: SpendCondition): boolean;
export function spendConditionFirstName(obj: SpendCondition): Digest;
export function lockMerkleProofFullHash(v: LockMerkleProofFull): Digest;
/**
 * r" Convert into `Noun`.
 */
export function lockMerkleProofFullToNoun(v: LockMerkleProofFull): Noun;
/**
 * r" Convert from `Noun`.
 */
export function lockMerkleProofFullFromNoun(noun: Noun): LockMerkleProofFull;
/**
 * r" Convert into `Noun`.
 */
export function nameToNoun(v: Name): Noun;
/**
 * r" Convert from `Noun`.
 */
export function nameFromNoun(noun: Noun): Name;
export function nameHash(v: Name): Digest;
/**
 * r" Convert from `Noun`.
 */
export function timelockFromNoun(noun: Noun): Timelock;
export function timelockHash(v: Timelock): Digest;
/**
 * r" Convert into `Noun`.
 */
export function timelockToNoun(v: Timelock): Noun;
/**
 * r" Convert into `Noun`.
 */
export function lockV4ToNoun(v: LockV4): Noun;
/**
 * r" Convert from `Noun`.
 */
export function lockV4FromNoun(noun: Noun): LockV4;
export function lockV4Hash(v: LockV4): Digest;
/**
 * r" Convert from `Noun`.
 */
export function witnessFromNoun(noun: Noun): Witness;
export function witnessHash(v: Witness): Digest;
/**
 * r" Convert into `Noun`.
 */
export function witnessToNoun(v: Witness): Noun;
/**
 * r" Convert into `Noun`.
 */
export function lockRootToNoun(v: LockRoot): Noun;
/**
 * r" Convert from `Noun`.
 */
export function lockRootFromNoun(noun: Noun): LockRoot;
export function lockRootHash(v: LockRoot): Digest;
/**
 * r" Convert into `Noun`.
 */
export function noteInnerToNoun(v: NoteInner): Noun;
/**
 * r" Convert from `Noun`.
 */
export function noteInnerFromNoun(noun: Noun): NoteInner;
export function noteInnerHash(v: NoteInner): Digest;
export function lockFromListBurnpad(sps: SpendCondition[]): Lock;
export function lockFromList(sps: SpendCondition[]): Lock;
export function lockHeight(obj: Lock): number;
/**
 * r" Convert into `Noun`.
 */
export function displayInputToNoun(v: DisplayInput): Noun;
/**
 * r" Convert from `Noun`.
 */
export function displayInputFromNoun(noun: Noun): DisplayInput;
export function blockchainConstantsMainnet(): BlockchainConstants;
/**
 * r" Convert from `Noun`.
 */
export function inputFromNoun(noun: Noun): Input;
export function inputHash(v: Input): Digest;
/**
 * r" Convert into `Noun`.
 */
export function inputToNoun(v: Input): Noun;
/**
 * r" Convert from `Noun`.
 */
export function noteV0FromNoun(noun: Noun): NoteV0;
export function noteV0Hash(v: NoteV0): Digest;
/**
 * r" Convert into `Noun`.
 */
export function noteV0ToNoun(v: NoteV0): Noun;
/**
 * r" Convert from `Noun`.
 */
export function seedsV0FromNoun(noun: Noun): SeedsV0;
export function seedsV0Hash(v: SeedsV0): Digest;
/**
 * r" Convert into `Noun`.
 */
export function seedsV0ToNoun(v: SeedsV0): Noun;
/**
 * Structural `hash-noun` matching the Nockchain node's `hash-noun:hax`
 * (tx-engine-1.hoon) / `+hash-noun` (ztd/three.hoon): `hash-varlen` on every
 * belt-atom leaf, `hash-ten-cell` on every cell.
 *
 * This is DIFFERENT from `<Noun as Hashable>::hash` (and the `hashNoun` wasm
 * export), which computes `hash-varlen` over the WHOLE noun (one leaf-sequence +
 * dyck). The two coincide only for a single atom; for a structured noun (e.g. a
 * `tasBelts` list) they differ. HTLC hax-preimage commitments MUST use this
 * structural variant so the committed digest matches the node's hax check
 * (`=(h (hash-noun u.preimage))`).
 */
export function haxHashPreimage(preimage: Noun): Digest;
export function lockV16Hash(v: LockV16): Digest;
/**
 * r" Convert from `Noun`.
 */
export function lockV16FromNoun(noun: Noun): LockV16;
/**
 * r" Convert into `Noun`.
 */
export function lockV16ToNoun(v: LockV16): Noun;
/**
 * r" Convert from `Noun`.
 */
export function outputV1FromNoun(noun: Noun): OutputV1;
export function outputV1Hash(v: OutputV1): Digest;
/**
 * r" Convert into `Noun`.
 */
export function outputV1ToNoun(v: OutputV1): Noun;
export function spend1V1SigHash(obj: Spend1V1): Digest;
/**
 * r" Convert from `Noun`.
 */
export function pkhSignatureFromNoun(noun: Noun): PkhSignature;
export function pkhSignatureHash(v: PkhSignature): Digest;
/**
 * r" Convert into `Noun`.
 */
export function pkhSignatureToNoun(v: PkhSignature): Noun;
/**
 * r" Convert from `Noun`.
 */
export function timelockRangeFromNoun(noun: Noun): TimelockRange;
/**
 * r" Convert into `Noun`.
 */
export function timelockRangeToNoun(v: TimelockRange): Noun;
export function timelockRangeHash(v: TimelockRange): Digest;
/**
 * r" Convert from `Noun`.
 */
export function txFromNoun(noun: Noun): Tx;
/**
 * r" Convert into `Noun`.
 */
export function txToNoun(v: Tx): Noun;
export function pageHash(v: Page): Digest;
/**
 * r" Convert into `Noun`.
 */
export function pageToNoun(v: Page): Noun;
/**
 * r" Create a 0-indexed merkle proof for the type's subleaf.
 * r"
 * r" Note that unlike `prove-hashable-by-index:merkle`, which is 1-indexed, this method is 0-indexed.
 */
export function pageProve(v: Page, leaf_index: number): MerkleProvenAxis;
/**
 * r" Convert from `Noun`.
 */
export function pageFromNoun(noun: Noun): Page;
/**
 * r" Convert from `Noun`.
 */
export function rawTxFromNoun(noun: Noun): RawTx;
/**
 * r" Convert into `Noun`.
 */
export function rawTxToNoun(v: RawTx): Noun;
/**
 * Compute coinbase notes of this block
 */
export function pageCoinbase(obj: Page, consts: BlockchainConstants): Note[];
export function pageBlockCommitment(obj: Page): Digest;
export function rawTxTotalFees(obj: RawTx): Nicks;
export function rawTxVersion(obj: RawTx): Version;
/**
 * Returns the spend conditions for each input.
 * For V0 transactions, this is always None.
 */
export function rawTxInputSpendConditions(obj: RawTx): SpendCondition[];
export function rawTxId(obj: RawTx): Digest;
export function rawTxOutputs(obj: RawTx, block_height: number, tx_engine_settings: TxEngineSettings): Note[];
export function rawTxInputNames(obj: RawTx): Name[];
export function inputsHash(v: Inputs): Digest;
/**
 * r" Convert into `Noun`.
 */
export function inputsToNoun(v: Inputs): Noun;
/**
 * r" Convert from `Noun`.
 */
export function inputsFromNoun(noun: Noun): Inputs;
/**
 * r" Convert from `Noun`.
 */
export function spendV0FromNoun(noun: Noun): SpendV0;
export function spendV0Hash(v: SpendV0): Digest;
/**
 * r" Convert into `Noun`.
 */
export function spendV0ToNoun(v: SpendV0): Noun;
/**
 * r" Convert from `Noun`.
 */
export function outputsV0FromNoun(noun: Noun): OutputsV0;
/**
 * r" Convert into `Noun`.
 */
export function outputsV0ToNoun(v: OutputsV0): Noun;
export function outputsV0Hash(v: OutputsV0): Digest;
/**
 * r" Convert from `Noun`.
 */
export function chainTimestampFromNoun(noun: Noun): ChainTimestamp;
export function chainTimestampHash(v: ChainTimestamp): Digest;
/**
 * r" Convert into `Noun`.
 */
export function chainTimestampToNoun(v: ChainTimestamp): Noun;
/**
 * r" Convert from `Noun`.
 */
export function lockFromNoun(noun: Noun): Lock;
/**
 * r" Create a 0-indexed merkle proof for the type's subleaf.
 * r"
 * r" Note that unlike `prove-hashable-by-index:merkle`, which is 1-indexed, this method is 0-indexed.
 */
export function lockProve(v: Lock, leaf_index: number): MerkleProvenAxis;
/**
 * r" Convert into `Noun`.
 */
export function lockToNoun(v: Lock): Noun;
export function lockHash(v: Lock): Digest;
/**
 * r" Convert into `Noun`.
 */
export function txV1ToNoun(v: TxV1): Noun;
/**
 * r" Convert from `Noun`.
 */
export function txV1FromNoun(noun: Noun): TxV1;
/**
 * r" Convert into `Noun`.
 */
export function seedsV1ToNoun(v: SeedsV1): Noun;
/**
 * r" Convert from `Noun`.
 */
export function seedsV1FromNoun(noun: Noun): SeedsV1;
export function seedsV1Hash(v: SeedsV1): Digest;
/**
 * r" Convert from `Noun`.
 */
export function spendV1FromNoun(noun: Noun): SpendV1;
/**
 * r" Convert into `Noun`.
 */
export function spendV1ToNoun(v: SpendV1): Noun;
/**
 * r" Convert into `Noun`.
 */
export function rawTxV1ToNoun(v: RawTxV1): Noun;
/**
 * r" Convert from `Noun`.
 */
export function rawTxV1FromNoun(noun: Noun): RawTxV1;
/**
 * r" Convert into `Noun`.
 */
export function spendsV1ToNoun(v: SpendsV1): Noun;
/**
 * r" Convert from `Noun`.
 */
export function spendsV1FromNoun(noun: Noun): SpendsV1;
export function spendsV1Hash(v: SpendsV1): Digest;
/**
 * r" Convert into `Noun`.
 */
export function outputsV1ToNoun(v: OutputsV1): Noun;
/**
 * r" Convert from `Noun`.
 */
export function outputsV1FromNoun(noun: Noun): OutputsV1;
export function outputsV1Hash(v: OutputsV1): Digest;
export function spendV1Fee(obj: SpendV1): Nicks;
export function spendV1SigHash(obj: SpendV1): Digest;
export function spendV1NewWitness(witness: Witness, seeds: SeedsV1, fee: Nicks): SpendV1;
export function spendV1NewLegacy(seeds: SeedsV1, fee: Nicks): SpendV1;
export function spendV1UnclampedFee(obj: SpendV1, settings: TxEngineSettings): Nicks;
export function spendV1Seeds(obj: SpendV1): SeedsV1;
export function spendV1TotalGifts(obj: SpendV1): Nicks;
/**
 * r" Convert from `Noun`.
 */
export function nockchainTxFromNoun(noun: Noun): NockchainTx;
/**
 * r" Convert into `Noun`.
 */
export function nockchainTxToNoun(v: NockchainTx): Noun;
export function rawTxV1InputNames(obj: RawTxV1): Name[];
/**
 * Calculate output notes from the transaction spends.
 *
 * This function combines seeds across multiple spends into one output note per-lock-root.
 */
export function rawTxV1Outputs(obj: RawTxV1, origin_page: number, tx_engine_settings: TxEngineSettings): NoteV1[];
export function rawTxV1ToNockchainTx(obj: RawTxV1): NockchainTx;
export function rawTxV1InputSpendConditions(obj: RawTxV1): SpendCondition[];
export function rawTxV1New(spends: SpendsV1): RawTxV1;
export function rawTxV1CalcId(obj: RawTxV1): Digest;
export function rawTxV1Version(obj: RawTxV1): Version;
export function spendsV1TotalGifts(obj: SpendsV1): Nicks;
export function spendsV1Fee(obj: SpendsV1, settings: TxEngineSettings): Nicks;
export function spendsV1TotalFees(obj: SpendsV1): Nicks;
export function spendsV1UnclampedFee(obj: SpendsV1, settings: TxEngineSettings): Nicks;
export function spendsV1ApplyWitness(obj: SpendsV1, witness_data: WitnessData): SpendsV1;
export function lockPrimitiveHash(v: LockPrimitive): Digest;
/**
 * r" Convert into `Noun`.
 */
export function lockPrimitiveToNoun(v: LockPrimitive): Noun;
/**
 * r" Convert from `Noun`.
 */
export function lockPrimitiveFromNoun(noun: Noun): LockPrimitive;
export function nockchainTxToRawTx(obj: NockchainTx): RawTxV1;
export function nockchainTxOutputs(obj: NockchainTx, origin_page: number, tx_engine_settings: TxEngineSettings): NoteV1[];
export function coinbaseSplitV1Hash(v: CoinbaseSplitV1): Digest;
/**
 * r" Convert into `Noun`.
 */
export function coinbaseSplitV1ToNoun(v: CoinbaseSplitV1): Noun;
/**
 * r" Convert from `Noun`.
 */
export function coinbaseSplitV1FromNoun(noun: Noun): CoinbaseSplitV1;
export function lockMerkleProofStubHash(v: LockMerkleProofStub): Digest;
/**
 * r" Convert from `Noun`.
 */
export function lockMerkleProofStubFromNoun(noun: Noun): LockMerkleProofStub;
/**
 * r" Convert into `Noun`.
 */
export function lockMerkleProofStubToNoun(v: LockMerkleProofStub): Noun;
export function noteHash(v: Note): Digest;
/**
 * r" Convert into `Noun`.
 */
export function noteToNoun(v: Note): Noun;
/**
 * r" Convert from `Noun`.
 */
export function noteFromNoun(noun: Noun): Note;
/**
 * r" Convert from `Noun`.
 */
export function sourceFromNoun(noun: Noun): Source;
export function sourceHash(v: Source): Digest;
/**
 * r" Convert into `Noun`.
 */
export function sourceToNoun(v: Source): Noun;
/**
 * r" Convert into `Noun`.
 */
export function versionToNoun(v: Version): Noun;
/**
 * r" Convert from `Noun`.
 */
export function versionFromNoun(noun: Noun): Version;
export function versionHash(v: Version): Digest;
/**
 * r" Convert from `Noun`.
 */
export function timelockIntentFromNoun(noun: Noun): TimelockIntent;
export function timelockIntentHash(v: TimelockIntent): Digest;
/**
 * r" Convert into `Noun`.
 */
export function timelockIntentToNoun(v: TimelockIntent): Noun;
export function legacySignatureHash(v: LegacySignature): Digest;
/**
 * r" Convert from `Noun`.
 */
export function legacySignatureFromNoun(noun: Noun): LegacySignature;
/**
 * r" Convert into `Noun`.
 */
export function legacySignatureToNoun(v: LegacySignature): Noun;
export function coinbaseSplitV0Hash(v: CoinbaseSplitV0): Digest;
/**
 * r" Convert from `Noun`.
 */
export function coinbaseSplitV0FromNoun(noun: Noun): CoinbaseSplitV0;
/**
 * r" Convert into `Noun`.
 */
export function coinbaseSplitV0ToNoun(v: CoinbaseSplitV0): Noun;
export function pkhHash(v: Pkh): Digest;
/**
 * r" Convert into `Noun`.
 */
export function pkhToNoun(v: Pkh): Noun;
/**
 * r" Convert from `Noun`.
 */
export function pkhFromNoun(noun: Noun): Pkh;
export function pkhNew(m: bigint, hashes: Digest[]): Pkh;
export function pkhSingle(hash: Digest): Pkh;
/**
 * r" Convert from `Noun`.
 */
export function lockV8FromNoun(noun: Noun): LockV8;
/**
 * r" Convert into `Noun`.
 */
export function lockV8ToNoun(v: LockV8): Noun;
export function lockV8Hash(v: LockV8): Digest;
/**
 * r" Convert into `Noun`.
 */
export function seedV1ToNoun(v: SeedV1): Noun;
/**
 * r" Convert from `Noun`.
 */
export function seedV1FromNoun(noun: Noun): SeedV1;
export function seedV1Hash(v: SeedV1): Digest;
/**
 * r" Convert from `Noun`.
 */
export function noteDataFromNoun(noun: Noun): NoteData;
export function noteDataHash(v: NoteData): Digest;
/**
 * r" Convert into `Noun`.
 */
export function noteDataToNoun(v: NoteData): Noun;
export function seedV1NewSinglePkh(pkh: Digest, gift: Nicks, parent_hash: Digest, include_lock_data: boolean): SeedV1;
export function seedV1NoteDataWords(obj: SeedV1): bigint;
export function noteDataFeeWords(obj: NoteData): bigint;
export function noteDataFromPkh(pkh: Pkh): NoteData;
export function noteDataEmpty(): NoteData;
export function lockMerkleProofHash(v: LockMerkleProof): Digest;
/**
 * r" Convert from `Noun`.
 */
export function lockMerkleProofFromNoun(noun: Noun): LockMerkleProof;
/**
 * r" Convert into `Noun`.
 */
export function lockMerkleProofToNoun(v: LockMerkleProof): Noun;
/**
 * r" Convert from `Noun`.
 */
export function sigFromNoun(noun: Noun): Sig;
/**
 * r" Convert into `Noun`.
 */
export function sigToNoun(v: Sig): Noun;
export function sigHash(v: Sig): Digest;
/**
 * r" Convert into `Noun`.
 */
export function txV0ToNoun(v: TxV0): Noun;
/**
 * r" Convert from `Noun`.
 */
export function txV0FromNoun(noun: Noun): TxV0;
/**
 * r" Convert into `Noun`.
 */
export function rawTxV0ToNoun(v: RawTxV0): Noun;
/**
 * r" Convert from `Noun`.
 */
export function rawTxV0FromNoun(noun: Noun): RawTxV0;
/**
 * r" Convert into `Noun`.
 */
export function lockV2ToNoun(v: LockV2): Noun;
export function lockV2Hash(v: LockV2): Digest;
/**
 * r" Convert from `Noun`.
 */
export function lockV2FromNoun(noun: Noun): LockV2;
/**
 * r" Convert from `Noun`.
 */
export function noteV1FromNoun(noun: Noun): NoteV1;
/**
 * r" Convert into `Noun`.
 */
export function noteV1ToNoun(v: NoteV1): Noun;
export function noteV1Hash(v: NoteV1): Digest;
export function lockTimHash(v: LockTim): Digest;
/**
 * r" Convert into `Noun`.
 */
export function lockTimToNoun(v: LockTim): Noun;
/**
 * r" Convert from `Noun`.
 */
export function lockTimFromNoun(noun: Noun): LockTim;
/**
 * r" Convert into `Noun`.
 */
export function witnessDataToNoun(v: WitnessData): Noun;
/**
 * r" Convert from `Noun`.
 */
export function witnessDataFromNoun(noun: Noun): WitnessData;
/**
 * r" Convert from `Noun`.
 */
export function inputDisplayFromNoun(noun: Noun): InputDisplay;
/**
 * r" Convert into `Noun`.
 */
export function inputDisplayToNoun(v: InputDisplay): Noun;
/**
 * r" Convert into `Noun`.
 */
export function lockMetadataToNoun(v: LockMetadata): Noun;
/**
 * r" Convert from `Noun`.
 */
export function lockMetadataFromNoun(noun: Noun): LockMetadata;
export function lockMetadataHash(v: LockMetadata): Digest;
/**
 * r" Convert into `Noun`.
 */
export function transactionDisplayToNoun(v: TransactionDisplay): Noun;
/**
 * r" Convert from `Noun`.
 */
export function transactionDisplayFromNoun(noun: Noun): TransactionDisplay;
/**
 * r" Convert from `Noun`.
 */
export function balanceFromNoun(noun: Noun): Balance;
/**
 * r" Convert into `Noun`.
 */
export function balanceToNoun(v: Balance): Noun;
/**
 * r" Convert from `Noun`.
 */
export function balanceUpdateFromNoun(noun: Noun): BalanceUpdate;
/**
 * r" Convert into `Noun`.
 */
export function balanceUpdateToNoun(v: BalanceUpdate): Noun;
export function signatureHash(v: Signature): Digest;
/**
 * r" Convert into `Noun`.
 */
export function signatureToNoun(v: Signature): Noun;
/**
 * r" Convert from `Noun`.
 */
export function signatureFromNoun(noun: Noun): Signature;
export function publicKeyFromHex(hex: string): PublicKey | undefined;
export function publicKeyToHex(obj: PublicKey): string;
export function publicKeyToBeBytesVec(obj: PublicKey): Uint8Array;
export function publicKeyVerify(obj: PublicKey, m: Digest, sig: Signature): boolean;
export function publicKeyFromBeBytes(bytes: Uint8Array): PublicKey;
/**
 * r" Convert from `Noun`.
 */
export function publicKeyFromNoun(noun: Noun): PublicKey;
export function publicKeyHash(v: PublicKey): Digest;
/**
 * r" Convert into `Noun`.
 */
export function publicKeyToNoun(v: PublicKey): Noun;
/**
 * r" Convert into `Noun`.
 */
export function bignumToNoun(v: Bignum): Noun;
/**
 * r" Convert from `Noun`.
 */
export function bignumFromNoun(noun: Noun): Bignum;
export function bignumHash(v: Bignum): Digest;
export function merkleProvenAxisHash(v: MerkleProvenAxis): Digest;
/**
 * r" Convert into `Noun`.
 */
export function merkleProvenAxisToNoun(v: MerkleProvenAxis): Noun;
/**
 * r" Convert from `Noun`.
 */
export function merkleProvenAxisFromNoun(noun: Noun): MerkleProvenAxis;
export function digestHash(v: Digest): Digest;
/**
 * r" Convert into `Noun`.
 */
export function digestToNoun(v: Digest): Noun;
/**
 * r" Convert from `Noun`.
 */
export function digestFromNoun(noun: Noun): Digest;
export function digestFromAtom(atom: Noun): Digest;
export function digestToAtom(obj: Digest): Noun;
/**
 * r" Convert from `Noun`.
 */
export function merkleProofFromNoun(noun: Noun): MerkleProof;
/**
 * r" Convert into `Noun`.
 */
export function merkleProofToNoun(v: MerkleProof): Noun;
export function merkleProofHash(v: MerkleProof): Digest;
/**
 * The `ReadableStreamType` enum.
 *
 * *This API requires the following crate features to be activated: `ReadableStreamType`*
 */
type ReadableStreamType = "bytes";
export interface TxNotes {
    notes: Note[];
    refund_locks: (LockRoot | null)[];
}

export type TxLock = null | { lock: Lock; lock_sp_index: number };

export interface PbCom1ErrorStatus {
    code: number;
    message: string;
    /**
     * additional error context
     */
    details: string | null;
}

export interface PbCom1Signature {
    entries: PbCom1SignatureEntry[];
}

/**
 * pub struct CheetahPoint {
 *    pub x: F6lt,
 *    pub y: F6lt,
 *    pub inf: bool,
 * }
 */
export interface PbCom1CheetahPoint {
    x?: PbCom1SixBelt | null;
    y?: PbCom1SixBelt | null;
    inf: boolean;
}

export type PbCom1ErrorCode = "Unspecified" | "InvalidRequest" | "PeekFailed" | "PeekReturnedNoData" | "PokeFailed" | "NackappError" | "Timeout" | "InternalError" | "NotFound" | "PermissionDenied" | "InvalidWire" | "KernelError";

export interface PbCom1Spend {
    signature?: PbCom1Signature | null;
    seeds: PbCom1Seed[];
    miner_fee_nicks?: PbCom1Nicks | null;
}

/**
 * pub struct F6lt(pub \\[Belt; 6\\]);
 */
export interface PbCom1SixBelt {
    belt_1?: PbCom1Belt | null;
    belt_2?: PbCom1Belt | null;
    belt_3?: PbCom1Belt | null;
    belt_4?: PbCom1Belt | null;
    belt_5?: PbCom1Belt | null;
    belt_6?: PbCom1Belt | null;
}

export interface PbCom1Base58Pubkey {
    key: string;
}

/**
 * Generic pagination parameters for list-style RPCs.
 * These types are intended to be reused across public APIs.
 *
 * Contract:
 * - The server may return fewer items than requested (client_page_items_limit is a hint).
 * - page_token is an opaque cursor produced by the server; clients must treat
 *    it as a black box. Servers may encode snapshot identity and last-key.
 * - For consistent pagination, clients should include the returned page_token
 *    in the next request without modification.
 * - Servers may enforce a maximum client_page_items_limit and/or byte budget regardless of
 *    client hints.
 */
export interface PbCom1PageRequest {
    /**
     * Maximum number of items to return. The server may return fewer items
     * than requested. Clients should not rely on receiving exactly this count.
     */
    client_page_items_limit: number;
    /**
     * Opaque cursor returned by a previous call. When set, the server resumes
     * the listing from the position described by the token.
     * An empty token indicates the first page.
     */
    page_token: string;
    /**
     * Optional soft limit on the uncompressed bytes to return in a single page.
     * The server may ignore or cap this value according to policy. This refers
     * to the gRPC payload size after protobuf encoding and decompression.
     */
    max_bytes: number;
}

export interface PbCom1Acknowledged {}

export interface PbCom1WireTag {
    value?: PbCom1WireTagValue;
}

export interface PbCom1Source {
    hash: string;
    coinbase: boolean;
}

export interface PbCom1BlockHeightDelta {
    value: string;
}

export interface PbCom1Name {
    /**
     * First is the hash of whether the note has a timelock and the lock
     */
    first: string;
    /**
     * Last is the hash of the actual timelock and the source
     */
    last: string;
}

/**
 * Note: prefer using raw numeric fields in messages
 * instead of these wrappers to simplify conversions.
 * These remain defined for potential future use.
 */
export interface PbCom1NoteVersion {
    value: string;
}

/**
 * pub struct Belt(pub u64);
 */
export interface PbCom1Belt {
    value: string;
}

export interface PbCom1Input {
    note?: PbCom1Note | null;
    spend?: PbCom1Spend | null;
}

export interface PbCom1OutputSource {
    source?: PbCom1Source | null;
}

/**
 * pub struct Hash(pub \\[Belt; 5\\]);
 * Use fixed fields to avoid variable-length vectors.
 */
export interface PbCom1Hash {
    belt_1?: PbCom1Belt | null;
    belt_2?: PbCom1Belt | null;
    belt_3?: PbCom1Belt | null;
    belt_4?: PbCom1Belt | null;
    belt_5?: PbCom1Belt | null;
}

export interface PbCom1SchnorrSignature {
    chal?: PbCom1EightBelt | null;
    sig?: PbCom1EightBelt | null;
}

export interface PbCom1Seed {
    output_source?: PbCom1OutputSource | null;
    recipient?: PbCom1Lock | null;
    timelock_intent?: PbCom1TimeLockIntent | null;
    gift?: PbCom1Nicks | null;
    parent_hash: string;
}

export interface PbCom1Lock {
    /**
     * threshold of keys required to spend the note
     */
    keys_required: number;
    /**
     * DEPRECATED: repeated string schnorr_pubkeys_b58 = 2;
     *
     * schnorr pubkeys (curve: cheetah)
     */
    schnorr_pubkeys: PbCom1SchnorrPubkey[];
}

export interface PbCom1NamedInput {
    name?: PbCom1Name | null;
    input?: PbCom1Input | null;
}

export interface PbCom1Nicks {
    value: string;
}

/**
 * pub chal: \\[Belt; 8\\],
 * pub sig: \\[Belt; 8\\],
 */
export interface PbCom1EightBelt {
    belt_1?: PbCom1Belt | null;
    belt_2?: PbCom1Belt | null;
    belt_3?: PbCom1Belt | null;
    belt_4?: PbCom1Belt | null;
    belt_5?: PbCom1Belt | null;
    belt_6?: PbCom1Belt | null;
    belt_7?: PbCom1Belt | null;
    belt_8?: PbCom1Belt | null;
}

export interface PbCom1TimeLockIntent {
    value?: PbCom1TimeLockIntentValue;
}

export interface PbCom1BalanceEntry {
    name?: PbCom1Name | null;
    note?: PbCom1Note | null;
}

/**
 * Use this when you want to force the output to not have a timelock
 */
export interface PbCom1TimeLockRangeNeither {}

export interface PbCom1TimeLockRangeAbsoluteAndRelative {
    absolute?: PbCom1TimeLockRangeAbsolute | null;
    relative?: PbCom1TimeLockRangeRelative | null;
}

/**
 * min and max are relative to the note\'s creation page
 */
export interface PbCom1TimeLockRangeRelative {
    min?: PbCom1BlockHeightDelta | null;
    max?: PbCom1BlockHeightDelta | null;
}

export interface PbCom1Wire {
    /**
     * e.g., \"http\", \"file\", \"wallet\", \"grpc\
     */
    source: string;
    /**
     * wire format version
     */
    version: number;
    /**
     * operation-specific tags
     */
    tags: PbCom1WireTag[];
}

export interface PbCom1WalletBalanceData {
    /**
     * Page of full UTXO entries for the requested wallet. Entries are ordered
     * by (Name.first, Name.last) to support consistent pagination.
     *
     * note name -> amount
     */
    notes: PbCom1BalanceEntry[];
    /**
     * Snapshot metadata where this page was computed. Clients should include
     * the returned page token to continue paging against the same snapshot.
     *
     * block height where balance was computed
     */
    height?: PbCom1BlockHeight | null;
    /**
     * block where balance was computed
     */
    block_id?: PbCom1Hash | null;
    /**
     * Pagination cursor for fetching the next page in a paginated view.
     * When empty, there are no further results for this snapshot.
     */
    page?: PbCom1PageResponse | null;
}

export interface PbCom1BlockHeight {
    value: string;
}

export interface PbCom1Note {
    /**
     * page-number when added to balance
     */
    origin_page?: PbCom1BlockHeight | null;
    /**
     * enforced timelock
     */
    timelock?: PbCom1TimeLockIntent | null;
    /**
     * nname (human/name label)
     */
    name?: PbCom1Name | null;
    /**
     * spending condition
     */
    lock?: PbCom1Lock | null;
    /**
     * provenance commitment
     */
    source?: PbCom1Source | null;
    /**
     * coin amount (nicks)
     */
    assets?: PbCom1Nicks | null;
    /**
     * note version (currently 0)
     */
    version?: PbCom1NoteVersion | null;
}

/**
 * pub struct SchnorrPubkey(pub CheetahPoint);
 */
export interface PbCom1SchnorrPubkey {
    value?: PbCom1CheetahPoint | null;
}

export interface PbCom1PageResponse {
    /**
     * Opaque cursor for fetching the next page. Empty when there are no more
     * results.
     */
    next_page_token: string;
}

/**
 * min and max are absolute origin page numbers
 */
export interface PbCom1TimeLockRangeAbsolute {
    min?: PbCom1BlockHeight | null;
    max?: PbCom1BlockHeight | null;
}

export interface PbCom1Base58Hash {
    hash: string;
}

export interface PbCom1SignatureEntry {
    /**
     * serialized pubkey corresponding to the signer
     */
    schnorr_pubkey?: PbCom1SchnorrPubkey | null;
    signature?: PbCom1SchnorrSignature | null;
}

/**
 * the string key is the name of the input
 * message RawTransaction { map<Name, Input> inputs = 1; }
 */
export interface PbCom1RawTransaction {
    named_inputs: PbCom1NamedInput[];
    timelock_range?: PbCom1TimeLockRangeAbsolute | null;
    total_fees?: PbCom1Nicks | null;
    id: string;
}

export interface PbCom2Witness {
    lock_merkle_proof?: PbCom2LockMerkleProof | null;
    pkh_signature?: PbCom2PkhSignature | null;
    /**
     * uint64 tim = 4; // reserved field, currently 0
     */
    hax: PbCom2HaxPreimage[];
}

export interface PbCom2LockTim {
    rel?: PbCom1TimeLockRangeRelative;
    abs?: PbCom1TimeLockRangeAbsolute;
}

export interface PbCom2BurnLock {}

export interface PbCom2MerkleProof {
    root: string;
    path: string[];
}

export interface PbCom2PkhSignatureEntry {
    hash: string;
    pubkey?: PbCom1SchnorrPubkey;
    signature?: PbCom1SchnorrSignature;
}

export interface PbCom2LegacySpend {
    signature?: PbCom1Signature;
    seeds: PbCom2Seed[];
    fee?: PbCom1Nicks;
}

export interface PbCom2WitnessSpend {
    witness?: PbCom2Witness | null;
    seeds: PbCom2Seed[];
    fee?: PbCom1Nicks;
}

export interface PbCom2NoteDataEntry {
    key: string;
    /**
     * jammed noun bytes
     */
    blob: number[];
}

export interface PbCom2PkhLock {
    m: number;
    hashes: string[];
}

export interface PbCom2NoteV1 {
    version?: PbCom1NoteVersion;
    origin_page?: PbCom1BlockHeight;
    name?: PbCom1Name;
    note_data?: PbCom2NoteData | null;
    assets?: PbCom1Nicks;
}

export interface PbCom2LockPrimitive {
    primitive?: PbCom2LockPrimitivePrimitive;
}

export interface PbCom2SpendEntry {
    name?: PbCom1Name;
    spend?: PbCom2Spend | null;
}

export interface PbCom2Balance {
    notes: PbCom2BalanceEntry[];
    height?: PbCom1BlockHeight;
    block_id: string;
    page?: PbCom1PageResponse;
}

export interface PbCom2SpendCondition {
    primitives: PbCom2LockPrimitive[];
}

export interface PbCom2Seed {
    /**
     * Absent when the seed originates from a coinbase output.
     */
    output_source?: PbCom1Source;
    lock_root: string;
    note_data?: PbCom2NoteData | null;
    gift?: PbCom1Nicks;
    parent_hash: string;
}

export interface PbCom2PkhSignature {
    entries: PbCom2PkhSignatureEntry[];
}

export interface PbCom2Note {
    note_version?: PbCom2NoteNoteVersion;
}

export interface PbCom2NoteData {
    entries: PbCom2NoteDataEntry[];
}

export interface PbCom2LockMerkleProof {
    spend_condition?: PbCom2SpendCondition | null;
    axis: number;
    proof?: PbCom2MerkleProof | null;
    /**
     * %full tag when the proof includes a versioned LMP
     */
    lmp_version?: number | null;
}

export interface PbCom2HaxLock {
    hashes: PbCom1Hash[];
}

export interface PbCom2RawTransaction {
    version?: PbCom1NoteVersion;
    id: string;
    spends: PbCom2SpendEntry[];
}

export interface PbCom2BalanceEntry {
    name?: PbCom1Name;
    note?: PbCom2Note | null;
}

export interface PbCom2HaxPreimage {
    hash?: PbCom1Hash;
    /**
     * jammed noun bytes
     */
    value: number[];
}

export interface PbCom2Spend {
    spend_kind?: PbCom2SpendSpendKind;
}

export interface PbPub2WalletGetBalanceRequest {
    page?: PbCom1PageRequest;
    selector?: PbPub2WalletGetBalanceRequestSelector;
}

export interface PbPub2WalletGetBalanceResponse {
    result?: PbPub2WalletGetBalanceResponseResult;
}

export interface PbPub2TransactionAcceptedResponse {
    result?: PbPub2TransactionAcceptedResponseResult;
}

export interface PbPub2TransactionAcceptedRequest {
    tx_id?: PbCom1Base58Hash;
}

export interface PbPub2WalletSendTransactionResponse {
    result?: PbPub2WalletSendTransactionResponseResult;
}

export interface PbPub2WalletSendTransactionRequest {
    tx_id?: PbCom1Hash;
    raw_tx?: PbCom2RawTransaction;
}

export type PbPub2WalletSendTransactionResponseResult = { Ack: PbCom1Acknowledged } | { Error: PbCom1ErrorStatus };

export interface PbPri1PokeResponse {
    result?: PbPri1PokeResponseResult;
}

export interface PbPri1PeekRequest {
    /**
     * process ID for tracking
     */
    pid: number;
    /**
     * JAM-encoded nock peek path
     */
    path: number[];
}

export interface PbPri1PeekResponse {
    result?: PbPri1PeekResponseResult;
}

export interface PbPri1PokeRequest {
    /**
     * process ID for tracking
     */
    pid: number;
    /**
     * wire routing information
     */
    wire?: PbCom1Wire;
    /**
     * JAM-encoded nock data
     */
    payload: number[];
}

export type PbCom1TimeLockIntentValue = { Absolute: PbCom1TimeLockRangeAbsolute } | { Relative: PbCom1TimeLockRangeRelative } | { AbsoluteAndRelative: PbCom1TimeLockRangeAbsoluteAndRelative } | { Neither: PbCom1TimeLockRangeNeither };

export type PbPri1PokeResponseResult = { Acknowledged: boolean } | { Error: PbCom1ErrorStatus };

export type PbCom2NoteNoteVersion = { Legacy: PbCom1Note } | { V1: PbCom2NoteV1 };

export type PbPub2WalletGetBalanceResponseResult = { Balance: PbCom2Balance } | { Error: PbCom1ErrorStatus };

export type PbPri1PeekResponseResult = { Data: number[] } | { Error: PbCom1ErrorStatus };

export type PbCom2LockPrimitivePrimitive = { Pkh: PbCom2PkhLock } | { Tim: PbCom2LockTim } | { Hax: PbCom2HaxLock } | { Burn: PbCom2BurnLock };

export type PbPub2WalletGetBalanceRequestSelector = { Address: PbCom1Base58Pubkey } | { FirstName: PbCom1Base58Hash };

export type PbCom1WireTagValue = { Text: string } | { Number: number };

export type PbCom2SpendSpendKind = { Legacy: PbCom2LegacySpend } | { Witness: PbCom2WitnessSpend };

export type PbPub2TransactionAcceptedResponseResult = { Accepted: boolean } | { Error: PbCom1ErrorStatus };

export interface LockMerkleProofStub {
    spend_condition: SpendCondition;
    axis: 1;
    proof: MerkleProof;
}

export interface Spend0V1 {
    signature: LegacySignature;
    seeds: SeedsV1;
    fee: Nicks;
}

export type NoteData = ZMap<string, Noun>;

export interface Spend1V1 {
    witness: Witness;
    seeds: SeedsV1;
    fee: Nicks;
}

export interface LockMetadata {
    lock: Lock;
    include_data: boolean;
}

export interface NockchainTx {
    version: Version;
    id: TxId;
    spends: SpendsV1;
    display: TransactionDisplay;
    witness_data: WitnessData;
}

export interface LockV8 {
    p: LockV4;
    q: LockV4;
}

export type LockRoot = Digest | Lock;

export type PkhSignature = ZMap<Digest, [PublicKey, Signature]>;

export interface LockMerkleProofFull {
    spend_condition: SpendCondition;
    axis: number;
    proof: MerkleProof;
}

export interface RawTxV1 {
    version: 1;
    id: TxId;
    spends: SpendsV1;
}

export interface TxV1 {
    raw: RawTxV1;
    total_size: number;
    outputs: OutputsV1;
}

export interface NoteV1 {
    version: Version;
    origin_page: BlockHeight;
    name: Name;
    note_data: NoteData;
    assets: Nicks;
}

export interface LockV2 {
    p: SpendCondition;
    q: SpendCondition;
}

export type SeedsV1 = ZSet<SeedV1>;

export interface TransactionDisplay {
    inputs: InputDisplay;
    outputs: ZMap<Digest, LockMetadata>;
}

export interface Witness {
    lock_merkle_proof: LockMerkleProof;
    pkh_signature: PkhSignature;
    hax_map: ZMap<Digest, Noun>;
    tim: null;
}

export interface LockV16 {
    p: LockV8;
    q: LockV8;
}

export interface LockTim {
    rel: TimelockRange;
    abs: TimelockRange;
}

export interface Hax {
    preimages: ZSet<Digest>;
}

export type SpendsV1 = ZMap<Name, SpendV1>;

export interface OutputV1 {
    note: NoteV1;
    seeds: SeedsV1;
}

export type SpendCondition = LockPrimitive[];

export interface SeedV1 {
    output_source: Source | null;
    lock_root: LockRoot;
    note_data: NoteData;
    gift: Nicks;
    parent_hash: Digest;
}

export interface WitnessData {
    data: ZMap<Name, Witness>;
}

export interface Pkh {
    m: number;
    hashes: ZSet<Digest>;
}

export interface PageV1 {
    digest: Digest;
    pow: Noun | null;
    parent: Digest;
    tx_ids: ZSet<Digest>;
    coinbase: CoinbaseSplitV1;
    timestamp: ChainTimestamp;
    epoch_counter: number;
    target: Bignum;
    accumulated_work: Bignum;
    height: BlockHeight;
    msg: PageMsg;
}

/**
 * Maps Pkh -> Nicks (coins)
 */
export type CoinbaseSplitV1 = ZMap<Digest, Nicks>;

export interface LockV4 {
    p: LockV2;
    q: LockV2;
}

export type OutputsV1 = ZSet<OutputV1>;

export interface BlockchainConstants {
    first_month_coinbase_min: number;
    coinbase_timelock_min: number;
}

export interface TxEngineSettings {
    tx_engine_version: Version;
    tx_engine_patch: number;
    min_fee: Nicks;
    cost_per_word: Nicks;
    witness_word_div: number;
}

export type InputDisplay = { inputs: ZMap<Name, DisplayInput> } | { tag: 0; inputs: ZMap<Name, Sig> } | { tag: 1; inputs: ZMap<Name, SpendCondition> };

export type LockMerkleProof = LockMerkleProofStub | ({ version: "full" } & LockMerkleProofFull);

export type MissingUnlocks = { Pkh: { num_sigs: number; sig_of: Digest[] } } | { Hax: { preimages_for: Digest[] } } | "Brn" | { Sig: { num_sigs: number; sig_of: PublicKey[] } };

export interface NoteV0 {
    inner: NoteInner;
    name: Name;
    sig: Sig;
    source: Source;
    assets: Nicks;
}

export type SeedsV0 = ZSet<SeedV0>;

export interface Input {
    note: NoteV0;
    spend: SpendV0;
}

export interface TimelockIntent {
    tim: Timelock | null;
}

export interface OutputV0 {
    note: NoteV0;
    seeds: SeedsV0;
}

export interface PageV0 {
    digest: Digest;
    pow: Noun | null;
    parent: Digest;
    tx_ids: ZSet<Digest>;
    coinbase: CoinbaseSplitV0;
    timestamp: ChainTimestamp;
    epoch_counter: number;
    target: Bignum;
    accumulated_work: Bignum;
    height: BlockHeight;
    msg: PageMsg;
}

export interface NoteInner {
    version: Version;
    origin_page: BlockHeight;
    timelock: TimelockIntent;
}

export type CoinbaseSplitV0 = ZMap<Sig, Nicks>;

export type PageMsg = (string | number[]) & { __tag_page_msg: undefined };

export interface SpendV0 {
    signature: LegacySignature | null;
    seeds: SeedsV0;
    fee: Nicks;
}

export interface RawTxV0 {
    id: TxId;
    inputs: Inputs;
    timelock_range: TimelockRange;
    total_fees: Nicks;
}

export type LegacySignature = ZMap<PublicKey, Signature>;

export type Inputs = ZMap<Name, Input>;

export interface SeedV0 {
    output_source: Source | null;
    recipient: Sig;
    timelock_intent: TimelockIntent;
    gift: Nicks;
    parent_hash: Digest;
}

export type OutputsV0 = ZMap<Sig, OutputV0>;

/**
 * Chain timestamp, displayed in unix seconds.
 */
export type ChainTimestamp = number & { __tag_chain_timestamp: undefined };

export interface Sig {
    m: number;
    pubkeys: ZSet<PublicKey>;
}

export interface TxV0 {
    raw: RawTxV0;
    total_size: number;
    outputs: OutputsV0;
}

export interface Timelock {
    abs: TimelockRange;
    rel: TimelockRange;
}

export type LockPrimitive = ({ tag: "pkh" } & Pkh) | ({ tag: "tim" } & LockTim) | ({ tag: "hax" } & Hax) | { tag: "brn" };

export type Lock = SpendCondition | ({ tag: 2 } & LockV2) | ({ tag: 4 } & LockV4) | ({ tag: 8 } & LockV8) | ({ tag: 16 } & LockV16);

export type Tx = ({ tag: 0 } & TxV0) | ({ tag: 1 } & TxV1);

export type Page = PageV0 | ({ tag: 1 } & PageV1);

export type RawTx = RawTxV0 | RawTxV1;

export type Outputs = ({ tag: 0 } & OutputsV0) | ({ tag: 1 } & OutputsV1);

export type SpendV1 = ({ tag: 0 } & Spend0V1) | ({ tag: 1 } & Spend1V1);

export type DisplayInput = ({ tag: 0 } & Sig) | ({ tag: 1 } & SpendCondition);

export interface Name {
    first: Digest;
    last: Digest;
    _sig: number;
}

export interface BalanceUpdate {
    height: BlockHeight;
    block_id: Digest;
    notes: Balance;
}

export interface Source {
    hash: Digest;
    is_coinbase: boolean;
}

export type Version = 0 | 1 | 2;

export type Note = NoteV0 | NoteV1;

/**
 * Timelock range (for both absolute and relative constraints)
 */
export interface TimelockRange {
    min: BlockHeight | null;
    max: BlockHeight | null;
}

/**
 * 64-bit unsigned integer representing the number of assets.
 */
export type Nicks = string & { __tag_nicks: undefined };

export type Balance = ZMap<Name, Note>;

export type PublicKey = CheetahPoint;

export interface Signature {
    /**
     * Challenge part in little-endian hex
     */
    c: string;
    /**
     * Signature scalar in little-endian hex
     */
    s: string;
}

/**
 * Nock-native data structure
 *
 * A Noun is an Atom or a Cell.
 *
 * A Cell is a pair of Nouns.
 *
 * An Atom is a natural number.
 *
 * Specific to iris, serialized atoms are encoded as little-endian hex strings.
 */
export type Noun = string | [Noun];

export type CheetahPoint = string & { __tag_cheetah_point: undefined };

export type Digest = string & { __tag_digest: undefined };

export type ZMapEntry<K, V> = [K, V];

export type ZMap<K, V> = ZBase<ZMapEntry<K, V>>;

/**
 * Big integer, with noun encoding as 32-bit sized limbs in LSB
 *
 * In wasm, this is encoded as a string of hex digits, with no padding. This is the same as Noun\'s atom case.
 */
export type Bignum = string & { __tag_bignum: undefined };

export type ZSetEntry<T> = T;

export type ZSet<T> = ZBase<ZSetEntry<T>>;

export interface MerkleProof {
    root: Digest;
    path: Digest[];
}

export interface MerkleProvenAxis {
    proof: MerkleProof;
    axis: number;
}

export type ZBase<E> = E[];

export class ExtendedKey {
  private constructor();
  free(): void;
  [Symbol.dispose](): void;
  /**
   * Derive a child key at the given index
   */
  deriveChild(index: number): ExtendedKey;
  readonly chainCode: Uint8Array;
  readonly publicKey: Uint8Array;
  readonly privateKey: Uint8Array | undefined;
}
export class GrpcClient {
  free(): void;
  [Symbol.dispose](): void;
  /**
   * Send a transaction
   */
  sendTransaction(raw_tx: PbCom2RawTransaction): Promise<string>;
  /**
   * Check if a transaction was accepted
   */
  transactionAccepted(tx_id: string): Promise<boolean>;
  /**
   * Get balance for a wallet address
   */
  getBalanceByAddress(address: string): Promise<PbCom2Balance>;
  /**
   * Get balance for a first name
   */
  getBalanceByFirstName(first_name: string): Promise<PbCom2Balance>;
  constructor(endpoint: string);
  /**
   * Peek a value from a Nock application
   */
  peek(pid: number, path: Noun): Promise<Noun>;
  /**
   * Poke a Nock application
   */
  poke(pid: number, wire: PbCom1Wire, payload: Noun): Promise<void>;
}
export class IntoUnderlyingByteSource {
  private constructor();
  free(): void;
  [Symbol.dispose](): void;
  pull(controller: ReadableByteStreamController): Promise<any>;
  start(controller: ReadableByteStreamController): void;
  cancel(): void;
  readonly autoAllocateChunkSize: number;
  readonly type: ReadableStreamType;
}
export class IntoUnderlyingSink {
  private constructor();
  free(): void;
  [Symbol.dispose](): void;
  abort(reason: any): Promise<any>;
  close(): Promise<any>;
  write(chunk: any): Promise<any>;
}
export class IntoUnderlyingSource {
  private constructor();
  free(): void;
  [Symbol.dispose](): void;
  pull(controller: ReadableStreamDefaultController): Promise<any>;
  cancel(): void;
}
export class PrivateKey {
  free(): void;
  [Symbol.dispose](): void;
  /**
   * Construct a bytes-backed key.
   */
  static fromBytes(signing_key_bytes: Uint8Array): PrivateKey;
  /**
   * Return the backend kind for debugging and feature checks.
   */
  backendKind(): string;
  /**
   * Construct a wasm `PrivateKey` from 32-byte private key material.
   *
   * This object is created in JavaScript and then passed into Rust signing APIs.
   *
   * # JavaScript example
   *
   * ```javascript
   * import init, { PrivateKey, TxBuilder } from "iris-wasm";
   *
   * await init();
   *
   * const keyBytes = Uint8Array.from([
   *   // 32 bytes
   * ]);
   *
   * const key = PrivateKey.fromBytes(keyBytes);
   *
   * const builder = new TxBuilder(settings);
   * // ... configure builder ...
   * await builder.sign(key);
   * ```
   */
  constructor(signing_key_bytes: Uint8Array);
  /**
   * Return this key's public key as 97-byte uncompressed bytes.
   */
  readonly publicKey: Uint8Array;
  /**
   * Return the derivation path for this key backend, if available.
   *
   * Bytes-backed keys return `undefined` in JavaScript.
   */
  readonly derivationPath: string | undefined;
}
export class SpendBuilder {
  free(): void;
  [Symbol.dispose](): void;
  curRefund(): SeedV1 | undefined;
  isBalanced(): boolean;
  addPreimage(preimage_jam: Uint8Array): Digest | undefined;
  computeRefund(include_lock_data: boolean): void;
  invalidateSigs(): void;
  missingUnlocks(): MissingUnlocks[];
  fee(fee: Nicks): void;
  /**
   * Create a new `SpendBuilder` with a given note and spend condition
   */
  constructor(note: Note, lock?: Lock | null, lock_sp_index?: number | null, refund_lock?: LockRoot | null);
  seed(seed: SeedV1): void;
  sign(signing_key: PrivateKey): Promise<boolean>;
}
export class TxBuilder {
  free(): void;
  [Symbol.dispose](): void;
  allSpends(): SpendBuilder[];
  /**
   * Reconstruct a builder from raw transaction.
   */
  static fromRawTx(tx: RawTx, settings: TxEngineSettings): TxBuilder;
  addPreimage(preimage_jam: Uint8Array): Digest | undefined;
  simpleSpend(notes: Note[], locks: TxLock[], recipient: Digest, gift: Nicks, fee_override: Nicks | null | undefined, refund_pkh: Digest, include_lock_data: boolean): void;
  /**
   * Reconstruct a builder from Nockchain transaction.
   */
  static fromNockchainTx(tx: NockchainTx, settings: TxEngineSettings): TxBuilder;
  recalcAndSetFee(include_lock_data: boolean): void;
  setFeeAndBalanceRefund(fee: Nicks, adjust_fee: boolean, include_lock_data: boolean): void;
  /**
   * Create an empty transaction builder
   */
  constructor(settings: TxEngineSettings);
  sign(signing_key: PrivateKey): Promise<void>;
  build(): NockchainTx;
  /**
   * Append a `SpendBuilder` to this transaction
   */
  spend(spend: SpendBuilder): SpendBuilder | undefined;
  curFee(): Nicks;
  calcFee(): Nicks;
  validate(): void;
}

export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

export interface InitOutput {
  readonly memory: WebAssembly.Memory;
  readonly __wbg_privatekey_free: (a: number, b: number) => void;
  readonly __wbg_spendbuilder_free: (a: number, b: number) => void;
  readonly __wbg_txbuilder_free: (a: number, b: number) => void;
  readonly digestFromProtobuf: (a: any) => [number, number, number];
  readonly digestToProtobuf: (a: any) => any;
  readonly noteFromProtobuf: (a: any) => [number, number, number];
  readonly noteToProtobuf: (a: any) => any;
  readonly privatekey_backendKind: (a: number) => [number, number];
  readonly privatekey_derivationPath: (a: number) => [number, number];
  readonly privatekey_fromBytes: (a: number, b: number) => [number, number, number];
  readonly privatekey_new: (a: number, b: number) => [number, number, number];
  readonly privatekey_publicKey: (a: number) => [number, number];
  readonly rawTxFromProtobuf: (a: any) => [number, number, number];
  readonly rawTxToProtobuf: (a: any) => any;
  readonly spendConditionFromProtobuf: (a: any) => [number, number, number];
  readonly spendConditionToProtobuf: (a: any) => any;
  readonly spendbuilder_addPreimage: (a: number, b: number, c: number) => [number, number, number];
  readonly spendbuilder_computeRefund: (a: number, b: number) => void;
  readonly spendbuilder_curRefund: (a: number) => any;
  readonly spendbuilder_fee: (a: number, b: any) => void;
  readonly spendbuilder_invalidateSigs: (a: number) => void;
  readonly spendbuilder_isBalanced: (a: number) => number;
  readonly spendbuilder_missingUnlocks: (a: number) => [number, number, number, number];
  readonly spendbuilder_new: (a: any, b: number, c: number, d: number) => [number, number, number];
  readonly spendbuilder_seed: (a: number, b: any) => [number, number];
  readonly spendbuilder_sign: (a: number, b: number) => any;
  readonly txEngineSettingsV1BythosDefault: () => any;
  readonly txEngineSettingsV1Default: () => any;
  readonly txbuilder_addPreimage: (a: number, b: number, c: number) => [number, number, number];
  readonly txbuilder_allSpends: (a: number) => [number, number];
  readonly txbuilder_build: (a: number) => [number, number, number];
  readonly txbuilder_calcFee: (a: number) => any;
  readonly txbuilder_curFee: (a: number) => any;
  readonly txbuilder_fromNockchainTx: (a: any, b: any) => [number, number, number];
  readonly txbuilder_fromRawTx: (a: any, b: any) => [number, number, number];
  readonly txbuilder_new: (a: any) => number;
  readonly txbuilder_recalcAndSetFee: (a: number, b: number) => [number, number];
  readonly txbuilder_setFeeAndBalanceRefund: (a: number, b: any, c: number, d: number) => [number, number];
  readonly txbuilder_sign: (a: number, b: number) => any;
  readonly txbuilder_simpleSpend: (a: number, b: number, c: number, d: number, e: number, f: any, g: any, h: number, i: any, j: number) => [number, number];
  readonly txbuilder_spend: (a: number, b: number) => number;
  readonly txbuilder_validate: (a: number) => [number, number];
  readonly initPanicHook: () => void;
  readonly atomToBelts: (a: any) => [number, number, number];
  readonly beltsToAtom: (a: any) => [number, number, number];
  readonly cue: (a: number, b: number) => [number, number, number];
  readonly jam: (a: any) => [number, number, number, number];
  readonly tas: (a: number, b: number) => any;
  readonly tasBelts: (a: number, b: number) => any;
  readonly untas: (a: any) => [number, number, number, number];
  readonly __wbg_extendedkey_free: (a: number, b: number) => void;
  readonly __wbg_grpcclient_free: (a: number, b: number) => void;
  readonly deriveMasterKey: (a: number, b: number) => number;
  readonly deriveMasterKeyFromMnemonic: (a: number, b: number, c: number, d: number) => [number, number, number];
  readonly extendedkey_chainCode: (a: number) => [number, number];
  readonly extendedkey_deriveChild: (a: number, b: number) => [number, number, number];
  readonly extendedkey_privateKey: (a: number) => [number, number];
  readonly extendedkey_publicKey: (a: number) => [number, number];
  readonly grpcclient_getBalanceByAddress: (a: number, b: number, c: number) => any;
  readonly grpcclient_getBalanceByFirstName: (a: number, b: number, c: number) => any;
  readonly grpcclient_new: (a: number, b: number) => number;
  readonly grpcclient_peek: (a: number, b: number, c: any) => any;
  readonly grpcclient_poke: (a: number, b: number, c: any, d: any) => any;
  readonly grpcclient_sendTransaction: (a: number, b: any) => any;
  readonly grpcclient_transactionAccepted: (a: number, b: number, c: number) => any;
  readonly hashNoun: (a: number, b: number) => [number, number, number, number];
  readonly hashPreimage: (a: number, b: number) => [number, number, number];
  readonly hashPublicKey: (a: number, b: number) => [number, number, number, number];
  readonly hashU64: (a: bigint) => [number, number];
  readonly signMessage: (a: number, b: number, c: number, d: number) => [number, number, number];
  readonly verifySignature: (a: number, b: number, c: any, d: number, e: number) => [number, number, number];
  readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void;
  readonly intounderlyingsource_cancel: (a: number) => void;
  readonly intounderlyingsource_pull: (a: number, b: any) => any;
  readonly __wbg_intounderlyingbytesource_free: (a: number, b: number) => void;
  readonly __wbg_intounderlyingsink_free: (a: number, b: number) => void;
  readonly intounderlyingbytesource_autoAllocateChunkSize: (a: number) => number;
  readonly intounderlyingbytesource_cancel: (a: number) => void;
  readonly intounderlyingbytesource_pull: (a: number, b: any) => any;
  readonly intounderlyingbytesource_start: (a: number, b: any) => void;
  readonly intounderlyingbytesource_type: (a: number) => number;
  readonly intounderlyingsink_abort: (a: number, b: any) => any;
  readonly intounderlyingsink_close: (a: number) => any;
  readonly intounderlyingsink_write: (a: number, b: any) => any;
  readonly haxFromNoun: (a: any) => [number, number, number];
  readonly haxHash: (a: any) => any;
  readonly haxToNoun: (a: any) => any;
  readonly lockMerkleProofFullFromNoun: (a: any) => [number, number, number];
  readonly lockMerkleProofFullHash: (a: any) => any;
  readonly lockMerkleProofFullToNoun: (a: any) => any;
  readonly nameFromNoun: (a: any) => [number, number, number];
  readonly nameHash: (a: any) => any;
  readonly nameToNoun: (a: any) => any;
  readonly outputV0FromNoun: (a: any) => [number, number, number];
  readonly outputV0Hash: (a: any) => any;
  readonly outputV0ToNoun: (a: any) => any;
  readonly pageMsgFromNoun: (a: any) => [number, number, number];
  readonly pageMsgHash: (a: any) => any;
  readonly pageMsgToNoun: (a: any) => any;
  readonly seedV0FromNoun: (a: any) => [number, number, number];
  readonly seedV0Hash: (a: any) => any;
  readonly seedV0ToNoun: (a: any) => any;
  readonly spendConditionBrn: (a: any) => number;
  readonly spendConditionFirstName: (a: any) => any;
  readonly spendConditionFromNoun: (a: any) => [number, number, number];
  readonly spendConditionHash: (a: any) => any;
  readonly spendConditionHax: (a: any) => [number, number];
  readonly spendConditionNewPkh: (a: any) => any;
  readonly spendConditionPkh: (a: any) => [number, number];
  readonly spendConditionTim: (a: any) => [number, number];
  readonly spendConditionToNoun: (a: any) => any;
  readonly lockRootFromNoun: (a: any) => [number, number, number];
  readonly lockRootHash: (a: any) => any;
  readonly lockRootToNoun: (a: any) => any;
  readonly lockV4FromNoun: (a: any) => [number, number, number];
  readonly lockV4Hash: (a: any) => any;
  readonly lockV4ToNoun: (a: any) => any;
  readonly timelockFromNoun: (a: any) => [number, number, number];
  readonly timelockHash: (a: any) => any;
  readonly timelockToNoun: (a: any) => any;
  readonly witnessFromNoun: (a: any) => [number, number, number];
  readonly witnessHash: (a: any) => any;
  readonly witnessToNoun: (a: any) => any;
  readonly displayInputFromNoun: (a: any) => [number, number, number];
  readonly displayInputToNoun: (a: any) => any;
  readonly lockFromList: (a: number, b: number) => any;
  readonly lockFromListBurnpad: (a: number, b: number) => any;
  readonly lockHeight: (a: any) => number;
  readonly noteInnerFromNoun: (a: any) => [number, number, number];
  readonly noteInnerHash: (a: any) => any;
  readonly noteInnerToNoun: (a: any) => any;
  readonly blockchainConstantsMainnet: () => any;
  readonly haxHashPreimage: (a: any) => any;
  readonly inputFromNoun: (a: any) => [number, number, number];
  readonly inputHash: (a: any) => any;
  readonly inputToNoun: (a: any) => any;
  readonly lockV16FromNoun: (a: any) => [number, number, number];
  readonly lockV16Hash: (a: any) => any;
  readonly lockV16ToNoun: (a: any) => any;
  readonly noteV0FromNoun: (a: any) => [number, number, number];
  readonly noteV0Hash: (a: any) => any;
  readonly noteV0ToNoun: (a: any) => any;
  readonly outputV1FromNoun: (a: any) => [number, number, number];
  readonly outputV1Hash: (a: any) => any;
  readonly outputV1ToNoun: (a: any) => any;
  readonly pkhSignatureFromNoun: (a: any) => [number, number, number];
  readonly pkhSignatureHash: (a: any) => any;
  readonly pkhSignatureToNoun: (a: any) => any;
  readonly seedsV0FromNoun: (a: any) => [number, number, number];
  readonly seedsV0Hash: (a: any) => any;
  readonly seedsV0ToNoun: (a: any) => any;
  readonly spend1V1SigHash: (a: any) => any;
  readonly timelockRangeFromNoun: (a: any) => [number, number, number];
  readonly timelockRangeHash: (a: any) => any;
  readonly timelockRangeToNoun: (a: any) => any;
  readonly chainTimestampFromNoun: (a: any) => [number, number, number];
  readonly chainTimestampHash: (a: any) => any;
  readonly chainTimestampToNoun: (a: any) => any;
  readonly coinbaseSplitV1FromNoun: (a: any) => [number, number, number];
  readonly coinbaseSplitV1Hash: (a: any) => any;
  readonly coinbaseSplitV1ToNoun: (a: any) => any;
  readonly inputsFromNoun: (a: any) => [number, number, number];
  readonly inputsHash: (a: any) => any;
  readonly inputsToNoun: (a: any) => any;
  readonly lockFromNoun: (a: any) => [number, number, number];
  readonly lockHash: (a: any) => any;
  readonly lockMerkleProofStubFromNoun: (a: any) => [number, number, number];
  readonly lockMerkleProofStubHash: (a: any) => any;
  readonly lockMerkleProofStubToNoun: (a: any) => any;
  readonly lockPrimitiveFromNoun: (a: any) => [number, number, number];
  readonly lockPrimitiveHash: (a: any) => any;
  readonly lockPrimitiveToNoun: (a: any) => any;
  readonly lockProve: (a: any, b: number) => any;
  readonly lockToNoun: (a: any) => any;
  readonly nockchainTxFromNoun: (a: any) => [number, number, number];
  readonly nockchainTxOutputs: (a: any, b: number, c: any) => [number, number];
  readonly nockchainTxToNoun: (a: any) => any;
  readonly nockchainTxToRawTx: (a: any) => any;
  readonly noteFromNoun: (a: any) => [number, number, number];
  readonly noteHash: (a: any) => any;
  readonly noteToNoun: (a: any) => any;
  readonly outputsV0FromNoun: (a: any) => [number, number, number];
  readonly outputsV0Hash: (a: any) => any;
  readonly outputsV0ToNoun: (a: any) => any;
  readonly outputsV1FromNoun: (a: any) => [number, number, number];
  readonly outputsV1Hash: (a: any) => any;
  readonly outputsV1ToNoun: (a: any) => any;
  readonly pageBlockCommitment: (a: any) => any;
  readonly pageCoinbase: (a: any, b: any) => [number, number];
  readonly pageFromNoun: (a: any) => [number, number, number];
  readonly pageHash: (a: any) => any;
  readonly pageProve: (a: any, b: number) => any;
  readonly pageToNoun: (a: any) => any;
  readonly rawTxFromNoun: (a: any) => [number, number, number];
  readonly rawTxId: (a: any) => any;
  readonly rawTxInputNames: (a: any) => [number, number];
  readonly rawTxInputSpendConditions: (a: any) => [number, number];
  readonly rawTxOutputs: (a: any, b: number, c: any) => [number, number];
  readonly rawTxToNoun: (a: any) => any;
  readonly rawTxTotalFees: (a: any) => any;
  readonly rawTxV1CalcId: (a: any) => any;
  readonly rawTxV1FromNoun: (a: any) => [number, number, number];
  readonly rawTxV1InputNames: (a: any) => [number, number];
  readonly rawTxV1InputSpendConditions: (a: any) => [number, number];
  readonly rawTxV1New: (a: any) => any;
  readonly rawTxV1Outputs: (a: any, b: number, c: any) => [number, number];
  readonly rawTxV1ToNockchainTx: (a: any) => any;
  readonly rawTxV1ToNoun: (a: any) => any;
  readonly rawTxV1Version: (a: any) => any;
  readonly rawTxVersion: (a: any) => any;
  readonly seedsV1FromNoun: (a: any) => [number, number, number];
  readonly seedsV1Hash: (a: any) => any;
  readonly seedsV1ToNoun: (a: any) => any;
  readonly sourceFromNoun: (a: any) => [number, number, number];
  readonly sourceHash: (a: any) => any;
  readonly sourceToNoun: (a: any) => any;
  readonly spendV0FromNoun: (a: any) => [number, number, number];
  readonly spendV0Hash: (a: any) => any;
  readonly spendV0ToNoun: (a: any) => any;
  readonly spendV1Fee: (a: any) => any;
  readonly spendV1FromNoun: (a: any) => [number, number, number];
  readonly spendV1NewLegacy: (a: any, b: any) => any;
  readonly spendV1NewWitness: (a: any, b: any, c: any) => any;
  readonly spendV1Seeds: (a: any) => any;
  readonly spendV1SigHash: (a: any) => any;
  readonly spendV1ToNoun: (a: any) => any;
  readonly spendV1TotalGifts: (a: any) => any;
  readonly spendV1UnclampedFee: (a: any, b: any) => any;
  readonly spendsV1ApplyWitness: (a: any, b: any) => any;
  readonly spendsV1Fee: (a: any, b: any) => any;
  readonly spendsV1FromNoun: (a: any) => [number, number, number];
  readonly spendsV1Hash: (a: any) => any;
  readonly spendsV1ToNoun: (a: any) => any;
  readonly spendsV1TotalFees: (a: any) => any;
  readonly spendsV1TotalGifts: (a: any) => any;
  readonly spendsV1UnclampedFee: (a: any, b: any) => any;
  readonly txFromNoun: (a: any) => [number, number, number];
  readonly txToNoun: (a: any) => any;
  readonly txV1FromNoun: (a: any) => [number, number, number];
  readonly txV1ToNoun: (a: any) => any;
  readonly versionFromNoun: (a: any) => [number, number, number];
  readonly versionHash: (a: any) => any;
  readonly versionToNoun: (a: any) => any;
  readonly coinbaseSplitV0FromNoun: (a: any) => [number, number, number];
  readonly coinbaseSplitV0Hash: (a: any) => any;
  readonly coinbaseSplitV0ToNoun: (a: any) => any;
  readonly legacySignatureFromNoun: (a: any) => [number, number, number];
  readonly legacySignatureHash: (a: any) => any;
  readonly legacySignatureToNoun: (a: any) => any;
  readonly lockMerkleProofFromNoun: (a: any) => [number, number, number];
  readonly lockMerkleProofHash: (a: any) => any;
  readonly lockMerkleProofToNoun: (a: any) => any;
  readonly lockV8FromNoun: (a: any) => [number, number, number];
  readonly lockV8Hash: (a: any) => any;
  readonly lockV8ToNoun: (a: any) => any;
  readonly noteDataEmpty: () => any;
  readonly noteDataFeeWords: (a: any) => bigint;
  readonly noteDataFromNoun: (a: any) => [number, number, number];
  readonly noteDataFromPkh: (a: any) => any;
  readonly noteDataHash: (a: any) => any;
  readonly noteDataToNoun: (a: any) => any;
  readonly pkhFromNoun: (a: any) => [number, number, number];
  readonly pkhHash: (a: any) => any;
  readonly pkhNew: (a: bigint, b: number, c: number) => any;
  readonly pkhSingle: (a: any) => any;
  readonly pkhToNoun: (a: any) => any;
  readonly seedV1FromNoun: (a: any) => [number, number, number];
  readonly seedV1Hash: (a: any) => any;
  readonly seedV1NewSinglePkh: (a: any, b: any, c: any, d: number) => any;
  readonly seedV1NoteDataWords: (a: any) => bigint;
  readonly seedV1ToNoun: (a: any) => any;
  readonly timelockIntentFromNoun: (a: any) => [number, number, number];
  readonly timelockIntentHash: (a: any) => any;
  readonly timelockIntentToNoun: (a: any) => any;
  readonly balanceFromNoun: (a: any) => [number, number, number];
  readonly balanceToNoun: (a: any) => any;
  readonly balanceUpdateFromNoun: (a: any) => [number, number, number];
  readonly balanceUpdateToNoun: (a: any) => any;
  readonly inputDisplayFromNoun: (a: any) => [number, number, number];
  readonly inputDisplayToNoun: (a: any) => any;
  readonly lockMetadataFromNoun: (a: any) => [number, number, number];
  readonly lockMetadataHash: (a: any) => any;
  readonly lockMetadataToNoun: (a: any) => any;
  readonly lockTimFromNoun: (a: any) => [number, number, number];
  readonly lockTimHash: (a: any) => any;
  readonly lockTimToNoun: (a: any) => any;
  readonly lockV2FromNoun: (a: any) => [number, number, number];
  readonly lockV2Hash: (a: any) => any;
  readonly lockV2ToNoun: (a: any) => any;
  readonly noteV1FromNoun: (a: any) => [number, number, number];
  readonly noteV1Hash: (a: any) => any;
  readonly noteV1ToNoun: (a: any) => any;
  readonly rawTxV0FromNoun: (a: any) => [number, number, number];
  readonly rawTxV0ToNoun: (a: any) => any;
  readonly sigFromNoun: (a: any) => [number, number, number];
  readonly sigHash: (a: any) => any;
  readonly sigToNoun: (a: any) => any;
  readonly transactionDisplayFromNoun: (a: any) => [number, number, number];
  readonly transactionDisplayToNoun: (a: any) => any;
  readonly txV0FromNoun: (a: any) => [number, number, number];
  readonly txV0ToNoun: (a: any) => any;
  readonly witnessDataFromNoun: (a: any) => [number, number, number];
  readonly witnessDataToNoun: (a: any) => any;
  readonly publicKeyFromBeBytes: (a: number, b: number) => any;
  readonly publicKeyFromHex: (a: number, b: number) => any;
  readonly publicKeyToBeBytesVec: (a: any) => [number, number];
  readonly publicKeyToHex: (a: any) => [number, number];
  readonly publicKeyVerify: (a: any, b: any, c: any) => number;
  readonly signatureFromNoun: (a: any) => [number, number, number];
  readonly signatureHash: (a: any) => any;
  readonly signatureToNoun: (a: any) => any;
  readonly publicKeyFromNoun: (a: any) => [number, number, number];
  readonly publicKeyHash: (a: any) => any;
  readonly publicKeyToNoun: (a: any) => any;
  readonly bignumFromNoun: (a: any) => [number, number, number];
  readonly bignumHash: (a: any) => any;
  readonly bignumToNoun: (a: any) => any;
  readonly merkleProvenAxisFromNoun: (a: any) => [number, number, number];
  readonly merkleProvenAxisHash: (a: any) => any;
  readonly merkleProvenAxisToNoun: (a: any) => any;
  readonly digestFromAtom: (a: any) => any;
  readonly digestFromNoun: (a: any) => [number, number, number];
  readonly digestHash: (a: any) => any;
  readonly digestToAtom: (a: any) => any;
  readonly digestToNoun: (a: any) => any;
  readonly merkleProofFromNoun: (a: any) => [number, number, number];
  readonly merkleProofHash: (a: any) => any;
  readonly merkleProofToNoun: (a: any) => any;
  readonly wasm_bindgen__convert__closures_____invoke__h442fd485655303f8: (a: number, b: number, c: any) => void;
  readonly wasm_bindgen__closure__destroy__ha41a55c5a893774a: (a: number, b: number) => void;
  readonly wasm_bindgen__convert__closures_____invoke__h48529c1d955b566f: (a: number, b: number, c: any, d: any) => void;
  readonly __wbindgen_malloc: (a: number, b: number) => number;
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
  readonly __wbindgen_exn_store: (a: number) => void;
  readonly __externref_table_alloc: () => number;
  readonly __wbindgen_externrefs: WebAssembly.Table;
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
  readonly __externref_drop_slice: (a: number, b: number) => void;
  readonly __externref_table_dealloc: (a: number) => void;
  readonly __wbindgen_start: () => void;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;
/**
* Instantiates the given `module`, which can either be bytes or
* a precompiled `WebAssembly.Module`.
*
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
*
* @returns {InitOutput}
*/
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;

/**
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
* for everything else, calls `WebAssembly.instantiate` directly.
*
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
*
* @returns {Promise<InitOutput>}
*/
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;

export type TxId = Digest;
export type BlockHeight = number & { __tag_block_height: undefined };
export type LockTim = Timelock;
