pub enum AccountMethod {
Show 41 variants BuildAliasOutput { amount: Option<String>, native_tokens: Option<Vec<NativeTokenDto>>, alias_id: AliasIdDto, state_index: Option<u32>, state_metadata: Option<Vec<u8>>, foundry_counter: Option<u32>, unlock_conditions: Vec<UnlockConditionDto>, features: Option<Vec<FeatureDto>>, immutable_features: Option<Vec<FeatureDto>>, }, BuildBasicOutput { amount: Option<String>, native_tokens: Option<Vec<NativeTokenDto>>, unlock_conditions: Vec<UnlockConditionDto>, features: Option<Vec<FeatureDto>>, }, BuildFoundryOutput { amount: Option<String>, native_tokens: Option<Vec<NativeTokenDto>>, serial_number: u32, token_scheme: TokenSchemeDto, unlock_conditions: Vec<UnlockConditionDto>, features: Option<Vec<FeatureDto>>, immutable_features: Option<Vec<FeatureDto>>, }, BuildNftOutput { amount: Option<String>, native_tokens: Option<Vec<NativeTokenDto>>, nft_id: NftIdDto, unlock_conditions: Vec<UnlockConditionDto>, features: Option<Vec<FeatureDto>>, immutable_features: Option<Vec<FeatureDto>>, }, BurnNativeToken { token_id: TokenIdDto, burn_amount: U256Dto, options: Option<TransactionOptions>, }, BurnNft { nft_id: NftIdDto, options: Option<TransactionOptions>, }, ConsolidateOutputs { force: bool, output_consolidation_threshold: Option<usize>, }, DestroyAlias { alias_id: AliasIdDto, options: Option<TransactionOptions>, }, DestroyFoundry { foundry_id: FoundryId, options: Option<TransactionOptions>, }, GenerateAddresses { amount: u32, options: Option<AddressGenerationOptions>, }, GetOutput { output_id: OutputId, }, GetFoundryOutput { token_id: TokenIdDto, }, GetOutputsWithAdditionalUnlockConditions { outputs_to_claim: OutputsToClaim, }, GetTransaction { transaction_id: TransactionId, }, GetIncomingTransactionData { transaction_id: TransactionId, }, ListAddresses, ListAddressesWithUnspentOutputs, ListOutputs { filter_options: Option<FilterOptions>, }, ListUnspentOutputs { filter_options: Option<FilterOptions>, }, ListIncomingTransactions, ListTransactions, ListPendingTransactions, DecreaseNativeTokenSupply { token_id: TokenIdDto, melt_amount: U256Dto, options: Option<TransactionOptions>, }, MinimumRequiredStorageDeposit { output: OutputDto, }, IncreaseNativeTokenSupply { token_id: TokenIdDto, mint_amount: U256Dto, increase_native_token_supply_options: Option<IncreaseNativeTokenSupplyOptionsDto>, options: Option<TransactionOptions>, }, MintNativeToken { native_token_options: NativeTokenOptionsDto, options: Option<TransactionOptions>, }, MintNfts { nfts_options: Vec<NftOptionsDto>, options: Option<TransactionOptions>, }, GetBalance, PrepareOutput { options: OutputOptionsDto, transaction_options: Option<TransactionOptions>, }, PrepareTransaction { outputs: Vec<OutputDto>, options: Option<TransactionOptions>, }, PrepareSendAmount { addresses_with_amount: Vec<AddressWithAmountDto>, options: Option<TransactionOptions>, }, SyncAccount { options: Option<SyncOptions>, }, SendAmount { addresses_with_amount: Vec<AddressWithAmountDto>, options: Option<TransactionOptions>, }, SendMicroTransaction { addresses_with_micro_amount: Vec<AddressWithMicroAmountDto>, options: Option<TransactionOptions>, }, SendNativeTokens { addresses_native_tokens: Vec<AddressNativeTokens>, options: Option<TransactionOptions>, }, SendNft { addresses_nft_ids: Vec<AddressAndNftId>, options: Option<TransactionOptions>, }, SetAlias { alias: String, }, SendOutputs { outputs: Vec<OutputDto>, options: Option<TransactionOptions>, }, SignTransactionEssence { prepared_transaction_data: PreparedTransactionDataDto, }, SubmitAndStoreTransaction { signed_transaction_data: SignedTransactionDataDto, }, ClaimOutputs { output_ids_to_claim: Vec<OutputId>, },
}
Expand description

