@thalalabs/surf 0.0.13 → 0.0.14

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 (91) hide show
  1. package/.changeset/README.md +1 -1
  2. package/.github/dependabot.yml +3 -3
  3. package/.github/workflows/publish.yml +2 -2
  4. package/CHANGELOG.md +6 -0
  5. package/README.md +18 -11
  6. package/build/cjs/abi/aggregator.js +56 -74
  7. package/build/cjs/abi/aggregator.js.map +1 -1
  8. package/build/cjs/abi/aptos_coin.js +98 -125
  9. package/build/cjs/abi/aptos_coin.js.map +1 -1
  10. package/build/cjs/abi/coin.js +456 -587
  11. package/build/cjs/abi/coin.js.map +1 -1
  12. package/build/cjs/abi/event.js +66 -106
  13. package/build/cjs/abi/event.js.map +1 -1
  14. package/build/cjs/abi/fixed_point64.js +287 -320
  15. package/build/cjs/abi/fixed_point64.js.map +1 -1
  16. package/build/cjs/abi/guid.js +84 -129
  17. package/build/cjs/abi/guid.js.map +1 -1
  18. package/build/cjs/abi/optional_aggregator.js +79 -108
  19. package/build/cjs/abi/optional_aggregator.js.map +1 -1
  20. package/build/cjs/abi/table.js +131 -222
  21. package/build/cjs/abi/table.js.map +1 -1
  22. package/build/cjs/core/Client.js +6 -2
  23. package/build/cjs/core/Client.js.map +1 -1
  24. package/build/cjs/core/createEntryPayload.js.map +1 -1
  25. package/build/cjs/ensureTypes.js +11 -10
  26. package/build/cjs/ensureTypes.js.map +1 -1
  27. package/build/cjs/index.js.map +1 -1
  28. package/build/esm/abi/aggregator.js +56 -74
  29. package/build/esm/abi/aggregator.js.map +1 -1
  30. package/build/esm/abi/aptos_coin.js +98 -125
  31. package/build/esm/abi/aptos_coin.js.map +1 -1
  32. package/build/esm/abi/coin.js +456 -587
  33. package/build/esm/abi/coin.js.map +1 -1
  34. package/build/esm/abi/event.js +66 -106
  35. package/build/esm/abi/event.js.map +1 -1
  36. package/build/esm/abi/fixed_point64.js +287 -320
  37. package/build/esm/abi/fixed_point64.js.map +1 -1
  38. package/build/esm/abi/guid.js +84 -129
  39. package/build/esm/abi/guid.js.map +1 -1
  40. package/build/esm/abi/optional_aggregator.js +79 -108
  41. package/build/esm/abi/optional_aggregator.js.map +1 -1
  42. package/build/esm/abi/table.js +131 -222
  43. package/build/esm/abi/table.js.map +1 -1
  44. package/build/esm/core/Client.js +6 -2
  45. package/build/esm/core/Client.js.map +1 -1
  46. package/build/esm/core/createEntryPayload.js.map +1 -1
  47. package/build/esm/ensureTypes.js +11 -10
  48. package/build/esm/ensureTypes.js.map +1 -1
  49. package/build/esm/index.js +1 -1
  50. package/build/esm/index.js.map +1 -1
  51. package/build/types/abi/aggregator.d.ts.map +1 -1
  52. package/build/types/abi/aptos_coin.d.ts.map +1 -1
  53. package/build/types/abi/coin.d.ts.map +1 -1
  54. package/build/types/abi/event.d.ts.map +1 -1
  55. package/build/types/abi/fixed_point64.d.ts.map +1 -1
  56. package/build/types/abi/guid.d.ts.map +1 -1
  57. package/build/types/abi/optional_aggregator.d.ts.map +1 -1
  58. package/build/types/abi/table.d.ts.map +1 -1
  59. package/build/types/core/Client.d.ts.map +1 -1
  60. package/build/types/ensureTypes.d.ts.map +1 -1
  61. package/build/types/index.d.ts +2 -2
  62. package/build/types/index.d.ts.map +1 -1
  63. package/build/types/types/client/abiClient.d.ts +2 -0
  64. package/build/types/types/client/abiClient.d.ts.map +1 -1
  65. package/build/types/types/convertor/argsConvertor.d.ts +1 -1
  66. package/build/types/types/convertor/argsConvertor.d.ts.map +1 -1
  67. package/build/types/types/convertor/structConvertor.d.ts.map +1 -1
  68. package/build/types/types/moveTypes.d.ts.map +1 -1
  69. package/package.json +2 -2
  70. package/src/abi/aggregator.ts +73 -91
  71. package/src/abi/aptos_coin.ts +117 -144
  72. package/src/abi/coin.ts +646 -777
  73. package/src/abi/event.ts +83 -123
  74. package/src/abi/fixed_point64.ts +340 -373
  75. package/src/abi/guid.ts +102 -147
  76. package/src/abi/optional_aggregator.ts +103 -132
  77. package/src/abi/table.ts +181 -272
  78. package/src/core/Client.ts +6 -1
  79. package/src/core/__tests__/accountResource.test.ts +54 -14
  80. package/src/core/__tests__/createEntryPayload.test.ts +244 -250
  81. package/src/core/__tests__/createViewPayload.test.ts +44 -58
  82. package/src/core/__tests__/option.test.ts +1 -1
  83. package/src/core/__tests__/useABI.test.ts +72 -63
  84. package/src/core/__tests__/view.test.ts +76 -60
  85. package/src/core/createEntryPayload.ts +4 -3
  86. package/src/ensureTypes.ts +31 -28
  87. package/src/index.ts +8 -8
  88. package/src/types/client/abiClient.ts +2 -0
  89. package/src/types/convertor/argsConvertor.ts +1 -1
  90. package/src/types/convertor/structConvertor.ts +16 -15
  91. package/src/types/moveTypes.ts +5 -1
