howardwu / wagyu Goto Github PK
View Code? Open in Web Editor NEWA Rust library for generating cryptocurrency wallets
Home Page: https://wagyu.dev
License: Apache License 2.0
A Rust library for generating cryptocurrency wallets
Home Page: https://wagyu.dev
License: Apache License 2.0
Rearchitect the CLI to provide coin specific flags, which can be accessible via the --help
command.
👋 looks like 0.6.3 tag does not exist in the repo, can you tag the commit and also mark it as latest release? Thanks!
Dependabot can't resolve your Rust dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Updating crates.io index
error: failed to select a version for the requirement `aes = "^0.2"`
candidate versions found which didn't match: 0.7.4, 0.7.3, 0.7.2, ...
location searched: crates.io index
required by package `fpe v0.1.0`
... which is depended on by `wagyu-zcash v0.6.3 (/home/dependabot/dependabot-updater/dependabot_tmp_dir/zcash)`
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Dependabot can't resolve your Rust dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Updating crates.io index
error: failed to select a version for the requirement `aes = "^0.2"`
candidate versions found which didn't match: 0.7.4, 0.7.3, 0.7.2, ...
location searched: crates.io index
required by package `fpe v0.1.0`
... which is depended on by `wagyu-zcash v0.6.3 (/home/dependabot/dependabot-updater/dependabot_tmp_dir/zcash)`
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> src/bitcoin/address.rs:28:13
|
28 | Type::P2PKH => Address::p2pkh(private_key),
| ^^^^^^^^^^^ help: consider using a reference: `&Type::P2PKH`
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> src/bitcoin/address.rs:29:13
|
29 | Type::P2WPKH_P2SH => Address::p2wpkh_p2sh(private_key),
| ^^^^^^^^^^^^^^^^^ help: consider using a reference: `&Type::P2WPKH_P2SH`
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> src/bitcoin/address.rs:75:13
|
75 | Network::Testnet => TESTNET_ADDRESS_BYTE,
| ^^^^^^^^^^^^^^^^ help: consider using a reference: `&Network::Testnet`
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> src/bitcoin/privatekey.rs:90:13
|
90 | Network::Testnet => TESTNET_BYTE,
| ^^^^^^^^^^^^^^^^ help: consider using a reference: `&Network::Testnet`
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> src/monero/network.rs:18:9
|
18 | Network::Testnet => Some(&[0x35]),
| ^^^^^^^^^^^^^^^^ help: consider using a reference: `&Network::Testnet`
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> src/monero/network.rs:19:9
|
19 | Network::Mainnet => Some(&[0x12]),
| ^^^^^^^^^^^^^^^^ help: consider using a reference: `&Network::Mainnet`
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> src/monero/network.rs:20:9
|
20 | Network::Error => Some(&[0x00]), // fix
| ^^^^^^^^^^^^^^ help: consider using a reference: `&Network::Error`
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> src/zcash/address.rs:24:13
|
24 | true => private_key.to_public_key().serialize().to_vec(),
| ^^^^ help: consider using a reference: `&true`
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> src/zcash/address.rs:25:13
|
25 | false => private_key
| ^^^^^ help: consider using a reference: `&false`
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> src/zcash/address.rs:36:13
|
36 | Network::Testnet => TESTNET_ADDRESS_BYTES,
| ^^^^^^^^^^^^^^^^ help: consider using a reference: `&Network::Testnet`
error[E0658]: non-reference pattern used to match a reference (see issue #42640)
--> src/zcash/privatekey.rs:90:13
|
90 | Network::Testnet => TESTNET_BYTE,
| ^^^^^^^^^^^^^^^^ help: consider using a reference: `&Network::Testnet`
First off, this is a fantastic project! Thank you for building it.
How deep down the wallet features past wallet generation and importing do you plan on going? I imagine wagyu would be a useful component in an offline signing solution for instance.
High-level - Subaddress
Monero Github - How subaddresses work
zcash-cli
./zcash-cli -conf=/blockchain/pkg/zcash/zcash.conf createrawtransaction '[{"txid": "643020d7a70b7660b3b77550be9a4a8a54f8d088b5e3d5a887ade41848117829", "vout": 1}]' '{"tmF3uG6NKJXTvLFkXETx7NVxKwKWSBvPf21": "0.095"}'
0400008085202f89012978114818e4ad87a8d5e3b588d0f8548a4a9abe5075b7b360760ba7d72030640100000000ffffffff0160f59000000000001976a9143a8b2f8d711643f5bff63945ef44c2973bab10ce88ac000000002c6811000000000000000000000000
./zcash-cli -conf=/blockchain/pkg/zcash/zcash.conf signrawtransaction 0400008085202f89012978114818e4ad87a8d5e3b588d0f8548a4a9abe5075b7b360760ba7d72030640100000000ffffffff0160f59000000000001976a9143a8b2f8d711643f5bff63945ef44c2973bab10ce88ac000000002c6811000000000000000000000000
{
"hex": "0400008085202f89012978114818e4ad87a8d5e3b588d0f8548a4a9abe5075b7b360760ba7d7203064010000006b483045022100f6b037872ad833c951869e63291364d2fed4e1de8dcc8157cfefebc86bfa34c202207a7fd5c72243eff854538f9aea3ed063f78ce3876048330a9f68353a3272cb07012102d46a5c8b2aa894c9efc9f7eb92efd1c150ecad55f892d5de61675d44968dcc8cffffffff0160f59000000000001976a9143a8b2f8d711643f5bff63945ef44c2973bab10ce88ac000000002c6811000000000000000000000000",
"complete": true
}
privkey
./zcash-cli -conf=/blockchain/pkg/zcash/zcash.conf dumpprivkey tmCaNubpa6dFm5TJraf5u8dTbG6C4HpZp9R
cRy5WaeUyHx81JHpgJY7UdWaih43Demn9P2RGEoBNF8wfKvwuUg
rust
wagyu zcash transaction --signrawtransaction 0400008085202f89012978114818e4ad87a8d5e3b588d0f8548a4a9abe5075b7b360760ba7d72030640100000000ffffffff0160f59000000000001976a9143a8b2f8d711643f5bff63945ef44c2973bab10ce88ac000000002c6811000000000000000000000000 '[{"txid": "643020d7a70b7660b3b77550be9a4a8a54f8d088b5e3d5a887ade41848117829", "vout": 1, "amount": 10000000, "address": "tmCaNubpa6dFm5TJraf5u8dTbG6C4HpZp9R", "privatekey": "cRy5WaeUyHx81JHpgJY7UdWaih43Demn9P2RGEoBNF8wfKvwuUgM"}]'
Transaction Id c0468a8fe42b019e159a2b970b05641372d1a84d2794de5115d6526da2e7903b
Transaction Hex 0400008085202f89012978114818e4ad87a8d5e3b588d0f8548a4a9abe5075b7b360760ba7d7203064010000006b48304502210083d57dea4184ea79f8dde322e3ad0873cda078c5a21cb48427802a31c2f57aa602200d2ef3cf9c52d9ff292bad081f80d65e39cf4be90963166a86fbd39c70fb9a1d012102d46a5c8b2aa894c9efc9f7eb92efd1c150ecad55f892d5de61675d44968dcc8cffffffff0160f59000000000001976a9143a8b2f8d711643f5bff63945ef44c2973bab10ce88ac000000002c6811000000000000000000000000
correct tx (already broadcast).
{
"txid": "153903a49c861b7be6ae60a0b5588fccfed6b77e4eba8ba9667f3a5fdaa24827",
"overwintered": true,
"version": 4,
"versiongroupid": "892f2085",
"locktime": 0,
"expiryheight": 1140780,
"vin": [
{
"txid": "643020d7a70b7660b3b77550be9a4a8a54f8d088b5e3d5a887ade41848117829",
"vout": 1,
"scriptSig": {
"asm": "3045022100f6b037872ad833c951869e63291364d2fed4e1de8dcc8157cfefebc86bfa34c202207a7fd5c72243eff854538f9aea3ed063f78ce3876048330a9f68353a3272cb07[ALL] 02d46a5c8b2aa894c9efc9f7eb92efd1c150ecad55f892d5de61675d44968dcc8c",
"hex": "483045022100f6b037872ad833c951869e63291364d2fed4e1de8dcc8157cfefebc86bfa34c202207a7fd5c72243eff854538f9aea3ed063f78ce3876048330a9f68353a3272cb07012102d46a5c8b2aa894c9efc9f7eb92efd1c150ecad55f892d5de61675d44968dcc8c"
},
"sequence": 4294967295
}
],
"vout": [
{
"value": 0.09500000,
"valueZat": 9500000,
"valueSat": 9500000,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 3a8b2f8d711643f5bff63945ef44c2973bab10ce OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a9143a8b2f8d711643f5bff63945ef44c2973bab10ce88ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"tmF3uG6NKJXTvLFkXETx7NVxKwKWSBvPf21"
]
}
}
],
"vjoinsplit": [
],
"valueBalance": 0.00000000,
"valueBalanceZat": 0,
"vShieldedSpend": [
],
"vShieldedOutput": [
]
}
utxo
{
"hex": "0400008085202f890126596ef647ad492797a9d99b48dd5c03d811ccde5e11054e2e8eb604ad077aa2010000009200483045022100fb2f6998f0403ff36b25c645e45fd4a0f1ad6e0e5bca97bc9f60d1e2cb2e46890220727b4e437ae4e95c4f1b42a31e230a8036a29a32e15f81c2a29dd97bb6e733080147512103c62099f3d6e10dc66506ce8e38bfd6b0edfaca3a15f580523a4665744ac197c521025f71d0afcdc77de9a595dd7c6546fdbe127588fdb4d1773d89056cde1101ead852aefeffffff0264495d05000000001976a914553dc540a3193e65cb7cd30d0614eb8c1b1c22ad88ac80969800000000001976a9141f665d94693ea7712530ee8460116cbf879858f488acf76711002a6811000000000000000000000000",
"txid": "643020d7a70b7660b3b77550be9a4a8a54f8d088b5e3d5a887ade41848117829",
"overwintered": true,
"version": 4,
"versiongroupid": "892f2085",
"locktime": 1140727,
"expiryheight": 1140778,
"vin": [
{
"txid": "a27a07ad04b68e2e4e05115edecc11d8035cdd489bd9a9972749ad47f66e5926",
"vout": 1,
"scriptSig": {
"asm": "0 3045022100fb2f6998f0403ff36b25c645e45fd4a0f1ad6e0e5bca97bc9f60d1e2cb2e46890220727b4e437ae4e95c4f1b42a31e230a8036a29a32e15f81c2a29dd97bb6e73308[ALL] 512103c62099f3d6e10dc66506ce8e38bfd6b0edfaca3a15f580523a4665744ac197c521025f71d0afcdc77de9a595dd7c6546fdbe127588fdb4d1773d89056cde1101ead852ae",
"hex": "00483045022100fb2f6998f0403ff36b25c645e45fd4a0f1ad6e0e5bca97bc9f60d1e2cb2e46890220727b4e437ae4e95c4f1b42a31e230a8036a29a32e15f81c2a29dd97bb6e733080147512103c62099f3d6e10dc66506ce8e38bfd6b0edfaca3a15f580523a4665744ac197c521025f71d0afcdc77de9a595dd7c6546fdbe127588fdb4d1773d89056cde1101ead852ae"
},
"sequence": 4294967294
}
],
"vout": [
{
"value": 0.89999716,
"valueZat": 89999716,
"valueSat": 89999716,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 553dc540a3193e65cb7cd30d0614eb8c1b1c22ad OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914553dc540a3193e65cb7cd30d0614eb8c1b1c22ad88ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"tmHV4mNJBbQsc8TraAfZhVpddch1GRtVWCw"
]
}
},
{
"value": 0.10000000,
"valueZat": 10000000,
"valueSat": 10000000,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 1f665d94693ea7712530ee8460116cbf879858f4 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a9141f665d94693ea7712530ee8460116cbf879858f488ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"tmCaNubpa6dFm5TJraf5u8dTbG6C4HpZp9R"
]
}
}
],
"vjoinsplit": [
],
"valueBalance": 0.00000000,
"valueBalanceZat": 0,
"vShieldedSpend": [
],
"vShieldedOutput": [
],
"blockhash": "0041a13f0150f09a93033d0e64f1617c8fe9cfe23c79e79d81521a39aeb8b602",
"height": 1140739,
"confirmations": 901,
"time": 1603799809,
"blocktime": 1603799809
}
Caused by:
0: error getting cargo metadata
1: cargo metadata
exited with an error: Updating crates.io index
error: failed to select a version for the requirement aes = "^0.2"
candidate versions found which didn't match: 0.8.2, 0.8.1, 0.8.0, ...
location searched: crates.io index
required by package wagyu-zcash v0.6.3
... which satisfies dependency wagyu-zcash = "^0.6.3"
of package wagyu v0.6.3
... which satisfies dependency wagyu = "^0.6.3"
of package frontend v0.1.0 (/home/developer/Desktop/Folkseconomy/prototype-12/folkseconomy/frontend)
Dependabot can't resolve your Rust dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Updating crates.io index
error: failed to select a version for the requirement `aes = "^0.2"`
candidate versions found which didn't match: 0.7.4, 0.7.3, 0.7.2, ...
location searched: crates.io index
required by package `fpe v0.1.0`
... which is depended on by `wagyu-zcash v0.6.3 (/home/dependabot/dependabot-updater/dependabot_tmp_dir/zcash)`
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Tracking thread to determine how to incorporate #![no_std]
(if at all) into wagyu
.
Dependabot can't resolve your Rust dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Updating crates.io index
error: failed to select a version for the requirement `bitvec = "^0.15"`
candidate versions found which didn't match: 0.17.4
location searched: crates.io index
required by package `parity-scale-codec v1.2.0`
... which is depended on by `impl-codec v0.4.2`
... which is depended on by `primitive-types v0.7.0`
... which is depended on by `ethereum-types v0.9.0`
... which is depended on by `wagyu-ethereum v0.6.3 (/home/dependabot/dependabot-updater/dependabot_tmp_dir/ethereum)`
... which is depended on by `wagyu v0.6.3 (/home/dependabot/dependabot-updater/dependabot_tmp_dir
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
The following HD version bytes are unimplemented:
Coin | Public Key | Private Key | Address Encoding | BIP 32 Path |
---|---|---|---|---|
Bitcoin Testnet | 0x043587cf - tpub |
0x04358394 - tprv |
P2PKH or P2SH | m/44'/1' |
Bitcoin Testnet | 0x044a5262 - upub |
0x044a4e28 - uprv |
P2WPKH in P2SH | m/49'/1' |
This results in the following errors:
new()
or from_str
methodsI can't package this for NixOS without a Cargo.lock
. Can you please commit it? Thanks.
Dependabot can't resolve your Rust dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Updating crates.io index
error: failed to select a version for the requirement `bitvec = "^0.15"`
candidate versions found which didn't match: 0.17.4
location searched: crates.io index
required by package `parity-scale-codec v1.2.0`
... which is depended on by `impl-codec v0.4.2`
... which is depended on by `primitive-types v0.7.0`
... which is depended on by `ethereum-types v0.9.0`
... which is depended on by `wagyu-ethereum v0.6.3 (/home/dependabot/dependabot-updater/dependabot_tmp_dir/ethereum)`
... which is depended on by `wagyu v0.6.3 (/home/dependabot/dependabot-updater/dependabot_tmp_dir
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Hi @howardwu,
When trying to run cargo install wagyu
I'm hit with the following:
Updating crates.io index
Downloaded wagyu v0.6.3
Downloaded 1 crate (48.9 KB) in 0.48s
Installing wagyu v0.6.3
error: failed to compile `wagyu v0.6.3`, intermediate artifacts can be found at `/run/user/1000/cargo-installoftX6F`
Caused by:
failed to select a version for the requirement `aes = "^0.2"`
candidate versions found which didn't match: 0.8.2, 0.8.1, 0.8.0, ...
location searched: crates.io index
required by package `wagyu-zcash v0.6.3`
... which satisfies dependency `wagyu-zcash = "^0.6.3"` of package `wagyu v0.6.3`
Not sure if I'm doing something wrong or the app needs some update.
Tarpaulin test coverage generates correct results at ~86-88% code coverage.
Codecov reports only the coverage from src/{coin}/network
and src/{coin}/wordlist
.
stable
branchHello,
i have only one short questions, do you know a site where i can get informations about other cryptocurrencys and the variables that i must replace when i want to expand your prg?
thx
Dependabot can't resolve your Rust dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Updating crates.io index
error: failed to select a version for the requirement `aes = "^0.2"`
candidate versions found which didn't match: 0.7.4, 0.7.3, 0.7.2, ...
location searched: crates.io index
required by package `fpe v0.1.0`
... which is depended on by `wagyu-zcash v0.6.3 (/home/dependabot/dependabot-updater/dependabot_tmp_dir/zcash)`
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Dependabot can't resolve your Rust dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Updating crates.io index
error: failed to select a version for the requirement `aes = "^0.2"`
candidate versions found which didn't match: 0.7.4, 0.7.3, 0.7.2, ...
location searched: crates.io index
required by package `fpe v0.1.0`
... which is depended on by `wagyu-zcash v0.6.3 (/home/dependabot/dependabot-updater/dependabot_tmp_dir/zcash)`
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Tracking thread on efforts to provide wasm support for wagu
.
This is a great library/tool, but doesn't seem to have much activity from owners for last year or so. Is this project still being maintained?
cc @howardwu
I'd like to be able to do something like wagyu bitcoin import-hd -m "..." -d "m/84'/0'/0'/0/0" -f bech32
such that it prints out the address in bech32 format instead of P2PKH. Currently there doesn't appear to be any way to do this without code modification.
I'm happy to write a PR for this, but is this something you'd be interested in?
$ ./target/release/wagyu ethereum import-hd --mnemonic "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat" --derivation "m/44'/60'/0'/0/0/"
Error: MnemonicError(WordlistError(InvalidWord("candy")))
Not sure why this is not working, this is clearly a valid mnemonic.
Dependabot can't resolve your Rust dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Updating crates.io index
error: failed to select a version for the requirement `aes = "^0.2"`
candidate versions found which didn't match: 0.7.4, 0.7.3, 0.7.2, ...
location searched: crates.io index
required by package `fpe v0.1.0`
... which is depended on by `wagyu-zcash v0.6.3 (/home/dependabot/dependabot-updater/dependabot_tmp_dir/zcash)`
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Currently no support for bip84: deriving P2WPKH (bech32) hd wallets.
hello!
was lazy to read your code (sorry), do you encrypt your data in the wallet?
btw this project is amazing. I love cli programs and this one is really cool
Hey, Where is the doc for using this as a library? All examples are about command line.
Dependabot can't resolve your Rust dependency files.
As a result, Dependabot couldn't update your dependencies.
The error Dependabot encountered was:
Updating crates.io index
error: failed to select a version for the requirement `aes = "^0.2"`
candidate versions found which didn't match: 0.7.4, 0.7.3, 0.7.2, ...
location searched: crates.io index
required by package `fpe v0.1.0`
... which is depended on by `wagyu-zcash v0.6.3 (/home/dependabot/dependabot-updater/dependabot_tmp_dir/zcash)`
If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.
Uint types (e.g. u32) have native to_le_bytes
and to_be_bytes
functions. This is preferred over the ByteOrder method of uint to byte conversion.
Hello! Thanks for the awesome library!
I have an ethereum mnemonic and am trying to generate 10 addresses using BIP44. What's the best way to do this?
If I run wagyu ethereum hd --count 10
it generates 10 separate wallets, which is not what I want.
There sure are a lot of different ways of handling the path, but BIP44 defines the path as m / purpose' / coin_type' / account' / change / address_index
. import-hd
only has a flag for --index
. I would like to set the account (and maybe change), too.
This probably belongs on a separate issue, but while trying to figure this out, I think --index
is not working like I expect it to.
$ wagyu ethereum import-hd -m "virus harbor pact end relief change limit magnet screen term desert fit" -d "ethereum" --index 9
Path m/44'/60'/0'/9
Mnemonic virus harbor pact end relief change limit magnet screen term desert fit
Extended Private Key xprvA221HiWQYs4iPcXEEUxdTJqHncsaSMNotBhCtnC7CfJKscyA1MfxApf91xsNhFrMBfMFBbzkPjSAvbqCWiaXUAMPzzMS2jAy9pJ4npaLmmR
Extended Public Key xpub6F1MhE3JPEd1c6bhLWVdpSn2Lei4qp6fFQcohAbikzqJkRJJYtzCicycsGt7BURuCw4aHXqNir5fjmTbM4FiWwk4TWXvF74NspU4XnSHTes
Private Key 451171f4c637bfb35d44d859886d363b64114d84afc3423c6606fed0a7ec3536
Public Key cdcf2b1c5bae5b57e1cc2f01c1b62f9c4cc75970d050d855052c7bfd3762582716a0e785182d18eee5c35678495a047b07d34566633f57e728d2246c9741f1e1
Address 0x6b9472ebbfe4F7EF4eFe57013A5dC35303A6B452
I expected "Path" to be m/44'/60'/0'/0/9
like Ganache uses:
$ wagyu ethereum import-hd -m "virus harbor pact end relief change limit magnet screen term desert fit" -d "m/44'/60'/0'/0/9"
Path m/44'/60'/0'/0/9
Mnemonic virus harbor pact end relief change limit magnet screen term desert fit
Extended Private Key xprvA3yJkjbs6TKGjx6zr8fkWvDEkmEFfXqUziiQEFPTMMnai5qxbEvH4HBatpadpVN4B1j41rvyd1FvQkfuxvKq3H8rUGPJTAV9nsWboS6mY6e
Extended Public Key xpub6GxfAF8kvpsZxSBTxACkt49yJo4k4zZLMwe12do4uhKZatB78nEXc5W4k6zYwkYpgShfeRCJ714oz2TFjbGK6xZD8xDh3YgHzqWXwzeRfaG
Private Key 5fdee1800c5263dc7e0cbcb52ba3a884837fe1bc077976fcc035b514157e9304
Public Key 15dc3fd47a15120dff636be498cb88d5d13c8d4da3aa9962134076e83d9af60c3ed1508b7a77c16c4d33154ad2cee608398527bdc1d79253b1fee7856400747d
Address 0x2A53D0f3310A5832d5A030b4b2f3E9C910C2AF7b
For now, I can build the path manually, but it would be nice if wagyu could do this for me.
Bip49 keys are not generated properly:
Prefix is xprv and xpub instead of yprv and ypub.
Address format is p2pkh instead of p2sh_p2wpkh.
thanks
I tried to derive some receiving address similar to Electrum derivation path (e.g. m/0/<n>
) using following snippet, but the generated addresses is different with addresses that generated by Electrum.
type N = Mainnet;
let ext_key = BitcoinExtendedPublicKey::<N>::from_str("xpub....").unwrap();
let path = BitcoinDerivationPath::<N>::from_str("m/0/0").unwrap();
let child_key = ext_key.derive(&path).unwrap();
let addr = child_key.to_address(&child_key.format()).unwrap();
println!("Derived addr: {}", addr);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.