Move subxt-new to be the new subxt, and get first example working

This commit is contained in:
James Wilson
2025-12-11 17:44:18 +00:00
parent 15a7534a55
commit 02d0c12019
279 changed files with 1169 additions and 28576 deletions
+15 -4
View File
@@ -15,7 +15,7 @@ description = "Sign extrinsics to be submitted by Subxt"
keywords = ["parity", "subxt", "extrinsic", "signer"]
[features]
default = ["sr25519", "ecdsa", "subxt", "std"]
default = ["sr25519", "ecdsa", "std"]
std = [
"regex/std",
"pbkdf2/std",
@@ -40,18 +40,25 @@ ecdsa = ["secp256k1"]
unstable-eth = ["keccak-hash", "ecdsa", "secp256k1", "bip32"]
# Enable support for loading key pairs from polkadot-js json.
polkadot-js-compat = ["std", "subxt", "sr25519", "base64", "scrypt", "crypto_secretbox", "serde", "serde_json"]
polkadot-js-compat = [
"std",
"sr25519",
"base64",
"scrypt",
"crypto_secretbox",
"serde",
"serde_json"
]
# Make the keypair algorithms here compatible with Subxt's Signer trait,
# so that they can be used to sign transactions for compatible chains.
subxt = ["dep:subxt-core"]
subxt = ["dep:subxt"]
# The getrandom package is used via schnorrkel. We need to enable the JS
# feature on it if compiling for the web.
web = ["getrandom/js"]
[dependencies]
subxt-core = { workspace = true, optional = true, default-features = false }
secrecy = { workspace = true }
regex = { workspace = true, features = ["unicode"] }
hex = { workspace = true }
@@ -74,12 +81,16 @@ secp256k1 = { workspace = true, optional = true, features = [
keccak-hash = { workspace = true, optional = true }
thiserror = { workspace = true, default-features = false }
# Pulled in if the subxt features is enabled.
subxt = { workspace = true, optional = true }
# These are used if the polkadot-js-compat feature is enabled
serde = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
base64 = { workspace = true, optional = true, features = ["alloc"] }
scrypt = { workspace = true, default-features = false, optional = true }
crypto_secretbox = { workspace = true, optional = true, features = ["alloc", "salsa20"] }
subxt-utils-accountid32 = { workspace = true, optional = true }
# We only pull this in to enable the JS flag for schnorrkel to use.
getrandom = { workspace = true, optional = true }