diff --git a/app/btc-provider.hoon b/app/btc-provider.hoon index 682bbb64c..ddbbd09df 100644 --- a/app/btc-provider.hoon +++ b/app/btc-provider.hoon @@ -1,6 +1,11 @@ :: btc-provider.hoon :: Proxy that serves a BTC full node and ElectRS address indexer :: +:: Subscriptions: none +:: To Subscribers: +:: current connection state +:: results/errors of RPC calls +:: /+ *btc-provider, dbug, default-agent |% +$ versioned-state @@ -110,7 +115,7 @@ ~& > "before" ?^ e :_ state(connected.host-info %.n) - ~[(send-update [%error u.e])] + ~[(send-update [%| u.e])] ~& > "after" =/ rpc-resp=response:rpc:jstd (get-rpc-response response) diff --git a/app/btc-wallet-hook.hoon b/app/btc-wallet-hook.hoon index 6122cca53..871d2ee34 100644 --- a/app/btc-wallet-hook.hoon +++ b/app/btc-wallet-hook.hoon @@ -1,5 +1,11 @@ :: btc-wallet-hook.hoon -:: +:: +:: Subscriptions: +:: btc-provider: +:: connection status +:: RPC call results/errors +:: To Subscribers: +:: none :: /- *btc-wallet-hook /+ shoe, dbug, default-agent diff --git a/app/btc-wallet-store.hoon b/app/btc-wallet-store.hoon index 42dc6599f..6f2ad67c4 100644 --- a/app/btc-wallet-store.hoon +++ b/app/btc-wallet-store.hoon @@ -1,6 +1,10 @@ :: btc-wallet-store.hoon :: Manages wallet pubkeys :: +:: Subscriptions: none +:: To Subscribers: +:: watched address updates +:: /+ dbug, default-agent |% +$ versioned-state diff --git a/sur/btc-provider.hoon b/sur/btc-provider.hoon index 4e828df50..c425f183c 100644 --- a/sur/btc-provider.hoon +++ b/sur/btc-provider.hoon @@ -13,10 +13,7 @@ +$ error $% [%not-connected ~] == -+$ update :: sub updates from /clients path (connection etc.) - $% [%result =result] - [%error =error] - == ++$ update (each result error) :: sub updates from /clients path (connection etc.) :: +$ command $% [%set-credentials creds=credentials] diff --git a/sur/btc-wallet-store.hoon b/sur/btc-wallet-store.hoon index 9abcf4f51..a9ee2773d 100644 --- a/sur/btc-wallet-store.hoon +++ b/sur/btc-wallet-store.hoon @@ -1,11 +1,22 @@ +:: wallets are compatible with BIPs 44, 49, and 84 +:: m / purpose' / coin_type' / account' / change / address_index +:: /- *btc, bip32 |% -+$ wallet - $: xpub=tape - root-path=tape - :: indices-0 is main account, indices-1 is change account +:: wilt: copulates with thousands of indices to form addresses +:: walt: wallet metadata +:: ++$ wilt _bip32 ++$ walt + $: :: scanned: whether we've checked all addresses for prior activity + :: ching: non-change addresses + :: chang: change addresses + :: watch: address -> [change address_index] :: - indices-0=((mop @ address-info) gth) - indices-1=((mop @ address-info) gth) + =wilt + scanned=? + ching=((mop @ address-info) gth) + chang=((mop @ address-info) gth) + watch=(map address [change=@ index=@]) == --