@odatano/nightgate 0.1.0 → 0.1.1

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/db/schema.cds CHANGED
@@ -1,141 +1,97 @@
1
1
  namespace midnight;
2
2
 
3
- using { cuid, managed } from '@sap/cds/common';
4
-
5
- // ============================================================================
6
- // Custom Types for Midnight Blockchain
7
- // ============================================================================
8
-
9
- type HexEncoded : String(512);
10
- type UnshieldedAddr : String(256); // Bech32m-encoded
11
- type CardanoRewardAddr : String(256); // Bech32-encoded
12
- type DustAddr : String(256); // Bech32m-encoded
13
- type BigInt : String(78); // For u128 values as strings
14
-
15
- // Enum for Transaction Result Status
16
- type TransactionResultStatus : String enum {
17
- SUCCESS;
18
- PARTIAL_SUCCESS;
19
- FAILURE;
20
- }
21
-
22
- // Enum for Transaction Type
23
- type TransactionType : String enum {
24
- REGULAR;
25
- SYSTEM;
26
- }
27
-
28
- // Enum for Contract Action Type
29
- type ContractActionType : String enum {
30
- DEPLOY;
31
- CALL;
32
- UPDATE;
33
- }
34
-
35
- // Enum for Dust Ledger Event Type
36
- type DustLedgerEventType : String enum {
37
- DTIME_UPDATE;
38
- INITIAL_UTXO;
39
- }
40
-
41
- // Enum for detailed Transaction Type Classification (from Crawler)
42
- type TxType : String(30) enum {
43
- night_transfer;
44
- shielded_transfer;
45
- contract_deploy;
46
- contract_call;
47
- contract_update;
48
- dust_registration;
49
- dust_generation;
50
- governance;
51
- system;
52
- unknown;
53
- }
54
-
55
- // Enum for Indexer Sync Status
56
- type SyncStatus : String(20) enum {
57
- syncing;
58
- synced;
59
- error;
60
- stopped;
61
- }
62
-
63
- // Enum for Token Category
64
- type TokenCategory : String(25) enum {
65
- ledger_shielded;
66
- ledger_unshielded;
67
- contract_shielded;
68
- contract_unshielded;
69
- }
70
-
71
- // ============================================================================
72
- // Core Entities
73
- // ============================================================================
3
+ using {
4
+ cuid,
5
+ managed
6
+ } from '@sap/cds/common';
7
+ using {
8
+ HexEncoded,
9
+ UnshieldedAddr,
10
+ CardanoRewardAddr,
11
+ DustAddr,
12
+ BigInt,
13
+ TransactionResultStatus,
14
+ TransactionType,
15
+ ContractActionType,
16
+ DustLedgerEventType,
17
+ TxType,
18
+ SyncStatus,
19
+ TokenCategory
20
+ } from './types.cds';
74
21
 
75
22
  /**
76
23
  * Represents a block in the Midnight blockchain
77
24
  */
78
25
  entity Blocks : cuid, managed {
79
- hash : HexEncoded not null;
80
- height : Integer64 not null;
81
- protocolVersion : Integer not null;
82
- timestamp : Integer not null; // UNIX timestamp
83
- author : HexEncoded;
84
- ledgerParameters : HexEncoded not null;
26
+ hash : HexEncoded not null;
27
+ height : Integer64 not null;
28
+ protocolVersion : Integer not null;
29
+ timestamp : Integer not null; // UNIX timestamp
30
+ author : HexEncoded;
31
+ ledgerParameters : HexEncoded not null;
85
32
 
86
33
  // Associations
87
- parent : Association to Blocks;
88
- transactions : Composition of many Transactions on transactions.block = $self;
89
- systemParameters : Association to SystemParameters;
34
+ parent : Association to Blocks;
35
+ transactions : Composition of many Transactions
36
+ on transactions.block = $self;
37
+ systemParameters : Association to SystemParameters;
90
38
  }
91
39
 
92
40
  /**
93
41
  * Represents a transaction in the Midnight blockchain
94
42
  */
