Skip to content

Commit 3c4679d

Browse files
Leo Weesegitbook-bot
authored andcommitted
GITBOOK-518: change request with no subject merged in GitBook
1 parent 8933893 commit 3c4679d

File tree

1 file changed

+33
-85
lines changed

1 file changed

+33
-85
lines changed

lightning-network-tools/taproot-assets/first-steps.md

Lines changed: 33 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This will add your asset to a minting queue called a batch, which allows multipl
3232

3333
You will be given a `batch_txid`, which will have to be included in a block before you can spend your newly created assets. You can also inspect the newly created asset(s) by calling the command
3434

35-
`tapcli assets list --show_unconfirmed_mints` 
35+
`tapcli assets list --show_unconfirmed_mints`
3636

3737
```json
3838
{
@@ -181,30 +181,44 @@ Upon successful sync, information about existing assets should be retrieved, alo
181181

182182
## Generating Taproot Assets addresses <a href="#docs-internal-guid-b63629f3-7fff-ba71-770c-b7d5f5eac736" id="docs-internal-guid-b63629f3-7fff-ba71-770c-b7d5f5eac736"></a>
183183

184-
As soon as your minted assets have one confirmation on the blockchain, you are able to send them. To send assets, you will need the recipient’s Taproot Assets address. This Taproot Assets address is specific to an asset and amount, so to generate an address, the recipient needs to know an asset’s `asset_id`, as well as be synced to the issuer’s universe. Taproot Assets address reuse should be avoided.
184+
As soon as your minted assets have one confirmation on the blockchain, you are able to transfer them. You will first need the recipient’s Taproot Assets address. This address can either be interactive or non-interactive.
185185

186-
When generating a Taproot Assets address, the receiver will create their expected Merkle trees, and tweak a Taproot key with it. The resulting key is converted to a Taproot address, where the receiver waits for an incoming transaction.
186+
#### Interactive Taproot Assets addresses <a href="#docs-internal-guid-5eaf86ff-7fff-7c5f-fab8-1ef9e6931c07" id="docs-internal-guid-5eaf86ff-7fff-7c5f-fab8-1ef9e6931c07"></a>
187187

188-
To generate a Taproot Assets address requesting 21 beefbux, use the following command from the tapd instance of the receiver:
188+
In situations where the asset ID is not known, for instance grouped assets, when the requested amount is flexible or a Taproot Assets address is meant to be reusable, interactive Taproot Assets addresses are preferable. The sender and recipient have to be both online to negotiate the transaction, although the final transaction may be submitted to the blockchain only at a later point.
189+
190+
To generate such an address, only the group key is required.
191+
192+
`tapcli addrs new --group_key 02875ce409b587a6656357639d099ad9eb08396d0dfea8930a45e742c81d6fc782`
193+
194+
#### Non-interactive Taproot Assets addresses
195+
196+
Non-interactive Taproot Assets addresses arespecific to an asset and amount, so to generate an address, the recipient needs to know an asset’s asset\_id, as well as be synced to the issuer’s universe. Reuse of non-interactive Taproot Assets address reuse should be avoided. This type of transfer is ideal when the asset ID is known and the amount is fixed. The recipient does not need to be online during the transfer.
189197

190198
`tapcli addrs new --asset_id b9ae86f52dcbdee7ea78e86b26320819c44c2f4f8a91b9c055ca0af4c4d1b22b --amt 21`
191199

200+
## Sending an asset <a href="#docs-internal-guid-5d8fd7ee-7fff-475c-a392-4855bf9afc85" id="docs-internal-guid-5d8fd7ee-7fff-475c-a392-4855bf9afc85"></a>
201+
202+
#### Interactive Taproot Assets transactions <a href="#docs-internal-guid-18439dd9-7fff-260c-8c17-b1a80524770f" id="docs-internal-guid-18439dd9-7fff-260c-8c17-b1a80524770f"></a>
192203

204+
To send the asset in the interactive flow, the sender can then use the tapcli assets send command, using the generated taproot asset address and the amount, separated by a colon. For this type of send, address reuse is acceptable or even encouraged, but both the sender and the receiver are expected to be online simultaneously.
205+
206+
`tapcli assets send --addr_with_amount taptb1qqqsyqspqqzjzq58tnjqndv85ejkx4mrn5ye4k0tpquk6r074zfs5308gtyp6m78sgrzzqaaxepdtxjlytle39tjem4mh88hyg7jxpwrn3nkq7mdt95hpw0rpyyzzqcf0vcytzhvhy5mze28ye4zzrm5c38av735md2382zmzxc07zfzcs9qzqqv8ash2argd4skjmrzdauzkatwd9mx2unnv4e8qce69uhhx6t8dejhgtn4de5hvetjwdjjumrfva58gmnfdenjuenfdeskucm98g6rgvc8ar5ce:100`
193207

194208
```json
195209
{
196-
"encoded": "taptb1qqqszqspqqzzpwdwsm6jmj77ul4836rtyceqsxwyfsh5lz53h8q9tjs27nzdrv3tq5ssy535xeq397p75lhgud0sv8tzthuzacr7gsur2yregl3mk5lgaxluqcssy8ghaz0ph5py0hr3vfzl25caxp8k2a2zls9e3mxt8lnmkrqnt0nvpqssyq7ghy5fnu0myjy2lkypu5u9qpe35c7hkt80cec9j4vv3cz8vn3xpgq32rpkw4hxjan9wfek2unsvvaz7tm5v4ehgmn9wsh82mnfwejhyum99ekxjemgw3hxjmn89enxjmnpde3k2w33xqcrywgur62n4",
197-
"asset_id": "b9ae86f52dcbdee7ea78e86b26320819c44c2f4f8a91b9c055ca0af4c4d1b22b",
198-
"asset_type": "NORMAL",
199-
"amount": "21",
200-
"group_key": "025234364112f83ea7ee8e35f061d625df82ee07e443835107947e3bb53e8e9bfc",
201-
"script_key": "021d17e89e1bd0247dc716245f5531d304f657542fc0b98eccb3fe7bb0c135be6c",
202-
"internal_key": "0203c8b92899f1fb2488afd881e538500731a63d7b2cefc67059558c8e04764e26",
203-
"tapscript_sibling": "",
204-
"taproot_output_key": "2fd47bf48b0547f3ec352468b858ba1ea9a392cdbf6634bb7c6129ba09d15e52",
205-
"proof_courier_addr": "universerpc://testnet.universe.lightning.finance:10029",
206-
"asset_version": "ASSET_VERSION_V0",
207-
"address_version": "ADDR_VERSION_V1"
210+
"encoded": "taptb1qqqsyqspqqzjzq58tnjqndv85ejkx4mrn5ye4k0tpquk6r074zfs5308gtyp6m78sgrzzqaaxepdtxjlytle39tjem4mh88hyg7jxpwrn3nkq7mdt95hpw0rpyyzzqcf0vcytzhvhy5mze28ye4zzrm5c38av735md2382zmzxc07zfzcs9qzqqv8ash2argd4skjmrzdauzkatwd9mx2unnv4e8qce69uhhx6t8dejhgtn4de5hvetjwdjjumrfva58gmnfdenjuenfdeskucm98g6rgvc8ar5ce",
211+
"asset_id": "",
212+
"asset_type": "NORMAL",
213+
"amount": "0",
214+
"group_key": "02875ce409b587a6656357639d099ad9eb08396d0dfea8930a45e742c81d6fc782",
215+
"script_key": "03bd3642d59a5f22ff989572ceebbb9cf7223d2305c39c67607b6d596970b9e309",
216+
"internal_key": "03097b30458aecb929b16547266a210f74c44fd67a34db5513a85b11b0ff0922c4",
217+
"tapscript_sibling": "",
218+
"taproot_output_key": "bd3642d59a5f22ff989572ceebbb9cf7223d2305c39c67607b6d596970b9e309",
219+
"proof_courier_addr": "authmailbox+universerpc://signet.universe.lightning.finance:443",
220+
"asset_version": "ASSET_VERSION_V0",
221+
"address_version": "ADDR_VERSION_V2"
208222
}
209223

