Skip to main content

avail_rust_client/
config.rs

1use crate::subxt_rpcs::RpcConfig;
2
3/// A struct representing the signed extra and additional parameters required
4/// to construct a transaction for a avail node.
5pub type AvailExtrinsicParams<T> = avail_rust_core::DefaultExtrinsicParams<T>;
6
7#[derive(Clone, Debug, Default)]
8/// Runtime configuration mapping Avail primitives into Subxt expectations.
9pub struct AvailConfig;
10
11impl crate::subxt_core::Config for AvailConfig {
12	type AccountId = avail_rust_core::AccountId;
13	type Address = avail_rust_core::MultiAddress;
14	type AssetId = u32;
15	type ExtrinsicParams = AvailExtrinsicParams<Self>;
16	type Hash = avail_rust_core::BlockHash;
17	type Hasher = avail_rust_core::BlakeTwo256;
18	type Header = avail_rust_core::AvailHeader;
19	type Signature = avail_rust_core::MultiSignature;
20}
21
22impl RpcConfig for AvailConfig {
23	type AccountId = avail_rust_core::AccountId;
24	type Hash = avail_rust_core::BlockHash;
25	type Header = avail_rust_core::AvailHeader;
26}