Skip to main content

@iota/iota.js

Table of contents​

Classes​

Variables​

Functions​

Interfaces​

Type Aliases​

Enumerations​

Variables​

MIN_ADDRESS_LENGTH​

β€’ Const MIN_ADDRESS_LENGTH: number

The minimum length of an address binary representation.


ALIAS_ID_LENGTH​

β€’ Const ALIAS_ID_LENGTH: number = 32

The length of an alias id.


MIN_ALIAS_ADDRESS_LENGTH​

β€’ Const MIN_ALIAS_ADDRESS_LENGTH: number

The minimum length of an alias address binary representation.


MIN_ED25519_ADDRESS_LENGTH​

β€’ Const MIN_ED25519_ADDRESS_LENGTH: number

The minimum length of an ed25519 address binary representation.


NFT_ID_LENGTH​

β€’ Const NFT_ID_LENGTH: number = 32

The length of an NFT Id.


MIN_NFT_ADDRESS_LENGTH​

β€’ Const MIN_NFT_ADDRESS_LENGTH: number

The minimum length of an nft address binary representation.


MAX_BLOCK_LENGTH​

β€’ Const MAX_BLOCK_LENGTH: number = 32768

The maximum length of a block.


MAX_NUMBER_PARENTS​

β€’ Const MAX_NUMBER_PARENTS: number = 8

The maximum number of parents.


MIN_NUMBER_PARENTS​

β€’ Const MIN_NUMBER_PARENTS: number = 1

The minimum number of parents.


UINT8_SIZE​

β€’ Const UINT8_SIZE: number = 1

Byte length for a uint8 field.


UINT16_SIZE​

β€’ Const UINT16_SIZE: number = 2

Byte length for a uint16 field.


UINT32_SIZE​

β€’ Const UINT32_SIZE: number = 4

Byte length for a uint32 field.


UINT64_SIZE​

β€’ Const UINT64_SIZE: number = 8

Byte length for a uint64 field.


UINT256_SIZE​

β€’ Const UINT256_SIZE: number = 32

Byte length for a uint256 field.


BLOCK_ID_LENGTH​

β€’ Const BLOCK_ID_LENGTH: number = Blake2b.SIZE_256

Byte length for a block id.


TRANSACTION_ID_LENGTH​

β€’ Const TRANSACTION_ID_LENGTH: number = Blake2b.SIZE_256

Byte length for a transaction id.


MERKLE_PROOF_LENGTH​

β€’ Const MERKLE_PROOF_LENGTH: number = Blake2b.SIZE_256

Byte length for a merkle prrof.


TYPE_LENGTH​

β€’ Const TYPE_LENGTH: number = UINT32_SIZE

Byte length for a type length.


SMALL_TYPE_LENGTH​

β€’ Const SMALL_TYPE_LENGTH: number = UINT8_SIZE

Byte length for a small type length.


STRING_LENGTH​

β€’ Const STRING_LENGTH: number = UINT16_SIZE

Byte length for a string length.


ARRAY_LENGTH​

β€’ Const ARRAY_LENGTH: number = UINT16_SIZE

Byte length for an array length.


MIN_FEATURES_LENGTH​

β€’ Const MIN_FEATURES_LENGTH: number = UINT8_SIZE

The minimum length of a featurs tokens list.


MIN_FEATURE_LENGTH​

β€’ Const MIN_FEATURE_LENGTH: number

The minimum length of a feature binary representation.


MIN_ISSUER_FEATURE_LENGTH​

β€’ Const MIN_ISSUER_FEATURE_LENGTH: number

The minimum length of a issuer feature binary representation.


MIN_METADATA_FEATURE_LENGTH​

β€’ Const MIN_METADATA_FEATURE_LENGTH: number

The minimum length of a metadata feature block binary representation.


MIN_SENDER_FEATURE_LENGTH​

β€’ Const MIN_SENDER_FEATURE_LENGTH: number

The minimum length of a sender feature binary representation.


MIN_TAG_FEATURE_LENGTH​

β€’ Const MIN_TAG_FEATURE_LENGTH: number

The minimum length of a tag feature binary representation.


TAIL_HASH_LENGTH​

β€’ Const TAIL_HASH_LENGTH: number = 49

The length of the tail hash length in bytes.


MIN_MIGRATED_FUNDS_LENGTH​

β€’ Const MIN_MIGRATED_FUNDS_LENGTH: number

The minimum length of a migrated fund binary representation.


MAX_FUNDS_COUNT​

β€’ Const MAX_FUNDS_COUNT: number = 127

The maximum number of funds.


MIN_INPUT_LENGTH​

β€’ Const MIN_INPUT_LENGTH: number

The minimum length of an input binary representation.


MIN_INPUT_COUNT​

β€’ Const MIN_INPUT_COUNT: number = 1

The minimum number of inputs.


MAX_INPUT_COUNT​

β€’ Const MAX_INPUT_COUNT: number = 128

The maximum number of inputs.


MIN_TREASURY_INPUT_LENGTH​

β€’ Const MIN_TREASURY_INPUT_LENGTH: number

The minimum length of a treasury input binary representation.


MIN_UTXO_INPUT_LENGTH​

β€’ Const MIN_UTXO_INPUT_LENGTH: number

The minimum length of a utxo input binary representation.


MIN_MILESTONE_OPTION_LENGTH​

β€’ Const MIN_MILESTONE_OPTION_LENGTH: number

The minimum length of a milestone option binary representation.


MIN_PROTOCOL_PARAMS_MILESTONE_OPTION_LENGTH​

β€’ Const MIN_PROTOCOL_PARAMS_MILESTONE_OPTION_LENGTH: number

The minimum length of a protocol params milestone option binary representation.


MIN_RECEIPT_MILESTONE_OPTION_LENGTH​

β€’ Const MIN_RECEIPT_MILESTONE_OPTION_LENGTH: number

The minimum length of a receipt milestone option binary representation.


MIN_ALIAS_OUTPUT_LENGTH​

β€’ Const MIN_ALIAS_OUTPUT_LENGTH: number

The minimum length of a alias output binary representation.


MIN_BASIC_OUTPUT_LENGTH​

β€’ Const MIN_BASIC_OUTPUT_LENGTH: number

The minimum length of a basic output binary representation.


MIN_FOUNDRY_OUTPUT_LENGTH​

β€’ Const MIN_FOUNDRY_OUTPUT_LENGTH: number

The minimum length of a foundry output binary representation.


MIN_NFT_OUTPUT_LENGTH​

β€’ Const MIN_NFT_OUTPUT_LENGTH: number

The minimum length of a nft output binary representation.


MIN_OUTPUT_LENGTH​

β€’ Const MIN_OUTPUT_LENGTH: number

The minimum length of an output binary representation.


MIN_OUTPUT_COUNT​

β€’ Const MIN_OUTPUT_COUNT: number = 1

The minimum number of outputs.


MAX_OUTPUT_COUNT​

