@subwallet/extension-base 1.0.13-0 → 1.1.1-dev.0

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 (81) hide show
  1. package/background/KoniTypes.d.ts +37 -0
  2. package/background/KoniTypes.js +8 -1
  3. package/background/handlers/Extension.js +17 -2
  4. package/background/types.d.ts +6 -1
  5. package/bundle-polkadot-extension-base.js +20 -0
  6. package/cjs/background/KoniTypes.js +10 -2
  7. package/cjs/background/handlers/Extension.js +22 -6
  8. package/cjs/constants/index.js +7 -1
  9. package/cjs/defaults.js +1 -1
  10. package/cjs/koni/api/dotsama/balance.js +5 -0
  11. package/cjs/koni/api/dotsama/transfer.js +6 -0
  12. package/cjs/koni/api/staking/bonding/astar.js +2 -2
  13. package/cjs/koni/api/staking/bonding/relayChain.js +12 -2
  14. package/cjs/koni/api/staking/bonding/utils.js +2 -2
  15. package/cjs/koni/background/cron.js +13 -37
  16. package/cjs/koni/background/handlers/Extension.js +324 -147
  17. package/cjs/koni/background/handlers/State.js +224 -51
  18. package/cjs/koni/background/subscription.js +9 -86
  19. package/cjs/packageInfo.js +1 -1
  20. package/cjs/services/chain-service/constants.js +10 -4
  21. package/cjs/services/chain-service/handler/SubstrateApi.js +2 -1
  22. package/cjs/services/chain-service/handler/SubstrateChainHandler.js +3 -1
  23. package/cjs/services/chain-service/handler/manta/MantaPrivateHandler.js +147 -0
  24. package/cjs/services/chain-service/helper/erc20_abi.json +224 -0
  25. package/cjs/services/chain-service/helper/erc721_abi.json +384 -0
  26. package/cjs/services/chain-service/helper/psp22_abi.json +1127 -0
  27. package/cjs/services/chain-service/helper/psp34_abi.json +3144 -0
  28. package/cjs/services/chain-service/helper/test_erc721_abi.json +393 -0
  29. package/cjs/services/chain-service/index.js +54 -5
  30. package/cjs/services/chain-service/utils.js +6 -1
  31. package/cjs/services/event-service/types.js +3 -1
  32. package/cjs/services/storage-service/DatabaseService.js +31 -1
  33. package/cjs/services/storage-service/databases/index.js +3 -0
  34. package/cjs/services/storage-service/db-stores/MantaPay.js +40 -0
  35. package/cjs/utils/index.js +12 -0
  36. package/cjs/utils/lazy.js +52 -0
  37. package/constants/index.d.ts +2 -0
  38. package/constants/index.js +2 -0
  39. package/defaults.d.ts +1 -1
  40. package/defaults.js +1 -1
  41. package/koni/api/dotsama/balance.js +6 -1
  42. package/koni/api/dotsama/transfer.js +7 -1
  43. package/koni/api/staking/bonding/astar.d.ts +1 -1
  44. package/koni/api/staking/bonding/astar.js +1 -1
  45. package/koni/api/staking/bonding/relayChain.js +12 -2
  46. package/koni/api/staking/bonding/utils.js +3 -3
  47. package/koni/background/cron.d.ts +1 -5
  48. package/koni/background/cron.js +15 -39
  49. package/koni/background/handlers/Extension.d.ts +5 -0
  50. package/koni/background/handlers/Extension.js +186 -11
  51. package/koni/background/handlers/State.d.ts +15 -3
  52. package/koni/background/handlers/State.js +226 -50
  53. package/koni/background/subscription.d.ts +1 -4
  54. package/koni/background/subscription.js +11 -87
  55. package/package.json +23 -6
  56. package/packageInfo.js +1 -1
  57. package/services/chain-service/constants.d.ts +3 -0
  58. package/services/chain-service/constants.js +5 -2
  59. package/services/chain-service/handler/SubstrateApi.d.ts +1 -1
  60. package/services/chain-service/handler/SubstrateApi.js +2 -1
  61. package/services/chain-service/handler/SubstrateChainHandler.d.ts +1 -1
  62. package/services/chain-service/handler/SubstrateChainHandler.js +3 -1
  63. package/services/chain-service/handler/manta/MantaPrivateHandler.d.ts +30 -0
  64. package/services/chain-service/handler/manta/MantaPrivateHandler.js +140 -0
  65. package/services/chain-service/handler/types.d.ts +2 -0
  66. package/services/chain-service/index.d.ts +7 -3
  67. package/services/chain-service/index.js +56 -7
  68. package/services/chain-service/utils.d.ts +1 -0
  69. package/services/chain-service/utils.js +5 -1
  70. package/services/event-service/types.d.ts +3 -0
  71. package/services/event-service/types.js +3 -1
  72. package/services/storage-service/DatabaseService.d.ts +10 -1
  73. package/services/storage-service/DatabaseService.js +31 -1
  74. package/services/storage-service/databases/index.d.ts +2 -0
  75. package/services/storage-service/databases/index.js +3 -0
  76. package/services/storage-service/db-stores/MantaPay.d.ts +9 -0
  77. package/services/storage-service/db-stores/MantaPay.js +32 -0
  78. package/utils/index.d.ts +1 -0
  79. package/utils/index.js +2 -1
  80. package/utils/lazy.d.ts +2 -0
  81. package/utils/lazy.js +43 -0
