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
unlock_conditions: Vec<UnlockConditionDto>
Build an AliasOutput.
Expected response: Output
BuildBasicOutput
Fields
unlock_conditions: Vec<UnlockConditionDto>
Build a BasicOutput.
Expected response: Output
BuildFoundryOutput
Build a FoundryOutput.
Expected response: Output
BuildNftOutput
Fields
unlock_conditions: Vec<UnlockConditionDto>
Build an NftOutput.
Expected response: Output
BurnNativeToken
Fields
options: Option<TransactionOptions>
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
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
Consolidate outputs.
Expected response: SentTransaction
DestroyAlias
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
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
Generate new unused addresses.
Expected response: GeneratedAddress
GetOutput
Get the OutputData
of an output stored in the account
Expected response: OutputData
GetFoundryOutput
GetOutputsWithAdditionalUnlockConditions
Fields
outputs_to_claim: OutputsToClaim
Get outputs with additional unlock conditions
Expected response: OutputIds
GetTransaction
Get the Transaction
of a transaction stored in the account
Expected response: Transaction
GetIncomingTransactionData
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
options: Option<TransactionOptions>
Melt native tokens. This happens with the foundry output which minted them, by increasing it’s
melted_tokens
field.
Expected response: SentTransaction
MinimumRequiredStorageDeposit
Calculate the minimum required storage deposit for an output.
Expected response:
MinimumRequiredStorageDeposit
IncreaseNativeTokenSupply
Fields
increase_native_token_supply_options: Option<IncreaseNativeTokenSupplyOptionsDto>
options: Option<TransactionOptions>
Mint more native token.
Expected response: MintTokenTransaction
MintNativeToken
Mint native token.
Expected response: MintTokenTransaction
MintNfts
Mint nft.
Expected response: SentTransaction
GetBalance
Get account balance information.
Expected response: Balance
PrepareOutput
Prepare an output.
Expected response: OutputDto
PrepareTransaction
Prepare transaction.
Expected response: PreparedTransactionData
PrepareSendAmount
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
Send amount.
Expected response: SentTransaction
SendMicroTransaction
Fields
addresses_with_micro_amount: Vec<AddressWithMicroAmountDto>
options: Option<TransactionOptions>
Send amount below minimum storage deposit.
Expected response: SentTransaction
SendNativeTokens
Send native tokens.
Expected response: SentTransaction
SendNft
Send nft.
Expected response: SentTransaction
SetAlias
Fields
alias: String
Set the alias of the account.
Expected response: Ok
SendOutputs
Send outputs in a transaction.
Expected response: SentTransaction
SignTransactionEssence
Sign a prepared transaction.
Expected response: TransactionPayload
SubmitAndStoreTransaction
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
sourceimpl Clone for AccountMethod
impl Clone for AccountMethod
sourcefn clone(&self) -> AccountMethod
fn clone(&self) -> AccountMethod
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AccountMethod
impl Debug for AccountMethod
sourceimpl<'de> Deserialize<'de> for AccountMethod
impl<'de> Deserialize<'de> for AccountMethod
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for AccountMethod
impl Send for AccountMethod
impl Sync for AccountMethod
impl Unpin for AccountMethod
impl UnwindSafe for AccountMethod
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more