β€’ Const MAX_OUTPUT_COUNT: number = 128

The maximum number of outputs.


MIN_TREASURY_OUTPUT_LENGTH​

β€’ Const MIN_TREASURY_OUTPUT_LENGTH: number

The minimum length of a treasury output binary representation.


MIN_MILESTONE_PAYLOAD_LENGTH​

β€’ Const MIN_MILESTONE_PAYLOAD_LENGTH: number

The minimum length of a milestone payload binary representation.


MIN_PAYLOAD_LENGTH​

β€’ Const MIN_PAYLOAD_LENGTH: number

The minimum length of a payload binary representation.


MIN_TAGGED_DATA_PAYLOAD_LENGTH​

β€’ Const MIN_TAGGED_DATA_PAYLOAD_LENGTH: number

The minimum length of a tagged data payload binary representation.


MAX_TAG_LENGTH​

β€’ Const MAX_TAG_LENGTH: number = 64

The maximum length of a tag.


MIN_TRANSACTION_PAYLOAD_LENGTH​

β€’ Const MIN_TRANSACTION_PAYLOAD_LENGTH: number

The minimum length of a transaction payload binary representation.


MIN_TREASURY_TRANSACTION_PAYLOAD_LENGTH​

β€’ Const MIN_TREASURY_TRANSACTION_PAYLOAD_LENGTH: number

The minimum length of a treasury transaction payload binary representation.


MIN_ED25519_SIGNATURE_LENGTH​

β€’ Const MIN_ED25519_SIGNATURE_LENGTH: number

The minimum length of an ed25519 signature binary representation.


MIN_SIGNATURE_LENGTH​

β€’ Const MIN_SIGNATURE_LENGTH: number = MIN_ED25519_SIGNATURE_LENGTH

The minimum length of a signature binary representation.


MIN_SIMPLE_TOKEN_SCHEME_LENGTH​

β€’ Const MIN_SIMPLE_TOKEN_SCHEME_LENGTH: number

The minimum length of an simple token scheme binary representation.


MIN_TOKEN_SCHEME_LENGTH​

β€’ Const MIN_TOKEN_SCHEME_LENGTH: number = MIN_SIMPLE_TOKEN_SCHEME_LENGTH

The minimum length of a simple token scheme binary representation.


MIN_TRANSACTION_ESSENCE_LENGTH​

β€’ Const MIN_TRANSACTION_ESSENCE_LENGTH: number

The minimum length of a transaction essence binary representation.


MIN_ADDRESS_UNLOCK_CONDITION_LENGTH​

β€’ Const MIN_ADDRESS_UNLOCK_CONDITION_LENGTH: number

The minimum length of an address unlock condition binary representation.


MIN_EXPIRATION_UNLOCK_CONDITION_LENGTH​

β€’ Const MIN_EXPIRATION_UNLOCK_CONDITION_LENGTH: number

The minimum length of an expiration unlock condition binary representation.


MIN_GOVERNOR_ADDRESS_UNLOCK_CONDITION_LENGTH​

β€’ Const MIN_GOVERNOR_ADDRESS_UNLOCK_CONDITION_LENGTH: number

The minimum length of an governor unlock condition binary representation.


MIN_IMMUTABLE_ALIAS_UNLOCK_CONDITION_LENGTH​

β€’ Const MIN_IMMUTABLE_ALIAS_UNLOCK_CONDITION_LENGTH: number

The minimum length of an immutable alias unlock condition binary representation.


MIN_STATE_CONTROLLER_ADDRESS_UNLOCK_CONDITION_LENGTH​

β€’ Const MIN_STATE_CONTROLLER_ADDRESS_UNLOCK_CONDITION_LENGTH: number

The minimum length of an state controller address unlock condition binary representation.


MIN_STORAGE_DEPOSIT_RETURN_UNLOCK_CONDITION_LENGTH​

β€’ Const MIN_STORAGE_DEPOSIT_RETURN_UNLOCK_CONDITION_LENGTH: number

The minimum length of an storage deposit return unlock condition binary representation.


MIN_TIMELOCK_UNLOCK_CONDITION_LENGTH​

β€’ Const MIN_TIMELOCK_UNLOCK_CONDITION_LENGTH: number

The minimum length of an timelock unlock condition binary representation.


MIN_UNLOCK_CONDITIONS_LENGTH​

β€’ Const MIN_UNLOCK_CONDITIONS_LENGTH: number = UINT8_SIZE

The minimum length of a unlock conditions list.


MIN_UNLOCK_CONDITION_LENGTH​

β€’ Const MIN_UNLOCK_CONDITION_LENGTH: number

The minimum length of a unlock conditions binary representation.


MIN_ALIAS_UNLOCK_LENGTH​

β€’ Const MIN_ALIAS_UNLOCK_LENGTH: number

The minimum length of a alias unlock binary representation.


MIN_NFT_UNLOCK_LENGTH​

β€’ Const MIN_NFT_UNLOCK_LENGTH: number

The minimum length of a nft unlock binary representation.


MIN_REFERENCE_UNLOCK_LENGTH​

β€’ Const MIN_REFERENCE_UNLOCK_LENGTH: number

The minimum length of a reference unlock binary representation.


MIN_SIGNATURE_UNLOCK_LENGTH​

β€’ Const MIN_SIGNATURE_UNLOCK_LENGTH: number

The minimum length of a signature unlock binary representation.


MIN_UNLOCK_LENGTH​

β€’ Const MIN_UNLOCK_LENGTH: number

The minimum length of an unlock binary representation.


DEFAULT_PROTOCOL_VERSION​

β€’ Const DEFAULT_PROTOCOL_VERSION: number = 2

The default protocol version.


TRANSACTION_ESSENCE_TYPE​

β€’ Const TRANSACTION_ESSENCE_TYPE: 1

The global type for the transaction essence.


INPUTS_COMMITMENT_SIZE​

β€’ Const INPUTS_COMMITMENT_SIZE: number = Blake2b.SIZE_256

Inputs commitment size.


ALIAS_ADDRESS_TYPE​

β€’ Const ALIAS_ADDRESS_TYPE: 8

The global type for the alias address type.


ED25519_ADDRESS_TYPE​

β€’ Const ED25519_ADDRESS_TYPE: 0

The global type for the ed25519 address type.


NFT_ADDRESS_TYPE​

β€’ Const NFT_ADDRESS_TYPE: 16

The global type for the NFT address type.


ISSUER_FEATURE_TYPE​

β€’ Const ISSUER_FEATURE_TYPE: 1

The global type for the issuer feature.


METADATA_FEATURE_TYPE​

β€’ Const METADATA_FEATURE_TYPE: 2

The global type for the metadata feature.


SENDER_FEATURE_TYPE​

β€’ Const SENDER_FEATURE_TYPE: 0

The global type for the sender feature.


TAG_FEATURE_TYPE​

β€’ Const TAG_FEATURE_TYPE: 3

The global type for the tag feature.


