mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 00:28:01 +00:00
62b97a090d
* Update all dependencies * Upgrade dependencies whenever “easy” “easy” means that there are no major changes required. * Fix build and bump paste dependency to 0.1.6 * Remove dead code * Re-add = dependency for futures-preview * Add missing std features for runtime-io * Remove git dependencies as updated versions have been published to crates.io * try to debug bug * For sr-io, "std" should imply "no_oom" and "no_panic_handler". Otherwise, rustc complains (correctly) about duplicate lang items. * Add missing "runtime-io/std" features * Fix compilation errors * Prevent duplicate lang items Rust does not allow duplicate lang items. When compiled without the `std` feature, `sr-io` defines two lang items. Therefore, `sr-io` compiled without `feature = "std"` must not be linked with `std`. However, `pwasm-utils` and `wasmi-validation` both bring in `std` unless compiled with `default-features = "false"`. This caused a duplicate lang item error. Building both with `default-features = "false"` prevents this error. When building with `feature = "std"`, they should both be built with the `std` feature, so this feature needs to be explicitly depended on. * Bump `impl_version` * Make tests pass Three tests used 1 less gas than they had previously. * Try to un-break build * Add a Cargo.lock file * Revert offchain code * Revert "Revert offchain code" This reverts commit d216d08cc6ca0344614669c1d24cde3aa5c0d4e2. * Don’t try to send a body with a GET request without adding a Transfer-Encoding or Content-Length header. This has always been wrong, but hyperium/hyper#1925 hid the bug until hyper was upgraded to 0.12.35. * Change some more GET requests to POST requests * Fix excess line width and remove an `extern crate` * Delete commented-out extern crate Co-Authored-By: Sergei Pepyakin <sergei@parity.io> * Fix regression in Cargo.toml files dev-dependencies need `default-features = false`, too. * Bump parity-wasm dependency * Bump `futures-preview` * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update Cargo.lock files * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update core/service/src/chain_ops.rs Co-Authored-By: Sergei Pepyakin <sergei@parity.io>
= Subkey Subkey is a commandline utility included with Substrate that generates or restores Substrate keys. `subkey` will use the http://wiki.polkadot.network/en/latest/polkadot/learn/cryptography/#keypairs-and-signing[sr25519] cryptography by default. If you need to use the older ed25519 cryptography to generate or restore your key pass the `--ed25519` flag to any of the commands. == Usage === Generate a random account ```bash subkey generate ``` Will output a mnemonic phrase and give you the seed, public key, and address of a new account. DO NOT SHARE your mnemonic or seed with ANYONE it will give them access to your funds. If someone is making a transfer to you they will only need your **Address**. === Inspecting a key You can inspect a given URI (mnemonic, seed, public key, or address) and recover the public key and the address. ```bash subkey inspect <mnemonic,seed,pubkey,address> OUTPUT: Public key (hex): 0x461edcf1ba99e43f50dec4bdeb3d1a2cf521ad7c3cd0eeee5cd3314e50fd424c Address (SS58): 5DeeNqcAcaHDSed2HYnqMDK7JHcvxZ5QUE9EKmjc5snvU6wF ``` === Signing `subkey` expects a message to come in on STDIN, one way to sign a message would look like this: ```bash echo -n <msg> | subkey sign <seed,mnemonic> OUTPUT: a69da4a6ccbf81dbbbfad235fa12cf8528c18012b991ae89214de8d20d29c1280576ced6eb38b7406d1b7e03231df6dd4a5257546ddad13259356e1c3adfb509 ``` === Verifying a signature ```bash echo -n <msg> | subkey verify <sig> <address> OUTPUT: Signature verifies correctly. ``` === Using the vanity generator You can use the included vanity generator to find a seed that provides an address which includes the desired pattern. Be warned, depending on your hardware this may take a while. ```bash subkey vanity 1337 ``` === Signing a transaction Sign a transaction from an encoded `Call`. ```bash subkey sign-transaction \ --call <call-as-hex> \ --nonce 0 \ --suri <secret-uri> \ --password <password> \ --prior-block-hash <prior-block-hash-as-hex> ``` Will output a signed and encoded `UncheckedMortalCompactExtrinsic` as hex.