kokio-sdk 0.0.1

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 (36) hide show
  1. package/.env.example +1 -0
  2. package/.github/workflows/npm_publish.yaml +19 -0
  3. package/LICENSE +21 -0
  4. package/package.json +45 -0
  5. package/src/abis/BeaconProxy.json +985 -0
  6. package/src/abis/DeviceWallet.json +907 -0
  7. package/src/abis/DeviceWalletFactory.json +739 -0
  8. package/src/abis/ESIMWallet.json +486 -0
  9. package/src/abis/ESIMWalletFactory.json +467 -0
  10. package/src/abis/LazyWalletRegistry.json +734 -0
  11. package/src/abis/P256Verifier.json +73 -0
  12. package/src/abis/Registry.json +811 -0
  13. package/src/abis/RegistryHelper.json +382 -0
  14. package/src/abis/index.ts +21 -0
  15. package/src/config.ts +46 -0
  16. package/src/interface/P256VerifierClass.ts +19 -0
  17. package/src/interface/constantsClass.ts +35 -0
  18. package/src/interface/deviceWalletClass.ts +62 -0
  19. package/src/interface/deviceWalletFactoryClass.ts +35 -0
  20. package/src/interface/eSIMWalletClass.ts +55 -0
  21. package/src/interface/eSIMWalletFactoryClass.ts +36 -0
  22. package/src/interface/lazyWalletRegistryClass.ts +34 -0
  23. package/src/interface/smartAccountClass.ts +26 -0
  24. package/src/interface/utilsClass.ts +21 -0
  25. package/src/logic/P256Verifier.ts +31 -0
  26. package/src/logic/account-kit/createSmartAccount.ts +282 -0
  27. package/src/logic/constants.ts +188 -0
  28. package/src/logic/deviceWallet.ts +175 -0
  29. package/src/logic/deviceWalletFactory.ts +70 -0
  30. package/src/logic/eSIMWallet.ts +149 -0
  31. package/src/logic/eSIMWalletFactory.ts +78 -0
  32. package/src/logic/lazyWalletRegistry.ts +98 -0
  33. package/src/logic/services/turnkeyClient.ts +80 -0
  34. package/src/logic/utils.ts +86 -0
  35. package/src/types.ts +38 -0
  36. package/tsconfig.json +114 -0
