/* tslint:disable */ /* eslint-disable */ export function min_fee(tx: Transaction, linear_fee: LinearFee): BigNum; export function calculate_ex_units_ceil_cost(ex_units: ExUnits, ex_unit_prices: ExUnitPrices): BigNum; export function min_script_fee(tx: Transaction, ex_unit_prices: ExUnitPrices): BigNum; export function min_ref_script_fee(total_ref_scripts_size: number, ref_script_coins_per_byte: UnitInterval): BigNum; export function create_send_all(address: Address, utxos: TransactionUnspentOutputs, config: TransactionBuilderConfig): TransactionBatchList; export function make_daedalus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: LegacyDaedalusPrivateKey): BootstrapWitness; export function make_icarus_bootstrap_witness(tx_body_hash: TransactionHash, addr: ByronAddress, key: Bip32PrivateKey): BootstrapWitness; export function make_vkey_witness(tx_body_hash: TransactionHash, sk: PrivateKey): Vkeywitness; export function hash_auxiliary_data(auxiliary_data: AuxiliaryData): AuxiliaryDataHash; export function hash_plutus_data(plutus_data: PlutusData): DataHash; export function hash_script_data(redeemers: Redeemers, cost_models: Costmdls, datums?: PlutusList | null): ScriptDataHash; export function get_implicit_input(txbody: TransactionBody, pool_deposit: BigNum, key_deposit: BigNum): Value; export function get_deposit(txbody: TransactionBody, pool_deposit: BigNum, key_deposit: BigNum): BigNum; /** * returns minimal amount of ada for the output for case when the amount is included to the output */ export function min_ada_for_output(output: TransactionOutput, data_cost: DataCost): BigNum; /** * Receives a script JSON string * and returns a NativeScript. * Cardano Wallet and Node styles are supported. * * * wallet: https://github.com/input-output-hk/cardano-wallet/blob/master/specifications/api/swagger.yaml * * node: https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/simple-scripts.md * * self_xpub is expected to be a Bip32PublicKey as hex-encoded bytes */ export function encode_json_str_to_native_script(json: string, self_xpub: string, schema: ScriptSchema): NativeScript; /** * Returns the state of the transaction sets. * If all sets have a tag, it returns AllSetsHaveTag. * If all sets have no tag, it returns AllSetsHaveNoTag. * If there is a mix of tagged and untagged sets, it returns MixedSets. * This function is useful for checking if a transaction might be signed by a hardware wallet. * And for checking which parameter should be used in a hardware wallet api. * WARNING this function will be deleted after all tags for set types will be mandatory. Approx after next hf */ export function has_transaction_set_tag(tx_bytes: Uint8Array): TransactionSetsState; export function encrypt_with_password(password: string, salt: string, nonce: string, data: string): string; export function decrypt_with_password(password: string, data: string): string; export function encode_json_str_to_plutus_datum(json: string, schema: PlutusDatumSchema): PlutusData; export function decode_plutus_datum_to_json_str(datum: PlutusData, schema: PlutusDatumSchema): string; export function encode_arbitrary_bytes_as_metadatum(bytes: Uint8Array): TransactionMetadatum; export function decode_arbitrary_bytes_from_metadatum(metadata: TransactionMetadatum): Uint8Array; export function encode_json_str_to_metadatum(json: string, schema: MetadataJsonSchema): TransactionMetadatum; export function decode_metadatum_to_json_str(metadatum: TransactionMetadatum, schema: MetadataJsonSchema): string; export enum AddressKind { Base = 0, Pointer = 1, Enterprise = 2, Reward = 3, Byron = 4, Malformed = 5, } export enum BlockEra { Byron = 0, Shelley = 1, Allegra = 2, Mary = 3, Alonzo = 4, Babbage = 5, Conway = 6, Unknown = 7, } export enum ByronAddressType { ATPubKey = 0, ATScript = 1, ATRedeem = 2, } export enum CborContainerType { Array = 0, Map = 1, } export enum CborSetType { Tagged = 0, Untagged = 1, } export enum CertificateKind { StakeRegistration = 0, StakeDeregistration = 1, StakeDelegation = 2, PoolRegistration = 3, PoolRetirement = 4, GenesisKeyDelegation = 5, MoveInstantaneousRewardsCert = 6, CommitteeHotAuth = 7, CommitteeColdResign = 8, DRepDeregistration = 9, DRepRegistration = 10, DRepUpdate = 11, StakeAndVoteDelegation = 12, StakeRegistrationAndDelegation = 13, StakeVoteRegistrationAndDelegation = 14, VoteDelegation = 15, VoteRegistrationAndDelegation = 16, } export enum CoinSelectionStrategyCIP2 { /** * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets. */ LargestFirst = 0, /** * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets. */ RandomImprove = 1, /** * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type. */ LargestFirstMultiAsset = 2, /** * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type. */ RandomImproveMultiAsset = 3, } export enum CredKind { Key = 0, Script = 1, } export enum DRepKind { KeyHash = 0, ScriptHash = 1, AlwaysAbstain = 2, AlwaysNoConfidence = 3, } export enum GovernanceActionKind { ParameterChangeAction = 0, HardForkInitiationAction = 1, TreasuryWithdrawalsAction = 2, NoConfidenceAction = 3, UpdateCommitteeAction = 4, NewConstitutionAction = 5, InfoAction = 6, } export enum LanguageKind { PlutusV1 = 0, PlutusV2 = 1, PlutusV3 = 2, } export enum MIRKind { ToOtherPot = 0, ToStakeCredentials = 1, } export enum MIRPot { Reserves = 0, Treasury = 1, } export enum MetadataJsonSchema { NoConversions = 0, BasicConversions = 1, DetailedSchema = 2, } export enum NativeScriptKind { ScriptPubkey = 0, ScriptAll = 1, ScriptAny = 2, ScriptNOfK = 3, TimelockStart = 4, TimelockExpiry = 5, } export enum NetworkIdKind { Testnet = 0, Mainnet = 1, } export enum PlutusDataKind { ConstrPlutusData = 0, Map = 1, List = 2, Integer = 3, Bytes = 4, } /** * JSON <-> PlutusData conversion schemas. * Follows ScriptDataJsonSchema in cardano-cli defined at: * https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254 * * All methods here have the following restrictions due to limitations on dependencies: * * JSON numbers above u64::MAX (positive) or below i64::MIN (negative) will throw errors * * Hex strings for bytes don't accept odd-length (half-byte) strings. * cardano-cli seems to support these however but it seems to be different than just 0-padding * on either side when tested so proceed with caution */ export enum PlutusDatumSchema { /** * ScriptDataJsonNoSchema in cardano-node. * * This is the format used by --script-data-value in cardano-cli * This tries to accept most JSON but does not support the full spectrum of Plutus datums. * From JSON: * * null/true/false/floats NOT supported * * strings starting with 0x are treated as hex bytes. All other strings are encoded as their utf8 bytes. * To JSON: * * ConstrPlutusData not supported in ANY FORM (neither keys nor values) * * Lists not supported in keys * * Maps not supported in keys */ BasicConversions = 0, /** * ScriptDataJsonDetailedSchema in cardano-node. * * This is the format used by --script-data-file in cardano-cli * This covers almost all (only minor exceptions) Plutus datums, but the JSON must conform to a strict schema. * The schema specifies that ALL keys and ALL values must be contained in a JSON map with 2 cases: * 1. For ConstrPlutusData there must be two fields "constructor" contianing a number and "fields" containing its fields * e.g. { "constructor": 2, "fields": [{"int": 2}, {"list": [{"bytes": "CAFEF00D"}]}]} * 2. For all other cases there must be only one field named "int", "bytes", "list" or "map" * Integer's value is a JSON number e.g. {"int": 100} * Bytes' value is a hex string representing the bytes WITHOUT any prefix e.g. {"bytes": "CAFEF00D"} * Lists' value is a JSON list of its elements encoded via the same schema e.g. {"list": [{"bytes": "CAFEF00D"}]} * Maps' value is a JSON list of objects, one for each key-value pair in the map, with keys "k" and "v" * respectively with their values being the plutus datum encoded via this same schema * e.g. {"map": [ * {"k": {"int": 2}, "v": {"int": 5}}, * {"k": {"map": [{"k": {"list": [{"int": 1}]}, "v": {"bytes": "FF03"}}]}, "v": {"list": []}} * ]} * From JSON: * * null/true/false/floats NOT supported * * the JSON must conform to a very specific schema * To JSON: * * all Plutus datums should be fully supported outside of the integer range limitations outlined above. */ DetailedSchema = 1, } export enum RedeemerTagKind { Spend = 0, Mint = 1, Cert = 2, Reward = 3, Vote = 4, VotingProposal = 5, } export enum RelayKind { SingleHostAddr = 0, SingleHostName = 1, MultiHostName = 2, } /** * Each new language uses a different namespace for hashing its script * This is because you could have a language where the same bytes have different semantics * So this avoids scripts in different languages mapping to the same hash * Note that the enum value here is different than the enum value for deciding the cost model of a script */ export enum ScriptHashNamespace { NativeScript = 0, PlutusScript = 1, PlutusScriptV2 = 2, PlutusScriptV3 = 3, } /** * Used to choosed the schema for a script JSON string */ export enum ScriptSchema { Wallet = 0, Node = 1, } export enum TransactionMetadatumKind { MetadataMap = 0, MetadataList = 1, Int = 2, Bytes = 3, Text = 4, } export enum TransactionSetsState { AllSetsHaveTag = 0, AllSetsHaveNoTag = 1, MixedSets = 2, } export enum VoteKind { No = 0, Yes = 1, Abstain = 2, } export enum VoterKind { ConstitutionalCommitteeHotKeyHash = 0, ConstitutionalCommitteeHotScriptHash = 1, DRepKeyHash = 2, DRepScriptHash = 3, StakingPoolKeyHash = 4, } export class Address { private constructor(); free(): void; static from_bytes(data: Uint8Array): Address; to_json(): string; to_js_value(): AddressJSON; static from_json(json: string): Address; kind(): AddressKind; payment_cred(): Credential | undefined; is_malformed(): boolean; to_hex(): string; static from_hex(hex_str: string): Address; to_bytes(): Uint8Array; to_bech32(prefix?: string | null): string; static from_bech32(bech_str: string): Address; network_id(): number; } export class Anchor { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Anchor; to_hex(): string; static from_hex(hex_str: string): Anchor; to_json(): string; to_js_value(): AnchorJSON; static from_json(json: string): Anchor; url(): URL; anchor_data_hash(): AnchorDataHash; static new(anchor_url: URL, anchor_data_hash: AnchorDataHash): Anchor; } export class AnchorDataHash { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): AnchorDataHash; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): AnchorDataHash; to_hex(): string; static from_hex(hex: string): AnchorDataHash; } export class AssetName { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): AssetName; to_hex(): string; static from_hex(hex_str: string): AssetName; to_json(): string; to_js_value(): AssetNameJSON; static from_json(json: string): AssetName; static new(name: Uint8Array): AssetName; name(): Uint8Array; } export class AssetNames { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): AssetNames; to_hex(): string; static from_hex(hex_str: string): AssetNames; to_json(): string; to_js_value(): AssetNamesJSON; static from_json(json: string): AssetNames; static new(): AssetNames; len(): number; get(index: number): AssetName; add(elem: AssetName): void; } export class Assets { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Assets; to_hex(): string; static from_hex(hex_str: string): Assets; to_json(): string; to_js_value(): AssetsJSON; static from_json(json: string): Assets; static new(): Assets; len(): number; insert(key: AssetName, value: BigNum): BigNum | undefined; get(key: AssetName): BigNum | undefined; keys(): AssetNames; } export class AuxiliaryData { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): AuxiliaryData; to_hex(): string; static from_hex(hex_str: string): AuxiliaryData; to_json(): string; to_js_value(): AuxiliaryDataJSON; static from_json(json: string): AuxiliaryData; static new(): AuxiliaryData; metadata(): GeneralTransactionMetadata | undefined; set_metadata(metadata: GeneralTransactionMetadata): void; native_scripts(): NativeScripts | undefined; set_native_scripts(native_scripts: NativeScripts): void; plutus_scripts(): PlutusScripts | undefined; set_plutus_scripts(plutus_scripts: PlutusScripts): void; prefer_alonzo_format(): boolean; set_prefer_alonzo_format(prefer: boolean): void; } export class AuxiliaryDataHash { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): AuxiliaryDataHash; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): AuxiliaryDataHash; to_hex(): string; static from_hex(hex: string): AuxiliaryDataHash; } export class AuxiliaryDataSet { private constructor(); free(): void; static new(): AuxiliaryDataSet; len(): number; insert(tx_index: number, data: AuxiliaryData): AuxiliaryData | undefined; get(tx_index: number): AuxiliaryData | undefined; indices(): Uint32Array; } export class BaseAddress { private constructor(); free(): void; static new(network: number, payment: Credential, stake: Credential): BaseAddress; payment_cred(): Credential; stake_cred(): Credential; to_address(): Address; static from_address(addr: Address): BaseAddress | undefined; network_id(): number; } export class BigInt { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): BigInt; to_hex(): string; static from_hex(hex_str: string): BigInt; to_json(): string; to_js_value(): BigIntJSON; static from_json(json: string): BigInt; is_zero(): boolean; as_u64(): BigNum | undefined; as_int(): Int | undefined; static from_str(text: string): BigInt; to_str(): string; add(other: BigInt): BigInt; sub(other: BigInt): BigInt; mul(other: BigInt): BigInt; pow(exp: number): BigInt; static one(): BigInt; static zero(): BigInt; abs(): BigInt; increment(): BigInt; div_ceil(other: BigInt): BigInt; div_floor(other: BigInt): BigInt; } export class BigNum { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): BigNum; to_hex(): string; static from_hex(hex_str: string): BigNum; to_json(): string; to_js_value(): BigNumJSON; static from_json(json: string): BigNum; static from_str(string: string): BigNum; to_str(): string; static zero(): BigNum; static one(): BigNum; is_zero(): boolean; div_floor(other: BigNum): BigNum; checked_mul(other: BigNum): BigNum; checked_add(other: BigNum): BigNum; checked_sub(other: BigNum): BigNum; /** * returns 0 if it would otherwise underflow */ clamped_sub(other: BigNum): BigNum; compare(rhs_value: BigNum): number; less_than(rhs_value: BigNum): boolean; static max_value(): BigNum; static max(a: BigNum, b: BigNum): BigNum; } export class Bip32PrivateKey { private constructor(); free(): void; /** * derive this private key with the given index. * * # Security considerations * * * hard derivation index cannot be soft derived with the public key * * # Hard derivation vs Soft derivation * * If you pass an index below 0x80000000 then it is a soft derivation. * The advantage of soft derivation is that it is possible to derive the * public key too. I.e. derivation the private key with a soft derivation * index and then retrieving the associated public key is equivalent to * deriving the public key associated to the parent private key. * * Hard derivation index does not allow public key derivation. * * This is why deriving the private key should not fail while deriving * the public key may fail (if the derivation index is invalid). */ derive(index: number): Bip32PrivateKey; /** * 128-byte xprv a key format in Cardano that some software still uses or requires * the traditional 96-byte xprv is simply encoded as * prv | chaincode * however, because some software may not know how to compute a public key from a private key, * the 128-byte inlines the public key in the following format * prv | pub | chaincode * so be careful if you see the term "xprv" as it could refer to either one * our library does not require the pub (instead we compute the pub key when needed) */ static from_128_xprv(bytes: Uint8Array): Bip32PrivateKey; /** * see from_128_xprv */ to_128_xprv(): Uint8Array; static generate_ed25519_bip32(): Bip32PrivateKey; to_raw_key(): PrivateKey; to_public(): Bip32PublicKey; static from_bytes(bytes: Uint8Array): Bip32PrivateKey; as_bytes(): Uint8Array; static from_bech32(bech32_str: string): Bip32PrivateKey; to_bech32(): string; static from_bip39_entropy(entropy: Uint8Array, password: Uint8Array): Bip32PrivateKey; chaincode(): Uint8Array; to_hex(): string; static from_hex(hex_str: string): Bip32PrivateKey; } export class Bip32PublicKey { private constructor(); free(): void; static from_hex(hex_str: string): Bip32PublicKey; to_hex(): string; chaincode(): Uint8Array; to_bech32(): string; static from_bech32(bech32_str: string): Bip32PublicKey; as_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Bip32PublicKey; to_raw_key(): PublicKey; /** * derive this public key with the given index. * * # Errors * * If the index is not a soft derivation index (< 0x80000000) then * calling this method will fail. * * # Security considerations * * * hard derivation index cannot be soft derived with the public key * * # Hard derivation vs Soft derivation * * If you pass an index below 0x80000000 then it is a soft derivation. * The advantage of soft derivation is that it is possible to derive the * public key too. I.e. derivation the private key with a soft derivation * index and then retrieving the associated public key is equivalent to * deriving the public key associated to the parent private key. * * Hard derivation index does not allow public key derivation. * * This is why deriving the private key should not fail while deriving * the public key may fail (if the derivation index is invalid). */ derive(index: number): Bip32PublicKey; } export class Block { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Block; to_hex(): string; static from_hex(hex_str: string): Block; to_json(): string; to_js_value(): BlockJSON; static from_json(json: string): Block; header(): Header; transaction_bodies(): TransactionBodies; transaction_witness_sets(): TransactionWitnessSets; auxiliary_data_set(): AuxiliaryDataSet; invalid_transactions(): Uint32Array; static new(header: Header, transaction_bodies: TransactionBodies, transaction_witness_sets: TransactionWitnessSets, auxiliary_data_set: AuxiliaryDataSet, invalid_transactions: Uint32Array): Block; } export class BlockHash { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): BlockHash; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): BlockHash; to_hex(): string; static from_hex(hex: string): BlockHash; } export class BootstrapWitness { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): BootstrapWitness; to_hex(): string; static from_hex(hex_str: string): BootstrapWitness; to_json(): string; to_js_value(): BootstrapWitnessJSON; static from_json(json: string): BootstrapWitness; vkey(): Vkey; signature(): Ed25519Signature; chain_code(): Uint8Array; attributes(): Uint8Array; static new(vkey: Vkey, signature: Ed25519Signature, chain_code: Uint8Array, attributes: Uint8Array): BootstrapWitness; } export class BootstrapWitnesses { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): BootstrapWitnesses; to_hex(): string; static from_hex(hex_str: string): BootstrapWitnesses; to_json(): string; to_js_value(): BootstrapWitnessesJSON; static from_json(json: string): BootstrapWitnesses; static new(): BootstrapWitnesses; len(): number; get(index: number): BootstrapWitness; /** * Add a new `BootstrapWitness` to the set. * Returns `true` if the element was not already present in the set. */ add(witness: BootstrapWitness): boolean; } export class ByronAddress { private constructor(); free(): void; to_base58(): string; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ByronAddress; /** * returns the byron protocol magic embedded in the address, or mainnet id if none is present * note: for bech32 addresses, you need to use network_id instead */ byron_protocol_magic(): number; byron_address_kind(): ByronAddressType; attributes(): Uint8Array; network_id(): number; static from_base58(s: string): ByronAddress; static icarus_from_key(key: Bip32PublicKey, protocol_magic: number): ByronAddress; static is_valid(s: string): boolean; to_address(): Address; static from_address(addr: Address): ByronAddress | undefined; } export class Certificate { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Certificate; to_hex(): string; static from_hex(hex_str: string): Certificate; to_json(): string; to_js_value(): CertificateJSON; static from_json(json: string): Certificate; static new_stake_registration(stake_registration: StakeRegistration): Certificate; /** * Since StakeRegistration can represent stake_registration certificate or reg_cert certificate, because both certificates have the same semantics. * And in some cases you want to create a reg_cert, this function is used to create a reg_cert. * The function will return an error if StakeRegistration represents a stake_registration certificate. */ static new_reg_cert(stake_registration: StakeRegistration): Certificate; static new_stake_deregistration(stake_deregistration: StakeDeregistration): Certificate; /** * Since StakeDeregistration can represent stake_deregistration certificate or unreg_cert certificate, because both certificates have the same semantics. * And in some cases you want to create an unreg_cert, this function is used to create an unreg_cert. * The function will return an error if StakeDeregistration represents a stake_deregistration certificate. */ static new_unreg_cert(stake_deregistration: StakeDeregistration): Certificate; static new_stake_delegation(stake_delegation: StakeDelegation): Certificate; static new_pool_registration(pool_registration: PoolRegistration): Certificate; static new_pool_retirement(pool_retirement: PoolRetirement): Certificate; static new_genesis_key_delegation(genesis_key_delegation: GenesisKeyDelegation): Certificate; static new_move_instantaneous_rewards_cert(move_instantaneous_rewards_cert: MoveInstantaneousRewardsCert): Certificate; static new_committee_hot_auth(committee_hot_auth: CommitteeHotAuth): Certificate; static new_committee_cold_resign(committee_cold_resign: CommitteeColdResign): Certificate; static new_drep_deregistration(drep_deregistration: DRepDeregistration): Certificate; static new_drep_registration(drep_registration: DRepRegistration): Certificate; static new_drep_update(drep_update: DRepUpdate): Certificate; static new_stake_and_vote_delegation(stake_and_vote_delegation: StakeAndVoteDelegation): Certificate; static new_stake_registration_and_delegation(stake_registration_and_delegation: StakeRegistrationAndDelegation): Certificate; static new_stake_vote_registration_and_delegation(stake_vote_registration_and_delegation: StakeVoteRegistrationAndDelegation): Certificate; static new_vote_delegation(vote_delegation: VoteDelegation): Certificate; static new_vote_registration_and_delegation(vote_registration_and_delegation: VoteRegistrationAndDelegation): Certificate; kind(): CertificateKind; as_stake_registration(): StakeRegistration | undefined; /** * Since StakeRegistration can represent stake_registration certificate or reg_cert certificate, because both certificates have the same semantics. * And in some cases you want to get a reg_cert, this function is used to get a reg_cert. * The function will return None if StakeRegistration represents a stake_registration certificate or Certificate is not a StakeRegistration. */ as_reg_cert(): StakeRegistration | undefined; as_stake_deregistration(): StakeDeregistration | undefined; /** * Since StakeDeregistration can represent stake_deregistration certificate or unreg_cert certificate, because both certificates have the same semantics. * And in some cases you want to get an unreg_cert, this function is used to get an unreg_cert. * The function will return None if StakeDeregistration represents a stake_deregistration certificate or Certificate is not a StakeDeregistration. */ as_unreg_cert(): StakeDeregistration | undefined; as_stake_delegation(): StakeDelegation | undefined; as_pool_registration(): PoolRegistration | undefined; as_pool_retirement(): PoolRetirement | undefined; as_genesis_key_delegation(): GenesisKeyDelegation | undefined; as_move_instantaneous_rewards_cert(): MoveInstantaneousRewardsCert | undefined; as_committee_hot_auth(): CommitteeHotAuth | undefined; as_committee_cold_resign(): CommitteeColdResign | undefined; as_drep_deregistration(): DRepDeregistration | undefined; as_drep_registration(): DRepRegistration | undefined; as_drep_update(): DRepUpdate | undefined; as_stake_and_vote_delegation(): StakeAndVoteDelegation | undefined; as_stake_registration_and_delegation(): StakeRegistrationAndDelegation | undefined; as_stake_vote_registration_and_delegation(): StakeVoteRegistrationAndDelegation | undefined; as_vote_delegation(): VoteDelegation | undefined; as_vote_registration_and_delegation(): VoteRegistrationAndDelegation | undefined; has_required_script_witness(): boolean; } export class Certificates { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Certificates; to_hex(): string; static from_hex(hex_str: string): Certificates; to_json(): string; to_js_value(): CertificatesJSON; static from_json(json: string): Certificates; static new(): Certificates; len(): number; get(index: number): Certificate; /** * Add a new `Certificate` to the set. * Returns `true` if the element was not already present in the set. */ add(elem: Certificate): boolean; } export class CertificatesBuilder { private constructor(); free(): void; static new(): CertificatesBuilder; add(cert: Certificate): void; add_with_plutus_witness(cert: Certificate, witness: PlutusWitness): void; add_with_native_script(cert: Certificate, native_script_source: NativeScriptSource): void; get_plutus_witnesses(): PlutusWitnesses; get_ref_inputs(): TransactionInputs; get_native_scripts(): NativeScripts; get_certificates_refund(pool_deposit: BigNum, key_deposit: BigNum): Value; get_certificates_deposit(pool_deposit: BigNum, key_deposit: BigNum): BigNum; has_plutus_scripts(): boolean; build(): Certificates; } export class ChangeConfig { private constructor(); free(): void; static new(address: Address): ChangeConfig; change_address(address: Address): ChangeConfig; change_plutus_data(plutus_data: OutputDatum): ChangeConfig; change_script_ref(script_ref: ScriptRef): ChangeConfig; } export class Committee { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Committee; to_hex(): string; static from_hex(hex_str: string): Committee; to_json(): string; to_js_value(): CommitteeJSON; static from_json(json: string): Committee; static new(quorum_threshold: UnitInterval): Committee; members_keys(): Credentials; quorum_threshold(): UnitInterval; add_member(committee_cold_credential: Credential, epoch: number): void; get_member_epoch(committee_cold_credential: Credential): number | undefined; } export class CommitteeColdResign { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): CommitteeColdResign; to_hex(): string; static from_hex(hex_str: string): CommitteeColdResign; to_json(): string; to_js_value(): CommitteeColdResignJSON; static from_json(json: string): CommitteeColdResign; committee_cold_credential(): Credential; anchor(): Anchor | undefined; static new(committee_cold_credential: Credential): CommitteeColdResign; static new_with_anchor(committee_cold_credential: Credential, anchor: Anchor): CommitteeColdResign; has_script_credentials(): boolean; } export class CommitteeHotAuth { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): CommitteeHotAuth; to_hex(): string; static from_hex(hex_str: string): CommitteeHotAuth; to_json(): string; to_js_value(): CommitteeHotAuthJSON; static from_json(json: string): CommitteeHotAuth; committee_cold_credential(): Credential; committee_hot_credential(): Credential; static new(committee_cold_credential: Credential, committee_hot_credential: Credential): CommitteeHotAuth; has_script_credentials(): boolean; } export class Constitution { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Constitution; to_hex(): string; static from_hex(hex_str: string): Constitution; to_json(): string; to_js_value(): ConstitutionJSON; static from_json(json: string): Constitution; anchor(): Anchor; script_hash(): ScriptHash | undefined; static new(anchor: Anchor): Constitution; static new_with_script_hash(anchor: Anchor, script_hash: ScriptHash): Constitution; } export class ConstrPlutusData { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ConstrPlutusData; to_hex(): string; static from_hex(hex_str: string): ConstrPlutusData; alternative(): BigNum; data(): PlutusList; static new(alternative: BigNum, data: PlutusList): ConstrPlutusData; } export class CostModel { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): CostModel; to_hex(): string; static from_hex(hex_str: string): CostModel; to_json(): string; to_js_value(): CostModelJSON; static from_json(json: string): CostModel; /** * Creates a new CostModels instance of an unrestricted length */ static new(): CostModel; /** * Sets the cost at the specified index to the specified value. * In case the operation index is larger than the previous largest used index, * it will fill any inbetween indexes with zeroes */ set(operation: number, cost: Int): Int; get(operation: number): Int; len(): number; } export class Costmdls { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Costmdls; to_hex(): string; static from_hex(hex_str: string): Costmdls; to_json(): string; to_js_value(): CostmdlsJSON; static from_json(json: string): Costmdls; static new(): Costmdls; len(): number; insert(key: Language, value: CostModel): CostModel | undefined; get(key: Language): CostModel | undefined; keys(): Languages; retain_language_versions(languages: Languages): Costmdls; } export class Credential { private constructor(); free(): void; static from_keyhash(hash: Ed25519KeyHash): Credential; static from_scripthash(hash: ScriptHash): Credential; to_keyhash(): Ed25519KeyHash | undefined; to_scripthash(): ScriptHash | undefined; kind(): CredKind; has_script_hash(): boolean; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Credential; to_hex(): string; static from_hex(hex_str: string): Credential; to_json(): string; to_js_value(): CredentialJSON; static from_json(json: string): Credential; } export class Credentials { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Credentials; to_hex(): string; static from_hex(hex_str: string): Credentials; to_json(): string; to_js_value(): CredentialsJSON; static from_json(json: string): Credentials; static new(): Credentials; len(): number; get(index: number): Credential; /** * Add a new `Credential` to the set. * Returns `true` if the element was not already present in the set. */ add(credential: Credential): boolean; } export class DNSRecordAorAAAA { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): DNSRecordAorAAAA; to_hex(): string; static from_hex(hex_str: string): DNSRecordAorAAAA; to_json(): string; to_js_value(): DNSRecordAorAAAAJSON; static from_json(json: string): DNSRecordAorAAAA; static new(dns_name: string): DNSRecordAorAAAA; record(): string; } export class DNSRecordSRV { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): DNSRecordSRV; to_hex(): string; static from_hex(hex_str: string): DNSRecordSRV; to_json(): string; to_js_value(): DNSRecordSRVJSON; static from_json(json: string): DNSRecordSRV; static new(dns_name: string): DNSRecordSRV; record(): string; } export class DRep { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): DRep; to_hex(): string; static from_hex(hex_str: string): DRep; to_json(): string; to_js_value(): DRepJSON; static from_json(json: string): DRep; static new_key_hash(key_hash: Ed25519KeyHash): DRep; static new_script_hash(script_hash: ScriptHash): DRep; static new_always_abstain(): DRep; static new_always_no_confidence(): DRep; static new_from_credential(cred: Credential): DRep; kind(): DRepKind; to_key_hash(): Ed25519KeyHash | undefined; to_script_hash(): ScriptHash | undefined; to_bech32(cip_129_format: boolean): string; static from_bech32(bech32_str: string): DRep; } export class DRepDeregistration { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): DRepDeregistration; to_hex(): string; static from_hex(hex_str: string): DRepDeregistration; to_json(): string; to_js_value(): DRepDeregistrationJSON; static from_json(json: string): DRepDeregistration; voting_credential(): Credential; coin(): BigNum; static new(voting_credential: Credential, coin: BigNum): DRepDeregistration; has_script_credentials(): boolean; } export class DRepRegistration { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): DRepRegistration; to_hex(): string; static from_hex(hex_str: string): DRepRegistration; to_json(): string; to_js_value(): DRepRegistrationJSON; static from_json(json: string): DRepRegistration; voting_credential(): Credential; coin(): BigNum; anchor(): Anchor | undefined; static new(voting_credential: Credential, coin: BigNum): DRepRegistration; static new_with_anchor(voting_credential: Credential, coin: BigNum, anchor: Anchor): DRepRegistration; has_script_credentials(): boolean; } export class DRepUpdate { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): DRepUpdate; to_hex(): string; static from_hex(hex_str: string): DRepUpdate; to_json(): string; to_js_value(): DRepUpdateJSON; static from_json(json: string): DRepUpdate; voting_credential(): Credential; anchor(): Anchor | undefined; static new(voting_credential: Credential): DRepUpdate; static new_with_anchor(voting_credential: Credential, anchor: Anchor): DRepUpdate; has_script_credentials(): boolean; } export class DRepVotingThresholds { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): DRepVotingThresholds; to_hex(): string; static from_hex(hex_str: string): DRepVotingThresholds; to_json(): string; to_js_value(): DRepVotingThresholdsJSON; static from_json(json: string): DRepVotingThresholds; static new(motion_no_confidence: UnitInterval, committee_normal: UnitInterval, committee_no_confidence: UnitInterval, update_constitution: UnitInterval, hard_fork_initiation: UnitInterval, pp_network_group: UnitInterval, pp_economic_group: UnitInterval, pp_technical_group: UnitInterval, pp_governance_group: UnitInterval, treasury_withdrawal: UnitInterval): DRepVotingThresholds; set_motion_no_confidence(motion_no_confidence: UnitInterval): void; set_committee_normal(committee_normal: UnitInterval): void; set_committee_no_confidence(committee_no_confidence: UnitInterval): void; set_update_constitution(update_constitution: UnitInterval): void; set_hard_fork_initiation(hard_fork_initiation: UnitInterval): void; set_pp_network_group(pp_network_group: UnitInterval): void; set_pp_economic_group(pp_economic_group: UnitInterval): void; set_pp_technical_group(pp_technical_group: UnitInterval): void; set_pp_governance_group(pp_governance_group: UnitInterval): void; set_treasury_withdrawal(treasury_withdrawal: UnitInterval): void; motion_no_confidence(): UnitInterval; committee_normal(): UnitInterval; committee_no_confidence(): UnitInterval; update_constitution(): UnitInterval; hard_fork_initiation(): UnitInterval; pp_network_group(): UnitInterval; pp_economic_group(): UnitInterval; pp_technical_group(): UnitInterval; pp_governance_group(): UnitInterval; treasury_withdrawal(): UnitInterval; } export class DataCost { private constructor(); free(): void; static new_coins_per_byte(coins_per_byte: BigNum): DataCost; coins_per_byte(): BigNum; } export class DataHash { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): DataHash; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): DataHash; to_hex(): string; static from_hex(hex: string): DataHash; } export class DatumSource { private constructor(); free(): void; static new(datum: PlutusData): DatumSource; static new_ref_input(input: TransactionInput): DatumSource; } export class Ed25519KeyHash { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): Ed25519KeyHash; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): Ed25519KeyHash; to_hex(): string; static from_hex(hex: string): Ed25519KeyHash; } export class Ed25519KeyHashes { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Ed25519KeyHashes; to_hex(): string; static from_hex(hex_str: string): Ed25519KeyHashes; to_json(): string; to_js_value(): Ed25519KeyHashesJSON; static from_json(json: string): Ed25519KeyHashes; static new(): Ed25519KeyHashes; len(): number; get(index: number): Ed25519KeyHash; /** * Add a new `Ed25519KeyHash` to the set. * Returns `true` if the element was not already present in the set. */ add(keyhash: Ed25519KeyHash): boolean; contains(elem: Ed25519KeyHash): boolean; to_option(): Ed25519KeyHashes | undefined; } export class Ed25519Signature { private constructor(); free(): void; to_bytes(): Uint8Array; to_bech32(): string; to_hex(): string; static from_bech32(bech32_str: string): Ed25519Signature; static from_hex(input: string): Ed25519Signature; static from_bytes(bytes: Uint8Array): Ed25519Signature; } export class EnterpriseAddress { private constructor(); free(): void; static new(network: number, payment: Credential): EnterpriseAddress; payment_cred(): Credential; to_address(): Address; static from_address(addr: Address): EnterpriseAddress | undefined; network_id(): number; } export class ExUnitPrices { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ExUnitPrices; to_hex(): string; static from_hex(hex_str: string): ExUnitPrices; to_json(): string; to_js_value(): ExUnitPricesJSON; static from_json(json: string): ExUnitPrices; mem_price(): UnitInterval; step_price(): UnitInterval; static new(mem_price: UnitInterval, step_price: UnitInterval): ExUnitPrices; } export class ExUnits { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ExUnits; to_hex(): string; static from_hex(hex_str: string): ExUnits; to_json(): string; to_js_value(): ExUnitsJSON; static from_json(json: string): ExUnits; mem(): BigNum; steps(): BigNum; static new(mem: BigNum, steps: BigNum): ExUnits; } /** * Read only view of a block with more strict structs for hash sensitive structs. * Warning: This is experimental and may be removed or changed in the future. */ export class FixedBlock { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): FixedBlock; static from_hex(hex_str: string): FixedBlock; header(): Header; transaction_bodies(): FixedTransactionBodies; transaction_witness_sets(): TransactionWitnessSets; auxiliary_data_set(): AuxiliaryDataSet; invalid_transactions(): Uint32Array; block_hash(): BlockHash; } export class FixedTransaction { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): FixedTransaction; to_hex(): string; static from_hex(hex_str: string): FixedTransaction; static new(raw_body: Uint8Array, raw_witness_set: Uint8Array, is_valid: boolean): FixedTransaction; static new_with_auxiliary(raw_body: Uint8Array, raw_witness_set: Uint8Array, raw_auxiliary_data: Uint8Array, is_valid: boolean): FixedTransaction; static new_from_body_bytes(raw_body: Uint8Array): FixedTransaction; body(): TransactionBody; raw_body(): Uint8Array; set_body(raw_body: Uint8Array): void; /** * We do not recommend using this function, since it might lead to script integrity hash. * The only purpose of this struct is to sign the transaction from third-party sources. * Use `.sign_and_add_vkey_signature` or `.sign_and_add_icarus_bootstrap_signature` or `.sign_and_add_daedalus_bootstrap_signature` instead. */ set_witness_set(raw_witness_set: Uint8Array): void; witness_set(): TransactionWitnessSet; raw_witness_set(): Uint8Array; set_is_valid(valid: boolean): void; is_valid(): boolean; set_auxiliary_data(raw_auxiliary_data: Uint8Array): void; auxiliary_data(): AuxiliaryData | undefined; raw_auxiliary_data(): Uint8Array | undefined; transaction_hash(): TransactionHash; add_vkey_witness(vkey_witness: Vkeywitness): void; add_bootstrap_witness(bootstrap_witness: BootstrapWitness): void; sign_and_add_vkey_signature(private_key: PrivateKey): void; sign_and_add_icarus_bootstrap_signature(addr: ByronAddress, private_key: Bip32PrivateKey): void; sign_and_add_daedalus_bootstrap_signature(addr: ByronAddress, private_key: LegacyDaedalusPrivateKey): void; } /** * Warning: This is experimental and may be removed or changed in the future. */ export class FixedTransactionBodies { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): FixedTransactionBodies; static from_hex(hex_str: string): FixedTransactionBodies; static new(): FixedTransactionBodies; len(): number; get(index: number): FixedTransactionBody; add(elem: FixedTransactionBody): void; } /** * Read-only view of a transaction body. With correct hash and original bytes. * Warning: This is experimental and may be removed in the future. */ export class FixedTransactionBody { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): FixedTransactionBody; static from_hex(hex_str: string): FixedTransactionBody; transaction_body(): TransactionBody; tx_hash(): TransactionHash; original_bytes(): Uint8Array; } /** * A set of witnesses for a transaction. * Keeps original bytes to allow for safe roundtrip serialization. * That helps to avoid incorrect script data hash after adding a vkey or bootstrap witness. * You can add a vkey witness or a bootstrap witness to the set. * Or get TransactionWitnessSet to read fields. */ export class FixedTxWitnessesSet { private constructor(); free(): void; tx_witnesses_set(): TransactionWitnessSet; add_vkey_witness(vkey_witness: Vkeywitness): void; add_bootstrap_witness(bootstrap_witness: BootstrapWitness): void; to_bytes(): Uint8Array; static from_bytes(data: Uint8Array): FixedTxWitnessesSet; } /** * Warning: This is experimental and may be removed in the future. */ export class FixedVersionedBlock { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): FixedVersionedBlock; static from_hex(hex_str: string): FixedVersionedBlock; block(): FixedBlock; era(): BlockEra; } export class GeneralTransactionMetadata { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): GeneralTransactionMetadata; to_hex(): string; static from_hex(hex_str: string): GeneralTransactionMetadata; to_json(): string; to_js_value(): GeneralTransactionMetadataJSON; static from_json(json: string): GeneralTransactionMetadata; static new(): GeneralTransactionMetadata; len(): number; insert(key: BigNum, value: TransactionMetadatum): TransactionMetadatum | undefined; get(key: BigNum): TransactionMetadatum | undefined; keys(): TransactionMetadatumLabels; } export class GenesisDelegateHash { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): GenesisDelegateHash; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): GenesisDelegateHash; to_hex(): string; static from_hex(hex: string): GenesisDelegateHash; } export class GenesisHash { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): GenesisHash; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): GenesisHash; to_hex(): string; static from_hex(hex: string): GenesisHash; } export class GenesisHashes { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): GenesisHashes; to_hex(): string; static from_hex(hex_str: string): GenesisHashes; to_json(): string; to_js_value(): GenesisHashesJSON; static from_json(json: string): GenesisHashes; static new(): GenesisHashes; len(): number; get(index: number): GenesisHash; add(elem: GenesisHash): void; } export class GenesisKeyDelegation { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): GenesisKeyDelegation; to_hex(): string; static from_hex(hex_str: string): GenesisKeyDelegation; to_json(): string; to_js_value(): GenesisKeyDelegationJSON; static from_json(json: string): GenesisKeyDelegation; genesishash(): GenesisHash; genesis_delegate_hash(): GenesisDelegateHash; vrf_keyhash(): VRFKeyHash; static new(genesishash: GenesisHash, genesis_delegate_hash: GenesisDelegateHash, vrf_keyhash: VRFKeyHash): GenesisKeyDelegation; } export class GovernanceAction { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): GovernanceAction; to_hex(): string; static from_hex(hex_str: string): GovernanceAction; to_json(): string; to_js_value(): GovernanceActionJSON; static from_json(json: string): GovernanceAction; static new_parameter_change_action(parameter_change_action: ParameterChangeAction): GovernanceAction; static new_hard_fork_initiation_action(hard_fork_initiation_action: HardForkInitiationAction): GovernanceAction; static new_treasury_withdrawals_action(treasury_withdrawals_action: TreasuryWithdrawalsAction): GovernanceAction; static new_no_confidence_action(no_confidence_action: NoConfidenceAction): GovernanceAction; static new_new_committee_action(new_committee_action: UpdateCommitteeAction): GovernanceAction; static new_new_constitution_action(new_constitution_action: NewConstitutionAction): GovernanceAction; static new_info_action(info_action: InfoAction): GovernanceAction; kind(): GovernanceActionKind; as_parameter_change_action(): ParameterChangeAction | undefined; as_hard_fork_initiation_action(): HardForkInitiationAction | undefined; as_treasury_withdrawals_action(): TreasuryWithdrawalsAction | undefined; as_no_confidence_action(): NoConfidenceAction | undefined; as_new_committee_action(): UpdateCommitteeAction | undefined; as_new_constitution_action(): NewConstitutionAction | undefined; as_info_action(): InfoAction | undefined; } export class GovernanceActionId { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): GovernanceActionId; to_hex(): string; static from_hex(hex_str: string): GovernanceActionId; to_json(): string; to_js_value(): GovernanceActionIdJSON; static from_json(json: string): GovernanceActionId; transaction_id(): TransactionHash; index(): number; static new(transaction_id: TransactionHash, index: number): GovernanceActionId; } export class GovernanceActionIds { private constructor(); free(): void; to_json(): string; to_js_value(): GovernanceActionIdsJSON; static from_json(json: string): GovernanceActionIds; static new(): GovernanceActionIds; add(governance_action_id: GovernanceActionId): void; get(index: number): GovernanceActionId | undefined; len(): number; } export class HardForkInitiationAction { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): HardForkInitiationAction; to_hex(): string; static from_hex(hex_str: string): HardForkInitiationAction; to_json(): string; to_js_value(): HardForkInitiationActionJSON; static from_json(json: string): HardForkInitiationAction; gov_action_id(): GovernanceActionId | undefined; protocol_version(): ProtocolVersion; static new(protocol_version: ProtocolVersion): HardForkInitiationAction; static new_with_action_id(gov_action_id: GovernanceActionId, protocol_version: ProtocolVersion): HardForkInitiationAction; } export class Header { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Header; to_hex(): string; static from_hex(hex_str: string): Header; to_json(): string; to_js_value(): HeaderJSON; static from_json(json: string): Header; header_body(): HeaderBody; body_signature(): KESSignature; static new(header_body: HeaderBody, body_signature: KESSignature): Header; } export class HeaderBody { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): HeaderBody; to_hex(): string; static from_hex(hex_str: string): HeaderBody; to_json(): string; to_js_value(): HeaderBodyJSON; static from_json(json: string): HeaderBody; block_number(): number; /** * !!! DEPRECATED !!! * Returns a Slot32 (u32) value in case the underlying original BigNum (u64) value is within the limits. * Otherwise will just raise an error. */ slot(): number; slot_bignum(): BigNum; prev_hash(): BlockHash | undefined; issuer_vkey(): Vkey; vrf_vkey(): VRFVKey; /** * If this function returns true, the `.nonce_vrf_or_nothing` * and the `.leader_vrf_or_nothing` functions will return * non-empty results */ has_nonce_and_leader_vrf(): boolean; /** * Might return nothing in case `.has_nonce_and_leader_vrf` returns false */ nonce_vrf_or_nothing(): VRFCert | undefined; /** * Might return nothing in case `.has_nonce_and_leader_vrf` returns false */ leader_vrf_or_nothing(): VRFCert | undefined; /** * If this function returns true, the `.vrf_result_or_nothing` * function will return a non-empty result */ has_vrf_result(): boolean; /** * Might return nothing in case `.has_vrf_result` returns false */ vrf_result_or_nothing(): VRFCert | undefined; block_body_size(): number; block_body_hash(): BlockHash; operational_cert(): OperationalCert; protocol_version(): ProtocolVersion; /** * !!! DEPRECATED !!! * This constructor uses outdated slot number format. * Use `.new_headerbody` instead */ static new(block_number: number, slot: number, prev_hash: BlockHash | null | undefined, issuer_vkey: Vkey, vrf_vkey: VRFVKey, vrf_result: VRFCert, block_body_size: number, block_body_hash: BlockHash, operational_cert: OperationalCert, protocol_version: ProtocolVersion): HeaderBody; static new_headerbody(block_number: number, slot: BigNum, prev_hash: BlockHash | null | undefined, issuer_vkey: Vkey, vrf_vkey: VRFVKey, vrf_result: VRFCert, block_body_size: number, block_body_hash: BlockHash, operational_cert: OperationalCert, protocol_version: ProtocolVersion): HeaderBody; } export class InfoAction { private constructor(); free(): void; static new(): InfoAction; } export class Int { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Int; to_hex(): string; static from_hex(hex_str: string): Int; to_json(): string; to_js_value(): IntJSON; static from_json(json: string): Int; static new(x: BigNum): Int; static new_negative(x: BigNum): Int; static new_i32(x: number): Int; is_positive(): boolean; /** * BigNum can only contain unsigned u64 values * * This function will return the BigNum representation * only in case the underlying i128 value is positive. * * Otherwise nothing will be returned (undefined). */ as_positive(): BigNum | undefined; /** * BigNum can only contain unsigned u64 values * * This function will return the *absolute* BigNum representation * only in case the underlying i128 value is negative. * * Otherwise nothing will be returned (undefined). */ as_negative(): BigNum | undefined; /** * !!! DEPRECATED !!! * Returns an i32 value in case the underlying original i128 value is within the limits. * Otherwise will just return an empty value (undefined). */ as_i32(): number | undefined; /** * Returns the underlying value converted to i32 if possible (within limits) * Otherwise will just return an empty value (undefined). */ as_i32_or_nothing(): number | undefined; /** * Returns the underlying value converted to i32 if possible (within limits) * JsError in case of out of boundary overflow */ as_i32_or_fail(): number; /** * Returns string representation of the underlying i128 value directly. * Might contain the minus sign (-) in case of negative value. */ to_str(): string; static from_str(string: string): Int; } export class Ipv4 { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Ipv4; to_hex(): string; static from_hex(hex_str: string): Ipv4; to_json(): string; to_js_value(): Ipv4JSON; static from_json(json: string): Ipv4; static new(data: Uint8Array): Ipv4; ip(): Uint8Array; } export class Ipv6 { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Ipv6; to_hex(): string; static from_hex(hex_str: string): Ipv6; to_json(): string; to_js_value(): Ipv6JSON; static from_json(json: string): Ipv6; static new(data: Uint8Array): Ipv6; ip(): Uint8Array; } export class KESSignature { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): KESSignature; } export class KESVKey { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): KESVKey; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): KESVKey; to_hex(): string; static from_hex(hex: string): KESVKey; } export class Language { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Language; to_hex(): string; static from_hex(hex_str: string): Language; to_json(): string; to_js_value(): LanguageJSON; static from_json(json: string): Language; static new_plutus_v1(): Language; static new_plutus_v2(): Language; static new_plutus_v3(): Language; kind(): LanguageKind; } export class Languages { private constructor(); free(): void; static new(): Languages; len(): number; get(index: number): Language; add(elem: Language): void; static list(): Languages; } export class LegacyDaedalusPrivateKey { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): LegacyDaedalusPrivateKey; as_bytes(): Uint8Array; chaincode(): Uint8Array; } export class LinearFee { private constructor(); free(): void; constant(): BigNum; coefficient(): BigNum; static new(coefficient: BigNum, constant: BigNum): LinearFee; } export class MIRToStakeCredentials { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): MIRToStakeCredentials; to_hex(): string; static from_hex(hex_str: string): MIRToStakeCredentials; to_json(): string; to_js_value(): MIRToStakeCredentialsJSON; static from_json(json: string): MIRToStakeCredentials; static new(): MIRToStakeCredentials; len(): number; insert(cred: Credential, delta: Int): Int | undefined; get(cred: Credential): Int | undefined; keys(): Credentials; } export class MalformedAddress { private constructor(); free(): void; original_bytes(): Uint8Array; to_address(): Address; static from_address(addr: Address): MalformedAddress | undefined; } export class MetadataList { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): MetadataList; to_hex(): string; static from_hex(hex_str: string): MetadataList; static new(): MetadataList; len(): number; get(index: number): TransactionMetadatum; add(elem: TransactionMetadatum): void; } export class MetadataMap { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): MetadataMap; to_hex(): string; static from_hex(hex_str: string): MetadataMap; static new(): MetadataMap; len(): number; insert(key: TransactionMetadatum, value: TransactionMetadatum): TransactionMetadatum | undefined; insert_str(key: string, value: TransactionMetadatum): TransactionMetadatum | undefined; insert_i32(key: number, value: TransactionMetadatum): TransactionMetadatum | undefined; get(key: TransactionMetadatum): TransactionMetadatum; get_str(key: string): TransactionMetadatum; get_i32(key: number): TransactionMetadatum; has(key: TransactionMetadatum): boolean; keys(): MetadataList; } export class Mint { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Mint; to_hex(): string; static from_hex(hex_str: string): Mint; to_json(): string; to_js_value(): MintJSON; static from_json(json: string): Mint; static new(): Mint; static new_from_entry(key: ScriptHash, value: MintAssets): Mint; len(): number; insert(key: ScriptHash, value: MintAssets): MintAssets | undefined; get(key: ScriptHash): MintsAssets | undefined; keys(): ScriptHashes; /** * Returns the multiasset where only positive (minting) entries are present */ as_positive_multiasset(): MultiAsset; /** * Returns the multiasset where only negative (burning) entries are present */ as_negative_multiasset(): MultiAsset; } export class MintAssets { private constructor(); free(): void; static new(): MintAssets; static new_from_entry(key: AssetName, value: Int): MintAssets; len(): number; insert(key: AssetName, value: Int): Int | undefined; get(key: AssetName): Int | undefined; keys(): AssetNames; } export class MintBuilder { private constructor(); free(): void; static new(): MintBuilder; add_asset(mint: MintWitness, asset_name: AssetName, amount: Int): void; set_asset(mint: MintWitness, asset_name: AssetName, amount: Int): void; build(): Mint; get_native_scripts(): NativeScripts; get_plutus_witnesses(): PlutusWitnesses; get_ref_inputs(): TransactionInputs; get_redeemers(): Redeemers; has_plutus_scripts(): boolean; has_native_scripts(): boolean; } export class MintWitness { private constructor(); free(): void; static new_native_script(native_script: NativeScriptSource): MintWitness; static new_plutus_script(plutus_script: PlutusScriptSource, redeemer: Redeemer): MintWitness; } export class MintsAssets { private constructor(); free(): void; to_json(): string; to_js_value(): MintsAssetsJSON; static from_json(json: string): MintsAssets; static new(): MintsAssets; add(mint_assets: MintAssets): void; get(index: number): MintAssets | undefined; len(): number; } export class MoveInstantaneousReward { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): MoveInstantaneousReward; to_hex(): string; static from_hex(hex_str: string): MoveInstantaneousReward; to_json(): string; to_js_value(): MoveInstantaneousRewardJSON; static from_json(json: string): MoveInstantaneousReward; static new_to_other_pot(pot: MIRPot, amount: BigNum): MoveInstantaneousReward; static new_to_stake_creds(pot: MIRPot, amounts: MIRToStakeCredentials): MoveInstantaneousReward; pot(): MIRPot; kind(): MIRKind; as_to_other_pot(): BigNum | undefined; as_to_stake_creds(): MIRToStakeCredentials | undefined; } export class MoveInstantaneousRewardsCert { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): MoveInstantaneousRewardsCert; to_hex(): string; static from_hex(hex_str: string): MoveInstantaneousRewardsCert; to_json(): string; to_js_value(): MoveInstantaneousRewardsCertJSON; static from_json(json: string): MoveInstantaneousRewardsCert; move_instantaneous_reward(): MoveInstantaneousReward; static new(move_instantaneous_reward: MoveInstantaneousReward): MoveInstantaneousRewardsCert; } export class MultiAsset { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): MultiAsset; to_hex(): string; static from_hex(hex_str: string): MultiAsset; to_json(): string; to_js_value(): MultiAssetJSON; static from_json(json: string): MultiAsset; static new(): MultiAsset; /** * the number of unique policy IDs in the multiasset */ len(): number; /** * set (and replace if it exists) all assets with policy {policy_id} to a copy of {assets} */ insert(policy_id: ScriptHash, assets: Assets): Assets | undefined; /** * all assets under {policy_id}, if any exist, or else None (undefined in JS) */ get(policy_id: ScriptHash): Assets | undefined; /** * sets the asset {asset_name} to {value} under policy {policy_id} * returns the previous amount if it was set, or else None (undefined in JS) */ set_asset(policy_id: ScriptHash, asset_name: AssetName, value: BigNum): BigNum | undefined; /** * returns the amount of asset {asset_name} under policy {policy_id} * If such an asset does not exist, 0 is returned. */ get_asset(policy_id: ScriptHash, asset_name: AssetName): BigNum; /** * returns all policy IDs used by assets in this multiasset */ keys(): ScriptHashes; /** * removes an asset from the list if the result is 0 or less * does not modify this object, instead the result is returned */ sub(rhs_ma: MultiAsset): MultiAsset; } export class MultiHostName { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): MultiHostName; to_hex(): string; static from_hex(hex_str: string): MultiHostName; to_json(): string; to_js_value(): MultiHostNameJSON; static from_json(json: string): MultiHostName; dns_name(): DNSRecordSRV; static new(dns_name: DNSRecordSRV): MultiHostName; } export class NativeScript { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): NativeScript; to_hex(): string; static from_hex(hex_str: string): NativeScript; to_json(): string; to_js_value(): NativeScriptJSON; static from_json(json: string): NativeScript; hash(): ScriptHash; static new_script_pubkey(script_pubkey: ScriptPubkey): NativeScript; static new_script_all(script_all: ScriptAll): NativeScript; static new_script_any(script_any: ScriptAny): NativeScript; static new_script_n_of_k(script_n_of_k: ScriptNOfK): NativeScript; static new_timelock_start(timelock_start: TimelockStart): NativeScript; static new_timelock_expiry(timelock_expiry: TimelockExpiry): NativeScript; kind(): NativeScriptKind; as_script_pubkey(): ScriptPubkey | undefined; as_script_all(): ScriptAll | undefined; as_script_any(): ScriptAny | undefined; as_script_n_of_k(): ScriptNOfK | undefined; as_timelock_start(): TimelockStart | undefined; as_timelock_expiry(): TimelockExpiry | undefined; /** * Returns a set of Ed25519KeyHashes * contained within this script recursively on any depth level. * The order of the keys in the result is not determined in any way. */ get_required_signers(): Ed25519KeyHashes; } export class NativeScriptSource { private constructor(); free(): void; static new(script: NativeScript): NativeScriptSource; static new_ref_input(script_hash: ScriptHash, input: TransactionInput, script_size: number): NativeScriptSource; set_required_signers(key_hashes: Ed25519KeyHashes): void; get_ref_script_size(): number | undefined; } export class NativeScripts { private constructor(); free(): void; static new(): NativeScripts; len(): number; get(index: number): NativeScript; add(elem: NativeScript): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): NativeScripts; to_hex(): string; static from_hex(hex_str: string): NativeScripts; to_json(): string; to_js_value(): NativeScriptsJSON; static from_json(json: string): NativeScripts; } export class NetworkId { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): NetworkId; to_hex(): string; static from_hex(hex_str: string): NetworkId; to_json(): string; to_js_value(): NetworkIdJSON; static from_json(json: string): NetworkId; static testnet(): NetworkId; static mainnet(): NetworkId; kind(): NetworkIdKind; } export class NetworkInfo { private constructor(); free(): void; static new(network_id: number, protocol_magic: number): NetworkInfo; network_id(): number; protocol_magic(): number; static testnet_preview(): NetworkInfo; static testnet_preprod(): NetworkInfo; static mainnet(): NetworkInfo; } export class NewConstitutionAction { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): NewConstitutionAction; to_hex(): string; static from_hex(hex_str: string): NewConstitutionAction; to_json(): string; to_js_value(): NewConstitutionActionJSON; static from_json(json: string): NewConstitutionAction; gov_action_id(): GovernanceActionId | undefined; constitution(): Constitution; static new(constitution: Constitution): NewConstitutionAction; static new_with_action_id(gov_action_id: GovernanceActionId, constitution: Constitution): NewConstitutionAction; has_script_hash(): boolean; } export class NoConfidenceAction { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): NoConfidenceAction; to_hex(): string; static from_hex(hex_str: string): NoConfidenceAction; to_json(): string; to_js_value(): NoConfidenceActionJSON; static from_json(json: string): NoConfidenceAction; gov_action_id(): GovernanceActionId | undefined; static new(): NoConfidenceAction; static new_with_action_id(gov_action_id: GovernanceActionId): NoConfidenceAction; } export class Nonce { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Nonce; to_hex(): string; static from_hex(hex_str: string): Nonce; to_json(): string; to_js_value(): NonceJSON; static from_json(json: string): Nonce; static new_identity(): Nonce; static new_from_hash(hash: Uint8Array): Nonce; get_hash(): Uint8Array | undefined; } export class OperationalCert { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): OperationalCert; to_hex(): string; static from_hex(hex_str: string): OperationalCert; to_json(): string; to_js_value(): OperationalCertJSON; static from_json(json: string): OperationalCert; hot_vkey(): KESVKey; sequence_number(): number; kes_period(): number; sigma(): Ed25519Signature; static new(hot_vkey: KESVKey, sequence_number: number, kes_period: number, sigma: Ed25519Signature): OperationalCert; } export class OutputDatum { private constructor(); free(): void; static new_data_hash(data_hash: DataHash): OutputDatum; static new_data(data: PlutusData): OutputDatum; data_hash(): DataHash | undefined; data(): PlutusData | undefined; } export class ParameterChangeAction { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ParameterChangeAction; to_hex(): string; static from_hex(hex_str: string): ParameterChangeAction; to_json(): string; to_js_value(): ParameterChangeActionJSON; static from_json(json: string): ParameterChangeAction; gov_action_id(): GovernanceActionId | undefined; protocol_param_updates(): ProtocolParamUpdate; policy_hash(): ScriptHash | undefined; static new(protocol_param_updates: ProtocolParamUpdate): ParameterChangeAction; static new_with_action_id(gov_action_id: GovernanceActionId, protocol_param_updates: ProtocolParamUpdate): ParameterChangeAction; static new_with_policy_hash(protocol_param_updates: ProtocolParamUpdate, policy_hash: ScriptHash): ParameterChangeAction; static new_with_policy_hash_and_action_id(gov_action_id: GovernanceActionId, protocol_param_updates: ProtocolParamUpdate, policy_hash: ScriptHash): ParameterChangeAction; } export class PlutusData { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): PlutusData; to_hex(): string; static from_hex(hex_str: string): PlutusData; static new_constr_plutus_data(constr_plutus_data: ConstrPlutusData): PlutusData; /** * Same as `.new_constr_plutus_data` but creates constr with empty data list */ static new_empty_constr_plutus_data(alternative: BigNum): PlutusData; static new_single_value_constr_plutus_data(alternative: BigNum, plutus_data: PlutusData): PlutusData; static new_map(map: PlutusMap): PlutusData; static new_list(list: PlutusList): PlutusData; static new_integer(integer: BigInt): PlutusData; static new_bytes(bytes: Uint8Array): PlutusData; kind(): PlutusDataKind; as_constr_plutus_data(): ConstrPlutusData | undefined; as_map(): PlutusMap | undefined; as_list(): PlutusList | undefined; as_integer(): BigInt | undefined; as_bytes(): Uint8Array | undefined; to_json(schema: PlutusDatumSchema): string; static from_json(json: string, schema: PlutusDatumSchema): PlutusData; static from_address(address: Address): PlutusData; as_address(network: NetworkInfo): Address; } export class PlutusList { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): PlutusList; to_hex(): string; static from_hex(hex_str: string): PlutusList; static new(): PlutusList; len(): number; get(index: number): PlutusData; add(elem: PlutusData): void; } export class PlutusMap { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): PlutusMap; to_hex(): string; static from_hex(hex_str: string): PlutusMap; static new(): PlutusMap; /** * Return count ok different keys in the map. */ len(): number; /** * Returns the previous value associated with the key, if any. * Replace the values associated with the key. */ insert(key: PlutusData, values: PlutusMapValues): PlutusMapValues | undefined; get(key: PlutusData): PlutusMapValues | undefined; keys(): PlutusList; } export class PlutusMapValues { private constructor(); free(): void; static new(): PlutusMapValues; len(): number; get(index: number): PlutusData | undefined; add(elem: PlutusData): void; } export class PlutusScript { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): PlutusScript; to_hex(): string; static from_hex(hex_str: string): PlutusScript; /** * * * Creates a new Plutus script from the RAW bytes of the compiled script. * * This does NOT include any CBOR encoding around these bytes (e.g. from "cborBytes" in cardano-cli) * * If you creating this from those you should use PlutusScript::from_bytes() instead. * */ static new(bytes: Uint8Array): PlutusScript; /** * * * Creates a new Plutus script from the RAW bytes of the compiled script. * * This does NOT include any CBOR encoding around these bytes (e.g. from "cborBytes" in cardano-cli) * * If you creating this from those you should use PlutusScript::from_bytes() instead. * */ static new_v2(bytes: Uint8Array): PlutusScript; /** * * * Creates a new Plutus script from the RAW bytes of the compiled script. * * This does NOT include any CBOR encoding around these bytes (e.g. from "cborBytes" in cardano-cli) * * If you creating this from those you should use PlutusScript::from_bytes() instead. * */ static new_v3(bytes: Uint8Array): PlutusScript; /** * * * Creates a new Plutus script from the RAW bytes of the compiled script. * * This does NOT include any CBOR encoding around these bytes (e.g. from "cborBytes" in cardano-cli) * * If you creating this from those you should use PlutusScript::from_bytes() instead. * */ static new_with_version(bytes: Uint8Array, language: Language): PlutusScript; /** * * * The raw bytes of this compiled Plutus script. * * If you need "cborBytes" for cardano-cli use PlutusScript::to_bytes() instead. * */ bytes(): Uint8Array; /** * Same as `.from_bytes` but will consider the script as requiring the Plutus Language V2 */ static from_bytes_v2(bytes: Uint8Array): PlutusScript; /** * Same as `.from_bytes` but will consider the script as requiring the Plutus Language V3 */ static from_bytes_v3(bytes: Uint8Array): PlutusScript; /** * Same as `.from_bytes` but will consider the script as requiring the specified language version */ static from_bytes_with_version(bytes: Uint8Array, language: Language): PlutusScript; /** * Same as .from_hex but will consider the script as requiring the specified language version */ static from_hex_with_version(hex_str: string, language: Language): PlutusScript; hash(): ScriptHash; language_version(): Language; } export class PlutusScriptSource { private constructor(); free(): void; static new(script: PlutusScript): PlutusScriptSource; static new_ref_input(script_hash: ScriptHash, input: TransactionInput, lang_ver: Language, script_size: number): PlutusScriptSource; set_required_signers(key_hashes: Ed25519KeyHashes): void; get_ref_script_size(): number | undefined; } export class PlutusScripts { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): PlutusScripts; to_hex(): string; static from_hex(hex_str: string): PlutusScripts; to_json(): string; to_js_value(): PlutusScriptsJSON; static from_json(json: string): PlutusScripts; static new(): PlutusScripts; len(): number; get(index: number): PlutusScript; add(elem: PlutusScript): void; } export class PlutusWitness { private constructor(); free(): void; static new(script: PlutusScript, datum: PlutusData, redeemer: Redeemer): PlutusWitness; static new_with_ref(script: PlutusScriptSource, datum: DatumSource, redeemer: Redeemer): PlutusWitness; static new_without_datum(script: PlutusScript, redeemer: Redeemer): PlutusWitness; static new_with_ref_without_datum(script: PlutusScriptSource, redeemer: Redeemer): PlutusWitness; script(): PlutusScript | undefined; datum(): PlutusData | undefined; redeemer(): Redeemer; } export class PlutusWitnesses { private constructor(); free(): void; static new(): PlutusWitnesses; len(): number; get(index: number): PlutusWitness; add(elem: PlutusWitness): void; } export class Pointer { private constructor(); free(): void; cert_index_bignum(): BigNum; tx_index_bignum(): BigNum; slot_bignum(): BigNum; cert_index(): number; tx_index(): number; slot(): number; static new_pointer(slot: BigNum, tx_index: BigNum, cert_index: BigNum): Pointer; /** * !!! DEPRECATED !!! * This constructor uses outdated slot number format for the ttl value, tx_index and cert_index. * Use `.new_pointer` instead */ static new(slot: number, tx_index: number, cert_index: number): Pointer; } export class PointerAddress { private constructor(); free(): void; static new(network: number, payment: Credential, stake: Pointer): PointerAddress; payment_cred(): Credential; stake_pointer(): Pointer; to_address(): Address; static from_address(addr: Address): PointerAddress | undefined; network_id(): number; } export class PoolMetadata { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): PoolMetadata; to_hex(): string; static from_hex(hex_str: string): PoolMetadata; to_json(): string; to_js_value(): PoolMetadataJSON; static from_json(json: string): PoolMetadata; url(): URL; pool_metadata_hash(): PoolMetadataHash; static new(url: URL, pool_metadata_hash: PoolMetadataHash): PoolMetadata; } export class PoolMetadataHash { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): PoolMetadataHash; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): PoolMetadataHash; to_hex(): string; static from_hex(hex: string): PoolMetadataHash; } export class PoolParams { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): PoolParams; to_hex(): string; static from_hex(hex_str: string): PoolParams; to_json(): string; to_js_value(): PoolParamsJSON; static from_json(json: string): PoolParams; operator(): Ed25519KeyHash; vrf_keyhash(): VRFKeyHash; pledge(): BigNum; cost(): BigNum; margin(): UnitInterval; reward_account(): RewardAddress; pool_owners(): Ed25519KeyHashes; relays(): Relays; pool_metadata(): PoolMetadata | undefined; static new(operator: Ed25519KeyHash, vrf_keyhash: VRFKeyHash, pledge: BigNum, cost: BigNum, margin: UnitInterval, reward_account: RewardAddress, pool_owners: Ed25519KeyHashes, relays: Relays, pool_metadata?: PoolMetadata | null): PoolParams; } export class PoolRegistration { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): PoolRegistration; to_hex(): string; static from_hex(hex_str: string): PoolRegistration; to_json(): string; to_js_value(): PoolRegistrationJSON; static from_json(json: string): PoolRegistration; pool_params(): PoolParams; static new(pool_params: PoolParams): PoolRegistration; } export class PoolRetirement { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): PoolRetirement; to_hex(): string; static from_hex(hex_str: string): PoolRetirement; to_json(): string; to_js_value(): PoolRetirementJSON; static from_json(json: string): PoolRetirement; pool_keyhash(): Ed25519KeyHash; epoch(): number; static new(pool_keyhash: Ed25519KeyHash, epoch: number): PoolRetirement; } export class PoolVotingThresholds { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): PoolVotingThresholds; to_hex(): string; static from_hex(hex_str: string): PoolVotingThresholds; to_json(): string; to_js_value(): PoolVotingThresholdsJSON; static from_json(json: string): PoolVotingThresholds; static new(motion_no_confidence: UnitInterval, committee_normal: UnitInterval, committee_no_confidence: UnitInterval, hard_fork_initiation: UnitInterval, security_relevant_threshold: UnitInterval): PoolVotingThresholds; motion_no_confidence(): UnitInterval; committee_normal(): UnitInterval; committee_no_confidence(): UnitInterval; hard_fork_initiation(): UnitInterval; security_relevant_threshold(): UnitInterval; } export class PrivateKey { private constructor(); free(): void; static from_hex(hex_str: string): PrivateKey; to_hex(): string; sign(message: Uint8Array): Ed25519Signature; static from_normal_bytes(bytes: Uint8Array): PrivateKey; static from_extended_bytes(bytes: Uint8Array): PrivateKey; as_bytes(): Uint8Array; to_bech32(): string; /** * Get private key from its bech32 representation * ```javascript * PrivateKey.from_bech32('ed25519_sk1ahfetf02qwwg4dkq7mgp4a25lx5vh9920cr5wnxmpzz9906qvm8qwvlts0'); * ``` * For an extended 25519 key * ```javascript * PrivateKey.from_bech32('ed25519e_sk1gqwl4szuwwh6d0yk3nsqcc6xxc3fpvjlevgwvt60df59v8zd8f8prazt8ln3lmz096ux3xvhhvm3ca9wj2yctdh3pnw0szrma07rt5gl748fp'); * ``` */ static from_bech32(bech32_str: string): PrivateKey; static generate_ed25519extended(): PrivateKey; static generate_ed25519(): PrivateKey; to_public(): PublicKey; } export class ProposedProtocolParameterUpdates { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ProposedProtocolParameterUpdates; to_hex(): string; static from_hex(hex_str: string): ProposedProtocolParameterUpdates; to_json(): string; to_js_value(): ProposedProtocolParameterUpdatesJSON; static from_json(json: string): ProposedProtocolParameterUpdates; static new(): ProposedProtocolParameterUpdates; len(): number; insert(key: GenesisHash, value: ProtocolParamUpdate): ProtocolParamUpdate | undefined; get(key: GenesisHash): ProtocolParamUpdate | undefined; keys(): GenesisHashes; } export class ProtocolParamUpdate { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ProtocolParamUpdate; to_hex(): string; static from_hex(hex_str: string): ProtocolParamUpdate; to_json(): string; to_js_value(): ProtocolParamUpdateJSON; static from_json(json: string): ProtocolParamUpdate; set_minfee_a(minfee_a: BigNum): void; minfee_a(): BigNum | undefined; set_minfee_b(minfee_b: BigNum): void; minfee_b(): BigNum | undefined; set_max_block_body_size(max_block_body_size: number): void; max_block_body_size(): number | undefined; set_max_tx_size(max_tx_size: number): void; max_tx_size(): number | undefined; set_max_block_header_size(max_block_header_size: number): void; max_block_header_size(): number | undefined; set_key_deposit(key_deposit: BigNum): void; key_deposit(): BigNum | undefined; set_pool_deposit(pool_deposit: BigNum): void; pool_deposit(): BigNum | undefined; set_max_epoch(max_epoch: number): void; max_epoch(): number | undefined; set_n_opt(n_opt: number): void; n_opt(): number | undefined; set_pool_pledge_influence(pool_pledge_influence: UnitInterval): void; pool_pledge_influence(): UnitInterval | undefined; set_expansion_rate(expansion_rate: UnitInterval): void; expansion_rate(): UnitInterval | undefined; set_treasury_growth_rate(treasury_growth_rate: UnitInterval): void; treasury_growth_rate(): UnitInterval | undefined; /** * !!! DEPRECATED !!! * Since babbage era this param is outdated. But this param you can meet in a pre-babbage block. */ d(): UnitInterval | undefined; /** * !!! DEPRECATED !!! * Since babbage era this param is outdated. But this param you can meet in a pre-babbage block. */ extra_entropy(): Nonce | undefined; /** * !!! DEPRECATED !!! * Since conway era this param is outdated. But this param you can meet in a pre-conway block. */ set_protocol_version(protocol_version: ProtocolVersion): void; protocol_version(): ProtocolVersion | undefined; set_min_pool_cost(min_pool_cost: BigNum): void; min_pool_cost(): BigNum | undefined; set_ada_per_utxo_byte(ada_per_utxo_byte: BigNum): void; ada_per_utxo_byte(): BigNum | undefined; set_cost_models(cost_models: Costmdls): void; cost_models(): Costmdls | undefined; set_execution_costs(execution_costs: ExUnitPrices): void; execution_costs(): ExUnitPrices | undefined; set_max_tx_ex_units(max_tx_ex_units: ExUnits): void; max_tx_ex_units(): ExUnits | undefined; set_max_block_ex_units(max_block_ex_units: ExUnits): void; max_block_ex_units(): ExUnits | undefined; set_max_value_size(max_value_size: number): void; max_value_size(): number | undefined; set_collateral_percentage(collateral_percentage: number): void; collateral_percentage(): number | undefined; set_max_collateral_inputs(max_collateral_inputs: number): void; max_collateral_inputs(): number | undefined; set_pool_voting_thresholds(pool_voting_thresholds: PoolVotingThresholds): void; pool_voting_thresholds(): PoolVotingThresholds | undefined; set_drep_voting_thresholds(drep_voting_thresholds: DRepVotingThresholds): void; drep_voting_thresholds(): DRepVotingThresholds | undefined; set_min_committee_size(min_committee_size: number): void; min_committee_size(): number | undefined; set_committee_term_limit(committee_term_limit: number): void; committee_term_limit(): number | undefined; set_governance_action_validity_period(governance_action_validity_period: number): void; governance_action_validity_period(): number | undefined; set_governance_action_deposit(governance_action_deposit: BigNum): void; governance_action_deposit(): BigNum | undefined; set_drep_deposit(drep_deposit: BigNum): void; drep_deposit(): BigNum | undefined; set_drep_inactivity_period(drep_inactivity_period: number): void; drep_inactivity_period(): number | undefined; set_ref_script_coins_per_byte(ref_script_coins_per_byte: UnitInterval): void; ref_script_coins_per_byte(): UnitInterval | undefined; static new(): ProtocolParamUpdate; } export class ProtocolVersion { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ProtocolVersion; to_hex(): string; static from_hex(hex_str: string): ProtocolVersion; to_json(): string; to_js_value(): ProtocolVersionJSON; static from_json(json: string): ProtocolVersion; major(): number; minor(): number; static new(major: number, minor: number): ProtocolVersion; } /** * ED25519 key used as public key */ export class PublicKey { private constructor(); free(): void; static from_hex(hex_str: string): PublicKey; to_hex(): string; hash(): Ed25519KeyHash; verify(data: Uint8Array, signature: Ed25519Signature): boolean; static from_bytes(bytes: Uint8Array): PublicKey; as_bytes(): Uint8Array; to_bech32(): string; /** * Get public key from its bech32 representation * Example: * ```javascript * const pkey = PublicKey.from_bech32('ed25519_pk1dgaagyh470y66p899txcl3r0jaeaxu6yd7z2dxyk55qcycdml8gszkxze2'); * ``` */ static from_bech32(bech32_str: string): PublicKey; } export class PublicKeys { free(): void; constructor(); size(): number; get(index: number): PublicKey; add(key: PublicKey): void; } export class Redeemer { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Redeemer; to_hex(): string; static from_hex(hex_str: string): Redeemer; to_json(): string; to_js_value(): RedeemerJSON; static from_json(json: string): Redeemer; tag(): RedeemerTag; index(): BigNum; data(): PlutusData; ex_units(): ExUnits; static new(tag: RedeemerTag, index: BigNum, data: PlutusData, ex_units: ExUnits): Redeemer; } export class RedeemerTag { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): RedeemerTag; to_hex(): string; static from_hex(hex_str: string): RedeemerTag; to_json(): string; to_js_value(): RedeemerTagJSON; static from_json(json: string): RedeemerTag; static new_spend(): RedeemerTag; static new_mint(): RedeemerTag; static new_cert(): RedeemerTag; static new_reward(): RedeemerTag; static new_vote(): RedeemerTag; static new_voting_proposal(): RedeemerTag; kind(): RedeemerTagKind; } export class Redeemers { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Redeemers; to_hex(): string; static from_hex(hex_str: string): Redeemers; to_json(): string; to_js_value(): RedeemersJSON; static from_json(json: string): Redeemers; static new(): Redeemers; len(): number; get(index: number): Redeemer; add(elem: Redeemer): void; /** * WARNING: This function will be removed in after next hard fork */ get_container_type(): CborContainerType; total_ex_units(): ExUnits; } export class Relay { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Relay; to_hex(): string; static from_hex(hex_str: string): Relay; to_json(): string; to_js_value(): RelayJSON; static from_json(json: string): Relay; static new_single_host_addr(single_host_addr: SingleHostAddr): Relay; static new_single_host_name(single_host_name: SingleHostName): Relay; static new_multi_host_name(multi_host_name: MultiHostName): Relay; kind(): RelayKind; as_single_host_addr(): SingleHostAddr | undefined; as_single_host_name(): SingleHostName | undefined; as_multi_host_name(): MultiHostName | undefined; } export class Relays { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Relays; to_hex(): string; static from_hex(hex_str: string): Relays; to_json(): string; to_js_value(): RelaysJSON; static from_json(json: string): Relays; static new(): Relays; len(): number; get(index: number): Relay; add(elem: Relay): void; } export class RewardAddress { private constructor(); free(): void; static new(network: number, payment: Credential): RewardAddress; payment_cred(): Credential; to_address(): Address; static from_address(addr: Address): RewardAddress | undefined; network_id(): number; } export class RewardAddresses { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): RewardAddresses; to_hex(): string; static from_hex(hex_str: string): RewardAddresses; to_json(): string; to_js_value(): RewardAddressesJSON; static from_json(json: string): RewardAddresses; static new(): RewardAddresses; len(): number; get(index: number): RewardAddress; add(elem: RewardAddress): void; } export class ScriptAll { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ScriptAll; to_hex(): string; static from_hex(hex_str: string): ScriptAll; to_json(): string; to_js_value(): ScriptAllJSON; static from_json(json: string): ScriptAll; native_scripts(): NativeScripts; static new(native_scripts: NativeScripts): ScriptAll; } export class ScriptAny { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ScriptAny; to_hex(): string; static from_hex(hex_str: string): ScriptAny; to_json(): string; to_js_value(): ScriptAnyJSON; static from_json(json: string): ScriptAny; native_scripts(): NativeScripts; static new(native_scripts: NativeScripts): ScriptAny; } export class ScriptDataHash { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): ScriptDataHash; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): ScriptDataHash; to_hex(): string; static from_hex(hex: string): ScriptDataHash; } export class ScriptHash { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): ScriptHash; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): ScriptHash; to_hex(): string; static from_hex(hex: string): ScriptHash; } export class ScriptHashes { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ScriptHashes; to_hex(): string; static from_hex(hex_str: string): ScriptHashes; to_json(): string; to_js_value(): ScriptHashesJSON; static from_json(json: string): ScriptHashes; static new(): ScriptHashes; len(): number; get(index: number): ScriptHash; add(elem: ScriptHash): void; } export class ScriptNOfK { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ScriptNOfK; to_hex(): string; static from_hex(hex_str: string): ScriptNOfK; to_json(): string; to_js_value(): ScriptNOfKJSON; static from_json(json: string): ScriptNOfK; n(): number; native_scripts(): NativeScripts; static new(n: number, native_scripts: NativeScripts): ScriptNOfK; } export class ScriptPubkey { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ScriptPubkey; to_hex(): string; static from_hex(hex_str: string): ScriptPubkey; to_json(): string; to_js_value(): ScriptPubkeyJSON; static from_json(json: string): ScriptPubkey; addr_keyhash(): Ed25519KeyHash; static new(addr_keyhash: Ed25519KeyHash): ScriptPubkey; } export class ScriptRef { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): ScriptRef; to_hex(): string; static from_hex(hex_str: string): ScriptRef; to_json(): string; to_js_value(): ScriptRefJSON; static from_json(json: string): ScriptRef; static new_native_script(native_script: NativeScript): ScriptRef; static new_plutus_script(plutus_script: PlutusScript): ScriptRef; is_native_script(): boolean; is_plutus_script(): boolean; native_script(): NativeScript | undefined; plutus_script(): PlutusScript | undefined; /** * Return bytes array of script ref struct but without wrapping into CBOR array under the tag * to_bytes returns "#6.24(bytes .cbor script)" from CDDL * to_unwrapped_bytes return "script" from CDDL */ to_unwrapped_bytes(): Uint8Array; } export class SingleHostAddr { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): SingleHostAddr; to_hex(): string; static from_hex(hex_str: string): SingleHostAddr; to_json(): string; to_js_value(): SingleHostAddrJSON; static from_json(json: string): SingleHostAddr; port(): number | undefined; ipv4(): Ipv4 | undefined; ipv6(): Ipv6 | undefined; static new(port?: number | null, ipv4?: Ipv4 | null, ipv6?: Ipv6 | null): SingleHostAddr; } export class SingleHostName { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): SingleHostName; to_hex(): string; static from_hex(hex_str: string): SingleHostName; to_json(): string; to_js_value(): SingleHostNameJSON; static from_json(json: string): SingleHostName; port(): number | undefined; dns_name(): DNSRecordAorAAAA; static new(port: number | null | undefined, dns_name: DNSRecordAorAAAA): SingleHostName; } export class StakeAndVoteDelegation { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): StakeAndVoteDelegation; to_hex(): string; static from_hex(hex_str: string): StakeAndVoteDelegation; to_json(): string; to_js_value(): StakeAndVoteDelegationJSON; static from_json(json: string): StakeAndVoteDelegation; stake_credential(): Credential; pool_keyhash(): Ed25519KeyHash; drep(): DRep; static new(stake_credential: Credential, pool_keyhash: Ed25519KeyHash, drep: DRep): StakeAndVoteDelegation; has_script_credentials(): boolean; } export class StakeDelegation { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): StakeDelegation; to_hex(): string; static from_hex(hex_str: string): StakeDelegation; to_json(): string; to_js_value(): StakeDelegationJSON; static from_json(json: string): StakeDelegation; stake_credential(): Credential; pool_keyhash(): Ed25519KeyHash; static new(stake_credential: Credential, pool_keyhash: Ed25519KeyHash): StakeDelegation; has_script_credentials(): boolean; } export class StakeDeregistration { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): StakeDeregistration; to_hex(): string; static from_hex(hex_str: string): StakeDeregistration; to_json(): string; to_js_value(): StakeDeregistrationJSON; static from_json(json: string): StakeDeregistration; stake_credential(): Credential; coin(): BigNum | undefined; static new(stake_credential: Credential): StakeDeregistration; static new_with_explicit_refund(stake_credential: Credential, coin: BigNum): StakeDeregistration; has_script_credentials(): boolean; } export class StakeRegistration { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): StakeRegistration; to_hex(): string; static from_hex(hex_str: string): StakeRegistration; to_json(): string; to_js_value(): StakeRegistrationJSON; static from_json(json: string): StakeRegistration; stake_credential(): Credential; coin(): BigNum | undefined; static new(stake_credential: Credential): StakeRegistration; static new_with_explicit_deposit(stake_credential: Credential, coin: BigNum): StakeRegistration; has_script_credentials(): boolean; } export class StakeRegistrationAndDelegation { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): StakeRegistrationAndDelegation; to_hex(): string; static from_hex(hex_str: string): StakeRegistrationAndDelegation; to_json(): string; to_js_value(): StakeRegistrationAndDelegationJSON; static from_json(json: string): StakeRegistrationAndDelegation; stake_credential(): Credential; pool_keyhash(): Ed25519KeyHash; coin(): BigNum; static new(stake_credential: Credential, pool_keyhash: Ed25519KeyHash, coin: BigNum): StakeRegistrationAndDelegation; has_script_credentials(): boolean; } export class StakeVoteRegistrationAndDelegation { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): StakeVoteRegistrationAndDelegation; to_hex(): string; static from_hex(hex_str: string): StakeVoteRegistrationAndDelegation; to_json(): string; to_js_value(): StakeVoteRegistrationAndDelegationJSON; static from_json(json: string): StakeVoteRegistrationAndDelegation; stake_credential(): Credential; pool_keyhash(): Ed25519KeyHash; drep(): DRep; coin(): BigNum; static new(stake_credential: Credential, pool_keyhash: Ed25519KeyHash, drep: DRep, coin: BigNum): StakeVoteRegistrationAndDelegation; has_script_credentials(): boolean; } export class Strings { private constructor(); free(): void; static new(): Strings; len(): number; get(index: number): string; add(elem: string): void; } export class TimelockExpiry { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TimelockExpiry; to_hex(): string; static from_hex(hex_str: string): TimelockExpiry; to_json(): string; to_js_value(): TimelockExpiryJSON; static from_json(json: string): TimelockExpiry; slot(): number; slot_bignum(): BigNum; /** * !!! DEPRECATED !!! * This constructor uses outdated slot number format. * Use `.new_timelockexpiry` instead */ static new(slot: number): TimelockExpiry; static new_timelockexpiry(slot: BigNum): TimelockExpiry; } export class TimelockStart { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TimelockStart; to_hex(): string; static from_hex(hex_str: string): TimelockStart; to_json(): string; to_js_value(): TimelockStartJSON; static from_json(json: string): TimelockStart; /** * !!! DEPRECATED !!! * Returns a Slot32 (u32) value in case the underlying original BigNum (u64) value is within the limits. * Otherwise will just raise an error. * Use `.slot_bignum` instead */ slot(): number; slot_bignum(): BigNum; /** * !!! DEPRECATED !!! * This constructor uses outdated slot number format. * Use `.new_timelockstart` instead. */ static new(slot: number): TimelockStart; static new_timelockstart(slot: BigNum): TimelockStart; } export class Transaction { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Transaction; to_hex(): string; static from_hex(hex_str: string): Transaction; to_json(): string; to_js_value(): TransactionJSON; static from_json(json: string): Transaction; body(): TransactionBody; witness_set(): TransactionWitnessSet; is_valid(): boolean; auxiliary_data(): AuxiliaryData | undefined; set_is_valid(valid: boolean): void; static new(body: TransactionBody, witness_set: TransactionWitnessSet, auxiliary_data?: AuxiliaryData | null): Transaction; } export class TransactionBatch { private constructor(); free(): void; len(): number; get(index: number): Transaction; } export class TransactionBatchList { private constructor(); free(): void; len(): number; get(index: number): TransactionBatch; } export class TransactionBodies { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TransactionBodies; to_hex(): string; static from_hex(hex_str: string): TransactionBodies; to_json(): string; to_js_value(): TransactionBodiesJSON; static from_json(json: string): TransactionBodies; static new(): TransactionBodies; len(): number; get(index: number): TransactionBody; add(elem: TransactionBody): void; } export class TransactionBody { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TransactionBody; to_hex(): string; static from_hex(hex_str: string): TransactionBody; to_json(): string; to_js_value(): TransactionBodyJSON; static from_json(json: string): TransactionBody; inputs(): TransactionInputs; outputs(): TransactionOutputs; fee(): BigNum; /** * !!! DEPRECATED !!! * Returns a Slot32 (u32) value in case the underlying original BigNum (u64) value is within the limits. * Otherwise will just raise an error. */ ttl(): number | undefined; ttl_bignum(): BigNum | undefined; set_ttl(ttl: BigNum): void; remove_ttl(): void; set_certs(certs: Certificates): void; certs(): Certificates | undefined; set_withdrawals(withdrawals: Withdrawals): void; withdrawals(): Withdrawals | undefined; set_update(update: Update): void; update(): Update | undefined; set_auxiliary_data_hash(auxiliary_data_hash: AuxiliaryDataHash): void; auxiliary_data_hash(): AuxiliaryDataHash | undefined; /** * !!! DEPRECATED !!! * Uses outdated slot number format. */ set_validity_start_interval(validity_start_interval: number): void; set_validity_start_interval_bignum(validity_start_interval: BigNum): void; validity_start_interval_bignum(): BigNum | undefined; /** * !!! DEPRECATED !!! * Returns a Option (u32) value in case the underlying original Option (u64) value is within the limits. * Otherwise will just raise an error. * Use `.validity_start_interval_bignum` instead. */ validity_start_interval(): number | undefined; set_mint(mint: Mint): void; mint(): Mint | undefined; set_reference_inputs(reference_inputs: TransactionInputs): void; reference_inputs(): TransactionInputs | undefined; set_script_data_hash(script_data_hash: ScriptDataHash): void; script_data_hash(): ScriptDataHash | undefined; set_collateral(collateral: TransactionInputs): void; collateral(): TransactionInputs | undefined; set_required_signers(required_signers: Ed25519KeyHashes): void; required_signers(): Ed25519KeyHashes | undefined; set_network_id(network_id: NetworkId): void; network_id(): NetworkId | undefined; set_collateral_return(collateral_return: TransactionOutput): void; collateral_return(): TransactionOutput | undefined; set_total_collateral(total_collateral: BigNum): void; total_collateral(): BigNum | undefined; set_voting_procedures(voting_procedures: VotingProcedures): void; voting_procedures(): VotingProcedures | undefined; set_voting_proposals(voting_proposals: VotingProposals): void; voting_proposals(): VotingProposals | undefined; set_donation(donation: BigNum): void; donation(): BigNum | undefined; set_current_treasury_value(current_treasury_value: BigNum): void; current_treasury_value(): BigNum | undefined; /** * !!! DEPRECATED !!! * This constructor uses outdated slot number format for the ttl value. * Use `.new_tx_body` and then `.set_ttl` instead */ static new(inputs: TransactionInputs, outputs: TransactionOutputs, fee: BigNum, ttl?: number | null): TransactionBody; /** * Returns a new TransactionBody. * In the new version of "new" we removed optional ttl for support it by wasm_bingen. * Your can use "set_ttl" and "remove_ttl" to set a new value for ttl or set it as None. */ static new_tx_body(inputs: TransactionInputs, outputs: TransactionOutputs, fee: BigNum): TransactionBody; } export class TransactionBuilder { private constructor(); free(): void; /** * This automatically selects and adds inputs from {inputs} consisting of just enough to cover * the outputs that have already been added. * This should be called after adding all certs/outputs/etc and will be an error otherwise. * Uses CIP2: https://github.com/cardano-foundation/CIPs/blob/master/CIP-0002/CIP-0002.md * Adding a change output must be called after via TransactionBuilder::add_change_if_needed() * This function, diverging from CIP2, takes into account fees and will attempt to add additional * inputs to cover the minimum fees. This does not, however, set the txbuilder's fee. */ add_inputs_from(inputs: TransactionUnspentOutputs, strategy: CoinSelectionStrategyCIP2): void; set_inputs(inputs: TxInputsBuilder): void; set_collateral(collateral: TxInputsBuilder): void; set_collateral_return(collateral_return: TransactionOutput): void; remove_collateral_return(): void; /** * This function will set the collateral-return value and then auto-calculate and assign * the total collateral coin value. Will raise an error in case no collateral inputs are set * or in case the total collateral value will have any assets in it except coin. */ set_collateral_return_and_total(collateral_return: TransactionOutput): void; set_total_collateral(total_collateral: BigNum): void; remove_total_collateral(): void; /** * This function will set the total-collateral coin and then auto-calculate and assign * the collateral return value. Will raise an error in case no collateral inputs are set. * The specified address will be the received of the collateral return */ set_total_collateral_and_return(total_collateral: BigNum, return_address: Address): void; add_reference_input(reference_input: TransactionInput): void; add_script_reference_input(reference_input: TransactionInput, script_size: number): void; /** * We have to know what kind of inputs these are to know what kind of mock witnesses to create since * 1) mock witnesses have different lengths depending on the type which changes the expecting fee * 2) Witnesses are a set so we need to get rid of duplicates to avoid over-estimating the fee */ add_key_input(hash: Ed25519KeyHash, input: TransactionInput, amount: Value): void; /** * This method will add the input to the builder and also register the required native script witness */ add_native_script_input(script: NativeScript, input: TransactionInput, amount: Value): void; /** * This method will add the input to the builder and also register the required plutus witness */ add_plutus_script_input(witness: PlutusWitness, input: TransactionInput, amount: Value): void; add_bootstrap_input(hash: ByronAddress, input: TransactionInput, amount: Value): void; /** * This function is replace for previous one add_input. * The functions adds a non script input, if it is a script input it returns an error. * To add script input you need to use add_native_script_input or add_plutus_script_input. * Also we recommend to use TxInputsBuilder and .set_inputs, because all add_*_input functions might be removed from transaction builder. */ add_regular_input(address: Address, input: TransactionInput, amount: Value): void; add_inputs_from_and_change(inputs: TransactionUnspentOutputs, strategy: CoinSelectionStrategyCIP2, change_config: ChangeConfig): boolean; add_inputs_from_and_change_with_collateral_return(inputs: TransactionUnspentOutputs, strategy: CoinSelectionStrategyCIP2, change_config: ChangeConfig, collateral_percentage: BigNum): void; /** * Returns a copy of the current script input witness scripts in the builder */ get_native_input_scripts(): NativeScripts | undefined; /** * Returns a copy of the current plutus input witness scripts in the builder. * NOTE: each plutus witness will be cloned with a specific corresponding input index */ get_plutus_input_scripts(): PlutusWitnesses | undefined; /** * calculates how much the fee would increase if you added a given output */ fee_for_input(address: Address, input: TransactionInput, amount: Value): BigNum; /** * Add explicit output via a TransactionOutput object */ add_output(output: TransactionOutput): void; /** * calculates how much the fee would increase if you added a given output */ fee_for_output(output: TransactionOutput): BigNum; /** * Set exact fee for the transaction. If the real fee will be bigger then the set value, the transaction will not be created on .build_tx() */ set_fee(fee: BigNum): void; /** * Set minimal fee for the transaction. If the real fee will be bigger then the set value, the transaction will be created with the real fee. */ set_min_fee(fee: BigNum): void; /** * !!! DEPRECATED !!! * Set ttl value. */ set_ttl(ttl: number): void; set_ttl_bignum(ttl: BigNum): void; remove_ttl(): void; /** * !!! DEPRECATED !!! * Uses outdated slot number format. */ set_validity_start_interval(validity_start_interval: number): void; set_validity_start_interval_bignum(validity_start_interval: BigNum): void; remove_validity_start_interval(): void; /** * !!! DEPRECATED !!! * Can emit error if add a cert with script credential. * Use set_certs_builder instead. */ set_certs(certs: Certificates): void; remove_certs(): void; set_certs_builder(certs: CertificatesBuilder): void; /** * !!! DEPRECATED !!! * Can emit error if add a withdrawal with script credential. * Use set_withdrawals_builder instead. */ set_withdrawals(withdrawals: Withdrawals): void; set_withdrawals_builder(withdrawals: WithdrawalsBuilder): void; set_voting_builder(voting_builder: VotingBuilder): void; set_voting_proposal_builder(voting_proposal_builder: VotingProposalBuilder): void; remove_withdrawals(): void; get_auxiliary_data(): AuxiliaryData | undefined; /** * Set explicit auxiliary data via an AuxiliaryData object * It might contain some metadata plus native or Plutus scripts */ set_auxiliary_data(auxiliary_data: AuxiliaryData): void; remove_auxiliary_data(): void; /** * Set metadata using a GeneralTransactionMetadata object * It will be set to the existing or new auxiliary data in this builder */ set_metadata(metadata: GeneralTransactionMetadata): void; /** * Add a single metadatum using TransactionMetadatumLabel and TransactionMetadatum objects * It will be securely added to existing or new metadata in this builder */ add_metadatum(key: BigNum, val: TransactionMetadatum): void; /** * Add a single JSON metadatum using a TransactionMetadatumLabel and a String * It will be securely added to existing or new metadata in this builder */ add_json_metadatum(key: BigNum, val: string): void; /** * Add a single JSON metadatum using a TransactionMetadatumLabel, a String, and a MetadataJsonSchema object * It will be securely added to existing or new metadata in this builder */ add_json_metadatum_with_schema(key: BigNum, val: string, schema: MetadataJsonSchema): void; set_mint_builder(mint_builder: MintBuilder): void; remove_mint_builder(): void; get_mint_builder(): MintBuilder | undefined; /** * !!! DEPRECATED !!! * Mints are defining by MintBuilder now. * Use `.set_mint_builder()` and `MintBuilder` instead. * Set explicit Mint object and the required witnesses to this builder * it will replace any previously existing mint and mint scripts * NOTE! Error will be returned in case a mint policy does not have a matching script */ set_mint(mint: Mint, mint_scripts: NativeScripts): void; /** * !!! DEPRECATED !!! * Mints are defining by MintBuilder now. * Use `.get_mint_builder()` and `.build()` instead. * Returns a copy of the current mint state in the builder */ get_mint(): Mint | undefined; /** * Returns a copy of the current mint witness scripts in the builder */ get_mint_scripts(): NativeScripts | undefined; /** * !!! DEPRECATED !!! * Mints are defining by MintBuilder now. * Use `.set_mint_builder()` and `MintBuilder` instead. * Add a mint entry to this builder using a PolicyID and MintAssets object * It will be securely added to existing or new Mint in this builder * It will replace any existing mint assets with the same PolicyID */ set_mint_asset(policy_script: NativeScript, mint_assets: MintAssets): void; /** * !!! DEPRECATED !!! * Mints are defining by MintBuilder now. * Use `.set_mint_builder()` and `MintBuilder` instead. * Add a mint entry to this builder using a PolicyID, AssetName, and Int object for amount * It will be securely added to existing or new Mint in this builder * It will replace any previous existing amount same PolicyID and AssetName */ add_mint_asset(policy_script: NativeScript, asset_name: AssetName, amount: Int): void; /** * Add a mint entry together with an output to this builder * Using a PolicyID, AssetName, Int for amount, Address, and Coin (BigNum) objects * The asset will be securely added to existing or new Mint in this builder * A new output will be added with the specified Address, the Coin value, and the minted asset */ add_mint_asset_and_output(policy_script: NativeScript, asset_name: AssetName, amount: Int, output_builder: TransactionOutputAmountBuilder, output_coin: BigNum): void; /** * Add a mint entry together with an output to this builder * Using a PolicyID, AssetName, Int for amount, and Address objects * The asset will be securely added to existing or new Mint in this builder * A new output will be added with the specified Address and the minted asset * The output will be set to contain the minimum required amount of Coin */ add_mint_asset_and_output_min_required_coin(policy_script: NativeScript, asset_name: AssetName, amount: Int, output_builder: TransactionOutputAmountBuilder): void; add_extra_witness_datum(datum: PlutusData): void; get_extra_witness_datums(): PlutusList | undefined; set_donation(donation: BigNum): void; get_donation(): BigNum | undefined; set_current_treasury_value(current_treasury_value: BigNum): void; get_current_treasury_value(): BigNum | undefined; static new(cfg: TransactionBuilderConfig): TransactionBuilder; get_reference_inputs(): TransactionInputs; /** * does not include refunds or withdrawals */ get_explicit_input(): Value; /** * withdrawals and refunds */ get_implicit_input(): Value; /** * Return explicit input plus implicit input plus mint */ get_total_input(): Value; /** * Return explicit output plus deposit plus burn */ get_total_output(): Value; /** * does not include fee */ get_explicit_output(): Value; get_deposit(): BigNum; get_fee_if_set(): BigNum | undefined; /** * Warning: this function will mutate the /fee/ field * Make sure to call this function last after setting all other tx-body properties * Editing inputs, outputs, mint, etc. after change been calculated * might cause a mismatch in calculated fee versus the required fee */ add_change_if_needed(address: Address): boolean; add_change_if_needed_with_datum(address: Address, plutus_data: OutputDatum): boolean; /** * This method will calculate the script hash data * using the plutus datums and redeemers already present in the builder * along with the provided cost model, and will register the calculated value * in the builder to be used when building the tx body. * In case there are no plutus input witnesses present - nothing will change * You can set specific hash value using `.set_script_data_hash` * NOTE: this function will check which language versions are used in the present scripts * and will assert and require for a corresponding cost-model to be present in the passed map. * Only the cost-models for the present language versions will be used in the hash calculation. */ calc_script_data_hash(cost_models: Costmdls): void; /** * Sets the specified hash value. * Alternatively you can use `.calc_script_data_hash` to calculate the hash automatically. * Or use `.remove_script_data_hash` to delete the previously set value */ set_script_data_hash(hash: ScriptDataHash): void; /** * Deletes any previously set plutus data hash value. * Use `.set_script_data_hash` or `.calc_script_data_hash` to set it. */ remove_script_data_hash(): void; add_required_signer(key: Ed25519KeyHash): void; full_size(): number; output_sizes(): Uint32Array; /** * Returns object the body of the new transaction * Auxiliary data itself is not included * You can use `get_auxiliary_data` or `build_tx` */ build(): TransactionBody; /** * Returns full Transaction object with the body and the auxiliary data * NOTE: witness_set will contain all mint_scripts if any been added or set * NOTE: is_valid set to true * NOTE: Will fail in case there are any script inputs added with no corresponding witness */ build_tx(): Transaction; /** * Similar to `.build_tx()` but will NOT fail in case there are missing script witnesses */ build_tx_unsafe(): Transaction; /** * warning: sum of all parts of a transaction must equal 0. You cannot just set the fee to the min value and forget about it * warning: min_fee may be slightly larger than the actual minimum fee (ex: a few lovelaces) * this is done to simplify the library code, but can be fixed later */ min_fee(): BigNum; } export class TransactionBuilderConfig { private constructor(); free(): void; } export class TransactionBuilderConfigBuilder { private constructor(); free(): void; static new(): TransactionBuilderConfigBuilder; fee_algo(fee_algo: LinearFee): TransactionBuilderConfigBuilder; coins_per_utxo_byte(coins_per_utxo_byte: BigNum): TransactionBuilderConfigBuilder; ex_unit_prices(ex_unit_prices: ExUnitPrices): TransactionBuilderConfigBuilder; pool_deposit(pool_deposit: BigNum): TransactionBuilderConfigBuilder; key_deposit(key_deposit: BigNum): TransactionBuilderConfigBuilder; max_value_size(max_value_size: number): TransactionBuilderConfigBuilder; max_tx_size(max_tx_size: number): TransactionBuilderConfigBuilder; ref_script_coins_per_byte(ref_script_coins_per_byte: UnitInterval): TransactionBuilderConfigBuilder; prefer_pure_change(prefer_pure_change: boolean): TransactionBuilderConfigBuilder; /** * Removes a ref input (that was set via set_reference_inputs) if the ref inputs was presented in regular tx inputs */ deduplicate_explicit_ref_inputs_with_regular_inputs(deduplicate_explicit_ref_inputs_with_regular_inputs: boolean): TransactionBuilderConfigBuilder; /** * If set to true, the transaction builder will not burn extra change if it's impossible to crate change output * due to the value being too small to cover min ada for change output. Instead, tx builder will throw an error. */ do_not_burn_extra_change(do_not_burn_extra_change: boolean): TransactionBuilderConfigBuilder; build(): TransactionBuilderConfig; } export class TransactionHash { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): TransactionHash; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): TransactionHash; to_hex(): string; static from_hex(hex: string): TransactionHash; } export class TransactionInput { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TransactionInput; to_hex(): string; static from_hex(hex_str: string): TransactionInput; to_json(): string; to_js_value(): TransactionInputJSON; static from_json(json: string): TransactionInput; transaction_id(): TransactionHash; index(): number; static new(transaction_id: TransactionHash, index: number): TransactionInput; } export class TransactionInputs { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TransactionInputs; to_hex(): string; static from_hex(hex_str: string): TransactionInputs; to_json(): string; to_js_value(): TransactionInputsJSON; static from_json(json: string): TransactionInputs; static new(): TransactionInputs; len(): number; get(index: number): TransactionInput; /** * Add a new `TransactionInput` to the set. * Returns `true` if the element was not already present in the set. */ add(input: TransactionInput): boolean; to_option(): TransactionInputs | undefined; } export class TransactionMetadatum { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TransactionMetadatum; to_hex(): string; static from_hex(hex_str: string): TransactionMetadatum; static new_map(map: MetadataMap): TransactionMetadatum; static new_list(list: MetadataList): TransactionMetadatum; static new_int(int: Int): TransactionMetadatum; static new_bytes(bytes: Uint8Array): TransactionMetadatum; static new_text(text: string): TransactionMetadatum; kind(): TransactionMetadatumKind; as_map(): MetadataMap; as_list(): MetadataList; as_int(): Int; as_bytes(): Uint8Array; as_text(): string; } export class TransactionMetadatumLabels { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TransactionMetadatumLabels; to_hex(): string; static from_hex(hex_str: string): TransactionMetadatumLabels; static new(): TransactionMetadatumLabels; len(): number; get(index: number): BigNum; add(elem: BigNum): void; } export class TransactionOutput { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TransactionOutput; to_hex(): string; static from_hex(hex_str: string): TransactionOutput; to_json(): string; to_js_value(): TransactionOutputJSON; static from_json(json: string): TransactionOutput; address(): Address; amount(): Value; data_hash(): DataHash | undefined; plutus_data(): PlutusData | undefined; script_ref(): ScriptRef | undefined; set_script_ref(script_ref: ScriptRef): void; set_plutus_data(data: PlutusData): void; set_data_hash(data_hash: DataHash): void; has_plutus_data(): boolean; has_data_hash(): boolean; has_script_ref(): boolean; static new(address: Address, amount: Value): TransactionOutput; serialization_format(): CborContainerType | undefined; } export class TransactionOutputAmountBuilder { private constructor(); free(): void; with_value(amount: Value): TransactionOutputAmountBuilder; with_coin(coin: BigNum): TransactionOutputAmountBuilder; with_coin_and_asset(coin: BigNum, multiasset: MultiAsset): TransactionOutputAmountBuilder; with_asset_and_min_required_coin_by_utxo_cost(multiasset: MultiAsset, data_cost: DataCost): TransactionOutputAmountBuilder; build(): TransactionOutput; } /** * We introduce a builder-pattern format for creating transaction outputs * This is because: * 1. Some fields (i.e. data hash) are optional, and we can't easily expose Option<> in WASM * 2. Some fields like amounts have many ways it could be set (some depending on other field values being known) * 3. Easier to adapt as the output format gets more complicated in future Cardano releases */ export class TransactionOutputBuilder { private constructor(); free(): void; static new(): TransactionOutputBuilder; with_address(address: Address): TransactionOutputBuilder; with_data_hash(data_hash: DataHash): TransactionOutputBuilder; with_plutus_data(data: PlutusData): TransactionOutputBuilder; with_script_ref(script_ref: ScriptRef): TransactionOutputBuilder; next(): TransactionOutputAmountBuilder; } export class TransactionOutputs { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TransactionOutputs; to_hex(): string; static from_hex(hex_str: string): TransactionOutputs; to_json(): string; to_js_value(): TransactionOutputsJSON; static from_json(json: string): TransactionOutputs; static new(): TransactionOutputs; len(): number; get(index: number): TransactionOutput; add(elem: TransactionOutput): void; } export class TransactionUnspentOutput { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TransactionUnspentOutput; to_hex(): string; static from_hex(hex_str: string): TransactionUnspentOutput; to_json(): string; to_js_value(): TransactionUnspentOutputJSON; static from_json(json: string): TransactionUnspentOutput; static new(input: TransactionInput, output: TransactionOutput): TransactionUnspentOutput; input(): TransactionInput; output(): TransactionOutput; } export class TransactionUnspentOutputs { private constructor(); free(): void; to_json(): string; to_js_value(): TransactionUnspentOutputsJSON; static from_json(json: string): TransactionUnspentOutputs; static new(): TransactionUnspentOutputs; len(): number; get(index: number): TransactionUnspentOutput; add(elem: TransactionUnspentOutput): void; } export class TransactionWitnessSet { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TransactionWitnessSet; to_hex(): string; static from_hex(hex_str: string): TransactionWitnessSet; to_json(): string; to_js_value(): TransactionWitnessSetJSON; static from_json(json: string): TransactionWitnessSet; set_vkeys(vkeys: Vkeywitnesses): void; vkeys(): Vkeywitnesses | undefined; set_native_scripts(native_scripts: NativeScripts): void; native_scripts(): NativeScripts | undefined; set_bootstraps(bootstraps: BootstrapWitnesses): void; bootstraps(): BootstrapWitnesses | undefined; set_plutus_scripts(plutus_scripts: PlutusScripts): void; plutus_scripts(): PlutusScripts | undefined; set_plutus_data(plutus_data: PlutusList): void; plutus_data(): PlutusList | undefined; set_redeemers(redeemers: Redeemers): void; redeemers(): Redeemers | undefined; static new(): TransactionWitnessSet; } export class TransactionWitnessSets { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TransactionWitnessSets; to_hex(): string; static from_hex(hex_str: string): TransactionWitnessSets; to_json(): string; to_js_value(): TransactionWitnessSetsJSON; static from_json(json: string): TransactionWitnessSets; static new(): TransactionWitnessSets; len(): number; get(index: number): TransactionWitnessSet; add(elem: TransactionWitnessSet): void; } export class TreasuryWithdrawals { private constructor(); free(): void; to_json(): string; to_js_value(): TreasuryWithdrawalsJSON; static from_json(json: string): TreasuryWithdrawals; static new(): TreasuryWithdrawals; get(key: RewardAddress): BigNum | undefined; insert(key: RewardAddress, value: BigNum): void; keys(): RewardAddresses; len(): number; } export class TreasuryWithdrawalsAction { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): TreasuryWithdrawalsAction; to_hex(): string; static from_hex(hex_str: string): TreasuryWithdrawalsAction; to_json(): string; to_js_value(): TreasuryWithdrawalsActionJSON; static from_json(json: string): TreasuryWithdrawalsAction; withdrawals(): TreasuryWithdrawals; policy_hash(): ScriptHash | undefined; static new(withdrawals: TreasuryWithdrawals): TreasuryWithdrawalsAction; static new_with_policy_hash(withdrawals: TreasuryWithdrawals, policy_hash: ScriptHash): TreasuryWithdrawalsAction; } export class TxInputsBuilder { private constructor(); free(): void; static new(): TxInputsBuilder; add_regular_utxo(utxo: TransactionUnspentOutput): void; add_plutus_script_utxo(utxo: TransactionUnspentOutput, witness: PlutusWitness): void; add_native_script_utxo(utxo: TransactionUnspentOutput, witness: NativeScriptSource): void; /** * We have to know what kind of inputs these are to know what kind of mock witnesses to create since * 1) mock witnesses have different lengths depending on the type which changes the expecting fee * 2) Witnesses are a set so we need to get rid of duplicates to avoid over-estimating the fee */ add_key_input(hash: Ed25519KeyHash, input: TransactionInput, amount: Value): void; /** * This method will add the input to the builder and also register the required native script witness */ add_native_script_input(script: NativeScriptSource, input: TransactionInput, amount: Value): void; /** * This method will add the input to the builder and also register the required plutus witness */ add_plutus_script_input(witness: PlutusWitness, input: TransactionInput, amount: Value): void; add_bootstrap_input(address: ByronAddress, input: TransactionInput, amount: Value): void; /** * Adds non script input, in case of script or reward address input it will return an error */ add_regular_input(address: Address, input: TransactionInput, amount: Value): void; get_ref_inputs(): TransactionInputs; /** * Returns a copy of the current script input witness scripts in the builder */ get_native_input_scripts(): NativeScripts | undefined; /** * Returns a copy of the current plutus input witness scripts in the builder. * NOTE: each plutus witness will be cloned with a specific corresponding input index */ get_plutus_input_scripts(): PlutusWitnesses | undefined; len(): number; add_required_signer(key: Ed25519KeyHash): void; add_required_signers(keys: Ed25519KeyHashes): void; total_value(): Value; inputs(): TransactionInputs; inputs_option(): TransactionInputs | undefined; } export class URL { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): URL; to_hex(): string; static from_hex(hex_str: string): URL; to_json(): string; to_js_value(): URLJSON; static from_json(json: string): URL; static new(url: string): URL; url(): string; } export class UnitInterval { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): UnitInterval; to_hex(): string; static from_hex(hex_str: string): UnitInterval; to_json(): string; to_js_value(): UnitIntervalJSON; static from_json(json: string): UnitInterval; numerator(): BigNum; denominator(): BigNum; static new(numerator: BigNum, denominator: BigNum): UnitInterval; } export class Update { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Update; to_hex(): string; static from_hex(hex_str: string): Update; to_json(): string; to_js_value(): UpdateJSON; static from_json(json: string): Update; proposed_protocol_parameter_updates(): ProposedProtocolParameterUpdates; epoch(): number; static new(proposed_protocol_parameter_updates: ProposedProtocolParameterUpdates, epoch: number): Update; } export class UpdateCommitteeAction { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): UpdateCommitteeAction; to_hex(): string; static from_hex(hex_str: string): UpdateCommitteeAction; to_json(): string; to_js_value(): UpdateCommitteeActionJSON; static from_json(json: string): UpdateCommitteeAction; gov_action_id(): GovernanceActionId | undefined; committee(): Committee; members_to_remove(): Credentials; static new(committee: Committee, members_to_remove: Credentials): UpdateCommitteeAction; static new_with_action_id(gov_action_id: GovernanceActionId, committee: Committee, members_to_remove: Credentials): UpdateCommitteeAction; } export class VRFCert { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): VRFCert; to_hex(): string; static from_hex(hex_str: string): VRFCert; to_json(): string; to_js_value(): VRFCertJSON; static from_json(json: string): VRFCert; output(): Uint8Array; proof(): Uint8Array; static new(output: Uint8Array, proof: Uint8Array): VRFCert; } export class VRFKeyHash { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): VRFKeyHash; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): VRFKeyHash; to_hex(): string; static from_hex(hex: string): VRFKeyHash; } export class VRFVKey { private constructor(); free(): void; static from_bytes(bytes: Uint8Array): VRFVKey; to_bytes(): Uint8Array; to_bech32(prefix: string): string; static from_bech32(bech_str: string): VRFVKey; to_hex(): string; static from_hex(hex: string): VRFVKey; } export class Value { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Value; to_hex(): string; static from_hex(hex_str: string): Value; to_json(): string; to_js_value(): ValueJSON; static from_json(json: string): Value; static new(coin: BigNum): Value; static new_from_assets(multiasset: MultiAsset): Value; static new_with_assets(coin: BigNum, multiasset: MultiAsset): Value; static zero(): Value; is_zero(): boolean; coin(): BigNum; set_coin(coin: BigNum): void; multiasset(): MultiAsset | undefined; set_multiasset(multiasset: MultiAsset): void; checked_add(rhs: Value): Value; checked_sub(rhs_value: Value): Value; clamped_sub(rhs_value: Value): Value; /** * note: values are only partially comparable */ compare(rhs_value: Value): number | undefined; } export class VersionedBlock { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): VersionedBlock; to_hex(): string; static from_hex(hex_str: string): VersionedBlock; to_json(): string; to_js_value(): VersionedBlockJSON; static from_json(json: string): VersionedBlock; static new(block: Block, era_code: number): VersionedBlock; block(): Block; era(): BlockEra; } export class Vkey { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Vkey; to_hex(): string; static from_hex(hex_str: string): Vkey; to_json(): string; to_js_value(): VkeyJSON; static from_json(json: string): Vkey; static new(pk: PublicKey): Vkey; public_key(): PublicKey; } export class Vkeys { private constructor(); free(): void; static new(): Vkeys; len(): number; get(index: number): Vkey; add(elem: Vkey): void; } export class Vkeywitness { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Vkeywitness; to_hex(): string; static from_hex(hex_str: string): Vkeywitness; to_json(): string; to_js_value(): VkeywitnessJSON; static from_json(json: string): Vkeywitness; static new(vkey: Vkey, signature: Ed25519Signature): Vkeywitness; vkey(): Vkey; signature(): Ed25519Signature; } export class Vkeywitnesses { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Vkeywitnesses; to_hex(): string; static from_hex(hex_str: string): Vkeywitnesses; to_json(): string; to_js_value(): VkeywitnessesJSON; static from_json(json: string): Vkeywitnesses; static new(): Vkeywitnesses; len(): number; get(index: number): Vkeywitness; /** * Add a new `Vkeywitness` to the set. * Returns `true` if the element was not already present in the set. */ add(witness: Vkeywitness): boolean; } export class VoteDelegation { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): VoteDelegation; to_hex(): string; static from_hex(hex_str: string): VoteDelegation; to_json(): string; to_js_value(): VoteDelegationJSON; static from_json(json: string): VoteDelegation; stake_credential(): Credential; drep(): DRep; static new(stake_credential: Credential, drep: DRep): VoteDelegation; has_script_credentials(): boolean; } export class VoteRegistrationAndDelegation { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): VoteRegistrationAndDelegation; to_hex(): string; static from_hex(hex_str: string): VoteRegistrationAndDelegation; to_json(): string; to_js_value(): VoteRegistrationAndDelegationJSON; static from_json(json: string): VoteRegistrationAndDelegation; stake_credential(): Credential; drep(): DRep; coin(): BigNum; static new(stake_credential: Credential, drep: DRep, coin: BigNum): VoteRegistrationAndDelegation; has_script_credentials(): boolean; } export class Voter { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Voter; to_hex(): string; static from_hex(hex_str: string): Voter; to_json(): string; to_js_value(): VoterJSON; static from_json(json: string): Voter; static new_constitutional_committee_hot_credential(cred: Credential): Voter; static new_drep_credential(cred: Credential): Voter; static new_stake_pool_key_hash(key_hash: Ed25519KeyHash): Voter; kind(): VoterKind; to_constitutional_committee_hot_credential(): Credential | undefined; to_drep_credential(): Credential | undefined; to_stake_pool_key_hash(): Ed25519KeyHash | undefined; has_script_credentials(): boolean; to_key_hash(): Ed25519KeyHash | undefined; } export class Voters { private constructor(); free(): void; to_json(): string; to_js_value(): VotersJSON; static from_json(json: string): Voters; static new(): Voters; add(voter: Voter): void; get(index: number): Voter | undefined; len(): number; } export class VotingBuilder { private constructor(); free(): void; static new(): VotingBuilder; add(voter: Voter, gov_action_id: GovernanceActionId, voting_procedure: VotingProcedure): void; add_with_plutus_witness(voter: Voter, gov_action_id: GovernanceActionId, voting_procedure: VotingProcedure, witness: PlutusWitness): void; add_with_native_script(voter: Voter, gov_action_id: GovernanceActionId, voting_procedure: VotingProcedure, native_script_source: NativeScriptSource): void; get_plutus_witnesses(): PlutusWitnesses; get_ref_inputs(): TransactionInputs; get_native_scripts(): NativeScripts; has_plutus_scripts(): boolean; build(): VotingProcedures; } export class VotingProcedure { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): VotingProcedure; to_hex(): string; static from_hex(hex_str: string): VotingProcedure; to_json(): string; to_js_value(): VotingProcedureJSON; static from_json(json: string): VotingProcedure; static new(vote: VoteKind): VotingProcedure; static new_with_anchor(vote: VoteKind, anchor: Anchor): VotingProcedure; vote_kind(): VoteKind; anchor(): Anchor | undefined; } export class VotingProcedures { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): VotingProcedures; to_hex(): string; static from_hex(hex_str: string): VotingProcedures; to_json(): string; to_js_value(): VotingProceduresJSON; static from_json(json: string): VotingProcedures; static new(): VotingProcedures; insert(voter: Voter, governance_action_id: GovernanceActionId, voting_procedure: VotingProcedure): void; get(voter: Voter, governance_action_id: GovernanceActionId): VotingProcedure | undefined; get_voters(): Voters; get_governance_action_ids_by_voter(voter: Voter): GovernanceActionIds; } export class VotingProposal { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): VotingProposal; to_hex(): string; static from_hex(hex_str: string): VotingProposal; to_json(): string; to_js_value(): VotingProposalJSON; static from_json(json: string): VotingProposal; governance_action(): GovernanceAction; anchor(): Anchor; reward_account(): RewardAddress; deposit(): BigNum; static new(governance_action: GovernanceAction, anchor: Anchor, reward_account: RewardAddress, deposit: BigNum): VotingProposal; } export class VotingProposalBuilder { private constructor(); free(): void; static new(): VotingProposalBuilder; add(proposal: VotingProposal): void; add_with_plutus_witness(proposal: VotingProposal, witness: PlutusWitness): void; get_plutus_witnesses(): PlutusWitnesses; get_ref_inputs(): TransactionInputs; has_plutus_scripts(): boolean; build(): VotingProposals; } export class VotingProposals { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): VotingProposals; to_hex(): string; static from_hex(hex_str: string): VotingProposals; to_json(): string; to_js_value(): VotingProposalsJSON; static from_json(json: string): VotingProposals; static new(): VotingProposals; len(): number; get(index: number): VotingProposal; /** * Add a new `VotingProposal` to the set. * Returns `true` if the element was not already present in the set. */ add(proposal: VotingProposal): boolean; contains(elem: VotingProposal): boolean; to_option(): VotingProposals | undefined; } export class Withdrawals { private constructor(); free(): void; to_bytes(): Uint8Array; static from_bytes(bytes: Uint8Array): Withdrawals; to_hex(): string; static from_hex(hex_str: string): Withdrawals; to_json(): string; to_js_value(): WithdrawalsJSON; static from_json(json: string): Withdrawals; static new(): Withdrawals; len(): number; insert(key: RewardAddress, value: BigNum): BigNum | undefined; get(key: RewardAddress): BigNum | undefined; keys(): RewardAddresses; } export class WithdrawalsBuilder { private constructor(); free(): void; static new(): WithdrawalsBuilder; add(address: RewardAddress, coin: BigNum): void; add_with_plutus_witness(address: RewardAddress, coin: BigNum, witness: PlutusWitness): void; add_with_native_script(address: RewardAddress, coin: BigNum, native_script_source: NativeScriptSource): void; get_plutus_witnesses(): PlutusWitnesses; get_ref_inputs(): TransactionInputs; get_native_scripts(): NativeScripts; get_total_withdrawals(): Value; has_plutus_scripts(): boolean; build(): Withdrawals; } export type AddressJSON = string; export type URLJSON = string; export interface AnchorJSON { anchor_data_hash: string; anchor_url: URLJSON; } export type AnchorDataHashJSON = string; export type AssetNameJSON = string; export type AssetNamesJSON = string[]; export interface AssetsJSON { [k: string]: string; } export type NativeScriptJSON = | { ScriptPubkey: ScriptPubkeyJSON; } | { ScriptAll: ScriptAllJSON; } | { ScriptAny: ScriptAnyJSON; } | { ScriptNOfK: ScriptNOfKJSON; } | { TimelockStart: TimelockStartJSON; } | { TimelockExpiry: TimelockExpiryJSON; }; export interface AuxiliaryDataJSON { metadata?: { [k: string]: string; } | null; native_scripts?: NativeScriptJSON[] | null; plutus_scripts?: string[] | null; prefer_alonzo_format: boolean; } export interface ScriptPubkeyJSON { addr_keyhash: string; } export interface ScriptAllJSON { native_scripts: NativeScriptJSON[]; } export interface ScriptAnyJSON { native_scripts: NativeScriptJSON[]; } export interface ScriptNOfKJSON { n: number; native_scripts: NativeScriptJSON[]; } export interface TimelockStartJSON { slot: string; } export interface TimelockExpiryJSON { slot: string; } export type AuxiliaryDataHashJSON = string; export interface AuxiliaryDataSetJSON { [k: string]: AuxiliaryDataJSON; } export type BigIntJSON = string; export type BigNumJSON = string; export type VkeyJSON = string; export type HeaderLeaderCertEnumJSON = | { /** * @minItems 2 * @maxItems 2 */ NonceAndLeader: [VRFCertJSON, VRFCertJSON]; } | { VrfResult: VRFCertJSON; }; export type CertificateJSON = | { StakeRegistration: StakeRegistrationJSON; } | { StakeDeregistration: StakeDeregistrationJSON; } | { StakeDelegation: StakeDelegationJSON; } | { PoolRegistration: PoolRegistrationJSON; } | { PoolRetirement: PoolRetirementJSON; } | { GenesisKeyDelegation: GenesisKeyDelegationJSON; } | { MoveInstantaneousRewardsCert: MoveInstantaneousRewardsCertJSON; } | { CommitteeHotAuth: CommitteeHotAuthJSON; } | { CommitteeColdResign: CommitteeColdResignJSON; } | { DRepDeregistration: DRepDeregistrationJSON; } | { DRepRegistration: DRepRegistrationJSON; } | { DRepUpdate: DRepUpdateJSON; } | { StakeAndVoteDelegation: StakeAndVoteDelegationJSON; } | { StakeRegistrationAndDelegation: StakeRegistrationAndDelegationJSON; } | { StakeVoteRegistrationAndDelegation: StakeVoteRegistrationAndDelegationJSON; } | { VoteDelegation: VoteDelegationJSON; } | { VoteRegistrationAndDelegation: VoteRegistrationAndDelegationJSON; }; export type CredTypeJSON = | { Script: string; } | { Key: string; }; export type RelayJSON = | { SingleHostAddr: SingleHostAddrJSON; } | { SingleHostName: SingleHostNameJSON; } | { MultiHostName: MultiHostNameJSON; }; /** * @minItems 4 * @maxItems 4 */ export type Ipv4JSON = [number, number, number, number]; /** * @minItems 16 * @maxItems 16 */ export type Ipv6JSON = [ number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number ]; export type DNSRecordAorAAAAJSON = string; export type DNSRecordSRVJSON = string; export type RelaysJSON = RelayJSON[]; export type MIRPotJSON = "Reserves" | "Treasury"; export type MIREnumJSON = | { ToOtherPot: string; } | { ToStakeCredentials: StakeToCoinJSON[]; }; export type DRepJSON = | ("AlwaysAbstain" | "AlwaysNoConfidence") | { KeyHash: string; } | { ScriptHash: string; }; export type DataOptionJSON = | { DataHash: string; } | { Data: string; }; export type ScriptRefJSON = | { NativeScript: NativeScriptJSON; } | { PlutusScript: string; }; export type MintJSON = [string, MintAssetsJSON][]; export type NetworkIdJSON = "Testnet" | "Mainnet"; export type TransactionOutputsJSON = TransactionOutputJSON[]; export type CostModelJSON = string[]; export type VoterJSON = | { ConstitutionalCommitteeHotCred: CredTypeJSON; } | { DRep: CredTypeJSON; } | { StakingPool: string; }; export type VoteKindJSON = "No" | "Yes" | "Abstain"; export type GovernanceActionJSON = | { ParameterChangeAction: ParameterChangeActionJSON; } | { HardForkInitiationAction: HardForkInitiationActionJSON; } | { TreasuryWithdrawalsAction: TreasuryWithdrawalsActionJSON; } | { NoConfidenceAction: NoConfidenceActionJSON; } | { UpdateCommitteeAction: UpdateCommitteeActionJSON; } | { NewConstitutionAction: NewConstitutionActionJSON; } | { InfoAction: InfoActionJSON; }; /** * @minItems 0 * @maxItems 0 */ export type InfoActionJSON = []; export type TransactionBodiesJSON = TransactionBodyJSON[]; export type RedeemerTagJSON = "Spend" | "Mint" | "Cert" | "Reward" | "Vote" | "VotingProposal"; export type TransactionWitnessSetsJSON = TransactionWitnessSetJSON[]; export interface BlockJSON { auxiliary_data_set: { [k: string]: AuxiliaryDataJSON; }; header: HeaderJSON; invalid_transactions: number[]; transaction_bodies: TransactionBodiesJSON; transaction_witness_sets: TransactionWitnessSetsJSON; } export interface HeaderJSON { body_signature: string; header_body: HeaderBodyJSON; } export interface HeaderBodyJSON { block_body_hash: string; block_body_size: number; block_number: number; issuer_vkey: VkeyJSON; leader_cert: HeaderLeaderCertEnumJSON; operational_cert: OperationalCertJSON; prev_hash?: string | null; protocol_version: ProtocolVersionJSON; slot: string; vrf_vkey: string; } export interface VRFCertJSON { output: number[]; proof: number[]; } export interface OperationalCertJSON { hot_vkey: string; kes_period: number; sequence_number: number; sigma: string; } export interface ProtocolVersionJSON { major: number; minor: number; } export interface TransactionBodyJSON { auxiliary_data_hash?: string | null; certs?: CertificateJSON[] | null; collateral?: TransactionInputJSON[] | null; collateral_return?: TransactionOutputJSON | null; current_treasury_value?: string | null; donation?: string | null; fee: string; inputs: TransactionInputJSON[]; mint?: MintJSON | null; network_id?: NetworkIdJSON | null; outputs: TransactionOutputsJSON; reference_inputs?: TransactionInputJSON[] | null; required_signers?: string[] | null; script_data_hash?: string | null; total_collateral?: string | null; ttl?: string | null; update?: UpdateJSON | null; validity_start_interval?: string | null; voting_procedures?: VoterVotesJSON[] | null; voting_proposals?: VotingProposalJSON[] | null; withdrawals?: { [k: string]: string; } | null; } export interface StakeRegistrationJSON { coin?: string | null; stake_credential: CredTypeJSON; } export interface StakeDeregistrationJSON { coin?: string | null; stake_credential: CredTypeJSON; } export interface StakeDelegationJSON { pool_keyhash: string; stake_credential: CredTypeJSON; } export interface PoolRegistrationJSON { pool_params: PoolParamsJSON; } export interface PoolParamsJSON { cost: string; margin: UnitIntervalJSON; operator: string; pledge: string; pool_metadata?: PoolMetadataJSON | null; pool_owners: string[]; relays: RelaysJSON; reward_account: string; vrf_keyhash: string; } export interface UnitIntervalJSON { denominator: string; numerator: string; } export interface PoolMetadataJSON { pool_metadata_hash: string; url: URLJSON; } export interface SingleHostAddrJSON { ipv4?: Ipv4JSON | null; ipv6?: Ipv6JSON | null; port?: number | null; } export interface SingleHostNameJSON { dns_name: DNSRecordAorAAAAJSON; port?: number | null; } export interface MultiHostNameJSON { dns_name: DNSRecordSRVJSON; } export interface PoolRetirementJSON { epoch: number; pool_keyhash: string; } export interface GenesisKeyDelegationJSON { genesis_delegate_hash: string; genesishash: string; vrf_keyhash: string; } export interface MoveInstantaneousRewardsCertJSON { move_instantaneous_reward: MoveInstantaneousRewardJSON; } export interface MoveInstantaneousRewardJSON { pot: MIRPotJSON; variant: MIREnumJSON; } export interface StakeToCoinJSON { amount: string; stake_cred: CredTypeJSON; } export interface CommitteeHotAuthJSON { committee_cold_credential: CredTypeJSON; committee_hot_credential: CredTypeJSON; } export interface CommitteeColdResignJSON { anchor?: AnchorJSON | null; committee_cold_credential: CredTypeJSON; } export interface DRepDeregistrationJSON { coin: string; voting_credential: CredTypeJSON; } export interface DRepRegistrationJSON { anchor?: AnchorJSON | null; coin: string; voting_credential: CredTypeJSON; } export interface DRepUpdateJSON { anchor?: AnchorJSON | null; voting_credential: CredTypeJSON; } export interface StakeAndVoteDelegationJSON { drep: DRepJSON; pool_keyhash: string; stake_credential: CredTypeJSON; } export interface StakeRegistrationAndDelegationJSON { coin: string; pool_keyhash: string; stake_credential: CredTypeJSON; } export interface StakeVoteRegistrationAndDelegationJSON { coin: string; drep: DRepJSON; pool_keyhash: string; stake_credential: CredTypeJSON; } export interface VoteDelegationJSON { drep: DRepJSON; stake_credential: CredTypeJSON; } export interface VoteRegistrationAndDelegationJSON { coin: string; drep: DRepJSON; stake_credential: CredTypeJSON; } export interface TransactionInputJSON { index: number; transaction_id: string; } export interface TransactionOutputJSON { address: string; amount: ValueJSON; plutus_data?: DataOptionJSON | null; script_ref?: ScriptRefJSON | null; } export interface ValueJSON { coin: string; multiasset?: MultiAssetJSON | null; } export interface MultiAssetJSON { [k: string]: AssetsJSON; } export interface MintAssetsJSON { [k: string]: string; } export interface UpdateJSON { epoch: number; proposed_protocol_parameter_updates: { [k: string]: ProtocolParamUpdateJSON; }; } export interface ProtocolParamUpdateJSON { ada_per_utxo_byte?: string | null; collateral_percentage?: number | null; committee_term_limit?: number | null; cost_models?: CostmdlsJSON | null; d?: UnitIntervalJSON | null; drep_deposit?: string | null; drep_inactivity_period?: number | null; drep_voting_thresholds?: DRepVotingThresholdsJSON | null; execution_costs?: ExUnitPricesJSON | null; expansion_rate?: UnitIntervalJSON | null; extra_entropy?: NonceJSON | null; governance_action_deposit?: string | null; governance_action_validity_period?: number | null; key_deposit?: string | null; max_block_body_size?: number | null; max_block_ex_units?: ExUnitsJSON | null; max_block_header_size?: number | null; max_collateral_inputs?: number | null; max_epoch?: number | null; max_tx_ex_units?: ExUnitsJSON | null; max_tx_size?: number | null; max_value_size?: number | null; min_committee_size?: number | null; min_pool_cost?: string | null; minfee_a?: string | null; minfee_b?: string | null; n_opt?: number | null; pool_deposit?: string | null; pool_pledge_influence?: UnitIntervalJSON | null; pool_voting_thresholds?: PoolVotingThresholdsJSON | null; protocol_version?: ProtocolVersionJSON | null; ref_script_coins_per_byte?: UnitIntervalJSON | null; treasury_growth_rate?: UnitIntervalJSON | null; } export interface CostmdlsJSON { [k: string]: CostModelJSON; } export interface DRepVotingThresholdsJSON { committee_no_confidence: UnitIntervalJSON; committee_normal: UnitIntervalJSON; hard_fork_initiation: UnitIntervalJSON; motion_no_confidence: UnitIntervalJSON; pp_economic_group: UnitIntervalJSON; pp_governance_group: UnitIntervalJSON; pp_network_group: UnitIntervalJSON; pp_technical_group: UnitIntervalJSON; treasury_withdrawal: UnitIntervalJSON; update_constitution: UnitIntervalJSON; } export interface ExUnitPricesJSON { mem_price: UnitIntervalJSON; step_price: UnitIntervalJSON; } export interface NonceJSON { /** * @minItems 32 * @maxItems 32 */ hash?: | [ number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number ] | null; } export interface ExUnitsJSON { mem: string; steps: string; } export interface PoolVotingThresholdsJSON { committee_no_confidence: UnitIntervalJSON; committee_normal: UnitIntervalJSON; hard_fork_initiation: UnitIntervalJSON; motion_no_confidence: UnitIntervalJSON; security_relevant_threshold: UnitIntervalJSON; } export interface VoterVotesJSON { voter: VoterJSON; votes: VoteJSON[]; } export interface VoteJSON { action_id: GovernanceActionIdJSON; voting_procedure: VotingProcedureJSON; } export interface GovernanceActionIdJSON { index: number; transaction_id: string; } export interface VotingProcedureJSON { anchor?: AnchorJSON | null; vote: VoteKindJSON; } export interface VotingProposalJSON { anchor: AnchorJSON; deposit: string; governance_action: GovernanceActionJSON; reward_account: string; } export interface ParameterChangeActionJSON { gov_action_id?: GovernanceActionIdJSON | null; policy_hash?: string | null; protocol_param_updates: ProtocolParamUpdateJSON; } export interface HardForkInitiationActionJSON { gov_action_id?: GovernanceActionIdJSON | null; protocol_version: ProtocolVersionJSON; } export interface TreasuryWithdrawalsActionJSON { policy_hash?: string | null; withdrawals: TreasuryWithdrawalsJSON; } export interface TreasuryWithdrawalsJSON { [k: string]: string; } export interface NoConfidenceActionJSON { gov_action_id?: GovernanceActionIdJSON | null; } export interface UpdateCommitteeActionJSON { committee: CommitteeJSON; gov_action_id?: GovernanceActionIdJSON | null; members_to_remove: CredTypeJSON[]; } export interface CommitteeJSON { members: CommitteeMemberJSON[]; quorum_threshold: UnitIntervalJSON; } export interface CommitteeMemberJSON { stake_credential: CredTypeJSON; term_limit: number; } export interface NewConstitutionActionJSON { constitution: ConstitutionJSON; gov_action_id?: GovernanceActionIdJSON | null; } export interface ConstitutionJSON { anchor: AnchorJSON; script_hash?: string | null; } export interface TransactionWitnessSetJSON { bootstraps?: BootstrapWitnessJSON[] | null; native_scripts?: NativeScriptJSON[] | null; plutus_data?: PlutusListJSON | null; plutus_scripts?: string[] | null; redeemers?: RedeemerJSON[] | null; vkeys?: VkeywitnessJSON[] | null; } export interface BootstrapWitnessJSON { attributes: number[]; chain_code: number[]; signature: string; vkey: VkeyJSON; } export interface PlutusListJSON { definite_encoding?: boolean | null; elems: string[]; } export interface RedeemerJSON { data: string; ex_units: ExUnitsJSON; index: string; tag: RedeemerTagJSON; } export interface VkeywitnessJSON { signature: string; vkey: VkeyJSON; } export type BlockHashJSON = string; export type BootstrapWitnessesJSON = BootstrapWitnessJSON[]; export type CertificateEnumJSON = | { StakeRegistration: StakeRegistrationJSON; } | { StakeDeregistration: StakeDeregistrationJSON; } | { StakeDelegation: StakeDelegationJSON; } | { PoolRegistration: PoolRegistrationJSON; } | { PoolRetirement: PoolRetirementJSON; } | { GenesisKeyDelegation: GenesisKeyDelegationJSON; } | { MoveInstantaneousRewardsCert: MoveInstantaneousRewardsCertJSON; } | { CommitteeHotAuth: CommitteeHotAuthJSON; } | { CommitteeColdResign: CommitteeColdResignJSON; } | { DRepDeregistration: DRepDeregistrationJSON; } | { DRepRegistration: DRepRegistrationJSON; } | { DRepUpdate: DRepUpdateJSON; } | { StakeAndVoteDelegation: StakeAndVoteDelegationJSON; } | { StakeRegistrationAndDelegation: StakeRegistrationAndDelegationJSON; } | { StakeVoteRegistrationAndDelegation: StakeVoteRegistrationAndDelegationJSON; } | { VoteDelegation: VoteDelegationJSON; } | { VoteRegistrationAndDelegation: VoteRegistrationAndDelegationJSON; }; export type CertificatesJSON = CertificateJSON[]; export type CredentialJSON = CredTypeJSON; export type CredentialsJSON = CredTypeJSON[]; export type DRepEnumJSON = | ("AlwaysAbstain" | "AlwaysNoConfidence") | { KeyHash: string; } | { ScriptHash: string; }; export type DataHashJSON = string; export type Ed25519KeyHashJSON = string; export type Ed25519KeyHashesJSON = string[]; export type Ed25519SignatureJSON = string; export interface GeneralTransactionMetadataJSON { [k: string]: string; } export type GenesisDelegateHashJSON = string; export type GenesisHashJSON = string; export type GenesisHashesJSON = string[]; export type GovernanceActionEnumJSON = | { ParameterChangeAction: ParameterChangeActionJSON; } | { HardForkInitiationAction: HardForkInitiationActionJSON; } | { TreasuryWithdrawalsAction: TreasuryWithdrawalsActionJSON; } | { NoConfidenceAction: NoConfidenceActionJSON; } | { UpdateCommitteeAction: UpdateCommitteeActionJSON; } | { NewConstitutionAction: NewConstitutionActionJSON; } | { InfoAction: InfoActionJSON; }; export type GovernanceActionIdsJSON = GovernanceActionIdJSON[]; export type IntJSON = string; /** * @minItems 4 * @maxItems 4 */ export type KESVKeyJSON = string; export type LanguageJSON = LanguageKindJSON; export type LanguageKindJSON = "PlutusV1" | "PlutusV2" | "PlutusV3"; export type LanguagesJSON = LanguageJSON[]; export type MIRToStakeCredentialsJSON = StakeToCoinJSON[]; export type MintsAssetsJSON = MintAssetsJSON[]; export type NativeScriptsJSON = NativeScriptJSON[]; export type NetworkIdKindJSON = "Testnet" | "Mainnet"; export type PlutusScriptJSON = string; export type PlutusScriptsJSON = string[]; export type PoolMetadataHashJSON = string; export interface ProposedProtocolParameterUpdatesJSON { [k: string]: ProtocolParamUpdateJSON; } export type PublicKeyJSON = string; export type RedeemerTagKindJSON = "Spend" | "Mint" | "Cert" | "Reward" | "Vote" | "VotingProposal"; export type RedeemersJSON = RedeemerJSON[]; export type RelayEnumJSON = | { SingleHostAddr: SingleHostAddrJSON; } | { SingleHostName: SingleHostNameJSON; } | { MultiHostName: MultiHostNameJSON; }; /** * @minItems 4 * @maxItems 4 */ export type RewardAddressJSON = string; export type RewardAddressesJSON = string[]; export type ScriptDataHashJSON = string; export type ScriptHashJSON = string; export type ScriptHashesJSON = string[]; export type ScriptRefEnumJSON = | { NativeScript: NativeScriptJSON; } | { PlutusScript: string; }; export interface TransactionJSON { auxiliary_data?: AuxiliaryDataJSON | null; body: TransactionBodyJSON; is_valid: boolean; witness_set: TransactionWitnessSetJSON; } export type TransactionHashJSON = string; export type TransactionInputsJSON = TransactionInputJSON[]; export type TransactionMetadatumJSON = string; export interface TransactionUnspentOutputJSON { input: TransactionInputJSON; output: TransactionOutputJSON; } export type TransactionUnspentOutputsJSON = TransactionUnspentOutputJSON[]; export type VRFKeyHashJSON = string; export type VRFVKeyJSON = string; export interface VersionedBlockJSON { block: BlockJSON; era_code: number; } export type VkeywitnessesJSON = VkeywitnessJSON[]; export type VoterEnumJSON = | { ConstitutionalCommitteeHotCred: CredTypeJSON; } | { DRep: CredTypeJSON; } | { StakingPool: string; }; export type VotersJSON = VoterJSON[]; export type VotingProceduresJSON = VoterVotesJSON[]; export type VotingProposalsJSON = VotingProposalJSON[]; export interface WithdrawalsJSON { [k: string]: string; }