mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-13 08:38:43 +03:00
remove %create-raw-tx
This commit is contained in:
parent
6a4ebcf239
commit
98443d7027
@ -98,6 +98,7 @@ Provider is `~zod`, `~dopzod` is a client. Use the xpub from PRIVATE.md to have
|
||||
### setup
|
||||
On `~zod`:
|
||||
```
|
||||
|commit %home
|
||||
|start %btc-provider
|
||||
|start %btc-wallet-store
|
||||
|start %btc-wallet-hook
|
||||
@ -114,6 +115,7 @@ on `~dopzod`:
|
||||
```
|
||||
:: xpub from PRIVATE.md
|
||||
|
||||
|commit %home
|
||||
|start %btc-wallet-store
|
||||
|start %btc-wallet-hook
|
||||
:btc-wallet-hook|action [%set-provider ~zod]
|
||||
|
@ -114,9 +114,6 @@
|
||||
::
|
||||
%raw-tx
|
||||
[%get-raw-tx txid.body.act]
|
||||
::
|
||||
%create-raw-tx
|
||||
[%create-raw-tx inputs.body.act outputs.body.act]
|
||||
::
|
||||
%broadcast-tx
|
||||
[%broadcast-tx rawtx.body.act]
|
||||
@ -132,7 +129,7 @@
|
||||
=/ req=request:http
|
||||
(gen-request host-info ract)
|
||||
[%pass (rpc-wire act) %arvo %i %request req out]
|
||||
:: wire structure: /action-tas/req-id/now
|
||||
:: wire structure: /action-tas/req-id/now
|
||||
::
|
||||
++ rpc-wire
|
||||
|= act=action ^- wire
|
||||
@ -196,11 +193,6 @@
|
||||
?> ?=([%get-raw-tx *] r)
|
||||
:_ state
|
||||
~[(send-update [%.y (get-req-id wire) %raw-tx +.r])]
|
||||
::
|
||||
[%create-raw-tx @ *]
|
||||
?> ?=([%get-raw-tx *] r)
|
||||
:_ state
|
||||
~[(send-update [%.y (get-req-id wire) %raw-tx +.r])]
|
||||
::
|
||||
[%broadcast-tx @ *]
|
||||
?> ?=([%broadcast-tx *] r)
|
||||
|
@ -86,34 +86,6 @@
|
||||
%+ rpc-action-to-http
|
||||
api-url.host-info ract
|
||||
::
|
||||
++ action-to-json
|
||||
|= ract=action:rpc-types
|
||||
|^ ^- json
|
||||
=, enjs:format
|
||||
?+ -.ract ~|("Unsupported action for POST" !!)
|
||||
%create-raw-tx
|
||||
%- pairs
|
||||
:~ [%inputs [%a (turn inputs.ract input)]]
|
||||
[%outputs [%a (turn outputs.ract output)]]
|
||||
==
|
||||
==
|
||||
::
|
||||
++ input
|
||||
|= [=txid pos=@ud]
|
||||
^- json
|
||||
=, enjs:format
|
||||
%- pairs
|
||||
:~ [%txid [%s (txid-to-cord txid)]]
|
||||
[%vout (numb pos)]
|
||||
==
|
||||
++ output
|
||||
|= [=address value=sats]
|
||||
=, enjs:format
|
||||
^- json
|
||||
%- frond
|
||||
[(address-to-cord address) (numb value)]
|
||||
--
|
||||
::
|
||||
++ rpc
|
||||
|%
|
||||
++ parse-result
|
||||
@ -130,10 +102,7 @@
|
||||
::
|
||||
%get-raw-tx
|
||||
[id.res (raw-tx res.res)]
|
||||
::
|
||||
%create-raw-tx
|
||||
[%get-raw-tx (raw-tx res.res)]
|
||||
::
|
||||
::
|
||||
%broadcast-tx
|
||||
[%broadcast-tx (broadcast-tx res.res)]
|
||||
::
|
||||
@ -209,11 +178,6 @@
|
||||
%- get-request
|
||||
%+ mk-url '/getrawtx/'
|
||||
(txid-to-cord txid.ract)
|
||||
::
|
||||
%create-raw-tx
|
||||
%+ post-request
|
||||
(mk-url '/createrawtx' '')
|
||||
(action-to-json ract)
|
||||
::
|
||||
%broadcast-tx
|
||||
%- get-request
|
||||
|
@ -11,13 +11,10 @@
|
||||
$% [%address-info =address]
|
||||
[%tx-info =txid]
|
||||
[%raw-tx =txid]
|
||||
[%create-raw-tx inputs=(list [=txid pos=@ud]) outputs=(list [=address value=sats])]
|
||||
[%broadcast-tx =rawtx]
|
||||
[%ping ~]
|
||||
==
|
||||
+$ result [=req-id body=result-body]
|
||||
:: %raw-tx: result type for both %raw-tx and %create-raw-tx actions
|
||||
::
|
||||
+$ result-body
|
||||
$% [%address-info utxos=(set utxo) used=? block=@ud]
|
||||
[%tx-info =info:tx]
|
||||
@ -35,14 +32,13 @@
|
||||
$% [%connected block=@ud fee=@ud]
|
||||
[%disconnected ~]
|
||||
==
|
||||
::
|
||||
::
|
||||
++ rpc-types
|
||||
|%
|
||||
+$ action
|
||||
$% [%get-address-info =address]
|
||||
[%get-tx-vals =txid]
|
||||
[%get-raw-tx =txid]
|
||||
[%create-raw-tx inputs=(list [=txid pos=@ud]) outputs=(list [=address value=sats])]
|
||||
[%broadcast-tx =rawtx]
|
||||
[%get-block-count ~]
|
||||
[%get-block-and-fee ~]
|
||||
|
Loading…
Reference in New Issue
Block a user