@@ -1,780 +1,649 @@
1
1
  export const COIN_ABI = {
2
- "address": "0x1",
3
- "name": "coin",
4
- "friends": [
5
- "0x1::aptos_coin",
6
- "0x1::genesis",
7
- "0x1::transaction_fee"
8
- ],
9
- "exposed_functions": [
10
- {
11
- "name": "allow_supply_upgrades",
12
- "visibility": "public",
13
- "is_entry": false,
14
- "is_view": false,
15
- "generic_type_params": [],
16
- "params": [
17
- "&signer",
18
- "bool"
2
+ address: '0x1',
3
+ name: 'coin',
4
+ friends: ['0x1::aptos_coin', '0x1::genesis', '0x1::transaction_fee'],
5
+ exposed_functions: [
6
+ {
7
+ name: 'allow_supply_upgrades',
8
+ visibility: 'public',
9
+ is_entry: false,
10
+ is_view: false,
11
+ generic_type_params: [],
12
+ params: ['&signer', 'bool'],
13
+ return: [],
14
+ },
15
+ {
16
+ name: 'balance',
17
+ visibility: 'public',
18
+ is_entry: false,
19
+ is_view: true,
20
+ generic_type_params: [
21
+ {
22
+ constraints: [],
23
+ },
19
24
  ],
20
- "return": []
25
+ params: ['address'],
26
+ return: ['u64'],
21
27
  },
22
28
  {
23
- "name": "balance",
24
- "visibility": "public",
25
- "is_entry": false,
26
- "is_view": true,
27
- "generic_type_params": [
29
+ name: 'burn',
30
+ visibility: 'public',
31
+ is_entry: false,
32
+ is_view: false,
33
+ generic_type_params: [
28
34
  {
29
- "constraints": []
30
- }
31
- ],
32
- "params": [
33
- "address"
35
+ constraints: [],
36
+ },
34
37
  ],
35
- "return": [
36
- "u64"
37
- ]
38
+ params: ['0x1::coin::Coin<T0>', '&0x1::coin::BurnCapability<T0>'],
39
+ return: [],
38
40
  },
39
41
  {
40
- "name": "burn",
41
- "visibility": "public",
42
- "is_entry": false,
43
- "is_view": false,
44
- "generic_type_params": [
42
+ name: 'burn_from',
43
+ visibility: 'public',
44
+ is_entry: false,
45
+ is_view: false,
46
+ generic_type_params: [
45
47
  {
46
- "constraints": []
47
- }
48
- ],
49
- "params": [
50
- "0x1::coin::Coin<T0>",
51
- "&0x1::coin::BurnCapability<T0>"
48
+ constraints: [],
49
+ },
52
50
  ],
53
- "return": []
51
+ params: ['address', 'u64', '&0x1::coin::BurnCapability<T0>'],
52
+ return: [],
54
53
  },
55
54
  {
56
- "name": "burn_from",
57
- "visibility": "public",
58
- "is_entry": false,
59
- "is_view": false,
60
- "generic_type_params": [
55
+ name: 'collect_into_aggregatable_coin',
56
+ visibility: 'friend',
57
+ is_entry: false,
58
+ is_view: false,
59
+ generic_type_params: [
61
60
  {
62
- "constraints": []
63
- }
64
- ],
65
- "params": [
66
- "address",
67
- "u64",
68
- "&0x1::coin::BurnCapability<T0>"
61
+ constraints: [],
62
+ },
69
63
  ],
70
- "return": []
64
+ params: ['address', 'u64', '&mut 0x1::coin::AggregatableCoin<T0>'],
65
+ return: [],
71
66
  },
72
67
  {
73
- "name": "collect_into_aggregatable_coin",
74
- "visibility": "friend",
75
- "is_entry": false,
76
- "is_view": false,
77
- "generic_type_params": [
68
+ name: 'decimals',
69
+ visibility: 'public',
70
+ is_entry: false,
71
+ is_view: true,
72
+ generic_type_params: [
78
73
  {
79
- "constraints": []
80
- }
81
- ],
82
- "params": [
83
- "address",
84
- "u64",
85
- "&mut 0x1::coin::AggregatableCoin<T0>"
74
+ constraints: [],
75
+ },
86
76
  ],
87
- "return": []
77
+ params: [],
78
+ return: ['u8'],
88
79
  },
89
80
  {
90
- "name": "decimals",
91
- "visibility": "public",
92
- "is_entry": false,
93
- "is_view": true,
94
- "generic_type_params": [
81
+ name: 'deposit',
82
+ visibility: 'public',
83
+ is_entry: false,
84
+ is_view: false,
85
+ generic_type_params: [
95
86
  {
96
- "constraints": []
97
- }
87
+ constraints: [],
88
+ },
98
89
  ],
99
- "params": [],
100
- "return": [
101
- "u8"
102
- ]
90
+ params: ['address', '0x1::coin::Coin<T0>'],
91
+ return: [],
103
92
  },
104
93
  {
105
- "name": "deposit",
106
- "visibility": "public",
107
- "is_entry": false,
108
- "is_view": false,
109
- "generic_type_params": [
94
+ name: 'destroy_burn_cap',
95
+ visibility: 'public',
96
+ is_entry: false,
97
+ is_view: false,
98
+ generic_type_params: [
110
99
  {
111
- "constraints": []
112
- }
113
- ],
114
- "params": [
115
- "address",
116
- "0x1::coin::Coin<T0>"
100
+ constraints: [],
101
+ },
117
102
  ],
118
- "return": []
103
+ params: ['0x1::coin::BurnCapability<T0>'],
104
+ return: [],
119
105
  },
120
106
  {
121
- "name": "destroy_burn_cap",
122
- "visibility": "public",
123
- "is_entry": false,
124
- "is_view": false,
125
- "generic_type_params": [
107
+ name: 'destroy_freeze_cap',
108
+ visibility: 'public',
109
+ is_entry: false,
110
+ is_view: false,
111
+ generic_type_params: [
126
112
  {
127
- "constraints": []
128
- }
129
- ],
130
- "params": [
131
- "0x1::coin::BurnCapability<T0>"
113
+ constraints: [],
114
+ },
132
115
  ],
133
- "return": []
116
+ params: ['0x1::coin::FreezeCapability<T0>'],
117
+ return: [],
134
118
  },
135
119
  {
136
- "name": "destroy_freeze_cap",
137
- "visibility": "public",
138
- "is_entry": false,
139
- "is_view": false,
140
- "generic_type_params": [
120
+ name: 'destroy_mint_cap',
121
+ visibility: 'public',
122
+ is_entry: false,
123
+ is_view: false,
124
+ generic_type_params: [
141
125
  {
142
- "constraints": []
143
- }
144
- ],
145
- "params": [
146
- "0x1::coin::FreezeCapability<T0>"
126
+ constraints: [],
127
+ },
147
128
  ],
148
- "return": []
129
+ params: ['0x1::coin::MintCapability<T0>'],
130
+ return: [],
149
131
  },
150
132
  {
151
- "name": "destroy_mint_cap",
152
- "visibility": "public",
153
- "is_entry": false,
154
- "is_view": false,
155
- "generic_type_params": [
133
+ name: 'destroy_zero',
134
+ visibility: 'public',
135
+ is_entry: false,
136
+ is_view: false,
137
+ generic_type_params: [
156
138
  {
157
- "constraints": []
158
- }
159
- ],
160
- "params": [
161
- "0x1::coin::MintCapability<T0>"
139
+ constraints: [],
140
+ },
162
141
  ],
163
- "return": []
142
+ params: ['0x1::coin::Coin<T0>'],
143
+ return: [],
164
144
  },
165
145
  {
166
- "name": "destroy_zero",
167
- "visibility": "public",
168
- "is_entry": false,
169
- "is_view": false,
170
- "generic_type_params": [
146
+ name: 'drain_aggregatable_coin',
147
+ visibility: 'friend',
148
+ is_entry: false,
149
+ is_view: false,
150
+ generic_type_params: [
171
151
  {
172
- "constraints": []
173
- }
174
- ],
175
- "params": [
176
- "0x1::coin::Coin<T0>"
152
+ constraints: [],
153
+ },
177
154
  ],
178
- "return": []
155
+ params: ['&mut 0x1::coin::AggregatableCoin<T0>'],
156
+ return: ['0x1::coin::Coin<T0>'],
179
157
  },
180
158
  {
181
- "name": "drain_aggregatable_coin",
182
- "visibility": "friend",
183
- "is_entry": false,
184
- "is_view": false,
185
- "generic_type_params": [
159
+ name: 'extract',
160
+ visibility: 'public',
161
+ is_entry: false,
162
+ is_view: false,
163
+ generic_type_params: [
186
164
  {
187
- "constraints": []
188
- }
189
- ],
190
- "params": [
191
- "&mut 0x1::coin::AggregatableCoin<T0>"
165
+ constraints: [],
166
+ },
192
167
  ],
193
- "return": [
194
- "0x1::coin::Coin<T0>"
195
- ]
168
+ params: ['&mut 0x1::coin::Coin<T0>', 'u64'],
169
+ return: ['0x1::coin::Coin<T0>'],
196
170
  },
197
171
  {
198
- "name": "extract",
199
- "visibility": "public",
200
- "is_entry": false,
201
- "is_view": false,
202
- "generic_type_params": [
172
+ name: 'extract_all',
173
+ visibility: 'public',
174
+ is_entry: false,
175
+ is_view: false,
176
+ generic_type_params: [
203
177
  {
204
- "constraints": []
205
- }
206
- ],
207
- "params": [
208
- "&mut 0x1::coin::Coin<T0>",
209
- "u64"
178
+ constraints: [],
179
+ },
210
180
  ],
211
- "return": [
212
- "0x1::coin::Coin<T0>"
213
- ]
181
+ params: ['&mut 0x1::coin::Coin<T0>'],
182
+ return: ['0x1::coin::Coin<T0>'],
214
183
  },
215
184
  {
216
- "name": "extract_all",
217
- "visibility": "public",
218
- "is_entry": false,
219
- "is_view": false,
220
- "generic_type_params": [
185
+ name: 'freeze_coin_store',
186
+ visibility: 'public',
187
+ is_entry: true,
188
+ is_view: false,
189
+ generic_type_params: [
221
190
  {
222
- "constraints": []
223
- }
224
- ],
225
- "params": [
226
- "&mut 0x1::coin::Coin<T0>"
191
+ constraints: [],
192
+ },
227
193
  ],
228
- "return": [
229
- "0x1::coin::Coin<T0>"
230
- ]
194
+ params: ['address', '&0x1::coin::FreezeCapability<T0>'],
195
+ return: [],
231
196
  },
232
197
  {
233
- "name": "freeze_coin_store",
234
- "visibility": "public",
235
- "is_entry": true,
236
- "is_view": false,
237
- "generic_type_params": [
198
+ name: 'initialize',
199
+ visibility: 'public',
200
+ is_entry: false,
201
+ is_view: false,
202
+ generic_type_params: [
238
203
  {
239
- "constraints": []
240
- }
204
+ constraints: [],
205
+ },
241
206
  ],
242
- "params": [
243
- "address",
244
- "&0x1::coin::FreezeCapability<T0>"
207
+ params: [
208
+ '&signer',
209
+ '0x1::string::String',
210
+ '0x1::string::String',
211
+ 'u8',
212
+ 'bool',
245
213
  ],
246
- "return": []
247
- },
248
- {
249
- "name": "initialize",
250
- "visibility": "public",
251
- "is_entry": false,
252
- "is_view": false,
253
- "generic_type_params": [
254
- {
255
- "constraints": []
256
- }
257
- ],
258
- "params": [
259
- "&signer",
260
- "0x1::string::String",
261
- "0x1::string::String",
262
- "u8",
263
- "bool"
214
+ return: [
215
+ '0x1::coin::BurnCapability<T0>',
216
+ '0x1::coin::FreezeCapability<T0>',
217
+ '0x1::coin::MintCapability<T0>',
264
218
  ],
265
- "return": [
266
- "0x1::coin::BurnCapability<T0>",
267
- "0x1::coin::FreezeCapability<T0>",
268
- "0x1::coin::MintCapability<T0>"
269
- ]
270
219
  },
271
220
  {
272
- "name": "initialize_aggregatable_coin",
273
- "visibility": "friend",
274
- "is_entry": false,
275
- "is_view": false,
276
- "generic_type_params": [
221
+ name: 'initialize_aggregatable_coin',
222
+ visibility: 'friend',
223
+ is_entry: false,
224
+ is_view: false,
225
+ generic_type_params: [
277
226
  {
278
- "constraints": []
279
- }
280
- ],
281
- "params": [
282
- "&signer"
227
+ constraints: [],
228
+ },
283
229
  ],
284
- "return": [
285
- "0x1::coin::AggregatableCoin<T0>"
286
- ]
230
+ params: ['&signer'],
231
+ return: ['0x1::coin::AggregatableCoin<T0>'],
287
232
  },
288
233
  {
289
- "name": "initialize_supply_config",
290
- "visibility": "friend",
291
- "is_entry": false,
292
- "is_view": false,
293
- "generic_type_params": [],
294
- "params": [
295
- "&signer"
296
- ],
297
- "return": []
234
+ name: 'initialize_supply_config',
235
+ visibility: 'friend',
236
+ is_entry: false,
237
+ is_view: false,
238
+ generic_type_params: [],
239
+ params: ['&signer'],
240
+ return: [],
298
241
  },
299
242
  {
300
- "name": "initialize_with_parallelizable_supply",
301
- "visibility": "friend",
302
- "is_entry": false,
303
- "is_view": false,
304
- "generic_type_params": [
243
+ name: 'initialize_with_parallelizable_supply',
244
+ visibility: 'friend',
245
+ is_entry: false,
246
+ is_view: false,
247
+ generic_type_params: [
305
248
  {
306
- "constraints": []
307
- }
249
+ constraints: [],
250
+ },
308
251
  ],
309
- "params": [
310
- "&signer",
311
- "0x1::string::String",
312
- "0x1::string::String",
313
- "u8",
314
- "bool"
252
+ params: [
253
+ '&signer',
254
+ '0x1::string::String',
255
+ '0x1::string::String',
256
+ 'u8',
257
+ 'bool',
258
+ ],
259
+ return: [
260
+ '0x1::coin::BurnCapability<T0>',
261
+ '0x1::coin::FreezeCapability<T0>',
262
+ '0x1::coin::MintCapability<T0>',
315
263
  ],
316
- "return": [
317
- "0x1::coin::BurnCapability<T0>",
318
- "0x1::coin::FreezeCapability<T0>",
319
- "0x1::coin::MintCapability<T0>"
320
- ]
321
264
  },
322
265
  {
323
- "name": "is_account_registered",
324
- "visibility": "public",
325
- "is_entry": false,
326
- "is_view": true,
327
- "generic_type_params": [
266
+ name: 'is_account_registered',
267
+ visibility: 'public',
268
+ is_entry: false,
269
+ is_view: true,
270
+ generic_type_params: [
328
271
  {
329
- "constraints": []
330
- }
331
- ],
332
- "params": [
333
- "address"
272
+ constraints: [],
273
+ },
334
274
  ],
335
- "return": [
336
- "bool"
337
- ]
275
+ params: ['address'],
276
+ return: ['bool'],
338
277
  },
339
278
  {
340
- "name": "is_aggregatable_coin_zero",
341
- "visibility": "friend",
342
- "is_entry": false,
343
- "is_view": false,
344
- "generic_type_params": [
279
+ name: 'is_aggregatable_coin_zero',
280
+ visibility: 'friend',
281
+ is_entry: false,
282
+ is_view: false,
283
+ generic_type_params: [
345
284
  {
346
- "constraints": []
347
- }
348
- ],
349
- "params": [
350
- "&0x1::coin::AggregatableCoin<T0>"
285
+ constraints: [],
286
+ },
351
287
  ],
352
- "return": [
353
- "bool"
354
- ]
288
+ params: ['&0x1::coin::AggregatableCoin<T0>'],
289
+ return: ['bool'],
355
290
  },
356
291
  {
357
- "name": "is_coin_initialized",
358
- "visibility": "public",
359
- "is_entry": false,
360
- "is_view": true,
361
- "generic_type_params": [
292
+ name: 'is_coin_initialized',
293
+ visibility: 'public',
294
+ is_entry: false,
295
+ is_view: true,
296
+ generic_type_params: [
362
297
  {
363
- "constraints": []
364
- }
298
+ constraints: [],
299
+ },
365
300
  ],
366
- "params": [],
367
- "return": [
368
- "bool"
369
- ]
301
+ params: [],
302
+ return: ['bool'],
370
303
  },
371
304
  {
372
- "name": "merge",
373
- "visibility": "public",
374
- "is_entry": false,
375
- "is_view": false,
376
- "generic_type_params": [
305
+ name: 'merge',
306
+ visibility: 'public',
307
+ is_entry: false,
308
+ is_view: false,
309
+ generic_type_params: [
377
310
  {
378
- "constraints": []
379
- }
380
- ],
381
- "params": [
382
- "&mut 0x1::coin::Coin<T0>",
383
- "0x1::coin::Coin<T0>"
311
+ constraints: [],
312
+ },
384
313
  ],
385
- "return": []
314
+ params: ['&mut 0x1::coin::Coin<T0>', '0x1::coin::Coin<T0>'],
315
+ return: [],
386
316
  },
387
317
  {
388
- "name": "merge_aggregatable_coin",
389
- "visibility": "friend",
390
- "is_entry": false,
391
- "is_view": false,
392
- "generic_type_params": [
318
+ name: 'merge_aggregatable_coin',
319
+ visibility: 'friend',
320
+ is_entry: false,
321
+ is_view: false,
322
+ generic_type_params: [
393
323
  {
394
- "constraints": []
395
- }
396
- ],
397
- "params": [
398
- "&mut 0x1::coin::AggregatableCoin<T0>",
399
- "0x1::coin::Coin<T0>"
324
+ constraints: [],
325
+ },
400
326
  ],
401
- "return": []
327
+ params: ['&mut 0x1::coin::AggregatableCoin<T0>', '0x1::coin::Coin<T0>'],
328
+ return: [],
402
329
  },
403
330
  {
404
- "name": "mint",
405
- "visibility": "public",
406
- "is_entry": false,
407
- "is_view": false,
408
- "generic_type_params": [
331
+ name: 'mint',
332
+ visibility: 'public',
333
+ is_entry: false,
334
+ is_view: false,
335
+ generic_type_params: [
409
336
  {
410
- "constraints": []
411
- }
412
- ],
413
- "params": [
414
- "u64",
415
- "&0x1::coin::MintCapability<T0>"
337
+ constraints: [],
338
+ },
416
339
  ],
417
- "return": [
418
- "0x1::coin::Coin<T0>"
419
- ]
340
+ params: ['u64', '&0x1::coin::MintCapability<T0>'],
341
+ return: ['0x1::coin::Coin<T0>'],
420
342
  },
421
343
  {
422
- "name": "name",
423
- "visibility": "public",
424
- "is_entry": false,
425
- "is_view": true,
426
- "generic_type_params": [
344
+ name: 'name',
345
+ visibility: 'public',
346
+ is_entry: false,
347
+ is_view: true,
348
+ generic_type_params: [
427
349
  {
428
- "constraints": []
429
- }
350
+ constraints: [],
351
+ },
430
352
  ],
431
- "params": [],
432
- "return": [
433
- "0x1::string::String"
434
- ]
353
+ params: [],
354
+ return: ['0x1::string::String'],
435
355
  },
436
356
  {
437
- "name": "register",
438
- "visibility": "public",
439
- "is_entry": false,
440
- "is_view": false,
441
- "generic_type_params": [
357
+ name: 'register',
358
+ visibility: 'public',
359
+ is_entry: false,
360
+ is_view: false,
361
+ generic_type_params: [
442
362
  {
443
- "constraints": []
444
- }
445
- ],
446
- "params": [
447
- "&signer"
363
+ constraints: [],
364
+ },
448
365
  ],
449
- "return": []
366
+ params: ['&signer'],
367
+ return: [],
450
368
  },
451
369
  {
452
- "name": "supply",
453
- "visibility": "public",
454
- "is_entry": false,
455
- "is_view": true,
456
- "generic_type_params": [
370
+ name: 'supply',
371
+ visibility: 'public',
372
+ is_entry: false,
373
+ is_view: true,
374
+ generic_type_params: [
457
375
  {
458
- "constraints": []
459
- }
376
+ constraints: [],
377
+ },
460
378
  ],
461
- "params": [],
462
- "return": [
463
- "0x1::option::Option<u128>"
464
- ]
379
+ params: [],
380
+ return: ['0x1::option::Option<u128>'],
465
381
  },
466
382
  {
467
- "name": "symbol",
468
- "visibility": "public",
469
- "is_entry": false,
470
- "is_view": true,
471
- "generic_type_params": [
383
+ name: 'symbol',
384
+ visibility: 'public',
385
+ is_entry: false,
386
+ is_view: true,
387
+ generic_type_params: [
472
388
  {
473
- "constraints": []
474
- }
389
+ constraints: [],
390
+ },
475
391
  ],
476
- "params": [],
477
- "return": [
478
- "0x1::string::String"
479
- ]
392
+ params: [],
393
+ return: ['0x1::string::String'],
480
394
  },
481
395
  {
482
- "name": "transfer",
483
- "visibility": "public",
484
- "is_entry": true,
485
- "is_view": false,
486
- "generic_type_params": [
396
+ name: 'transfer',
397
+ visibility: 'public',
398
+ is_entry: true,
399
+ is_view: false,
400
+ generic_type_params: [
487
401
  {
488
- "constraints": []
489
- }
490
- ],
491
- "params": [
492
- "&signer",
493
- "address",
494
- "u64"
402
+ constraints: [],
403
+ },
495
404
  ],
496
- "return": []
405
+ params: ['&signer', 'address', 'u64'],
406
+ return: [],
497
407
  },
498
408
  {
499
- "name": "unfreeze_coin_store",
500
- "visibility": "public",
501
- "is_entry": true,
502
- "is_view": false,
503
- "generic_type_params": [
409
+ name: 'unfreeze_coin_store',
410
+ visibility: 'public',
411
+ is_entry: true,
412
+ is_view: false,
413
+ generic_type_params: [
504
414
  {
505
- "constraints": []
506
- }
507
- ],
508
- "params": [
509
- "address",
510
- "&0x1::coin::FreezeCapability<T0>"
415
+ constraints: [],
416
+ },
511
417
  ],
512
- "return": []
418
+ params: ['address', '&0x1::coin::FreezeCapability<T0>'],
419
+ return: [],
513
420
  },
514
421
  {
515
- "name": "upgrade_supply",
516
- "visibility": "public",
517
- "is_entry": true,
518
- "is_view": false,
519
- "generic_type_params": [
422
+ name: 'upgrade_supply',
423
+ visibility: 'public',
424
+ is_entry: true,
425
+ is_view: false,
426
+ generic_type_params: [
520
427
  {
521
- "constraints": []
522
- }
523
- ],
524
- "params": [
525
- "&signer"
428
+ constraints: [],
429
+ },
526
430
  ],
527
- "return": []
431
+ params: ['&signer'],
432
+ return: [],
528
433
  },
529
434
  {
530
- "name": "value",
531
- "visibility": "public",
532
- "is_entry": false,
533
- "is_view": false,
534
- "generic_type_params": [
435
+ name: 'value',
436
+ visibility: 'public',
437
+ is_entry: false,
438
+ is_view: false,
439
+ generic_type_params: [
535
440
  {
536
- "constraints": []
537
- }
538
- ],
539
- "params": [
540
- "&0x1::coin::Coin<T0>"
441
+ constraints: [],
442
+ },
541
443
  ],
542
- "return": [
543
- "u64"
544
- ]
444
+ params: ['&0x1::coin::Coin<T0>'],
445
+ return: ['u64'],
545
446
  },
546
447
  {
547
- "name": "withdraw",
548
- "visibility": "public",
549
- "is_entry": false,
550
- "is_view": false,
551
- "generic_type_params": [
448
+ name: 'withdraw',
449
+ visibility: 'public',
450
+ is_entry: false,
451
+ is_view: false,
452
+ generic_type_params: [
552
453
  {
553
- "constraints": []
554
- }
555
- ],
556
- "params": [
557
- "&signer",
558
- "u64"
454
+ constraints: [],
455
+ },
559
456
  ],
560
- "return": [
561
- "0x1::coin::Coin<T0>"
562
- ]
457
+ params: ['&signer', 'u64'],
458
+ return: ['0x1::coin::Coin<T0>'],
563
459
  },
564
460
  {
565
- "name": "zero",
566
- "visibility": "public",
567
- "is_entry": false,
568
- "is_view": false,
569
- "generic_type_params": [
461
+ name: 'zero',
462
+ visibility: 'public',
463
+ is_entry: false,
464
+ is_view: false,
465
+ generic_type_params: [
570
466
  {
571
- "constraints": []
572
- }
467
+ constraints: [],
468
+ },
573
469
  ],
574
- "params": [],
575
- "return": [
576
- "0x1::coin::Coin<T0>"
577
- ]
578
- }
470
+ params: [],
471
+ return: ['0x1::coin::Coin<T0>'],
472
+ },
579
473
  ],
580
- "structs": [
474
+ structs: [
581
475
  {
582
- "name": "AggregatableCoin",
583
- "is_native": false,
584
- "abilities": [
585
- "store"
586
- ],
587
- "generic_type_params": [
476
+ name: 'AggregatableCoin',
477
+ is_native: false,
478
+ abilities: ['store'],
479
+ generic_type_params: [
588
480
  {
589
- "constraints": []
590
- }
481
+ constraints: [],
482
+ },
591
483
  ],
592
- "fields": [
484
+ fields: [
593
485
  {
594
- "name": "value",
595
- "type": "0x1::aggregator::Aggregator"
596
- }
597
- ]
486
+ name: 'value',
487
+ type: '0x1::aggregator::Aggregator',
488
+ },
489
+ ],
598
490
  },
599
491
  {
600
- "name": "BurnCapability",
601
- "is_native": false,
602
- "abilities": [
603
- "copy",
604
- "store"
605
- ],
606
- "generic_type_params": [
492
+ name: 'BurnCapability',
493
+ is_native: false,
494
+ abilities: ['copy', 'store'],
495
+ generic_type_params: [
607
496
  {
608
- "constraints": []
609
- }
497
+ constraints: [],
498
+ },
610
499
  ],
611
- "fields": [
500
+ fields: [
612
501
  {
613
- "name": "dummy_field",
614
- "type": "bool"
615
- }
616
- ]
502
+ name: 'dummy_field',
503
+ type: 'bool',
504
+ },
505
+ ],
617
506
  },
618
507
  {
619
- "name": "Coin",
620
- "is_native": false,
621
- "abilities": [
622
- "store"
623
- ],
624
- "generic_type_params": [
508
+ name: 'Coin',
509
+ is_native: false,
510
+ abilities: ['store'],
511
+ generic_type_params: [
625
512
  {
626
- "constraints": []
627
- }
513
+ constraints: [],
514
+ },
628
515
  ],
629
- "fields": [
516
+ fields: [
630
517
  {
631
- "name": "value",
632
- "type": "u64"
633
- }
634
- ]
518
+ name: 'value',
519
+ type: 'u64',
520
+ },
521
+ ],
635
522
  },
636
523
  {
637
- "name": "CoinInfo",
638
- "is_native": false,
639
- "abilities": [
640
- "key"
641
- ],
642
- "generic_type_params": [
524
+ name: 'CoinInfo',
525
+ is_native: false,
526
+ abilities: ['key'],
527
+ generic_type_params: [
643
528
  {
644
- "constraints": []
645
- }
529
+ constraints: [],
530
+ },
646
531
  ],
647
- "fields": [
532
+ fields: [
648
533
  {
649
- "name": "name",
650
- "type": "0x1::string::String"
534
+ name: 'name',
535
+ type: '0x1::string::String',
651
536
  },
652
537
  {
653
- "name": "symbol",
654
- "type": "0x1::string::String"
538
+ name: 'symbol',
539
+ type: '0x1::string::String',
655
540
  },
656
541
  {
657
- "name": "decimals",
658
- "type": "u8"
542
+ name: 'decimals',
543
+ type: 'u8',
659
544
  },
660
545
  {
661
- "name": "supply",
662
- "type": "0x1::option::Option<0x1::optional_aggregator::OptionalAggregator>"
663
- }
664
- ]
546
+ name: 'supply',
547
+ type: '0x1::option::Option<0x1::optional_aggregator::OptionalAggregator>',
548
+ },
549
+ ],
665
550
  },
666
551
  {
667
- "name": "CoinStore",
668
- "is_native": false,
669
- "abilities": [
670
- "key"
671
- ],
672
- "generic_type_params": [
552
+ name: 'CoinStore',
553
+ is_native: false,
554
+ abilities: ['key'],
555
+ generic_type_params: [
673
556
  {
674
- "constraints": []
675
- }
557
+ constraints: [],
558
+ },
676
559
  ],
677
- "fields": [
560
+ fields: [
678
561
  {
679
- "name": "coin",
680
- "type": "0x1::coin::Coin<T0>"
562
+ name: 'coin',
563
+ type: '0x1::coin::Coin<T0>',
681
564
  },
682
565
  {
683
- "name": "frozen",
684
- "type": "bool"
566
+ name: 'frozen',
567
+ type: 'bool',
685
568
  },
686
569
  {
687
- "name": "deposit_events",
688
- "type": "0x1::event::EventHandle<0x1::coin::DepositEvent>"
570
+ name: 'deposit_events',
571
+ type: '0x1::event::EventHandle<0x1::coin::DepositEvent>',
689
572
  },
690
573
  {
691
- "name": "withdraw_events",
692
- "type": "0x1::event::EventHandle<0x1::coin::WithdrawEvent>"
693
- }
694
- ]
574
+ name: 'withdraw_events',
575
+ type: '0x1::event::EventHandle<0x1::coin::WithdrawEvent>',
576
+ },
577
+ ],
695
578
  },
696
579
  {
697
- "name": "DepositEvent",
698
- "is_native": false,
699
- "abilities": [
700
- "drop",
701
- "store"
702
- ],
703
- "generic_type_params": [],
704
- "fields": [
580
+ name: 'DepositEvent',
581
+ is_native: false,
582
+ abilities: ['drop', 'store'],
583
+ generic_type_params: [],
584
+ fields: [
705
585
  {
706
- "name": "amount",
707
- "type": "u64"
708
- }
709
- ]
586
+ name: 'amount',
587
+ type: 'u64',
588
+ },
589
+ ],
710
590
  },
711
591
  {
712
- "name": "FreezeCapability",
713
- "is_native": false,
714
- "abilities": [
715
- "copy",
716
- "store"
717
- ],
718
- "generic_type_params": [
592
+ name: 'FreezeCapability',
593
+ is_native: false,
594
+ abilities: ['copy', 'store'],
595
+ generic_type_params: [
719
596
  {
720
- "constraints": []
721
- }
597
+ constraints: [],
598
+ },
722
599
  ],
723
- "fields": [
600
+ fields: [
724
601
  {
725
- "name": "dummy_field",
726
- "type": "bool"
727
- }
728
- ]
602
+ name: 'dummy_field',
603
+ type: 'bool',
604
+ },
605
+ ],
729
606
  },
730
607
  {
731
- "name": "MintCapability",
732
- "is_native": false,
733
- "abilities": [
734
- "copy",
735
- "store"
736
- ],
737
- "generic_type_params": [
608
+ name: 'MintCapability',
609
+ is_native: false,
610
+ abilities: ['copy', 'store'],
611
+ generic_type_params: [
738
612
  {
739
- "constraints": []
740
- }
613
+ constraints: [],
614
+ },
741
615
  ],
742
- "fields": [
616
+ fields: [
743
617
  {
744
- "name": "dummy_field",
745
- "type": "bool"
746
- }
747
- ]
618
+ name: 'dummy_field',
619
+ type: 'bool',
620
+ },
621
+ ],
748
622
  },