TREASURY_INPUT_TYPE​

β€’ Const TREASURY_INPUT_TYPE: 1

The global type for the treasury input.


UTXO_INPUT_TYPE​

β€’ Const UTXO_INPUT_TYPE: 0

The global type for the input.


PROTOCOL_PARAMETERS_MILESTONE_OPTION_TYPE​

β€’ Const PROTOCOL_PARAMETERS_MILESTONE_OPTION_TYPE: 1

The global type for the option.


RECEIPT_MILESTONE_OPTION_TYPE​

β€’ Const RECEIPT_MILESTONE_OPTION_TYPE: 0

The global type for the option.


ALIAS_OUTPUT_TYPE​

β€’ Const ALIAS_OUTPUT_TYPE: 4

The global type for the alias output.


BASIC_OUTPUT_TYPE​

β€’ Const BASIC_OUTPUT_TYPE: 3

The global type for the basic output.


FOUNDRY_OUTPUT_TYPE​

β€’ Const FOUNDRY_OUTPUT_TYPE: 5

The global type for the foundry output.


NFT_OUTPUT_TYPE​

β€’ Const NFT_OUTPUT_TYPE: 6

The global type for the NFT output.


TREASURY_OUTPUT_TYPE​

β€’ Const TREASURY_OUTPUT_TYPE: 2

The global type for the treasury output.


MILESTONE_PAYLOAD_TYPE​

β€’ Const MILESTONE_PAYLOAD_TYPE: 7

The global type for the payload.


TAGGED_DATA_PAYLOAD_TYPE​

β€’ Const TAGGED_DATA_PAYLOAD_TYPE: 5

The global type for the payload.


TRANSACTION_PAYLOAD_TYPE​

β€’ Const TRANSACTION_PAYLOAD_TYPE: 6

The global type for the payload.


TREASURY_TRANSACTION_PAYLOAD_TYPE​

β€’ Const TREASURY_TRANSACTION_PAYLOAD_TYPE: 4

The global type for the payload.


ED25519_SIGNATURE_TYPE​

β€’ Const ED25519_SIGNATURE_TYPE: 0

The global type for the signature type.


SIMPLE_TOKEN_SCHEME_TYPE​

β€’ Const SIMPLE_TOKEN_SCHEME_TYPE: 0

The global type for the simple token scheme.


ADDRESS_UNLOCK_CONDITION_TYPE​

β€’ Const ADDRESS_UNLOCK_CONDITION_TYPE: 0

The global type for the address unlock condition.


EXPIRATION_UNLOCK_CONDITION_TYPE​

β€’ Const EXPIRATION_UNLOCK_CONDITION_TYPE: 3

The global type for the expiration unlock condition.


GOVERNOR_ADDRESS_UNLOCK_CONDITION_TYPE​

β€’ Const GOVERNOR_ADDRESS_UNLOCK_CONDITION_TYPE: 5

The global type for the governor address unlock condition.


IMMUTABLE_ALIAS_UNLOCK_CONDITION_TYPE​

β€’ Const IMMUTABLE_ALIAS_UNLOCK_CONDITION_TYPE: 6

The global type for the immutable alias unlock condition.


STATE_CONTROLLER_ADDRESS_UNLOCK_CONDITION_TYPE​

β€’ Const STATE_CONTROLLER_ADDRESS_UNLOCK_CONDITION_TYPE: 4

The global type for the state controller unlock condition.


STORAGE_DEPOSIT_RETURN_UNLOCK_CONDITION_TYPE​

β€’ Const STORAGE_DEPOSIT_RETURN_UNLOCK_CONDITION_TYPE: 1

The global type for the storage deposit return unlock condition.


TIMELOCK_UNLOCK_CONDITION_TYPE​

β€’ Const TIMELOCK_UNLOCK_CONDITION_TYPE: 2

The global type for the timelock unlock condition.


ALIAS_UNLOCK_TYPE​

β€’ Const ALIAS_UNLOCK_TYPE: 2

The global type for the alias unlock.


NFT_UNLOCK_TYPE​

β€’ Const NFT_UNLOCK_TYPE: 3

The global type for the NFT unlock.


REFERENCE_UNLOCK_TYPE​

β€’ Const REFERENCE_UNLOCK_TYPE: 1

The global type for the reference unlock.


SIGNATURE_UNLOCK_TYPE​

β€’ Const SIGNATURE_UNLOCK_TYPE: 0

The global type for the unlock.


CONFLICT_REASON_STRINGS​

β€’ Const CONFLICT_REASON_STRINGS: { [key in ConflictReason]: string }

Conflict reason strings.


ED25519_SEED_TYPE​

β€’ Const ED25519_SEED_TYPE: number = 1

The global type for the seed.

Functions​

deserializeAddress​

β–Έ deserializeAddress(readStream): AddressTypes

Deserialize the address from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

AddressTypes

The deserialized object.


serializeAddress​

β–Έ serializeAddress(writeStream, object): void

Serialize the address to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectITypeBase<number>The object to serialize.

Returns​

void


deserializeAliasAddress​

β–Έ deserializeAliasAddress(readStream): IAliasAddress

Deserialize the alias address from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IAliasAddress

The deserialized object.


serializeAliasAddress​

β–Έ serializeAliasAddress(writeStream, object): void

Serialize the alias address to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIAliasAddressThe object to serialize.

Returns​

void


deserializeEd25519Address​

β–Έ deserializeEd25519Address(readStream): IEd25519Address

Deserialize the Ed25519 address from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IEd25519Address

The deserialized object.


serializeEd25519Address​

β–Έ serializeEd25519Address(writeStream, object): void

Serialize the ed25519 address to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIEd25519AddressThe object to serialize.

Returns​

void


deserializeNftAddress​

β–Έ deserializeNftAddress(readStream): INftAddress

Deserialize the nft address from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

INftAddress

The deserialized object.


serializeNftAddress​

β–Έ serializeNftAddress(writeStream, object): void

Serialize the nft address to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectINftAddressThe object to serialize.

Returns​

void


deserializeBlock​

β–Έ deserializeBlock(readStream): IBlock

Deserialize the block from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe block to deserialize.

Returns​

IBlock

The deserialized block.


serializeBlock​

β–Έ serializeBlock(writeStream, object): void

Serialize the block essence to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIBlockThe object to serialize.

Returns​

void


deserializeFeatures​

β–Έ deserializeFeatures(readStream): FeatureTypes[] | undefined

Deserialize the feature from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

FeatureTypes[] | undefined

The deserialized object.


serializeFeatures​

β–Έ serializeFeatures(writeStream, objects): void

Serialize the feature to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectsundefined | FeatureTypes[]The objects to serialize.

Returns​

void


deserializeFeature​

β–Έ deserializeFeature(readStream): FeatureTypes

Deserialize the feature from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

FeatureTypes

The deserialized object.


serializeFeature​

β–Έ serializeFeature(writeStream, object): void

