Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Libwally, show xpub in different formats #49

Closed
wants to merge 33 commits into from

Conversation

gorazdko
Copy link
Contributor

@gorazdko gorazdko commented Jul 5, 2020

Abstract

This is one way of integrating libwally support for Arduino (which does not support recursive builds): libwally wrappers are generated with a script whereas secp256k1-embedded is referenced as a submodule

secp256k1-embeeded is included as a submodule because it's too complicated to build it with a script. It is also required to
compile secp256k1 with CC to first get certain files which are then part of the library. This endeavour (building it with a script) can be pursued at some point in future if desired.

Status

Ready for review:

Blocked by BlockchainCommons/bc-bip39#19

  • removed bip39 from libwally wrapper to avoid function clashes with bc-bip39
  • add simple libwally example to the selftest
  • document external dependencies (not necessary if they are forked into BC group)

Edit

Now also using this branch for my further work:

  • display xpub key as qr and text (also as ur:crypto-hdkey)
  • display seed as ur and qr-ur (ur:crypto-seed)
  • allow different kinds of derivations
  • implement slip132, option to show/hide derivation path
  • fix styling, consistency with font size/type
  • option to choose a network (mainnet/testnet)
  • test

IMG_20200719_223939

IMG_20200719_223951

IMG_20200719_224003

IMG_20200715_011905

@ksedgwic
Copy link
Collaborator

ksedgwic commented Jul 6, 2020

Installation looks good, one nit above. I'm seeing:
'bip39_getword' was not declared in this scope

@gorazdko
Copy link
Contributor Author

gorazdko commented Jul 6, 2020

'bip39_getword' was not declared in this scope

yeah this PR is blocked by BlockchainCommons/bc-bip39#19. I updated my WIP points in Status above to make it more understandable. Once that PR is in I'll update the submodule here and the build will work.

EDIT: Let me know if you have any tips in how to manage PRs dependent like that. I see one can merge the dependent PR into a develop branch and can than update the submodule in the main PR. But I think one needs to have certain permissions to be able to commit into develop too.

@gorazdko gorazdko force-pushed the libwally branch 2 times, most recently from 9fd4ae8 to d8a6984 Compare July 12, 2020 22:24
@ksedgwic
Copy link
Collaborator

I'm seeing:

In file included from /home/user/bonsai/bc-lethekit/seedtool/keystore.ino:1:0:
keystore.h:4:23: fatal error: secp256k1.h: No such file or directory
 #include "secp256k1.h"
                       ^
compilation terminated.

I tried adding secp256k1-embedded link to install-lethekit but then see:

In file included from /tmp/arduino_build_798325/sketch/keystore.h:4:0,
                 from /home/user/bonsai/bc-lethekit/seedtool/keystore.ino:1:
/home/user/Arduino/libraries/secp256k1-embedded/src/secp256k1.h:2:44: fatal error: ../secp256k1/include/secp256k1.h: No such file or directory
 #include "../secp256k1/include/secp256k1.h"
                                            ^
compilation terminated.

pls advise

@gorazdko
Copy link
Contributor Author

gorazdko commented Jul 16, 2020

secp256k1.h: No such file or directory

I fixed the missing dependency in the installation script

I tried adding secp256k1-embedded link to install-lethekit but then see:

Can you check if your clone was recursive, i.e. you have secp256k1-embedded, and your secp256k1 inside is not empty

Can you delete all relevant links from your arduino lib folder and try again fresh with this procedure:

  1. git clone git@github.com:gorazdko/bc-lethekit.git
  2. git checkout libwally
  3. git submodule update --init --recursive
  4. export LK_ROOT=`pwd` && export ARDUINO_ROOT=~/Arduino && $LK_ROOT/scripts/install-lethekit $LK_ROOT $ARDUINO_ROOT

@ksedgwic
Copy link
Collaborator

