@aigne/afs-ocap 1.12.0-beta.5

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.
Files changed (58) hide show
  1. package/LICENSE.md +26 -0
  2. package/README.md +144 -0
  3. package/aup/accounts/default.json +64 -0
  4. package/aup/accounts/item.json +510 -0
  5. package/aup/assets/default.json +70 -0
  6. package/aup/assets/item.json +360 -0
  7. package/aup/bridges/_addr/blocks/item.json +168 -0
  8. package/aup/bridges/default.json +79 -0
  9. package/aup/bridges/item.json +868 -0
  10. package/aup/config/default.json +806 -0
  11. package/aup/default.json +387 -0
  12. package/aup/delegates/default.json +71 -0
  13. package/aup/delegates/item.json +241 -0
  14. package/aup/factories/default.json +78 -0
  15. package/aup/factories/item.json +310 -0
  16. package/aup/stakes/default.json +76 -0
  17. package/aup/stakes/item.json +374 -0
  18. package/aup/tokens/default.json +76 -0
  19. package/aup/tokens/item.json +384 -0
  20. package/aup/transactions/default.json +102 -0
  21. package/aup/transactions/item.json +286 -0
  22. package/aup/validators/default.json +57 -0
  23. package/aup/validators/item.json +99 -0
  24. package/dist/_virtual/_@oxc-project_runtime@0.108.0/helpers/decorate.cjs +11 -0
  25. package/dist/_virtual/_@oxc-project_runtime@0.108.0/helpers/decorate.mjs +10 -0
  26. package/dist/index.cjs +7 -0
  27. package/dist/index.d.cts +5 -0
  28. package/dist/index.d.mts +5 -0
  29. package/dist/index.mjs +4 -0
  30. package/dist/method-colors.cjs +137 -0
  31. package/dist/method-colors.mjs +136 -0
  32. package/dist/method-colors.mjs.map +1 -0
  33. package/dist/provider.cjs +2490 -0
  34. package/dist/provider.d.cts +453 -0
  35. package/dist/provider.d.cts.map +1 -0
  36. package/dist/provider.d.mts +453 -0
  37. package/dist/provider.d.mts.map +1 -0
  38. package/dist/provider.mjs +2490 -0
  39. package/dist/provider.mjs.map +1 -0
  40. package/dist/remote-source.cjs +338 -0
  41. package/dist/remote-source.d.cts +62 -0
  42. package/dist/remote-source.d.cts.map +1 -0
  43. package/dist/remote-source.d.mts +62 -0
  44. package/dist/remote-source.d.mts.map +1 -0
  45. package/dist/remote-source.mjs +339 -0
  46. package/dist/remote-source.mjs.map +1 -0
  47. package/dist/source.d.cts +77 -0
  48. package/dist/source.d.cts.map +1 -0
  49. package/dist/source.d.mts +77 -0
  50. package/dist/source.d.mts.map +1 -0
  51. package/dist/types.d.cts +572 -0
  52. package/dist/types.d.cts.map +1 -0
  53. package/dist/types.d.mts +572 -0
  54. package/dist/types.d.mts.map +1 -0
  55. package/dist/utils.cjs +581 -0
  56. package/dist/utils.mjs +557 -0
  57. package/dist/utils.mjs.map +1 -0
  58. package/package.json +61 -0
