@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,241 @@
1
+ {
2
+ "id": "delegate-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": "dlg-header",
12
+ "type": "view",
13
+ "props": {
14
+ "layout": { "direction": "row", "gap": "md", "crossAlign": "center" }
15
+ },
16
+ "children": [
17
+ {
18
+ "id": "dlg-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": "dlg-title-block",
29
+ "type": "view",
30
+ "props": { "layout": { "direction": "column", "gap": "xs", "crossAlign": "start" } },
31
+ "children": [
32
+ {
33
+ "id": "dlg-title",
34
+ "type": "text",
35
+ "props": { "content": "Delegation", "level": 2 }
36
+ },
37
+ {
38
+ "id": "dlg-addr",
39
+ "type": "text",
40
+ "props": {
41
+ "content": "${content.address}",
42
+ "scale": "sm",
43
+ "format": "did"
44
+ }
45
+ }
46
+ ]
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "id": "dlg-overview",
52
+ "type": "entity-overview",
53
+ "props": {
54
+ "layout": "row",
55
+ "data": "${content}",
56
+ "cards": [
57
+ {
58
+ "id": "dlg-card-info",
59
+ "title": "Delegation Info",
60
+ "fields": [
61
+ {
62
+ "key": "from",
63
+ "label": "Delegator (from)",
64
+ "format": "did",
65
+ "navigateTo": "accounts/{value}",
66
+ "tooltip": "Account that granted the delegation. Click to view."
67
+ },
68
+ {
69
+ "key": "to",
70
+ "label": "Delegatee (to)",
71
+ "format": "did",
72
+ "navigateTo": "accounts/{value}",
73
+ "tooltip": "Account that was granted permission to act on behalf of the delegator."
74
+ },
75
+ {
76
+ "key": "context.genesisTime",
77
+ "label": "Created At",
78
+ "format": "datetime",
79
+ "interactive": true,
80
+ "tooltip": "Block timestamp when the delegation was first established."
81
+ },
82
+ {
83
+ "key": "context.renaissanceTime",
84
+ "label": "Updated At",
85
+ "format": "datetime",
86
+ "interactive": true,
87
+ "tooltip": "Most recent time the delegation record was updated."
88
+ }
89
+ ]
90
+ }
91
+ ]
92
+ }
93
+ },
94
+ {
95
+ "id": "dlg-tabs",
96
+ "type": "view",
97
+ "props": {
98
+ "mode": "tabs",
99
+ "layout": { "direction": "column", "gap": "sm" }
100
+ },
101
+ "children": [
102
+ {
103
+ "id": "dlg-tab-txs",
104
+ "type": "view",
105
+ "props": {
106
+ "mode": "card",
107
+ "tabLabel": "Transactions",
108
+ "tabIcon": "file-text",
109
+ "layout": { "direction": "column", "gap": "xs" }
110
+ },
111
+ "children": [
112
+ {
113
+ "id": "dlg-tx-list",
114
+ "type": "afs-list",
115
+ "src": "${_parentPath}/transactions",
116
+ "props": {
117
+ "layout": "table",
118
+ "columns": [
119
+ { "key": "content.hash", "label": "Hash", "format": "did", "width": "180px" },
120
+ {
121
+ "key": "content._typeName",
122
+ "label": "Type",
123
+ "format": "colored-badge",
124
+ "colorKey": "content._methodColor",
125
+ "width": "150px"
126
+ },
127
+ {
128
+ "key": "content.sender",
129
+ "label": "From",
130
+ "format": "did",
131
+ "width": "150px"
132
+ },
133
+ {
134
+ "key": "content.receiver",
135
+ "label": "To",
136
+ "format": "did",
137
+ "width": "150px"
138
+ },
139
+ {
140
+ "key": "content.value",
141
+ "label": "Value",
142
+ "format": "bignum:@{content.decimal}",
143
+ "symbol": "@{content.symbol}",
144
+ "width": "150px",
145
+ "align": "right"
146
+ },
147
+ {
148
+ "key": "content._gasFeeRaw",
149
+ "label": "Fee",
150
+ "hideBelow": "tablet-wide",
151
+ "format": "bignum:18",
152
+ "symbol": "ABT",
153
+ "strikethrough": "@{content._gasExempted}",
154
+ "width": "120px",
155
+ "align": "right"
156
+ },
157
+ { "key": "content.time", "label": "Time", "format": "timeago", "width": "120px" }
158
+ ],
159
+ "pageSize": 10,
160
+ "pagination": "manual",
161
+ "clickMode": "both",
162
+ "autoSelect": false,
163
+ "filter": { "exclude": ".." },
164
+ "showBreadcrumb": false
165
+ }
166
+ }
167
+ ]
168
+ },
169
+ {
170
+ "id": "dlg-tab-perms",
171
+ "type": "view",
172
+ "props": {
173
+ "mode": "card",
174
+ "tabLabel": "Permissions",
175
+ "tabIcon": "shield-check",
176
+ "layout": { "direction": "column", "gap": "xs" }
177
+ },
178
+ "children": [
179
+ {
180
+ "id": "dlg-perms-list",
181
+ "type": "afs-list",
182
+ "src": "${_parentPath}/permissions",
183
+ "props": {
184
+ "layout": "table",
185
+ "columns": [
186
+ { "key": "content.typeUrl", "label": "Operation Type", "width": "220px" },
187
+ { "key": "content.rule", "label": "Rule", "width": "120px" },
188
+ {
189
+ "key": "content.numTxs",
190
+ "label": "Num Txs",
191
+ "format": "number",
192
+ "width": "100px"
193
+ },
194
+ {
195
+ "key": "content.balance",
196
+ "label": "Balance",
197
+ "format": "bignum:18",
198
+ "symbol": "ABT",
199
+ "width": "140px"
200
+ }
201
+ ],
202
+ "pageSize": 20,
203
+ "pagination": "none",
204
+ "autoSelect": false,
205
+ "filter": { "exclude": ".." },
206
+ "showBreadcrumb": false
207
+ }
208
+ }
209
+ ]
210
+ },
211
+ {
212
+ "id": "dlg-tab-data",
213
+ "type": "view",
214
+ "props": {
215
+ "mode": "card",
216
+ "tabLabel": "Data",
217
+ "tabIcon": "hard-drive",
218
+ "layout": { "direction": "column", "gap": "xs" }
219
+ },
220
+ "children": [
221
+ {
222
+ "id": "dlg-data-kv",
223
+ "type": "key-value-list",
224
+ "props": {
225
+ "data": "${content}",
226
+ "fields": [
227
+ {
228
+ "key": "dataJson",
229
+ "label": "Raw Data",
230
+ "format": "json",
231
+ "tooltip": "Encoded payload attached to the delegation."
232
+ }
233
+ ]
234
+ }
235
+ }
236
+ ]
237
+ }
238
+ ]
239
+ }
240
+ ]
241
+ }
@@ -0,0 +1,78 @@
1
+ {
2
+ "id": "factories-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": "factories-title",
17
+ "type": "text",
18
+ "props": { "content": "Factories", "level": 1 }
19
+ },
20
+ {
21
+ "id": "factories-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": "180px"
32
+ },
33
+ {
34
+ "key": "content.address",
35
+ "label": "Address",
36
+ "format": "did",
37
+ "width": "200px"
38
+ },
39
+ {
40
+ "key": "content.numMinted",
41
+ "label": "Minted",
42
+ "format": "number",
43
+ "width": "100px",
44
+ "align": "right"
45
+ },
46
+ {
47
+ "key": "content._limitDisplay",
48
+ "label": "Limit",
49
+ "hideBelow": "tablet-wide",
50
+ "width": "100px",
51
+ "align": "right"
52
+ },
53
+ {
54
+ "key": "content.genesisTime",
55
+ "label": "Created",
56
+ "format": "timeago",
57
+ "width": "120px"
58
+ },
59
+ {
60
+ "key": "content.renaissanceTime",
61
+ "label": "Updated",
62
+ "hideBelow": "tablet-wide",
63
+ "format": "timeago",
64
+ "width": "120px"
65
+ }
66
+ ],
67
+ "pageSize": 20,
68
+ "pagination": "manual",
69
+ "clickMode": "both",
70
+ "autoSelect": false,
71
+ "filter": {
72
+ "exclude": ".."
73
+ },
74
+ "showBreadcrumb": false
75
+ }
76
+ }
77
+ ]
78
+ }
@@ -0,0 +1,310 @@
1
+ {
2
+ "id": "factory-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": "fc-header",
12
+ "type": "view",
13
+ "props": {
14
+ "layout": { "direction": "row", "gap": "md", "crossAlign": "center" }
15
+ },
16
+ "children": [
17
+ {
18
+ "id": "fc-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": "fc-title-block",
29
+ "type": "view",
30
+ "props": { "layout": { "direction": "column", "gap": "xs", "crossAlign": "start" } },
31
+ "children": [
32
+ {
33
+ "id": "fc-title",
34
+ "type": "text",
35
+ "props": {
36
+ "content": "${content.name|default:Factory}",
37
+ "level": 2
38
+ }
39
+ },
40
+ {
41
+ "id": "fc-meta",
42
+ "type": "view",
43
+ "props": {
44
+ "layout": { "direction": "row", "gap": "sm", "crossAlign": "center" }
45
+ },
46
+ "children": [
47
+ {
48
+ "id": "fc-addr",
49
+ "type": "text",
50
+ "props": {
51
+ "content": "${content.address}",
52
+ "scale": "sm",
53
+ "format": "did"
54
+ }
55
+ },
56
+ {
57
+ "id": "fc-badge",
58
+ "type": "text",
59
+ "props": {
60
+ "content": "Factory",
61
+ "intent": "info",
62
+ "variant": "badge"
63
+ }
64
+ }
65
+ ]
66
+ }
67
+ ]
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "id": "fc-overview",
73
+ "type": "entity-overview",
74
+ "props": {
75
+ "data": "${content}",
76
+ "cards": [
77
+ {
78
+ "id": "fc-card-info",
79
+ "title": "Factory Info",
80
+ "fields": [
81
+ {
82
+ "key": "address",
83
+ "label": "Address",
84
+ "format": "did",
85
+ "tooltip": "Factory DID. Click to copy."
86
+ },
87
+ {
88
+ "key": "name",
89
+ "label": "Name",
90
+ "hideWhenEmpty": true,
91
+ "tooltip": "Display name of the factory."
92
+ },
93
+ {
94
+ "key": "description",
95
+ "label": "Description",
96
+ "hideWhenEmpty": true
97
+ },
98
+ {
99
+ "key": "owner",
100
+ "label": "Owner",
101
+ "format": "did",
102
+ "navigateTo": "accounts/{value}",
103
+ "tooltip": "Account that owns this factory."
104
+ },
105
+ {
106
+ "key": "settlement",
107
+ "label": "Settlement",
108
+ "hideWhenEmpty": true,
109
+ "tooltip": "Settlement strategy for this factory."
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ "id": "fc-card-production",
115
+ "title": "Production",
116
+ "fields": [
117
+ {
118
+ "key": "numMinted",
119
+ "label": "Minted",
120
+ "format": "number",
121
+ "tooltip": "Number of assets minted from this factory."
122
+ },
123
+ {
124
+ "key": "_limitDisplay",
125
+ "label": "Limit",
126
+ "tooltip": "Maximum number of assets allowed; \"Unlimited\" means no cap."
127
+ },
128
+ {
129
+ "key": "genesisTime",
130
+ "label": "Created",
131
+ "format": "datetime",
132
+ "interactive": true,
133
+ "tooltip": "Block timestamp when the factory was created. Click to switch between UTC, Local time, and Unix Timestamp."
134
+ },
135
+ {
136
+ "key": "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
+ }
145
+ ]
146
+ }
147
+ },
148
+ {
149
+ "id": "fc-tabs",
150
+ "type": "view",
151
+ "props": {
152
+ "mode": "tabs"
153
+ },
154
+ "children": [
155
+ {
156
+ "id": "fc-tab-txs",
157
+ "type": "view",
158
+ "props": {
159
+ "tabLabel": "Transactions",
160
+ "tabIcon": "file-text",
161
+ "layout": {
162
+ "direction": "column",
163
+ "gap": "none"
164
+ }
165
+ },
166
+ "children": [
167
+ {
168
+ "id": "fc-tx-list",
169
+ "type": "afs-list",
170
+ "src": "${_parentPath}/transactions",
171
+ "props": {
172
+ "layout": "table",
173
+ "columns": [
174
+ {
175
+ "key": "content.hash",
176
+ "label": "Hash",
177
+ "format": "did",
178
+ "width": "180px"
179
+ },
180
+ {
181
+ "key": "content._typeName",
182
+ "label": "Type",
183
+ "format": "colored-badge",
184
+ "colorKey": "content._methodColor",
185
+ "width": "150px"
186
+ },
187
+ {
188
+ "key": "content.sender",
189
+ "label": "From",
190
+ "format": "did",
191
+ "width": "150px"
192
+ },
193
+ {
194
+ "label": "",
195
+ "format": "direction-pill",
196
+ "pillContextKey": "content._currentAccount",
197
+ "pillSenderKey": "content.sender",
198
+ "pillReceiverKey": "content.receiver",
199
+ "width": "60px",
200
+ "align": "center"
201
+ },
202
+ {
203
+ "key": "content.receiver",
204
+ "label": "To",
205
+ "format": "did",
206
+ "width": "150px"
207
+ },
208
+ {
209
+ "key": "content.value",
210
+ "label": "Value",
211
+ "format": "bignum:@{content.decimal}",
212
+ "symbol": "@{content.symbol}",
213
+ "width": "150px",
214
+ "align": "right"
215
+ },
216
+ {
217
+ "key": "content._gasFeeRaw",
218
+ "label": "Fee",
219
+ "hideBelow": "tablet-wide",
220
+ "format": "bignum:18",
221
+ "symbol": "ABT",
222
+ "strikethrough": "@{content._gasExempted}",
223
+ "width": "120px",
224
+ "align": "right"
225
+ },
226
+ {
227
+ "key": "content.time",
228
+ "label": "Time",
229
+ "format": "timeago",
230
+ "width": "120px"
231
+ }
232
+ ],
233
+ "pageSize": 10,
234
+ "pagination": "manual",
235
+ "clickMode": "both",
236
+ "autoSelect": false,
237
+ "filter": {
238
+ "exclude": ".."
239
+ },
240
+ "showBreadcrumb": false
241
+ }
242
+ }
243
+ ]
244
+ },
245
+ {
246
+ "id": "fc-tab-assets",
247
+ "type": "view",
248
+ "props": {
249
+ "tabLabel": "Assets",
250
+ "tabIcon": "shopping-bag",
251
+ "layout": {
252
+ "direction": "column",
253
+ "gap": "none"
254
+ }
255
+ },
256
+ "children": [
257
+ {
258
+ "id": "fc-asset-list",
259
+ "type": "afs-list",
260
+ "src": "${_parentPath}/assets",
261
+ "props": {
262
+ "layout": "table",
263
+ "columns": [
264
+ {
265
+ "key": "content.address",
266
+ "label": "Address",
267
+ "format": "did",
268
+ "width": "180px"
269
+ },
270
+ {
271
+ "key": "content.moniker",
272
+ "label": "Name",
273
+ "width": "150px"
274
+ },
275
+ {
276
+ "key": "content.owner",
277
+ "label": "Owner",
278
+ "format": "did",
279
+ "width": "160px"
280
+ },
281
+ {
282
+ "key": "content.genesisTime",
283
+ "label": "Created",
284
+ "format": "timeago",
285
+ "width": "120px"
286
+ },
287
+ {
288
+ "key": "content.renaissanceTime",
289
+ "label": "Updated",
290
+ "hideBelow": "tablet-wide",
291
+ "format": "timeago",
292
+ "width": "120px"
293
+ }
294
+ ],
295
+ "pageSize": 10,
296
+ "pagination": "manual",
297
+ "clickMode": "both",
298
+ "autoSelect": false,
299
+ "filter": {
300
+ "exclude": ".."
301
+ },
302
+ "showBreadcrumb": false
303
+ }
304
+ }
305
+ ]
306
+ }
307
+ ]
308
+ }
309
+ ]
310
+ }