@@ -0,0 +1,384 @@
1
+ [
2
+ {
3
+ "constant": true,
4
+ "inputs": [
5
+ {
6
+ "name": "interfaceId",
7
+ "type": "bytes4"
8
+ }
9
+ ],
10
+ "name": "supportsInterface",
11
+ "outputs": [
12
+ {
13
+ "name": "",
14
+ "type": "bool"
15
+ }
16
+ ],
17
+ "payable": false,
18
+ "stateMutability": "view",
19
+ "type": "function"
20
+ },
21
+ {
22
+ "inputs": [],
23
+ "payable": false,
24
+ "stateMutability": "nonpayable",
25
+ "type": "constructor"
26
+ },
27
+ {
28
+ "anonymous": false,
29
+ "inputs": [
30
+ {
31
+ "indexed": true,
32
+ "name": "from",
33
+ "type": "address"
34
+ },
35
+ {
36
+ "indexed": true,
37
+ "name": "to",
38
+ "type": "address"
39
+ },
40
+ {
41
+ "indexed": true,
42
+ "name": "tokenId",
43
+ "type": "uint256"
44
+ }
45
+ ],
46
+ "name": "Transfer",
47
+ "type": "event"
48
+ },
49
+ {
50
+ "constant": true,
51
+ "anonymous": true,
52
+ "inputs": [
53
+ {
54
+ "indexed": true,
55
+ "name": "tokenId",
56
+ "type": "uint256"
57
+ }
58
+ ],
59
+ "outputs": [
60
+ {
61
+ "name": "",
62
+ "type": "string"
63
+ }
64
+ ],
65
+ "name": "tokenURI",
66
+ "payable": false,
67
+ "stateMutability": "view",
68
+ "type": "function"
69
+ },
70
+ {
71
+ "constant": true,
72
+ "anonymous": true,
73
+ "inputs": [],
74
+ "outputs": [
75
+ {
76
+ "name": "",
77
+ "type": "uint256"
78
+ }
79
+ ],
80
+ "name": "totalSupply",
81
+ "payable": false,
82
+ "stateMutability": "view",
83
+ "type": "function"
84
+ },
85
+ {
86
+ "anonymous": true,
87
+ "inputs": [],
88
+ "outputs": [
89
+ {
90
+ "name": "_name",
91
+ "type": "string"
92
+ }
93
+ ],
94
+ "name": "name",
95
+ "payable": false,
96
+ "stateMutability": "view",
97
+ "type": "function"
98
+ },
99
+ {
100
+ "anonymous": true,
101
+ "inputs": [],
102
+ "outputs": [
103
+ {
104
+ "name": "_symbol",
105
+ "type": "string"
106
+ }
107
+ ],
108
+ "name": "symbol",
109
+ "payable": false,
110
+ "stateMutability": "view",
111
+ "type": "function"
112
+ },
113
+ {
114
+ "anonymous": false,
115
+ "inputs": [
116
+ {
117
+ "indexed": true,
118
+ "name": "owner",
119
+ "type": "address"
120
+ },
121
+ {
122
+ "indexed": true,
123
+ "name": "approved",
124
+ "type": "address"
125
+ },
126
+ {
127
+ "indexed": true,
128
+ "name": "tokenId",
129
+ "type": "uint256"
130
+ }
131
+ ],
132
+ "name": "Approval",
133
+ "type": "event"
134
+ },
135
+ {
136
+ "anonymous": false,
137
+ "inputs": [
138
+ {
139
+ "indexed": true,
140
+ "name": "owner",
141
+ "type": "address"
142
+ },
143
+ {
144
+ "indexed": true,
145
+ "name": "operator",
146
+ "type": "address"
147
+ },
148
+ {
149
+ "indexed": false,
150
+ "name": "approved",
151
+ "type": "bool"
152
+ }
153
+ ],
154
+ "name": "ApprovalForAll",
155
+ "type": "event"
156
+ },
157
+ {
158
+ "constant": true,
159
+ "inputs": [
160
+ {
161
+ "name": "owner",
162
+ "type": "address"
163
+ }
164
+ ],
165
+ "name": "balanceOf",
166
+ "outputs": [
167
+ {
168
+ "name": "",
169
+ "type": "uint256"
170
+ }
171
+ ],
172
+ "payable": false,
173
+ "stateMutability": "view",
174
+ "type": "function"
175
+ },
176
+ {
177
+ "constant": true,
178
+ "inputs": [
179
+ {
180
+ "name": "owner",
181
+ "type": "address"
182
+ },
183
+ {
184
+ "name": "index",
185
+ "type": "uint256"
186
+ }
187
+ ],
188
+ "name": "tokenOfOwnerByIndex",
189
+ "outputs": [
190
+ {
191
+ "name": "",
192
+ "type": "uint256"
193
+ }
194
+ ],
195
+ "payable": false,
196
+ "stateMutability": "view",
197
+ "type": "function"
198
+ },
199
+ {
200
+ "constant": true,
201
+ "inputs": [
202
+ {
203
+ "name": "tokenId",
204
+ "type": "uint256"
205
+ }
206
+ ],
207
+ "name": "ownerOf",
208
+ "outputs": [
209
+ {
210
+ "name": "",
211
+ "type": "address"
212
+ }
213
+ ],
214
+ "payable": false,
215
+ "stateMutability": "view",
216
+ "type": "function"
217
+ },
218
+ {
219
+ "constant": false,
220
+ "inputs": [
221
+ {
222
+ "name": "to",
223
+ "type": "address"
224
+ },
225
+ {
226
+ "name": "tokenId",
227
+ "type": "uint256"
228
+ }
229
+ ],
230
+ "name": "approve",
231
+ "outputs": [],
232
+ "payable": false,
233
+ "stateMutability": "nonpayable",
234
+ "type": "function"
235
+ },
236
+ {
237
+ "constant": true,
238
+ "inputs": [
239
+ {
240
+ "name": "tokenId",
241
+ "type": "uint256"
242
+ }
243
+ ],
244
+ "name": "getApproved",
245
+ "outputs": [
246
+ {
247
+ "name": "",
248
+ "type": "address"
249
+ }
250
+ ],
251
+ "payable": false,
252
+ "stateMutability": "view",
253
+ "type": "function"
254
+ },
255
+ {
256
+ "constant": false,
257
+ "inputs": [
258
+ {
259
+ "name": "to",
260
+ "type": "address"
261
+ },
262
+ {
263
+ "name": "approved",
264
+ "type": "bool"
265
+ }
266
+ ],
267
+ "name": "setApprovalForAll",
268
+ "outputs": [],
269
+ "payable": false,
270
+ "stateMutability": "nonpayable",
271
+ "type": "function"
272
+ },
273
+ {
274
+ "constant": true,
275
+ "inputs": [
276
+ {
277
+ "name": "owner",
278
+ "type": "address"
279
+ },
280
+ {
281
+ "name": "operator",
282
+ "type": "address"
283
+ }
284
+ ],
285
+ "name": "isApprovedForAll",
286
+ "outputs": [
287
+ {
288
+ "name": "",
289
+ "type": "bool"
290
+ }
291
+ ],
292
+ "payable": false,
293
+ "stateMutability": "view",
294
+ "type": "function"
295
+ },
296
+ {
297
+ "constant": false,
298
+ "inputs": [
299
+ {
300
+ "name": "to",
301
+ "type": "address"
302
+ },
303
+ {
304
+ "name": "tokenId",
305
+ "type": "uint256"
306
+ }
307
+ ],
308
+ "name": "transfer",
309
+ "outputs": [],
310
+ "payable": false,
311
+ "stateMutability": "nonpayable",
312
+ "type": "function"
313
+ },
314
+ {
315
+ "constant": false,
316
+ "inputs": [
317
+ {
318
+ "name": "from",
319
+ "type": "address"
320
+ },
321
+ {
322
+ "name": "to",
323
+ "type": "address"
324
+ },
325
+ {
326
+ "name": "tokenId",
327
+ "type": "uint256"
328
+ }
329
+ ],
330
+ "name": "transferFrom",
331
+ "outputs": [],
332
+ "payable": false,
333
+ "stateMutability": "nonpayable",
334
+ "type": "function"
335
+ },
336
+ {
337
+ "constant": false,
338
+ "inputs": [
339
+ {
340
+ "name": "from",
341
+ "type": "address"
342
+ },
343
+ {
344
+ "name": "to",
345
+ "type": "address"
346
+ },
347
+ {
348
+ "name": "tokenId",
349
+ "type": "uint256"
350
+ }
351
+ ],
352
+ "name": "safeTransferFrom",
353
+ "outputs": [],
354
+ "payable": false,
355
+ "stateMutability": "nonpayable",
356
+ "type": "function"
357
+ },
358
+ {
359
+ "constant": false,
360
+ "inputs": [
361
+ {
362
+ "name": "from",
363
+ "type": "address"
364
+ },
365
+ {
366
+ "name": "to",
367
+ "type": "address"
368
+ },
369
+ {
370
+ "name": "tokenId",
371
+ "type": "uint256"
372
+ },
373
+ {
374
+ "name": "_data",
375
+ "type": "bytes"
376
+ }
377
+ ],
378
+ "name": "safeTransferFrom",
379
+ "outputs": [],
380
+ "payable": false,
381
+ "stateMutability": "nonpayable",
382
+ "type": "function"
383
+ }
384
+ ]