@@ -0,0 +1,510 @@
1
+ {
2
+ "id": "account-detail",
3
+ "type": "view",
4
+ "props": {
5
+ "layout": { "direction": "column", "gap": "md" },
6
+ "animate": "slide-up",
7
+ "style": { "padding": "16px 24px" }
8
+ },
9
+ "children": [
10
+ {
11
+ "id": "acc-header",
12
+ "type": "view",
13
+ "props": {
14
+ "layout": { "direction": "row", "gap": "md", "crossAlign": "center" }
15
+ },
16
+ "children": [
17
+ {
18
+ "id": "acc-avatar",
19
+ "type": "media",
20
+ "props": {
21
+ "type": "avatar",
22
+ "variant": "did-motif",
23
+ "seed": "${content.address}",
24
+ "size": 56
25
+ }
26
+ },
27
+ {
28
+ "id": "acc-title-block",
29
+ "type": "view",
30
+ "props": { "layout": { "direction": "column", "gap": "xs", "crossAlign": "start" } },
31
+ "children": [
32
+ {
33
+ "id": "acc-title",
34
+ "type": "text",
35
+ "props": {
36
+ "content": "${content.moniker|default:Account}",
37
+ "level": 2
38
+ }
39
+ },
40
+ {
41
+ "id": "acc-meta",
42
+ "type": "view",
43
+ "props": {
44
+ "layout": { "direction": "row", "gap": "sm", "crossAlign": "center" }
45
+ },
46
+ "children": [
47
+ {
48
+ "id": "acc-addr",
49
+ "type": "text",
50
+ "props": {
51
+ "content": "${content.address}",
52
+ "scale": "sm",
53
+ "format": "did"
54
+ }
55
+ },
56
+ {
57
+ "id": "acc-role",
58
+ "type": "text",
59
+ "props": {
60
+ "content": "${content._roleLabel|default:Account}",
61
+ "intent": "info",
62
+ "variant": "badge"
63
+ }
64
+ }
65
+ ]
66
+ }
67
+ ]
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "id": "acc-overview",
73
+ "type": "entity-overview",
74
+ "props": {
75
+ "layout": "row",
76
+ "data": "${content}",
77
+ "cards": [
78
+ {
79
+ "id": "acc-card-info",
80
+ "title": "Account Info",
81
+ "fields": [
82
+ {
83
+ "key": "address",
84
+ "label": "Address",
85
+ "format": "did",
86
+ "tooltip": "OCAP DID. The leading byte encodes the role type (account / validator / app). Click to copy."
87
+ },
88
+ {
89
+ "key": "moniker",
90
+ "label": "Moniker",
91
+ "hideWhenEmpty": true,
92
+ "tooltip": "Optional human-readable nickname declared on-chain via the declare tx."
93
+ },
94
+ {
95
+ "key": "balance",
96
+ "label": "Balance",
97
+ "format": "bignum:18",
98
+ "symbol": "ABT",
99
+ "tooltip": "Native ABT balance. Token-specific balances appear under the Tokens tab."
100
+ },
101
+ {
102
+ "key": "nonce",
103
+ "label": "Nonce",
104
+ "tooltip": "Sender's per-account counter. Each tx the account submits increments this by one (replay protection)."
105
+ },
106
+ {
107
+ "key": "genesisTime",
108
+ "label": "Created",
109
+ "format": "datetime",
110
+ "interactive": true,
111
+ "tooltip": "Block timestamp when this account first declared itself on-chain. Click to switch between UTC, Local time, and Unix Timestamp."
112
+ },
113
+ {
114
+ "key": "renaissanceTime",
115
+ "label": "Updated",
116
+ "format": "datetime",
117
+ "interactive": true,
118
+ "tooltip": "Block timestamp of the most recent state change for this account. Click to switch between UTC, Local time, and Unix Timestamp."
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ "id": "acc-card-migration",
124
+ "title": "Migration History",
125
+ "hideWhenEmpty": true,
126
+ "fields": [
127
+ {
128
+ "key": "migratedFromFirst",
129
+ "label": "Migrated From",
130
+ "format": "did",
131
+ "hideWhenEmpty": true
132
+ },
133
+ {
134
+ "key": "migratedToFirst",
135
+ "label": "Migrated To",
136
+ "format": "did",
137
+ "hideWhenEmpty": true
138
+ }
139
+ ]
140
+ }
141
+ ]
142
+ }
143
+ },
144
+ {
145
+ "id": "acc-tabs",
146
+ "type": "view",
147
+ "props": {
148
+ "mode": "tabs",
149
+ "layout": { "direction": "column", "gap": "sm" }
150
+ },
151
+ "children": [
152
+ {
153
+ "id": "acc-tab-txs",
154
+ "type": "view",
155
+ "props": {
156
+ "mode": "card",
157
+ "tabLabel": "Transactions",
158
+ "tabIcon": "file-text",
159
+ "layout": { "direction": "column", "gap": "xs" }
160
+ },
161
+ "children": [
162
+ {
163
+ "id": "acc-tab-txs-list",
164
+ "type": "afs-list",
165
+ "src": "${_parentPath}/transactions",
166
+ "props": {
167
+ "layout": "table",
168
+ "columns": [
169
+ { "key": "content.hash", "label": "Hash", "format": "did", "width": "180px" },
170
+ {
171
+ "key": "content._typeName",
172
+ "label": "Type",
173
+ "format": "colored-badge",
174
+ "colorKey": "content._methodColor",
175
+ "width": "150px"
176
+ },
177
+ {
178
+ "key": "content.sender",
179
+ "label": "From",
180
+ "format": "did",
181
+ "width": "150px"
182
+ },
183
+ {
184
+ "label": "",
185
+ "format": "direction-pill",
186
+ "pillContextKey": "content._currentAccount",
187
+ "pillSenderKey": "content.sender",
188
+ "pillReceiverKey": "content.receiver",
189
+ "width": "60px",
190
+ "align": "center"
191
+ },
192
+ {
193
+ "key": "content.receiver",
194
+ "label": "To",
195
+ "format": "did",
196
+ "width": "150px"
197
+ },
198
+ {
199
+ "key": "content.value",
200
+ "label": "Value",
201
+ "format": "bignum:@{content.decimal}",
202
+ "symbol": "@{content.symbol}",
203
+ "width": "150px",
204
+ "align": "right"
205
+ },
206
+ {
207
+ "key": "content._gasFeeRaw",
208
+ "label": "Fee",
209
+ "hideBelow": "tablet-wide",
210
+ "format": "bignum:18",
211
+ "symbol": "ABT",
212
+ "strikethrough": "@{content._gasExempted}",
213
+ "width": "120px",
214
+ "align": "right"
215
+ },
216
+ {
217
+ "key": "content.time",
218
+ "label": "Time",
219
+ "format": "timeago",
220
+ "width": "120px"
221
+ }
222
+ ],
223
+ "pageSize": 10,
224
+ "pagination": "manual",
225
+ "clickMode": "both",
226
+ "autoSelect": false,
227
+ "filter": { "exclude": ".." },
228
+ "showBreadcrumb": false
229
+ }
230
+ }
231
+ ]
232
+ },
233
+ {
234
+ "id": "acc-tab-assets",
235
+ "type": "view",
236
+ "props": {
237
+ "mode": "card",
238
+ "tabLabel": "Assets",
239
+ "tabIcon": "shopping-bag",
240
+ "layout": { "direction": "column", "gap": "xs" }
241
+ },
242
+ "children": [
243
+ {
244
+ "id": "acc-tab-assets-list",
245
+ "type": "afs-list",
246
+ "src": "${_parentPath}/assets",
247
+ "props": {
248
+ "layout": "table",
249
+ "columns": [
250
+ {
251
+ "key": "content.address",
252
+ "label": "Address",
253
+ "format": "did",
254
+ "width": "200px"
255
+ },
256
+ {
257
+ "key": "content.moniker",
258
+ "label": "Name",
259
+ "width": "150px"
260
+ },
261
+ {
262
+ "key": "content.owner",
263
+ "label": "Owner",
264
+ "format": "did",
265
+ "width": "180px"
266
+ },
267
+ {
268
+ "key": "content.genesisTime",
269
+ "label": "Created",
270
+ "format": "timeago",
271
+ "width": "120px"
272
+ },
273
+ {
274
+ "key": "content.renaissanceTime",
275
+ "label": "Updated",
276
+ "hideBelow": "tablet-wide",
277
+ "format": "timeago",
278
+ "width": "120px"
279
+ }
280
+ ],
281
+ "pageSize": 10,
282
+ "pagination": "manual",
283
+ "clickMode": "both",
284
+ "autoSelect": false,
285
+ "filter": { "exclude": ".." },
286
+ "showBreadcrumb": false
287
+ }
288
+ }
289
+ ]
290
+ },
291
+ {
292
+ "id": "acc-tab-tokens",
293
+ "type": "view",
294
+ "props": {
295
+ "mode": "card",
296
+ "tabLabel": "Tokens",
297
+ "tabIcon": "dollar-sign",
298
+ "layout": { "direction": "column", "gap": "xs" }
299
+ },
300
+ "children": [
301
+ {
302
+ "id": "acc-tab-tokens-list",
303
+ "type": "afs-list",
304
+ "src": "${_parentPath}/tokens",
305
+ "props": {
306
+ "layout": "table",
307
+ "columns": [
308
+ {
309
+ "key": "content.address",
310
+ "label": "Token",
311
+ "format": "did",
312
+ "navigateTo": "tokens/{value}",
313
+ "width": "200px"
314
+ },
315
+ {
316
+ "key": "content.balance",
317
+ "label": "Balance",
318
+ "format": "bignum:@{content.decimal}",
319
+ "symbol": "@{content.symbol}",
320
+ "width": "180px",
321
+ "align": "right"
322
+ }
323
+ ],
324
+ "pageSize": 10,
325
+ "pagination": "manual",
326
+ "clickMode": "both",
327
+ "autoSelect": false,
328
+ "filter": { "exclude": ".." },
329
+ "showBreadcrumb": false
330
+ }
331
+ }
332
+ ]
333
+ },
334
+ {
335
+ "id": "acc-tab-token-flows",
336
+ "type": "view",
337
+ "props": {
338
+ "mode": "card",
339
+ "tabLabel": "Token Flow",
340
+ "tabIcon": "corner-down-right",
341
+ "layout": { "direction": "column", "gap": "xs" }
342
+ },
343
+ "children": [
344
+ {
345
+ "id": "acc-tab-token-flows-list",
346
+ "type": "afs-list",
347
+ "src": "${_parentPath}/token-flows",
348
+ "props": {
349
+ "layout": "table",
350
+ "columns": [
351
+ {
352
+ "key": "content.hash",
353
+ "label": "Tx Hash",
354
+ "format": "did",
355
+ "navigateTo": "transactions/{value}",
356
+ "width": "180px"
357
+ },
358
+ {
359
+ "label": "",
360
+ "format": "direction-pill",
361
+ "pillContextKey": "content._currentAccount",
362
+ "pillSenderKey": "content.from",
363
+ "pillReceiverKey": "content.to",
364
+ "width": "60px",
365
+ "align": "center"
366
+ },
367
+ {
368
+ "key": "content._counterparty",
369
+ "label": "Counterparty",
370
+ "format": "did",
371
+ "navigateTo": "accounts/{value}",
372
+ "width": "180px"
373
+ },
374
+ {
375
+ "key": "content.value",
376
+ "label": "Amount",
377
+ "format": "bignum:18",
378
+ "symbol": "ABT",
379
+ "width": "180px",
380
+ "align": "right"
381
+ }
382
+ ],
383
+ "pageSize": 10,
384
+ "pagination": "manual",
385
+ "clickMode": "both",
386
+ "autoSelect": false,
387
+ "filter": { "exclude": ".." },
388
+ "showBreadcrumb": false
389
+ }
390
+ }
391
+ ]
392
+ },
393
+ {
394
+ "id": "acc-tab-stakes-sent",
395
+ "type": "view",
396
+ "props": {
397
+ "mode": "card",
398
+ "tabLabel": "Sent Stakes",
399
+ "tabIcon": "arrow-up-right",
400
+ "layout": { "direction": "column", "gap": "xs" }
401
+ },
402
+ "children": [
403
+ {
404
+ "id": "acc-tab-stakes-sent-list",
405
+ "type": "afs-list",
406
+ "src": "${_parentPath}/stakes/sent",
407
+ "props": {
408
+ "layout": "table",
409
+ "columns": [
410
+ { "key": "content.address", "label": "Stake", "format": "did", "width": "200px" },
411
+ {
412
+ "key": "content.receiver",
413
+ "label": "Validator",
414
+ "format": "did",
415
+ "width": "200px"
416
+ },
417
+ {
418
+ "key": "content.genesisTime",
419
+ "label": "Created",
420
+ "format": "timeago",
421
+ "width": "120px"
422
+ }
423
+ ],
424
+ "pageSize": 10,
425
+ "pagination": "manual",
426
+ "clickMode": "both",
427
+ "autoSelect": false,
428
+ "filter": { "exclude": ".." },
429
+ "showBreadcrumb": false
430
+ }
431
+ }
432
+ ]
433
+ },
434
+ {
435
+ "id": "acc-tab-stakes-received",
436
+ "type": "view",
437
+ "props": {
438
+ "mode": "card",
439
+ "tabLabel": "Received Stakes",
440
+ "tabIcon": "arrow-down",
441
+ "layout": { "direction": "column", "gap": "xs" }
442
+ },
443
+ "children": [
444
+ {
445
+ "id": "acc-tab-stakes-received-list",
446
+ "type": "afs-list",
447
+ "src": "${_parentPath}/stakes/received",
448
+ "props": {
449
+ "layout": "table",
450
+ "columns": [
451
+ { "key": "content.address", "label": "Stake", "format": "did", "width": "200px" },
452
+ {
453
+ "key": "content.sender",
454
+ "label": "From",
455
+ "format": "did",
456
+ "width": "200px"
457
+ },
458
+ {
459
+ "key": "content.genesisTime",
460
+ "label": "Created",
461
+ "format": "timeago",
462
+ "width": "120px"
463
+ }
464
+ ],
465
+ "pageSize": 10,
466
+ "pagination": "manual",
467
+ "clickMode": "both",
468
+ "autoSelect": false,
469
+ "filter": { "exclude": ".." },
470
+ "showBreadcrumb": false
471
+ }
472
+ }
473
+ ]
474
+ },
475
+ {
476
+ "id": "acc-tab-analytics",
477
+ "type": "view",
478
+ "props": {
479
+ "mode": "card",
480
+ "tabLabel": "Analytics",
481
+ "tabIcon": "bar-chart",
482
+ "layout": { "direction": "column", "gap": "md" }
483
+ },
484
+ "children": [
485
+ {
486
+ "id": "acc-analytics-tx-summary",
487
+ "type": "key-value-list",
488
+ "props": {
489
+ "fields": [
490
+ { "key": "numTxs", "label": "Total Transactions", "format": "number" },
491
+ { "key": "numAssets", "label": "Total Assets Owned", "format": "number" },
492
+ { "key": "balance", "label": "Native Balance", "format": "bignum:18" }
493
+ ]
494
+ }
495
+ },
496
+ {
497
+ "id": "acc-analytics-note",
498
+ "type": "text",
499
+ "props": {
500
+ "content": "Per-account activity sparkline (recentNumTxs[]) lives on listTopAccounts and is not currently exposed for single-account drilldown. Tracked separately as Phase 1.5 work.",
501
+ "scale": "caption",
502
+ "intent": "muted"
503
+ }
504
+ }
505
+ ]
506
+ }
507
+ ]
508
+ }
509
+ ]
510
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "id": "assets-view",
3
+ "type": "view",
4
+ "props": {
5
+ "layout": {
6
+ "direction": "column",
7
+ "gap": "none"
8
+ },
9
+ "style": {
10
+ "flex": "1",
11
+ "overflow": "auto"
12
+ }
13
+ },
14
+ "children": [
15
+ {
16
+ "id": "assets-title",
17
+ "type": "text",
18
+ "props": { "content": "Assets", "level": 1 }
19
+ },
20
+ {
21
+ "id": "assets-view-list",
22
+ "type": "afs-list",
23
+ "src": "${_parentPath}",
24
+ "props": {
25
+ "layout": "table",
26
+ "columns": [
27
+ {
28
+ "key": "content.address",
29
+ "label": "Address",
30
+ "mobileRole": "title",
31
+ "format": "did",
32
+ "width": "200px"
33
+ },
34
+ {
35
+ "key": "content.moniker",
36
+ "label": "Name",
37
+ "width": "150px"
38
+ },
39
+ {
40
+ "key": "content.owner",
41
+ "label": "Owner",
42
+ "format": "did",
43
+ "width": "180px"
44
+ },
45
+ {
46
+ "key": "content.genesisTime",
47
+ "label": "Created",
48
+ "format": "timeago",
49
+ "width": "120px"
50
+ },
51
+ {
52
+ "key": "content.renaissanceTime",
53
+ "label": "Updated",
54
+ "hideBelow": "tablet-wide",
55
+ "format": "timeago",
56
+ "width": "120px"
57
+ }
58
+ ],
59
+ "pageSize": 20,
60
+ "pagination": "manual",
61
+ "clickMode": "both",
62
+ "autoSelect": false,
63
+ "filter": {
64
+ "exclude": ".."
65
+ },
66
+ "showBreadcrumb": false
67
+ }
68
+ }
69
+ ]
70
+ }