lnlink-server 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +461 -0
- package/dist/app.js +11165 -0
- package/dist/binaries.json +20 -0
- package/dist/build-info.json +41 -0
- package/dist/config.default.js +19 -0
- package/dist/index.js +19002 -0
- package/dist/index.js.map +7 -0
- package/dist/package.json +61 -0
- package/dist/prisma/migrations/20250918020814_/migration.sql +188 -0
- package/dist/prisma/migrations/20251114105314_auto_update/migration.sql +2 -0
- package/dist/prisma/migrations/migration_lock.toml +3 -0
- package/dist/prisma/schema.prisma +181 -0
- package/dist/proto/chainkit.proto +74 -0
- package/dist/proto/lightning.proto +5411 -0
- package/dist/proto/lit-status.proto +36 -0
- package/dist/proto/looprpc/client.proto +1435 -0
- package/dist/proto/price_oracle.proto +243 -0
- package/dist/proto/rfqrpc/rfq.proto +436 -0
- package/dist/proto/routerrpc/router.proto +1136 -0
- package/dist/proto/signrpc/signer.proto +709 -0
- package/dist/proto/stateservice.proto +73 -0
- package/dist/proto/swapserverrpc/common.proto +37 -0
- package/dist/proto/tapchannel.proto +306 -0
- package/dist/proto/tapcommon.proto +36 -0
- package/dist/proto/taprootassets.proto +1959 -0
- package/dist/proto/universe.proto +1063 -0
- package/dist/proto/walletkit.proto +1594 -0
- package/dist/proto/walletunlocker.proto +338 -0
- package/dist/public/css/initOwner.css +553 -0
- package/dist/public/favicon.ico +0 -0
- package/dist/public/init.html +70 -0
- package/dist/public/js/init.js +454 -0
- package/dist/setting.mainnet.json +22 -0
- package/dist/setting.regtest.json +22 -0
- package/dist/setting.testnet.json +22 -0
- package/package.json +91 -0
|
@@ -0,0 +1,1959 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "tapcommon.proto";
|
|
4
|
+
|
|
5
|
+
package taprpc;
|
|
6
|
+
|
|
7
|
+
option go_package = "github.com/lightninglabs/taproot-assets/taprpc";
|
|
8
|
+
|
|
9
|
+
service TaprootAssets {
|
|
10
|
+
/* tapcli: `assets list`
|
|
11
|
+
ListAssets lists the set of assets owned by the target daemon.
|
|
12
|
+
*/
|
|
13
|
+
rpc ListAssets (ListAssetRequest) returns (ListAssetResponse);
|
|
14
|
+
|
|
15
|
+
/* tapcli: `assets utxos`
|
|
16
|
+
ListUtxos lists the UTXOs managed by the target daemon, and the assets they
|
|
17
|
+
hold.
|
|
18
|
+
*/
|
|
19
|
+
rpc ListUtxos (ListUtxosRequest) returns (ListUtxosResponse);
|
|
20
|
+
|
|
21
|
+
/* tapcli: `assets groups`
|
|
22
|
+
ListGroups lists the asset groups known to the target daemon, and the assets
|
|
23
|
+
held in each group.
|
|
24
|
+
*/
|
|
25
|
+
rpc ListGroups (ListGroupsRequest) returns (ListGroupsResponse);
|
|
26
|
+
|
|
27
|
+
/* tapcli: `assets balance`
|
|
28
|
+
ListBalances lists asset balances
|
|
29
|
+
*/
|
|
30
|
+
rpc ListBalances (ListBalancesRequest) returns (ListBalancesResponse);
|
|
31
|
+
|
|
32
|
+
/* tapcli: `assets transfers`
|
|
33
|
+
ListTransfers lists outbound asset transfers tracked by the target daemon.
|
|
34
|
+
*/
|
|
35
|
+
rpc ListTransfers (ListTransfersRequest) returns (ListTransfersResponse);
|
|
36
|
+
|
|
37
|
+
/* tapcli: `stop`
|
|
38
|
+
StopDaemon will send a shutdown request to the interrupt handler, triggering
|
|
39
|
+
a graceful shutdown of the daemon.
|
|
40
|
+
*/
|
|
41
|
+
rpc StopDaemon (StopRequest) returns (StopResponse);
|
|
42
|
+
|
|
43
|
+
/* tapcli: `debuglevel`
|
|
44
|
+
DebugLevel allows a caller to programmatically set the logging verbosity of
|
|
45
|
+
tapd. The logging can be targeted according to a coarse daemon-wide logging
|
|
46
|
+
level, or in a granular fashion to specify the logging for a target
|
|
47
|
+
sub-system.
|
|
48
|
+
*/
|
|
49
|
+
rpc DebugLevel (DebugLevelRequest) returns (DebugLevelResponse);
|
|
50
|
+
|
|
51
|
+
/* tapcli: `addrs query`
|
|
52
|
+
QueryAddrs queries the set of Taproot Asset addresses stored in the
|
|
53
|
+
database.
|
|
54
|
+
*/
|
|
55
|
+
rpc QueryAddrs (QueryAddrRequest) returns (QueryAddrResponse);
|
|
56
|
+
|
|
57
|
+
/* tapcli: `addrs new`
|
|
58
|
+
NewAddr makes a new address from the set of request params.
|
|
59
|
+
*/
|
|
60
|
+
rpc NewAddr (NewAddrRequest) returns (Addr);
|
|
61
|
+
|
|
62
|
+
/* tapcli: `addrs decode`
|
|
63
|
+
DecodeAddr decode a Taproot Asset address into a partial asset message that
|
|
64
|
+
represents the asset it wants to receive.
|
|
65
|
+
*/
|
|
66
|
+
rpc DecodeAddr (DecodeAddrRequest) returns (Addr);
|
|
67
|
+
|
|
68
|
+
/* tapcli: `addrs receives`
|
|
69
|
+
List all receives for incoming asset transfers for addresses that were
|
|
70
|
+
created previously.
|
|
71
|
+
*/
|
|
72
|
+
rpc AddrReceives (AddrReceivesRequest) returns (AddrReceivesResponse);
|
|
73
|
+
|
|
74
|
+
/* tapcli: `proofs verify`
|
|
75
|
+
VerifyProof attempts to verify a given proof file that claims to be anchored
|
|
76
|
+
at the specified genesis point.
|
|
77
|
+
*/
|
|
78
|
+
rpc VerifyProof (ProofFile) returns (VerifyProofResponse);
|
|
79
|
+
|
|
80
|
+
/* tapcli: `proofs decode`
|
|
81
|
+
DecodeProof attempts to decode a given proof file into human readable
|
|
82
|
+
format.
|
|
83
|
+
*/
|
|
84
|
+
rpc DecodeProof (DecodeProofRequest) returns (DecodeProofResponse);
|
|
85
|
+
|
|
86
|
+
/* tapcli: `proofs export`
|
|
87
|
+
ExportProof exports the latest raw proof file anchored at the specified
|
|
88
|
+
script_key.
|
|
89
|
+
*/
|
|
90
|
+
rpc ExportProof (ExportProofRequest) returns (ProofFile);
|
|
91
|
+
|
|
92
|
+
/* tapcli: `proofs unpack`
|
|
93
|
+
UnpackProofFile unpacks a proof file into a list of the individual raw
|
|
94
|
+
proofs in the proof chain.
|
|
95
|
+
*/
|
|
96
|
+
rpc UnpackProofFile (UnpackProofFileRequest)
|
|
97
|
+
returns (UnpackProofFileResponse);
|
|
98
|
+
|
|
99
|
+
/* tapcli: `assets send`
|
|
100
|
+
SendAsset uses one or multiple passed Taproot Asset address(es) to attempt
|
|
101
|
+
to complete an asset send. The method returns information w.r.t the on chain
|
|
102
|
+
send, as well as the proof file information the receiver needs to fully
|
|
103
|
+
receive the asset.
|
|
104
|
+
*/
|
|
105
|
+
rpc SendAsset (SendAssetRequest) returns (SendAssetResponse);
|
|
106
|
+
|
|
107
|
+
/* tapcli: `assets burn`
|
|
108
|
+
BurnAsset burns the given number of units of a given asset by sending them
|
|
109
|
+
to a provably un-spendable script key. Burning means irrevocably destroying
|
|
110
|
+
a certain number of assets, reducing the total supply of the asset. Because
|
|
111
|
+
burning is such a destructive and non-reversible operation, some specific
|
|
112
|
+
values need to be set in the request to avoid accidental burns.
|
|
113
|
+
*/
|
|
114
|
+
rpc BurnAsset (BurnAssetRequest) returns (BurnAssetResponse);
|
|
115
|
+
|
|
116
|
+
/* tapcli: `assets listburns`
|
|
117
|
+
ListBurns lists the asset burns that this wallet has performed. These assets
|
|
118
|
+
are not recoverable in any way. Filters may be applied to return more
|
|
119
|
+
specific results.
|
|
120
|
+
*/
|
|
121
|
+
rpc ListBurns (ListBurnsRequest) returns (ListBurnsResponse);
|
|
122
|
+
|
|
123
|
+
/* tapcli: `getinfo`
|
|
124
|
+
GetInfo returns the information for the node.
|
|
125
|
+
*/
|
|
126
|
+
rpc GetInfo (GetInfoRequest) returns (GetInfoResponse);
|
|
127
|
+
|
|
128
|
+
/* tapcli: `assets meta`
|
|
129
|
+
FetchAssetMeta allows a caller to fetch the reveal meta data for an asset
|
|
130
|
+
either by the asset ID for that asset, or a meta hash.
|
|
131
|
+
*/
|
|
132
|
+
rpc FetchAssetMeta (FetchAssetMetaRequest) returns (FetchAssetMetaResponse);
|
|
133
|
+
|
|
134
|
+
/* tapcli: `events receive`
|
|
135
|
+
SubscribeReceiveEvents allows a caller to subscribe to receive events for
|
|
136
|
+
incoming asset transfers.
|
|
137
|
+
*/
|
|
138
|
+
rpc SubscribeReceiveEvents (SubscribeReceiveEventsRequest)
|
|
139
|
+
returns (stream ReceiveEvent);
|
|
140
|
+
|
|
141
|
+
/* tapcli: `events send`
|
|
142
|
+
SubscribeSendEvents allows a caller to subscribe to send events for outgoing
|
|
143
|
+
asset transfers.
|
|
144
|
+
*/
|
|
145
|
+
rpc SubscribeSendEvents (SubscribeSendEventsRequest)
|
|
146
|
+
returns (stream SendEvent);
|
|
147
|
+
|
|
148
|
+
/*
|
|
149
|
+
RegisterTransfer informs the daemon about a new inbound transfer that has
|
|
150
|
+
happened. This is used for interactive transfers where no TAP address is
|
|
151
|
+
involved and the recipient is aware of the transfer through an out-of-band
|
|
152
|
+
protocol but the daemon hasn't been informed about the completion of the
|
|
153
|
+
transfer. For this to work, the proof must already be in the recipient's
|
|
154
|
+
local universe (e.g. through the use of the universerpc.InsertProof RPC or
|
|
155
|
+
the universe proof courier and universe sync mechanisms) and this call
|
|
156
|
+
simply instructs the daemon to detect the transfer as an asset it owns.
|
|
157
|
+
*/
|
|
158
|
+
rpc RegisterTransfer (RegisterTransferRequest)
|
|
159
|
+
returns (RegisterTransferResponse);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
enum AssetType {
|
|
163
|
+
/*
|
|
164
|
+
Indicates that an asset is capable of being split/merged, with each of the
|
|
165
|
+
units being fungible, even across a key asset ID boundary (assuming the
|
|
166
|
+
key group is the same).
|
|
167
|
+
*/
|
|
168
|
+
NORMAL = 0;
|
|
169
|
+
|
|
170
|
+
/*
|
|
171
|
+
Indicates that an asset is a collectible, meaning that each of the other
|
|
172
|
+
items under the same key group are not fully fungible with each other.
|
|
173
|
+
Collectibles also cannot be split or merged.
|
|
174
|
+
*/
|
|
175
|
+
COLLECTIBLE = 1;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
enum AssetMetaType {
|
|
179
|
+
/*
|
|
180
|
+
Opaque is used for asset meta blobs that have no true structure and instead
|
|
181
|
+
should be interpreted as opaque blobs.
|
|
182
|
+
*/
|
|
183
|
+
META_TYPE_OPAQUE = 0;
|
|
184
|
+
|
|
185
|
+
/*
|
|
186
|
+
JSON is used for asset meta blobs that are to be interpreted as valid JSON
|
|
187
|
+
strings.
|
|
188
|
+
*/
|
|
189
|
+
META_TYPE_JSON = 1;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
message AssetMeta {
|
|
193
|
+
/*
|
|
194
|
+
The raw data of the asset meta data. Based on the type below, this may be
|
|
195
|
+
structured data such as a text file or PDF. The size of the data is limited
|
|
196
|
+
to 1MiB.
|
|
197
|
+
*/
|
|
198
|
+
bytes data = 1;
|
|
199
|
+
|
|
200
|
+
// The type of the asset meta data.
|
|
201
|
+
AssetMetaType type = 2;
|
|
202
|
+
|
|
203
|
+
/*
|
|
204
|
+
The hash of the meta. This is the hash of the TLV serialization of the meta
|
|
205
|
+
itself.
|
|
206
|
+
*/
|
|
207
|
+
bytes meta_hash = 3;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
message ListAssetRequest {
|
|
211
|
+
// Whether to include each asset's witness in the response. The witness
|
|
212
|
+
// either contains the spending signatures or the split commitment witness,
|
|
213
|
+
// which can both be large and usually aren't very useful on the command
|
|
214
|
+
// line, so are omitted by default.
|
|
215
|
+
bool with_witness = 1;
|
|
216
|
+
|
|
217
|
+
// Include assets that are marked as spent (which is always true for burn
|
|
218
|
+
// or tombstone assets).
|
|
219
|
+
bool include_spent = 2;
|
|
220
|
+
|
|
221
|
+
// Include assets that are leased (locked/reserved) by the daemon for a
|
|
222
|
+
// pending transfer. Leased assets cannot be used by the daemon until the
|
|
223
|
+
// pending transfer is confirmed or the lease expires.
|
|
224
|
+
bool include_leased = 3;
|
|
225
|
+
|
|
226
|
+
// List assets that aren't confirmed yet. Only freshly minted assets will
|
|
227
|
+
// show in the asset list with a block height of 0. All other forms of
|
|
228
|
+
// unconfirmed assets will not appear in the list until the transaction is
|
|
229
|
+
// confirmed (check either transfers or receives for unconfirmed outbound or
|
|
230
|
+
// inbound assets).
|
|
231
|
+
bool include_unconfirmed_mints = 4;
|
|
232
|
+
|
|
233
|
+
// Only return assets with amount greater or equal to this value.
|
|
234
|
+
uint64 min_amount = 5;
|
|
235
|
+
|
|
236
|
+
// Only return assets with amount less or equal to this value.
|
|
237
|
+
uint64 max_amount = 6;
|
|
238
|
+
|
|
239
|
+
// Only return assets that belong to the group with this key.
|
|
240
|
+
bytes group_key = 7;
|
|
241
|
+
|
|
242
|
+
// Return all assets that use this script key.
|
|
243
|
+
ScriptKey script_key = 8;
|
|
244
|
+
|
|
245
|
+
// Return all assets that are currently anchored on this outpoint.
|
|
246
|
+
OutPoint anchor_outpoint = 9;
|
|
247
|
+
|
|
248
|
+
// The script key type to filter the assets by. If not set, only assets with
|
|
249
|
+
// a BIP-0086 script key will be returned (which is the equivalent of
|
|
250
|
+
// setting script_key_type.explicit_type = SCRIPT_KEY_BIP86). If the type
|
|
251
|
+
// is set to SCRIPT_KEY_BURN or SCRIPT_KEY_TOMBSTONE the include_spent flag
|
|
252
|
+
// will automatically be set to true, because assets of that type are always
|
|
253
|
+
// marked as spent.
|
|
254
|
+
ScriptKeyTypeQuery script_key_type = 10;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
message AnchorInfo {
|
|
258
|
+
// The transaction that anchors the Taproot Asset commitment where the asset
|
|
259
|
+
// resides.
|
|
260
|
+
bytes anchor_tx = 1;
|
|
261
|
+
|
|
262
|
+
// The block hash the contains the anchor transaction above.
|
|
263
|
+
string anchor_block_hash = 3;
|
|
264
|
+
|
|
265
|
+
// The outpoint (txid:vout) that stores the Taproot Asset commitment.
|
|
266
|
+
string anchor_outpoint = 4;
|
|
267
|
+
|
|
268
|
+
/*
|
|
269
|
+
The raw internal key that was used to create the anchor Taproot output key.
|
|
270
|
+
*/
|
|
271
|
+
bytes internal_key = 5;
|
|
272
|
+
|
|
273
|
+
/*
|
|
274
|
+
The Taproot merkle root hash of the anchor output the asset was committed
|
|
275
|
+
to. If there is no Tapscript sibling, this is equal to the Taproot Asset
|
|
276
|
+
root commitment hash.
|
|
277
|
+
*/
|
|
278
|
+
bytes merkle_root = 6;
|
|
279
|
+
|
|
280
|
+
/*
|
|
281
|
+
The serialized preimage of a Tapscript sibling, if there was one. If this
|
|
282
|
+
is empty, then the merkle_root hash is equal to the Taproot root hash of the
|
|
283
|
+
anchor output.
|
|
284
|
+
*/
|
|
285
|
+
bytes tapscript_sibling = 7;
|
|
286
|
+
|
|
287
|
+
// The height of the block which contains the anchor transaction.
|
|
288
|
+
uint32 block_height = 8;
|
|
289
|
+
|
|
290
|
+
// The UTC Unix timestamp of the block containing the anchor transaction.
|
|
291
|
+
int64 block_timestamp = 9;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
message GenesisInfo {
|
|
295
|
+
// The first outpoint of the transaction that created the asset (txid:vout).
|
|
296
|
+
string genesis_point = 1;
|
|
297
|
+
|
|
298
|
+
// The name of the asset.
|
|
299
|
+
string name = 2;
|
|
300
|
+
|
|
301
|
+
// The hash of the meta data for this genesis asset.
|
|
302
|
+
bytes meta_hash = 3;
|
|
303
|
+
|
|
304
|
+
// The asset ID that uniquely identifies the asset.
|
|
305
|
+
bytes asset_id = 4;
|
|
306
|
+
|
|
307
|
+
// The type of the asset.
|
|
308
|
+
AssetType asset_type = 5;
|
|
309
|
+
|
|
310
|
+
/*
|
|
311
|
+
The index of the output that carries the unique Taproot Asset commitment in
|
|
312
|
+
the genesis transaction.
|
|
313
|
+
*/
|
|
314
|
+
uint32 output_index = 6;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/*
|
|
318
|
+
This message represents an external key used for deriving and managing
|
|
319
|
+
hierarchical deterministic (HD) wallet addresses according to BIP-86.
|
|
320
|
+
*/
|
|
321
|
+
message ExternalKey {
|
|
322
|
+
/*
|
|
323
|
+
This field specifies the extended public key derived at depth 3 of the
|
|
324
|
+
BIP-86 hierarchy (e.g., m/86'/0'/0'). This key serves as the parent key for
|
|
325
|
+
deriving child public keys and addresses.
|
|
326
|
+
*/
|
|
327
|
+
string xpub = 1;
|
|
328
|
+
|
|
329
|
+
/*
|
|
330
|
+
This field specifies the fingerprint of the master key, derived from the
|
|
331
|
+
first 4 bytes of the hash160 of the master public key. It is used to
|
|
332
|
+
identify the master key in BIP-86 derivation schemes.
|
|
333
|
+
*/
|
|
334
|
+
bytes master_fingerprint = 2;
|
|
335
|
+
|
|
336
|
+
/*
|
|
337
|
+
This field specifies the extended BIP-86 derivation path used to derive a
|
|
338
|
+
child key from the XPub. Starting from the base path of the XPub
|
|
339
|
+
(e.g., m/86'/0'/0'), this path must contain exactly 5 components in total
|
|
340
|
+
(e.g., m/86'/0'/0'/0/0), with the additional components defining specific
|
|
341
|
+
child keys, such as individual addresses.
|
|
342
|
+
*/
|
|
343
|
+
string derivation_path = 3;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
message GroupKeyRequest {
|
|
347
|
+
/*
|
|
348
|
+
The internal key for the asset group before any tweaks have been applied.
|
|
349
|
+
If this field is set then external_key must be empty, and vice versa.
|
|
350
|
+
*/
|
|
351
|
+
KeyDescriptor raw_key = 1;
|
|
352
|
+
|
|
353
|
+
/*
|
|
354
|
+
The genesis of the group anchor asset, which is used to derive the single
|
|
355
|
+
tweak for the group key. For a new group key, this will be the genesis of
|
|
356
|
+
new_asset.
|
|
357
|
+
*/
|
|
358
|
+
GenesisInfo anchor_genesis = 2;
|
|
359
|
+
|
|
360
|
+
/*
|
|
361
|
+
The optional root of a tapscript tree that will be used when constructing a
|
|
362
|
+
new asset group key. This enables future issuance authorized with a script
|
|
363
|
+
witness.
|
|
364
|
+
*/
|
|
365
|
+
bytes tapscript_root = 3;
|
|
366
|
+
|
|
367
|
+
/*
|
|
368
|
+
The serialized asset which we are requesting group membership for. A
|
|
369
|
+
successful request will produce a witness that authorizes this asset to be a
|
|
370
|
+
member of this asset group.
|
|
371
|
+
*/
|
|
372
|
+
bytes new_asset = 4;
|
|
373
|
+
|
|
374
|
+
/*
|
|
375
|
+
The external key is an optional field that allows specifying an
|
|
376
|
+
external signing key for the group virtual transaction during minting.
|
|
377
|
+
This key enables signing operations to be performed externally, outside
|
|
378
|
+
the daemon.
|
|
379
|
+
|
|
380
|
+
If this field is set then raw_key must be empty, and vice versa.
|
|
381
|
+
*/
|
|
382
|
+
ExternalKey external_key = 5;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
message TxOut {
|
|
386
|
+
// The value of the output being spent.
|
|
387
|
+
int64 value = 1;
|
|
388
|
+
|
|
389
|
+
// The script of the output being spent.
|
|
390
|
+
bytes pk_script = 2;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
message GroupVirtualTx {
|
|
394
|
+
/*
|
|
395
|
+
The virtual transaction that represents the genesis state transition of a
|
|
396
|
+
grouped asset.
|
|
397
|
+
*/
|
|
398
|
+
bytes transaction = 1;
|
|
399
|
+
|
|
400
|
+
/*
|
|
401
|
+
The transaction output that represents a grouped asset. The tweaked
|
|
402
|
+
group key is set as the PkScript of this output. This is used in combination
|
|
403
|
+
with Tx to produce an asset group witness.
|
|
404
|
+
*/
|
|
405
|
+
TxOut prev_out = 2;
|
|
406
|
+
|
|
407
|
+
/*
|
|
408
|
+
The asset ID of the grouped asset in a GroupKeyRequest. This ID is
|
|
409
|
+
needed to construct a sign descriptor, as it is the single tweak for the
|
|
410
|
+
group internal key.
|
|
411
|
+
*/
|
|
412
|
+
bytes genesis_id = 3;
|
|
413
|
+
|
|
414
|
+
/*
|
|
415
|
+
The tweaked group key for a specific GroupKeyRequest. This is used to
|
|
416
|
+
construct a complete group key after producing an asset group witness.
|
|
417
|
+
*/
|
|
418
|
+
bytes tweaked_key = 4;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
message GroupWitness {
|
|
422
|
+
// The asset ID of the pending asset that should be assigned this asset
|
|
423
|
+
// group witness.
|
|
424
|
+
bytes genesis_id = 1;
|
|
425
|
+
|
|
426
|
+
// The serialized witness stack for the asset group.
|
|
427
|
+
repeated bytes witness = 2;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
message AssetGroup {
|
|
431
|
+
// The raw group key which is a normal public key.
|
|
432
|
+
bytes raw_group_key = 1;
|
|
433
|
+
|
|
434
|
+
/*
|
|
435
|
+
The tweaked group key, which is derived based on the genesis point and also
|
|
436
|
+
asset type.
|
|
437
|
+
*/
|
|
438
|
+
bytes tweaked_group_key = 2;
|
|
439
|
+
|
|
440
|
+
/*
|
|
441
|
+
A witness that authorizes a specific asset to be part of the asset group
|
|
442
|
+
specified by the above key.
|
|
443
|
+
*/
|
|
444
|
+
bytes asset_witness = 3;
|
|
445
|
+
|
|
446
|
+
/*
|
|
447
|
+
The root hash of a tapscript tree, which enables future issuance authorized
|
|
448
|
+
with a script witness.
|
|
449
|
+
*/
|
|
450
|
+
bytes tapscript_root = 4;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
message GroupKeyReveal {
|
|
454
|
+
// The raw group key which is a normal public key.
|
|
455
|
+
bytes raw_group_key = 1;
|
|
456
|
+
|
|
457
|
+
// The tapscript root included in the tweaked group key, which may be empty.
|
|
458
|
+
bytes tapscript_root = 2;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
message GenesisReveal {
|
|
462
|
+
// The base genesis information in the genesis reveal.
|
|
463
|
+
GenesisInfo genesis_base_reveal = 1;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
message DecimalDisplay {
|
|
467
|
+
/*
|
|
468
|
+
Decimal display dictates the number of decimal places to shift the amount to
|
|
469
|
+
the left converting from Taproot Asset integer representation to a
|
|
470
|
+
UX-recognizable fractional quantity.
|
|
471
|
+
|
|
472
|
+
For example, if the decimal_display value is 2 and there's 100 of those
|
|
473
|
+
assets, then a wallet would display the amount as "1.00". This field is
|
|
474
|
+
intended as information for wallets that display balances and has no impact
|
|
475
|
+
on the behavior of the daemon or any other part of the protocol. This value
|
|
476
|
+
is encoded in the MetaData field as a JSON field, therefore it is only
|
|
477
|
+
compatible with assets that have a JSON MetaData field.
|
|
478
|
+
*/
|
|
479
|
+
uint32 decimal_display = 1;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
enum AssetVersion {
|
|
483
|
+
// ASSET_VERSION_V0 is the default asset version. This version will include
|
|
484
|
+
// the witness vector in the leaf for a tap commitment.
|
|
485
|
+
ASSET_VERSION_V0 = 0;
|
|
486
|
+
|
|
487
|
+
// ASSET_VERSION_V1 is the asset version that leaves out the witness vector
|
|
488
|
+
// from the MS-SMT leaf encoding.
|
|
489
|
+
ASSET_VERSION_V1 = 1;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
message Asset {
|
|
493
|
+
// The version of the Taproot Asset.
|
|
494
|
+
AssetVersion version = 1;
|
|
495
|
+
|
|
496
|
+
// The base genesis information of an asset. This information never changes.
|
|
497
|
+
GenesisInfo asset_genesis = 2;
|
|
498
|
+
|
|
499
|
+
// The total amount of the asset stored in this Taproot Asset UTXO.
|
|
500
|
+
uint64 amount = 4;
|
|
501
|
+
|
|
502
|
+
// An optional locktime, as with Bitcoin transactions.
|
|
503
|
+
int32 lock_time = 5;
|
|
504
|
+
|
|
505
|
+
// An optional relative lock time, same as Bitcoin transactions.
|
|
506
|
+
int32 relative_lock_time = 6;
|
|
507
|
+
|
|
508
|
+
// The version of the script, only version 0 is defined at present.
|
|
509
|
+
int32 script_version = 7;
|
|
510
|
+
|
|
511
|
+
// The script key of the asset, which can be spent under Taproot semantics.
|
|
512
|
+
bytes script_key = 9;
|
|
513
|
+
|
|
514
|
+
// Indicates whether the script key is known to the wallet of the lnd node
|
|
515
|
+
// connected to the Taproot Asset daemon.
|
|
516
|
+
bool script_key_is_local = 10;
|
|
517
|
+
|
|
518
|
+
// The information related to the key group of an asset (if it exists).
|
|
519
|
+
AssetGroup asset_group = 11;
|
|
520
|
+
|
|
521
|
+
// Describes where in the chain the asset is currently anchored.
|
|
522
|
+
AnchorInfo chain_anchor = 12;
|
|
523
|
+
|
|
524
|
+
// The asset's previous witnesses, which either contain the spending
|
|
525
|
+
// witness stack (usually a signature) or the split commitment witness
|
|
526
|
+
// (which is used to prove the split commitment of a split asset).
|
|
527
|
+
repeated PrevWitness prev_witnesses = 13;
|
|
528
|
+
|
|
529
|
+
// Indicates whether the asset has been spent.
|
|
530
|
+
bool is_spent = 14;
|
|
531
|
+
|
|
532
|
+
// If the asset has been leased, this is the owner (application ID) of the
|
|
533
|
+
// lease.
|
|
534
|
+
bytes lease_owner = 15;
|
|
535
|
+
|
|
536
|
+
// If the asset has been leased, this is the expiry of the lease as a Unix
|
|
537
|
+
// timestamp in seconds.
|
|
538
|
+
int64 lease_expiry = 16;
|
|
539
|
+
|
|
540
|
+
// Indicates whether this transfer was an asset burn. If true, the number of
|
|
541
|
+
// assets in this output are destroyed and can no longer be spent.
|
|
542
|
+
bool is_burn = 17;
|
|
543
|
+
|
|
544
|
+
// Deprecated, use script_key_type instead!
|
|
545
|
+
// Indicates whether this script key has either been derived by the local
|
|
546
|
+
// wallet or was explicitly declared to be known by using the
|
|
547
|
+
// DeclareScriptKey RPC. Knowing the key conceptually means the key belongs
|
|
548
|
+
// to the local wallet or is at least known by a software that operates on
|
|
549
|
+
// the local wallet. The flag is never serialized in proofs, so this is
|
|
550
|
+
// never explicitly set for keys foreign to the local wallet. Therefore, if
|
|
551
|
+
// this method returns true for a script key, it means the asset with the
|
|
552
|
+
// script key will be shown in the wallet balance.
|
|
553
|
+
bool script_key_declared_known = 18;
|
|
554
|
+
|
|
555
|
+
// Deprecated, use script_key_type instead!
|
|
556
|
+
// Indicates whether the script key is known to have a Tapscript spend path,
|
|
557
|
+
// meaning that the Taproot merkle root tweak is not empty. This will only
|
|
558
|
+
// ever be true if either script_key_is_local or script_key_internals_known
|
|
559
|
+
// is true as well, since the presence of a Tapscript spend path cannot be
|
|
560
|
+
// determined for script keys that aren't known to the wallet of the local
|
|
561
|
+
// tapd node.
|
|
562
|
+
bool script_key_has_script_path = 19;
|
|
563
|
+
|
|
564
|
+
// This field defines a decimal display value that may be present. If this
|
|
565
|
+
// field is null, it means the presence of a decimal display field is
|
|
566
|
+
// unknown in the current context.
|
|
567
|
+
DecimalDisplay decimal_display = 20;
|
|
568
|
+
|
|
569
|
+
// The type of the script key. This type is either user-declared when custom
|
|
570
|
+
// script keys are added, or automatically determined by the daemon for
|
|
571
|
+
// standard operations (e.g. BIP-86 keys, burn keys, tombstone keys, channel
|
|
572
|
+
// related keys).
|
|
573
|
+
ScriptKeyType script_key_type = 21;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
message PrevWitness {
|
|
577
|
+
// The previous input asset that this witness is for.
|
|
578
|
+
PrevInputAsset prev_id = 1;
|
|
579
|
+
|
|
580
|
+
// The witness stack that is used to prove the asset owner's authorization
|
|
581
|
+
// to spend an asset. This is only set if the asset is the root asset of an
|
|
582
|
+
// asset split.
|
|
583
|
+
repeated bytes tx_witness = 2;
|
|
584
|
+
|
|
585
|
+
// The split commitment that is used to prove the split commitment of a
|
|
586
|
+
// split asset. This is only set if the asset is a split asset.
|
|
587
|
+
SplitCommitment split_commitment = 3;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
message SplitCommitment {
|
|
591
|
+
// The root asset that contains the transaction witness that authorizes the
|
|
592
|
+
// spend of the asset.
|
|
593
|
+
Asset root_asset = 1;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
message ListAssetResponse {
|
|
597
|
+
// The list of assets found in the database matching the request query
|
|
598
|
+
// parameters.
|
|
599
|
+
repeated Asset assets = 1;
|
|
600
|
+
|
|
601
|
+
// This is a count of unconfirmed outgoing transfers. Unconfirmed transfers
|
|
602
|
+
// do not appear as assets in this endpoint response.
|
|
603
|
+
uint64 unconfirmed_transfers = 2;
|
|
604
|
+
|
|
605
|
+
// This is a count of freshly minted assets that haven't been confirmed on
|
|
606
|
+
// chain yet. These assets will appear in the asset list with a block height
|
|
607
|
+
// of 0 if include_unconfirmed_mints is set to true in the request.
|
|
608
|
+
uint64 unconfirmed_mints = 3;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
message ListUtxosRequest {
|
|
612
|
+
// Whether to include UTXOs that are marked as leased (locked/reserved) by
|
|
613
|
+
// the wallet for a pending transfer. Leased UTXOs cannot be used by the
|
|
614
|
+
// wallet until the pending transfer is confirmed or the lease expires.
|
|
615
|
+
bool include_leased = 1;
|
|
616
|
+
|
|
617
|
+
// The script key type to filter the assets by. If not set, only assets with
|
|
618
|
+
// a BIP-0086 script key will be returned (which is the equivalent of
|
|
619
|
+
// setting script_key_type.explicit_type = SCRIPT_KEY_BIP86).
|
|
620
|
+
ScriptKeyTypeQuery script_key_type = 2;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
message ManagedUtxo {
|
|
624
|
+
// The outpoint of the UTXO.
|
|
625
|
+
string out_point = 1;
|
|
626
|
+
|
|
627
|
+
// The UTXO amount in satoshis.
|
|
628
|
+
int64 amt_sat = 2;
|
|
629
|
+
|
|
630
|
+
// The internal key used for the on-chain output.
|
|
631
|
+
bytes internal_key = 3;
|
|
632
|
+
|
|
633
|
+
// The Taproot Asset root commitment hash.
|
|
634
|
+
bytes taproot_asset_root = 4;
|
|
635
|
+
|
|
636
|
+
/*
|
|
637
|
+
The Taproot merkle root hash committed to by the outpoint of this UTXO.
|
|
638
|
+
If there is no Tapscript sibling, this is equal to the Taproot Asset root
|
|
639
|
+
commitment hash.
|
|
640
|
+
*/
|
|
641
|
+
bytes merkle_root = 5;
|
|
642
|
+
|
|
643
|
+
// The assets held at this UTXO.
|
|
644
|
+
repeated Asset assets = 6;
|
|
645
|
+
|
|
646
|
+
// The lease owner for this UTXO. If blank the UTXO isn't leased.
|
|
647
|
+
bytes lease_owner = 7;
|
|
648
|
+
|
|
649
|
+
// The expiry time as a unix time stamp for this lease. If blank the utxo
|
|
650
|
+
// isn't leased.
|
|
651
|
+
int64 lease_expiry_unix = 8;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
message ListUtxosResponse {
|
|
655
|
+
// The set of UTXOs managed by the daemon.
|
|
656
|
+
map<string, ManagedUtxo> managed_utxos = 1;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
message ListGroupsRequest {
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
message AssetHumanReadable {
|
|
663
|
+
// The ID of the asset.
|
|
664
|
+
bytes id = 1;
|
|
665
|
+
|
|
666
|
+
// The amount of the asset.
|
|
667
|
+
uint64 amount = 2;
|
|
668
|
+
|
|
669
|
+
// An optional locktime, as with Bitcoin transactions.
|
|
670
|
+
int32 lock_time = 3;
|
|
671
|
+
|
|
672
|
+
// An optional relative locktime, as with Bitcoin transactions.
|
|
673
|
+
int32 relative_lock_time = 4;
|
|
674
|
+
|
|
675
|
+
// The name of the asset.
|
|
676
|
+
string tag = 5;
|
|
677
|
+
|
|
678
|
+
// The metadata hash of the asset.
|
|
679
|
+
bytes meta_hash = 6;
|
|
680
|
+
|
|
681
|
+
// The type of the asset.
|
|
682
|
+
AssetType type = 7;
|
|
683
|
+
|
|
684
|
+
// The version of the asset.
|
|
685
|
+
AssetVersion version = 8;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
message GroupedAssets {
|
|
689
|
+
// A list of assets with the same group key.
|
|
690
|
+
repeated AssetHumanReadable assets = 1;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
message ListGroupsResponse {
|
|
694
|
+
// The set of assets with a group key.
|
|
695
|
+
map<string, GroupedAssets> groups = 1;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
message ListBalancesRequest {
|
|
699
|
+
oneof group_by {
|
|
700
|
+
// Group results by asset IDs.
|
|
701
|
+
bool asset_id = 1;
|
|
702
|
+
|
|
703
|
+
// Group results by group keys.
|
|
704
|
+
bool group_key = 2;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
// If the query results should grouped by asset ids, then an optional asset
|
|
708
|
+
// filter may be provided to query balance of a specific asset.
|
|
709
|
+
bytes asset_filter = 3;
|
|
710
|
+
|
|
711
|
+
// If the query results should be grouped by group keys, then an optional
|
|
712
|
+
// group key filter may be provided to query the balance of a specific
|
|
713
|
+
// asset group.
|
|
714
|
+
bytes group_key_filter = 4;
|
|
715
|
+
|
|
716
|
+
// An option to include previous leased assets in the balances.
|
|
717
|
+
bool include_leased = 5;
|
|
718
|
+
|
|
719
|
+
// The script key type to filter the assets by. If not set, only assets with
|
|
720
|
+
// a BIP-0086 script key will be returned (which is the equivalent of
|
|
721
|
+
// setting script_key_type.explicit_type = SCRIPT_KEY_BIP86). If the type
|
|
722
|
+
// is set to SCRIPT_KEY_BURN or SCRIPT_KEY_TOMBSTONE the include_spent flag
|
|
723
|
+
// will automatically be set to true, because assets of that type are always
|
|
724
|
+
// marked as spent.
|
|
725
|
+
ScriptKeyTypeQuery script_key_type = 6;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
message AssetBalance {
|
|
729
|
+
// The base genesis information of an asset. This information never changes.
|
|
730
|
+
GenesisInfo asset_genesis = 1;
|
|
731
|
+
|
|
732
|
+
// The balance of the asset owned by the target daemon.
|
|
733
|
+
uint64 balance = 3;
|
|
734
|
+
|
|
735
|
+
// The group key of the asset (if it belongs to a group).
|
|
736
|
+
bytes group_key = 4;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
message AssetGroupBalance {
|
|
740
|
+
// The group key or nil aggregating assets that don't have a group.
|
|
741
|
+
bytes group_key = 1;
|
|
742
|
+
|
|
743
|
+
// The total balance of the assets in the group.
|
|
744
|
+
uint64 balance = 2;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
message ListBalancesResponse {
|
|
748
|
+
// The map of asset balances, where the key is the asset ID and the value
|
|
749
|
+
// is the balance of that asset owned by the target daemon. This is only
|
|
750
|
+
// set if group_by.asset_id is true in the request.
|
|
751
|
+
map<string, AssetBalance> asset_balances = 1;
|
|
752
|
+
|
|
753
|
+
// The map of asset group balances, where the key is the group key
|
|
754
|
+
// and the value is the balance of that group owned by the target daemon.
|
|
755
|
+
// This is only set if group_by.group_key is true in the request.
|
|
756
|
+
map<string, AssetGroupBalance> asset_group_balances = 2;
|
|
757
|
+
|
|
758
|
+
// This is a count of unconfirmed outgoing transfers. Unconfirmed transfers
|
|
759
|
+
// (and the change resulting from them) do not appear in the balance. The
|
|
760
|
+
// balance only represents confirmed assets that are owned by the daemon.
|
|
761
|
+
uint64 unconfirmed_transfers = 3;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
message ListTransfersRequest {
|
|
765
|
+
// anchor_txid specifies the hexadecimal encoded txid string of the anchor
|
|
766
|
+
// transaction for which to retrieve transfers. An empty value indicates
|
|
767
|
+
// that this parameter should be disregarded in transfer selection.
|
|
768
|
+
string anchor_txid = 1;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
message ListTransfersResponse {
|
|
772
|
+
// The unordered list of outgoing asset transfers.
|
|
773
|
+
repeated AssetTransfer transfers = 1;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
// ChainHash represents a hash value, typically a double SHA-256 of some data.
|
|
777
|
+
// Common examples include block hashes and transaction hashes.
|
|
778
|
+
//
|
|
779
|
+
// This versatile message type is used in various Bitcoin-related messages and
|
|
780
|
+
// structures, providing two different formats of the same hash to accommodate
|
|
781
|
+
// both developer and user needs.
|
|
782
|
+
message ChainHash {
|
|
783
|
+
// The raw hash value in byte format.
|
|
784
|
+
//
|
|
785
|
+
// This format is optimized for programmatic use, particularly for Go
|
|
786
|
+
// developers, enabling easy integration with other RPC calls or binary
|
|
787
|
+
// operations.
|
|
788
|
+
bytes hash = 1;
|
|
789
|
+
|
|
790
|
+
// The byte-reversed hash value as a hexadecimal string.
|
|
791
|
+
//
|
|
792
|
+
// This format is intended for human interaction, making it easy to copy,
|
|
793
|
+
// paste, and use in contexts like command-line arguments or configuration
|
|
794
|
+
// files.
|
|
795
|
+
string hash_str = 2;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
message AssetTransfer {
|
|
799
|
+
// The timestamp of the transfer in UTC Unix time seconds.
|
|
800
|
+
int64 transfer_timestamp = 1;
|
|
801
|
+
|
|
802
|
+
// The new transaction that commits to the set of Taproot Assets found at
|
|
803
|
+
// the above new anchor point. Note that this is in raw byte format, not
|
|
804
|
+
// the reversed hex string format that is used for displayed txids. When
|
|
805
|
+
// listing assets on the CLI we purposefully use the display format so it
|
|
806
|
+
// is easier to copy and paste into other tools.
|
|
807
|
+
bytes anchor_tx_hash = 2;
|
|
808
|
+
|
|
809
|
+
// The height hint of the anchor transaction. This is the height at which
|
|
810
|
+
// the anchor transaction was published, so the actual inclusion height
|
|
811
|
+
// will be greater than this value.
|
|
812
|
+
uint32 anchor_tx_height_hint = 3;
|
|
813
|
+
|
|
814
|
+
// The total fees paid by the anchor transaction in satoshis.
|
|
815
|
+
int64 anchor_tx_chain_fees = 4;
|
|
816
|
+
|
|
817
|
+
// Describes the set of spent assets.
|
|
818
|
+
repeated TransferInput inputs = 5;
|
|
819
|
+
|
|
820
|
+
// Describes the set of newly created asset outputs.
|
|
821
|
+
repeated TransferOutput outputs = 6;
|
|
822
|
+
|
|
823
|
+
// The block hash of the blockchain block that contains the anchor
|
|
824
|
+
// transaction. If this value is unset, the anchor transaction is
|
|
825
|
+
// unconfirmed.
|
|
826
|
+
ChainHash anchor_tx_block_hash = 7;
|
|
827
|
+
|
|
828
|
+
// The block height of the blockchain block that contains the anchor
|
|
829
|
+
// transaction. If the anchor transaction is still unconfirmed, this value
|
|
830
|
+
// will be 0.
|
|
831
|
+
uint32 anchor_tx_block_height = 8;
|
|
832
|
+
|
|
833
|
+
// An optional short label for the transfer. This label can be used to track
|
|
834
|
+
// the progress of the transfer via the logs or an event subscription.
|
|
835
|
+
// Multiple transfers can share the same label.
|
|
836
|
+
string label = 9;
|
|
837
|
+
|
|
838
|
+
// The L1 transaction that anchors the Taproot Asset commitment where the
|
|
839
|
+
// asset resides.
|
|
840
|
+
bytes anchor_tx = 10;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
message TransferInput {
|
|
844
|
+
// The old/current location of the Taproot Asset commitment that was spent
|
|
845
|
+
// as an input.
|
|
846
|
+
string anchor_point = 1;
|
|
847
|
+
|
|
848
|
+
// The ID of the asset that was spent.
|
|
849
|
+
bytes asset_id = 2;
|
|
850
|
+
|
|
851
|
+
// The script key of the asset that was spent.
|
|
852
|
+
bytes script_key = 3;
|
|
853
|
+
|
|
854
|
+
// The amount of the asset that was spent.
|
|
855
|
+
uint64 amount = 4;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
message TransferOutputAnchor {
|
|
859
|
+
// The new location of the Taproot Asset commitment that was created on
|
|
860
|
+
// chain.
|
|
861
|
+
string outpoint = 1;
|
|
862
|
+
|
|
863
|
+
// The anchor transaction output's value in satoshis.
|
|
864
|
+
int64 value = 2;
|
|
865
|
+
|
|
866
|
+
// The anchor transaction output's internal key, which is the Taproot
|
|
867
|
+
// internal key of the on-chain output.
|
|
868
|
+
bytes internal_key = 3;
|
|
869
|
+
|
|
870
|
+
// The Taproot Asset root commitment hash, which is the root of the
|
|
871
|
+
// Taproot Asset commitment tree for the asset that was created.
|
|
872
|
+
bytes taproot_asset_root = 4;
|
|
873
|
+
|
|
874
|
+
// The Taproot merkle root hash committed to by the outpoint of this
|
|
875
|
+
// output. If there is no Tapscript sibling, this is equal to the Taproot
|
|
876
|
+
// Asset root commitment hash.
|
|
877
|
+
// If there is a Tapscript sibling, this is the tap branch root hash of the
|
|
878
|
+
// Taproot Asset root hash and the tapscript sibling.
|
|
879
|
+
bytes merkle_root = 5;
|
|
880
|
+
|
|
881
|
+
// The serialized preimage of a Tapscript sibling, if there was one. If this
|
|
882
|
+
// is empty, then the merkle_root hash is equal to the Taproot root hash
|
|
883
|
+
// of the anchor output.
|
|
884
|
+
bytes tapscript_sibling = 6;
|
|
885
|
+
|
|
886
|
+
// The number of passive assets that were committed to this output.
|
|
887
|
+
// Passive assets are assets that are not actively spent, but are instead
|
|
888
|
+
// passively carried along with the main asset and re-anchored in the
|
|
889
|
+
// anchor output.
|
|
890
|
+
uint32 num_passive_assets = 7;
|
|
891
|
+
|
|
892
|
+
// The actual output's script, which is the P2TR script for the final
|
|
893
|
+
// Taproot output key created by this transfer output.
|
|
894
|
+
bytes pk_script = 8;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
enum OutputType {
|
|
898
|
+
// OUTPUT_TYPE_SIMPLE is a plain full-value or split output that is not a
|
|
899
|
+
// split root and does not carry passive assets. In case of a split, the
|
|
900
|
+
// asset of this output has a split commitment.
|
|
901
|
+
OUTPUT_TYPE_SIMPLE = 0;
|
|
902
|
+
|
|
903
|
+
// OUTPUT_TYPE_SPLIT_ROOT is a split root output that carries the change
|
|
904
|
+
// from a split or a tombstone from a non-interactive full value send
|
|
905
|
+
// output. In either case, the asset of this output has a tx witness.
|
|
906
|
+
OUTPUT_TYPE_SPLIT_ROOT = 1;
|
|
907
|
+
|
|
908
|
+
reserved 2;
|
|
909
|
+
|
|
910
|
+
reserved 3;
|
|
911
|
+
|
|
912
|
+
reserved 4;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
// ProofDeliveryStatus is an enum that describes the status of the delivery of
|
|
916
|
+
// a proof associated with an asset transfer output.
|
|
917
|
+
enum ProofDeliveryStatus {
|
|
918
|
+
// Delivery is not applicable; the proof will not be delivered.
|
|
919
|
+
PROOF_DELIVERY_STATUS_NOT_APPLICABLE = 0;
|
|
920
|
+
|
|
921
|
+
// The proof has been successfully delivered.
|
|
922
|
+
PROOF_DELIVERY_STATUS_COMPLETE = 1;
|
|
923
|
+
|
|
924
|
+
// The proof is pending delivery. This status indicates that the proof has
|
|
925
|
+
// not yet been delivered successfully. One or more attempts at proof
|
|
926
|
+
// delivery may have been made.
|
|
927
|
+
PROOF_DELIVERY_STATUS_PENDING = 2;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
message TransferOutput {
|
|
931
|
+
// The transfer output's on-chain anchor information, which contains the
|
|
932
|
+
// BTC-level output information that anchors the Taproot Asset commitment
|
|
933
|
+
// for this output.
|
|
934
|
+
TransferOutputAnchor anchor = 1;
|
|
935
|
+
|
|
936
|
+
// The script key of the asset that was created.
|
|
937
|
+
bytes script_key = 2;
|
|
938
|
+
|
|
939
|
+
// Indicates whether the script key is known to the wallet of the lnd node
|
|
940
|
+
// connected to the Taproot Asset daemon. If true, the asset will be shown
|
|
941
|
+
// in the wallet balance.
|
|
942
|
+
bool script_key_is_local = 3;
|
|
943
|
+
|
|
944
|
+
// The amount of the asset that was created in this output.
|
|
945
|
+
uint64 amount = 4;
|
|
946
|
+
|
|
947
|
+
// The new individual transition proof (not a full proof file) that proves
|
|
948
|
+
// the inclusion of the new asset within the new AnchorTx.
|
|
949
|
+
bytes new_proof_blob = 5;
|
|
950
|
+
|
|
951
|
+
// The split commitment root hash of the asset that was created in this
|
|
952
|
+
// output. This is only set if the asset is a split root output, meaning
|
|
953
|
+
// that the asset is a split root output that carries the change from a
|
|
954
|
+
// split or a tombstone from a non-interactive full value send output.
|
|
955
|
+
bytes split_commit_root_hash = 6;
|
|
956
|
+
|
|
957
|
+
// The type of the output. This is used to distinguish between a simple
|
|
958
|
+
// output that is not a split root and does not carry passive assets, and a
|
|
959
|
+
// split root output that carries the change from a split or a tombstone
|
|
960
|
+
// from a non-interactive full value send output.
|
|
961
|
+
OutputType output_type = 7;
|
|
962
|
+
|
|
963
|
+
// The asset version of the output. This is used to determine how the asset
|
|
964
|
+
// is encoded in the Taproot Asset commitment tree.
|
|
965
|
+
AssetVersion asset_version = 8;
|
|
966
|
+
|
|
967
|
+
// The lock time of the output, which is an optional field that can be set
|
|
968
|
+
// to delay the spending of the output until a certain time in the future.
|
|
969
|
+
uint64 lock_time = 9;
|
|
970
|
+
|
|
971
|
+
// The relative lock time of the output, which is an optional field that
|
|
972
|
+
// can be set to delay the spending of the output relative to the block
|
|
973
|
+
// height at which the output is confirmed.
|
|
974
|
+
uint64 relative_lock_time = 10;
|
|
975
|
+
|
|
976
|
+
// The delivery status of the proof associated with this output.
|
|
977
|
+
ProofDeliveryStatus proof_delivery_status = 11;
|
|
978
|
+
|
|
979
|
+
// The asset ID of the asset that was created in this output.
|
|
980
|
+
bytes asset_id = 12;
|
|
981
|
+
|
|
982
|
+
// The proof courier address that was used to deliver the proof for this
|
|
983
|
+
// output.
|
|
984
|
+
string proof_courier_addr = 13;
|
|
985
|
+
|
|
986
|
+
// The Taproot Asset address that was used to create the output. This is
|
|
987
|
+
// only set for new outputs for tapd versions that support the address V2
|
|
988
|
+
// format. For older versions, this field will be empty.
|
|
989
|
+
string tap_addr = 14;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
message StopRequest {
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
message StopResponse {
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
message DebugLevelRequest {
|
|
999
|
+
// If true, all the valid debug sub-systems will be returned.
|
|
1000
|
+
bool show = 1;
|
|
1001
|
+
|
|
1002
|
+
// If set, the debug level for the sub-system will be set to this value.
|
|
1003
|
+
// Can be one of: "trace", "debug", "info", "warn", "error", "critical",
|
|
1004
|
+
// "off", to set a global level, optionally followed by a comma-separated
|
|
1005
|
+
// list of sub-systems to set the level for. For example:
|
|
1006
|
+
// "debug,TADB=info,UNIV=warn".
|
|
1007
|
+
string level_spec = 2;
|
|
1008
|
+
}
|
|
1009
|
+
message DebugLevelResponse {
|
|
1010
|
+
// The list of available logging sub-systems that can be set to a specific
|
|
1011
|
+
// debug level.
|
|
1012
|
+
string sub_systems = 1;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
enum AddrVersion {
|
|
1016
|
+
// ADDR_VERSION_UNSPECIFIED is the default value for an address version in
|
|
1017
|
+
// an RPC message. It is unmarshalled to the latest address version.
|
|
1018
|
+
ADDR_VERSION_UNSPECIFIED = 0;
|
|
1019
|
+
|
|
1020
|
+
// ADDR_VERSION_V0 is the initial address version.
|
|
1021
|
+
ADDR_VERSION_V0 = 1;
|
|
1022
|
+
|
|
1023
|
+
// ADDR_VERSION_V1 is the address version that uses V2 Taproot Asset
|
|
1024
|
+
// commitments.
|
|
1025
|
+
ADDR_VERSION_V1 = 2;
|
|
1026
|
+
|
|
1027
|
+
// ADDR_VERSION_V2 is the address version that supports sending grouped
|
|
1028
|
+
// assets and require the new auth mailbox proof courier address format.
|
|
1029
|
+
ADDR_VERSION_V2 = 3;
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
message Addr {
|
|
1033
|
+
// The bech32 encoded Taproot Asset address.
|
|
1034
|
+
string encoded = 1;
|
|
1035
|
+
|
|
1036
|
+
// The asset ID that uniquely identifies the asset. This can be all zeroes
|
|
1037
|
+
// for V2 addresses that have a group key set.
|
|
1038
|
+
bytes asset_id = 2;
|
|
1039
|
+
|
|
1040
|
+
// The type of the asset.
|
|
1041
|
+
AssetType asset_type = 3;
|
|
1042
|
+
|
|
1043
|
+
// The total amount of the asset stored in this Taproot Asset UTXO. The
|
|
1044
|
+
// amount is allowed to be unset for V2 addresses, where the sender will
|
|
1045
|
+
// post a fragment containing the asset IDs and amounts to the proof
|
|
1046
|
+
// courier's auth mailbox.
|
|
1047
|
+
uint64 amount = 4;
|
|
1048
|
+
|
|
1049
|
+
// The group key of the asset group to receive assets for. If this field
|
|
1050
|
+
// is set, then any asset of the group can be sent to this address. Can only
|
|
1051
|
+
// be specified for V2 addresses. If this field is set, the asset_id
|
|
1052
|
+
// field must be empty.
|
|
1053
|
+
bytes group_key = 5;
|
|
1054
|
+
|
|
1055
|
+
/*
|
|
1056
|
+
The specific script key the asset must commit to in order to transfer
|
|
1057
|
+
ownership to the creator of the address.
|
|
1058
|
+
*/
|
|
1059
|
+
bytes script_key = 6;
|
|
1060
|
+
|
|
1061
|
+
// The internal key used for the on-chain output.
|
|
1062
|
+
bytes internal_key = 7;
|
|
1063
|
+
|
|
1064
|
+
/*
|
|
1065
|
+
The optional serialized tapscript sibling preimage to use for the receiving
|
|
1066
|
+
asset. This is usually empty as it is only needed when there should be an
|
|
1067
|
+
additional script path in the Taproot tree alongside the Taproot Asset
|
|
1068
|
+
commitment of the asset.
|
|
1069
|
+
*/
|
|
1070
|
+
bytes tapscript_sibling = 8;
|
|
1071
|
+
|
|
1072
|
+
/*
|
|
1073
|
+
The tweaked internal key that commits to the asset and represents the
|
|
1074
|
+
on-chain output key the Bitcoin transaction must send to in order to
|
|
1075
|
+
transfer assets described in this address.
|
|
1076
|
+
*/
|
|
1077
|
+
bytes taproot_output_key = 9;
|
|
1078
|
+
|
|
1079
|
+
// The address of the proof courier service used in proof transfer. For V2
|
|
1080
|
+
// addresses the proof courier address is mandatory and must be a valid auth
|
|
1081
|
+
// mailbox address (authmailbox+universerpc://host:port).
|
|
1082
|
+
string proof_courier_addr = 10;
|
|
1083
|
+
|
|
1084
|
+
// The asset version of the address.
|
|
1085
|
+
AssetVersion asset_version = 11;
|
|
1086
|
+
|
|
1087
|
+
// The version of the address.
|
|
1088
|
+
AddrVersion address_version = 12;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
message QueryAddrRequest {
|
|
1092
|
+
/*
|
|
1093
|
+
If set, then only addresses created after this Unix timestamp will be
|
|
1094
|
+
returned.
|
|
1095
|
+
*/
|
|
1096
|
+
int64 created_after = 1;
|
|
1097
|
+
|
|
1098
|
+
/*
|
|
1099
|
+
If set, then only addresses created before this Unix timestamp will be
|
|
1100
|
+
returned.
|
|
1101
|
+
*/
|
|
1102
|
+
int64 created_before = 2;
|
|
1103
|
+
|
|
1104
|
+
// The max number of addresses that should be returned.
|
|
1105
|
+
int32 limit = 3;
|
|
1106
|
+
|
|
1107
|
+
// The offset from the addresses that should be returned.
|
|
1108
|
+
int32 offset = 4;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
message QueryAddrResponse {
|
|
1112
|
+
// The list of addresses that match the query parameters.
|
|
1113
|
+
repeated Addr addrs = 1;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
message NewAddrRequest {
|
|
1117
|
+
/*
|
|
1118
|
+
The asset ID to create the address for. This is required for V0 and V1
|
|
1119
|
+
addresses. For V2 addresses, this field is optional and must be empty if the
|
|
1120
|
+
group key is set.
|
|
1121
|
+
*/
|
|
1122
|
+
bytes asset_id = 1;
|
|
1123
|
+
|
|
1124
|
+
/*
|
|
1125
|
+
The number of asset units to be sent to the address. This is required for V0
|
|
1126
|
+
and V1 addresses. For V2 addresses, this field is optional and can be left
|
|
1127
|
+
at 0 to indicate that the sender can choose the amount of assets to send.
|
|
1128
|
+
*/
|
|
1129
|
+
uint64 amt = 2;
|
|
1130
|
+
|
|
1131
|
+
/*
|
|
1132
|
+
The optional script key that the receiving asset should be locked to. If no
|
|
1133
|
+
script key is provided, a normal BIP-86 key will be derived from the
|
|
1134
|
+
underlying wallet.
|
|
1135
|
+
|
|
1136
|
+
NOTE: The script_key and internal_key fields should either both be set or
|
|
1137
|
+
both be empty.
|
|
1138
|
+
*/
|
|
1139
|
+
ScriptKey script_key = 3;
|
|
1140
|
+
|
|
1141
|
+
/*
|
|
1142
|
+
The optional internal key of the receiving BTC level transaction output on
|
|
1143
|
+
which the receiving asset transfers will be committed to. If no internal key
|
|
1144
|
+
is provided, a key will be derived from the underlying wallet.
|
|
1145
|
+
|
|
1146
|
+
NOTE: The script_key and internal_key fields should either both be set or
|
|
1147
|
+
both be empty.
|
|
1148
|
+
*/
|
|
1149
|
+
KeyDescriptor internal_key = 4;
|
|
1150
|
+
|
|
1151
|
+
/*
|
|
1152
|
+
The optional serialized tapscript sibling preimage to use for the receiving
|
|
1153
|
+
asset. This is usually empty as it is only needed when there should be an
|
|
1154
|
+
additional script path in the Taproot tree alongside the Taproot Asset
|
|
1155
|
+
commitment of the asset.
|
|
1156
|
+
*/
|
|
1157
|
+
bytes tapscript_sibling = 5;
|
|
1158
|
+
|
|
1159
|
+
/*
|
|
1160
|
+
An optional proof courier address for use in proof transfer. If unspecified,
|
|
1161
|
+
the daemon configured default address will be used.
|
|
1162
|
+
*/
|
|
1163
|
+
string proof_courier_addr = 6;
|
|
1164
|
+
|
|
1165
|
+
/*
|
|
1166
|
+
The asset version to use when sending/receiving to/from this address.
|
|
1167
|
+
*/
|
|
1168
|
+
AssetVersion asset_version = 7;
|
|
1169
|
+
|
|
1170
|
+
/*
|
|
1171
|
+
The version of this address.
|
|
1172
|
+
*/
|
|
1173
|
+
AddrVersion address_version = 8;
|
|
1174
|
+
|
|
1175
|
+
/*
|
|
1176
|
+
The group key to receive assets for. This can only be specified for V2
|
|
1177
|
+
addresses. If this field is set, the asset_id field must be empty.
|
|
1178
|
+
*/
|
|
1179
|
+
bytes group_key = 9;
|
|
1180
|
+
|
|
1181
|
+
/*
|
|
1182
|
+
If set, the daemon skips the connectivity check to the proof courier service
|
|
1183
|
+
when creating an address. Connection checks currently apply only to certain
|
|
1184
|
+
address schemes. Use this to create addresses while offline.
|
|
1185
|
+
*/
|
|
1186
|
+
bool skip_proof_courier_conn_check = 10;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
enum ScriptKeyType {
|
|
1190
|
+
/*
|
|
1191
|
+
The type of script key is not known. This should only be stored for assets
|
|
1192
|
+
where we don't know the internal key of the script key (e.g. for imported
|
|
1193
|
+
proofs).
|
|
1194
|
+
*/
|
|
1195
|
+
SCRIPT_KEY_UNKNOWN = 0;
|
|
1196
|
+
|
|
1197
|
+
/*
|
|
1198
|
+
The script key is a normal BIP-86 key. This means that the internal key is
|
|
1199
|
+
turned into a Taproot output key by applying a BIP-86 tweak to it.
|
|
1200
|
+
*/
|
|
1201
|
+
SCRIPT_KEY_BIP86 = 1;
|
|
1202
|
+
|
|
1203
|
+
/*
|
|
1204
|
+
The script key is a key that contains a script path that is defined by the
|
|
1205
|
+
user and is therefore external to the tapd wallet. Spending this key
|
|
1206
|
+
requires providing a specific witness and must be signed through the vPSBT
|
|
1207
|
+
signing flow.
|
|
1208
|
+
*/
|
|
1209
|
+
SCRIPT_KEY_SCRIPT_PATH_EXTERNAL = 2;
|
|
1210
|
+
|
|
1211
|
+
/*
|
|
1212
|
+
The script key is a specific un-spendable key that indicates a burnt asset.
|
|
1213
|
+
Assets with this key type can never be spent again, as a burn key is a
|
|
1214
|
+
tweaked NUMS key that nobody knows the private key for.
|
|
1215
|
+
*/
|
|
1216
|
+
SCRIPT_KEY_BURN = 3;
|
|
1217
|
+
|
|
1218
|
+
/*
|
|
1219
|
+
The script key is a specific un-spendable key that indicates a tombstone
|
|
1220
|
+
output. This is only the case for zero-value assets that result from a
|
|
1221
|
+
non-interactive (TAP address) send where no change was left over.
|
|
1222
|
+
*/
|
|
1223
|
+
SCRIPT_KEY_TOMBSTONE = 4;
|
|
1224
|
+
|
|
1225
|
+
/*
|
|
1226
|
+
The script key is used for an asset that resides within a Taproot Asset
|
|
1227
|
+
Channel. That means the script key is either a funding key (OP_TRUE), a
|
|
1228
|
+
commitment output key (to_local, to_remote, htlc), or a HTLC second-level
|
|
1229
|
+
transaction output key. Keys related to channels are not shown in asset
|
|
1230
|
+
balances (unless specifically requested) and are never used for coin
|
|
1231
|
+
selection.
|
|
1232
|
+
*/
|
|
1233
|
+
SCRIPT_KEY_CHANNEL = 5;
|
|
1234
|
+
|
|
1235
|
+
/*
|
|
1236
|
+
The script key is derived using the asset ID and a single leaf that contains
|
|
1237
|
+
an un-spendable Pedersen commitment key
|
|
1238
|
+
`(OP_CHECKSIG <NUMS_key + asset_id * G>)`. This can be used to create
|
|
1239
|
+
unique script keys for each virtual packet in the fragment, to avoid proof
|
|
1240
|
+
collisions in the universe, where the script keys should be spendable by
|
|
1241
|
+
a hardware wallet that only supports miniscript policies for signing P2TR
|
|
1242
|
+
outputs.
|
|
1243
|
+
*/
|
|
1244
|
+
SCRIPT_KEY_UNIQUE_PEDERSEN = 6;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
message ScriptKeyTypeQuery {
|
|
1248
|
+
oneof type {
|
|
1249
|
+
// Query for assets of a specific script key type.
|
|
1250
|
+
ScriptKeyType explicit_type = 1;
|
|
1251
|
+
|
|
1252
|
+
// Query for assets with all script key types.
|
|
1253
|
+
bool all_types = 2;
|
|
1254
|
+
|
|
1255
|
+
// TODO(guggero): Add a bit field that allows querying for multiple
|
|
1256
|
+
// script key types at once. Need a way to do a WHERE ... IN () type SQL
|
|
1257
|
+
// query that is compatible with all backends first though.
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
message ScriptKey {
|
|
1262
|
+
/*
|
|
1263
|
+
The full Taproot output key the asset is locked to. This is either a BIP-86
|
|
1264
|
+
key if the tap_tweak below is empty, or a key with the tap tweak applied to
|
|
1265
|
+
it.
|
|
1266
|
+
*/
|
|
1267
|
+
bytes pub_key = 1;
|
|
1268
|
+
|
|
1269
|
+
/*
|
|
1270
|
+
The key descriptor describing the internal key of the above Taproot key.
|
|
1271
|
+
*/
|
|
1272
|
+
KeyDescriptor key_desc = 2;
|
|
1273
|
+
|
|
1274
|
+
/*
|
|
1275
|
+
The optional Taproot tweak to apply to the above internal key. If this is
|
|
1276
|
+
empty then a BIP-86 style tweak is applied to the internal key.
|
|
1277
|
+
*/
|
|
1278
|
+
bytes tap_tweak = 3;
|
|
1279
|
+
|
|
1280
|
+
/*
|
|
1281
|
+
The type of the script key. This type is either user-declared when custom
|
|
1282
|
+
script keys are added, or automatically determined by the daemon for
|
|
1283
|
+
standard operations (e.g. BIP-86 keys, burn keys, tombstone keys, channel
|
|
1284
|
+
related keys).
|
|
1285
|
+
*/
|
|
1286
|
+
ScriptKeyType type = 4;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
message KeyLocator {
|
|
1290
|
+
/*
|
|
1291
|
+
The family of key being identified.
|
|
1292
|
+
*/
|
|
1293
|
+
int32 key_family = 1;
|
|
1294
|
+
|
|
1295
|
+
/*
|
|
1296
|
+
The precise index of the key being identified.
|
|
1297
|
+
*/
|
|
1298
|
+
int32 key_index = 2;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
message KeyDescriptor {
|
|
1302
|
+
/*
|
|
1303
|
+
The raw bytes of the key being identified.
|
|
1304
|
+
*/
|
|
1305
|
+
bytes raw_key_bytes = 1;
|
|
1306
|
+
|
|
1307
|
+
/*
|
|
1308
|
+
The key locator that identifies which key to use for signing.
|
|
1309
|
+
*/
|
|
1310
|
+
KeyLocator key_loc = 2;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
message TapscriptFullTree {
|
|
1314
|
+
/*
|
|
1315
|
+
The complete, ordered list of all tap leaves of the tree.
|
|
1316
|
+
*/
|
|
1317
|
+
repeated TapLeaf all_leaves = 1;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
message TapLeaf {
|
|
1321
|
+
// The script of the tap leaf.
|
|
1322
|
+
bytes script = 2;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
message TapBranch {
|
|
1326
|
+
// The TapHash of the left child of the root hash of a Tapscript tree.
|
|
1327
|
+
bytes left_taphash = 1;
|
|
1328
|
+
|
|
1329
|
+
// The TapHash of the right child of the root hash of a Tapscript tree.
|
|
1330
|
+
bytes right_taphash = 2;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
message DecodeAddrRequest {
|
|
1334
|
+
// The bech32 encoded Taproot Asset address to decode.
|
|
1335
|
+
string addr = 1;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
message ProofFile {
|
|
1339
|
+
// The raw proof file encoded as bytes. Must be a file and not just an
|
|
1340
|
+
// individual mint/transfer proof.
|
|
1341
|
+
bytes raw_proof_file = 1;
|
|
1342
|
+
|
|
1343
|
+
// The genesis point of the proof file, which is the asset's genesis
|
|
1344
|
+
// transaction outpoint.
|
|
1345
|
+
string genesis_point = 2;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
message DecodedProof {
|
|
1349
|
+
// The index depth of the decoded proof, with 0 being the latest proof.
|
|
1350
|
+
uint32 proof_at_depth = 1;
|
|
1351
|
+
|
|
1352
|
+
// The total number of proofs contained in the decoded proof file (this will
|
|
1353
|
+
// always be 1 if a single mint/transition proof was given as the raw_proof
|
|
1354
|
+
// instead of a file).
|
|
1355
|
+
uint32 number_of_proofs = 2;
|
|
1356
|
+
|
|
1357
|
+
// The asset referenced in the proof.
|
|
1358
|
+
Asset asset = 3;
|
|
1359
|
+
|
|
1360
|
+
// The reveal meta data associated with the proof, if available.
|
|
1361
|
+
AssetMeta meta_reveal = 4;
|
|
1362
|
+
|
|
1363
|
+
// The merkle proof for AnchorTx used to prove its
|
|
1364
|
+
// inclusion within BlockHeader.
|
|
1365
|
+
bytes tx_merkle_proof = 5;
|
|
1366
|
+
|
|
1367
|
+
// The TaprootProof proving the new inclusion of the
|
|
1368
|
+
// resulting asset within AnchorTx.
|
|
1369
|
+
bytes inclusion_proof = 6;
|
|
1370
|
+
|
|
1371
|
+
// The set of TaprootProofs proving the exclusion of
|
|
1372
|
+
// the resulting asset from all other Taproot outputs within AnchorTx.
|
|
1373
|
+
repeated bytes exclusion_proofs = 7;
|
|
1374
|
+
|
|
1375
|
+
// An optional TaprootProof needed if this asset is
|
|
1376
|
+
// the result of a split. SplitRootProof proves inclusion of the root
|
|
1377
|
+
// asset of the split.
|
|
1378
|
+
bytes split_root_proof = 8;
|
|
1379
|
+
|
|
1380
|
+
// The number of additional nested full proofs for any inputs found within
|
|
1381
|
+
// the resulting asset.
|
|
1382
|
+
uint32 num_additional_inputs = 9;
|
|
1383
|
+
|
|
1384
|
+
// ChallengeWitness is an optional virtual transaction witness that serves
|
|
1385
|
+
// as an ownership proof for the asset. If this is non-nil, then it is a
|
|
1386
|
+
// valid transfer witness for a 1-input, 1-output virtual transaction that
|
|
1387
|
+
// spends the asset in this proof and sends it to the NUMS key, to prove
|
|
1388
|
+
// that the creator of the proof is able to produce a valid signature to
|
|
1389
|
+
// spend the asset.
|
|
1390
|
+
repeated bytes challenge_witness = 10;
|
|
1391
|
+
|
|
1392
|
+
// Indicates whether the state transition this proof represents is a burn,
|
|
1393
|
+
// meaning that the assets were provably destroyed and can no longer be
|
|
1394
|
+
// spent.
|
|
1395
|
+
bool is_burn = 11;
|
|
1396
|
+
|
|
1397
|
+
// GenesisReveal is an optional field that is the Genesis information for
|
|
1398
|
+
// the asset. This is required for minting proofs.
|
|
1399
|
+
GenesisReveal genesis_reveal = 12;
|
|
1400
|
+
|
|
1401
|
+
// GroupKeyReveal is an optional field that includes the information needed
|
|
1402
|
+
// to derive the tweaked group key.
|
|
1403
|
+
GroupKeyReveal group_key_reveal = 13;
|
|
1404
|
+
|
|
1405
|
+
// AltLeaves represent data used to construct an Asset commitment, that
|
|
1406
|
+
// will be inserted in the input anchor Tap commitment. These data-carrying
|
|
1407
|
+
// leaves are used for a purpose distinct from representing individual
|
|
1408
|
+
// individual Taproot Assets.
|
|
1409
|
+
bytes alt_leaves = 14;
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
message VerifyProofResponse {
|
|
1413
|
+
// Whether the proof file was valid or not.
|
|
1414
|
+
bool valid = 1;
|
|
1415
|
+
|
|
1416
|
+
// The decoded last proof in the file if the proof file was valid.
|
|
1417
|
+
DecodedProof decoded_proof = 2;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
message DecodeProofRequest {
|
|
1421
|
+
// The raw proof bytes to decode. This can be a full proof file or a single
|
|
1422
|
+
// mint/transition proof. If it is a full proof file, the proof_at_depth
|
|
1423
|
+
// field will be used to determine which individual proof within the file to
|
|
1424
|
+
// decode.
|
|
1425
|
+
bytes raw_proof = 1;
|
|
1426
|
+
|
|
1427
|
+
// The index depth of the decoded proof, with 0 being the latest proof. This
|
|
1428
|
+
// is ignored if the raw_proof is a single mint/transition proof and not a
|
|
1429
|
+
// proof file.
|
|
1430
|
+
uint32 proof_at_depth = 2;
|
|
1431
|
+
|
|
1432
|
+
// An option to include previous witnesses in decoding.
|
|
1433
|
+
bool with_prev_witnesses = 3;
|
|
1434
|
+
|
|
1435
|
+
// An option to attempt to retrieve the meta data associated with the proof.
|
|
1436
|
+
bool with_meta_reveal = 4;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
message DecodeProofResponse {
|
|
1440
|
+
// The decoded, more human-readable proof.
|
|
1441
|
+
DecodedProof decoded_proof = 1;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
message ExportProofRequest {
|
|
1445
|
+
// The asset ID of the asset to export the proof for.
|
|
1446
|
+
bytes asset_id = 1;
|
|
1447
|
+
|
|
1448
|
+
// The script key of the asset to export the proof for.
|
|
1449
|
+
bytes script_key = 2;
|
|
1450
|
+
|
|
1451
|
+
// The on-chain outpoint of the asset to export the proof for.
|
|
1452
|
+
OutPoint outpoint = 3;
|
|
1453
|
+
|
|
1454
|
+
// TODO(roasbeef): specify information to make new state transition in proof
|
|
1455
|
+
// file?
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
message UnpackProofFileRequest {
|
|
1459
|
+
// The raw proof file encoded as bytes. Must be a file and not just an
|
|
1460
|
+
// individual mint/transfer proof.
|
|
1461
|
+
bytes raw_proof_file = 1;
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
message UnpackProofFileResponse {
|
|
1465
|
+
// The individual proofs contained in the proof file, ordered by their
|
|
1466
|
+
// appearance within the file (issuance proof first, last known transfer
|
|
1467
|
+
// last).
|
|
1468
|
+
repeated bytes raw_proofs = 1;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
enum AddrEventStatus {
|
|
1472
|
+
ADDR_EVENT_STATUS_UNKNOWN = 0;
|
|
1473
|
+
ADDR_EVENT_STATUS_TRANSACTION_DETECTED = 1;
|
|
1474
|
+
ADDR_EVENT_STATUS_TRANSACTION_CONFIRMED = 2;
|
|
1475
|
+
ADDR_EVENT_STATUS_PROOF_RECEIVED = 3;
|
|
1476
|
+
ADDR_EVENT_STATUS_COMPLETED = 4;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
message AddrEvent {
|
|
1480
|
+
// The time the event was created in unix timestamp seconds.
|
|
1481
|
+
uint64 creation_time_unix_seconds = 1;
|
|
1482
|
+
|
|
1483
|
+
// The address the event was created for.
|
|
1484
|
+
Addr addr = 2;
|
|
1485
|
+
|
|
1486
|
+
// The current status of the event.
|
|
1487
|
+
AddrEventStatus status = 3;
|
|
1488
|
+
|
|
1489
|
+
// The outpoint that contains the inbound asset transfer.
|
|
1490
|
+
string outpoint = 4;
|
|
1491
|
+
|
|
1492
|
+
/*
|
|
1493
|
+
The amount in satoshis that were transferred on chain along with the asset.
|
|
1494
|
+
This amount is independent of the requested asset amount, which can be
|
|
1495
|
+
looked up on the address.
|
|
1496
|
+
*/
|
|
1497
|
+
uint64 utxo_amt_sat = 5;
|
|
1498
|
+
|
|
1499
|
+
/*
|
|
1500
|
+
The taproot sibling hash that was used to send to the Taproot output.
|
|
1501
|
+
*/
|
|
1502
|
+
bytes taproot_sibling = 6;
|
|
1503
|
+
|
|
1504
|
+
/*
|
|
1505
|
+
The height at which the on-chain output was confirmed. If this is zero, it
|
|
1506
|
+
means the output is unconfirmed.
|
|
1507
|
+
*/
|
|
1508
|
+
uint32 confirmation_height = 7;
|
|
1509
|
+
|
|
1510
|
+
/*
|
|
1511
|
+
Indicates whether a proof file can be found for the address' asset ID and
|
|
1512
|
+
script key.
|
|
1513
|
+
*/
|
|
1514
|
+
bool has_proof = 8;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
message AddrReceivesRequest {
|
|
1518
|
+
// Filter receives by a specific address. Leave empty to get all receives.
|
|
1519
|
+
string filter_addr = 1;
|
|
1520
|
+
|
|
1521
|
+
// Filter receives by a specific status. Leave empty to get all receives.
|
|
1522
|
+
AddrEventStatus filter_status = 2;
|
|
1523
|
+
|
|
1524
|
+
// Filter receives by creation time greater than or equal to this timestamp.
|
|
1525
|
+
// If not set, no start time filtering is applied.
|
|
1526
|
+
uint64 start_timestamp = 3;
|
|
1527
|
+
|
|
1528
|
+
// Filter receives by creation time less than or equal to this timestamp.
|
|
1529
|
+
// If not set, no end time filtering is applied.
|
|
1530
|
+
uint64 end_timestamp = 4;
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
message AddrReceivesResponse {
|
|
1534
|
+
// The events that match the filter criteria.
|
|
1535
|
+
repeated AddrEvent events = 1;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
message SendAssetRequest {
|
|
1539
|
+
// The list of TAP addresses to send assets to. The amount to send to each
|
|
1540
|
+
// address is determined by the amount specified in the address itself. For
|
|
1541
|
+
// V2 addresses that are allowed to not specify an amount, use the
|
|
1542
|
+
// addresses_with_amounts list to specify the amount to send to each
|
|
1543
|
+
// address. The tap_addrs and addresses_with_amounts lists are mutually
|
|
1544
|
+
// exclusive, meaning that if addresses_with_amounts is set, then tap_addrs
|
|
1545
|
+
// must be empty, and vice versa.
|
|
1546
|
+
repeated string tap_addrs = 1;
|
|
1547
|
+
|
|
1548
|
+
// The optional fee rate to use for the minting transaction, in sat/kw.
|
|
1549
|
+
uint32 fee_rate = 2;
|
|
1550
|
+
|
|
1551
|
+
// An optional short label for the send transfer. This label can be used to
|
|
1552
|
+
// track the progress of the transfer via the logs or an event subscription.
|
|
1553
|
+
// Multiple transfers can share the same label.
|
|
1554
|
+
string label = 3;
|
|
1555
|
+
|
|
1556
|
+
// A flag to skip the proof courier ping check. This is useful for
|
|
1557
|
+
// testing purposes and for forced transfers when the proof courier
|
|
1558
|
+
// is not immediately available.
|
|
1559
|
+
bool skip_proof_courier_ping_check = 4;
|
|
1560
|
+
|
|
1561
|
+
// A list of addresses and the amounts of asset units to send to them. This
|
|
1562
|
+
// must be used for V2 TAP addresses that don't specify an amount in the
|
|
1563
|
+
// address itself and allow the sender to choose the amount to send. The
|
|
1564
|
+
// tap_addrs and addresses_with_amounts lists are mutually exclusive,
|
|
1565
|
+
// meaning that if addresses_with_amounts is set, then tap_addrs must be
|
|
1566
|
+
// empty, and vice versa.
|
|
1567
|
+
repeated AddressWithAmount addresses_with_amounts = 5;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
message AddressWithAmount {
|
|
1571
|
+
// The TAP address to send assets to.
|
|
1572
|
+
string tap_addr = 1;
|
|
1573
|
+
|
|
1574
|
+
// The amount of asset units to send to the address. This is only used for
|
|
1575
|
+
// re-usable V2 addresses that don't specify an amount in the address itself
|
|
1576
|
+
// and allow the sender to specify the amount on each send attempt. For V0
|
|
1577
|
+
// or V1 addresses, this can be left empty (zero) as the amount is taken
|
|
1578
|
+
// from the address itself.
|
|
1579
|
+
uint64 amount = 2;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
message PrevInputAsset {
|
|
1583
|
+
// The previous input's anchor point, which is the on-chain outpoint the
|
|
1584
|
+
// asset was anchored to.
|
|
1585
|
+
string anchor_point = 1;
|
|
1586
|
+
|
|
1587
|
+
// The asset ID of the asset that was spent as an input.
|
|
1588
|
+
bytes asset_id = 2;
|
|
1589
|
+
|
|
1590
|
+
// The script key of the asset that was spent as an input.
|
|
1591
|
+
bytes script_key = 3;
|
|
1592
|
+
|
|
1593
|
+
// The amount of the asset that was spent as an input.
|
|
1594
|
+
uint64 amount = 4;
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
message SendAssetResponse {
|
|
1598
|
+
// The transfer that was created to send assets to one or more addresses.
|
|
1599
|
+
AssetTransfer transfer = 1;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
message GetInfoRequest {
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
message GetInfoResponse {
|
|
1606
|
+
// The full version string of the Taproot Asset daemon.
|
|
1607
|
+
string version = 1;
|
|
1608
|
+
|
|
1609
|
+
// The full version string of the LND node that this daemon is connected to.
|
|
1610
|
+
string lnd_version = 2;
|
|
1611
|
+
|
|
1612
|
+
// The network this daemon is connected to, e.g. "mainnet", "testnet", or
|
|
1613
|
+
// any other supported network.
|
|
1614
|
+
string network = 3;
|
|
1615
|
+
|
|
1616
|
+
// The public key of the LND node that this daemon is connected to.
|
|
1617
|
+
string lnd_identity_pubkey = 4;
|
|
1618
|
+
|
|
1619
|
+
// The alias of the LND node that this daemon is connected to.
|
|
1620
|
+
string node_alias = 5;
|
|
1621
|
+
|
|
1622
|
+
// The current block height as seen by the LND node this daemon is
|
|
1623
|
+
// connected to.
|
|
1624
|
+
uint32 block_height = 6;
|
|
1625
|
+
|
|
1626
|
+
// The current block hash as seen by the LND node this daemon is connected
|
|
1627
|
+
// to.
|
|
1628
|
+
string block_hash = 7;
|
|
1629
|
+
|
|
1630
|
+
// Whether the LND node this daemon is connected to is synced to the
|
|
1631
|
+
// Bitcoin chain.
|
|
1632
|
+
bool sync_to_chain = 8;
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
message FetchAssetMetaRequest {
|
|
1636
|
+
oneof asset {
|
|
1637
|
+
// The asset ID of the asset to fetch the meta for.
|
|
1638
|
+
bytes asset_id = 1;
|
|
1639
|
+
|
|
1640
|
+
// The 32-byte meta hash of the asset meta.
|
|
1641
|
+
bytes meta_hash = 2;
|
|
1642
|
+
|
|
1643
|
+
// The hex encoded asset ID of the asset to fetch the meta for.
|
|
1644
|
+
string asset_id_str = 3;
|
|
1645
|
+
|
|
1646
|
+
// The hex encoded meta hash of the asset meta.
|
|
1647
|
+
string meta_hash_str = 4;
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
message FetchAssetMetaResponse {
|
|
1652
|
+
/*
|
|
1653
|
+
The raw data of the asset meta data. Based on the type below, this may be
|
|
1654
|
+
structured data such as a text file or PDF. The size of the data is limited
|
|
1655
|
+
to 1MiB.
|
|
1656
|
+
*/
|
|
1657
|
+
bytes data = 1;
|
|
1658
|
+
|
|
1659
|
+
// The type of the asset meta data.
|
|
1660
|
+
AssetMetaType type = 2;
|
|
1661
|
+
|
|
1662
|
+
/*
|
|
1663
|
+
The hash of the meta. This is the hash of the TLV serialization of the meta
|
|
1664
|
+
itself.
|
|
1665
|
+
*/
|
|
1666
|
+
bytes meta_hash = 3;
|
|
1667
|
+
|
|
1668
|
+
/*
|
|
1669
|
+
A map of unknown odd TLV types that were encountered during asset meta data
|
|
1670
|
+
decoding.
|
|
1671
|
+
*/
|
|
1672
|
+
map<uint64, bytes> unknown_odd_types = 4;
|
|
1673
|
+
|
|
1674
|
+
/*
|
|
1675
|
+
The decimal display value of the asset. This is used to determine the number
|
|
1676
|
+
of decimal places to display when presenting the asset amount to the user.
|
|
1677
|
+
*/
|
|
1678
|
+
uint32 decimal_display = 5;
|
|
1679
|
+
|
|
1680
|
+
/*
|
|
1681
|
+
Boolean flag indicating whether the asset-group issuer publishes
|
|
1682
|
+
universe-supply commitments to the canonical universe set.
|
|
1683
|
+
*/
|
|
1684
|
+
bool universe_commitments = 6;
|
|
1685
|
+
|
|
1686
|
+
/*
|
|
1687
|
+
List of canonical universe URLs where the asset-group issuer publishes
|
|
1688
|
+
asset-related proofs.
|
|
1689
|
+
*/
|
|
1690
|
+
repeated string canonical_universe_urls = 7;
|
|
1691
|
+
|
|
1692
|
+
/*
|
|
1693
|
+
The public key that is used to verify universe supply commitment related
|
|
1694
|
+
on-chain outputs and proofs.
|
|
1695
|
+
*/
|
|
1696
|
+
bytes delegation_key = 8;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
message BurnAssetRequest {
|
|
1700
|
+
oneof asset {
|
|
1701
|
+
// The asset ID of the asset to burn units of.
|
|
1702
|
+
bytes asset_id = 1;
|
|
1703
|
+
|
|
1704
|
+
// The hex encoded asset ID of the asset to burn units of.
|
|
1705
|
+
string asset_id_str = 2;
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
// The number of asset units to burn. This must be greater than zero.
|
|
1709
|
+
uint64 amount_to_burn = 3;
|
|
1710
|
+
|
|
1711
|
+
// A safety check to ensure the user is aware of the destructive nature of
|
|
1712
|
+
// the burn. This needs to be set to the value "assets will be destroyed"
|
|
1713
|
+
// for the burn to succeed.
|
|
1714
|
+
string confirmation_text = 4;
|
|
1715
|
+
|
|
1716
|
+
// A note that may contain user defined metadata related to this burn.
|
|
1717
|
+
string note = 5;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
message BurnAssetResponse {
|
|
1721
|
+
// The asset transfer that contains the asset burn as an output.
|
|
1722
|
+
AssetTransfer burn_transfer = 1;
|
|
1723
|
+
|
|
1724
|
+
// The burn transition proof for the asset burn output.
|
|
1725
|
+
DecodedProof burn_proof = 2;
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
message ListBurnsRequest {
|
|
1729
|
+
// The asset id of the burnt asset.
|
|
1730
|
+
bytes asset_id = 1;
|
|
1731
|
+
|
|
1732
|
+
// The tweaked group key of the group this asset belongs to.
|
|
1733
|
+
bytes tweaked_group_key = 3;
|
|
1734
|
+
|
|
1735
|
+
// The txid of the transaction that the burn was anchored to.
|
|
1736
|
+
bytes anchor_txid = 4;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
message AssetBurn {
|
|
1740
|
+
// A note that may contain user defined metadata related to this burn.
|
|
1741
|
+
string note = 1;
|
|
1742
|
+
|
|
1743
|
+
// The asset id of the burnt asset.
|
|
1744
|
+
bytes asset_id = 2;
|
|
1745
|
+
|
|
1746
|
+
// The tweaked group key of the group this asset belongs to.
|
|
1747
|
+
bytes tweaked_group_key = 3;
|
|
1748
|
+
|
|
1749
|
+
// The amount of burnt assets.
|
|
1750
|
+
uint64 amount = 4;
|
|
1751
|
+
|
|
1752
|
+
// The txid of the transaction that the burn was anchored to.
|
|
1753
|
+
bytes anchor_txid = 5;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
message ListBurnsResponse {
|
|
1757
|
+
// The list of asset burns that match the query parameters.
|
|
1758
|
+
repeated AssetBurn burns = 1;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
message SubscribeReceiveEventsRequest {
|
|
1762
|
+
// Filter receives by a specific address. Leave empty to get all receive
|
|
1763
|
+
// events for all addresses.
|
|
1764
|
+
string filter_addr = 1;
|
|
1765
|
+
|
|
1766
|
+
// The start time as a Unix timestamp in microseconds. If not set (default
|
|
1767
|
+
// value 0), the daemon will start streaming events from the current time.
|
|
1768
|
+
int64 start_timestamp = 2;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
message ReceiveEvent {
|
|
1772
|
+
// Event creation timestamp (Unix timestamp in microseconds).
|
|
1773
|
+
int64 timestamp = 1;
|
|
1774
|
+
|
|
1775
|
+
// The address that received the asset.
|
|
1776
|
+
taprpc.Addr address = 2;
|
|
1777
|
+
|
|
1778
|
+
// The outpoint of the transaction that was used to receive the asset.
|
|
1779
|
+
string outpoint = 3;
|
|
1780
|
+
|
|
1781
|
+
// The status of the event. If error below is set, then the status is the
|
|
1782
|
+
// state that lead to the error during its execution.
|
|
1783
|
+
AddrEventStatus status = 4;
|
|
1784
|
+
|
|
1785
|
+
// The height of the block the asset receive transaction was mined in. This
|
|
1786
|
+
// is only set if the status is ADDR_EVENT_STATUS_TRANSACTION_CONFIRMED or
|
|
1787
|
+
// later.
|
|
1788
|
+
uint32 confirmation_height = 5;
|
|
1789
|
+
|
|
1790
|
+
// An optional error, indicating that executing the status above failed.
|
|
1791
|
+
string error = 6;
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
message SubscribeSendEventsRequest {
|
|
1795
|
+
// Filter send events by a specific recipient script key. Leave empty to get
|
|
1796
|
+
// all receive events for all parcels.
|
|
1797
|
+
bytes filter_script_key = 1;
|
|
1798
|
+
|
|
1799
|
+
// Filter send events by a specific label. Leave empty to not filter by
|
|
1800
|
+
// transfer label.
|
|
1801
|
+
string filter_label = 2;
|
|
1802
|
+
|
|
1803
|
+
// The start time as a Unix timestamp in microseconds. If not set (default
|
|
1804
|
+
// value 0), the daemon will start streaming events from the current time.
|
|
1805
|
+
int64 start_timestamp = 3;
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
enum SendState {
|
|
1809
|
+
// Input coin selection to pick out which asset inputs should be spent is
|
|
1810
|
+
// executed during this state.
|
|
1811
|
+
SEND_STATE_VIRTUAL_INPUT_SELECT = 0;
|
|
1812
|
+
|
|
1813
|
+
// The virtual transaction is signed during this state.
|
|
1814
|
+
SEND_STATE_VIRTUAL_SIGN = 1;
|
|
1815
|
+
|
|
1816
|
+
// The Bitcoin anchor transaction is signed during this state.
|
|
1817
|
+
SEND_STATE_ANCHOR_SIGN = 2;
|
|
1818
|
+
|
|
1819
|
+
// The outbound packet is written to the database during this state,
|
|
1820
|
+
// including the partial proof suffixes. Only parcels that complete this
|
|
1821
|
+
// state can be resumed on restart.
|
|
1822
|
+
SEND_STATE_LOG_COMMITMENT = 3;
|
|
1823
|
+
|
|
1824
|
+
// The Bitcoin anchor transaction is broadcast to the network during this
|
|
1825
|
+
// state.
|
|
1826
|
+
SEND_STATE_BROADCAST = 4;
|
|
1827
|
+
|
|
1828
|
+
// The on-chain anchor transaction needs to reach at least 1 confirmation.
|
|
1829
|
+
// This state waits for the confirmation.
|
|
1830
|
+
SEND_STATE_WAIT_CONFIRMATION = 5;
|
|
1831
|
+
|
|
1832
|
+
// The anchor transaction was confirmed in a block and the full proofs can
|
|
1833
|
+
// now be constructed during this stage.
|
|
1834
|
+
SEND_STATE_STORE_PROOFS = 6;
|
|
1835
|
+
|
|
1836
|
+
// The full proofs are sent to the recipient(s) with the proof courier
|
|
1837
|
+
// service during this state.
|
|
1838
|
+
SEND_STATE_TRANSFER_PROOFS = 7;
|
|
1839
|
+
|
|
1840
|
+
// The send state machine has completed the send process.
|
|
1841
|
+
SEND_STATE_COMPLETED = 8;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
enum ParcelType {
|
|
1845
|
+
// The parcel is an address parcel.
|
|
1846
|
+
PARCEL_TYPE_ADDRESS = 0;
|
|
1847
|
+
|
|
1848
|
+
// The parcel type is a pre-signed parcel where the virtual transactions are
|
|
1849
|
+
// signed outside of the send state machine. Parcels of this type will only
|
|
1850
|
+
// get send states starting from SEND_STATE_ANCHOR_SIGN.
|
|
1851
|
+
PARCEL_TYPE_PRE_SIGNED = 1;
|
|
1852
|
+
|
|
1853
|
+
// The parcel is pending and was resumed on the latest restart of the
|
|
1854
|
+
// daemon. The original parcel type (address or pre-signed) is not known
|
|
1855
|
+
// anymore, as it's not relevant for the remaining steps. Parcels of this
|
|
1856
|
+
// type will only get send states starting from SEND_STATE_BROADCAST.
|
|
1857
|
+
PARCEL_TYPE_PENDING = 2;
|
|
1858
|
+
|
|
1859
|
+
// The parcel type is a pre-anchored parcel where the full anchor
|
|
1860
|
+
// transaction and all proofs are already available. Parcels of this type
|
|
1861
|
+
// will only get send states starting from SEND_STATE_LOG_COMMITMENT.
|
|
1862
|
+
PARCEL_TYPE_PRE_ANCHORED = 3;
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
message SendEvent {
|
|
1866
|
+
// Execute timestamp (Unix timestamp in microseconds).
|
|
1867
|
+
int64 timestamp = 1;
|
|
1868
|
+
|
|
1869
|
+
// The send state that was executed successfully. If error below is set,
|
|
1870
|
+
// then the send_state is the state that lead to the error during its
|
|
1871
|
+
// execution.
|
|
1872
|
+
string send_state = 2;
|
|
1873
|
+
|
|
1874
|
+
// The type of the outbound send parcel.
|
|
1875
|
+
ParcelType parcel_type = 3;
|
|
1876
|
+
|
|
1877
|
+
// The list of addresses the parcel sends to (recipient addresses only, not
|
|
1878
|
+
// including change going back to own wallet). This is only set for parcels
|
|
1879
|
+
// of type PARCEL_TYPE_ADDRESS.
|
|
1880
|
+
repeated taprpc.Addr addresses = 4;
|
|
1881
|
+
|
|
1882
|
+
// The virtual packets that are part of the parcel.
|
|
1883
|
+
repeated bytes virtual_packets = 5;
|
|
1884
|
+
|
|
1885
|
+
// The passive virtual packets that are carried along with the parcel. This
|
|
1886
|
+
// is empty if there were no other assets in the input commitment that is
|
|
1887
|
+
// being spent with the "active" virtual packets above.
|
|
1888
|
+
repeated bytes passive_virtual_packets = 6;
|
|
1889
|
+
|
|
1890
|
+
// The Bitcoin on-chain anchor transaction that commits the sent assets
|
|
1891
|
+
// on-chain. This is only set after the send state SEND_STATE_ANCHOR_SIGN.
|
|
1892
|
+
AnchorTransaction anchor_transaction = 7;
|
|
1893
|
+
|
|
1894
|
+
// The final transfer as it will be stored in the database. This is only set
|
|
1895
|
+
// after the send state SEND_STATE_LOG_COMMITMENT.
|
|
1896
|
+
AssetTransfer transfer = 8;
|
|
1897
|
+
|
|
1898
|
+
// An optional error, indicating that executing the send_state failed.
|
|
1899
|
+
string error = 9;
|
|
1900
|
+
|
|
1901
|
+
// The label of the transfer.
|
|
1902
|
+
string transfer_label = 10;
|
|
1903
|
+
|
|
1904
|
+
// The next send state that will be executed.
|
|
1905
|
+
string next_send_state = 11;
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
message AnchorTransaction {
|
|
1909
|
+
// The on-chain anchor transaction PSBT packet that was created by the
|
|
1910
|
+
// daemon.
|
|
1911
|
+
bytes anchor_psbt = 1;
|
|
1912
|
+
|
|
1913
|
+
/*
|
|
1914
|
+
The index of the (added) change output or -1 if no change was left over.
|
|
1915
|
+
*/
|
|
1916
|
+
int32 change_output_index = 2;
|
|
1917
|
+
|
|
1918
|
+
/*
|
|
1919
|
+
The total number of satoshis in on-chain fees paid by the anchor
|
|
1920
|
+
transaction.
|
|
1921
|
+
*/
|
|
1922
|
+
int64 chain_fees_sats = 3;
|
|
1923
|
+
|
|
1924
|
+
/*
|
|
1925
|
+
The fee rate in sat/kWU that was targeted by the anchor transaction.
|
|
1926
|
+
*/
|
|
1927
|
+
int32 target_fee_rate_sat_kw = 4;
|
|
1928
|
+
|
|
1929
|
+
/*
|
|
1930
|
+
The list of UTXO lock leases that were acquired for the inputs in the funded
|
|
1931
|
+
PSBT packet from lnd. Only inputs added to the PSBT by this RPC are locked,
|
|
1932
|
+
inputs that were already present in the PSBT are not locked.
|
|
1933
|
+
*/
|
|
1934
|
+
repeated taprpc.OutPoint lnd_locked_utxos = 5;
|
|
1935
|
+
|
|
1936
|
+
/*
|
|
1937
|
+
The final, signed anchor transaction that was broadcast to the network.
|
|
1938
|
+
*/
|
|
1939
|
+
bytes final_tx = 6;
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
message RegisterTransferRequest {
|
|
1943
|
+
// The asset ID of the asset to register the transfer for.
|
|
1944
|
+
bytes asset_id = 1;
|
|
1945
|
+
|
|
1946
|
+
// The optional group key of the asset to register the transfer for.
|
|
1947
|
+
bytes group_key = 2;
|
|
1948
|
+
|
|
1949
|
+
// The script key of the asset to register the transfer for.
|
|
1950
|
+
bytes script_key = 3;
|
|
1951
|
+
|
|
1952
|
+
// The outpoint of the transaction that was used to receive the asset.
|
|
1953
|
+
taprpc.OutPoint outpoint = 4;
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
message RegisterTransferResponse {
|
|
1957
|
+
// The asset transfer that was registered.
|
|
1958
|
+
Asset registered_asset = 1;
|
|
1959
|
+
}
|