@iota/sdk
Table of contents
Enumerations
- AddressType
- InputType
- FeatureType
- OutputType
- TokenSchemeType
- UnlockConditionType
- PayloadType
- TransactionEssenceType
- UnlockType
- SignatureType
- CoinType
- LedgerDeviceType
- Network
- ConflictReason
- MilestoneOptionType
- WalletEventType
- TransactionProgressType
- ReturnStrategy
- OutputsToClaim
- EventStatus
- ParticipationEventType
- InclusionState
Classes
- ClientMethodHandler
- Client
- SecretManagerMethodHandler
- SecretManager
- Address
- Ed25519Address
- AliasAddress
- NftAddress
- Block
- Input
- TreasuryInput
- UTXOInput
- Feature
- SenderFeature
- IssuerFeature
- MetadataFeature
- TagFeature
- Output
- CommonOutput
- TreasuryOutput
- BasicOutput
- AliasOutput
- NftOutput
- FoundryOutput
- TokenScheme
- SimpleTokenScheme
- UnlockCondition
- AddressUnlockCondition
- StorageDepositReturnUnlockCondition
- TimelockUnlockCondition
- ExpirationUnlockCondition
- StateControllerAddressUnlockCondition
- GovernorAddressUnlockCondition
- ImmutableAliasAddressUnlockCondition
- MilestonePayload
- Payload
- TaggedDataPayload
- TransactionEssence
- RegularTransactionEssence
- TransactionPayload
- Unlock
- SignatureUnlock
- ReferenceUnlock
- AliasUnlock
- NftUnlock
- Signature
- Ed25519Signature
- PreparedTransactionData
- InputSigningData
- Remainder
- OutputResponse
- ReceiptsResponse
- MilestoneReceipt
- NodeInfoProtocolParamsMilestoneOpt
- MigratedFunds
- MilestoneOption
- ProtocolParamsMilestoneOption
- ReceiptMilestoneOption
- Event
- WalletEvent
- ConsolidationRequiredWalletEvent
- LedgerAddressGenerationWalletEvent
- NewOutputWalletEvent
- SpentOutputWalletEvent
- TransactionInclusionWalletEvent
- TransactionProgressWalletEvent
- TransactionProgress
- SelectingInputsProgress
- GeneratingRemainderDepositAddressProgress
- PreparedTransactionProgress
- PreparedTransactionEssenceHashProgress
- SigningTransactionProgress
- PerformingPowProgress
- BroadcastingProgress
- OutputData
- PreparedCreateNativeTokenTransactionData
- CreateNativeTokenTransaction
- PreparedCreateNativeTokenTransaction
- PreparedTransaction
- SignedTransactionEssence
- Transaction
- Utils
- Account
- WalletMethodHandler
- Wallet
Interfaces
- IBuildBlockOptions
- IClientBlockBuilderOutputAddress
- Burn
- IClientOptions
- IDuration
- IGenerateAddressesOptions
- IGenerateAddressOptions
- LedgerNanoStatus
- LedgerApp
- IAuth
- IMqttBrokerOptions
- INode
- INetworkInfo
- INodeInfoWrapper
- AliasOutputBuilderParams
- BasicOutputBuilderParams
- FoundryOutputBuilderParams
- NftOutputBuilderParams
- IRange
- Response
- ILoggerConfig
- IBlockIdResponse
- IMilestoneUtxoChangesResponse
- IOutputMetadataResponse
- IOutputsResponse
- IResponse
- ITipsResponse
- IBlockMetadata
- IGossipHeartbeat
- IGossipMetrics
- INodeInfoBaseToken
- INodeInfoMetrics
- INodeInfoMilestone
- INodeInfoProtocol
- INodeInfoStatus
- INodeInfo
- IRoutesResponse
- INativeToken
- IPeer
- IRent
- LedgerNanoSecretManager
- MnemonicSecretManager
- SeedSecretManager
- StrongholdSecretManager
- Secp256k1EcdsaSignature
- Bip44
- Balance
- BaseCoinBalance
- RequiredStorageDeposit
- NativeTokenBalance
- SyncOptions
- AccountSyncOptions
- AliasSyncOptions
- NftSyncOptions
- AccountMeta
- AccountMetadata
- CreateAccountPayload
- FilterOptions
- AccountAddress
- SendParams
- AddressWithUnspentOutputs
- SendNativeTokensParams
- SendNftParams
- GenerateAddressOptions
- BuildAliasOutputData
- BuildBasicOutputData
- BuildFoundryOutputData
- BuildNftOutputData
- ConsolidationParams
- OutputParams
- Assets
- Features
- Unlocks
- StorageDeposit
- Segment
- ParticipationOverview
- Participations
- TrackedParticipationOverview
- ParticipationEvent
- ParticipationEventRegistrationOptions
- ParticipationEventWithNodes
- ParticipationEventStatus
- ParticipationEventData
- VotingEventPayload
- StakingEventPayload
- Question
- Answer
- QuestionStatus
- AnswerStatus
- TransactionOptions
- CreateNativeTokenParams
- MintNftParams
- AliasOutputParams
- WalletOptions
Type Aliases
- AliasId
- NftId
- BlockId
- TokenId
- FoundryId
- OutputId
- MilestoneId
- __ClientMethods__
- QueryParameter
- AliasQueryParameter
- FoundryQueryParameter
- NftQueryParameter
- LedgerInclusionState
- __SecretManagerMethods__
- PlaceholderSecretManager
- SecretManagerType
- __UtilsMethods__
- HexEncodedString
- HexEncodedAmount
- AccountId
- __AccountMethod__
- __CallAccountMethodMethod__
- __Method__
- TransactionId
- ParticipationEventId
- ParticipationEventMap
- ParticipationEventPayload
- RemainderValueStrategy
- ChangeAddress
- ReuseAddress
- CustomAddress
Variables
- migrateStrongholdSnapshotV2ToV3
- migrateDbChrysalisToStardust
- AddressDiscriminator
- InputDiscriminator
- FeatureDiscriminator
- OutputDiscriminator
- TokenSchemeDiscriminator
- UnlockConditionDiscriminator
- PayloadDiscriminator
- TransactionEssenceDiscriminator
- UnlockDiscriminator
- IOTA_BECH32_HRP
- IOTA_TESTNET_BECH32_HRP
- SHIMMER_BECH32_HRP
- SHIMMER_TESTNET_BECH32_HRP
- CONFLICT_REASON_STRINGS
- MilestoneOptionDiscriminator
Functions
Type Aliases
AliasId
Ƭ AliasId: HexEncodedString
An Alias ID represented as hex-encoded string.
NftId
Ƭ NftId: HexEncodedString
An NFT ID represented as hex-encoded string.
BlockId
Ƭ BlockId: HexEncodedString
A Block ID represented as hex-encoded string.
TokenId
Ƭ TokenId: HexEncodedString
A Token ID represented as hex-encoded string.
FoundryId
Ƭ FoundryId: HexEncodedString
A Foundry ID represented as hex-encoded string.
OutputId
Ƭ OutputId: string
MilestoneId
Ƭ MilestoneId: string
__ClientMethods__
Ƭ __ClientMethods__: __GetInfoMethod__ | __GetOutputMethod__ | __GetBasicOutputIdsMethod__ | __GetOutputsMethod__ | __PostBlockMethod__ | __BuildAndPostBlockMethod__ | __GetTipsMethod__ | __GetNetworkInfoMethod__ | __GetBlockMethod__ | __GetBlockMetadataMethod__ | __FindInputsMethod__ | __PrepareTransactionMethod__ | __SignTransactionMethod__ | __SignatureUnlockMethod__ | __PostBlockPayloadMethod__ | __GetNodeMethod__ | __GetNetworkIdMethod__ | __GetBech32HrpMethod__ | __GetMinPowScoreMethod__ | __GetTipsIntervalMethod__ | __GetProtocolParametersMethod__ | __GetLocalPowMethod__ | __GetFallbackToLocalPowMethod__ | __GetHealthMethod__ | __GetNodeInfoMethod__ | __GetPeersMethod__ | __PostBlockRawMethod__ | __GetBlockRawMethod__ | __GetMilestoneByIdMethod__ | __GetUtxoChangesByIdMethod__ | __GetMilestoneByIndexMethod__ | __GetUtxoChangesByIndexMethod__ | __GetReceiptsMethod__ | __GetReceiptsMigratedAtMethod__ | __GetTreasuryMethod__ | __GetIncludedBlockMethod__ | __GetIncludedBlockMetadataMethod__ | __HexToBech32Method__ | __AliasIdToBech32Method__ | __NftIdToBech32Method__ | __HexPublicKeyToBech32AddressMethod__ | __AliasOutputIdsMethod__ | __AliasOutputIdMethod__ | __NftOutputIdsMethod__ | __NftOutputIdMethod__ | __FoundryOutputIdsMethod__ | __FoundryOutputIdMethod__ | __GetOutputsIgnoreErrorsMethod__ | __FindBlocksMethod__ | __RetryMethod__ | __RetryUntilIncludedMethod__ | __ConsolidateFundsMethod__ | __ReattachMethod__ | __ReattachUncheckedMethod__ | __PromoteMethod__ | __PromoteUncheckedMethod__ | __UnhealthyNodesMethod__ | __BuildBasicOutputMethod__ | __BuildAliasOutputMethod__ | __BuildFoundryOutputMethod__ | __BuildNftOutputMethod__ | __ClearListenersMethod__ | __MinimumRequiredStorageDepositMethod__ | __RequestFundsFromFaucetMethod__ | __CallPluginRouteMethod__
QueryParameter
Ƭ QueryParameter: Address | AliasAddress | HasStorageDepositReturn | StorageDepositReturnAddress | HasTimelock | TimelockedBefore | TimelockedAfter | HasExpiration | ExpiresBefore | ExpiresAfter | ExpirationReturnAddress | Sender | Tag | Issuer | StateController | Governor | CommonQueryParameters
Query parameter for filtering output requests
AliasQueryParameter
Ƭ AliasQueryParameter: StateController | Governor | Issuer | Sender | CommonQueryParameters
Query parameters for filtering Alias Outputs
FoundryQueryParameter
Ƭ FoundryQueryParameter: AliasAddress | CommonQueryParameters
Query parameters for filtering Foundry Outputs
NftQueryParameter
Ƭ NftQueryParameter: Address | AliasAddress | HasStorageDepositReturn | StorageDepositReturnAddress | HasTimelock | TimelockedBefore | TimelockedAfter | HasExpiration | ExpiresBefore | ExpiresAfter | ExpirationReturnAddress | Issuer | Sender | Tag | CommonQueryParameters
Query parameters for filtering Nft Outputs
LedgerInclusionState
Ƭ LedgerInclusionState: "noTransaction" | "included" | "conflicting"
The different states of ledger inclusion.
__SecretManagerMethods__
Ƭ __SecretManagerMethods__: __GenerateEd25519AddressesMethod__ | __GenerateEvmAddressesMethod__ | __GetLedgerNanoStatusMethod__ | __SignTransactionMethod__ | __SignatureUnlockMethod__ | __StoreMnemonicMethod__ | __SignEd25519Method__ | __SignSecp256k1EcdsaMethod__
PlaceholderSecretManager
Ƭ PlaceholderSecretManager: "placeholder"
Placeholder secret manager that can't do anything.
SecretManagerType
Ƭ SecretManagerType: LedgerNanoSecretManager | MnemonicSecretManager | StrongholdSecretManager | PlaceholderSecretManager
Supported secret managers
__UtilsMethods__
Ƭ __UtilsMethods__: __GenerateMnemonicMethod__ | __MnemonicToHexSeedMethod__ | __ComputeAliasIdMethod__ | __ComputeNftIdMethod__ | __ComputeFoundryIdMethod__ | __ComputeOutputIdMethod__ | __ComputeTokenIdMethod__ | __ComputeInputsCommitmentMethod__ | __ComputeStorageDepositMethod__ | __ParseBech32AddressMethod__ | __BlockIdMethod__ | __MilestoneIdMethod__ | __TransactionIdMethod__ | __Bech32ToHexMethod__ | __HexToBech32Method__ | __AliasIdToBech32Method__ | __NftIdToBech32Method__ | __HexPublicKeyToBech32AddressMethod__ | __IsAddressValidMethod__ | __HashTransactionEssenceMethod__ | __VerifyEd25519SignatureMethod__ | __VerifySecp256k1EcdsaSignatureMethod__ | __VerifyMnemonicMethod__ | __FaucetMethod__ | __OutputIdToUtxoInput__
HexEncodedString
Ƭ HexEncodedString: string
Hex encoded bytes.
HexEncodedAmount
Ƭ HexEncodedAmount: string
Hex encoded U256.
AccountId
Ƭ AccountId: number | string
Account identifier Could be the account index (number) or account alias (string)
__AccountMethod__
Ƭ __AccountMethod__: __BuildAliasOutputMethod__ | __BuildBasicOutputMethod__ | __BuildFoundryOutputMethod__ | __BuildNftOutputMethod__ | __PrepareBurnMethod__ | __ClaimOutputsMethod__ | __PrepareConsolidateOutputsMethod__ | __PrepareCreateAliasOutputMethod__ | __DeregisterParticipationEventMethod__ | __GenerateEd25519AddressesMethod__ | __GetBalanceMethod__ | __GetOutputMethod__ | __GetIncomingTransactionMethod__ | __GetFoundryOutputMethod__ | __ClaimableOutputsMethod__ | __GetParticipationEventMethod__ | __GetParticipationEventIdsMethod__ | __GetParticipationEventsMethod__ | __GetParticipationEventStatusMethod__ | __GetTransactionMethod__ | __AddressesMethod__ | __AddressesWithUnspentOutputsMethod__ | __OutputsMethod__ | __PendingTransactionsMethod__ | __IncomingTransactionsMethod__ | __TransactionsMethod__ | __UnspentOutputsMethod__ | __PrepareCreateNativeTokenMethod__ | __PrepareMeltNativeTokenMethod__ | __PrepareMintNativeTokenMethod__ | __PrepareMintNftsMethod__ | __PrepareOutputMethod__ | __PrepareSendMethod__ | __PrepareTransactionMethod__ | __RegisterParticipationEventsMethod__ | __RetryTransactionUntilIncludedMethod__ | __SendMethod__ | __SendWithParamsMethod__ | __PrepareSendNativeTokensMethod__ | __PrepareSendNftMethod__ | __SendOutputsMethod__ | __SetAliasMethod__ | __SetDefaultSyncOptionsMethod__ | __SignTransactionEssenceMethod__ | __SignAndSubmitTransactionMethod__ | __SubmitAndStoreTransactionMethod__ | __SyncAccountMethod__ | __PrepareVoteMethod__ | __PrepareStopParticipatingMethod__ | __GetParticipationOverviewMethod__ | __PrepareIncreaseVotingPowerMethod__ | __PrepareDecreaseVotingPowerMethod__
__CallAccountMethodMethod__
Ƭ __CallAccountMethodMethod__: Object
Type declaration
| Name | Type |
|---|---|
name | "callAccountMethod" |
data | { accountId: AccountId ; method: __AccountMethod__ } |
data.accountId | AccountId |
data.method | __AccountMethod__ |
__Method__
Ƭ __Method__: __BackupMethod__ | __CallAccountMethodMethod__ | __ChangeStrongholdPasswordMethod__ | __ClearListenersMethod__ | __ClearStrongholdPasswordMethod__ | __CreateAccountMethod__ | __EmitTestEventMethod__ | __GenerateMnemonicMethod__ | __GetAccountMethod__ | __GetAccountIndexesMethod__ | __GetAccountsMethod__ | __GetChrysalisDataMethod__ | __GetLedgerNanoStatusMethod__ | __GenerateEd25519AddressMethod__ | __IsStrongholdPasswordAvailableMethod__ | __RecoverAccountsMethod__ | __RemoveLatestAccountMethod__ | __RestoreBackupMethod__ | __SetClientOptionsMethod__ | __SetStrongholdPasswordClearIntervalMethod__ | __SetStrongholdPasswordMethod__ | __StartBackgroundSyncMethod__ | __StopBackgroundSyncMethod__ | __StoreMnemonicMethod__ | __UpdateNodeAuthMethod__
TransactionId
Ƭ TransactionId: string
A Transaction ID represented as hex-encoded string.
ParticipationEventId
Ƭ ParticipationEventId: string
A participation event ID represented as hex-encoded string.
ParticipationEventMap
Ƭ ParticipationEventMap: Object
Maps participation event IDs to their corresponding event data with nodes.
Index signature
▪ [id: ParticipationEventId]: ParticipationEventWithNodes
ParticipationEventPayload
Ƭ ParticipationEventPayload: VotingEventPayload | StakingEventPayload
Possible participation event payloads (voting or staking).
RemainderValueStrategy
Ƭ RemainderValueStrategy: ChangeAddress | ReuseAddress | CustomAddress
The possible remainder value strategies.
ChangeAddress
Ƭ ChangeAddress: Object
Allows to move the remainder value to a change address.
Type declaration
| Name | Type | Description |
|---|---|---|
strategy | "ChangeAddress" | The name of the strategy. |
value | null | Only required for CustomAddress. |
ReuseAddress
Ƭ ReuseAddress: Object
Allows to keep the remainder value on the source address.
Type declaration
| Name | Type | Description |
|---|---|---|
strategy | "ReuseAddress" | The name of the strategy. |
value | null | Only required for CustomAddress. |
CustomAddress
Ƭ CustomAddress: Object
CustomAddress variant of RemainderValueStrategy
Type declaration
| Name | Type | Description |
|---|---|---|
strategy | "CustomAddress" | The name of the strategy. |
value | AccountAddress | - |
Variables
migrateStrongholdSnapshotV2ToV3
• migrateStrongholdSnapshotV2ToV3: any
migrateDbChrysalisToStardust
• migrateDbChrysalisToStardust: any
AddressDiscriminator
• Const AddressDiscriminator: Object
Type declaration
| Name | Type |
|---|---|
property | string |
subTypes | ({ value: typeof Ed25519Address = Ed25519Address; name: any } | { value: typeof AliasAddress = AliasAddress; name: any } | { value: typeof NftAddress = NftAddress; name: any })[] |
InputDiscriminator
• Const InputDiscriminator: Object
Type declaration
| Name | Type |
|---|---|
property | string |
subTypes | ({ value: typeof TreasuryInput = TreasuryInput; name: any } | { value: typeof UTXOInput = UTXOInput; name: any })[] |
FeatureDiscriminator
• Const FeatureDiscriminator: Object
Type declaration
| Name | Type |
|---|---|
property | string |
subTypes | ({ value: typeof SenderFeature = SenderFeature; name: any } | { value: typeof IssuerFeature = IssuerFeature; name: any } | { value: typeof MetadataFeature = MetadataFeature; name: any } | { value: typeof TagFeature = TagFeature; name: any })[] |
OutputDiscriminator
• Const OutputDiscriminator: Object
Type declaration
| Name | Type |
|---|---|
property | string |
subTypes | ({ value: typeof TreasuryOutput = TreasuryOutput; name: any } | { value: typeof BasicOutput = BasicOutput; name: any } | { value: typeof AliasOutput = AliasOutput; name: any } | { value: typeof NftOutput = NftOutput; name: any } | { value: typeof FoundryOutput = FoundryOutput; name: any })[] |
TokenSchemeDiscriminator
• Const TokenSchemeDiscriminator: Object
Type declaration
| Name | Type |
|---|---|
property | string |
subTypes | { value: typeof SimpleTokenScheme = SimpleTokenScheme; name: any }[] |
UnlockConditionDiscriminator
• Const UnlockConditionDiscriminator: Object
Type declaration
| Name | Type |
|---|---|
property | string |
subTypes | ({ value: typeof AddressUnlockCondition = AddressUnlockCondition; name: any } | { value: typeof StorageDepositReturnUnlockCondition = StorageDepositReturnUnlockCondition; name: any } | { value: typeof TimelockUnlockCondition = TimelockUnlockCondition; name: any } | { value: typeof ExpirationUnlockCondition = ExpirationUnlockCondition; name: any })[] |
PayloadDiscriminator
• Const PayloadDiscriminator: Object
Type declaration
| Name | Type |
|---|---|
property | string |
subTypes | ({ value: typeof MilestonePayload = MilestonePayload; name: any } | { value: typeof TaggedDataPayload = TaggedDataPayload; name: any } | { value: typeof TransactionPayload = TransactionPayload; name: any } | { value: typeof TreasuryTransactionPayload = TreasuryTransactionPayload; name: any })[] |
TransactionEssenceDiscriminator
• Const TransactionEssenceDiscriminator: Object
Type declaration
| Name | Type |
|---|---|
property | string |
subTypes | { value: typeof RegularTransactionEssence = RegularTransactionEssence; name: any }[] |
UnlockDiscriminator
• Const UnlockDiscriminator: Object
Type declaration
| Name | Type |
|---|---|
property | string |
subTypes | ({ value: typeof SignatureUnlock = SignatureUnlock; name: any } | { value: typeof ReferenceUnlock = ReferenceUnlock; name: any })[] |
IOTA_BECH32_HRP
• Const IOTA_BECH32_HRP: "iota"
IOTA_TESTNET_BECH32_HRP
• Const IOTA_TESTNET_BECH32_HRP: "atoi"
SHIMMER_BECH32_HRP
• Const SHIMMER_BECH32_HRP: "smr"
SHIMMER_TESTNET_BECH32_HRP
• Const SHIMMER_TESTNET_BECH32_HRP: "rms"
CONFLICT_REASON_STRINGS
• Const CONFLICT_REASON_STRINGS: { [key in ConflictReason]: string }
Conflict reason strings.
MilestoneOptionDiscriminator
• Const MilestoneOptionDiscriminator: Object
Type declaration
| Name | Type |
|---|---|
property | string |
subTypes | ({ value: typeof ReceiptMilestoneOption = ReceiptMilestoneOption; name: any } | { value: typeof ProtocolParamsMilestoneOption = ProtocolParamsMilestoneOption; name: any })[] |
Functions
initLogger
▸ initLogger(config?): any
Initialize logger, if no arguments are provided a default config will be used.
Parameters
| Name | Type | Default value |
|---|---|---|
config | ILoggerConfig | defaultLoggerConfig |
Returns
any
parsePayload
▸ parsePayload(data): Payload
Parameters
| Name | Type |
|---|---|
data | any |
Returns
bigIntToHex
▸ bigIntToHex(value): string
Converts bigint value to hexadecimal string representation prefixed with "0x".
Parameters
| Name | Type |
|---|---|
value | bigint |
Returns
string
hexToBigInt
▸ hexToBigInt(value): bigint
Converts hex encoded string to bigint value.
Parameters
| Name | Type |
|---|---|
value | string |
Returns
bigint
utf8ToBytes
▸ utf8ToBytes(utf8): number[]
Convert UTF8 string to an array of bytes
Parameters
| Name | Type |
|---|---|
utf8 | string |
Returns
number[]
hexToUtf8
▸ hexToUtf8(hex): string
Convert hex encoded string to UTF8 string
Parameters
| Name | Type |
|---|---|
hex | string |
Returns
string
utf8ToHex
▸ utf8ToHex(utf8): string
Convert UTF8 string to hex encoded string
Parameters
| Name | Type |
|---|---|
utf8 | string |
Returns
string