Serialize the feature to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectITypeBase<number>The object to serialize.

Returns​

void


deserializeIssuerFeature​

β–Έ deserializeIssuerFeature(readStream): IIssuerFeature

Deserialize the issuer feature from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IIssuerFeature

The deserialized object.


serializeIssuerFeature​

β–Έ serializeIssuerFeature(writeStream, object): void

Serialize the issuer feature to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIIssuerFeatureThe object to serialize.

Returns​

void


deserializeMetadataFeature​

β–Έ deserializeMetadataFeature(readStream): IMetadataFeature

Deserialize the metadata feature block from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IMetadataFeature

The deserialized object.


serializeMetadataFeature​

β–Έ serializeMetadataFeature(writeStream, object): void

Serialize the metadata feature to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIMetadataFeatureThe object to serialize.

Returns​

void


deserializeSenderFeature​

β–Έ deserializeSenderFeature(readStream): ISenderFeature

Deserialize the sender feature from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

ISenderFeature

The deserialized object.


serializeSenderFeature​

β–Έ serializeSenderFeature(writeStream, object): void

Serialize the sender feature to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectISenderFeatureThe object to serialize.

Returns​

void


deserializeTagFeature​

β–Έ deserializeTagFeature(readStream): ITagFeature

Deserialize the tag feature from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

ITagFeature

The deserialized object.


serializeTagFeature​

β–Έ serializeTagFeature(writeStream, object): void

Serialize the tag feature to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectITagFeatureThe object to serialize.

Returns​

void


deserializeFunds​

β–Έ deserializeFunds(readStream): IMigratedFunds[]

Deserialize the receipt payload funds from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IMigratedFunds[]

The deserialized object.


serializeFunds​

β–Έ serializeFunds(writeStream, objects): void

Serialize the receipt payload funds to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectsIMigratedFunds[]The objects to serialize.

Returns​

void


deserializeMigratedFunds​

β–Έ deserializeMigratedFunds(readStream): IMigratedFunds

Deserialize the migrated fund from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IMigratedFunds

The deserialized object.


serializeMigratedFunds​

β–Έ serializeMigratedFunds(writeStream, object): void

Serialize the migrated funds to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIMigratedFundsThe object to serialize.

Returns​

void


deserializeInputs​

β–Έ deserializeInputs(readStream): InputTypes[]

Deserialize the inputs from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

InputTypes[]

The deserialized object.


serializeInputs​

β–Έ serializeInputs(writeStream, objects): void

Serialize the inputs to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectsInputTypes[]The objects to serialize.

Returns​

void


deserializeInput​

β–Έ deserializeInput(readStream): InputTypes

Deserialize the input from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

InputTypes

The deserialized object.


serializeInput​

β–Έ serializeInput(writeStream, object): void

Serialize the input to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectInputTypesThe object to serialize.

Returns​

void


deserializeTreasuryInput​

β–Έ deserializeTreasuryInput(readStream): ITreasuryInput

Deserialize the treasury input from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

ITreasuryInput

The deserialized object.


serializeTreasuryInput​

β–Έ serializeTreasuryInput(writeStream, object): void

Serialize the treasury input to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectITreasuryInputThe object to serialize.

Returns​

void


deserializeUTXOInput​

β–Έ deserializeUTXOInput(readStream): IUTXOInput

Deserialize the utxo input from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IUTXOInput

The deserialized object.


serializeUTXOInput​

β–Έ serializeUTXOInput(writeStream, object): void

Serialize the utxo input to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIUTXOInputThe object to serialize.

Returns​

void


deserializeMilestoneOptions​

β–Έ deserializeMilestoneOptions(readStream): MilestoneOptionTypes[]

Deserialize the milestone options from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

MilestoneOptionTypes[]

The deserialized object.


serializeMilestoneOptions​

β–Έ serializeMilestoneOptions(writeStream, objects): void

Serialize the milestone options to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectsMilestoneOptionTypes[]The objects to serialize.

Returns​

void


deserializeMilestoneOption​

β–Έ deserializeMilestoneOption(readStream): MilestoneOptionTypes

Deserialize the milestone options from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

MilestoneOptionTypes

The deserialized object.


serializeMilestoneOption​

β–Έ serializeMilestoneOption(writeStream, object): void

Serialize the milestone option to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectITypeBase<number>The object to serialize.

Returns​

void


deserializeProtocolParamsMilestoneOption​

β–Έ deserializeProtocolParamsMilestoneOption(readStream): IProtocolParamsMilestoneOption

Deserialize the protocol params milestone option from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IProtocolParamsMilestoneOption

The deserialized object.


serializeProtocolParamsMilestoneOption​

β–Έ serializeProtocolParamsMilestoneOption(writeStream, object): void

Serialize the protocol params milestone option to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIProtocolParamsMilestoneOptionThe object to serialize.

Returns​

void


deserializeReceiptMilestoneOption​

β–Έ deserializeReceiptMilestoneOption(readStream): IReceiptMilestoneOption

Deserialize the receipt milestone option from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IReceiptMilestoneOption

The deserialized object.


serializeReceiptMilestoneOption​

β–Έ serializeReceiptMilestoneOption(writeStream, object): void

Serialize the receipt milestone option to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIReceiptMilestoneOptionThe object to serialize.

Returns​

void


deserializeAliasOutput​

β–Έ deserializeAliasOutput(readStream): IAliasOutput

Deserialize the alias output from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IAliasOutput

The deserialized object.


serializeAliasOutput​

β–Έ serializeAliasOutput(writeStream, object): void

Serialize the alias output to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIAliasOutputThe object to serialize.

Returns​

void


deserializeBasicOutput​

β–Έ deserializeBasicOutput(readStream): IBasicOutput

Deserialize the basic output from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IBasicOutput

The deserialized object.


serializeBasicOutput​

β–Έ serializeBasicOutput(writeStream, object): void

Serialize the basic output to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIBasicOutputThe object to serialize.

Returns​

void


deserializeFoundryOutput​

β–Έ deserializeFoundryOutput(readStream): IFoundryOutput

Deserialize the foundry output from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IFoundryOutput

The deserialized object.


serializeFoundryOutput​

β–Έ serializeFoundryOutput(writeStream, object): void

Serialize the foundry output to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIFoundryOutputThe object to serialize.

Returns​

void


deserializeNftOutput​

β–Έ deserializeNftOutput(readStream): INftOutput

Deserialize the nft output from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

INftOutput

The deserialized object.


serializeNftOutput​

β–Έ serializeNftOutput(writeStream, object): void

Serialize the nft output to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectINftOutputThe object to serialize.

Returns​

void


deserializeOutputs​

β–Έ deserializeOutputs(readStream): OutputTypes[]

Deserialize the outputs from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

OutputTypes[]

The deserialized object.


serializeOutputs​

β–Έ serializeOutputs(writeStream, objects): void

Serialize the outputs to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectsOutputTypes[]The objects to serialize.

Returns​

