@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,76 @@
1
+ {
2
+ "id": "stakes-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": "stakes-title",
17
+ "type": "text",
18
+ "props": { "content": "Stakes", "level": 1 }
19
+ },
20
+ {
21
+ "id": "stakes-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.sender",
36
+ "label": "Sender",
37
+ "format": "did",
38
+ "width": "180px"
39
+ },
40
+ {
41
+ "key": "content.receiver",
42
+ "label": "Receiver",
43
+ "format": "did",
44
+ "width": "180px"
45
+ },
46
+ {
47
+ "key": "content.message",
48
+ "label": "Message",
49
+ "width": "200px"
50
+ },
51
+ {
52
+ "key": "content.genesisTime",
53
+ "label": "Created",
54
+ "format": "timeago",
55
+ "width": "120px"
56
+ },
57
+ {
58
+ "key": "content.renaissanceTime",
59
+ "label": "Updated",
60
+ "hideBelow": "tablet-wide",
61
+ "format": "timeago",
62
+ "width": "120px"
63
+ }
64
+ ],
65
+ "pageSize": 20,
66
+ "pagination": "manual",
67
+ "clickMode": "both",
68
+ "autoSelect": false,
69
+ "filter": {
70
+ "exclude": ".."
71
+ },
72
+ "showBreadcrumb": false
73
+ }
74
+ }
75
+ ]
76
+ }
@@ -0,0 +1,374 @@
1
+ {
2
+ "id": "stake-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": "sk-header",
12
+ "type": "view",
13
+ "props": {
14
+ "layout": { "direction": "row", "gap": "md", "crossAlign": "center" }
15
+ },
16
+ "children": [
17
+ {
18
+ "id": "sk-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": "sk-title-block",
29
+ "type": "view",
30
+ "props": { "layout": { "direction": "column", "gap": "xs", "crossAlign": "start" } },
31
+ "children": [
32
+ {
33
+ "id": "sk-title",
34
+ "type": "text",
35
+ "props": {
36
+ "content": "Stake",
37
+ "level": 2
38
+ }
39
+ },
40
+ {
41
+ "id": "sk-meta",
42
+ "type": "view",
43
+ "props": {
44
+ "layout": { "direction": "row", "gap": "sm", "crossAlign": "center" }
45
+ },
46
+ "children": [
47
+ {
48
+ "id": "sk-addr",
49
+ "type": "text",
50
+ "props": {
51
+ "content": "${content.address}",
52
+ "scale": "sm",
53
+ "format": "did"
54
+ }
55
+ },
56
+ {
57
+ "id": "sk-revocable-badge",
58
+ "type": "text",
59
+ "props": {
60
+ "content": "${content.revocable|boolean:Revocable:Non-Revocable}",
61
+ "variant": "badge",
62
+ "intent": "${content.revocable|boolean:warning:info}"
63
+ }
64
+ }
65
+ ]
66
+ }
67
+ ]
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "id": "sk-overview",
73
+ "type": "entity-overview",
74
+ "props": {
75
+ "layout": "row",
76
+ "data": "${content}",
77
+ "cards": [
78
+ {
79
+ "id": "sk-card-info",
80
+ "title": "Stake Info",
81
+ "fields": [
82
+ {
83
+ "key": "address",
84
+ "label": "Address",
85
+ "format": "did",
86
+ "tooltip": "Stake DID. Click to copy."
87
+ },
88
+ {
89
+ "key": "sender",
90
+ "label": "Sender",
91
+ "format": "did",
92
+ "navigateTo": "accounts/{value}",
93
+ "tooltip": "Account that created the stake."
94
+ },
95
+ {
96
+ "key": "receiver",
97
+ "label": "Receiver",
98
+ "format": "did",
99
+ "navigateTo": "accounts/{value}",
100
+ "tooltip": "Account that receives the stake."
101
+ },
102
+ {
103
+ "key": "revocable",
104
+ "label": "Revocable",
105
+ "format": "boolean:Yes:No",
106
+ "tooltip": "If true, the sender can revoke the stake after the waiting period."
107
+ },
108
+ {
109
+ "key": "message",
110
+ "label": "Message",
111
+ "hideWhenEmpty": true,
112
+ "tooltip": "Optional message attached when the stake was created."
113
+ },
114
+ {
115
+ "key": "firstSlasher",
116
+ "label": "Who Can Slash?",
117
+ "format": "did",
118
+ "navigateTo": "accounts/{value}",
119
+ "hideWhenEmpty": true,
120
+ "tooltip": "First account in the slashers list with permission to slash this stake."
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ "id": "sk-card-lifecycle",
126
+ "title": "Lifecycle",
127
+ "fields": [
128
+ {
129
+ "key": "context.genesisTime",
130
+ "label": "Created",
131
+ "format": "datetime",
132
+ "interactive": true,
133
+ "tooltip": "Block timestamp when the stake was created. Click to switch between UTC, Local time, and Unix Timestamp."
134
+ },
135
+ {
136
+ "key": "context.renaissanceTime",
137
+ "label": "Updated",
138
+ "format": "datetime",
139
+ "interactive": true,
140
+ "hideWhenEmpty": true,
141
+ "tooltip": "Block timestamp of the most recent state change. Click to switch between UTC, Local time, and Unix Timestamp."
142
+ },
143
+ {
144
+ "key": "revokeWaitingPeriod",
145
+ "label": "Revoke Waiting Period",
146
+ "format": "duration",
147
+ "hideWhenEmpty": true,
148
+ "tooltip": "Time the sender must wait after issuing a revoke before funds are returned (in seconds on-chain; rendered as a human-readable duration)."
149
+ }
150
+ ]
151
+ }
152
+ ]
153
+ }
154
+ },
155
+ {
156
+ "id": "sk-tabs",
157
+ "type": "view",
158
+ "props": {
159
+ "mode": "tabs"
160
+ },
161
+ "children": [
162
+ {
163
+ "id": "sk-tab-txs",
164
+ "type": "view",
165
+ "props": {
166
+ "tabLabel": "Transactions",
167
+ "tabIcon": "file-text",
168
+ "layout": {
169
+ "direction": "column",
170
+ "gap": "none"
171
+ }
172
+ },
173
+ "children": [
174
+ {
175
+ "id": "sk-tx-list",
176
+ "type": "afs-list",
177
+ "src": "${_parentPath}/transactions",
178
+ "props": {
179
+ "layout": "table",
180
+ "columns": [
181
+ {
182
+ "key": "content.hash",
183
+ "label": "Hash",
184
+ "format": "did",
185
+ "width": "180px"
186
+ },
187
+ {
188
+ "key": "content._typeName",
189
+ "label": "Type",
190
+ "format": "colored-badge",
191
+ "colorKey": "content._methodColor",
192
+ "width": "150px"
193
+ },
194
+ {
195
+ "key": "content.sender",
196
+ "label": "From",
197
+ "format": "did",
198
+ "width": "150px"
199
+ },
200
+ {
201
+ "key": "content.receiver",
202
+ "label": "To",
203
+ "format": "did",
204
+ "width": "150px"
205
+ },
206
+ {
207
+ "key": "content.value",
208
+ "label": "Value",
209
+ "format": "bignum:@{content.decimal}",
210
+ "symbol": "@{content.symbol}",
211
+ "width": "150px",
212
+ "align": "right"
213
+ },
214
+ {
215
+ "key": "content._gasFeeRaw",
216
+ "label": "Fee",
217
+ "hideBelow": "tablet-wide",
218
+ "format": "bignum:18",
219
+ "symbol": "ABT",
220
+ "strikethrough": "@{content._gasExempted}",
221
+ "width": "120px",
222
+ "align": "right"
223
+ },
224
+ {
225
+ "key": "content.time",
226
+ "label": "Time",
227
+ "format": "timeago",
228
+ "width": "120px"
229
+ }
230
+ ],
231
+ "pageSize": 10,
232
+ "pagination": "manual",
233
+ "clickMode": "both",
234
+ "autoSelect": false,
235
+ "filter": {
236
+ "exclude": ".."
237
+ },
238
+ "showBreadcrumb": false
239
+ }
240
+ }
241
+ ]
242
+ },
243
+ {
244
+ "id": "sk-tab-tokens",
245
+ "type": "view",
246
+ "props": {
247
+ "tabLabel": "Tokens",
248
+ "tabIcon": "dollar-sign",
249
+ "layout": {
250
+ "direction": "column",
251
+ "gap": "none"
252
+ }
253
+ },
254
+ "children": [
255
+ {
256
+ "id": "sk-tokens-list",
257
+ "type": "afs-list",
258
+ "src": "${_parentPath}/tokens",
259
+ "props": {
260
+ "layout": "table",
261
+ "columns": [
262
+ {
263
+ "key": "content.address",
264
+ "label": "DID",
265
+ "format": "did",
266
+ "width": "180px",
267
+ "navigateTo": "tokens/{value}"
268
+ },
269
+ {
270
+ "key": "content.staked",
271
+ "label": "Staked",
272
+ "format": "bignum:@{content.decimal}",
273
+ "width": "140px"
274
+ },
275
+ {
276
+ "key": "content.revoked",
277
+ "label": "Revoked",
278
+ "format": "bignum:@{content.decimal}",
279
+ "width": "140px"
280
+ },
281
+ {
282
+ "key": "content.symbol",
283
+ "label": "Symbol",
284
+ "width": "80px"
285
+ }
286
+ ],
287
+ "pageSize": 20,
288
+ "pagination": "manual",
289
+ "clickMode": "both",
290
+ "autoSelect": false,
291
+ "filter": {
292
+ "exclude": ".."
293
+ },
294
+ "showBreadcrumb": false
295
+ }
296
+ }
297
+ ]
298
+ },
299
+ {
300
+ "id": "sk-tab-assets",
301
+ "type": "view",
302
+ "props": {
303
+ "tabLabel": "Assets",
304
+ "tabIcon": "shopping-bag",
305
+ "layout": {
306
+ "direction": "column",
307
+ "gap": "none"
308
+ }
309
+ },
310
+ "children": [
311
+ {
312
+ "id": "sk-assets-list",
313
+ "type": "afs-list",
314
+ "src": "${_parentPath}/assets",
315
+ "props": {
316
+ "layout": "table",
317
+ "columns": [
318
+ {
319
+ "key": "content.address",
320
+ "label": "Address",
321
+ "format": "did",
322
+ "width": "200px",
323
+ "navigateTo": "assets/{value}"
324
+ },
325
+ {
326
+ "key": "content.staked",
327
+ "label": "Staked",
328
+ "width": "80px"
329
+ },
330
+ {
331
+ "key": "content.revoked",
332
+ "label": "Revoked",
333
+ "width": "80px"
334
+ }
335
+ ],
336
+ "pageSize": 20,
337
+ "pagination": "manual",
338
+ "clickMode": "both",
339
+ "autoSelect": false,
340
+ "filter": {
341
+ "exclude": ".."
342
+ },
343
+ "showBreadcrumb": false
344
+ }
345
+ }
346
+ ]
347
+ },
348
+ {
349
+ "id": "sk-tab-data",
350
+ "type": "view",
351
+ "props": {
352
+ "tabLabel": "Data",
353
+ "tabIcon": "hard-drive",
354
+ "layout": {
355
+ "direction": "column",
356
+ "gap": "none"
357
+ }
358
+ },
359
+ "children": [
360
+ {
361
+ "id": "sk-data-code",
362
+ "type": "text",
363
+ "props": {
364
+ "content": "${content|json:pretty}",
365
+ "format": "code",
366
+ "language": "json"
367
+ }
368
+ }
369
+ ]
370
+ }
371
+ ]
372
+ }
373
+ ]
374
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "id": "tokens-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": "tokens-title",
17
+ "type": "text",
18
+ "props": { "content": "Tokens", "level": 1 }
19
+ },
20
+ {
21
+ "id": "tokens-view-list",
22
+ "type": "afs-list",
23
+ "src": "${_parentPath}",
24
+ "props": {
25
+ "layout": "table",
26
+ "columns": [
27
+ {
28
+ "key": "content.name",
29
+ "label": "Name",
30
+ "mobileRole": "title",
31
+ "width": "160px"
32
+ },
33
+ {
34
+ "key": "content.symbol",
35
+ "label": "Symbol",
36
+ "width": "100px"
37
+ },
38
+ {
39
+ "key": "content.address",
40
+ "label": "Address",
41
+ "format": "did",
42
+ "width": "180px"
43
+ },
44
+ {
45
+ "key": "content.totalSupply",
46
+ "label": "Supply",
47
+ "format": "bignum:@{content.decimal}",
48
+ "width": "140px",
49
+ "align": "right"
50
+ },
51
+ {
52
+ "key": "content.genesisTime",
53
+ "label": "Created",
54
+ "format": "timeago",
55
+ "width": "120px"
56
+ },
57
+ {
58
+ "key": "content.renaissanceTime",
59
+ "label": "Updated",
60
+ "hideBelow": "tablet-wide",
61
+ "format": "timeago",
62
+ "width": "120px"
63
+ }
64
+ ],
65
+ "pageSize": 20,
66
+ "pagination": "manual",
67
+ "clickMode": "both",
68
+ "autoSelect": false,
69
+ "filter": {
70
+ "exclude": ".."
71
+ },
72
+ "showBreadcrumb": false
73
+ }
74
+ }
75
+ ]
76
+ }