mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-07 15:38:45 +03:00
integrated fingerprint
This commit is contained in:
parent
0774ef65dc
commit
d8bd3871b8
@ -10,14 +10,14 @@ xpub1 is from mnemonic from PRIVATE.scratch
|
|||||||
|
|
||||||
### get address at indices
|
### get address at indices
|
||||||
```
|
```
|
||||||
=walt1 (from-xpub:bl xpub1 ~ ~)
|
=walt1 (from-xpub:bl xpub1 [%4 0x5566.7788] ~ ~ ~)
|
||||||
(~(mk-address wad:bl walt1 %0) 0)
|
(~(mk-address wad:bl walt1 %0) 0)
|
||||||
:: gives [%bech32 'bc1q0adfj7ur750hjwufzzlfj5ytqzsnd7fz9fjuzc']
|
:: gives [%bech32 'bc1q0adfj7ur750hjwufzzlfj5ytqzsnd7fz9fjuzc']
|
||||||
```
|
```
|
||||||
|
|
||||||
### update address data
|
### update address data
|
||||||
```
|
```
|
||||||
=walt1 (from-xpub:bl xpub1 ~ ~)
|
=walt1 (from-xpub:bl xpub1 ~ ~ ~)
|
||||||
(~(mk-address wad:bl walt1 %0) 0)
|
(~(mk-address wad:bl walt1 %0) 0)
|
||||||
:: gives bc1q0adfj7ur750hjwufzzlfj5ytqzsnd7fz9fjuzc
|
:: gives bc1q0adfj7ur750hjwufzzlfj5ytqzsnd7fz9fjuzc
|
||||||
=walt1 (~(watch-address wad:bl walt1 %0) [%bech32 'bc1q0adfj7ur750hjwufzzlfj5ytqzsnd7fz9fjuzc'] [%0 0 ~])
|
=walt1 (~(watch-address wad:bl walt1 %0) [%bech32 'bc1q0adfj7ur750hjwufzzlfj5ytqzsnd7fz9fjuzc'] [%0 0 ~])
|
||||||
|
@ -54,25 +54,31 @@
|
|||||||
t(txos [txo txos.t])
|
t(txos [txo txos.t])
|
||||||
::
|
::
|
||||||
++ to-psbt
|
++ to-psbt
|
||||||
|
|= w=walt
|
||||||
^- cord
|
^- cord
|
||||||
''
|
''
|
||||||
:: TODO
|
:: TODO
|
||||||
|
:: for each txi, get the pubkey from the hdkey
|
||||||
:: get a list of map:psbt:btc
|
:: get a list of map:psbt:btc
|
||||||
|
|
||||||
--
|
--
|
||||||
:: wad: door for processing walts (wallets)
|
:: wad: door for processing walts (wallets)
|
||||||
:: parameterized on a walt and it's chyg account
|
:: parameterized on a walt and it's chyg account
|
||||||
::
|
::
|
||||||
++ wad
|
++ wad
|
||||||
|_ [w=walt =chyg]
|
|_ [w=walt =chyg]
|
||||||
|
++ pubkey
|
||||||
|
|= =idx:btc
|
||||||
|
^- btc-byts:btc
|
||||||
|
=/ pk=@ux
|
||||||
|
%- compress-point:ecc
|
||||||
|
pub:(derive-public:(derive-public:wilt.w (@ chyg)) idx)
|
||||||
|
[(met 3 pk) pk]
|
||||||
|
::
|
||||||
++ mk-address
|
++ mk-address
|
||||||
|= =idx:btc
|
|= =idx:btc
|
||||||
^- address:btc
|
^- address:btc
|
||||||
=/ pubkey=@ux
|
|
||||||
%- compress-point:ecc
|
|
||||||
pub:(derive-public:(derive-public:wilt.w (@ chyg)) idx)
|
|
||||||
?: ?=(%bip84 bipt.w)
|
?: ?=(%bip84 bipt.w)
|
||||||
(need (encode-pubkey:bech32:btc %main pubkey))
|
(need (encode-pubkey:bech32:btc %main dat:(pubkey idx)))
|
||||||
~|("legacy addresses not supported yet " !!)
|
~|("legacy addresses not supported yet " !!)
|
||||||
:: generates and watches the next available address
|
:: generates and watches the next available address
|
||||||
::
|
::
|
||||||
|
@ -68,6 +68,12 @@
|
|||||||
::
|
::
|
||||||
++ psbt
|
++ psbt
|
||||||
|%
|
|%
|
||||||
|
:: +create: make base64 cord of PSBT
|
||||||
|
::
|
||||||
|
++ create
|
||||||
|
|= [=rawtx =txid inputs=(list in:^psbt) outputs=(list out:^psbt)]
|
||||||
|
^- cord
|
||||||
|
*cord
|
||||||
::
|
::
|
||||||
++ hd-path
|
++ hd-path
|
||||||
|= [pubkey=btc-byts =target:^psbt =hdkey]
|
|= [pubkey=btc-byts =target:^psbt =hdkey]
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
:: TODO: document
|
:: TODO: document
|
||||||
::
|
::
|
||||||
+$ action
|
+$ action
|
||||||
$% [%add-wallet =xpub scan-to=(unit scon) max-gap=(unit @ud) confs=(unit @ud)]
|
$% [%add-wallet =xpub =fprint scan-to=(unit scon) max-gap=(unit @ud) confs=(unit @ud)]
|
||||||
[%address-info =xpub =chyg =idx utxos=(set utxo) used=? block=@ud]
|
[%address-info =xpub =chyg =idx utxos=(set utxo) used=? block=@ud]
|
||||||
[%tx-info =info:tx]
|
[%tx-info =info:tx]
|
||||||
[%generate-address =xpub =chyg =peta]
|
[%generate-address =xpub =chyg =peta]
|
||||||
|
@ -60,6 +60,8 @@
|
|||||||
--
|
--
|
||||||
++ psbt
|
++ psbt
|
||||||
|%
|
|%
|
||||||
|
+$ in [pubkey=btc-byts =utxo =rawtx =hdkey]
|
||||||
|
+$ out [=address hk=(unit hdkey)]
|
||||||
+$ target $?(%input %output)
|
+$ target $?(%input %output)
|
||||||
+$ keyval [key=btc-byts val=btc-byts]
|
+$ keyval [key=btc-byts val=btc-byts]
|
||||||
+$ map (list keyval)
|
+$ map (list keyval)
|
||||||
|
Loading…
Reference in New Issue
Block a user