pub trait ExtrinsicParams<Index, Hash>: Debug + 'static {
    type OtherParams;

    // Required methods
    fn new(
        spec_version: u32,
        tx_version: u32,
        nonce: Index,
        genesis_hash: Hash,
        other_params: Self::OtherParams
    ) -> Self;
    fn encode_extra_to(&self, v: &mut Vec<u8>);
    fn encode_additional_to(&self, v: &mut Vec<u8>);
}
Expand description

This trait allows you to configure the “signed extra” and “additional” parameters that are signed and used in transactions. see BaseExtrinsicParams for an implementation that is compatible with a Polkadot node.

Required Associated Types§

source

type OtherParams

These parameters can be provided to the constructor along with some default parameters that subxt understands, in order to help construct your ExtrinsicParams object.

Required Methods§

source

fn new( spec_version: u32, tx_version: u32, nonce: Index, genesis_hash: Hash, other_params: Self::OtherParams ) -> Self

Construct a new instance of our ExtrinsicParams

source

fn encode_extra_to(&self, v: &mut Vec<u8>)

This is expected to SCALE encode the “signed extra” parameters to some buffer that has been provided. These are the parameters which are sent along with the transaction, as well as taken into account when signing the transaction.

source

fn encode_additional_to(&self, v: &mut Vec<u8>)

This is expected to SCALE encode the “additional” parameters to some buffer that has been provided. These parameters are not sent along with the transaction, but are taken into account when signing it, meaning the client and node must agree on their values.

Implementors§

source§

impl<T: Config, Tip: Debug + Encode + 'static> ExtrinsicParams<<T as Config>::Index, <T as Config>::Hash> for BaseExtrinsicParams<T, Tip>