[user@arduino bonsai]$ git clone git@github.com:gorazdko/bc-lethekit.git
Cloning into 'bc-lethekit'...
remote: Enumerating objects: 60, done.
remote: Counting objects: 100% (60/60), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 824 (delta 28), reused 46 (delta 22), pack-reused 764
Receiving objects: 100% (824/824), 25.62 MiB | 10.11 MiB/s, done.
Resolving deltas: 100% (500/500), done.
[user@arduino bonsai]$ cd bc-lethekit
[user@arduino bc-lethekit] git:(master)$ git checkout libwally
Branch 'libwally' set up to track remote branch 'libwally' from 'origin'.
Switched to a new branch 'libwally'
[user@arduino bc-lethekit] git:(𝘮 ← 31 libwally)$ git submodule update --init --recursive
Submodule 'deps/GxEPD2' (git@github.com:BlockchainCommons/GxEPD2.git) registered for path 'deps/GxEPD2'
Submodule 'deps/TRNG-for-ATSAMD51J19A-Adafruit-Metro-M4-' (git@github.com:SapientHetero/TRNG-for-ATSAMD51J19A-Adafruit-Metro-M4-.git) registered for path 'deps/TRNG-for-ATSAMD51J19A-Adafruit-Metro-M4-'
Submodule 'deps/bc-bip39' (git@github.com:BlockchainCommons/bc-bip39.git) registered for path 'deps/bc-bip39'
Submodule 'deps/bc-crypto-base' (git@github.com:BlockchainCommons/bc-crypto-base.git) registered for path 'deps/bc-crypto-base'
Submodule 'deps/bc-shamir' (git@github.com:BlockchainCommons/bc-shamir.git) registered for path 'deps/bc-shamir'
Submodule 'deps/bc-slip39' (git@github.com:BlockchainCommons/bc-slip39.git) registered for path 'deps/bc-slip39'
Submodule 'deps/libwally-core' (git@github.com:ElementsProject/libwally-core.git) registered for path 'deps/libwally-core'
Submodule 'deps/secp256k1-embedded' (git@github.com:BlockchainCommons/secp256k1-embedded.git) registered for path 'deps/secp256k1-embedded'
Cloning into '/home/user/bonsai/bc-lethekit/deps/GxEPD2'...
Cloning into '/home/user/bonsai/bc-lethekit/deps/TRNG-for-ATSAMD51J19A-Adafruit-Metro-M4-'...
Cloning into '/home/user/bonsai/bc-lethekit/deps/bc-bip39'...
Cloning into '/home/user/bonsai/bc-lethekit/deps/bc-crypto-base'...
Cloning into '/home/user/bonsai/bc-lethekit/deps/bc-shamir'...
Cloning into '/home/user/bonsai/bc-lethekit/deps/bc-slip39'...
Cloning into '/home/user/bonsai/bc-lethekit/deps/libwally-core'...
Cloning into '/home/user/bonsai/bc-lethekit/deps/secp256k1-embedded'...
Submodule path 'deps/GxEPD2': checked out '591f7099aa05a33e264c4fd195cc12896e9e7188'
Submodule path 'deps/TRNG-for-ATSAMD51J19A-Adafruit-Metro-M4-': checked out '17d5e36cd922ce7df8047d9c89633dca9b5ae122'
Submodule path 'deps/bc-bip39': checked out '85d7b13be91a048c477a430bd4379adea90dd9a6'
Submodule path 'deps/bc-crypto-base': checked out '377fc3dc4919914a6bb476c24e549092cf61783a'
Submodule path 'deps/bc-shamir': checked out 'ed9bbe551bad140da4f70873a6655141f255b70e'
Submodule path 'deps/bc-slip39': checked out 'bd25ac70a24e00c85437929b08bb79876449a9fc'
Submodule path 'deps/libwally-core': checked out 'e0d0634aea716d813744326ea6c7590eb9fc381c'
Submodule path 'deps/secp256k1-embedded': checked out 'a306c940874af9fe232e7e9a5cdc06eda4daad32'
Submodule 'secp256k1' (https://github.com/bitcoin-core/secp256k1.git) registered for path 'deps/secp256k1-embedded/secp256k1'
Cloning into '/home/user/bonsai/bc-lethekit/deps/secp256k1-embedded/secp256k1'...
Submodule path 'deps/secp256k1-embedded/secp256k1': checked out 'f39f99be0e6add959f534c03b93044cef066fe09'
[user@arduino bc-lethekit] git:(𝘮 ← 31 libwally)$ export LK_ROOT=`pwd` && export ARDUINO_ROOT=~/Arduino && $LK_ROOT/scripts/install-lethekit $LK_ROOT $ARDUINO_ROOT
~/bonsai/bc-lethekit/deps ~/bonsai/bc-lethekit
/home/user/bonsai/bc-lethekit/deps
~/bonsai/bc-lethekit/deps/libwally-embedded ~/bonsai/bc-lethekit/deps ~/bonsai/bc-lethekit
('Created:', 'src/include')
('created', 'src/include/wally_psbt.h')
('created', 'src/include/wally_crypto.h')
('created', 'src/include/wally.hpp')
('created', 'src/include/wally_symmetric.h')
('created', 'src/include/wally_script.h')
('created', 'src/include/wally_address.h')
('created', 'src/include/wally_core.h')
('skip', 'src/include/wally_elements.h')
('created', 'src/include/wally_transaction.h')
('created', 'src/include/wally_bip39.h')
('created', 'src/include/wally_bip38.h')
('created', 'src/include/wally_bip32.h')
('Path already exists:', 'src/')
('created', 'src/wally_psbt.h')
('created', 'src/wally_crypto.h')
('created', 'src/wally.hpp')
('created', 'src/wally_symmetric.h')
('created', 'src/wally_script.h')
('created', 'src/wally_address.h')
('created', 'src/wally_core.h')
('skip', 'src/wally_elements.h')
('created', 'src/wally_transaction.h')
('created', 'src/wally_bip39.h')
('created', 'src/wally_bip38.h')
('created', 'src/wally_bip32.h')
('Created:', 'src/secp256k1/include')
('skip', 'src/secp256k1/include/secp256k1_musig.h')
('skip', 'src/secp256k1/include/secp256k1_schnorrsig.h')
('skip', 'src/secp256k1/include/secp256k1_generator.h')
('created', 'src/secp256k1/include/secp256k1_preallocated.h')
('skip', 'src/secp256k1/include/secp256k1_whitelist.h')
('skip', 'src/secp256k1/include/secp256k1_surjectionproof.h')
('created', 'src/secp256k1/include/secp256k1_ecdh.h')
('created', 'src/secp256k1/include/secp256k1_recovery.h')
('created', 'src/secp256k1/include/secp256k1.h')
('skip', 'src/secp256k1/include/secp256k1_rangeproof.h')
('Path already exists:', 'src/')
('created', 'src/ccan_config.h')
('created', 'src/mnemonic.h')
('created', 'src/wordlist.c')
('created', 'src/psbt.c')
('skip', 'src/elements.c')
('created', 'src/script_int.h')
('created', 'src/pbkdf2.c')
('created', 'src/transaction_int.h')
('created', 'src/transaction_shared.h')
('created', 'src/wordlist.h')
('created', 'src/wif.c')
('created', 'src/blech32.c')
('created', 'src/base58.c')
('created', 'src/symmetric.c')
('created', 'src/bip32_int.h')
('created', 'src/mnemonic.c')
('created', 'src/address.c')
('skip', 'src/scrypt.c')
('created', 'src/script.h')
('created', 'src/hmac.c')
('created', 'src/ecdh.c')
('created', 'src/bip39.c')
('created', 'src/hmac.h')
('created', 'src/sign.c')
('created', 'src/script.c')
('created', 'src/hex.c')
('created', 'src/transaction.c')
('created', 'src/bip32.c')
('created', 'src/bech32.c')
('created', 'src/bip38.c')
('created', 'src/base58.h')
('created', 'src/pbkdf2.inl')
('created', 'src/aes.c')
('created', 'src/internal.h')
('created', 'src/hmac.inl')
('created', 'src/internal.c')
('Created:', 'src/data/wordlists')
('created', 'src/data/wordlists/spanish.c')
('created', 'src/data/wordlists/french.c')
('created', 'src/data/wordlists/italian.c')
('created', 'src/data/wordlists/chinese_simplified.c')
('created', 'src/data/wordlists/english.c')
('created', 'src/data/wordlists/chinese_traditional.c')
('created', 'src/data/wordlists/japanese.c')
('Created:', 'src/ccan/ccan')
('Created:', 'src/ccan/ccan/base64')
('created', 'src/ccan/ccan/base64/base64.c')
('created', 'src/ccan/ccan/base64/base64.h')
('Created:', 'src/ccan/ccan/tap')
('created', 'src/ccan/ccan/tap/tap.h')
('created', 'src/ccan/ccan/tap/tap.c')
('Created:', 'src/ccan/ccan/build_assert')
('created', 'src/ccan/ccan/build_assert/build_assert.h')
('Created:', 'src/ccan/ccan/crypto/ripemd160')
('created', 'src/ccan/ccan/crypto/ripemd160/ripemd160.h')
('created', 'src/ccan/ccan/crypto/ripemd160/ripemd160.c')
('Created:', 'src/ccan/ccan/crypto/sha512')
('created', 'src/ccan/ccan/crypto/sha512/sha512.c')
('created', 'src/ccan/ccan/crypto/sha512/sha512.h')
('Created:', 'src/ccan/ccan/crypto/sha256')
('created', 'src/ccan/ccan/crypto/sha256/sha256.h')
('created', 'src/ccan/ccan/crypto/sha256/sha256.c')
('created', 'src/ccan/ccan/crypto/sha256/sha256_sse4.c')
('Created:', 'src/ccan/ccan/compiler')
('created', 'src/ccan/ccan/compiler/compiler.h')
('Created:', 'src/ccan/ccan/str/hex')
('created', 'src/ccan/ccan/str/hex/hex.c')
('created', 'src/ccan/ccan/str/hex/hex.h')
('Created:', 'src/ccan/ccan/endian')
('created', 'src/ccan/ccan/endian/endian.h')
('Path already exists:', 'src/ccan')
('Created:', 'src/ccan/base64')
('created', 'src/ccan/base64/base64.h')
('Created:', 'src/ccan/tap')
('created', 'src/ccan/tap/tap.h')
('Created:', 'src/ccan/build_assert')
('created', 'src/ccan/build_assert/build_assert.h')
('Created:', 'src/ccan/crypto/ripemd160')
('created', 'src/ccan/crypto/ripemd160/ripemd160.h')
('Created:', 'src/ccan/crypto/sha512')
('created', 'src/ccan/crypto/sha512/sha512.h')
('Created:', 'src/ccan/crypto/sha256')
('created', 'src/ccan/crypto/sha256/sha256.h')
('Created:', 'src/ccan/compiler')
('created', 'src/ccan/compiler/compiler.h')
('Created:', 'src/ccan/str/hex')
('created', 'src/ccan/str/hex/hex.h')
('Created:', 'src/ccan/endian')
('created', 'src/ccan/endian/endian.h')
~/bonsai/bc-lethekit/deps ~/bonsai/bc-lethekit
~/bonsai/bc-lethekit
[user@arduino bc-lethekit] git:(𝘮 ← 31 libwally)$ ls -larth ~/Arduino/libraries
total 240K
-rw-r--r-- 1 user user   87 Mar 30 20:54 readme.txt
drwxr-xr-x 3 user user 4.0K Mar 30 20:54 ..
drwxr-xr-x 5 user user 4.0K Mar 30 21:26 Adafruit_GFX_Library
drwxr-xr-x 4 user user 4.0K Mar 30 21:31 Keypad
drwxr-xr-x 3 user user 4.0K Apr 20 12:29 Adafruit_ILI9341
drwxr-xr-x 4 user user 4.0K Apr 20 12:29 Adafruit_STMPE610
drwxr-xr-x 3 user user 4.0K Apr 20 12:29 Adafruit_TouchScreen
-rw-rw-r-- 1 user user 198K Apr 26 21:51 ID
lrwxrwxrwx 1 user user   53 Jul 16 10:11 secp256k1-embedded -> /home/user/bonsai/bc-lethekit/deps/secp256k1-embedded
lrwxrwxrwx 1 user user   52 Jul 16 10:11 libwally-embedded -> /home/user/bonsai/bc-lethekit/deps/libwally-embedded
lrwxrwxrwx 1 user user   44 Jul 16 10:11 bc-shamir -> /home/user/bonsai/bc-lethekit/deps/bc-shamir
lrwxrwxrwx 1 user user   49 Jul 16 10:11 bc-crypto-base -> /home/user/bonsai/bc-lethekit/deps/bc-crypto-base
lrwxrwxrwx 1 user user   44 Jul 16 10:11 bc-slip39 -> /home/user/bonsai/bc-lethekit/deps/bc-slip39
lrwxrwxrwx 1 user user   43 Jul 16 10:11 bc-bip39 -> /home/user/bonsai/bc-lethekit/deps/bc-bip39
lrwxrwxrwx 1 user user   75 Jul 16 10:11 TRNG-for-ATSAMD51J19A-Adafruit-Metro-M4- -> /home/user/bonsai/bc-lethekit/deps/TRNG-for-ATSAMD51J19A-Adafruit-Metro-M4-
lrwxrwxrwx 1 user user   41 Jul 16 10:11 GxEPD2 -> /home/user/bonsai/bc-lethekit/deps/GxEPD2
drwxr-xr-x 5 user user 4.0K Jul 16 10:17 QRCode
drwxr-xr-x 8 user user 4.0K Jul 16 10:17 .

Now I see:

/home/user/bonsai/bc-lethekit/seedtool/seed.ino: In member function 'uint16_t BIP39Seq::get_word(size_t) const':
seed:80:34: error: 'bip39_getword' was not declared in this scope
     return bip39_getword(ctx, ndx);
                                  ^
/home/user/bonsai/bc-lethekit/seedtool/seed.ino: In member function 'String BIP39Seq::get_string(size_t)':
seed:84:43: error: 'bip39_getword' was not declared in this scope
     uint16_t word = bip39_getword(ctx, ndx);

Looks like bc-bip39 is specified as 85d7b13be91a048c477a430bd4379adea90dd9a6 for this branch?

@gorazdko
Copy link
Contributor Author

Yes, you'll need to manually patch it with BlockchainCommons/bc-bip39#19. See my WIP status above

@ksedgwic
Copy link
Collaborator

Ok, I switched bc-bip39 to 6680092255539e21e0894e78bd266d1d8a055566 and it builds.

@ksedgwic
Copy link
Collaborator

@gorazdko I think it's going to be important for others to play with the UI as easily as possible. Could you change the bc-bip39 dependency to point to the PR version you indicated above so a simple recursive clone will get everything straight for evaluation builds?
I think the version we want is 6680092255539e21e0894e78bd266d1d8a055566.

@ksedgwic
Copy link
Collaborator

ksedgwic commented Jul 16, 2020

I don't want to come off as too negative here ... this is exciting and very useful!

@gorazdko
Copy link
Contributor Author

I'm happy you've taken the time to review my code, Ken. I'll address all the points soon.

Could you change the bc-bip39 dependency to point to the PR version you indicated above

Yes I can. And I will. This means removing the current bc-bip39 submodule and pointing it to my fork which means introducing a new external dependency. Let's wait for another day and see if @ChristopherA and @wolfmcnally can take the time to review and merge BlockchainCommons/bc-bip39#19 to avoid this hack.

so a simple recursive clone will get everything straight for evaluation builds

I dont think this will solve the problem though. Because simple recursive clone (git clone --recursive) is pulling the submodules based on the information in master branch. So once you do a checkout to a different branch your submodules become invalid so you have to update them.

@gorazdko
Copy link
Contributor Author

gorazdko commented Aug 4, 2020

I've updated the status.

Regarding the shamir shard ur export, it is not clear to me whether the spec is outdated or is the notation /2of3/ now used to denote that only the second shard is available for scanning and so to distinguish it from fountain decoder which uses 2-3 notation. And why aren't the parts of equal length etc.

Is there a way to generate test vectors (like ur:crypto-slip39, ur:hd-key etc.) for linux users?

cc: @wolfmcnally

For one of the test vectors i used in selftest, i got a different result:

// https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-006-urtypes.md#exampletest-vector-1
uint8_t payload[] = {0xC7, 0x09, 0x85, 0x80, 0x12, 0x5E, 0x2A, 0xB0, 0x98, 0x12, 0x53, 0x46, 0x8B, 0x2D, 0xBC, 0x52};
String ur_my_result = F("UR:CRYPTOSEED/OEADGDSTASLTLABGHYDRPFMKBGGUFGLUDPRFGMAOTPIECFFLTNLTQDENOS");
//expected result: ur:crypto-seed/gdaebycpeofygoiyktlonloeadgdstasltlabghydrpfmkbggufgludprfgmaotpiecffltnsfhfdrrl

The last thing to implement here is slip132 then I'll finish the project with more testing and documentation.

RAM usage is currently very big, and the problems already started occurring. I have ran into memory errors and they can occur without a hard fault. Cutting down on globals and string literals put the problems away.

We'll have to start following the guidelines for memory optimization. Currently, our selftest has gotten pretty
big due to usage of test vectors written as globals which are put into RAM. We will also have to cut down on malloc
which is used all over the place including in our dependencies.

@gorazdko
Copy link
Contributor Author

gorazdko commented Aug 9, 2020

slip132 option added.

RAM usage is currently very big

It's not. I did actual measurements which showed only about 10% usage. The memory problems were due to malloc/calloc allocating unaligned chunks of data incorrect usage of free() . Resolved in 438f709

I think this is now ready for review.

Binaries

438f709

  • seedtool.ino.SparkFun_SAMD51_Thing_Plus.zip
  • flash with the command (change port and paths accordingly):
    /home/gorazd/.arduino15/packages/arduino/tools/bossac/1.8.0-48-gb176eee/bossac -i -d --port=ttyACM0 -U -i --offset=0x4000 -w -v /tmp/arduino_build_874813/seedtool.ino.bin -R

de1b071

@gorazdko gorazdko force-pushed the libwally branch 3 times, most recently from 82d9173 to 6e3f187 Compare August 10, 2020 23:17
@wolfmcnally
Copy link
Collaborator

UR:CRYPTOSEED/OEADGDSTASLTLABGHYDRPFMKBGGUFGLUDPRFGMAOTPIECFFLTNLTQDENOS

@gorazdko Except for the missing hyphen in crypto-seed the UR above is correct, and decodes to:

c7098580125e2ab0981253468b2dbc52

Which is what your input buffer is. The reason it doesn't match the test vector is that you didn't include the "birthday" field, which is included in the test vector. That field is optional, however.

@gorazdko
Copy link
Contributor Author

Screenshots

Seed, 0 dice rolls (= sha256 of nothing) -> bip39=together, mail, awful ... :
seed

xpub_derivation_path_m_1
xpub_derivation_path_m_1

xpub_single_native_segwit_mainnet
xpub_single_native_segwit_mainnet

xpub_single_native_segwit_regtest
xpub_single_native_segwit_regtest

xpub_SingleNestedSegwit_withDerivation_testnet
xpub_SingleNestedSegwit_withDerivation_testnet

xpub_singleNestedSegwit_withDerivation_testnet_withSlip132
xpub_singleNestedSegwit_withDerivation_testnet_withSlip132

slip39_1 thresh2of3
slip39_1_2of3

slip39_2
slip39_2

slip39_3
slip39_3

@wolfmcnally
Copy link
Collaborator

@gorazdko I have some detailed analysis and feedback of these UR-based QR codes. For convenience I put them into a gist here.

@gorazdko
Copy link
Contributor Author

gorazdko commented Aug 25, 2020

Abstract

@wolfmcnally I've fixed the URs

All the test vectors should follow from this seed:

image

Legacy

These were tested against specter hww:

xpub single native segwit mainnet:
[b238a845/84h/0h/0h]xpub6D1GQL3S3qryEx5gQccdVB5Fy1ePkeDGU8bMmW1GKfDQvtBsbJ6FaaudsBphw2WwtjYyJ4ARR6Mh9ZRTTKqro6eZww2m6SVxG7WuY2DALVp

xpub single native segwit mainnet with slip132:
[b238a845/84h/0h/0h]zpub6rfo1fPGMCwvwYTv5LBsuMGGJwwHdtCGJMdoLHo35fyB35pL6cRNpiDuubjsvqpni1nao1MYLR4nv8eatiftPa1mgcRcGG8voZeCK8aVgfw

xpub single native segwit regtest with slip132:
[b238a845/84h/1h/0h]vpub5Ya3bKw6wH3tLV9QVUYExXnWxy7Htu1sfqgQW5QXSAgJz4YtruUN4KQUmRyQGMx2SbsXoTTm563XSXhRBoJcr316XEPPN437kiQTk3ssJ9E

xpub single native segwit testnet with slip132:
[b238a845/84h/1h/0h]vpub5Ya3bKw6wH3tLV9QVUYExXnWxy7Htu1sfqgQW5QXSAgJz4YtruUN4KQUmRyQGMx2SbsXoTTm563XSXhRBoJcr316XEPPN437kiQTk3ssJ9E


xpub single nested segwit mainnet:
[b238a845/49h/0h/0h]ypub6XvUtXkRY34MJrB3HwuPdaQ4rWpFEzxJUVp7ga4MVTKBJFjHG97XYCsdyGA974VcTtwxwNkhmqJKDeuAs6oSxojW117cfGTD7z95qNCww7A

xpub single nested segwit regtest with slip132:
[b238a845/49h/1h/0h]upub5DPuspvtCmya1YFr1ndyWYSYemHxteVJvBqPwFcTpbiN3W5RYQ13ZezMywrGAsAjQLGE3JSQ2cQ7sDUyyLJkdjMLUbdb8fzRDrjUxRKjJ4t

xpub single nested segwit regtest without slip132:
[b238a845/49h/1h/0h]tpubDCGLK4mKN6ZTqE23y3ywLj4RVnpxhtxsD9zMdzMGJXbtx6BpNbLpaHdcHbooh65jRA9YuJjwwhHpDFpHXHQ2usrS9DUAZw77czWptDR3GZJ


xpub m/1:
[b238a845/1]tpubD9a746buMXpWdGrnzuSCY2pSUCWJRUBhiaNzU8gQGccwxN46z5kXMziyjTdr6sF2Zg5ZFgdaGmfoYSWTUbon9Ggdq5qzUACmJZffFzUpAR6

xpub m/1h/0/50h:
[b238a845/1h/0/50h]tpubDCFnSnZLfSpT3qvtyK7ehoFS9er57NndmepaBZBqm5HeLWuKHYDWznpNkhxoqsdjhsmnio3LMv2MCcT4LKocuRZjrD3U32XxqFBGVkenuez


UR

These should be checked by reviewers:

single native segwit mainnet UR:

A3035821026D717E2446747BC5016ADA285A9FCB9A23F9919BC0F25DBCBA9E3CFFAE0D152D045820A953E7CB9C09B1A5C8AD42E0D3C890D385068A278B864DD1D330C8AA0A50269C06D90130A201861854F500F500F5021AB821DA4E

{3: h'026D717E2446747BC5016ADA285A9FCB9A23F9919BC0F25DBCBA9E3CFFAE0D152D', 4: h'A953E7CB9C09B1A5C8AD42E0D3C890D385068A278B864DD1D330C8AA0A50269C', 6: 304({1: [84, true, 0, true, 0, true], 2: 3089226318})}

A3 # map(3)
03 # unsigned(3)
58 21 # bytes(33)
026D717E2446747BC5016ADA285A9FCB9A23F9919BC0F25DBCBA9E3CFFAE0D152D # "\x02mq~$Ft{\xC5\x01j\xDA(Z\x9F\xCB\x9A#\xF9\x91\x9B\xC0\xF2]\xBC\xBA\x9E<\xFF\xAE\r\x15-"
04 # unsigned(4)
58 20 # bytes(32)
A953E7CB9C09B1A5C8AD42E0D3C890D385068A278B864DD1D330C8AA0A50269C # "\xA9S\xE7\xCB\x9C\t\xB1\xA5\xC8\xADB\xE0\xD3\xC8\x90\xD3\x85\x06\x8A'\x8B\x86M\xD1\xD30\xC8\xAA\nP&\x9C"
06 # unsigned(6)
D9 0130 # tag(304)
A2 # map(2)
01 # unsigned(1)
86 # array(6)
18 54 # unsigned(84)
F5 # primitive(21)
00 # unsigned(0)
F5 # primitive(21)
00 # unsigned(0)
F5 # primitive(21)
02 # unsigned(2)
1A B821DA4E # unsigned(3089226318)

ur:crypto-hdkey/otaxhdclaojnjskbdkfgjykgskadimtndehtnesbnycnytmendrtwzhlrfrdnnfnzoplbtbzdpaahdcxptguvdsbnsaspaonsppmfwvttespmhteltamledilulpgttttedysppkbkgddsnsamtaaddyoeadlpcsghykaeykaeykaocyrocltnglhnlbdtin
B821DA4E14C23E58


single native segwit testnet UR:

A40358210258FB54040F85C69772C2C2807BAA4D67555B6EA2EF81B57450C0DACCB7F52F5D045820C50A16A190D62D7C2DC961F1AEB528A63D2E816495037F55D75635505731563D05D90131A1020106D90130A201861854F501F500F5021A4F4B9336

{3: h'0258FB54040F85C69772C2C2807BAA4D67555B6EA2EF81B57450C0DACCB7F52F5D', 4: h'C50A16A190D62D7C2DC961F1AEB528A63D2E816495037F55D75635505731563D', 5: 305({2: 1}), 6: 304({1: [84, true, 1, true, 0, true], 2: 1330352950})}

A4 # map(4)
03 # unsigned(3)
58 21 # bytes(33)
0258FB54040F85C69772C2C2807BAA4D67555B6EA2EF81B57450C0DACCB7F52F5D # "\x02X\xFBT\x04\x0F\x85\xC6\x97r\xC2\xC2\x80{\xAAMgU[n\xA2\xEF\x81\xB5tP\xC0\xDA\xCC\xB7\xF5/]"
04 # unsigned(4)
58 20 # bytes(32)
C50A16A190D62D7C2DC961F1AEB528A63D2E816495037F55D75635505731563D # "\xC5\n\x16\xA1\x90\xD6-|-\xC9a\xF1\xAE\xB5(\xA6=.\x81d\x95\x03\x7FU\xD7V5PW1V="
05 # unsigned(5)
D9 0131 # tag(305)
A1 # map(1)
02 # unsigned(2)
01 # unsigned(1)
06 # unsigned(6)
D9 0130 # tag(304)
A2 # map(2)
01 # unsigned(1)
86 # array(6)
18 54 # unsigned(84)
F5 # primitive(21)
01 # unsigned(1)
F5 # primitive(21)
00 # unsigned(0)
F5 # primitive(21)
02 # unsigned(2)
1A 4F4B9336 # unsigned(1330352950)

ur:crypto-hdkey/oxaxhdclaohdztghaabsltswmsjpsasalakgpkgtiogohpjtoewslyrejygdrttnsfrlykdlhlaahdcxskbkcmoymhtbdpkedpsohswnplredeolfsdmlyiemdaxlbgotshfecgdhgehhffsahtaadehoyaoadamtaaddyoeadlpcsghykadykaeykaocygwgrmuenestylaut
4F4B93362FE386C5

@gorazdko
Copy link
Contributor Author

Closing this as I'll open a new PR by tomorrow which supercedes this one.

It will contain the new shamir shards, wallet output descriptors/addresses and refactored code.

@gorazdko gorazdko closed this Sep 19, 2020
@gorazdko gorazdko mentioned this pull request Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants