, pool: Arc) -> RpcExtension where
C: ProvideRuntimeApi,
C: client::blockchain::HeaderBackend,
C: Send + Sync + 'static,
C::Api: frame_rpc_system::AccountNonceApi,
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi,
P: TransactionPool + Sync + Send + 'static,
UE: codec::Codec + Send + Sync + 'static,
{
use frame_rpc_system::{FullSystem, SystemApi};
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi};
let mut io = jsonrpc_core::IoHandler::default();
io.extend_with(
SystemApi::to_delegate(FullSystem::new(client.clone(), pool))
);
io.extend_with(
TransactionPaymentApi::to_delegate(TransactionPayment::new(client))
);
io
}
/// Instantiate all RPC extensions for light node.
pub fn create_light(
client: Arc,
remote_blockchain: Arc>,
fetcher: Arc,
pool: Arc,
) -> RpcExtension
where
C: ProvideRuntimeApi,
C: client::blockchain::HeaderBackend,
C: Send + Sync + 'static,
C::Api: frame_rpc_system::AccountNonceApi,
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi,
P: TransactionPool + Sync + Send + 'static,
F: client::light::fetcher::Fetcher + 'static,
UE: codec::Codec + Send + Sync + 'static,
{
use frame_rpc_system::{LightSystem, SystemApi};
let mut io = jsonrpc_core::IoHandler::default();
io.extend_with(
SystemApi::::to_delegate(LightSystem::new(client, remote_blockchain, fetcher, pool))
);
io
}