749
623
  {
750
- "name": "SupplyConfig",
751
- "is_native": false,
752
- "abilities": [
753
- "key"
754
- ],
755
- "generic_type_params": [],
756
- "fields": [
624
+ name: 'SupplyConfig',
625
+ is_native: false,
626
+ abilities: ['key'],
627
+ generic_type_params: [],
628
+ fields: [
757
629
  {
758
- "name": "allow_upgrades",
759
- "type": "bool"
760
- }
761
- ]
630
+ name: 'allow_upgrades',
631
+ type: 'bool',
632
+ },
633
+ ],
762
634
  },
763
635
  {
764
- "name": "WithdrawEvent",
765
- "is_native": false,
766
- "abilities": [
767
- "drop",
768
- "store"
769
- ],
770
- "generic_type_params": [],
771
- "fields": [
636
+ name: 'WithdrawEvent',
637
+ is_native: false,
638
+ abilities: ['drop', 'store'],
639
+ generic_type_params: [],
640
+ fields: [
772
641
  {
773
- "name": "amount",
774
- "type": "u64"
775
- }
776
- ]
777
- }
778
- ]
642
+ name: 'amount',
643
+ type: 'u64',
644
+ },
645
+ ],
646
+ },
647
+ ],
779
648
  };
780
649
  //# sourceMappingURL=coin.js.map