fuel_tx

Trait Executable

source
pub trait Executable:
    Inputs
    + Outputs
    + Witnesses {
    // Provided methods
    fn input_asset_ids<'a>(
        &'a self,
        base_asset_id: &'a AssetId,
    ) -> IntoIter<&'a AssetId> { ... }
    fn input_asset_ids_unique<'a>(
        &'a self,
        base_asset_id: &'a AssetId,
    ) -> IntoIter<&'a AssetId> { ... }
    fn check_predicate_owners(&self) -> bool { ... }
    fn add_unsigned_coin_input(
        &mut self,
        utxo_id: UtxoId,
        owner: &PublicKey,
        amount: Word,
        asset_id: AssetId,
        tx_pointer: TxPointer,
        witness_index: u16,
    ) { ... }
    fn add_unsigned_message_input(
        &mut self,
        sender: Address,
        recipient: Address,
        nonce: Nonce,
        amount: Word,
        data: Vec<u8>,
        witness_index: u16,
    ) { ... }
}

Provided Methods§

source

fn input_asset_ids<'a>( &'a self, base_asset_id: &'a AssetId, ) -> IntoIter<&'a AssetId>

Returns the assets’ ids used in the inputs in the order of inputs.

source

fn input_asset_ids_unique<'a>( &'a self, base_asset_id: &'a AssetId, ) -> IntoIter<&'a AssetId>

Returns unique assets’ ids used in the inputs.

source

fn check_predicate_owners(&self) -> bool

Checks that all owners of inputs in the predicates are valid.

source

fn add_unsigned_coin_input( &mut self, utxo_id: UtxoId, owner: &PublicKey, amount: Word, asset_id: AssetId, tx_pointer: TxPointer, witness_index: u16, )

Append a new unsigned coin input to the transaction.

When the transaction is constructed, Signable::sign_inputs should be called for every secret key used with this method.

The production of the signatures can be done only after the full transaction skeleton is built because the input of the hash message is the ID of the final transaction.

source

fn add_unsigned_message_input( &mut self, sender: Address, recipient: Address, nonce: Nonce, amount: Word, data: Vec<u8>, witness_index: u16, )

Append a new unsigned message input to the transaction.

When the transaction is constructed, Signable::sign_inputs should be called for every secret key used with this method.

The production of the signatures can be done only after the full transaction skeleton is built because the input of the hash message is the ID of the final transaction.

Implementors§