use std::sync::Arc; use jsonrpsee::RpcModule; use sp_blockchain::{Error as BlockchainError, HeaderBackend, HeaderMetadata}; use sc_transaction_pool_api::TransactionPool; use sp_block_builder::BlockBuilder; use sp_api::ProvideRuntimeApi; pub use sc_rpc_api::DenyUnsafe; use serai_runtime::{opaque::Block, AccountId, Balance, Index}; pub struct FullDeps { pub client: Arc, pub pool: Arc

, pub deny_unsafe: DenyUnsafe, } pub fn create_full< C: ProvideRuntimeApi + HeaderBackend + HeaderMetadata + Send + Sync + 'static, P: TransactionPool + 'static, >( deps: FullDeps, ) -> Result, Box> where C::Api: substrate_frame_rpc_system::AccountNonceApi + pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi + BlockBuilder, { use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; use substrate_frame_rpc_system::{System, SystemApiServer}; let mut module = RpcModule::new(()); let FullDeps { client, pool, deny_unsafe } = deps; module.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?; module.merge(TransactionPayment::new(client).into_rpc())?; Ok(module) }