Repository navigation
waved: pay Taproot Asset addresses from the asset wallet - #1665
Draft
darioAnongba wants to merge 7 commits into
Draft
darioAnongba wants to merge 7 commits into
darioAnongba wants to merge 7 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
anchorWalletfunds the outputs of the anchor transaction throughdepositFunder, the outputs-only funding that deposits use, and signs its own inputs. A wallet that holds too little reports its shortfall.EstimateAssetSendreturns 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.SendAssetpays an address once perrequest_id: the engine records the send under a label carrying the ID before it broadcasts, so a retry finds the first send.ListAssetSendslists the sends, counting the units of the outputs the wallet does not hold.