95
43
  entity Transactions : cuid, managed {
96
- transactionId : Integer not null; // index within block
97
- hash : HexEncoded not null;
98
- protocolVersion : Integer not null;
99
- raw : LargeBinary; // hex-encoded serialized content
100
- transactionType : TransactionType not null;
44
+ transactionId : Integer not null; // index within block
45
+ hash : HexEncoded not null;
46
+ protocolVersion : Integer not null;
47
+ raw : LargeBinary; // hex-encoded serialized content
48
+ transactionType : TransactionType not null;
101
49
 
102
50
  // Regular Transaction specific fields
103
- merkleTreeRoot : HexEncoded;
104
- startIndex : Integer64; // zswap state start index
105
- endIndex : Integer64; // zswap state end index
106
- identifiers : LargeString; // JSON array of HexEncoded identifiers
51
+ merkleTreeRoot : HexEncoded;
52
+ startIndex : Integer64; // zswap state start index
53
+ endIndex : Integer64; // zswap state end index
54
+ identifiers : LargeString; // JSON array of HexEncoded identifiers
107
55
 
108
56
  // Classification fields (populated by Crawler / BlockProcessor)
109
- txType : TxType;
110
- isShielded : Boolean default false;
111
- senderAddress : String(256); // For unshielded TXs
112
- receiverAddress : String(256); // For unshielded TXs
113
- nightAmount : BigInt; // NIGHT amount transferred
114
- dustConsumed : BigInt; // DUST consumed in fees
115
- hasProof : Boolean default false;
116
- proofHash : HexEncoded;
117
- contractAddress : HexEncoded; // Contract address if contract TX
118
- circuitName : String(100); // Entry point / circuit name for contract calls
119
- size : Integer; // TX size in bytes
57
+ txType : TxType;
58
+ isShielded : Boolean default false;
59
+ senderAddress : String(256); // For unshielded TXs
60
+ receiverAddress : String(256); // For unshielded TXs
61
+ nightAmount : BigInt; // NIGHT amount transferred
62
+ dustConsumed : BigInt; // DUST consumed in fees
63
+ hasProof : Boolean default false;
64
+ proofHash : HexEncoded;
65
+ contractAddress : HexEncoded; // Contract address if contract TX
66
+ circuitName : String(100); // Entry point / circuit name for contract calls
67
+ size : Integer; // TX size in bytes
120
68
 
121
69
  // Associations
122
- block : Association to Blocks not null;
123
- transactionResult : Composition of one TransactionResults on transactionResult.transaction = $self;
124
- transactionFees : Composition of one TransactionFees on transactionFees.transaction = $self;
125
- contractActions : Composition of many ContractActions on contractActions.transaction = $self;
126
- unshieldedCreatedOutputs : Composition of many UnshieldedUtxos on unshieldedCreatedOutputs.createdAtTransaction = $self;
127
- unshieldedSpentOutputs : Association to many UnshieldedUtxos on unshieldedSpentOutputs.spentAtTransaction = $self;
128
- zswapLedgerEvents : Composition of many ZswapLedgerEvents on zswapLedgerEvents.transaction = $self;
129
- dustLedgerEvents : Composition of many DustLedgerEvents on dustLedgerEvents.transaction = $self;
70
+ block : Association to Blocks not null;
71
+ transactionResult : Composition of one TransactionResults
72
+ on transactionResult.transaction = $self;
73
+ transactionFees : Composition of one TransactionFees
74
+ on transactionFees.transaction = $self;
75
+ contractActions : Composition of many ContractActions
76
+ on contractActions.transaction = $self;
77
+ unshieldedCreatedOutputs : Composition of many UnshieldedUtxos
78
+ on unshieldedCreatedOutputs.createdAtTransaction = $self;
79
+ unshieldedSpentOutputs : Association to many UnshieldedUtxos
80
+ on unshieldedSpentOutputs.spentAtTransaction = $self;
81
+ zswapLedgerEvents : Composition of many ZswapLedgerEvents
82
+ on zswapLedgerEvents.transaction = $self;
83
+ dustLedgerEvents : Composition of many DustLedgerEvents
84
+ on dustLedgerEvents.transaction = $self;
130
85
  }
131
86
 
132
87
  /**
133
88
  * Transaction execution result
134
89
  */
135
90
  entity TransactionResults : cuid {
136
- status : TransactionResultStatus not null;
137
- transaction : Association to Transactions;
138
- segments : Composition of many TransactionSegments on segments.transactionResult = $self;
91
+ status : TransactionResultStatus not null;
92
+ transaction : Association to Transactions;
93
+ segments : Composition of many TransactionSegments
94
+ on segments.transactionResult = $self;
139
95
  }
140
96
 
141
97
  /**
@@ -151,9 +107,9 @@ entity TransactionSegments : cuid {
151
107
  * Transaction fee information
152
108
  */
153
109
  entity TransactionFees : cuid {
154
- paidFees : BigInt not null; // actual fees in DUST
155
- estimatedFees : BigInt not null; // estimated fees in DUST
156
- transaction : Association to Transactions;
110
+ paidFees : BigInt not null; // actual fees in DUST
111
+ estimatedFees : BigInt not null; // estimated fees in DUST
112
+ transaction : Association to Transactions;
157
113
  }
158
114
 
159
115
  // ============================================================================
@@ -164,25 +120,26 @@ entity TransactionFees : cuid {
164
120
  * Contract actions (Deploy, Call, Update)
165
121
  */
166
122
  entity ContractActions : cuid, managed {
167
- address : HexEncoded not null;
168
- state : LargeBinary; // hex-encoded serialized state
169
- zswapState : LargeBinary; // contract-specific zswap state
170
- actionType : ContractActionType not null;
171
- entryPoint : String(256); // only for CALL actions
123
+ address : HexEncoded not null;
124
+ state : LargeBinary; // hex-encoded serialized state
125
+ zswapState : LargeBinary; // contract-specific zswap state
126
+ actionType : ContractActionType not null;
127
+ entryPoint : String(256); // only for CALL actions
172
128
 
173
129
  // Associations
174
- transaction : Association to Transactions not null;
175
- deploy : Association to ContractActions; // for CALL actions, reference to deployment
176
- unshieldedBalances : Composition of many ContractBalances on unshieldedBalances.contractAction = $self;
130
+ transaction : Association to Transactions not null;
131
+ deploy : Association to ContractActions; // for CALL actions, reference to deployment
132
+ unshieldedBalances : Composition of many ContractBalances
133
+ on unshieldedBalances.contractAction = $self;
177
134
  }
178
135
 
179
136
  /**
180
137
  * Token balances for contracts
181
138
  */
182
139
  entity ContractBalances : cuid {
183
- tokenType : HexEncoded not null;
184
- amount : BigInt not null; // balance as string (u128)
185
- contractAction : Association to ContractActions;
140
+ tokenType : HexEncoded not null;
141
+ amount : BigInt not null; // balance as string (u128)
142
+ contractAction : Association to ContractActions;
186
143
  }
187
144
 
188
145
  // ============================================================================
@@ -193,18 +150,18 @@ entity ContractBalances : cuid {
193
150
  * Unshielded Unspent Transaction Outputs
194
151
  */
195
152
  entity UnshieldedUtxos : cuid, managed {
196
- owner : UnshieldedAddr not null; // Bech32m-encoded
197
- tokenType : HexEncoded not null;
198
- value : BigInt not null; // UTXO quantity (u128)
199
- intentHash : HexEncoded not null;
200
- outputIndex : Integer not null;
201
- ctime : Integer; // creation timestamp (seconds)
202
- initialNonce : HexEncoded not null; // for DUST tracking
153
+ owner : UnshieldedAddr not null; // Bech32m-encoded
154
+ tokenType : HexEncoded not null;
155
+ value : BigInt not null; // UTXO quantity (u128)
156
+ intentHash : HexEncoded not null;
157
+ outputIndex : Integer not null;
158
+ ctime : Integer; // creation timestamp (seconds)
159
+ initialNonce : HexEncoded not null; // for DUST tracking
203
160
  registeredForDustGeneration : Boolean default false;
204
161
 
205
162
  // Associations
206
- createdAtTransaction : Association to Transactions not null;
207
- spentAtTransaction : Association to Transactions;
163
+ createdAtTransaction : Association to Transactions not null;
164
+ spentAtTransaction : Association to Transactions;
208
165
  }
209
166
 
210
167
  // ============================================================================
@@ -215,25 +172,25 @@ entity UnshieldedUtxos : cuid, managed {
215
172
  * Zswap Ledger Events
216
173
  */
217
174
  entity ZswapLedgerEvents : cuid {
218
- eventId : Integer not null;
219
- raw : LargeBinary; // hex-encoded serialized event
220
- maxId : Integer not null;
221
- transaction : Association to Transactions not null;
175
+ eventId : Integer not null;
176
+ raw : LargeBinary; // hex-encoded serialized event
177
+ maxId : Integer not null;
178
+ transaction : Association to Transactions not null;
222
179
  }
223
180
 
224
181
  /**
225
182
  * DUST Ledger Events
226
183
  */
227
184
  entity DustLedgerEvents : cuid {
228
- eventId : Integer not null;
229
- raw : LargeBinary; // hex-encoded serialized event
230
- maxId : Integer not null;
231
- eventType : DustLedgerEventType not null;
185
+ eventId : Integer not null;
186
+ raw : LargeBinary; // hex-encoded serialized event
187
+ maxId : Integer not null;
188
+ eventType : DustLedgerEventType not null;
232
189
 
233
190
  // For INITIAL_UTXO events
234
- dustOutputNonce : HexEncoded; // 32-byte nonce
191
+ dustOutputNonce : HexEncoded; // 32-byte nonce
235
192
 
236
- transaction : Association to Transactions not null;
193
+ transaction : Association to Transactions not null;
237
194
  }
238
195
 
239
196
  // ============================================================================
@@ -244,38 +201,38 @@ entity DustLedgerEvents : cuid {
244
201
  * System-wide parameters
245
202
  */
246
203
  entity SystemParameters : cuid, managed {
247
- validFrom : Timestamp not null;
248
- validTo : Timestamp;
204
+ validFrom : Timestamp not null;
205
+ validTo : Timestamp;
249
206
 
250
207
  // D-Parameter (validator committee composition)
251
208
  numPermissionedCandidates : Integer not null;
252
209
  numRegisteredCandidates : Integer not null;
253
210
 
254
211
  // Terms and Conditions
255
- termsHash : HexEncoded;
256
- termsUrl : String(2048);
212
+ termsHash : HexEncoded;
213
+ termsUrl : String(2048);
257
214
  }
258
215
 
259
216
  /**
260
217
  * D-Parameter history for governance tracking
261
218
  */
262
219
  entity DParameterHistory : cuid, managed {
263
- effectiveFrom : Timestamp not null;
264
- effectiveTo : Timestamp;
220
+ effectiveFrom : Timestamp not null;
221
+ effectiveTo : Timestamp;
265
222
  numPermissionedCandidates : Integer not null;
266
223
  numRegisteredCandidates : Integer not null;
267
- block : Association to Blocks;
224
+ block : Association to Blocks;
268
225
  }
269
226
 
270
227
  /**
271
228
  * Terms and Conditions history
272
229
  */
273
230
  entity TermsAndConditionsHistory : cuid, managed {
274
- effectiveFrom : Timestamp not null;
275
- effectiveTo : Timestamp;
276
- hash : HexEncoded not null;
277
- url : String(2048) not null;
278
- block : Association to Blocks;
231
+ effectiveFrom : Timestamp not null;
232
+ effectiveTo : Timestamp;
233
+ hash : HexEncoded not null;
234
+ url : String(2048) not null;
235
+ block : Association to Blocks;
279
236
  }
280
237
 
281
238
  // ============================================================================
@@ -287,14 +244,14 @@ entity TermsAndConditionsHistory : cuid, managed {
287
244
  */
288
245
  entity DustGenerationStatus : cuid, managed {
289
246
  cardanoRewardAddress : CardanoRewardAddr not null;
290
- dustAddress : DustAddr; // Bech32m-encoded
247
+ dustAddress : DustAddr; // Bech32m-encoded
291
248
  registered : Boolean default false;
292
- nightBalance : BigInt not null; // NIGHT backing (STAR)
293
- generationRate : BigInt not null; // SPECK per second
294
- maxCapacity : BigInt not null; // maximum SPECK capacity
295
- currentCapacity : BigInt not null; // current SPECK capacity
296
- utxoTxHash : HexEncoded; // Cardano UTXO tx hash
297
- utxoOutputIndex : Integer; // Cardano UTXO output index
249
+ nightBalance : BigInt not null; // NIGHT backing (STAR)
250
+ generationRate : BigInt not null; // SPECK per second
251
+ maxCapacity : BigInt not null; // maximum SPECK capacity
252
+ currentCapacity : BigInt not null; // current SPECK capacity
253
+ utxoTxHash : HexEncoded; // Cardano UTXO tx hash
254
+ utxoOutputIndex : Integer; // Cardano UTXO output index
298
255
  }
299
256
 
300
257
  // ============================================================================
@@ -305,12 +262,12 @@ entity DustGenerationStatus : cuid, managed {
305
262
  * Wallet sessions for authenticated access
306
263
  */
307
264
  entity WalletSessions : cuid, managed {
308
- viewingKeyHash : String(64); // SHA-256 of viewing key (for lookup/dedup)
309
- encryptedViewingKey : LargeString; // AES-256-GCM encrypted viewing key
265
+ viewingKeyHash : String(64); // SHA-256 of viewing key (for lookup/dedup)
266
+ encryptedViewingKey : LargeString; // AES-256-GCM encrypted viewing key
310
267
  sessionId : UUID not null;
311
268
  connectedAt : Timestamp not null;
312
269
  disconnectedAt : Timestamp;
313
- expiresAt : Timestamp; // Session TTL
270
+ expiresAt : Timestamp; // Session TTL
314
271
  isActive : Boolean default true;
315
272
  }
316
273
 
@@ -322,44 +279,44 @@ entity WalletSessions : cuid, managed {
322
279
  * Indexer sync status — singleton table tracking crawler progress
323
280
  */
324
281
  entity SyncState {
325
- key ID : String(10) default 'SINGLETON';
326
- networkId : String(30);
327
-
328
- // Sync position
329
- lastIndexedHeight : Integer64 default 0;
330
- lastIndexedHash : HexEncoded;
331
- lastIndexedAt : Timestamp;
332
-
333
- // Finality tracking
334
- lastFinalizedHeight : Integer64 default 0;
335
- lastFinalizedHash : HexEncoded;
336
-
337
- // Node info
338
- nodeUrl : String(200);
339
- chainHeight : Integer64 default 0;
340
-
341
- // Status
342
- syncStatus : SyncStatus default 'stopped';
343
- syncProgress : Decimal(5,2) default 0;
344
- blocksPerSecond : Decimal(10,2) default 0;
345
-
346
- // Errors
347
- lastError : String(500);
348
- lastErrorAt : Timestamp;
349
- consecutiveErrors : Integer default 0;
282
+ key ID : String(10) default 'SINGLETON';
283
+ networkId : String(30);
284
+
285
+ // Sync position
286
+ lastIndexedHeight : Integer64 default 0;
287
+ lastIndexedHash : HexEncoded;
288
+ lastIndexedAt : Timestamp;
289
+
290
+ // Finality tracking
291
+ lastFinalizedHeight : Integer64 default 0;
292
+ lastFinalizedHash : HexEncoded;
293
+
294
+ // Node info
295
+ nodeUrl : String(200);
296
+ chainHeight : Integer64 default 0;
297
+
298
+ // Status
299
+ syncStatus : SyncStatus default 'stopped';
300
+ syncProgress : Decimal(5, 2) default 0;
301
+ blocksPerSecond : Decimal(10, 2) default 0;
302
+
303
+ // Errors
304
+ lastError : String(500);
305
+ lastErrorAt : Timestamp;
306
+ consecutiveErrors : Integer default 0;
350
307
  }
351
308
 
352
309
  /**
353
310
  * Reorg history — tracks blockchain reorganizations detected by the crawler
354
311
  */
355
312
  entity ReorgLog : cuid, managed {
356
- detectedAt : Timestamp not null;
357
- forkHeight : Integer64 not null;
358
- oldTipHash : HexEncoded not null;
359
- newTipHash : HexEncoded not null;
360
- blocksRolledBack : Integer default 0;
361
- blocksReIndexed : Integer default 0;
362
- status : String(20); // 'completed', 'failed'
313
+ detectedAt : Timestamp not null;
314
+ forkHeight : Integer64 not null;
315
+ oldTipHash : HexEncoded not null;
316
+ newTipHash : HexEncoded not null;
317
+ blocksRolledBack : Integer default 0;
318
+ blocksReIndexed : Integer default 0;
319
+ status : String(20); // 'completed', 'failed'
363
320
  }
364
321
 
365
322
  // ============================================================================
@@ -370,29 +327,29 @@ entity ReorgLog : cuid, managed {
370
327
  * Unshielded NIGHT token balances per address
371
328
  */
372
329
  entity NightBalances {
373
- key address : String(256);
374
- balance : Decimal(20,0) default 0;
375
- utxoCount : Integer default 0;
376
-
377
- // Activity tracking
378
- firstSeenHeight : Integer64;
379
- firstSeenAt : Timestamp;
380
- lastActivityHeight : Integer64;
381
- lastActivityAt : Timestamp;
382
-
383
- // TX statistics
384
- txSentCount : Integer default 0;
385
- txReceivedCount : Integer default 0;
386
- totalSent : Decimal(20,0) default 0;
387
- totalReceived : Decimal(20,0) default 0;
388
-
389
- // DUST linkage
390
- dustAddress : DustAddr;
391
- isDustRegistered : Boolean default false;
392
-
393
- // Indexer metadata
394
- lastUpdatedHeight : Integer64;
395
- lastUpdatedAt : Timestamp;
330
+ key address : String(256);
331
+ balance : Decimal(20, 0) default 0;
332
+ utxoCount : Integer default 0;
333
+
334
+ // Activity tracking
335
+ firstSeenHeight : Integer64;
336
+ firstSeenAt : Timestamp;
337
+ lastActivityHeight : Integer64;
338
+ lastActivityAt : Timestamp;
339
+
340
+ // TX statistics
341
+ txSentCount : Integer default 0;
342
+ txReceivedCount : Integer default 0;
343
+ totalSent : Decimal(20, 0) default 0;
344
+ totalReceived : Decimal(20, 0) default 0;
345
+
346
+ // DUST linkage
347
+ dustAddress : DustAddr;
348
+ isDustRegistered : Boolean default false;
349
+
350
+ // Indexer metadata
351
+ lastUpdatedHeight : Integer64;
352
+ lastUpdatedAt : Timestamp;
396
353
  }
397
354
 
398
355
  /**
@@ -400,126 +357,38 @@ entity NightBalances {
400
357
  */
401
358
  entity DustRegistrations : cuid, managed {
402
359
  // Cardano side
403
- cardanoStakeKey : String(66) not null;
404
- cardanoTxHash : HexEncoded not null;
360
+ cardanoStakeKey : String(66) not null;
361
+ cardanoTxHash : HexEncoded not null;
405
362
 
406
363
  // Midnight side
407
- dustPublicKey : HexEncoded not null;
408
- nightAddress : String(256) not null;
364
+ dustPublicKey : HexEncoded not null;
365
+ nightAddress : String(256) not null;
409
366
 
410
367
  // Status
411
- isActive : Boolean default true;
412
- registeredAt : Timestamp not null;
413
- deregisteredAt : Timestamp;
368
+ isActive : Boolean default true;
369
+ registeredAt : Timestamp not null;
370
+ deregisteredAt : Timestamp;
414
371
 
415
372
  // NIGHT amount backing DUST generation
416
- nightAmount : Decimal(20,0);
373
+ nightAmount : Decimal(20, 0);
417
374
  }
418
375
 
419
376
  /**
420
377
  * Token type registry — tracks all known token types on the Midnight network
421
378
  */
422
379
  entity TokenTypes {
423
- key tokenTypeId : HexEncoded;
424
- tokenName : String(100);
425
- tokenCategory : TokenCategory;
380
+ key tokenTypeId : HexEncoded;
381
+ tokenName : String(100);
382
+ tokenCategory : TokenCategory;
426
383
 
427
- // For contract-created tokens
428
- contractAddress : HexEncoded;
384
+ // For contract-created tokens
385
+ contractAddress : HexEncoded;
429
386
 
430
- // Metadata
431
- decimals : Integer;
432
- totalSupply : Decimal(30,0);
387
+ // Metadata
388
+ decimals : Integer;
389
+ totalSupply : Decimal(30, 0);
433
390
 
434
- firstSeenHeight : Integer64;
435
- firstSeenAt : Timestamp;
391
+ firstSeenHeight : Integer64;
392
+ firstSeenAt : Timestamp;
436
393
  }
437
394
 
438
- // ============================================================================
439
- // Annotations
440
- // ============================================================================
441
-
442
- annotate Blocks with @(
443
- Capabilities: {
444
- InsertRestrictions: { Insertable: false },
445
- UpdateRestrictions: { Updatable: false },
446
- DeleteRestrictions: { Deletable: false }
447
- }
448
- ) {
449
- hash @title: 'Block Hash';
450
- height @title: 'Block Height';
451
- };
452
-
453
- annotate Transactions with @(
454
- Capabilities: {
455
- InsertRestrictions: { Insertable: false },
456
- UpdateRestrictions: { Updatable: false },
457
- DeleteRestrictions: { Deletable: false }
458
- }
459
- ) {
460
- hash @title: 'Transaction Hash';
461
- };
462
-
463
- annotate ContractActions with @(
464
- Capabilities: {
465
- InsertRestrictions: { Insertable: false },
466
- UpdateRestrictions: { Updatable: false },
467
- DeleteRestrictions: { Deletable: false }
468
- }
469
- ) {
470
- address @title: 'Contract Address';
471
- };
472
-
473
- annotate UnshieldedUtxos with @(
474
- Capabilities: {
475
- InsertRestrictions: { Insertable: false },
476
- UpdateRestrictions: { Updatable: false },
477
- DeleteRestrictions: { Deletable: false }
478
- }
479
- );
480
-
481
- annotate DustGenerationStatus with {
482
- cardanoRewardAddress @title: 'Cardano Reward Address';
483
- nightBalance @title: 'NIGHT Balance';
484
- generationRate @title: 'Generation Rate';
485
- };
486
-
487
- annotate SyncState with @(
488
- Capabilities: {
489
- InsertRestrictions: { Insertable: false },
490
- DeleteRestrictions: { Deletable: false }
491
- }
492
- ) {
493
- syncStatus @title: 'Sync Status';
494
- lastIndexedHeight @title: 'Last Indexed Height';
495
- };
496
-
497
- annotate NightBalances with @(
498
- Capabilities: {
499
- InsertRestrictions: { Insertable: false },
500
- UpdateRestrictions: { Updatable: false },
501
- DeleteRestrictions: { Deletable: false }
502
- }
503
- ) {
504
- address @title: 'Address';
505
- balance @title: 'NIGHT Balance';
506
- };
507
-
508
- annotate ReorgLog with @(
509
- Capabilities: {
510
- InsertRestrictions: { Insertable: false },
511
- UpdateRestrictions: { Updatable: false },
512
- DeleteRestrictions: { Deletable: false }
513
- }
514
- );
515
-
516
- annotate TokenTypes with @(
517
- Capabilities: {
518
- InsertRestrictions: { Insertable: false },
519
- UpdateRestrictions: { Updatable: false },
520
- DeleteRestrictions: { Deletable: false }
521
- }
522
- ) {
523
- tokenTypeId @title: 'Token Type ID';
524
- tokenName @title: 'Token Name';
525
- };