void


deserializeOutput​

β–Έ deserializeOutput(readStream): OutputTypes

Deserialize the output from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

OutputTypes

The deserialized object.


serializeOutput​

β–Έ serializeOutput(writeStream, object): void

Serialize the output to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectITypeBase<number>The object to serialize.

Returns​

void


deserializeTreasuryOutput​

β–Έ deserializeTreasuryOutput(readStream): ITreasuryOutput

Deserialize the treasury output from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

ITreasuryOutput

The deserialized object.


serializeTreasuryOutput​

β–Έ serializeTreasuryOutput(writeStream, object): void

Serialize the treasury output to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectITreasuryOutputThe object to serialize.

Returns​

void


deserializeMilestonePayload​

β–Έ deserializeMilestonePayload(readStream): IMilestonePayload

Deserialize the milestone payload from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IMilestonePayload

The deserialized object.


serializeMilestonePayload​

β–Έ serializeMilestonePayload(writeStream, object): void

Serialize the milestone payload to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIMilestonePayloadThe object to serialize.

Returns​

void


serializeMilestoneEssence​

β–Έ serializeMilestoneEssence(writeStream, object): void

Serialize the milestone payload to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIMilestonePayloadThe object to serialize.

Returns​

void


deserializePayload​

β–Έ deserializePayload(readStream): PayloadTypes | undefined

Deserialize the payload from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

PayloadTypes | undefined

The deserialized object.


serializePayload​

β–Έ serializePayload(writeStream, object): void

Serialize the payload essence to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectundefined | PayloadTypesThe object to serialize.

Returns​

void


deserializeTaggedDataPayload​

β–Έ deserializeTaggedDataPayload(readStream): ITaggedDataPayload

Deserialize the tagged data payload from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

ITaggedDataPayload

The deserialized object.


serializeTaggedDataPayload​

β–Έ serializeTaggedDataPayload(writeStream, object): void

Serialize the tagged data payload to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectITaggedDataPayloadThe object to serialize.

Returns​

void


deserializeTransactionPayload​

β–Έ deserializeTransactionPayload(readStream): ITransactionPayload

Deserialize the transaction payload from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

ITransactionPayload

The deserialized object.


serializeTransactionPayload​

β–Έ serializeTransactionPayload(writeStream, object): void

Serialize the transaction payload to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectITransactionPayloadThe object to serialize.

Returns​

void


deserializeTreasuryTransactionPayload​

β–Έ deserializeTreasuryTransactionPayload(readStream): ITreasuryTransactionPayload

Deserialize the treasury transaction payload from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

ITreasuryTransactionPayload

The deserialized object.


serializeTreasuryTransactionPayload​

β–Έ serializeTreasuryTransactionPayload(writeStream, object): void

Serialize the treasury transaction payload to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectITreasuryTransactionPayloadThe object to serialize.

Returns​

void


deserializeEd25519Signature​

β–Έ deserializeEd25519Signature(readStream): IEd25519Signature

Deserialize the Ed25519 signature from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IEd25519Signature

The deserialized object.


serializeEd25519Signature​

β–Έ serializeEd25519Signature(writeStream, object): void

Serialize the Ed25519 signature to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIEd25519SignatureThe object to serialize.

Returns​

void


deserializeSignature​

β–Έ deserializeSignature(readStream): SignatureTypes

Deserialize the signature from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

SignatureTypes

The deserialized object.


serializeSignature​

β–Έ serializeSignature(writeStream, object): void

Serialize the signature to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIEd25519SignatureThe object to serialize.

Returns​

void


deserializeSimpleTokenScheme​

β–Έ deserializeSimpleTokenScheme(readStream): ISimpleTokenScheme

Deserialize the simple token scheme from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

ISimpleTokenScheme

The deserialized object.


serializeSimpleTokenScheme​

β–Έ serializeSimpleTokenScheme(writeStream, object): void

Serialize the simple token scheme to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectISimpleTokenSchemeThe object to serialize.

Returns​

void


deserializeTokenScheme​

β–Έ deserializeTokenScheme(readStream): TokenSchemeTypes

Deserialize the token scheme from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

TokenSchemeTypes

The deserialized object.


serializeTokenScheme​

β–Έ serializeTokenScheme(writeStream, object): void

Serialize the token scheme to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectISimpleTokenSchemeThe object to serialize.

Returns​

void


deserializeTransactionEssence​

β–Έ deserializeTransactionEssence(readStream): ITransactionEssence

Deserialize the transaction essence from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

ITransactionEssence

The deserialized object.


serializeTransactionEssence​

β–Έ serializeTransactionEssence(writeStream, object): void

Serialize the transaction essence to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectITransactionEssenceThe object to serialize.

Returns​

void


deserializeAddressUnlockCondition​

β–Έ deserializeAddressUnlockCondition(readStream): IAddressUnlockCondition

Deserialize the address unlock condition from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IAddressUnlockCondition

The deserialized object.


serializeAddressUnlockCondition​

β–Έ serializeAddressUnlockCondition(writeStream, object): void

Serialize the address unlock condition to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIAddressUnlockConditionThe object to serialize.

Returns​

void


deserializeExpirationUnlockCondition​

β–Έ deserializeExpirationUnlockCondition(readStream): IExpirationUnlockCondition

Deserialize the expiration unlock condition from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IExpirationUnlockCondition

The deserialized object.


serializeExpirationUnlockCondition​

β–Έ serializeExpirationUnlockCondition(writeStream, object): void

Serialize the expiration unlock condition to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIExpirationUnlockConditionThe object to serialize.

Returns​

void


deserializeGovernorAddressUnlockCondition​

β–Έ deserializeGovernorAddressUnlockCondition(readStream): IGovernorAddressUnlockCondition

Deserialize the governor address unlock condition from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IGovernorAddressUnlockCondition

The deserialized object.


serializeGovernorAddressUnlockCondition​

β–Έ serializeGovernorAddressUnlockCondition(writeStream, object): void

Serialize the governor address unlock condition to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIGovernorAddressUnlockConditionThe object to serialize.

Returns​

void


deserializeImmutableAliasUnlockCondition​

β–Έ deserializeImmutableAliasUnlockCondition(readStream): IImmutableAliasUnlockCondition

Deserialize the immutable alias unlock condition from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IImmutableAliasUnlockCondition

The deserialized object.


serializeImmutableAliasUnlockCondition​

β–Έ serializeImmutableAliasUnlockCondition(writeStream, object): void

Serialize the immutable alias unlock condition to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIImmutableAliasUnlockConditionThe object to serialize.

Returns​

void


deserializeStateControllerAddressUnlockCondition​

β–Έ deserializeStateControllerAddressUnlockCondition(readStream): IStateControllerAddressUnlockCondition

Deserialize the state controller address unlock condition from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IStateControllerAddressUnlockCondition

The deserialized object.


serializeStateControllerAddressUnlockCondition​

