Trait subxt::config::extrinsic_params::ExtrinsicParams
source · 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§
sourcetype OtherParams
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§
sourcefn new(
spec_version: u32,
tx_version: u32,
nonce: Index,
genesis_hash: Hash,
other_params: Self::OtherParams
) -> Self
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
sourcefn encode_extra_to(&self, v: &mut Vec<u8>)
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.
sourcefn encode_additional_to(&self, v: &mut Vec<u8>)
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.