Skip to content

waved: pay Taproot Asset addresses from the asset wallet - #1665

Draft
darioAnongba wants to merge 7 commits into
mainfrom
darioAnongba/waved-asset-send
Draft

darioAnongba wants to merge 7 commits into
mainfrom
darioAnongba/waved-asset-send

Conversation

@darioAnongba

Copy link
Copy Markdown
Collaborator

Adds sending to version 2 Taproot Asset addresses from the daemon's asset wallet, on regtest like the rest of the asset work. It builds on lightninglabs/tap-sdk#217, pinned by pseudo-version until that merges.

  • The engine's anchor wallet is the daemon wallet: anchorWallet funds the outputs of the anchor transaction through depositFunder, the outputs-only funding that deposits use, and signs its own inputs. A wallet that holds too little reports its shortfall.
  • EstimateAssetSend returns the chain fee and the satoshis of the recipient's anchor output, or the shortfall with a daemon wallet address to fund. It derives that address, so it is granted as a write.
  • SendAsset pays an address once per request_id: the engine records the send under a label carrying the ID before it broadcasts, so a retry finds the first send. ListAssetSends lists the sends, counting the units of the outputs the wallet does not hold.
  • SDK and mobile verbs for the three calls. The wasm build pays no address, as it receives at none.
  • On regtest and simnet, a send pays 2 sat/vB when the chain backend has no fee estimate.

The embedded engine pays Taproot Asset addresses in one SendAsset call
when its host supplies a wallet that funds the anchor transaction, and
estimates the cost of a send before it is made. Transfer outputs also
report whether the wallet holds their script key.
The asset engine gets a send configuration with the courier dialer of
receives and the daemon wallet as its anchor wallet. The wallet funds
the outputs of an anchor transaction as it funds deposits, and a
wallet that holds too little reports the shortfall. On regtest and
simnet, a send pays 2 sat/vB when the chain backend has no estimate.
EstimateAssetSend reports what paying an address costs the daemon
wallet, or how much it lacks and an address to fund. SendAsset pays an
address once per request ID, and ListAssetSends lists the sends.
Generated with make rpc. The REST client adapters and the macaroon
permissions of the three calls come with the stubs, since the REST
client must implement the daemon client and the daemon refuses to
serve a method without a permission.
SendAsset pays an address once per request ID: the engine records each
send under a label that carries the ID before it broadcasts, so a retry
finds the first send. EstimateAssetSend reports the cost of a send, or
the daemon wallet's shortfall with an address to fund.
EstimateAssetSend, SendAsset and ListAssetSends wrap the daemon's
asset send calls for Go and mobile hosts. A browser host gets none of
them, since its daemon pays no address.
The daemon pays an address of the issuer's tapd and one of another
daemon, with the daemon wallet paying for both anchor transactions. A
retry under the same request ID returns the first send, and an
estimate at a fee rate the wallet cannot pay reports the shortfall.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant