/**
 * Flowtype definitions for cardano_serialization_lib
 * Generated by Flowgen from a Typescript Definition
 * Flowgen v1.21.0
 * @flow
 */

declare export function min_fee(tx: Transaction, linear_fee: LinearFee): BigNum;
declare export function calculate_ex_units_ceil_cost(
  ex_units: ExUnits,
  ex_unit_prices: ExUnitPrices
): BigNum;
declare export function min_script_fee(
  tx: Transaction,
  ex_unit_prices: ExUnitPrices
): BigNum;
declare export function min_ref_script_fee(
  total_ref_scripts_size: number,
  ref_script_coins_per_byte: UnitInterval
): BigNum;
declare export function create_send_all(
  address: Address,
  utxos: TransactionUnspentOutputs,
  config: TransactionBuilderConfig
): TransactionBatchList;
declare export function make_daedalus_bootstrap_witness(
  tx_body_hash: TransactionHash,
  addr: ByronAddress,
  key: LegacyDaedalusPrivateKey
): BootstrapWitness;
declare export function make_icarus_bootstrap_witness(
  tx_body_hash: TransactionHash,
  addr: ByronAddress,
  key: Bip32PrivateKey
): BootstrapWitness;
declare export function make_vkey_witness(
  tx_body_hash: TransactionHash,
  sk: PrivateKey
): Vkeywitness;
declare export function hash_auxiliary_data(
  auxiliary_data: AuxiliaryData
): AuxiliaryDataHash;
declare export function hash_plutus_data(plutus_data: PlutusData): DataHash;
declare export function hash_script_data(
  redeemers: Redeemers,
  cost_models: Costmdls,
  datums?: PlutusList | null
): ScriptDataHash;
declare export function get_implicit_input(
  txbody: TransactionBody,
  pool_deposit: BigNum,
  key_deposit: BigNum
): Value;
declare 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
 */
declare 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
 */
declare export function encode_json_str_to_native_script(
  json: string,
  self_xpub: string,
  schema: $Values<typeof 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
 */
declare export function has_transaction_set_tag(
  tx_bytes: Uint8Array
): $Values<typeof TransactionSetsState>;
declare export function encrypt_with_password(
  password: string,
  salt: string,
  nonce: string,
  data: string
): string;
declare export function decrypt_with_password(
  password: string,
  data: string
): string;
declare export function encode_json_str_to_plutus_datum(
  json: string,
  schema: $Values<typeof PlutusDatumSchema>
): PlutusData;
declare export function decode_plutus_datum_to_json_str(
  datum: PlutusData,
  schema: $Values<typeof PlutusDatumSchema>
): string;
declare export function encode_arbitrary_bytes_as_metadatum(
  bytes: Uint8Array
): TransactionMetadatum;
declare export function decode_arbitrary_bytes_from_metadatum(
  metadata: TransactionMetadatum
): Uint8Array;
declare export function encode_json_str_to_metadatum(
  json: string,
  schema: $Values<typeof MetadataJsonSchema>
): TransactionMetadatum;
declare export function decode_metadatum_to_json_str(
  metadatum: TransactionMetadatum,
  schema: $Values<typeof MetadataJsonSchema>
): string;

declare export var AddressKind: {|
  +Base: 0, // 0
  +Pointer: 1, // 1
  +Enterprise: 2, // 2
  +Reward: 3, // 3
  +Byron: 4, // 4
  +Malformed: 5, // 5
|};

declare export var BlockEra: {|
  +Byron: 0, // 0
  +Shelley: 1, // 1
  +Allegra: 2, // 2
  +Mary: 3, // 3
  +Alonzo: 4, // 4
  +Babbage: 5, // 5
  +Conway: 6, // 6
  +Unknown: 7, // 7
|};

declare export var ByronAddressType: {|
  +ATPubKey: 0, // 0
  +ATScript: 1, // 1
  +ATRedeem: 2, // 2
|};

declare export var CborContainerType: {|
  +Array: 0, // 0
  +Map: 1, // 1
|};

declare export var CborSetType: {|
  +Tagged: 0, // 0
  +Untagged: 1, // 1
|};

declare export var CertificateKind: {|
  +StakeRegistration: 0, // 0
  +StakeDeregistration: 1, // 1
  +StakeDelegation: 2, // 2
  +PoolRegistration: 3, // 3
  +PoolRetirement: 4, // 4
  +GenesisKeyDelegation: 5, // 5
  +MoveInstantaneousRewardsCert: 6, // 6
  +CommitteeHotAuth: 7, // 7
  +CommitteeColdResign: 8, // 8
  +DRepDeregistration: 9, // 9
  +DRepRegistration: 10, // 10
  +DRepUpdate: 11, // 11
  +StakeAndVoteDelegation: 12, // 12
  +StakeRegistrationAndDelegation: 13, // 13
  +StakeVoteRegistrationAndDelegation: 14, // 14
  +VoteDelegation: 15, // 15
  +VoteRegistrationAndDelegation: 16, // 16
|};

declare export var CoinSelectionStrategyCIP2: {|
  +LargestFirst: 0, // 0
  +RandomImprove: 1, // 1
  +LargestFirstMultiAsset: 2, // 2
  +RandomImproveMultiAsset: 3, // 3
|};

declare export var CredKind: {|
  +Key: 0, // 0
  +Script: 1, // 1
|};

declare export var DRepKind: {|
  +KeyHash: 0, // 0
  +ScriptHash: 1, // 1
  +AlwaysAbstain: 2, // 2
  +AlwaysNoConfidence: 3, // 3
|};

declare export var GovernanceActionKind: {|
  +ParameterChangeAction: 0, // 0
  +HardForkInitiationAction: 1, // 1
  +TreasuryWithdrawalsAction: 2, // 2
  +NoConfidenceAction: 3, // 3
  +UpdateCommitteeAction: 4, // 4
  +NewConstitutionAction: 5, // 5
  +InfoAction: 6, // 6
|};

declare export var LanguageKind: {|
  +PlutusV1: 0, // 0
  +PlutusV2: 1, // 1
  +PlutusV3: 2, // 2
|};

declare export var MIRKind: {|
  +ToOtherPot: 0, // 0
  +ToStakeCredentials: 1, // 1
|};

declare export var MIRPot: {|
  +Reserves: 0, // 0
  +Treasury: 1, // 1
|};

declare export var MetadataJsonSchema: {|
  +NoConversions: 0, // 0
  +BasicConversions: 1, // 1
  +DetailedSchema: 2, // 2
|};

declare export var NativeScriptKind: {|
  +ScriptPubkey: 0, // 0
  +ScriptAll: 1, // 1
  +ScriptAny: 2, // 2
  +ScriptNOfK: 3, // 3
  +TimelockStart: 4, // 4
  +TimelockExpiry: 5, // 5
|};

declare export var NetworkIdKind: {|
  +Testnet: 0, // 0
  +Mainnet: 1, // 1
|};

declare export var PlutusDataKind: {|
  +ConstrPlutusData: 0, // 0
  +Map: 1, // 1
  +List: 2, // 2
  +Integer: 3, // 3
  +Bytes: 4, // 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
 */

declare export var PlutusDatumSchema: {|
  +BasicConversions: 0, // 0
  +DetailedSchema: 1, // 1
|};

declare export var RedeemerTagKind: {|
  +Spend: 0, // 0
  +Mint: 1, // 1
  +Cert: 2, // 2
  +Reward: 3, // 3
  +Vote: 4, // 4
  +VotingProposal: 5, // 5
|};

declare export var RelayKind: {|
  +SingleHostAddr: 0, // 0
  +SingleHostName: 1, // 1
  +MultiHostName: 2, // 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
 */

declare export var ScriptHashNamespace: {|
  +NativeScript: 0, // 0
  +PlutusScript: 1, // 1
  +PlutusScriptV2: 2, // 2
  +PlutusScriptV3: 3, // 3
|};

/**
 * Used to choosed the schema for a script JSON string
 */

declare export var ScriptSchema: {|
  +Wallet: 0, // 0
  +Node: 1, // 1
|};

declare export var TransactionMetadatumKind: {|
  +MetadataMap: 0, // 0
  +MetadataList: 1, // 1
  +Int: 2, // 2
  +Bytes: 3, // 3
  +Text: 4, // 4
|};

declare export var TransactionSetsState: {|
  +AllSetsHaveTag: 0, // 0
  +AllSetsHaveNoTag: 1, // 1
  +MixedSets: 2, // 2
|};

declare export var VoteKind: {|
  +No: 0, // 0
  +Yes: 1, // 1
  +Abstain: 2, // 2
|};

declare export var VoterKind: {|
  +ConstitutionalCommitteeHotKeyHash: 0, // 0
  +ConstitutionalCommitteeHotScriptHash: 1, // 1
  +DRepKeyHash: 2, // 2
  +DRepScriptHash: 3, // 3
  +StakingPoolKeyHash: 4, // 4
|};
declare export class Address {
  constructor(): this;
  free(): void;
  static from_bytes(data: Uint8Array): Address;
  to_json(): string;
  to_js_value(): AddressJSON;
  static from_json(json: string): Address;
  kind(): $Values<typeof AddressKind>;
  payment_cred(): Credential | void;
  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;
}
declare export class Anchor {
  constructor(): this;
  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;
}
declare export class AnchorDataHash {
  constructor(): this;
  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;
}
declare export class AssetName {
  constructor(): this;
  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;
}
declare export class AssetNames {
  constructor(): this;
  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;
}
declare export class Assets {
  constructor(): this;
  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 | void;
  get(key: AssetName): BigNum | void;
  keys(): AssetNames;
}
declare export class AuxiliaryData {
  constructor(): this;
  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 | void;
  set_metadata(metadata: GeneralTransactionMetadata): void;
  native_scripts(): NativeScripts | void;
  set_native_scripts(native_scripts: NativeScripts): void;
  plutus_scripts(): PlutusScripts | void;
  set_plutus_scripts(plutus_scripts: PlutusScripts): void;
  prefer_alonzo_format(): boolean;
  set_prefer_alonzo_format(prefer: boolean): void;
}
declare export class AuxiliaryDataHash {
  constructor(): this;
  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;
}
declare export class AuxiliaryDataSet {
  constructor(): this;
  free(): void;
  static new(): AuxiliaryDataSet;
  len(): number;
  insert(tx_index: number, data: AuxiliaryData): AuxiliaryData | void;
  get(tx_index: number): AuxiliaryData | void;
  indices(): Uint32Array;
}
declare export class BaseAddress {
  constructor(): this;
  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 | void;
  network_id(): number;
}
declare export class BigInt {
  constructor(): this;
  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 | void;
  as_int(): Int | void;
  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;
}
declare export class BigNum {
  constructor(): this;
  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;
}
declare export class Bip32PrivateKey {
  constructor(): this;
  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;
}
declare export class Bip32PublicKey {
  constructor(): this;
  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;
}
declare export class Block {
  constructor(): this;
  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;
}
declare export class BlockHash {
  constructor(): this;
  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;
}
declare export class BootstrapWitness {
  constructor(): this;
  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;
}
declare export class BootstrapWitnesses {
  constructor(): this;
  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;
}
declare export class ByronAddress {
  constructor(): this;
  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(): $Values<typeof 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 | void;
}
declare export class Certificate {
  constructor(): this;
  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(): $Values<typeof CertificateKind>;
  as_stake_registration(): StakeRegistration | void;

  /**
   * 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 | void;
  as_stake_deregistration(): StakeDeregistration | void;

  /**
   * 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 | void;
  as_stake_delegation(): StakeDelegation | void;
  as_pool_registration(): PoolRegistration | void;
  as_pool_retirement(): PoolRetirement | void;
  as_genesis_key_delegation(): GenesisKeyDelegation | void;
  as_move_instantaneous_rewards_cert(): MoveInstantaneousRewardsCert | void;
  as_committee_hot_auth(): CommitteeHotAuth | void;
  as_committee_cold_resign(): CommitteeColdResign | void;
  as_drep_deregistration(): DRepDeregistration | void;
  as_drep_registration(): DRepRegistration | void;
  as_drep_update(): DRepUpdate | void;
  as_stake_and_vote_delegation(): StakeAndVoteDelegation | void;
  as_stake_registration_and_delegation(): StakeRegistrationAndDelegation | void;
  as_stake_vote_registration_and_delegation(): StakeVoteRegistrationAndDelegation | void;
  as_vote_delegation(): VoteDelegation | void;
  as_vote_registration_and_delegation(): VoteRegistrationAndDelegation | void;
  has_required_script_witness(): boolean;
}
declare export class Certificates {
  constructor(): this;
  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;
}
declare export class CertificatesBuilder {
  constructor(): this;
  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;
}
declare export class ChangeConfig {
  constructor(): this;
  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;
}
declare export class Committee {
  constructor(): this;
  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 | void;
}
declare export class CommitteeColdResign {
  constructor(): this;
  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 | void;
  static new(committee_cold_credential: Credential): CommitteeColdResign;
  static new_with_anchor(
    committee_cold_credential: Credential,
    anchor: Anchor
  ): CommitteeColdResign;
  has_script_credentials(): boolean;
}
declare export class CommitteeHotAuth {
  constructor(): this;
  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;
}
declare export class Constitution {
  constructor(): this;
  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 | void;
  static new(anchor: Anchor): Constitution;
  static new_with_script_hash(
    anchor: Anchor,
    script_hash: ScriptHash
  ): Constitution;
}
declare export class ConstrPlutusData {
  constructor(): this;
  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;
}
declare export class CostModel {
  constructor(): this;
  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;
}
declare export class Costmdls {
  constructor(): this;
  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 | void;
  get(key: Language): CostModel | void;
  keys(): Languages;
  retain_language_versions(languages: Languages): Costmdls;
}
declare export class Credential {
  constructor(): this;
  free(): void;
  static from_keyhash(hash: Ed25519KeyHash): Credential;
  static from_scripthash(hash: ScriptHash): Credential;
  to_keyhash(): Ed25519KeyHash | void;
  to_scripthash(): ScriptHash | void;
  kind(): $Values<typeof 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;
}
declare export class Credentials {
  constructor(): this;
  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;
}
declare export class DNSRecordAorAAAA {
  constructor(): this;
  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;
}
declare export class DNSRecordSRV {
  constructor(): this;
  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;
}
declare export class DRep {
  constructor(): this;
  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(): $Values<typeof DRepKind>;
  to_key_hash(): Ed25519KeyHash | void;
  to_script_hash(): ScriptHash | void;
  to_bech32(cip_129_format: boolean): string;
  static from_bech32(bech32_str: string): DRep;
}
declare export class DRepDeregistration {
  constructor(): this;
  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;
}
declare export class DRepRegistration {
  constructor(): this;
  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 | void;
  static new(voting_credential: Credential, coin: BigNum): DRepRegistration;
  static new_with_anchor(
    voting_credential: Credential,
    coin: BigNum,
    anchor: Anchor
  ): DRepRegistration;
  has_script_credentials(): boolean;
}
declare export class DRepUpdate {
  constructor(): this;
  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 | void;
  static new(voting_credential: Credential): DRepUpdate;
  static new_with_anchor(
    voting_credential: Credential,
    anchor: Anchor
  ): DRepUpdate;
  has_script_credentials(): boolean;
}
declare export class DRepVotingThresholds {
  constructor(): this;
  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;
}
declare export class DataCost {
  constructor(): this;
  free(): void;
  static new_coins_per_byte(coins_per_byte: BigNum): DataCost;
  coins_per_byte(): BigNum;
}
declare export class DataHash {
  constructor(): this;
  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;
}
declare export class DatumSource {
  constructor(): this;
  free(): void;
  static new(datum: PlutusData): DatumSource;
  static new_ref_input(input: TransactionInput): DatumSource;
}
declare export class Ed25519KeyHash {
  constructor(): this;
  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;
}
declare export class Ed25519KeyHashes {
  constructor(): this;
  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 | void;
}
declare export class Ed25519Signature {
  constructor(): this;
  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;
}
declare export class EnterpriseAddress {
  constructor(): this;
  free(): void;
  static new(network: number, payment: Credential): EnterpriseAddress;
  payment_cred(): Credential;
  to_address(): Address;
  static from_address(addr: Address): EnterpriseAddress | void;
  network_id(): number;
}
declare export class ExUnitPrices {
  constructor(): this;
  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;
}
declare export class ExUnits {
  constructor(): this;
  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.
 */
declare export class FixedBlock {
  constructor(): this;
  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;
}
declare export class FixedTransaction {
  constructor(): this;
  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 | void;
  raw_auxiliary_data(): Uint8Array | void;
  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.
 */
declare export class FixedTransactionBodies {
  constructor(): this;
  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.
 */
declare export class FixedTransactionBody {
  constructor(): this;
  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.
 */
declare export class FixedTxWitnessesSet {
  constructor(): this;
  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.
 */
declare export class FixedVersionedBlock {
  constructor(): this;
  free(): void;
  static from_bytes(bytes: Uint8Array): FixedVersionedBlock;
  static from_hex(hex_str: string): FixedVersionedBlock;
  block(): FixedBlock;
  era(): $Values<typeof BlockEra>;
}
declare export class GeneralTransactionMetadata {
  constructor(): this;
  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 | void;
  get(key: BigNum): TransactionMetadatum | void;
  keys(): TransactionMetadatumLabels;
}
declare export class GenesisDelegateHash {
  constructor(): this;
  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;
}
declare export class GenesisHash {
  constructor(): this;
  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;
}
declare export class GenesisHashes {
  constructor(): this;
  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;
}
declare export class GenesisKeyDelegation {
  constructor(): this;
  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;
}
declare export class GovernanceAction {
  constructor(): this;
  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(): $Values<typeof GovernanceActionKind>;
  as_parameter_change_action(): ParameterChangeAction | void;
  as_hard_fork_initiation_action(): HardForkInitiationAction | void;
  as_treasury_withdrawals_action(): TreasuryWithdrawalsAction | void;
  as_no_confidence_action(): NoConfidenceAction | void;
  as_new_committee_action(): UpdateCommitteeAction | void;
  as_new_constitution_action(): NewConstitutionAction | void;
  as_info_action(): InfoAction | void;
}
declare export class GovernanceActionId {
  constructor(): this;
  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;
}
declare export class GovernanceActionIds {
  constructor(): this;
  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 | void;
  len(): number;
}
declare export class HardForkInitiationAction {
  constructor(): this;
  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 | void;
  protocol_version(): ProtocolVersion;
  static new(protocol_version: ProtocolVersion): HardForkInitiationAction;
  static new_with_action_id(
    gov_action_id: GovernanceActionId,
    protocol_version: ProtocolVersion
  ): HardForkInitiationAction;
}
declare export class Header {
  constructor(): this;
  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;
}
declare export class HeaderBody {
  constructor(): this;
  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 | void;
  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 | void;

  /**
   * Might return nothing in case `.has_nonce_and_leader_vrf` returns false
   */
  leader_vrf_or_nothing(): VRFCert | void;

  /**
   * 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 | void;
  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 | void,
    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 | void,
    issuer_vkey: Vkey,
    vrf_vkey: VRFVKey,
    vrf_result: VRFCert,
    block_body_size: number,
    block_body_hash: BlockHash,
    operational_cert: OperationalCert,
    protocol_version: ProtocolVersion
  ): HeaderBody;
}
declare export class InfoAction {
  constructor(): this;
  free(): void;
  static new(): InfoAction;
}
declare export class Int {
  constructor(): this;
  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 | void;

  /**
   * 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 | void;

  /**
   * !!! 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 | void;

  /**
   * Returns the underlying value converted to i32 if possible (within limits)
   * Otherwise will just return an empty value (undefined).
   */
  as_i32_or_nothing(): number | void;

  /**
   * 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;
}
declare export class Ipv4 {
  constructor(): this;
  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;
}
declare export class Ipv6 {
  constructor(): this;
  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;
}
declare export class KESSignature {
  constructor(): this;
  free(): void;
  to_bytes(): Uint8Array;
  static from_bytes(bytes: Uint8Array): KESSignature;
}
declare export class KESVKey {
  constructor(): this;
  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;
}
declare export class Language {
  constructor(): this;
  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(): $Values<typeof LanguageKind>;
}
declare export class Languages {
  constructor(): this;
  free(): void;
  static new(): Languages;
  len(): number;
  get(index: number): Language;
  add(elem: Language): void;
  static list(): Languages;
}
declare export class LegacyDaedalusPrivateKey {
  constructor(): this;
  free(): void;
  static from_bytes(bytes: Uint8Array): LegacyDaedalusPrivateKey;
  as_bytes(): Uint8Array;
  chaincode(): Uint8Array;
}
declare export class LinearFee {
  constructor(): this;
  free(): void;
  constant(): BigNum;
  coefficient(): BigNum;
  static new(coefficient: BigNum, constant: BigNum): LinearFee;
}
declare export class MIRToStakeCredentials {
  constructor(): this;
  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 | void;
  get(cred: Credential): Int | void;
  keys(): Credentials;
}
declare export class MalformedAddress {
  constructor(): this;
  free(): void;
  original_bytes(): Uint8Array;
  to_address(): Address;
  static from_address(addr: Address): MalformedAddress | void;
}
declare export class MetadataList {
  constructor(): this;
  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;
}
declare export class MetadataMap {
  constructor(): this;
  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 | void;
  insert_str(
    key: string,
    value: TransactionMetadatum
  ): TransactionMetadatum | void;
  insert_i32(
    key: number,
    value: TransactionMetadatum
  ): TransactionMetadatum | void;
  get(key: TransactionMetadatum): TransactionMetadatum;
  get_str(key: string): TransactionMetadatum;
  get_i32(key: number): TransactionMetadatum;
  has(key: TransactionMetadatum): boolean;
  keys(): MetadataList;
}
declare export class Mint {
  constructor(): this;
  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 | void;
  get(key: ScriptHash): MintsAssets | void;
  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;
}
declare export class MintAssets {
  constructor(): this;
  free(): void;
  static new(): MintAssets;
  static new_from_entry(key: AssetName, value: Int): MintAssets;
  len(): number;
  insert(key: AssetName, value: Int): Int | void;
  get(key: AssetName): Int | void;
  keys(): AssetNames;
}
declare export class MintBuilder {
  constructor(): this;
  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;
}
declare export class MintWitness {
  constructor(): this;
  free(): void;
  static new_native_script(native_script: NativeScriptSource): MintWitness;
  static new_plutus_script(
    plutus_script: PlutusScriptSource,
    redeemer: Redeemer
  ): MintWitness;
}
declare export class MintsAssets {
  constructor(): this;
  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 | void;
  len(): number;
}
declare export class MoveInstantaneousReward {
  constructor(): this;
  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: $Values<typeof MIRPot>,
    amount: BigNum
  ): MoveInstantaneousReward;
  static new_to_stake_creds(
    pot: $Values<typeof MIRPot>,
    amounts: MIRToStakeCredentials
  ): MoveInstantaneousReward;
  pot(): $Values<typeof MIRPot>;
  kind(): $Values<typeof MIRKind>;
  as_to_other_pot(): BigNum | void;
  as_to_stake_creds(): MIRToStakeCredentials | void;
}
declare export class MoveInstantaneousRewardsCert {
  constructor(): this;
  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;
}
declare export class MultiAsset {
  constructor(): this;
  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 | void;

  /**
   * all assets under {policy_id}, if any exist, or else None (undefined in JS)
   */
  get(policy_id: ScriptHash): Assets | void;

  /**
   * 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 | void;

  /**
   * 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;
}
declare export class MultiHostName {
  constructor(): this;
  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;
}
declare export class NativeScript {
  constructor(): this;
  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(): $Values<typeof NativeScriptKind>;
  as_script_pubkey(): ScriptPubkey | void;
  as_script_all(): ScriptAll | void;
  as_script_any(): ScriptAny | void;
  as_script_n_of_k(): ScriptNOfK | void;
  as_timelock_start(): TimelockStart | void;
  as_timelock_expiry(): TimelockExpiry | void;

  /**
   * 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;
}
declare export class NativeScriptSource {
  constructor(): this;
  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 | void;
}
declare export class NativeScripts {
  constructor(): this;
  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;
}
declare export class NetworkId {
  constructor(): this;
  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(): $Values<typeof NetworkIdKind>;
}
declare export class NetworkInfo {
  constructor(): this;
  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;
}
declare export class NewConstitutionAction {
  constructor(): this;
  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 | void;
  constitution(): Constitution;
  static new(constitution: Constitution): NewConstitutionAction;
  static new_with_action_id(
    gov_action_id: GovernanceActionId,
    constitution: Constitution
  ): NewConstitutionAction;
  has_script_hash(): boolean;
}
declare export class NoConfidenceAction {
  constructor(): this;
  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 | void;
  static new(): NoConfidenceAction;
  static new_with_action_id(
    gov_action_id: GovernanceActionId
  ): NoConfidenceAction;
}
declare export class Nonce {
  constructor(): this;
  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 | void;
}
declare export class OperationalCert {
  constructor(): this;
  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;
}
declare export class OutputDatum {
  constructor(): this;
  free(): void;
  static new_data_hash(data_hash: DataHash): OutputDatum;
  static new_data(data: PlutusData): OutputDatum;
  data_hash(): DataHash | void;
  data(): PlutusData | void;
}
declare export class ParameterChangeAction {
  constructor(): this;
  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 | void;
  protocol_param_updates(): ProtocolParamUpdate;
  policy_hash(): ScriptHash | void;
  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;
}
declare export class PlutusData {
  constructor(): this;
  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(): $Values<typeof PlutusDataKind>;
  as_constr_plutus_data(): ConstrPlutusData | void;
  as_map(): PlutusMap | void;
  as_list(): PlutusList | void;
  as_integer(): BigInt | void;
  as_bytes(): Uint8Array | void;
  to_json(schema: $Values<typeof PlutusDatumSchema>): string;
  static from_json(
    json: string,
    schema: $Values<typeof PlutusDatumSchema>
  ): PlutusData;
  static from_address(address: Address): PlutusData;
  as_address(network: NetworkInfo): Address;
}
declare export class PlutusList {
  constructor(): this;
  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;
}
declare export class PlutusMap {
  constructor(): this;
  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 | void;
  get(key: PlutusData): PlutusMapValues | void;
  keys(): PlutusList;
}
declare export class PlutusMapValues {
  constructor(): this;
  free(): void;
  static new(): PlutusMapValues;
  len(): number;
  get(index: number): PlutusData | void;
  add(elem: PlutusData): void;
}
declare export class PlutusScript {
  constructor(): this;
  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;
}
declare export class PlutusScriptSource {
  constructor(): this;
  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 | void;
}
declare export class PlutusScripts {
  constructor(): this;
  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;
}
declare export class PlutusWitness {
  constructor(): this;
  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 | void;
  datum(): PlutusData | void;
  redeemer(): Redeemer;
}
declare export class PlutusWitnesses {
  constructor(): this;
  free(): void;
  static new(): PlutusWitnesses;
  len(): number;
  get(index: number): PlutusWitness;
  add(elem: PlutusWitness): void;
}
declare export class Pointer {
  constructor(): this;
  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;
}
declare export class PointerAddress {
  constructor(): this;
  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 | void;
  network_id(): number;
}
declare export class PoolMetadata {
  constructor(): this;
  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;
}
declare export class PoolMetadataHash {
  constructor(): this;
  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;
}
declare export class PoolParams {
  constructor(): this;
  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 | void;
  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;
}
declare export class PoolRegistration {
  constructor(): this;
  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;
}
declare export class PoolRetirement {
  constructor(): this;
  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;
}
declare export class PoolVotingThresholds {
  constructor(): this;
  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;
}
declare export class PrivateKey {
  constructor(): this;
  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(&#39;ed25519_sk1ahfetf02qwwg4dkq7mgp4a25lx5vh9920cr5wnxmpzz9906qvm8qwvlts0&#39;);
   * ```
   * For an extended 25519 key
   * ```javascript
   * PrivateKey.from_bech32(&#39;ed25519e_sk1gqwl4szuwwh6d0yk3nsqcc6xxc3fpvjlevgwvt60df59v8zd8f8prazt8ln3lmz096ux3xvhhvm3ca9wj2yctdh3pnw0szrma07rt5gl748fp&#39;);
   * ```
   */
  static from_bech32(bech32_str: string): PrivateKey;
  static generate_ed25519extended(): PrivateKey;
  static generate_ed25519(): PrivateKey;
  to_public(): PublicKey;
}
declare export class ProposedProtocolParameterUpdates {
  constructor(): this;
  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 | void;
  get(key: GenesisHash): ProtocolParamUpdate | void;
  keys(): GenesisHashes;
}
declare export class ProtocolParamUpdate {
  constructor(): this;
  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 | void;
  set_minfee_b(minfee_b: BigNum): void;
  minfee_b(): BigNum | void;
  set_max_block_body_size(max_block_body_size: number): void;
  max_block_body_size(): number | void;
  set_max_tx_size(max_tx_size: number): void;
  max_tx_size(): number | void;
  set_max_block_header_size(max_block_header_size: number): void;
  max_block_header_size(): number | void;
  set_key_deposit(key_deposit: BigNum): void;
  key_deposit(): BigNum | void;
  set_pool_deposit(pool_deposit: BigNum): void;
  pool_deposit(): BigNum | void;
  set_max_epoch(max_epoch: number): void;
  max_epoch(): number | void;
  set_n_opt(n_opt: number): void;
  n_opt(): number | void;
  set_pool_pledge_influence(pool_pledge_influence: UnitInterval): void;
  pool_pledge_influence(): UnitInterval | void;
  set_expansion_rate(expansion_rate: UnitInterval): void;
  expansion_rate(): UnitInterval | void;
  set_treasury_growth_rate(treasury_growth_rate: UnitInterval): void;
  treasury_growth_rate(): UnitInterval | void;

  /**
   * !!! DEPRECATED !!!
   * Since babbage era this param is outdated. But this param you can meet in a pre-babbage block.
   */
  d(): UnitInterval | void;

  /**
   * !!! DEPRECATED !!!
   * Since babbage era this param is outdated. But this param you can meet in a pre-babbage block.
   */
  extra_entropy(): Nonce | void;

  /**
   * !!! 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 | void;
  set_min_pool_cost(min_pool_cost: BigNum): void;
  min_pool_cost(): BigNum | void;
  set_ada_per_utxo_byte(ada_per_utxo_byte: BigNum): void;
  ada_per_utxo_byte(): BigNum | void;
  set_cost_models(cost_models: Costmdls): void;
  cost_models(): Costmdls | void;
  set_execution_costs(execution_costs: ExUnitPrices): void;
  execution_costs(): ExUnitPrices | void;
  set_max_tx_ex_units(max_tx_ex_units: ExUnits): void;
  max_tx_ex_units(): ExUnits | void;
  set_max_block_ex_units(max_block_ex_units: ExUnits): void;
  max_block_ex_units(): ExUnits | void;
  set_max_value_size(max_value_size: number): void;
  max_value_size(): number | void;
  set_collateral_percentage(collateral_percentage: number): void;
  collateral_percentage(): number | void;
  set_max_collateral_inputs(max_collateral_inputs: number): void;
  max_collateral_inputs(): number | void;
  set_pool_voting_thresholds(
    pool_voting_thresholds: PoolVotingThresholds
  ): void;
  pool_voting_thresholds(): PoolVotingThresholds | void;
  set_drep_voting_thresholds(
    drep_voting_thresholds: DRepVotingThresholds
  ): void;
  drep_voting_thresholds(): DRepVotingThresholds | void;
  set_min_committee_size(min_committee_size: number): void;
  min_committee_size(): number | void;
  set_committee_term_limit(committee_term_limit: number): void;
  committee_term_limit(): number | void;
  set_governance_action_validity_period(
    governance_action_validity_period: number
  ): void;
  governance_action_validity_period(): number | void;
  set_governance_action_deposit(governance_action_deposit: BigNum): void;
  governance_action_deposit(): BigNum | void;
  set_drep_deposit(drep_deposit: BigNum): void;
  drep_deposit(): BigNum | void;
  set_drep_inactivity_period(drep_inactivity_period: number): void;
  drep_inactivity_period(): number | void;
  set_ref_script_coins_per_byte(ref_script_coins_per_byte: UnitInterval): void;
  ref_script_coins_per_byte(): UnitInterval | void;
  static new(): ProtocolParamUpdate;
}
declare export class ProtocolVersion {
  constructor(): this;
  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
 */
declare export class PublicKey {
  constructor(): this;
  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(&#39;ed25519_pk1dgaagyh470y66p899txcl3r0jaeaxu6yd7z2dxyk55qcycdml8gszkxze2&#39;);
   * ```
   */
  static from_bech32(bech32_str: string): PublicKey;
}
declare export class PublicKeys {
  free(): void;
  constructor(): this;
  size(): number;
  get(index: number): PublicKey;
  add(key: PublicKey): void;
}
declare export class Redeemer {
  constructor(): this;
  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;
}
declare export class RedeemerTag {
  constructor(): this;
  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(): $Values<typeof RedeemerTagKind>;
}
declare export class Redeemers {
  constructor(): this;
  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(): $Values<typeof CborContainerType>;
  total_ex_units(): ExUnits;
}
declare export class Relay {
  constructor(): this;
  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(): $Values<typeof RelayKind>;
  as_single_host_addr(): SingleHostAddr | void;
  as_single_host_name(): SingleHostName | void;
  as_multi_host_name(): MultiHostName | void;
}
declare export class Relays {
  constructor(): this;
  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;
}
declare export class RewardAddress {
  constructor(): this;
  free(): void;
  static new(network: number, payment: Credential): RewardAddress;
  payment_cred(): Credential;
  to_address(): Address;
  static from_address(addr: Address): RewardAddress | void;
  network_id(): number;
}
declare export class RewardAddresses {
  constructor(): this;
  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;
}
declare export class ScriptAll {
  constructor(): this;
  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;
}
declare export class ScriptAny {
  constructor(): this;
  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;
}
declare export class ScriptDataHash {
  constructor(): this;
  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;
}
declare export class ScriptHash {
  constructor(): this;
  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;
}
declare export class ScriptHashes {
  constructor(): this;
  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;
}
declare export class ScriptNOfK {
  constructor(): this;
  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;
}
declare export class ScriptPubkey {
  constructor(): this;
  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;
}
declare export class ScriptRef {
  constructor(): this;
  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 | void;
  plutus_script(): PlutusScript | void;

  /**
   * 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;
}
declare export class SingleHostAddr {
  constructor(): this;
  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 | void;
  ipv4(): Ipv4 | void;
  ipv6(): Ipv6 | void;
  static new(
    port?: number | null,
    ipv4?: Ipv4 | null,
    ipv6?: Ipv6 | null
  ): SingleHostAddr;
}
declare export class SingleHostName {
  constructor(): this;
  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 | void;
  dns_name(): DNSRecordAorAAAA;
  static new(
    port: number | null | void,
    dns_name: DNSRecordAorAAAA
  ): SingleHostName;
}
declare export class StakeAndVoteDelegation {
  constructor(): this;
  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;
}
declare export class StakeDelegation {
  constructor(): this;
  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;
}
declare export class StakeDeregistration {
  constructor(): this;
  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 | void;
  static new(stake_credential: Credential): StakeDeregistration;
  static new_with_explicit_refund(
    stake_credential: Credential,
    coin: BigNum
  ): StakeDeregistration;
  has_script_credentials(): boolean;
}
declare export class StakeRegistration {
  constructor(): this;
  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 | void;
  static new(stake_credential: Credential): StakeRegistration;
  static new_with_explicit_deposit(
    stake_credential: Credential,
    coin: BigNum
  ): StakeRegistration;
  has_script_credentials(): boolean;
}
declare export class StakeRegistrationAndDelegation {
  constructor(): this;
  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;
}
declare export class StakeVoteRegistrationAndDelegation {
  constructor(): this;
  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;
}
declare export class Strings {
  constructor(): this;
  free(): void;
  static new(): Strings;
  len(): number;
  get(index: number): string;
  add(elem: string): void;
}
declare export class TimelockExpiry {
  constructor(): this;
  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;
}
declare export class TimelockStart {
  constructor(): this;
  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;
}
declare export class Transaction {
  constructor(): this;
  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 | void;
  set_is_valid(valid: boolean): void;
  static new(
    body: TransactionBody,
    witness_set: TransactionWitnessSet,
    auxiliary_data?: AuxiliaryData | null
  ): Transaction;
}
declare export class TransactionBatch {
  constructor(): this;
  free(): void;
  len(): number;
  get(index: number): Transaction;
}
declare export class TransactionBatchList {
  constructor(): this;
  free(): void;
  len(): number;
  get(index: number): TransactionBatch;
}
declare export class TransactionBodies {
  constructor(): this;
  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;
}
declare export class TransactionBody {
  constructor(): this;
  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 | void;
  ttl_bignum(): BigNum | void;
  set_ttl(ttl: BigNum): void;
  remove_ttl(): void;
  set_certs(certs: Certificates): void;
  certs(): Certificates | void;
  set_withdrawals(withdrawals: Withdrawals): void;
  withdrawals(): Withdrawals | void;
  set_update(update: Update): void;
  update(): Update | void;
  set_auxiliary_data_hash(auxiliary_data_hash: AuxiliaryDataHash): void;
  auxiliary_data_hash(): AuxiliaryDataHash | 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;
  validity_start_interval_bignum(): BigNum | void;

  /**
   * !!! DEPRECATED !!!
   * Returns a Option<Slot32> (u32) value in case the underlying original Option<BigNum> (u64) value is within the limits.
   * Otherwise will just raise an error.
   * Use `.validity_start_interval_bignum` instead.
   */
  validity_start_interval(): number | void;
  set_mint(mint: Mint): void;
  mint(): Mint | void;
  set_reference_inputs(reference_inputs: TransactionInputs): void;
  reference_inputs(): TransactionInputs | void;
  set_script_data_hash(script_data_hash: ScriptDataHash): void;
  script_data_hash(): ScriptDataHash | void;
  set_collateral(collateral: TransactionInputs): void;
  collateral(): TransactionInputs | void;
  set_required_signers(required_signers: Ed25519KeyHashes): void;
  required_signers(): Ed25519KeyHashes | void;
  set_network_id(network_id: NetworkId): void;
  network_id(): NetworkId | void;
  set_collateral_return(collateral_return: TransactionOutput): void;
  collateral_return(): TransactionOutput | void;
  set_total_collateral(total_collateral: BigNum): void;
  total_collateral(): BigNum | void;
  set_voting_procedures(voting_procedures: VotingProcedures): void;
  voting_procedures(): VotingProcedures | void;
  set_voting_proposals(voting_proposals: VotingProposals): void;
  voting_proposals(): VotingProposals | void;
  set_donation(donation: BigNum): void;
  donation(): BigNum | void;
  set_current_treasury_value(current_treasury_value: BigNum): void;
  current_treasury_value(): BigNum | void;

  /**
   * !!! 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;
}
declare export class TransactionBuilder {
  constructor(): this;
  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: $Values<typeof 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: $Values<typeof CoinSelectionStrategyCIP2>,
    change_config: ChangeConfig
  ): boolean;
  add_inputs_from_and_change_with_collateral_return(
    inputs: TransactionUnspentOutputs,
    strategy: $Values<typeof 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 | void;

  /**
   * 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 | void;

  /**
   * 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 | void;

  /**
   * 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: $Values<typeof MetadataJsonSchema>
  ): void;
  set_mint_builder(mint_builder: MintBuilder): void;
  remove_mint_builder(): void;
  get_mint_builder(): MintBuilder | void;

  /**
   * !!! 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 | void;

  /**
   * Returns a copy of the current mint witness scripts in the builder
   */
  get_mint_scripts(): NativeScripts | 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 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 | void;
  set_donation(donation: BigNum): void;
  get_donation(): BigNum | void;
  set_current_treasury_value(current_treasury_value: BigNum): void;
  get_current_treasury_value(): BigNum | void;
  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 | void;

  /**
   * 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;
}
declare export class TransactionBuilderConfig {
  constructor(): this;
  free(): void;
}
declare export class TransactionBuilderConfigBuilder {
  constructor(): this;
  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;
}
declare export class TransactionHash {
  constructor(): this;
  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;
}
declare export class TransactionInput {
  constructor(): this;
  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;
}
declare export class TransactionInputs {
  constructor(): this;
  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 | void;
}
declare export class TransactionMetadatum {
  constructor(): this;
  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(): $Values<typeof TransactionMetadatumKind>;
  as_map(): MetadataMap;
  as_list(): MetadataList;
  as_int(): Int;
  as_bytes(): Uint8Array;
  as_text(): string;
}
declare export class TransactionMetadatumLabels {
  constructor(): this;
  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;
}
declare export class TransactionOutput {
  constructor(): this;
  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 | void;
  plutus_data(): PlutusData | void;
  script_ref(): ScriptRef | void;
  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(): $Values<typeof CborContainerType> | void;
}
declare export class TransactionOutputAmountBuilder {
  constructor(): this;
  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
 */
declare export class TransactionOutputBuilder {
  constructor(): this;
  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;
}
declare export class TransactionOutputs {
  constructor(): this;
  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;
}
declare export class TransactionUnspentOutput {
  constructor(): this;
  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;
}
declare export class TransactionUnspentOutputs {
  constructor(): this;
  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;
}
declare export class TransactionWitnessSet {
  constructor(): this;
  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 | void;
  set_native_scripts(native_scripts: NativeScripts): void;
  native_scripts(): NativeScripts | void;
  set_bootstraps(bootstraps: BootstrapWitnesses): void;
  bootstraps(): BootstrapWitnesses | void;
  set_plutus_scripts(plutus_scripts: PlutusScripts): void;
  plutus_scripts(): PlutusScripts | void;
  set_plutus_data(plutus_data: PlutusList): void;
  plutus_data(): PlutusList | void;
  set_redeemers(redeemers: Redeemers): void;
  redeemers(): Redeemers | void;
  static new(): TransactionWitnessSet;
}
declare export class TransactionWitnessSets {
  constructor(): this;
  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;
}
declare export class TreasuryWithdrawals {
  constructor(): this;
  free(): void;
  to_json(): string;
  to_js_value(): TreasuryWithdrawalsJSON;
  static from_json(json: string): TreasuryWithdrawals;
  static new(): TreasuryWithdrawals;
  get(key: RewardAddress): BigNum | void;
  insert(key: RewardAddress, value: BigNum): void;
  keys(): RewardAddresses;
  len(): number;
}
declare export class TreasuryWithdrawalsAction {
  constructor(): this;
  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 | void;
  static new(withdrawals: TreasuryWithdrawals): TreasuryWithdrawalsAction;
  static new_with_policy_hash(
    withdrawals: TreasuryWithdrawals,
    policy_hash: ScriptHash
  ): TreasuryWithdrawalsAction;
}
declare export class TxInputsBuilder {
  constructor(): this;
  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 | void;

  /**
   * 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 | void;
  len(): number;
  add_required_signer(key: Ed25519KeyHash): void;
  add_required_signers(keys: Ed25519KeyHashes): void;
  total_value(): Value;
  inputs(): TransactionInputs;
  inputs_option(): TransactionInputs | void;
}
declare export class URL {
  constructor(): this;
  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;
}
declare export class UnitInterval {
  constructor(): this;
  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;
}
declare export class Update {
  constructor(): this;
  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;
}
declare export class UpdateCommitteeAction {
  constructor(): this;
  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 | void;
  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;
}
declare export class VRFCert {
  constructor(): this;
  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;
}
declare export class VRFKeyHash {
  constructor(): this;
  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;
}
declare export class VRFVKey {
  constructor(): this;
  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;
}
declare export class Value {
  constructor(): this;
  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 | void;
  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 | void;
}
declare export class VersionedBlock {
  constructor(): this;
  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(): $Values<typeof BlockEra>;
}
declare export class Vkey {
  constructor(): this;
  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;
}
declare export class Vkeys {
  constructor(): this;
  free(): void;
  static new(): Vkeys;
  len(): number;
  get(index: number): Vkey;
  add(elem: Vkey): void;
}
declare export class Vkeywitness {
  constructor(): this;
  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;
}
declare export class Vkeywitnesses {
  constructor(): this;
  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;
}
declare export class VoteDelegation {
  constructor(): this;
  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;
}
declare export class VoteRegistrationAndDelegation {
  constructor(): this;
  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;
}
declare export class Voter {
  constructor(): this;
  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(): $Values<typeof VoterKind>;
  to_constitutional_committee_hot_credential(): Credential | void;
  to_drep_credential(): Credential | void;
  to_stake_pool_key_hash(): Ed25519KeyHash | void;
  has_script_credentials(): boolean;
  to_key_hash(): Ed25519KeyHash | void;
}
declare export class Voters {
  constructor(): this;
  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 | void;
  len(): number;
}
declare export class VotingBuilder {
  constructor(): this;
  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;
}
declare export class VotingProcedure {
  constructor(): this;
  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: $Values<typeof VoteKind>): VotingProcedure;
  static new_with_anchor(
    vote: $Values<typeof VoteKind>,
    anchor: Anchor
  ): VotingProcedure;
  vote_kind(): $Values<typeof VoteKind>;
  anchor(): Anchor | void;
}
declare export class VotingProcedures {
  constructor(): this;
  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 | void;
  get_voters(): Voters;
  get_governance_action_ids_by_voter(voter: Voter): GovernanceActionIds;
}
declare export class VotingProposal {
  constructor(): this;
  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;
}
declare export class VotingProposalBuilder {
  constructor(): this;
  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;
}
declare export class VotingProposals {
  constructor(): this;
  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 | void;
}
declare export class Withdrawals {
  constructor(): this;
  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 | void;
  get(key: RewardAddress): BigNum | void;
  keys(): RewardAddresses;
}
declare export class WithdrawalsBuilder {
  constructor(): this;
  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;
}