Each public account method.

Variants

BuildAliasOutput

Fields

amount: Option<String>
native_tokens: Option<Vec<NativeTokenDto>>
alias_id: AliasIdDto
state_index: Option<u32>
state_metadata: Option<Vec<u8>>
foundry_counter: Option<u32>
unlock_conditions: Vec<UnlockConditionDto>
features: Option<Vec<FeatureDto>>
immutable_features: Option<Vec<FeatureDto>>

Build an AliasOutput. Expected response: Output

BuildBasicOutput

Fields

amount: Option<String>
native_tokens: Option<Vec<NativeTokenDto>>
unlock_conditions: Vec<UnlockConditionDto>
features: Option<Vec<FeatureDto>>

Build a BasicOutput. Expected response: Output

BuildFoundryOutput

Fields

amount: Option<String>
native_tokens: Option<Vec<NativeTokenDto>>
serial_number: u32
token_scheme: TokenSchemeDto
unlock_conditions: Vec<UnlockConditionDto>
features: Option<Vec<FeatureDto>>
immutable_features: Option<Vec<FeatureDto>>

Build a FoundryOutput. Expected response: Output

BuildNftOutput

Fields

amount: Option<String>
native_tokens: Option<Vec<NativeTokenDto>>
nft_id: NftIdDto
unlock_conditions: Vec<UnlockConditionDto>
features: Option<Vec<FeatureDto>>
immutable_features: Option<Vec<FeatureDto>>

Build an NftOutput. Expected response: Output

BurnNativeToken

Fields

token_id: TokenIdDto

Native token id

burn_amount: U256Dto

To be burned amount

Burn native tokens. This doesn’t require the foundry output which minted them, but will not increase the foundries melted_tokens field, which makes it impossible to destroy the foundry output. Therefore it’s recommended to use melting, if the foundry output is available. Expected response: SentTransaction

BurnNft

Fields

nft_id: NftIdDto

Burn an nft output. Outputs controlled by it will be sweeped before if they don’t have a storage deposit return, timelock or expiration unlock condition. This should be preferred over burning, because after burning, the foundry can never be destroyed anymore. Expected response: SentTransaction

ConsolidateOutputs

Fields

force: bool
output_consolidation_threshold: Option<usize>

Consolidate outputs. Expected response: SentTransaction

DestroyAlias

Fields

alias_id: AliasIdDto

Destroy an alias output. Outputs controlled by it will be sweeped before if they don’t have a storage deposit return, timelock or expiration unlock condition. The amount and possible native tokens will be sent to the governor address. Expected response: SentTransaction

DestroyFoundry

Fields

foundry_id: FoundryId

Function to destroy a foundry output with a circulating supply of 0. Native tokens in the foundry (minted by other foundries) will be transactioned to the controlling alias Expected response: SentTransaction

GenerateAddresses

Fields

amount: u32

Generate new unused addresses. Expected response: GeneratedAddress

GetOutput

Fields

output_id: OutputId

Get the OutputData of an output stored in the account Expected response: OutputData

GetFoundryOutput

Fields

token_id: TokenIdDto

Get the Output that minted a native token by its TokenId Expected response: Output

GetOutputsWithAdditionalUnlockConditions

Fields

outputs_to_claim: OutputsToClaim

Get outputs with additional unlock conditions Expected response: OutputIds

GetTransaction

