,
54 | /// Transaction pool instance.
55 | pub pool: Arc,
56 | /// Remote access to the blockchain (async).
57 | pub remote_blockchain: Arc>,
58 | /// Fetcher instance.
59 | pub fetcher: Arc,
60 | }
61 |
62 | /// Extra dependencies for BABE.
63 | pub struct BabeDeps {
64 | /// BABE protocol config.
65 | pub babe_config: Config,
66 | /// BABE pending epoch changes.
67 | pub shared_epoch_changes: SharedEpochChanges,
68 | /// The keystore that manages the keys of the node.
69 | pub keystore: SyncCryptoStorePtr,
70 | }
71 |
72 | /// Extra dependencies for GRANDPA
73 | pub struct GrandpaDeps {
74 | /// Voting round info.
75 | pub shared_voter_state: SharedVoterState,
76 | /// Authority set info.
77 | pub shared_authority_set: SharedAuthoritySet,
78 | /// Receives notifications about justification events from Grandpa.
79 | pub justification_stream: GrandpaJustificationStream,
80 | /// Executor to drive the subscription manager in the Grandpa RPC handler.
81 | pub subscription_executor: SubscriptionTaskExecutor,
82 | /// Finality proof provider.
83 | pub finality_provider: Arc>,
84 | }
85 |
86 | /// Full client dependencies.
87 | pub struct FullDeps {
88 | /// The client instance to use.
89 | pub client: Arc,
90 | /// Transaction pool instance.
91 | pub pool: Arc,
92 | /// The SelectChain Strategy
93 | pub select_chain: SC,
94 | /// A copy of the chain spec.
95 | pub chain_spec: Box,
96 | /// Whether to deny unsafe calls
97 | pub deny_unsafe: DenyUnsafe,
98 | /// BABE specific dependencies.
99 | pub babe: BabeDeps,
100 | /// GRANDPA specific dependencies.
101 | pub grandpa: GrandpaDeps,
102 | }
103 |
104 | /// A IO handler that uses all Full RPC extensions.
105 | pub type IoHandler = jsonrpc_core::IoHandler;
106 |
107 | /// Instantiate all Full RPC extensions.
108 | pub fn create_full(
109 | deps: FullDeps,
110 | ) -> jsonrpc_core::IoHandler where
111 | C: ProvideRuntimeApi + HeaderBackend + AuxStore +
112 | HeaderMetadata + Sync + Send + 'static,
113 | C::Api: substrate_frame_rpc_system::AccountNonceApi,
114 | C::Api: pallet_contracts_rpc::ContractsRuntimeApi,
115 | // C::Api: pallet_mmr_rpc::MmrRuntimeApi::Hash>,
116 | C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi