@@ -20,6 +20,9 @@ export enum AssetQuerySort {
2020 SORT_BY_ASSET_NAME = 'SORT_BY_ASSET_NAME' ,
2121 SORT_BY_ASSET_ID = 'SORT_BY_ASSET_ID' ,
2222 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' ,
2326 UNRECOGNIZED = 'UNRECOGNIZED'
2427}
2528
@@ -45,13 +48,16 @@ export interface MerkleSumNode {
4548}
4649
4750export interface ID {
48- /** The 32-byte asset ID. */
51+ /** The 32-byte asset ID specified as raw bytes (gRPC only) . */
4952 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) . */
5154 assetIdStr : string | undefined ;
52- /** The 32-byte asset group key. */
55+ /** The 32-byte asset group key specified as raw bytes (gRPC only) . */
5356 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+ */
5561 groupKeyStr : string | undefined ;
5662}
5763
@@ -89,6 +95,13 @@ export interface QueryRootResponse {
8995 assetRoot : UniverseRoot | undefined ;
9096}
9197
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+
92105export interface Outpoint {
93106 /** The output as a hex encoded (and reversed!) string. */
94107 hashStr : string ;
@@ -151,6 +164,19 @@ export interface AssetProof {
151164 assetLeaf : AssetLeaf | undefined ;
152165}
153166
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+
154180export interface SyncTarget {
155181 id : ID | undefined ;
156182}
@@ -226,10 +252,13 @@ export interface AssetStatsQuery {
226252
227253export interface AssetStatsSnapshot {
228254 assetId : Uint8Array | string ;
255+ groupKey : Uint8Array | string ;
256+ genesisPoint : string ;
229257 totalSupply : string ;
230258 assetName : string ;
231259 assetType : AssetType ;
232260 genesisHeight : number ;
261+ genesisTimestamp : string ;
233262 totalSyncs : string ;
234263 totalProofs : string ;
235264}
@@ -238,6 +267,22 @@ export interface UniverseAssetStats {
238267 assetStats : AssetStatsSnapshot [ ] ;
239268}
240269
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+
241286export interface Universe {
242287 /**
243288 * tapcli: `universe roots`
@@ -255,6 +300,14 @@ export interface Universe {
255300 queryAssetRoots (
256301 request ?: DeepPartial < AssetRootQuery >
257302 ) : 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 > ;
258311 /**
259312 * tapcli: `universe keys`
260313 * AssetLeafKeys queries for the set of Universe keys associated with a given
@@ -292,6 +345,11 @@ export interface Universe {
292345 * updated asset_id/group_key.
293346 */
294347 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 > ;
295353 /**
296354 * tapcli: `universe sync`
297355 * SyncUniverse takes host information for a remote Universe server, then
@@ -329,7 +387,7 @@ export interface Universe {
329387 ) : Promise < DeleteFederationServerResponse > ;
330388 /**
331389 * 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
333391 * of the Universe. Stats returned include: total number of syncs, total
334392 * number of proofs, and total number of known assets.
335393 */
@@ -344,6 +402,14 @@ export interface Universe {
344402 queryAssetStats (
345403 request ?: DeepPartial < AssetStatsQuery >
346404 ) : 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 > ;
347413}
348414
349415type Builtin =
0 commit comments