pub struct TokenRejectFlow { /* private fields */ }
Expand description
Reject undesired token(s) and dissociate in a single flow.
The operation of this flow is as follows:
- Execute a
TokenRejectTransaction
using the provided NFT IDs and the Token IDs - Dissociate the rejected tokens from the owner account
Implementations§
Source§impl TokenRejectFlow
impl TokenRejectFlow
Sourcepub fn owner(&mut self, owner: impl Into<AccountId>) -> &mut Self
pub fn owner(&mut self, owner: impl Into<AccountId>) -> &mut Self
Sets the owner id of the token to be rejected.
Sourcepub fn get_node_account_ids(&self) -> Option<&[AccountId]>
pub fn get_node_account_ids(&self) -> Option<&[AccountId]>
Returns the account IDs of the nodes the transactions may be submitted to.
Sourcepub fn node_account_ids(
&mut self,
node_account_ids: impl IntoIterator<Item = AccountId>,
) -> &mut Self
pub fn node_account_ids( &mut self, node_account_ids: impl IntoIterator<Item = AccountId>, ) -> &mut Self
Sets the account IDs of the nodes the transactions may be submitted to.
Sourcepub fn get_token_ids(&self) -> &[TokenId]
pub fn get_token_ids(&self) -> &[TokenId]
Returns the list of token IDs.
Sourcepub fn token_ids(
&mut self,
token_ids: impl IntoIterator<Item = TokenId>,
) -> &mut Self
pub fn token_ids( &mut self, token_ids: impl IntoIterator<Item = TokenId>, ) -> &mut Self
Sets the list of token IDs.
Sourcepub fn add_token_id(&mut self, token_id: TokenId) -> &mut Self
pub fn add_token_id(&mut self, token_id: TokenId) -> &mut Self
Adds a token ID to the list of token IDs.
Sourcepub fn get_nft_ids(&self) -> &[NftId]
pub fn get_nft_ids(&self) -> &[NftId]
Returns the list of NFT IDs.
Sourcepub fn nft_ids(&mut self, nft_ids: impl IntoIterator<Item = NftId>) -> &mut Self
pub fn nft_ids(&mut self, nft_ids: impl IntoIterator<Item = NftId>) -> &mut Self
Sets the list of NFT IDs.
Sourcepub fn add_nft_id(&mut self, nft_id: NftId) -> &mut Self
pub fn add_nft_id(&mut self, nft_id: NftId) -> &mut Self
Adds an NFT ID to the list of NFT IDs.
Sourcepub fn freeze_with(&mut self, client: Client) -> &mut Self
pub fn freeze_with(&mut self, client: Client) -> &mut Self
Sets the client to use for freezing the generated TokenRejectTransaction
.
By default freezing will use the client provided to execute
.
Sourcepub fn sign(&mut self, key: PrivateKey) -> &mut Self
pub fn sign(&mut self, key: PrivateKey) -> &mut Self
Sets the signer for use in the TokenRejectTransaction
Important: Only one signer is allowed.
Sourcepub fn sign_with<F: Fn(&[u8]) -> Vec<u8> + Send + Sync + 'static>(
&mut self,
public_key: PublicKey,
signer: F,
) -> &mut Self
pub fn sign_with<F: Fn(&[u8]) -> Vec<u8> + Send + Sync + 'static>( &mut self, public_key: PublicKey, signer: F, ) -> &mut Self
Sets the signer for use in the TokenRejectTransaction
Important: Only one signer is allowed.
Sourcepub fn sign_with_operator(&mut self, client: &Client) -> &mut Self
pub fn sign_with_operator(&mut self, client: &Client) -> &mut Self
Set the operator that this transaction will be signed with.
Sourcepub async fn execute(&self, client: &Client) -> Result<TransactionResponse>
pub async fn execute(&self, client: &Client) -> Result<TransactionResponse>
Generates the required transactions and executes them all.
Sourcepub async fn execute_with_timeout(
&self,
client: &Client,
timeout_per_transaction: Duration,
) -> Result<TransactionResponse>
pub async fn execute_with_timeout( &self, client: &Client, timeout_per_transaction: Duration, ) -> Result<TransactionResponse>
Generates the required transactions and executes them all.
Trait Implementations§
Source§impl Debug for TokenRejectFlow
impl Debug for TokenRejectFlow
Source§impl Default for TokenRejectFlow
impl Default for TokenRejectFlow
Source§fn default() -> TokenRejectFlow
fn default() -> TokenRejectFlow
Auto Trait Implementations§
impl Freeze for TokenRejectFlow
impl !RefUnwindSafe for TokenRejectFlow
impl Send for TokenRejectFlow
impl Sync for TokenRejectFlow
impl !Unpin for TokenRejectFlow
impl !UnwindSafe for TokenRejectFlow
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request