β–Έ serializeStateControllerAddressUnlockCondition(writeStream, object): void

Serialize the state controller address unlock condition to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIStateControllerAddressUnlockConditionThe object to serialize.

Returns​

void


deserializeStorageDepositReturnUnlockCondition​

β–Έ deserializeStorageDepositReturnUnlockCondition(readStream): IStorageDepositReturnUnlockCondition

Deserialize the storage deposit return unlock condition from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IStorageDepositReturnUnlockCondition

The deserialized object.


serializeStorageDepositReturnUnlockCondition​

β–Έ serializeStorageDepositReturnUnlockCondition(writeStream, object): void

Serialize the storage deposit return unlock condition to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIStorageDepositReturnUnlockConditionThe object to serialize.

Returns​

void


deserializeTimelockUnlockCondition​

β–Έ deserializeTimelockUnlockCondition(readStream): ITimelockUnlockCondition

Deserialize the timelock unlock condition from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

ITimelockUnlockCondition

The deserialized object.


serializeTimelockUnlockCondition​

β–Έ serializeTimelockUnlockCondition(writeStream, object): void

Serialize the timelock unlock condition to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectITimelockUnlockConditionThe object to serialize.

Returns​

void


deserializeUnlockConditions​

β–Έ deserializeUnlockConditions(readStream): UnlockConditionTypes[]

Deserialize the unlock conditions from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

UnlockConditionTypes[]

The deserialized object.


serializeUnlockConditions​

β–Έ serializeUnlockConditions(writeStream, objects): void

Serialize the unlock conditions to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectsUnlockConditionTypes[]The objects to serialize.

Returns​

void


deserializeUnlockCondition​

β–Έ deserializeUnlockCondition(readStream): UnlockConditionTypes

Deserialize the unlock condition from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

UnlockConditionTypes

The deserialized object.


serializeUnlockCondition​

β–Έ serializeUnlockCondition(writeStream, object): void

Serialize the unlock condition to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectITypeBase<number>The object to serialize.

Returns​

void


deserializeAliasUnlock​

β–Έ deserializeAliasUnlock(readStream): IAliasUnlock

Deserialize the alias unlock from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IAliasUnlock

The deserialized object.


serializeAliasUnlock​

β–Έ serializeAliasUnlock(writeStream, object): void

Serialize the alias unlock to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIAliasUnlockThe object to serialize.

Returns​

void


deserializeNftUnlock​

β–Έ deserializeNftUnlock(readStream): INftUnlock

Deserialize the nft unlock from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

INftUnlock

The deserialized object.


serializeNftUnlock​

β–Έ serializeNftUnlock(writeStream, object): void

Serialize the nft unlock to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectINftUnlockThe object to serialize.

Returns​

void


deserializeReferenceUnlock​

β–Έ deserializeReferenceUnlock(readStream): IReferenceUnlock

Deserialize the reference unlock from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

IReferenceUnlock

The deserialized object.


serializeReferenceUnlock​

β–Έ serializeReferenceUnlock(writeStream, object): void

Serialize the reference unlock to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectIReferenceUnlockThe object to serialize.

Returns​

void


deserializeSignatureUnlock​

β–Έ deserializeSignatureUnlock(readStream): ISignatureUnlock

Deserialize the signature unlock from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

ISignatureUnlock

The deserialized object.


serializeSignatureUnlock​

β–Έ serializeSignatureUnlock(writeStream, object): void

Serialize the signature unlock to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectISignatureUnlockThe object to serialize.

Returns​

void


deserializeUnlocks​

β–Έ deserializeUnlocks(readStream): UnlockTypes[]

Deserialize the unlocks from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

UnlockTypes[]

The deserialized object.


serializeUnlocks​

β–Έ serializeUnlocks(writeStream, objects): void

Serialize the unlocks to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectsUnlockTypes[]The objects to serialize.

Returns​

void


deserializeUnlock​

β–Έ deserializeUnlock(readStream): UnlockTypes

Deserialize the unlock from binary.

Parameters​

NameTypeDescription
readStreamReadStreamThe stream to read the data from.

Returns​

UnlockTypes

The deserialized object.


serializeUnlock​

β–Έ serializeUnlock(writeStream, object): void

Serialize the unlock to binary.

Parameters​

NameTypeDescription
writeStreamWriteStreamThe stream to write the data to.
objectUnlockTypesThe object to serialize.

Returns​

void


addressBalance​

β–Έ addressBalance(client, addressBech32): Promise<{}>

Get the balance for an address.

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to get the information from.
addressBech32stringThe address to get the balances for.

Returns​

Promise<{}>

The balance.


generateBip44Path​

β–Έ generateBip44Path(accountIndex, addressIndex, isInternal): Bip32Path

Generate a bip44 path based on all its parts.

Parameters​

NameTypeDescription
accountIndexnumberThe account index.
addressIndexnumberThe address index.
isInternalbooleanIs this an internal address.

Returns​

Bip32Path

The generated address.


generateBip44Address​

β–Έ generateBip44Address(generatorState): string

Generate addresses based on the account indexing style.

Parameters​

NameTypeDescription
generatorStateIBip44GeneratorStateThe address state.

Returns​

string

The key pair for the address.


getBalance​

β–Έ getBalance(client, seed, accountIndex, addressOptions?): Promise<BigInteger>

Get the balance for a list of addresses.

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to send the transfer with.
seedISeedThe seed.
accountIndexnumberThe account index in the wallet.
addressOptions?ObjectOptional address configuration for balance address lookups.

Returns​

Promise<BigInteger>

The balance.


getUnspentAddress​

β–Έ getUnspentAddress(client, seed, accountIndex, addressOptions?): Promise<{} | undefined>

Get the first unspent address.

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to send the transfer with.
seedISeedThe seed to use for address generation.
accountIndexnumberThe account index in the wallet.
addressOptions?ObjectOptional address configuration for balance address lookups.

Returns​

Promise<{} | undefined>

The first unspent address.


getUnspentAddresses​

β–Έ getUnspentAddresses(client, seed, accountIndex, addressOptions?): Promise<{}[]>

Get all the unspent addresses.

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to send the transfer with.
seedISeedThe seed to use for address generation.
accountIndexnumberThe account index in the wallet.
addressOptions?ObjectOptional address configuration for balance address lookups.

Returns​

Promise<{}[]>

All the unspent addresses.


getUnspentAddressesWithAddressGenerator​

β–Έ getUnspentAddressesWithAddressGenerator<T>(client, seed, initialAddressState, nextAddressPath, addressOptions?): Promise<{}[]>

Get all the unspent addresses using an address generator.

Type parameters​

Name
T

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to get the addresses from.
seedISeedThe seed to use for address generation.
initialAddressStateTThe initial address state for calculating the addresses.
nextAddressPath(addressState: T) => stringCalculate the next address for inputs.
addressOptions?ObjectOptional address configuration for balance address lookups.

Returns​

Promise<{}[]>

