mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 01:41:09 +00:00
Refactor the runtime API to use traits. (#878)
* Add missing `As` imports. * Adds new API traits that will be used by the client and runtime * Switch consensus to new API's * Switches transaction-pool to new API's * Move runtime api stuff into its own crate * Adds `impl_apis!` macro for implementing the new API traits * Make `metadata` return directly a blob * Runtime replace `impl_stubs!` with `impl_apis!` * Switches to none feature based approach for declaring the different API traits * Fixes compilation error * Fixes errors * Make the `decl_apis!` trait usable from the outside * Make the `test-client` use the new API traits * Remove last `impl_stubs!` bits and move some of them into wasm executor for tests * A little bit more documentation
This commit is contained in:
@@ -36,6 +36,7 @@ extern crate parking_lot;
|
||||
extern crate hash_db;
|
||||
extern crate heapsize;
|
||||
extern crate kvdb;
|
||||
extern crate sr_api;
|
||||
|
||||
#[macro_use] extern crate error_chain;
|
||||
#[macro_use] extern crate log;
|
||||
@@ -67,3 +68,8 @@ pub use client::{
|
||||
pub use notifications::{StorageEventStream, StorageChangeSet};
|
||||
pub use state_machine::ExecutionStrategy;
|
||||
pub use leaves::LeafSet;
|
||||
|
||||
/// Traits for interfacing with the runtime from the client.
|
||||
pub mod runtime_api {
|
||||
pub use sr_api::*;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user