deps: use polkadot-sdk umbrella crate (#1786)

* deps: unify usage of polkadot-sdk crates

* cargo fmt

* fix macro crate

* make tests compile

* fix more nits

* fix doc tests

* fix more nits

* more nits

* core: remove polkadot-sdk/std

* cargo fmt

* remove polkadot-sdk/std by default

* Update metadata/Cargo.toml

* remove more std

* Update Cargo.toml
This commit is contained in:
Niklas Adolfsson
2024-10-11 14:19:11 +02:00
committed by GitHub
parent 5bf1756394
commit 0e86993cd7
31 changed files with 6131 additions and 662 deletions
+2 -4
View File
@@ -18,7 +18,6 @@ keywords = ["parity", "subxt", "extrinsic", "signer"]
default = ["sr25519", "ecdsa", "subxt", "std"]
std = [
"regex/std",
"sp-crypto-hashing/std",
"pbkdf2/std",
"sha2/std",
"hmac/std",
@@ -60,7 +59,7 @@ cfg-if = { workspace = true }
codec = { package = "parity-scale-codec", workspace = true, features = [
"derive",
] }
sp-crypto-hashing = { workspace = true }
polkadot-sdk = { workspace = true, features = ["sp-crypto-hashing"] }
pbkdf2 = { workspace = true }
sha2 = { workspace = true }
hmac = { workspace = true }
@@ -85,10 +84,9 @@ crypto_secretbox = { workspace = true, optional = true, features = ["alloc", "sa
getrandom = { workspace = true, optional = true }
[dev-dependencies]
sp-keyring = { workspace = true }
proptest = { workspace = true }
hex-literal = { workspace = true }
sp-core = { workspace = true }
polkadot-sdk = { workspace = true, features = ["sp-core", "sp-keyring"] }
[package.metadata.cargo-machete]
ignored = ["getrandom"]
+1
View File
@@ -3,6 +3,7 @@
// see LICENSE for license details.
use codec::{Decode, Encode};
use polkadot_sdk::sp_crypto_hashing;
// This code is taken from sp_core::crypto::DeriveJunction. The logic should be identical,
// though the API is tweaked a touch.
+2 -2
View File
@@ -4,6 +4,7 @@
//! An ecdsa keypair implementation.
use codec::Encode;
use polkadot_sdk::sp_crypto_hashing;
use crate::crypto::{seed_from_entropy, DeriveJunction, SecretUri};
use core::{fmt::Display, str::FromStr};
@@ -359,8 +360,7 @@ mod test {
use super::*;
use sp_core::crypto::Pair as _;
use sp_core::ecdsa::Pair as SpPair;
use polkadot_sdk::sp_core::{self, crypto::Pair as _, ecdsa::Pair as SpPair};
#[test]
fn check_from_phrase_matches() {
+2 -2
View File
@@ -344,8 +344,8 @@ mod test {
use super::*;
use sp_core::crypto::Pair as _;
use sp_core::sr25519::Pair as SpPair;
use polkadot_sdk::sp_core::{self, crypto::Pair as _, sr25519::Pair as SpPair};
use polkadot_sdk::sp_keyring;
#[test]
fn check_from_phrase_matches() {