All the unspent addresses.


promote​

β–Έ promote(client, blockId): Promise<{}>

Promote an existing block.

Parameters​

NameTypeDescription
clientstring | IClientThe clientor node endpoint to perform the promote with.
blockIdstringThe block to promote.

Returns​

Promise<{}>

The id and block that were promoted.


reattach​

β–Έ reattach(client, blockId): Promise<{}>

Reattach an existing block.

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to perform the reattach with.
blockIdstringThe block to reattach.

Returns​

Promise<{}>

The id and block that were reattached.


retrieveData​

β–Έ retrieveData(client, blockId): Promise<{} | undefined>

Retrieve a data block.

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to retrieve the data with.
blockIdstringThe block id of the data to get.

Returns​

Promise<{} | undefined>

The block tag and data.


retry​

β–Έ retry(client, blockId): Promise<{}>

Retry an existing block either by promoting or reattaching.

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to perform the retry with.
blockIdstringThe block to retry.

Returns​

Promise<{}>

The id and block that were retried.


send​

β–Έ send(client, seed, accountIndex, addressBech32, amount, taggedData?, addressOptions?): Promise<{}>

Send a transfer from the balance on the seed to a single output.

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to send the transfer with.
seedISeedThe seed to use for address generation.
accountIndexnumberThe account index in the wallet.
addressBech32stringThe address to send the funds to in bech32 format.
amountBigIntegerThe amount to send.
taggedData?ObjectOptional tagged data to associate with the transaction.
addressOptions?ObjectOptional address configuration for balance address lookups.

Returns​

Promise<{}>

The id of the block created and the contructed block.


sendEd25519​

β–Έ sendEd25519(client, seed, accountIndex, addressEd25519, amount, taggedData?, addressOptions?): Promise<{}>

Send a transfer from the balance on the seed to a single output.

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to send the transfer with.
seedISeedThe seed to use for address generation.
accountIndexnumberThe account index in the wallet.
addressEd25519stringThe address to send the funds to in ed25519 format.
amountBigIntegerThe amount to send.
taggedData?ObjectOptional tagged data to associate with the transaction.
addressOptions?ObjectOptional address configuration for balance address lookups.

Returns​

Promise<{}>

The id of the block created and the contructed block.


sendMultiple​

β–Έ sendMultiple(client, seed, accountIndex, outputs, taggedData?, addressOptions?): Promise<{}>

Send a transfer from the balance on the seed to multiple outputs.

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to send the transfer with.
seedISeedThe seed to use for address generation.
accountIndexnumberThe account index in the wallet.
outputs{}[]The address to send the funds to in bech32 format and amounts.
taggedData?ObjectOptional tagged data to associate with the transaction.
addressOptions?ObjectOptional address configuration for balance address lookups.

Returns​

Promise<{}>

The id of the block created and the contructed block.


sendMultipleEd25519​

β–Έ sendMultipleEd25519(client, seed, accountIndex, outputs, taggedData?, addressOptions?): Promise<{}>

Send a transfer from the balance on the seed.

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to send the transfer with.
seedISeedThe seed to use for address generation.
accountIndexnumberThe account index in the wallet.
outputs{}[]The outputs including address to send the funds to in ed25519 format and amount.
taggedData?ObjectOptional tagged data to associate with the transaction.
addressOptions?ObjectOptional address configuration for balance address lookups.

Returns​

Promise<{}>

The id of the block created and the contructed block.


sendWithAddressGenerator​

β–Έ sendWithAddressGenerator<T>(client, seed, initialAddressState, nextAddressPath, outputs, taggedData?, zeroCount?): Promise<{}>

Send a transfer using account based indexing for the inputs.

Type parameters​

Name
T

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to send the transfer with.
seedISeedThe seed to use for address generation.
initialAddressStateTThe initial address state for calculating the addresses.
nextAddressPath(addressState: T) => stringCalculate the next address for inputs.
outputs{}[]The address to send the funds to in bech32 format and amounts.
taggedData?ObjectOptional tagged data to associate with the transaction.
zeroCount?numberThe number of addresses with 0 balance during lookup before aborting.

Returns​

Promise<{}>

The id of the block created and the contructed block.


calculateInputs​

β–Έ calculateInputs<T>(client, seed, initialAddressState, nextAddressPath, outputs, zeroCount?): Promise<{}[]>

Calculate the inputs from the seed and basePath.

Type parameters​

Name
T

Parameters​

NameTypeDefault valueDescription
clientstring | IClientundefinedThe client or node endpoint to calculate the inputs with.
seedISeedundefinedThe seed to use for address generation.
initialAddressStateTundefinedThe initial address state for calculating the addresses.
nextAddressPath(addressState: T) => stringundefinedCalculate the next address for inputs.
outputs{}[]undefinedThe outputs to send.
zeroCountnumber5Abort when the number of zero balances is exceeded.

Returns​

Promise<{}[]>

The id of the block created and the contructed block.


sendAdvanced​

β–Έ sendAdvanced(client, inputsAndSignatureKeyPairs, outputs, taggedData?): Promise<{}>

Send a transfer from the balance on the seed.

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to send the transfer with.
inputsAndSignatureKeyPairs{}[]The inputs with the signature key pairs needed to sign transfers.
outputs{}[]The outputs to send.
taggedData?ObjectOptional tagged data to associate with the transaction.

Returns​

Promise<{}>

The id of the block created and the remainder address if one was needed.


buildTransactionPayload​

β–Έ buildTransactionPayload(networkId, inputsAndSignatureKeyPairs, outputs, taggedData?): ITransactionPayload

Build a transaction payload.

Parameters​

NameTypeDescription
networkIdstringThe network id we are sending the payload on.
inputsAndSignatureKeyPairs{}[]The inputs with the signature key pairs needed to sign transfers.
outputs{}[]The outputs to send.
taggedData?ObjectOptional tagged data to associate with the transaction.

Returns​

ITransactionPayload

The transaction payload.


sendData​

β–Έ sendData(client, tag?, data?): Promise<{}>

Send a data block.

Parameters​

NameTypeDescription
clientstring | IClientThe client or node endpoint to send the data with.
tag?string | Uint8ArrayThe tag for the data.
data?string | Uint8ArrayThe data as either UTF8 text or Uint8Array bytes.

Returns​

Promise<{}>

The id of the block created and the block.


setLogger​

β–Έ setLogger(log): void

Set the logger for output.

Parameters​

NameTypeDescription
log(message: string, data?: unknown) => voidThe logger.

Returns​

void


logRoutes​

β–Έ logRoutes(prefix, routes): void

Log the routes of the node.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
routesIRoutesResponseThe available routes.

Returns​

void


logInfo​

β–Έ logInfo(prefix, info): void

Log the node information.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
infoINodeInfoThe info to log.

Returns​

void


logTips​

β–Έ logTips(prefix, tipsResponse): void

Log the tips information.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
tipsResponseITipsResponseThe tips to log.

Returns​

