2020-09-28 11:09:04 +03:00
|
|
|
|
|
|
|
## base58
|
|
|
|
Converts a base58 zpub to hex
|
|
|
|
```
|
2020-09-28 14:08:14 +03:00
|
|
|
=zpub-atom (de-base58:mimes:html "zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs")
|
|
|
|
=zpub-bytes (turn (flop (rip 3 zpub-atom)) |=(a=@ `@ux`a))
|
|
|
|
|
2020-09-28 11:09:04 +03:00
|
|
|
+bip84 "zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs"
|
|
|
|
```
|
2020-09-28 14:08:14 +03:00
|
|
|
|
2020-09-30 09:40:26 +03:00
|
|
|
### btc-address
|
|
|
|
```
|
|
|
|
=btca -build-file %/lib/btc-address.hoon
|
|
|
|
```
|
|
|
|
|
2020-09-28 14:08:14 +03:00
|
|
|
### decoded hex from base58
|
|
|
|
Get the public key (start at 45 and take 33 bytes):
|
|
|
|
```
|
|
|
|
=as-atom (rap 3 (flop (swag [45 33] zpub-bytes)))
|
|
|
|
```
|
|
|
|
decompress-point:secp256k1:secp:crypto
|