import { HexBlob, HexBlob as HexBlob$1, OpaqueString, OpaqueString as OpaqueString$1, typedHex } from "@cardano-sdk/util"; import * as C from "@cardano-sdk/core"; import { Cardano, Cardano as Cardano$1, Serialization } from "@cardano-sdk/core"; import * as Crypto from "@cardano-sdk/crypto"; import * as bip39 from "@scure/bip39"; import { wordlist } from "@scure/bip39/wordlists/english"; //#region rolldown:runtime //#endregion //#region src/init.d.ts /** * Initialize the `@cardano-sdk/crypto` module. * This function must be called before calling any exported functions from `@cardano-sdk/crypto`. It is safe to call multiple times. * Blaze should be calling this internally before using any exports from that module. If it does not, please file a bug. */ declare function initCrypto(): Promise; //#endregion //#region src/types.d.ts declare const Slot: (value: number) => C.Cardano.Slot; type Slot = C.Cardano.Slot; declare const Value: typeof C.Serialization.Value; type Value = C.Serialization.Value; type TokenMap = C.Cardano.TokenMap; declare const Transaction: typeof C.Serialization.Transaction; type Transaction = C.Serialization.Transaction; declare const TxCBOR: { (tx: string): C.Serialization.TxCBOR; serialize(tx: C.Cardano.Tx): C.Serialization.TxCBOR; deserialize(tx: C.Serialization.TxCBOR): C.Cardano.Tx; }; type TxCBOR = C.Serialization.TxCBOR; declare const TransactionId: { (value: string): C.Cardano.TransactionId; fromHexBlob(value: HexBlob$1): C.Cardano.TransactionId; }; type TransactionId = C.Cardano.TransactionId; declare const TransactionBody: typeof C.Serialization.TransactionBody; type TransactionBody = C.Serialization.TransactionBody; declare const TransactionWitnessSet: typeof C.Serialization.TransactionWitnessSet; type TransactionWitnessSet = C.Serialization.TransactionWitnessSet; declare const TransactionUnspentOutput: typeof C.Serialization.TransactionUnspentOutput; type TransactionUnspentOutput = C.Serialization.TransactionUnspentOutput; declare const TransactionInput: typeof C.Serialization.TransactionInput; type TransactionInput = C.Serialization.TransactionInput; declare const TransactionOutput: typeof C.Serialization.TransactionOutput; type TransactionOutput = C.Serialization.TransactionOutput; type TransactionInputSet = C.Serialization.CborSet, TransactionInput>; type TransactionWitnessPlutusData = Set; declare const PlutusData: typeof C.Serialization.PlutusData; type PlutusData = C.Serialization.PlutusData; declare const ConstrPlutusData: typeof C.Serialization.ConstrPlutusData; type ConstrPlutusData = C.Serialization.ConstrPlutusData; declare const PlutusList: typeof C.Serialization.PlutusList; type PlutusList = C.Serialization.PlutusList; declare const PlutusMap: typeof C.Serialization.PlutusMap; type PlutusMap = C.Serialization.PlutusMap; declare const PlutusDataKind: typeof C.Serialization.PlutusDataKind; type PlutusDataKind = C.Serialization.PlutusDataKind; declare const Redeemers: typeof C.Serialization.Redeemers; type Redeemers = C.Serialization.Redeemers; declare const Redeemer: typeof C.Serialization.Redeemer; type Redeemer = C.Serialization.Redeemer; declare const RedeemerPurpose: typeof C.Cardano.RedeemerPurpose; type RedeemerPurpose = C.Cardano.RedeemerPurpose; declare const RedeemerTag: typeof C.Serialization.RedeemerTag; type RedeemerTag = C.Serialization.RedeemerTag; declare const Script: typeof C.Serialization.Script; type Script = C.Serialization.Script; declare const PolicyId: (value: string) => C.Cardano.PolicyId; type PolicyId = C.Cardano.PolicyId; declare const AssetName: { (value: string): C.Cardano.AssetName; toUTF8(assetName: C.Cardano.AssetName, stripInvisibleCharacters?: boolean): string; }; type AssetName = C.Cardano.AssetName; declare const AssetId: { (value: string): C.Cardano.AssetId; getPolicyId(id: C.Cardano.AssetId): C.Cardano.PolicyId; getAssetName(id: C.Cardano.AssetId): C.Cardano.AssetName; fromParts(policyId: C.Cardano.PolicyId, assetName: C.Cardano.AssetName): C.Cardano.AssetId; }; type AssetId = C.Cardano.AssetId; type ScriptHash = Crypto.Hash28ByteBase16; declare const Address: typeof C.Cardano.Address; type Address = C.Cardano.Address; declare const isRewardAccount: (bech: PaymentAddress | RewardAccount) => bech is RewardAccount; declare const RewardAddress: typeof C.Cardano.RewardAddress; type RewardAddress = C.Cardano.RewardAddress; declare const AddressType: typeof C.Cardano.AddressType; type AddressType = C.Cardano.AddressType; declare const PaymentAddress: (value: string) => C.Cardano.PaymentAddress; type PaymentAddress = C.Cardano.PaymentAddress; declare const Credential: typeof C.Serialization.Credential; type Credential = C.Serialization.Credential; type CredentialCore = C.Cardano.Credential; declare const Ed25519PublicKeyHex: { (value: string): Crypto.Ed25519PublicKeyHex; fromBip32PublicKey(bip32PublicKey: Crypto.Bip32PublicKeyHex): Crypto.Ed25519PublicKeyHex; }; type Ed25519PublicKeyHex = Crypto.Ed25519PublicKeyHex; declare const Ed25519PrivateKey: typeof Crypto.Ed25519PrivateKey; type Ed25519PrivateKey = Crypto.Ed25519PrivateKey; type Ed25519PrivateNormalKeyHex = OpaqueString$1<"Ed25519PrivateKeyHex"> & HexBlob$1; declare const Ed25519PrivateNormalKeyHex: (value: string) => Ed25519PrivateNormalKeyHex; type Ed25519PrivateExtendedKeyHex = OpaqueString$1<"Ed25519PrivateKeyHex"> & HexBlob$1; declare const Ed25519PrivateExtendedKeyHex: (value: string) => Ed25519PrivateExtendedKeyHex; type Bip32PrivateKeyHex = OpaqueString$1<"Bip32PrivateKeyHex"> & HexBlob$1; declare const Bip32PrivateKeyHex: (value: string) => Bip32PrivateKeyHex; declare const Ed25519KeyHashHex: (value: string) => Crypto.Ed25519KeyHashHex; type Ed25519KeyHashHex = Crypto.Ed25519KeyHashHex; declare const Hash28ByteBase16: (value: string) => Crypto.Hash28ByteBase16; type Hash28ByteBase16 = Crypto.Hash28ByteBase16; declare const Hash32ByteBase16: { (value: string): Crypto.Hash32ByteBase16; fromHexBlob(value: HexBlob$1): T; }; type Hash32ByteBase16 = Crypto.Hash32ByteBase16; declare const CredentialType: typeof C.Cardano.CredentialType; type CredentialType = C.Cardano.CredentialType; declare const Certificate: typeof C.Serialization.Certificate; type Certificate = C.Serialization.Certificate; declare const PoolId: { (value: string): PoolId; fromKeyHash(value: Crypto.Ed25519KeyHashHex): PoolId; toKeyHash(poolId: PoolId): Crypto.Ed25519KeyHashHex; }; type PoolId = OpaqueString$1<"PoolId">; declare const StakeRegistration: typeof C.Serialization.StakeRegistration; type StakeRegistration = C.Serialization.StakeRegistration; declare const StakeDeregistration: typeof C.Serialization.StakeDeregistration; type StakeDeregistration = C.Serialization.StakeDeregistration; declare const StakeDelegation: typeof C.Serialization.StakeDelegation; type StakeDelegation = C.Serialization.StakeDelegation; type StakeDelegationCertificate = C.Cardano.StakeDelegationCertificate; declare const CertificateType: typeof C.Cardano.CertificateType; type CertificateType = C.Cardano.CertificateType; type StakeAddressCertificate = C.Cardano.StakeAddressCertificate; type CertificateCore = C.Cardano.Certificate; declare const StakeRegistrationCertificateTypes: readonly [C.Cardano.CertificateType.StakeRegistration, C.Cardano.CertificateType.Registration, C.Cardano.CertificateType.VoteRegistrationDelegation, C.Cardano.CertificateType.StakeRegistrationDelegation, C.Cardano.CertificateType.StakeVoteRegistrationDelegation]; declare const StakeDelegationCertificateTypes: readonly [C.Cardano.CertificateType.StakeDelegation, C.Cardano.CertificateType.StakeVoteDelegation, C.Cardano.CertificateType.StakeRegistrationDelegation, C.Cardano.CertificateType.StakeVoteRegistrationDelegation]; declare const RegAndDeregCertificateTypes: readonly [C.Cardano.CertificateType.StakeRegistration, C.Cardano.CertificateType.Registration, C.Cardano.CertificateType.VoteRegistrationDelegation, C.Cardano.CertificateType.StakeRegistrationDelegation, C.Cardano.CertificateType.StakeVoteRegistrationDelegation, C.Cardano.CertificateType.Unregistration, C.Cardano.CertificateType.StakeDeregistration]; declare const StakeCredentialCertificateTypes: readonly [C.Cardano.CertificateType.StakeRegistration, C.Cardano.CertificateType.Registration, C.Cardano.CertificateType.VoteRegistrationDelegation, C.Cardano.CertificateType.StakeRegistrationDelegation, C.Cardano.CertificateType.StakeVoteRegistrationDelegation, C.Cardano.CertificateType.Unregistration, C.Cardano.CertificateType.StakeDeregistration, C.Cardano.CertificateType.StakeDelegation, C.Cardano.CertificateType.StakeVoteDelegation, C.Cardano.CertificateType.StakeRegistrationDelegation, C.Cardano.CertificateType.StakeVoteRegistrationDelegation, C.Cardano.CertificateType.VoteDelegation]; declare const VoteDelegationCredentialCertificateTypes: readonly [C.Cardano.CertificateType.VoteDelegation, C.Cardano.CertificateType.VoteRegistrationDelegation, C.Cardano.CertificateType.StakeVoteDelegation, C.Cardano.CertificateType.StakeVoteRegistrationDelegation]; declare const isCertType: (certificate: C.Cardano.Certificate, certificateTypes: readonly K[]) => certificate is { AuthorizeCommitteeHotCertificate: C.Cardano.AuthorizeCommitteeHotCertificate; GenesisKeyDelegationCertificate: C.Cardano.GenesisKeyDelegationCertificate; MirCertificate: C.Cardano.MirCertificate; PoolRegistrationCertificate: C.Cardano.PoolRegistrationCertificate; PoolRetirementCertificate: C.Cardano.PoolRetirementCertificate; RegisterDelegateRepresentativeCertificate: C.Cardano.RegisterDelegateRepresentativeCertificate; RegistrationCertificate: C.Cardano.NewStakeAddressCertificate; ResignCommitteeColdCertificate: C.Cardano.ResignCommitteeColdCertificate; StakeDelegationCertificate: C.Cardano.StakeDelegationCertificate; StakeDeregistrationCertificate: C.Cardano.StakeAddressCertificate; StakeRegistrationCertificate: C.Cardano.StakeAddressCertificate; StakeRegistrationDelegateCertificate: C.Cardano.StakeRegistrationDelegationCertificate; StakeVoteDelegationCertificate: C.Cardano.StakeVoteDelegationCertificate; StakeVoteRegistrationDelegateCertificate: C.Cardano.StakeVoteRegistrationDelegationCertificate; UnregisterDelegateRepresentativeCertificate: C.Cardano.UnRegisterDelegateRepresentativeCertificate; UnRegistrationCertificate: C.Cardano.NewStakeAddressCertificate; UpdateDelegateRepresentativeCertificate: C.Cardano.UpdateDelegateRepresentativeCertificate; VoteDelegationCertificate: C.Cardano.VoteDelegationCertificate; VoteRegistrationDelegateCertificate: C.Cardano.VoteRegistrationDelegationCertificate; }[K]; declare const VkeyWitness: typeof C.Serialization.VkeyWitness; type VkeyWitness = C.Serialization.VkeyWitness; declare const RegisterDelegateRepresentative: typeof C.Serialization.RegisterDelegateRepresentative; type RegisterDelegateRepresentative = C.Serialization.RegisterDelegateRepresentative; declare const UnregisterDelegateRepresentative: typeof C.Serialization.UnregisterDelegateRepresentative; type UnregisterDelegateRepresentative = C.Serialization.UnregisterDelegateRepresentative; declare const UpdateDelegateRepresentative: typeof C.Serialization.UpdateDelegateRepresentative; type UpdateDelegateRepresentative = C.Serialization.UpdateDelegateRepresentative; declare const Anchor: typeof C.Serialization.Anchor; type Anchor = C.Serialization.Anchor; declare const DRep: typeof C.Serialization.DRep; type DRep = C.Serialization.DRep; type GovernanceAction = C.Cardano.GovernanceAction; type DelegateRepresentative = C.Cardano.DelegateRepresentative; declare const VotingProcedures: typeof C.Serialization.VotingProcedures; type VotingProcedures = C.Serialization.VotingProcedures; declare const VotingProcedure: typeof C.Serialization.VotingProcedure; type VotingProcedure = C.Serialization.VotingProcedure; declare const Voter: typeof C.Serialization.Voter; type Voter = C.Serialization.Voter; type VoterCore = C.Cardano.Voter; declare const VoterKind: typeof C.Serialization.VoterKind; declare const VoteDelegation: typeof C.Serialization.VoteDelegation; type VoteDelegation = C.Serialization.VoteDelegation; declare const Vote: typeof C.Cardano.Vote; type Vote = C.Cardano.Vote; declare const ProposalProcedure: typeof C.Serialization.ProposalProcedure; type ProposalProcedure = C.Serialization.ProposalProcedure; declare const GovernanceActionId: typeof C.Serialization.GovernanceActionId; type GovernanceActionId = C.Serialization.GovernanceActionId; declare const GovernanceActionKind: typeof C.Serialization.GovernanceActionKind; type GovernanceActionKind = C.Serialization.GovernanceActionKind; declare const Constitution: typeof C.Serialization.Constitution; type Constitution = C.Serialization.Constitution; type ConstitutionCore = C.Cardano.Constitution; type Fraction = C.Cardano.Fraction; type DelegateRepresentativeThresholds = C.Cardano.DelegateRepresentativeThresholds; type PoolVotingThresholds = C.Cardano.PoolVotingThresholds; type CommitteeMember = C.Cardano.CommitteeMember; type Committee = C.Cardano.Committee; type PoolParameters = C.Cardano.PoolParameters; type EpochNo = C.Cardano.EpochNo; declare const EpochNo: (value: number) => C.Cardano.EpochNo; declare const PoolRegistration: typeof C.Serialization.PoolRegistration; type PoolRegistration = C.Serialization.PoolRegistration; declare const PoolRetirement: typeof C.Serialization.PoolRetirement; type PoolRetirement = C.Serialization.PoolRetirement; type AnchorCore = C.Cardano.Anchor; declare const Ed25519SignatureHex: (value: string) => Crypto.Ed25519SignatureHex; type Ed25519SignatureHex = Crypto.Ed25519SignatureHex; declare const Ed25519PublicKey: typeof Crypto.Ed25519PublicKey; type Ed25519PublicKey = Crypto.Ed25519PublicKey; declare const Ed25519Signature: typeof Crypto.Ed25519Signature; type Ed25519Signature = Crypto.Ed25519Signature; declare const Bip32PrivateKey: typeof Crypto.Bip32PrivateKey; type Bip32PrivateKey = Crypto.Bip32PrivateKey; declare const Bip32PublicKey: typeof Crypto.Bip32PublicKey; type Bip32PublicKey = Crypto.Bip32PublicKey; declare const PlutusLanguageVersion: typeof C.Cardano.PlutusLanguageVersion; type PlutusLanguageVersion = C.Cardano.PlutusLanguageVersion; declare const NativeScript: typeof C.Serialization.NativeScript; type NativeScript = C.Serialization.NativeScript; declare const ScriptPubkey: typeof C.Serialization.ScriptPubkey; type ScriptPubkey = C.Serialization.ScriptPubkey; declare const ScriptAll: typeof C.Serialization.ScriptAll; type ScriptAll = C.Serialization.ScriptAll; declare const ScriptAny: typeof C.Serialization.ScriptAny; type ScriptAny = C.Serialization.ScriptAny; declare const ScriptNOfK: typeof C.Serialization.ScriptNOfK; type ScriptNOfK = C.Serialization.ScriptNOfK; declare const TimelockStart: typeof C.Serialization.TimelockStart; type TimelockStart = C.Serialization.TimelockStart; declare const TimelockExpiry: typeof C.Serialization.TimelockExpiry; type TimelockExpiry = C.Serialization.TimelockExpiry; declare const PlutusV1Script: typeof C.Serialization.PlutusV1Script; type PlutusV1Script = C.Serialization.PlutusV1Script; declare const PlutusV2Script: typeof C.Serialization.PlutusV2Script; type PlutusV2Script = C.Serialization.PlutusV2Script; declare const PlutusV3Script: typeof C.Serialization.PlutusV3Script; type PlutusV3Script = C.Serialization.PlutusV3Script; declare const Costmdls: typeof C.Serialization.Costmdls; type Costmdls = C.Serialization.Costmdls; declare const CostModel: typeof C.Serialization.CostModel; type CostModel = C.Serialization.CostModel; declare const CborWriter: typeof C.Serialization.CborWriter; type CborWriter = C.Serialization.CborWriter; declare const CborReader: typeof C.Serialization.CborReader; type CborReader = C.Serialization.CborReader; declare const CborReaderState: typeof C.Serialization.CborReaderState; type CborReaderState = C.Serialization.CborReaderState; declare const RewardAccount: { (value: string): C.Cardano.RewardAccount; toHash(rewardAccount: C.Cardano.RewardAccount): Hash28ByteBase16; fromCredential(credential: C.Cardano.Credential, networkId: C.Cardano.NetworkId): C.Cardano.RewardAccount; toNetworkId(rewardAccount: C.Cardano.RewardAccount): C.Cardano.NetworkId; }; type RewardAccount = OpaqueString$1<"RewardAccount">; declare const Hash: typeof C.Serialization.Hash; type Hash = C.Serialization.Hash; declare const DatumHash: { (value: string): Crypto.Hash32ByteBase16; fromHexBlob(value: HexBlob$1): T; }; type DatumHash = Crypto.Hash32ByteBase16; declare const Datum: typeof C.Serialization.Datum; type Datum = PlutusData | DatumHash; type CostModels = C.Cardano.CostModels; type ExUnits = C.Serialization.ExUnits; declare const ExUnits: typeof C.Serialization.ExUnits; declare const NetworkId: typeof C.Cardano.NetworkId; type NetworkId = C.Cardano.ChainId["networkId"]; declare const DatumKind: typeof C.Serialization.DatumKind; type Evaluator = (tx: Transaction, additionalUtxos: TransactionUnspentOutput[]) => Promise; declare const AuxiliaryData: typeof C.Serialization.AuxiliaryData; type AuxiliaryData = C.Serialization.AuxiliaryData; declare const Metadata: typeof C.Serialization.GeneralTransactionMetadata; type Metadata = C.Serialization.GeneralTransactionMetadata; declare const Metadatum: typeof C.Serialization.TransactionMetadatum; type Metadatum = C.Serialization.TransactionMetadatum; declare const MetadatumMap: typeof C.Serialization.MetadatumMap; type MetadatumMap = C.Serialization.MetadatumMap; declare const MetadatumList: typeof C.Serialization.MetadatumList; type MetadatumList = C.Serialization.MetadatumList; declare const TransactionMetadatumKind: typeof C.Serialization.TransactionMetadatumKind; type TransactionMetadatumKind = C.Serialization.TransactionMetadatumKind; /** * The SlotConfig interface defines the configuration for slots. * @interface SlotConfig * @property {number} zeroTime - The zero time for slot calculation. * @property {number} zeroSlot - The zero slot. * @property {number} slotLength - The slot length. */ interface SlotConfig { zeroTime: number; zeroSlot: number; slotLength: number; } declare const SLOT_CONFIG_NETWORK: { Mainnet: { zeroTime: number; zeroSlot: number; slotLength: number; }; Preview: { zeroTime: number; zeroSlot: number; slotLength: number; }; Preprod: { zeroTime: number; zeroSlot: number; slotLength: number; }; }; //#endregion //#region src/util.d.ts /** * Converts an Address to a PaymentAddress. * @param {Address} address - The address to be converted. * @returns {PaymentAddress} The converted address in PaymentAddress format. * @throws {Error} If a reward account is passed in. */ declare function getPaymentAddress(address: Address): PaymentAddress; /** * Converts a PolicyId to a Hash28ByteBase16 format. * @param {PolicyId} policy - The policy ID to be converted. * @returns {Hash28ByteBase16} The converted hash in Hash28ByteBase16 format. */ declare function PolicyIdToHash(policy: PolicyId): Hash28ByteBase16; /** * Converts a Hash28ByteBase16 to an Ed25519PublicKeyHex format. * @param {Hash28ByteBase16} hash - The hash to be converted. * @returns {Ed25519PublicKeyHex} The converted hash in Ed25519PublicKeyHex format. */ declare function HashAsPubKeyHex(hash: Hash28ByteBase16): Ed25519PublicKeyHex; /** * Converts a hex string to a byte array. * @param {string} hexString - The hex string to convert. * @returns {Uint8Array} The resulting byte array. */ declare function fromHex(hexString: string): Uint8Array; /** * Converts a byte array to a hex string. * @param {Uint8Array} byteArray - The byte array to convert. * @returns {string} The resulting hex string. */ declare function toHex(byteArray: Uint8Array): string; /** * Function to compute the SHA2-256 hash of a hex blob. * @param {HexBlob} _data - The hex blob to compute the hash of. * @returns {Hash32ByteBase16} The computed hash in Hash32ByteBase16 format. */ declare function sha2_256(data: HexBlob): Hash32ByteBase16; /** * Function to compute the SHA3-256 hash of a hex blob. * @param {HexBlob} _data - The hex blob to compute the hash of. * @returns {Hash32ByteBase16} The computed hash in Hash32ByteBase16 format. */ declare function sha3_256(data: HexBlob): Hash32ByteBase16; /** * Function to compute the BLAKE2b-256 hash of a hex blob. * @param {HexBlob} _data - The hex blob to compute the hash of. * @returns {Hash32ByteBase16} The computed hash in Hash32ByteBase16 format. */ declare function blake2b_256(data: HexBlob): Hash32ByteBase16; /** * Function to compute the BLAKE2b-224 hash of a hex blob. * @param {HexBlob} _data - The hex blob to compute the hash of. * @returns {Hash32ByteBase16} The computed hash in Hash28ByteBase16 format. */ declare function blake2b_224(data: HexBlob): Hash28ByteBase16; /** * Function to derive the public key from a private key. * @param {Ed25519PrivateNormalKeyHex | Ed25519PrivateExtendedKeyHex} privateKey - The private key to derive the public key from. * @returns {Ed25519PublicKeyHex} The derived public key. */ declare function derivePublicKey(privateKey: Ed25519PrivateNormalKeyHex | Ed25519PrivateExtendedKeyHex): Ed25519PublicKeyHex; /** * Function to sign a message with a private key. * @param {HexBlob} message - The message to sign. * @param {Ed25519PrivateNormalKeyHex} privateKey - The private key to sign the message with. * @returns {Ed25519SignatureHex} The signature of the message. */ declare function signMessage(message: HexBlob, privateKey: Ed25519PrivateNormalKeyHex | Ed25519PrivateExtendedKeyHex): Ed25519SignatureHex; /** * Function to generate a mnemonic. * @returns {string} The generated mnemonic. */ declare const generateMnemonic: typeof bip39.generateMnemonic; /** * Function to convert entropy to a mnemonic. * @param {Buffer} entropy - The entropy to convert. * @returns {string} The generated mnemonic. */ declare const entropyToMnemonic: typeof bip39.entropyToMnemonic; /** * Function to convert a mnemonic to entropy. * @param {string} mnemonic - The mnemonic to convert. * @returns {Buffer} The generated entropy. */ declare const mnemonicToEntropy: typeof bip39.mnemonicToEntropy; /** * Function to create an Address from a Bech32 string. * @param {string} bech32 - The Bech32 string to create the Address from. * @returns {Address} The created Address. */ declare const addressFromBech32: typeof C.Cardano.Address.fromBech32; /** * Function to create an Address from a validator script. * @param {NetworkId} network - The network ID of the Address. * @param {Script} validator - The validator script to create the Address from. * @returns {Address} The created Address. */ declare const addressFromValidator: (network: NetworkId, validator: Script) => Address; /** * Function to create an Address from a credential. * @param {NetworkId} network - The network ID of the Address. * @param {Credential} credential - The credential to create the Address from. * @returns {Address} The created Address. */ declare const addressFromCredential: (network: NetworkId, credential: Credential) => Address; /** * Function to create an Address from payment and optional delegation credentials. * @param {NetworkId} network - The network ID of the Address. * @param {Credential} paymentCredential - The payment credential to create the Address from. * @param {Credential} [delegationCredential] - The optional delegation credential to create the Address from. * @returns {Address} The created Address. */ declare const addressFromCredentials: (network: NetworkId, paymentCredential: Credential, delegationCredential?: Credential) => Address; declare const getBurnAddress: (network: NetworkId) => C.Cardano.Address; /** * Interface for objects that can be serialized to CBOR. */ interface CborSerializable { /** * Function to serialize the object to CBOR. * @returns {HexBlob} The serialized object. */ toCbor(): HexBlob; /** * Function to convert the object to its core representation. * @returns {C} The core representation of the object. */ toCore(): C$1; } /** * Exporting CborSet from C.Serialization. */ declare const CborSet: typeof C.Serialization.CborSet; /** * Type definition for CborSet. */ type CborSet> = C.Serialization.CborSet; /** * Helper function to set the serialization era. */ declare const setInConwayEra: (value: boolean) => false; //#endregion //#region src/params.d.ts /** * Cardano ledger protocol parameters. */ interface ProtocolParameters { /** The number of coins per UTXO byte. */ coinsPerUtxoByte: number; /** The maximum transaction size. */ maxTxSize: number; /** The minimum fee coefficient. */ minFeeCoefficient: number; /** The minimum fee constant. */ minFeeConstant: number; /** The maximum block body size. */ maxBlockBodySize: number; /** The maximum block header size. */ maxBlockHeaderSize: number; /** The stake key deposit. */ stakeKeyDeposit: number; /** The pool deposit. */ poolDeposit: number | null; /** The pool retirement epoch bound. */ poolRetirementEpochBound: number; /** The desired number of pools. */ desiredNumberOfPools: number; /** The pool influence. */ poolInfluence: string; /** The monetary expansion. */ monetaryExpansion: string; /** The treasury expansion. */ treasuryExpansion: string; /** The minimum pool cost. */ minPoolCost: number; /** The protocol version. */ protocolVersion: Cardano$1.ProtocolVersion; /** The maximum value size. */ maxValueSize: number; /** The collateral percentage. */ collateralPercentage: number; /** The maximum collateral inputs. */ maxCollateralInputs: number; /** The cost models. */ costModels: Cardano$1.CostModels; /** The prices. */ prices: Cardano$1.Prices; /** The maximum execution units per transaction. */ maxExecutionUnitsPerTransaction: Cardano$1.ExUnits; /** The maximum execution units per block. */ maxExecutionUnitsPerBlock: Cardano$1.ExUnits; /** Params used for calculating the minimum fee from reference inputs (see https://github.com/CardanoSolutions/ogmios/releases/tag/v6.5.0) */ minFeeReferenceScripts?: MinFeeReferenceScripts; /** Raw cost-per-byte parameter for reference scripts (Conway) */ minFeeRefScriptCostPerByte?: number; /** Maximum reference scripts size (bytes) */ maxReferenceScriptsSize?: number; /** Stake pool voting thresholds (Conway/Chang) */ stakePoolVotingThresholds?: Cardano$1.PoolVotingThresholds; /** dRep voting thresholds (Conway/Chang) */ delegateRepresentativeVotingThresholds?: Cardano$1.DelegateRepresentativeThresholds; /** Minimum constitutional committee size */ constitutionalCommitteeMinSize?: number; /** Maximum constitutional committee term length (epochs) */ constitutionalCommitteeMaxTermLength?: number; /** Governance action lifetime (epochs) */ governanceActionLifetime?: number; /** Governance action deposit (lovelace) */ governanceActionDeposit?: number; /** dRep registration deposit (lovelace) */ delegateRepresentativeDeposit?: number; /** dRep maximum idle time (epochs) */ delegateRepresentativeMaxIdleTime?: number; } /** * Hard coded protocol parameters for the Cardano ledger. * These parameters are used as default values in the absence of network-provided parameters. */ declare const hardCodedProtocolParams: ProtocolParameters; interface MinFeeReferenceScripts { base: number; range: number; multiplier: number; } //#endregion //#region src/pretty.d.ts type Prettier = PlutusData | string | number | boolean | null; declare function prettify(data: Prettier, indent?: string): string; //#endregion //#region src/errors.d.ts type SelectionPhase = "wide" | "deep" | "final"; declare class UTxOSelectionError extends Error { phase: SelectionPhase; dearth: Value; availableInputs?: TransactionUnspentOutput[] | undefined; selectedInputs?: TransactionUnspentOutput[] | undefined; bestStep?: [bigint | number, Value, number] | undefined; constructor(phase: SelectionPhase, dearth: Value, availableInputs?: TransactionUnspentOutput[] | undefined, selectedInputs?: TransactionUnspentOutput[] | undefined, bestStep?: [bigint | number, Value, number] | undefined); } declare namespace nativescript_d_exports { export { address, after, allOf, anyOf, atLeastNOfK, before, justAddress }; } declare function allOf(...addresses: NativeScript[]): NativeScript; declare function anyOf(...addresses: NativeScript[]): NativeScript; declare function atLeastNOfK(n: number, ...addresses: NativeScript[]): NativeScript; declare function justAddress(address: string, networkId: NetworkId): NativeScript; declare function before(slot: Slot): NativeScript; declare function after(slot: Slot): NativeScript; declare function address(ns: NativeScript, networkId: NetworkId): Address; //#endregion export { Address, AddressType, Anchor, AnchorCore, AssetId, AssetName, AuxiliaryData, Bip32PrivateKey, Bip32PrivateKeyHex, Bip32PublicKey, Cardano, CborReader, CborReaderState, CborSet, CborWriter, Certificate, CertificateCore, CertificateType, Committee, CommitteeMember, Constitution, ConstitutionCore, ConstrPlutusData, CostModel, CostModels, Costmdls, Credential, CredentialCore, CredentialType, DRep, Datum, DatumHash, DatumKind, DelegateRepresentative, DelegateRepresentativeThresholds, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PrivateKey, Ed25519PrivateNormalKeyHex, Ed25519PublicKey, Ed25519PublicKeyHex, Ed25519Signature, Ed25519SignatureHex, EpochNo, Evaluator, ExUnits, Fraction, GovernanceAction, GovernanceActionId, GovernanceActionKind, Hash, Hash28ByteBase16, Hash32ByteBase16, HashAsPubKeyHex, HexBlob, Metadata, Metadatum, MetadatumList, MetadatumMap, MinFeeReferenceScripts, NativeScript, nativescript_d_exports as NativeScripts, NetworkId, type OpaqueString, PaymentAddress, PlutusData, PlutusDataKind, PlutusLanguageVersion, PlutusList, PlutusMap, PlutusV1Script, PlutusV2Script, PlutusV3Script, PolicyId, PolicyIdToHash, PoolId, PoolParameters, PoolRegistration, PoolRetirement, PoolVotingThresholds, Prettier, ProposalProcedure, ProtocolParameters, Redeemer, RedeemerPurpose, RedeemerTag, Redeemers, RegAndDeregCertificateTypes, RegisterDelegateRepresentative, RewardAccount, RewardAddress, SLOT_CONFIG_NETWORK, Script, ScriptAll, ScriptAny, ScriptHash, ScriptNOfK, ScriptPubkey, SelectionPhase, Serialization, Slot, SlotConfig, StakeAddressCertificate, StakeCredentialCertificateTypes, StakeDelegation, StakeDelegationCertificate, StakeDelegationCertificateTypes, StakeDeregistration, StakeRegistration, StakeRegistrationCertificateTypes, TimelockExpiry, TimelockStart, TokenMap, Transaction, TransactionBody, TransactionId, TransactionInput, TransactionInputSet, TransactionMetadatumKind, TransactionOutput, TransactionUnspentOutput, TransactionWitnessPlutusData, TransactionWitnessSet, TxCBOR, UTxOSelectionError, UnregisterDelegateRepresentative, UpdateDelegateRepresentative, Value, VkeyWitness, Vote, VoteDelegation, VoteDelegationCredentialCertificateTypes, Voter, VoterCore, VoterKind, VotingProcedure, VotingProcedures, addressFromBech32, addressFromCredential, addressFromCredentials, addressFromValidator, blake2b_224, blake2b_256, derivePublicKey, entropyToMnemonic, fromHex, generateMnemonic, getBurnAddress, getPaymentAddress, hardCodedProtocolParams, initCrypto, isCertType, isRewardAccount, mnemonicToEntropy, prettify, setInConwayEra, sha2_256, sha3_256, signMessage, toHex, typedHex, wordlist };