@@ -0,0 +1,467 @@
1
+ [
2
+ {
3
+ "type": "constructor",
4
+ "inputs": [],
5
+ "stateMutability": "nonpayable"
6
+ },
7
+ {
8
+ "type": "function",
9
+ "name": "UPGRADE_INTERFACE_VERSION",
10
+ "inputs": [],
11
+ "outputs": [
12
+ {
13
+ "name": "",
14
+ "type": "string",
15
+ "internalType": "string"
16
+ }
17
+ ],
18
+ "stateMutability": "view"
19
+ },
20
+ {
21
+ "type": "function",
22
+ "name": "acceptOwnership",
23
+ "inputs": [],
24
+ "outputs": [],
25
+ "stateMutability": "nonpayable"
26
+ },
27
+ {
28
+ "type": "function",
29
+ "name": "addRegistryAddress",
30
+ "inputs": [
31
+ {
32
+ "name": "_registryContractAddress",
33
+ "type": "address",
34
+ "internalType": "address"
35
+ }
36
+ ],
37
+ "outputs": [
38
+ {
39
+ "name": "",
40
+ "type": "address",
41
+ "internalType": "address"
42
+ }
43
+ ],
44
+ "stateMutability": "nonpayable"
45
+ },
46
+ {
47
+ "type": "function",
48
+ "name": "beacon",
49
+ "inputs": [],
50
+ "outputs": [
51
+ {
52
+ "name": "",
53
+ "type": "address",
54
+ "internalType": "contract UpgradeableBeacon"
55
+ }
56
+ ],
57
+ "stateMutability": "view"
58
+ },
59
+ {
60
+ "type": "function",
61
+ "name": "deployESIMWallet",
62
+ "inputs": [
63
+ {
64
+ "name": "_deviceWalletAddress",
65
+ "type": "address",
66
+ "internalType": "address"
67
+ },
68
+ {
69
+ "name": "_salt",
70
+ "type": "uint256",
71
+ "internalType": "uint256"
72
+ }
73
+ ],
74
+ "outputs": [
75
+ {
76
+ "name": "",
77
+ "type": "address",
78
+ "internalType": "address"
79
+ }
80
+ ],
81
+ "stateMutability": "nonpayable"
82
+ },
83
+ {
84
+ "type": "function",
85
+ "name": "getCurrentESIMWalletImplementation",
86
+ "inputs": [],
87
+ "outputs": [
88
+ {
89
+ "name": "",
90
+ "type": "address",
91
+ "internalType": "address"
92
+ }
93
+ ],
94
+ "stateMutability": "view"
95
+ },
96
+ {
97
+ "type": "function",
98
+ "name": "initialize",
99
+ "inputs": [
100
+ {
101
+ "name": "_eSIMWalletImplementation",
102
+ "type": "address",
103
+ "internalType": "address"
104
+ },
105
+ {
106
+ "name": "_upgradeManager",
107
+ "type": "address",
108
+ "internalType": "address"
109
+ }
110
+ ],
111
+ "outputs": [],
112
+ "stateMutability": "nonpayable"
113
+ },
114
+ {
115
+ "type": "function",
116
+ "name": "isESIMWalletDeployed",
117
+ "inputs": [
118
+ {
119
+ "name": "eSIMWalletAddress",
120
+ "type": "address",
121
+ "internalType": "address"
122
+ }
123
+ ],
124
+ "outputs": [
125
+ {
126
+ "name": "isDeployed",
127
+ "type": "bool",
128
+ "internalType": "bool"
129
+ }
130
+ ],
131
+ "stateMutability": "view"
132
+ },
133
+ {
134
+ "type": "function",
135
+ "name": "owner",
136
+ "inputs": [],
137
+ "outputs": [
138
+ {
139
+ "name": "",
140
+ "type": "address",
141
+ "internalType": "address"
142
+ }
143
+ ],
144
+ "stateMutability": "view"
145
+ },
146
+ {
147
+ "type": "function",
148
+ "name": "pendingOwner",
149
+ "inputs": [],
150
+ "outputs": [
151
+ {
152
+ "name": "",
153
+ "type": "address",
154
+ "internalType": "address"
155
+ }
156
+ ],
157
+ "stateMutability": "view"
158
+ },
159
+ {
160
+ "type": "function",
161
+ "name": "proxiableUUID",
162
+ "inputs": [],
163
+ "outputs": [
164
+ {
165
+ "name": "",
166
+ "type": "bytes32",
167
+ "internalType": "bytes32"
168
+ }
169
+ ],
170
+ "stateMutability": "view"
171
+ },
172
+ {
173
+ "type": "function",
174
+ "name": "registry",
175
+ "inputs": [],
176
+ "outputs": [
177
+ {
178
+ "name": "",
179
+ "type": "address",
180
+ "internalType": "contract Registry"
181
+ }
182
+ ],
183
+ "stateMutability": "view"
184
+ },
185
+ {
186
+ "type": "function",
187
+ "name": "renounceOwnership",
188
+ "inputs": [],
189
+ "outputs": [],
190
+ "stateMutability": "nonpayable"
191
+ },
192
+ {
193
+ "type": "function",
194
+ "name": "transferOwnership",
195
+ "inputs": [
196
+ {
197
+ "name": "newOwner",
198
+ "type": "address",
199
+ "internalType": "address"
200
+ }
201
+ ],
202
+ "outputs": [],
203
+ "stateMutability": "nonpayable"
204
+ },
205
+ {
206
+ "type": "function",
207
+ "name": "updateESIMWalletImplementation",
208
+ "inputs": [
209
+ {
210
+ "name": "_eSIMWalletImpl",
211
+ "type": "address",
212
+ "internalType": "address"
213
+ }
214
+ ],
215
+ "outputs": [
216
+ {
217
+ "name": "",
218
+ "type": "address",
219
+ "internalType": "address"
220
+ }
221
+ ],
222
+ "stateMutability": "nonpayable"
223
+ },
224
+ {
225
+ "type": "function",
226
+ "name": "upgradeToAndCall",
227
+ "inputs": [
228
+ {
229
+ "name": "newImplementation",
230
+ "type": "address",
231
+ "internalType": "address"
232
+ },
233
+ {
234
+ "name": "data",
235
+ "type": "bytes",
236
+ "internalType": "bytes"
237
+ }
238
+ ],
239
+ "outputs": [],
240
+ "stateMutability": "payable"
241
+ },
242
+ {
243
+ "type": "event",
244
+ "name": "AddedRegistry",
245
+ "inputs": [
246
+ {
247
+ "name": "registry",
248
+ "type": "address",
249
+ "indexed": true,
250
+ "internalType": "address"
251
+ }
252
+ ],
253
+ "anonymous": false
254
+ },
255
+ {
256
+ "type": "event",
257
+ "name": "ESIMWalletDeployed",
258
+ "inputs": [
259
+ {
260
+ "name": "_eSIMWalletAddress",
261
+ "type": "address",
262
+ "indexed": true,
263
+ "internalType": "address"
264
+ },
265
+ {
266
+ "name": "_deviceWalletAddress",
267
+ "type": "address",
268
+ "indexed": true,
269
+ "internalType": "address"
270
+ },
271
+ {
272
+ "name": "_caller",
273
+ "type": "address",
274
+ "indexed": true,
275
+ "internalType": "address"
276
+ }
277
+ ],
278
+ "anonymous": false
279
+ },
280
+ {
281
+ "type": "event",
282
+ "name": "ESIMWalletFactorydeployed",
283
+ "inputs": [
284
+ {
285
+ "name": "_upgradeManager",
286
+ "type": "address",
287
+ "indexed": true,
288
+ "internalType": "address"
289
+ },
290
+ {
291
+ "name": "_eSIMWalletImplementation",
292
+ "type": "address",
293
+ "indexed": true,
294
+ "internalType": "address"
295
+ },
296
+ {
297
+ "name": "beacon",
298
+ "type": "address",
299
+ "indexed": true,
300
+ "internalType": "address"
301
+ }
302
+ ],
303
+ "anonymous": false
304
+ },
305
+ {
306
+ "type": "event",
307
+ "name": "ESIMWalletImplementationUpdated",
308
+ "inputs": [
309
+ {
310
+ "name": "_newImplementation",
311
+ "type": "address",
312
+ "indexed": true,
313
+ "internalType": "address"
314
+ }
315
+ ],
316
+ "anonymous": false
317
+ },
318
+ {
319
+ "type": "event",
320
+ "name": "Initialized",
321
+ "inputs": [
322
+ {
323
+ "name": "version",
324
+ "type": "uint64",
325
+ "indexed": false,
326
+ "internalType": "uint64"
327
+ }
328
+ ],
329
+ "anonymous": false
330
+ },
331
+ {
332
+ "type": "event",
333
+ "name": "OwnershipTransferStarted",
334
+ "inputs": [
335
+ {
336
+ "name": "previousOwner",
337
+ "type": "address",
338
+ "indexed": true,
339
+ "internalType": "address"
340
+ },
341
+ {
342
+ "name": "newOwner",
343
+ "type": "address",
344
+ "indexed": true,
345
+ "internalType": "address"
346
+ }
347
+ ],
348
+ "anonymous": false
349
+ },
350
+ {
351
+ "type": "event",
352
+ "name": "OwnershipTransferred",
353
+ "inputs": [
354
+ {
355
+ "name": "previousOwner",
356
+ "type": "address",
357
+ "indexed": true,
358
+ "internalType": "address"
359
+ },
360
+ {
361
+ "name": "newOwner",
362
+ "type": "address",
363
+ "indexed": true,
364
+ "internalType": "address"
365
+ }
366
+ ],
367
+ "anonymous": false
368
+ },
369
+ {
370
+ "type": "event",
371
+ "name": "Upgraded",
372
+ "inputs": [
373
+ {
374
+ "name": "implementation",
375
+ "type": "address",
376
+ "indexed": true,
377
+ "internalType": "address"
378
+ }
379
+ ],
380
+ "anonymous": false
381
+ },
382
+ {
383
+ "type": "error",
384
+ "name": "AddressEmptyCode",
385
+ "inputs": [
386
+ {
387
+ "name": "target",
388
+ "type": "address",
389
+ "internalType": "address"
390
+ }
391
+ ]
392
+ },
393
+ {
394
+ "type": "error",
395
+ "name": "ERC1967InvalidImplementation",
396
+ "inputs": [
397
+ {
398
+ "name": "implementation",
399
+ "type": "address",
400
+ "internalType": "address"
401
+ }
402
+ ]
403
+ },
404
+ {
405
+ "type": "error",
406
+ "name": "ERC1967NonPayable",
407
+ "inputs": []
408
+ },
409
+ {
410
+ "type": "error",
411
+ "name": "FailedInnerCall",
412
+ "inputs": []
413
+ },
414
+ {
415
+ "type": "error",
416
+ "name": "InvalidInitialization",
417
+ "inputs": []
418
+ },
419
+ {
420
+ "type": "error",
421
+ "name": "NotInitializing",
422
+ "inputs": []
423
+ },
424
+ {
425
+ "type": "error",
426
+ "name": "OnlyRegistryOrDeviceWalletFactoryOrDeviceWallet",
427
+ "inputs": []
428
+ },
429
+ {
430
+ "type": "error",
431
+ "name": "OwnableInvalidOwner",
432
+ "inputs": [
433
+ {
434
+ "name": "owner",
435
+ "type": "address",
436
+ "internalType": "address"
437
+ }
438
+ ]
439
+ },
440
+ {
441
+ "type": "error",
442
+ "name": "OwnableUnauthorizedAccount",
443
+ "inputs": [
444
+ {
445
+ "name": "account",
446
+ "type": "address",
447
+ "internalType": "address"
448
+ }
449
+ ]
450
+ },
451
+ {
452
+ "type": "error",
453
+ "name": "UUPSUnauthorizedCallContext",
454
+ "inputs": []
455
+ },
456
+ {
457
+ "type": "error",
458
+ "name": "UUPSUnsupportedProxiableUUID",
459
+ "inputs": [
460
+ {
461
+ "name": "slot",
462
+ "type": "bytes32",
463
+ "internalType": "bytes32"
464
+ }
465
+ ]
466
+ }
467
+ ]