mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-10 09:57:30 +00:00
JSON-RPC client generation (#2778)
* Bump jsonrpc & generate clients. * Initial version of JSON-RPC client. * Re-wort * Remove spurious `#[derive(Encode, Decode)]` They did not compile, since `Encode` and `Decode` are deliberately not implemented for `usize`. Fixes #2742. * Re-write rpc-client example. * Update to jsonrpc=12.0.0 * Remove unnecessary import * Bump version. * Revert version bump. * Bump again.
This commit is contained in:
committed by
Gavin Wood
parent
5df89a8a6f
commit
6112f815b3
@@ -16,27 +16,28 @@
|
||||
|
||||
//! Substrate blockchain API.
|
||||
|
||||
use std::sync::Arc;
|
||||
pub mod error;
|
||||
pub mod number;
|
||||
|
||||
use log::warn;
|
||||
use client::{self, Client, BlockchainEvents};
|
||||
use jsonrpc_derive::rpc;
|
||||
use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId};
|
||||
use primitives::{H256, Blake2Hasher};
|
||||
use crate::rpc::Result as RpcResult;
|
||||
use crate::rpc::futures::{stream, Future, Sink, Stream};
|
||||
use runtime_primitives::generic::{BlockId, SignedBlock};
|
||||
use runtime_primitives::traits::{Block as BlockT, Header, NumberFor};
|
||||
|
||||
use crate::subscriptions::Subscriptions;
|
||||
|
||||
mod error;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
mod number;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use client::{self, Client, BlockchainEvents};
|
||||
use crate::rpc::Result as RpcResult;
|
||||
use crate::rpc::futures::{stream, Future, Sink, Stream};
|
||||
use crate::subscriptions::Subscriptions;
|
||||
use jsonrpc_derive::rpc;
|
||||
use jsonrpc_pubsub::{typed::Subscriber, SubscriptionId};
|
||||
use log::warn;
|
||||
use primitives::{H256, Blake2Hasher};
|
||||
use runtime_primitives::generic::{BlockId, SignedBlock};
|
||||
use runtime_primitives::traits::{Block as BlockT, Header, NumberFor};
|
||||
use self::error::Result;
|
||||
|
||||
pub use self::gen_client::Client as ChainClient;
|
||||
|
||||
/// Substrate blockchain API
|
||||
#[rpc]
|
||||
pub trait ChainApi<Number, Hash, Header, SignedBlock> {
|
||||
|
||||
Reference in New Issue
Block a user