From 129fe493ba790ade0b86859dd09ba7e23a0e5d33 Mon Sep 17 00:00:00 2001 From: timlucmiptev Date: Thu, 1 Oct 2020 16:51:37 +0300 Subject: [PATCH] start types --- app/{bippy-provider.hoon => bippy-bridge.hoon} | 12 +++++------- sur/bippy-bridge.hoon | 16 ++++++++++++++++ sur/bippy-provider-hook.hoon | 0 sur/bippy-provider-store.hoon | 4 ---- sur/bippy-wallet-store.hoon | 3 --- sur/bippy-wallet.hoon | 7 +++++++ 6 files changed, 28 insertions(+), 14 deletions(-) rename app/{bippy-provider.hoon => bippy-bridge.hoon} (77%) create mode 100644 sur/bippy-bridge.hoon delete mode 100644 sur/bippy-provider-hook.hoon delete mode 100644 sur/bippy-provider-store.hoon delete mode 100644 sur/bippy-wallet-store.hoon create mode 100644 sur/bippy-wallet.hoon diff --git a/app/bippy-provider.hoon b/app/bippy-bridge.hoon similarity index 77% rename from app/bippy-provider.hoon rename to app/bippy-bridge.hoon index 3c2f8f14b..604da12b8 100644 --- a/app/bippy-provider.hoon +++ b/app/bippy-bridge.hoon @@ -1,6 +1,7 @@ -:: bippy-provider.hoon +:: bippy-bridge.hoon :: Provider for accessing BTC full node :: +/- *bippy-bridge /+ dbug, default-agent |% +$ versioned-state @@ -23,7 +24,7 @@ :: ++ on-init ^- (quip card _this) - ~& > '%bippy-provider initialized successfully' + ~& > '%bippy-bridge initialized successfully' `this ++ on-save ^- vase @@ -31,7 +32,7 @@ ++ on-load |= old-state=vase ^- (quip card _this) - ~& > '%bippy-provider recompiled successfully' + ~& > '%bippy-bridge recompiled successfully' `this(state !<(versioned-state old-state)) ++ on-poke |= [=mark =vase] @@ -41,10 +42,7 @@ ?+ q.vase (on-poke:def mark vase) %send-tx ~& >>> %send-tx - :_ this - ~ - :: :~ [%pass /[url.action] %arvo %i %request (get-url url.action) *outbound-config:iris] - == + `this == == :: diff --git a/sur/bippy-bridge.hoon b/sur/bippy-bridge.hoon new file mode 100644 index 000000000..28e1b973b --- /dev/null +++ b/sur/bippy-bridge.hoon @@ -0,0 +1,16 @@ +|% ++$ address ?(@uc [%bech32 @t]) ++$ tx @ ++$ credentials [rpc-url=@t rpc-user=@t rpc-password=@t] ++$ bio $: mode=?(%remote %local) + =credentials :: for connecting to btc-provider + clients=(set ship) :: allowed clients for this node + == ++$ action + $% [%connect =credentials] + [%status ~] + [%balance =address] + [%transactions =address] + [%broadcast-tx =tx] + == +-- diff --git a/sur/bippy-provider-hook.hoon b/sur/bippy-provider-hook.hoon deleted file mode 100644 index e69de29bb..000000000 diff --git a/sur/bippy-provider-store.hoon b/sur/bippy-provider-store.hoon deleted file mode 100644 index fff15358c..000000000 --- a/sur/bippy-provider-store.hoon +++ /dev/null @@ -1,4 +0,0 @@ -|% -+$ credentials [rpc-url=@t rpc-user=@t rpc-password=@t] -+$ clients (set ship) --- diff --git a/sur/bippy-wallet-store.hoon b/sur/bippy-wallet-store.hoon deleted file mode 100644 index 31d745462..000000000 --- a/sur/bippy-wallet-store.hoon +++ /dev/null @@ -1,3 +0,0 @@ -|% -+$ xpub tape --- diff --git a/sur/bippy-wallet.hoon b/sur/bippy-wallet.hoon new file mode 100644 index 000000000..cea0034a4 --- /dev/null +++ b/sur/bippy-wallet.hoon @@ -0,0 +1,7 @@ +|% ++$ xpub tape +-- + +:: wallets +:: how many should we store? +:: seems like a list or a map keyed by xpub