@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,384 @@
1
+ {
2
+ "id": "token-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": "tok-header",
12
+ "type": "view",
13
+ "props": {
14
+ "layout": { "direction": "row", "gap": "md", "crossAlign": "center" }
15
+ },
16
+ "children": [
17
+ {
18
+ "id": "tok-avatar",
19
+ "type": "media",
20
+ "props": {
21
+ "type": "avatar",
22
+ "variant": "did-motif",
23
+ "seed": "${content.address}",
24
+ "src": "${content.icon}",
25
+ "size": 56
26
+ }
27
+ },
28
+ {
29
+ "id": "tok-title-block",
30
+ "type": "view",
31
+ "props": { "layout": { "direction": "column", "gap": "xs", "crossAlign": "start" } },
32
+ "children": [
33
+ {
34
+ "id": "tok-name",
35
+ "type": "text",
36
+ "props": {
37
+ "content": "${content.name|default:Token}",
38
+ "level": 2
39
+ }
40
+ },
41
+ {
42
+ "id": "tok-meta",
43
+ "type": "view",
44
+ "props": {
45
+ "layout": { "direction": "row", "gap": "sm", "crossAlign": "center" }
46
+ },
47
+ "children": [
48
+ {
49
+ "id": "tok-symbol",
50
+ "type": "text",
51
+ "props": {
52
+ "content": "${content.symbol}",
53
+ "intent": "info",
54
+ "variant": "badge"
55
+ }
56
+ },
57
+ {
58
+ "id": "tok-addr",
59
+ "type": "text",
60
+ "props": {
61
+ "content": "${content.address}",
62
+ "scale": "sm",
63
+ "format": "did"
64
+ }
65
+ }
66
+ ]
67
+ }
68
+ ]
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "id": "tok-overview",
74
+ "type": "entity-overview",
75
+ "props": {
76
+ "layout": "2-stack",
77
+ "data": "${content}",
78
+ "cards": [
79
+ {
80
+ "id": "tok-card-overview",
81
+ "title": "Overview",
82
+ "fields": [
83
+ {
84
+ "key": "address",
85
+ "label": "Address",
86
+ "format": "did",
87
+ "tooltip": "Token DID. Click to copy."
88
+ },
89
+ {
90
+ "key": "totalSupply",
91
+ "label": "Total Supply",
92
+ "format": "bignum:@{decimal}",
93
+ "symbol": "${content.symbol}",
94
+ "tooltip": "Total amount of the token currently minted on-chain."
95
+ },
96
+ {
97
+ "key": "initialSupply",
98
+ "label": "Initial Supply",
99
+ "format": "bignum:@{decimal}",
100
+ "symbol": "${content.symbol}",
101
+ "hideWhenEmpty": true,
102
+ "tooltip": "Supply released into circulation when the token was created. Set to a small value for bridge-backed tokens whose supply scales with bridged volume."
103
+ },
104
+ {
105
+ "key": "maxTotalSupply",
106
+ "label": "Max Supply",
107
+ "format": "bignum:@{decimal}",
108
+ "symbol": "${content.symbol}",
109
+ "tooltip": "Hard cap on the supply this token can ever reach. Empty / \"Unlimited\" means uncapped."
110
+ },
111
+ {
112
+ "key": "_typeLabel",
113
+ "label": "Type",
114
+ "hideWhenEmpty": true,
115
+ "tooltip": "Token kind: Standard = fixed-issuance; Credit = prepaid credits redeemed for a service; Bonding-Curve = minted / burned through a factory contract."
116
+ },
117
+ {
118
+ "key": "_priceUSD",
119
+ "label": "Price (USD)",
120
+ "hideWhenEmpty": true,
121
+ "tooltip": "USD spot price from the upstream price feed (refreshed every 60s)."
122
+ },
123
+ {
124
+ "key": "_priceChange24h",
125
+ "label": "24h Change",
126
+ "hideWhenEmpty": true,
127
+ "tooltip": "USD price change over the trailing 24 hours."
128
+ },
129
+ {
130
+ "key": "description",
131
+ "label": "Description",
132
+ "hideWhenEmpty": true
133
+ },
134
+ {
135
+ "key": "website",
136
+ "label": "Website",
137
+ "format": "link",
138
+ "hideWhenEmpty": true,
139
+ "tooltip": "Issuer-supplied project website."
140
+ },
141
+ {
142
+ "key": "_communityUrl",
143
+ "label": "Community",
144
+ "format": "link",
145
+ "hideWhenEmpty": true,
146
+ "tooltip": "Community channel URL supplied by the issuer."
147
+ },
148
+ {
149
+ "key": "genesisTime",
150
+ "label": "Created",
151
+ "format": "datetime",
152
+ "interactive": true,
153
+ "hideWhenEmpty": true,
154
+ "tooltip": "Block timestamp when the token was created. Click to switch between UTC, Local time, and Unix Timestamp."
155
+ },
156
+ {
157
+ "key": "renaissanceTime",
158
+ "label": "Updated",
159
+ "format": "datetime",
160
+ "interactive": true,
161
+ "hideWhenEmpty": true,
162
+ "tooltip": "Block timestamp of the most recent state change. Click to switch between UTC, Local time, and Unix Timestamp."
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ "id": "tok-card-info",
168
+ "title": "Token Info",
169
+ "fields": [
170
+ {
171
+ "key": "_issuerName",
172
+ "label": "Issuer Name",
173
+ "hideWhenEmpty": true,
174
+ "tooltip": "Issuer's display name as written into the token metadata."
175
+ },
176
+ {
177
+ "key": "issuer",
178
+ "label": "Issued By",
179
+ "format": "did",
180
+ "navigateTo": "accounts/{value}",
181
+ "hideWhenEmpty": true,
182
+ "tooltip": "On-chain DID of the account that minted the token."
183
+ },
184
+ {
185
+ "key": "tokenFactoryAddress",
186
+ "label": "Token Factory",
187
+ "format": "did",
188
+ "navigateTo": "factories/{value}",
189
+ "hideWhenEmpty": true,
190
+ "tooltip": "Bonding-curve factory that owns this token's mint / burn lifecycle."
191
+ },
192
+ {
193
+ "key": "symbol",
194
+ "label": "Symbol",
195
+ "monospace": true,
196
+ "tooltip": "Trading symbol on-chain (case-sensitive)."
197
+ },
198
+ {
199
+ "key": "decimal",
200
+ "label": "Decimals",
201
+ "format": "number",
202
+ "tooltip": "Number of fractional digits used when displaying this token (e.g. 18 = wei-style)."
203
+ }
204
+ ]
205
+ },
206
+ {
207
+ "id": "tok-card-permissions",
208
+ "title": "Permissions",
209
+ "hideWhenEmpty": true,
210
+ "fields": [
211
+ {
212
+ "key": "spenders",
213
+ "label": "Spenders",
214
+ "format": "did-list",
215
+ "navigateTo": "accounts/{value}",
216
+ "hideWhenEmpty": true,
217
+ "tooltip": "Addresses authorized to transfer this token."
218
+ },
219
+ {
220
+ "key": "minters",
221
+ "label": "Minters",
222
+ "format": "did-list",
223
+ "navigateTo": "accounts/{value}",
224
+ "hideWhenEmpty": true,
225
+ "tooltip": "Addresses authorized to mint or burn this token."
226
+ }
227
+ ]
228
+ }
229
+ ]
230
+ }
231
+ },
232
+ {
233
+ "id": "tok-tabs",
234
+ "type": "view",
235
+ "props": {
236
+ "mode": "tabs",
237
+ "layout": { "direction": "column", "gap": "sm" }
238
+ },
239
+ "children": [
240
+ {
241
+ "id": "tok-tab-transactions",
242
+ "type": "view",
243
+ "props": {
244
+ "mode": "card",
245
+ "tabLabel": "Transactions",
246
+ "tabIcon": "file-text",
247
+ "layout": { "direction": "column", "gap": "xs" }
248
+ },
249
+ "children": [
250
+ {
251
+ "id": "tok-tab-transactions-list",
252
+ "type": "afs-list",
253
+ "src": "${_parentPath}/transactions",
254
+ "props": {
255
+ "layout": "table",
256
+ "columns": [
257
+ { "key": "content.hash", "label": "Hash", "format": "did", "width": "180px" },
258
+ {
259
+ "key": "content._typeName",
260
+ "label": "Type",
261
+ "format": "colored-badge",
262
+ "colorKey": "content._methodColor",
263
+ "width": "150px"
264
+ },
265
+ {
266
+ "key": "content.sender",
267
+ "label": "From",
268
+ "format": "did",
269
+ "width": "150px"
270
+ },
271
+ {
272
+ "label": "",
273
+ "format": "direction-pill",
274
+ "pillContextKey": "content._currentAccount",
275
+ "pillSenderKey": "content.sender",
276
+ "pillReceiverKey": "content.receiver",
277
+ "width": "60px",
278
+ "align": "center"
279
+ },
280
+ {
281
+ "key": "content.receiver",
282
+ "label": "To",
283
+ "format": "did",
284
+ "width": "150px"
285
+ },
286
+ {
287
+ "key": "content.value",
288
+ "label": "Value",
289
+ "format": "bignum:@{content.decimal}",
290
+ "symbol": "@{content.symbol}",
291
+ "width": "150px",
292
+ "align": "right"
293
+ },
294
+ {
295
+ "key": "content._gasFeeRaw",
296
+ "label": "Fee",
297
+ "hideBelow": "tablet-wide",
298
+ "format": "bignum:18",
299
+ "symbol": "ABT",
300
+ "strikethrough": "@{content._gasExempted}",
301
+ "width": "120px",
302
+ "align": "right"
303
+ },
304
+ {
305
+ "key": "content.time",
306
+ "label": "Time",
307
+ "format": "timeago",
308
+ "width": "120px"
309
+ }
310
+ ],
311
+ "pageSize": 10,
312
+ "pagination": "manual",
313
+ "clickMode": "both",
314
+ "autoSelect": false,
315
+ "filter": { "exclude": ".." },
316
+ "showBreadcrumb": false
317
+ }
318
+ }
319
+ ]
320
+ },
321
+ {
322
+ "id": "tok-tab-holders",
323
+ "type": "view",
324
+ "props": {
325
+ "mode": "card",
326
+ "tabLabel": "Top Holders",
327
+ "tabIcon": "user-check",
328
+ "layout": { "direction": "column", "gap": "xs" }
329
+ },
330
+ "children": [
331
+ {
332
+ "id": "tok-tab-holders-list",
333
+ "type": "afs-list",
334
+ "src": "${_parentPath}/holders",
335
+ "props": {
336
+ "layout": "table",
337
+ "columns": [
338
+ {
339
+ "key": "content.address",
340
+ "label": "Address",
341
+ "format": "did",
342
+ "width": "200px"
343
+ },
344
+ {
345
+ "key": "content._monikerDisplay",
346
+ "label": "Name",
347
+ "width": "150px"
348
+ },
349
+ {
350
+ "key": "content._tokenBalance",
351
+ "label": "Balance",
352
+ "format": "bignum:@{content._tokenDecimal}",
353
+ "symbol": "@{content._tokenSymbol}",
354
+ "width": "150px",
355
+ "align": "right"
356
+ },
357
+ {
358
+ "key": "content.genesisTime",
359
+ "label": "Created",
360
+ "format": "timeago",
361
+ "width": "120px"
362
+ },
363
+ {
364
+ "key": "content.renaissanceTime",
365
+ "label": "Updated",
366
+ "hideBelow": "tablet-wide",
367
+ "format": "timeago",
368
+ "width": "120px"
369
+ }
370
+ ],
371
+ "pageSize": 10,
372
+ "pagination": "manual",
373
+ "clickMode": "both",
374
+ "autoSelect": false,
375
+ "filter": { "exclude": ".." },
376
+ "showBreadcrumb": false
377
+ }
378
+ }
379
+ ]
380
+ }
381
+ ]
382
+ }
383
+ ]
384
+ }
@@ -0,0 +1,102 @@
1
+ {
2
+ "id": "txs-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": "txs-view-toggle",
17
+ "type": "live-toggle",
18
+ "props": {
19
+ "label": "Live updates"
20
+ }
21
+ },
22
+ {
23
+ "id": "txs-view-list",
24
+ "type": "afs-list",
25
+ "src": "${_parentPath}",
26
+ "props": {
27
+ "listOptions": "${listOptions}",
28
+ "layout": "table",
29
+ "columns": [
30
+ {
31
+ "key": "content.hash",
32
+ "label": "Hash",
33
+ "mobileRole": "title",
34
+ "format": "did",
35
+ "width": "180px"
36
+ },
37
+ {
38
+ "key": "content._typeName",
39
+ "label": "Type",
40
+ "format": "colored-badge",
41
+ "colorKey": "content._methodColor",
42
+ "width": "150px"
43
+ },
44
+ {
45
+ "key": "content.sender",
46
+ "label": "From",
47
+ "format": "did",
48
+ "width": "150px"
49
+ },
50
+ {
51
+ "label": "",
52
+ "format": "direction-pill",
53
+ "pillContextKey": "content._currentAccount",
54
+ "pillSenderKey": "content.sender",
55
+ "pillReceiverKey": "content.receiver",
56
+ "width": "60px",
57
+ "align": "center"
58
+ },
59
+ {
60
+ "key": "content.receiver",
61
+ "label": "To",
62
+ "format": "did",
63
+ "width": "150px"
64
+ },
65
+ {
66
+ "key": "content.value",
67
+ "label": "Value",
68
+ "format": "bignum:@{content.decimal}",
69
+ "symbol": "@{content.symbol}",
70
+ "suffix": "@{content._valueLegCountSuffix}",
71
+ "width": "150px",
72
+ "align": "right"
73
+ },
74
+ {
75
+ "key": "content._gasFeeRaw",
76
+ "label": "Fee",
77
+ "hideBelow": "tablet-wide",
78
+ "format": "bignum:18",
79
+ "symbol": "ABT",
80
+ "strikethrough": "@{content._gasExempted}",
81
+ "width": "120px",
82
+ "align": "right"
83
+ },
84
+ {
85
+ "key": "content.time",
86
+ "label": "Time",
87
+ "format": "timeago",
88
+ "width": "120px"
89
+ }
90
+ ],
91
+ "pageSize": 20,
92
+ "pagination": "manual",
93
+ "clickMode": "both",
94
+ "autoSelect": false,
95
+ "filter": {
96
+ "exclude": ".."
97
+ },
98
+ "showBreadcrumb": false
99
+ }
100
+ }
101
+ ]
102
+ }