diff --git a/WALLET.scratch.md b/WALLET.scratch.md index 02a5773bd2..9c8f929641 100644 --- a/WALLET.scratch.md +++ b/WALLET.scratch.md @@ -81,10 +81,12 @@ All on `~zod`: :btc-provider|command [%set-credentials api-url='http://localhost:50002'] :btc-wallet-hook|action [%set-provider ~zod] =scan-xpub 'zpub6rFR7y4Q2AijBEqTUquhVz398htDFrtymD9xYYfG1m4wAcvPhXNfE3EfH1r1ADqtfSdVCToUG868RvUUkgDKf31mGDtKsAYz2oz2AGutZYs' -:btc-wallet-store|action [%add-wallet scan-xpub ~ [~ 3] [~ 6]] +=fprint [%4 0xdead.beef] +:btc-wallet-store|action [%add-wallet scan-xpub fprint ~ [~ 3] [~ 6]] :btc-wallet-store|action [%generate-address scan-xpub %0 meta=~] ``` +:: make sure that the above address is watched ## Make a full TXBU diff --git a/app/btc-provider.hoon b/app/btc-provider.hoon index 53f6b47df2..5b31fa6437 100644 --- a/app/btc-provider.hoon +++ b/app/btc-provider.hoon @@ -211,8 +211,12 @@ ++ send-update |= =update ^- card - ~& >> "send-update: {}" - [%give %fact ~[/clients] %btc-provider-update !>(update)] + =+ c=[%give %fact ~[/clients] %btc-provider-update !>(update)] + ?: ?=(%.y -.update) + ~& >> "prov. update: {}" + c + ~& >> "prov. err: {}" + c :: ++ is-whitelisted |= user=ship ^- ? diff --git a/app/btc-wallet-hook.hoon b/app/btc-wallet-hook.hoon index febf10ed1b..0761f2a335 100644 --- a/app/btc-wallet-hook.hoon +++ b/app/btc-wallet-hook.hoon @@ -230,7 +230,7 @@ :: +handle-provider-status: handle connectivity updates from provider :: - retry pend-piym on any %connected event, since we're checking mempool :: - if status is %connected, retry all pending address lookups -:: - only retry all if previously disconnected +:: - only retry all if previously disconnected :: - if block is updated, retry all address reqs :: ++ handle-provider-status diff --git a/lib/btc.hoon b/lib/btc.hoon index d191230b9f..71e99e52d4 100644 --- a/lib/btc.hoon +++ b/lib/btc.hoon @@ -73,6 +73,12 @@ ++ create |= [=rawtx =txid inputs=(list in:^psbt) outputs=(list out:^psbt)] ^- cord + :: TODO + :: make global map + :: turn each input and output into a map (or ~) + :: put the 0x0 separator between all + :: parse to hex + :: encode as base64! *cord :: ++ hd-path