Fields

transaction_id: TransactionId

Get the Transaction of a transaction stored in the account Expected response: Transaction

GetIncomingTransactionData

Fields

transaction_id: TransactionId

Get the transaction with inputs of an incoming transaction stored in the account List might not be complete, if the node pruned the data already Expected response: IncomingTransactionData

ListAddresses

Expected response: Addresses List addresses.

ListAddressesWithUnspentOutputs

Returns only addresses of the account with unspent outputs Expected response: AddressesWithUnspentOutputs

ListOutputs

Fields

filter_options: Option<FilterOptions>

Returns all outputs of the account Expected response: OutputsData

ListUnspentOutputs

Fields

filter_options: Option<FilterOptions>

Returns all unspent outputs of the account Expected response: OutputsData

ListIncomingTransactions

Returns all incoming transactions of the account Expected response: IncomingTransactionsData

ListTransactions

Returns all transaction of the account Expected response: Transactions

ListPendingTransactions

Returns all pending transactions of the account Expected response: Transactions

DecreaseNativeTokenSupply

Fields

token_id: TokenIdDto

Native token id

melt_amount: U256Dto

To be melted amount

Melt native tokens. This happens with the foundry output which minted them, by increasing it’s melted_tokens field. Expected response: SentTransaction

MinimumRequiredStorageDeposit

Fields

output: OutputDto

Calculate the minimum required storage deposit for an output. Expected response: MinimumRequiredStorageDeposit

IncreaseNativeTokenSupply

Fields

token_id: TokenIdDto

Native token id

mint_amount: U256Dto

To be minted amount

increase_native_token_supply_options: Option<IncreaseNativeTokenSupplyOptionsDto>

Mint more native token. Expected response: MintTokenTransaction

MintNativeToken

Fields

native_token_options: NativeTokenOptionsDto

Mint native token. Expected response: MintTokenTransaction

MintNfts

Fields

nfts_options: Vec<NftOptionsDto>

Mint nft. Expected response: SentTransaction

GetBalance

Get account balance information. Expected response: Balance

PrepareOutput

Fields

transaction_options: Option<TransactionOptions>

Prepare an output. Expected response: OutputDto

PrepareTransaction

Fields

outputs: Vec<OutputDto>

Prepare transaction. Expected response: PreparedTransactionData

PrepareSendAmount

Fields

addresses_with_amount: Vec<AddressWithAmountDto>

Prepare send amount. Expected response: PreparedTransactionData

SyncAccount

Fields

options: Option<SyncOptions>

Sync options

Sync the account by fetching new information from the nodes. Will also retry pending transactions if necessary. Expected response: Balance

SendAmount

Fields

addresses_with_amount: Vec<AddressWithAmountDto>

Send amount. Expected response: SentTransaction

SendMicroTransaction

Fields

addresses_with_micro_amount: Vec<AddressWithMicroAmountDto>

Send amount below minimum storage deposit. Expected response: SentTransaction

SendNativeTokens

Fields

addresses_native_tokens: Vec<AddressNativeTokens>

Send native tokens. Expected response: SentTransaction

SendNft

Fields

addresses_nft_ids: Vec<AddressAndNftId>

Send nft. Expected response: SentTransaction

SetAlias

Fields

alias: String

Set the alias of the account. Expected response: Ok

SendOutputs

Fields

outputs: Vec<OutputDto>

Send outputs in a transaction. Expected response: SentTransaction

SignTransactionEssence

Fields

prepared_transaction_data: PreparedTransactionDataDto

Sign a prepared transaction. Expected response: TransactionPayload

SubmitAndStoreTransaction

Fields

signed_transaction_data: SignedTransactionDataDto

Validate the transaction, submit it to a node and store it in the account. Expected response: SentTransaction

ClaimOutputs

Fields

output_ids_to_claim: Vec<OutputId>

Claim outputs. Expected response: SentTransaction

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more