mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-24 14:45:42 +00:00
Add subxt_signer crate for native & WASM compatible signing (#1016)
* Add and use subxt-signer crate for WASM compatible signing * cargo fmt * dev keypairs already references * WIP fix various breakages * re-jig features to be simpler and various test fixes etc * doc and web fix * fix various bits and pieces * fix a test I broke * dev-deps can't be linked to in docs, hrmph * cargo fmt * another doc link * document the subxt_signer crate more thoroughly * move feature flag for consistency * more docs, no default subxt feature flag on signer, update release instrs * Add missing license header * unwrap_inner => into_inner * extend a test a little to better check derive junctions * note more clearly that the crypto bits come from sp_core::crypto
This commit is contained in:
+15
-7
@@ -33,23 +33,31 @@
|
||||
)]
|
||||
#![allow(clippy::type_complexity)]
|
||||
|
||||
#[cfg(any(
|
||||
all(feature = "web", feature = "native"),
|
||||
not(any(feature = "web", feature = "native"))
|
||||
))]
|
||||
compile_error!("subxt: exactly one of the 'web' and 'native' features should be used.");
|
||||
|
||||
#[cfg(all(feature = "web", feature = "substrate-compat"))]
|
||||
compile_error!("subxt: the 'substrate-compat' feature is not compatible with the 'web' feature.");
|
||||
|
||||
// The guide is here.
|
||||
pub mod book;
|
||||
|
||||
// Suppress an unused dependency warning because tokio is
|
||||
// only used in example code snippets at the time of writing.
|
||||
#[cfg(test)]
|
||||
use tokio as _;
|
||||
mod only_used_in_docs_or_tests {
|
||||
use subxt_signer as _;
|
||||
use tokio as _;
|
||||
}
|
||||
|
||||
// Used to enable the js feature for wasm.
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
#[cfg(feature = "web")]
|
||||
#[allow(unused_imports)]
|
||||
pub use getrandom as _;
|
||||
|
||||
#[cfg(all(feature = "jsonrpsee-ws", feature = "jsonrpsee-web"))]
|
||||
std::compile_error!(
|
||||
"Both the features `jsonrpsee-ws` and `jsonrpsee-web` are enabled which are mutually exclusive"
|
||||
);
|
||||
|
||||
pub mod blocks;
|
||||
pub mod client;
|
||||
pub mod config;
|
||||
|
||||
Reference in New Issue
Block a user