210224
```
@@ -221,79 +235,13 @@ To generate a Taproot Assets address requesting 21 beefbux, use the following co
221235
`proof_courier_addr`: The mailbox over which the asset proofs are being delivered.\
222236
`asset_version`: The version of the asset.
223237

224-
You’ll also be able to inspect this address again anytime with the command `tapcli addrs query`
238+
#### Non-interactive Taproot Assets transactions <a href="#docs-internal-guid-30a129a3-7fff-2f33-f0c1-921bb94b13ba" id="docs-internal-guid-30a129a3-7fff-2f33-f0c1-921bb94b13ba"></a>
225239

226-
## Sending an asset <a href="#docs-internal-guid-5d8fd7ee-7fff-475c-a392-4855bf9afc85" id="docs-internal-guid-5d8fd7ee-7fff-475c-a392-4855bf9afc85"></a>
227-
228-
To send the asset, run the command below from the tapd instance of the sender. This will generate the appropriate Merkle trees for the recipient and their change outputs, sign the Taproot Assets transaction with their internal Taproot Assets key and publish the Bitcoin transaction. Note that you cannot send unconfirmed assets.
240+
To send the asset to a non-interactive Taproot Asset address, run the command below from the tapd instance of the sender. This will generate the appropriate Merkle trees for the recipient and their change outputs, sign the Taproot Assets transaction with their internal Taproot Assets key and publish the Bitcoin transaction. Note that you cannot send unconfirmed assets.
229241

230242
`tapcli assets send --addr taptb1qqqszqspqqzzpwdwsm6jmj77ul4836rtyceqsxwyfsh5lz53h8q9tjs27nzdrv3tq5ssy535xeq397p75lhgud0sv8tzthuzacr7gsur2yregl3mk5lgaxluqcss9z9grekhnm97ymknzptz6zptw22cn54u3tdwqphnl5kwthqafzyapqss8zlu9rqjndpjjxa7xue6csqg7l6u7r8vw2hpw8v23mmdckktqhlzpgq32rpkw4hxjan9wfek2unsvvaz7tm5v4ehgmn9wsh82mnfwejhyum99ekxjemgw3hxjmn89enxjmnpde3k2w33xqcrywgs04lws --sat_per_vbyte 16`
231243

232-
```json
233-
{
234-
"transfer": {
235-
"transfer_timestamp": "1720023083",
236-
"anchor_tx_hash": "aa98f0c02553b2f3aa58bf50be3a84ffb9bee7ef5646ed17678cd6dba41c31bd",
237-
"anchor_tx_height_hint": 2865816,
238-
"anchor_tx_chain_fees": "4072",
239-
"inputs": [
240-
{
241-
"anchor_point": "183274b98657bb37012369cac96d9923ddeca67239eb651a52dada975c9d94a5:0",
242-
"asset_id": "b9ae86f52dcbdee7ea78e86b26320819c44c2f4f8a91b9c055ca0af4c4d1b22b",
243-
"script_key": "02699e225abed4f8fd746d4888984278a7a57f63a0c542df04eac22ed9f1db5e25",
244-
"amount": "1000000"
245-
}
246-
],
247-
"outputs": [
248-
{
249-
"anchor": {
250-
"outpoint": "bd311ca4dbd68c6717ed4656efe7beb9ff843abe50bf58aaf3b25325c0f098aa:0",
251-
"value": "1000",
252-
"internal_key": "02d30fa2e2b05b3dda5dc42561fc10d30a4633fed3a1fce840ff3c0f9741e47af7",
253-
"taproot_asset_root": "0c11e91c40c1602b640be236844e1f65744f5145cdb218a69ec01a5010c6c882",
254-
"merkle_root": "0c11e91c40c1602b640be236844e1f65744f5145cdb218a69ec01a5010c6c882",
255-
"tapscript_sibling": "",
256-
"num_passive_assets": 0
257-
},
258-
"script_key": "02353b522d14c357bcc9a48ce3f8c03591268b3cb9ab787fb40a3fc921aa28f567",
259-
"script_key_is_local": true,
260-
"amount": "999979",
261-
"new_proof_blob": "544150500004000000000224a5949d5c97dada521a65eb3972a6ecdd23996dc9ca69230137bb5786b9743218000000000450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000096e88000000000000000006fd016302000000000102a5949d5c97dada521a65eb3972a6ecdd23996dc9ca69230137bb5786b9743218000000000000000000386c8b04f74aa6bbf344316b017c055478f240b1c2dbd69c0aaa7a0db8a9628901000000000000000003e8030000000000002251206625580d8e68996c2d673dd3a6870923d94801e2582794bf946a5020a0e2228de803000000000000225120ffed7ed4c6f37a22caa94a89eca75276bdcac20655e8461db84ae9b5f267a6c58ec9090200000000225120d72b7ca1bfa5b074de27cd90ecb13bd7545dc97f93d729a903d78a82238c76a3014013ec44ba7828e5201e5a45246fca9091892fd9763d609bb6aa82e313533e9f60e94eb9bbed16a2a68442fdf0080693a13152623f0431d4104f061e3d158f1df40140781bd5af7978f1670bdf5089fb9eede08a8a3685d81ec4a7291572c5ba03e071395a5e974381a92309b860d1ed234aa593bd2feecd97012fc5fd14039b715ac0000000000801000afd01830001000251d0b91d6ca6be9dc5b6649d09e407cc776316861fbf7d8fb9793b999632117e350000000107626565666275781b206639244dae9875be0db3babd9c326e9ffe319f9a913c56b765c8e80b629900000000000401000605fe000f422b0bad01ab0165a5949d5c97dada521a65eb3972a6ecdd23996dc9ca69230137bb5786b974321800000000b9ae86f52dcbdee7ea78e86b26320819c44c2f4f8a91b9c055ca0af4c4d1b22b02699e225abed4f8fd746d4888984278a7a57f63a0c542df04eac22ed9f1db5e25034201409d36acbea1349fe09e300d475a1e16a50e7117ff358f9cc006bcc189d34fb8870626d2dd0ca799900bbe61d96b8b42bf52190494888a73d2afcb1b2802dd70d60d28b56a6f8c50a0e64ab71e131457a4616fd2b96c951e0079804f05cd3f7e705e3500000000000f42400e020000102102353b522d14c357bcc9a48ce3f8c03591268b3cb9ab787fb40a3fc921aa28f5671121025234364112f83ea7ee8e35f061d625df82ee07e443835107947e3bb53e8e9bfc0c9f000400000000022102d30fa2e2b05b3dda5dc42561fc10d30a4633fed3a1fce840ff3c0f9741e47af70374014900010002204b6e10c823458cf3f88610acb856ad3d8e7c8d6c98e2b0cc555ea817c745007f04220000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff022700010202220000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0df802c70004000000010221038bfc28c129b43291bbe3733ac4008f7f5cf0cec72ae171d8a8ef6dc5acb05fe2039c017100010002204b6e10c823458cf3f88610acb856ad3d8e7c8d6c98e2b0cc555ea817c745007f044a0001a747229910afb342aa789d28829b4484e95572f81bfa46cef02b8ea80e3c10050000000000000015ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f022700010202220000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2e000400000002022102aded69752e870b53d04f98b1d0438f0f7da19b3fa6e88e939e1d8e6ddfe5899f0503040101160400000000",
262-
"split_commit_root_hash": "b56a6f8c50a0e64ab71e131457a4616fd2b96c951e0079804f05cd3f7e705e35",
263-
"output_type": "OUTPUT_TYPE_SPLIT_ROOT",
264-
"asset_version": "ASSET_VERSION_V0",
265-
"lock_time": "0",
266-
"relative_lock_time": "0"
267-
},
268-
{
269-
"anchor": {
270-
"outpoint": "bd311ca4dbd68c6717ed4656efe7beb9ff843abe50bf58aaf3b25325c0f098aa:1",
271-
"value": "1000",
272-
"internal_key": "038bfc28c129b43291bbe3733ac4008f7f5cf0cec72ae171d8a8ef6dc5acb05fe2",
273-
"taproot_asset_root": "348eeff7dbb2c5e7754563a8cbca4fad3db4fc1787710a85e7bb1d374845f81e",
274-
"merkle_root": "348eeff7dbb2c5e7754563a8cbca4fad3db4fc1787710a85e7bb1d374845f81e",
275-
"tapscript_sibling": "",
276-
"num_passive_assets": 0
277-
},
278-
"script_key": "0288a81e6d79ecbe26ed310562d082b729589d2bc8adae006f3fd2ce5dc1d4889d",
279-
"script_key_is_local": false,
280-
"amount": "21",
281-
"new_proof_blob": "544150500004000000000224a5949d5c97dada521a65eb3972a6ecdd23996dc9ca69230137bb5786b9743218000000000450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000096e88000000000000000006fd016302000000000102a5949d5c97dada521a65eb3972a6ecdd23996dc9ca69230137bb5786b9743218000000000000000000386c8b04f74aa6bbf344316b017c055478f240b1c2dbd69c0aaa7a0db8a9628901000000000000000003e8030000000000002251206625580d8e68996c2d673dd3a6870923d94801e2582794bf946a5020a0e2228de803000000000000225120ffed7ed4c6f37a22caa94a89eca75276bdcac20655e8461db84ae9b5f267a6c58ec9090200000000225120d72b7ca1bfa5b074de27cd90ecb13bd7545dc97f93d729a903d78a82238c76a3014013ec44ba7828e5201e5a45246fca9091892fd9763d609bb6aa82e313533e9f60e94eb9bbed16a2a68442fdf0080693a13152623f0431d4104f061e3d158f1df40140781bd5af7978f1670bdf5089fb9eede08a8a3685d81ec4a7291572c5ba03e071395a5e974381a92309b860d1ed234aa593bd2feecd97012fc5fd14039b715ac0000000000801000afd02ea0001000251d0b91d6ca6be9dc5b6649d09e407cc776316861fbf7d8fb9793b999632117e350000000107626565666275781b206639244dae9875be0db3babd9c326e9ffe319f9a913c56b765c8e80b629900000000000401000601150bfd024001fd023c0165000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005fd01d14a00011c4dc7a124da6dda0d604c6d21497a74c482e032efe704a6f646b0592ec9941b00000000000f422bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffd01830001000251d0b91d6ca6be9dc5b6649d09e407cc776316861fbf7d8fb9793b999632117e350000000107626565666275781b206639244dae9875be0db3babd9c326e9ffe319f9a913c56b765c8e80b629900000000000401000605fe000f422b0bad01ab0165a5949d5c97dada521a65eb3972a6ecdd23996dc9ca69230137bb5786b974321800000000b9ae86f52dcbdee7ea78e86b26320819c44c2f4f8a91b9c055ca0af4c4d1b22b02699e225abed4f8fd746d4888984278a7a57f63a0c542df04eac22ed9f1db5e25034201409d36acbea1349fe09e300d475a1e16a50e7117ff358f9cc006bcc189d34fb8870626d2dd0ca799900bbe61d96b8b42bf52190494888a73d2afcb1b2802dd70d60d28b56a6f8c50a0e64ab71e131457a4616fd2b96c951e0079804f05cd3f7e705e3500000000000f42400e020000102102353b522d14c357bcc9a48ce3f8c03591268b3cb9ab787fb40a3fc921aa28f5671121025234364112f83ea7ee8e35f061d625df82ee07e443835107947e3bb53e8e9bfc0e02000010210288a81e6d79ecbe26ed310562d082b729589d2bc8adae006f3fd2ce5dc1d4889d1121025234364112f83ea7ee8e35f061d625df82ee07e443835107947e3bb53e8e9bfc0c9f0004000000010221038bfc28c129b43291bbe3733ac4008f7f5cf0cec72ae171d8a8ef6dc5acb05fe20374014900010002204b6e10c823458cf3f88610acb856ad3d8e7c8d6c98e2b0cc555ea817c745007f04220000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff022700010202220000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0df802c7000400000000022102d30fa2e2b05b3dda5dc42561fc10d30a4633fed3a1fce840ff3c0f9741e47af7039c017100010002204b6e10c823458cf3f88610acb856ad3d8e7c8d6c98e2b0cc555ea817c745007f044a00011d84338038c2ea5f9e479914affebffee80985ee6157874661840095602c20f900000000000f422bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f022700010202220000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2e000400000002022102aded69752e870b53d04f98b1d0438f0f7da19b3fa6e88e939e1d8e6ddfe5899f05030401010f9f000400000000022102d30fa2e2b05b3dda5dc42561fc10d30a4633fed3a1fce840ff3c0f9741e47af70374014900010002204b6e10c823458cf3f88610acb856ad3d8e7c8d6c98e2b0cc555ea817c745007f04220000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff022700010202220000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff160400000000",
282-
"split_commit_root_hash": "",
283-
"output_type": "OUTPUT_TYPE_SIMPLE",
284-
"asset_version": "ASSET_VERSION_V0",
285-
"lock_time": "0",
286-
"relative_lock_time": "0"
287-
}
288-
]
289-
}
290-
}
291-
292-
```
293-
294-
You will notice the testnet3 transaction id (`bd311ca4dbd68c6717ed4656efe7beb9ff843abe50bf58aaf3b25325c0f098aa`) has two inputs. One input is the newly minted asset (easily identifiable by its 1000 sat amount), while the other is from LND’s internal wallet. This second input is used to pay the onchain fees. The output from `tapcli` as seen above will only show the one input and two outputs that hold the Taproot Assets.
295-
296-
There are three outputs. Two outputs of 1000 satoshis each and the change output of LND’s internal wallet. The two 1000 satoshi inputs anchor the proofs of the sender and receiver. Even when the sender spends all of their assets, such an output is still created to carry proof of the transfer.
244+
You’ll also be able to inspect this address again anytime with the command `tapcli addrs query`
297245

298246
Once the transaction is confirmed on the Bitcoin Blockchain the sender will attempt to make the proofs available to the recipient via an [end-to-end encrypted mailbox](../lightning-terminal/lightning-node-connect.md), similar to Lightning Node Connect (LNC).
299247

0 commit comments

Comments
 (0)