@@ -20,6 +20,9 @@ export enum AssetQuerySort {
20
20
SORT_BY_ASSET_NAME = 'SORT_BY_ASSET_NAME' ,
21
21
SORT_BY_ASSET_ID = 'SORT_BY_ASSET_ID' ,
22
22
SORT_BY_ASSET_TYPE = 'SORT_BY_ASSET_TYPE' ,
23
+ SORT_BY_TOTAL_SYNCS = 'SORT_BY_TOTAL_SYNCS' ,
24
+ SORT_BY_TOTAL_PROOFS = 'SORT_BY_TOTAL_PROOFS' ,
25
+ SORT_BY_GENESIS_HEIGHT = 'SORT_BY_GENESIS_HEIGHT' ,
23
26
UNRECOGNIZED = 'UNRECOGNIZED'
24
27
}
25
28
@@ -45,13 +48,16 @@ export interface MerkleSumNode {
45
48
}
46
49
47
50
export interface ID {
48
- /** The 32-byte asset ID. */
51
+ /** The 32-byte asset ID specified as raw bytes (gRPC only) . */
49
52
assetId : Uint8Array | string | undefined ;
50
- /** The 32-byte asset ID encoded as a hex string. */
53
+ /** The 32-byte asset ID encoded as a hex string (use this for REST) . */
51
54
assetIdStr : string | undefined ;
52
- /** The 32-byte asset group key. */
55
+ /** The 32-byte asset group key specified as raw bytes (gRPC only) . */
53
56
groupKey : Uint8Array | string | undefined ;
54
- /** The 32-byte asset group key encoded as hex string. */
57
+ /**
58
+ * The 32-byte asset group key encoded as hex string (use this for
59
+ * REST).
60
+ */
55
61
groupKeyStr : string | undefined ;
56
62
}
57
63
@@ -89,6 +95,13 @@ export interface QueryRootResponse {
89
95
assetRoot : UniverseRoot | undefined ;
90
96
}
91
97
98
+ export interface DeleteRootQuery {
99
+ /** An ID value to uniquely identify a Universe root. */
100
+ id : ID | undefined ;
101
+ }
102
+
103
+ export interface DeleteRootResponse { }
104
+
92
105
export interface Outpoint {
93
106
/** The output as a hex encoded (and reversed!) string. */
94
107
hashStr : string ;
@@ -151,6 +164,19 @@ export interface AssetProof {
151
164
assetLeaf : AssetLeaf | undefined ;
152
165
}
153
166
167
+ export interface InfoRequest { }
168
+
169
+ export interface InfoResponse {
170
+ /**
171
+ * A pseudo-random runtime ID for the current instance of the Universe
172
+ * server, changes with each restart. Mainly used to identify identical
173
+ * servers when they are exposed under different hostnames/ports.
174
+ */
175
+ runtimeId : string ;
176
+ /** The number of assets known to this Universe server. */
177
+ numAssets : string ;
178
+ }
179
+
154
180
export interface SyncTarget {
155
181
id : ID | undefined ;
156
182
}
@@ -226,10 +252,13 @@ export interface AssetStatsQuery {
226
252
227
253
export interface AssetStatsSnapshot {
228
254
assetId : Uint8Array | string ;
255
+ groupKey : Uint8Array | string ;
256
+ genesisPoint : string ;
229
257
totalSupply : string ;
230
258
assetName : string ;
231
259
assetType : AssetType ;
232
260
genesisHeight : number ;
261
+ genesisTimestamp : string ;
233
262
totalSyncs : string ;
234
263
totalProofs : string ;
235
264
}
@@ -238,6 +267,22 @@ export interface UniverseAssetStats {
238
267
assetStats : AssetStatsSnapshot [ ] ;
239
268
}
240
269
270
+ export interface QueryEventsRequest {
271
+ startTimestamp : string ;
272
+ endTimestamp : string ;
273
+ }
274
+
275
+ export interface QueryEventsResponse {
276
+ events : GroupedUniverseEvents [ ] ;
277
+ }
278
+
279
+ export interface GroupedUniverseEvents {
280
+ /** The date the events occurred on, formatted as YYYY-MM-DD. */
281
+ date : string ;
282
+ syncEvents : string ;
283
+ newProofEvents : string ;
284
+ }
285
+
241
286
export interface Universe {
242
287
/**
243
288
* tapcli: `universe roots`
@@ -255,6 +300,14 @@ export interface Universe {
255
300
queryAssetRoots (
256
301
request ?: DeepPartial < AssetRootQuery >
257
302
) : Promise < QueryRootResponse > ;
303
+ /**
304
+ * tapcli: `universe delete`
305
+ * DeleteAssetRoot deletes the Universe root for a specific asset, including
306
+ * all asoociated universe keys, leaves, and events.
307
+ */
308
+ deleteAssetRoot (
309
+ request ?: DeepPartial < DeleteRootQuery >
310
+ ) : Promise < DeleteRootResponse > ;
258
311
/**
259
312
* tapcli: `universe keys`
260
313
* AssetLeafKeys queries for the set of Universe keys associated with a given
@@ -292,6 +345,11 @@ export interface Universe {
292
345
* updated asset_id/group_key.
293
346
*/
294
347
insertProof ( request ?: DeepPartial < AssetProof > ) : Promise < AssetProofResponse > ;
348
+ /**
349
+ * tapcli: `universe info`
350
+ * Info returns a set of information about the current state of the Universe.
351
+ */
352
+ info ( request ?: DeepPartial < InfoRequest > ) : Promise < InfoResponse > ;
295
353
/**
296
354
* tapcli: `universe sync`
297
355
* SyncUniverse takes host information for a remote Universe server, then
@@ -329,7 +387,7 @@ export interface Universe {
329
387
) : Promise < DeleteFederationServerResponse > ;
330
388
/**
331
389
* tapcli: `universe stats`
332
- * UniverseStats returns a set of aggregrate statistics for the current state
390
+ * UniverseStats returns a set of aggregate statistics for the current state
333
391
* of the Universe. Stats returned include: total number of syncs, total
334
392
* number of proofs, and total number of known assets.
335
393
*/
@@ -344,6 +402,14 @@ export interface Universe {
344
402
queryAssetStats (
345
403
request ?: DeepPartial < AssetStatsQuery >
346
404
) : Promise < UniverseAssetStats > ;
405
+ /**
406
+ * tapcli `universe stats events`
407
+ * QueryEvents returns the number of sync and proof events for a given time
408
+ * period, grouped by day.
409
+ */
410
+ queryEvents (
411
+ request ?: DeepPartial < QueryEventsRequest >
412
+ ) : Promise < QueryEventsResponse > ;
347
413
}
348
414
349
415
type Builtin =
0 commit comments