Type Alias hedera::AccountAllowanceApproveTransaction

source ·
pub type AccountAllowanceApproveTransaction = Transaction<AccountAllowanceApproveTransactionData>;
Expand description

Creates one or more hbar/token approved allowances relative to the owner account specified in the allowances of this transaction.

Each allowance grants a spender the right to transfer a pre-determined amount of the owner’s hbar/token to any other account of the spender’s choice. If the owner is not specified in any allowance, the payer of transaction is considered to be the owner for that particular allowance.

Setting the amount to zero will remove the respective allowance for the spender.

Aliased Type§

struct AccountAllowanceApproveTransaction { /* private fields */ }

Implementations§

source§

impl AccountAllowanceApproveTransaction

source

pub fn approve_hbar_allowance( &mut self, owner_account_id: AccountId, spender_account_id: AccountId, amount: Hbar ) -> &mut Self

Approves the hbar allowance.

source

pub fn hbar_approvals(&self) -> &[HbarAllowance]

Returns the hbar allowances approved by the account owner.

source

pub fn approve_token_allowance( &mut self, token_id: TokenId, owner_account_id: AccountId, spender_account_id: AccountId, amount: u64 ) -> &mut Self

Approves the token allowance.

source

pub fn token_approvals(&self) -> &[TokenAllowance]

Returns the fungible token allowances approved by the account owner

source

pub fn approve_token_nft_allowance( &mut self, nft_id: impl Into<NftId>, owner_account_id: AccountId, spender_account_id: AccountId ) -> &mut Self

Approve the NFT allowance.

source

pub fn approve_token_nft_allowance_all_serials( &mut self, token_id: TokenId, owner_account_id: AccountId, spender_account_id: AccountId ) -> &mut Self

Approve the NFT allowance on all serial numbers (present and future).

source

pub fn token_nft_approvals(&self) -> &[NftAllowance]

Returns the non-fungible token allowances approved by the account owner.