void


logBlock​

β–Έ logBlock(prefix, block): void

Log a block to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
blockIBlockThe block to log.

Returns​

void


logBlockMetadata​

β–Έ logBlockMetadata(prefix, blockMetadata): void

Log the block metadata to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
blockMetadataIBlockMetadataThe blockMetadata to log.

Returns​

void


logPayload​

β–Έ logPayload(prefix, payload?): void

Log a block to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
payload?PayloadTypesThe payload.

Returns​

void


logTransactionPayload​

β–Έ logTransactionPayload(prefix, payload?): void

Log a transaction payload to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
payload?ITransactionPayloadThe payload.

Returns​

void


logTaggedDataPayload​

β–Έ logTaggedDataPayload(prefix, payload?): void

Log a tagged data payload to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
payload?ITaggedDataPayloadThe payload.

Returns​

void


logMilestonePayload​

β–Έ logMilestonePayload(prefix, payload?): void

Log a milestone payload to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
payload?IMilestonePayloadThe payload.

Returns​

void


logMilestoneOptions​

β–Έ logMilestoneOptions(prefix, milestoneOptions?): void

Log milestone options to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
milestoneOptions?MilestoneOptionTypes[]The milestone options.

Returns​

void


logMilestoneOption​

β–Έ logMilestoneOption(prefix, milestoneOption): void

Log milestone option to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
milestoneOptionMilestoneOptionTypesThe milestone option.

Returns​

void


logReceiptMilestoneOption​

β–Έ logReceiptMilestoneOption(prefix, option?): void

Log a receipt milestone option to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
option?IReceiptMilestoneOptionThe option.

Returns​

void


logProtocolParamsMilestoneOption​

β–Έ logProtocolParamsMilestoneOption(prefix, option?): void

Log a protocol params milestone option to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
option?IProtocolParamsMilestoneOptionThe option.

Returns​

void


logTreasuryTransactionPayload​

β–Έ logTreasuryTransactionPayload(prefix, payload?): void

Log a treasury transaction payload to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
payload?ITreasuryTransactionPayloadThe payload.

Returns​

void


logAddress​

β–Έ logAddress(prefix, address?): void

Log an address to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
address?AddressTypesThe address to log.

Returns​

void


logSignature​

β–Έ logSignature(prefix, signature?): void

Log signature to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
signature?IEd25519SignatureThe signature to log.

Returns​

void


logInput​

β–Έ logInput(prefix, input?): void

Log input to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
input?InputTypesThe input to log.

Returns​

void


logOutput​

β–Έ logOutput(prefix, output?): void

Log output to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
output?OutputTypesThe output to log.

Returns​

void


logUnlock​

β–Έ logUnlock(prefix, unlock?): void

Log unlock to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
unlock?UnlockTypesThe unlock to log.

Returns​

void


logFunds​

β–Έ logFunds(prefix, fund?): void

Log fund to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
fund?IMigratedFundsThe fund to log.

Returns​

void


logNativeTokens​

β–Έ logNativeTokens(prefix, nativeTokens): void

Log native tokens to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
nativeTokensundefined | INativeToken[]The native tokens.

Returns​

void


logTokenScheme​

β–Έ logTokenScheme(prefix, tokenScheme): void

Log token scheme to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
tokenSchemeISimpleTokenSchemeThe token scheme.

Returns​

void


logFeatures​

β–Έ logFeatures(prefix, features): void

Log featurew to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
featuresundefined | FeatureTypes[]The features.

Returns​

void


logImmutableFeatures​

β–Έ logImmutableFeatures(prefix, immutableFeatures): void

Log immutable featuress to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
immutableFeaturesundefined | FeatureTypes[]The features.

Returns​

void


logFeature​

β–Έ logFeature(prefix, feature): void

Log feature to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
featureFeatureTypesThe feature.

Returns​

void


logUnlockConditions​

β–Έ logUnlockConditions(prefix, unlockConditions): void

Log unlock conditions to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
unlockConditionsUnlockConditionTypes[]The unlock conditions.

Returns​

void


logUnlockCondition​

β–Έ logUnlockCondition(prefix, unlockCondition): void

Log feature block to the console.

Parameters​

NameTypeDescription
prefixstringThe prefix for the output.
unlockConditionUnlockConditionTypesThe unlock condition.

Returns​

void


milestoneIdFromMilestonePayload​

β–Έ milestoneIdFromMilestonePayload(payload): string

Compute a milestoneId from a milestone payload.

Parameters​

NameTypeDescription
payloadIMilestonePayloadThe milestone payload.

Returns​

string

The milestone id hex prefixed string.


blockIdFromMilestonePayload​

β–Έ blockIdFromMilestonePayload(protocolVersion, payload): string

Compute a blockId from a milestone payload.

Parameters​

NameTypeDescription
protocolVersionnumberThe protocol version to use.
payloadIMilestonePayloadThe milestone payload.

Returns​

string

The blockId of the block with the milestone payload.

Type Aliases​

AddressTypes​

Ζ¬ AddressTypes: IEd25519Address | IAliasAddress | INftAddress

All of the address types.


FeatureTypes​

Ζ¬ FeatureTypes: ISenderFeature | IIssuerFeature | IMetadataFeature | ITagFeature

All of the feature block types.


InputTypes​

Ζ¬ InputTypes: IUTXOInput | ITreasuryInput

All of the input types.


LedgerInclusionState​

Ζ¬ LedgerInclusionState: "noTransaction" | "included" | "conflicting"

The different states of ledger inclusion.


Magnitudes​

Ζ¬ Magnitudes: "P" | "T" | "G" | "M" | "K" | ""

Magnitudes for the numbers.


MilestoneOptionTypes​

Ζ¬ MilestoneOptionTypes: IReceiptMilestoneOption | IProtocolParamsMilestoneOption

All of the milestone option types.


OutputTypes​

Ζ¬ OutputTypes: ITreasuryOutput | IBasicOutput | IAliasOutput | IFoundryOutput | INftOutput

All of the output types.


PayloadTypes​

Ζ¬ PayloadTypes: ITransactionPayload | IMilestonePayload | ITreasuryTransactionPayload | ITaggedDataPayload

All of the payload types.


SignatureTypes​

Ζ¬ SignatureTypes: IEd25519Signature

All of the signature types.


TokenSchemeTypes​

Ζ¬ TokenSchemeTypes: ISimpleTokenScheme

All of the token scheme types.


UnlockConditionTypes​

Ζ¬ UnlockConditionTypes: IAddressUnlockCondition | IStorageDepositReturnUnlockCondition | ITimelockUnlockCondition | IExpirationUnlockCondition | IStateControllerAddressUnlockCondition | IGovernorAddressUnlockCondition | IImmutableAliasUnlockCondition

All of the unlock condition types.


UnlockTypes​

Ζ¬ UnlockTypes: ISignatureUnlock | IReferenceUnlock | IAliasUnlock | INftUnlock

All of the unlock types.