kokio-sdk 0.1.4 → 1.0.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.
- package/README.md +185 -1
- package/dist/esm/admin/config-admin.js +85 -0
- package/dist/esm/admin/interface/deviceWalletClass.js +34 -0
- package/dist/esm/admin/interface/deviceWalletFactoryClass.js +57 -0
- package/dist/esm/admin/interface/eSIMWalletClass.js +31 -0
- package/dist/esm/admin/interface/eSIMWalletFactoryClass.js +22 -0
- package/dist/esm/admin/interface/lazyWalletRegistryClass.js +33 -0
- package/dist/esm/admin/interface/registryClass.js +43 -0
- package/dist/esm/config.js +4 -0
- package/dist/esm/interface/deviceWalletClass.js +1 -13
- package/dist/esm/interface/eSIMWalletClass.js +2 -8
- package/dist/esm/interface/eSIMWalletFactoryClass.js +2 -8
- package/dist/esm/interface/lazyWalletRegistryClass.js +2 -11
- package/dist/esm/logic/P256Verifier.js +8 -15
- package/dist/esm/logic/account-kit/createSmartAccount.js +76 -24
- package/dist/esm/logic/admin/deviceWallet.eoa.js +42 -0
- package/dist/esm/logic/admin/deviceWalletFactory.eoa.js +133 -0
- package/dist/esm/logic/admin/eSIMWallet.eoa.js +30 -0
- package/dist/esm/logic/admin/eSIMWalletFactory.eoa.js +43 -0
- package/dist/esm/logic/admin/lazyWalletRegistry.eoa.js +62 -0
- package/dist/esm/logic/admin/reads/deviceWallet.reads.js +45 -0
- package/dist/esm/logic/admin/reads/deviceWalletFactory.reads.js +87 -0
- package/dist/esm/logic/admin/reads/eSIMWallet.reads.js +44 -0
- package/dist/esm/logic/admin/reads/eSIMWalletFactory.reads.js +32 -0
- package/dist/esm/logic/admin/reads/lazyWalletRegistry.reads.js +62 -0
- package/dist/esm/logic/admin/reads/registry.reads.js +136 -0
- package/dist/esm/logic/admin/registry.eoa.js +23 -0
- package/dist/esm/logic/constants.js +31 -71
- package/dist/esm/logic/deviceWallet.js +28 -91
- package/dist/esm/logic/deviceWalletFactory.js +21 -30
- package/dist/esm/logic/eSIMWallet.js +25 -57
- package/dist/esm/logic/eSIMWalletFactory.js +17 -50
- package/dist/esm/logic/errors.js +118 -0
- package/dist/esm/logic/lazyWalletRegistry.js +12 -72
- package/dist/esm/logic/utils.js +3 -3
- package/dist/types/abis/BeaconProxy.d.ts +58 -2
- package/dist/types/abis/DeviceWallet.d.ts +702 -2
- package/dist/types/abis/DeviceWalletFactory.d.ts +634 -2
- package/dist/types/abis/ESIMWallet.d.ts +375 -2
- package/dist/types/abis/ESIMWalletFactory.d.ts +355 -2
- package/dist/types/abis/LazyWalletRegistry.d.ts +565 -2
- package/dist/types/abis/P256Verifier.d.ts +56 -2
- package/dist/types/abis/Registry.d.ts +623 -2
- package/dist/types/abis/RegistryHelper.d.ts +295 -2
- package/dist/types/admin/config-admin.d.ts +55 -0
- package/dist/types/admin/interface/deviceWalletClass.d.ts +17 -0
- package/dist/types/admin/interface/deviceWalletFactoryClass.d.ts +25 -0
- package/dist/types/admin/interface/eSIMWalletClass.d.ts +17 -0
- package/dist/types/admin/interface/eSIMWalletFactoryClass.d.ts +10 -0
- package/dist/types/admin/interface/lazyWalletRegistryClass.d.ts +14 -0
- package/dist/types/admin/interface/registryClass.d.ts +17 -0
- package/dist/types/config.d.ts +2 -0
- package/dist/types/interface/P256VerifierClass.d.ts +2 -1
- package/dist/types/interface/deviceWalletClass.d.ts +24 -28
- package/dist/types/interface/deviceWalletFactoryClass.d.ts +27 -26
- package/dist/types/interface/eSIMWalletClass.d.ts +2 -4
- package/dist/types/interface/eSIMWalletFactoryClass.d.ts +24 -26
- package/dist/types/interface/lazyWalletRegistryClass.d.ts +1 -6
- package/dist/types/interface/smartAccountClass.d.ts +23 -23
- package/dist/types/logic/P256Verifier.d.ts +2 -1
- package/dist/types/logic/account-kit/createSmartAccount.d.ts +38 -1
- package/dist/types/logic/admin/deviceWallet.eoa.d.ts +12 -0
- package/dist/types/logic/admin/deviceWalletFactory.eoa.d.ts +33 -0
- package/dist/types/logic/admin/eSIMWallet.eoa.d.ts +14 -0
- package/dist/types/logic/admin/eSIMWalletFactory.eoa.d.ts +13 -0
- package/dist/types/logic/admin/lazyWalletRegistry.eoa.d.ts +18 -0
- package/dist/types/logic/admin/reads/deviceWallet.reads.d.ts +16 -0
- package/dist/types/logic/admin/reads/deviceWalletFactory.reads.d.ts +26 -0
- package/dist/types/logic/admin/reads/eSIMWallet.reads.d.ts +15 -0
- package/dist/types/logic/admin/reads/eSIMWalletFactory.reads.d.ts +10 -0
- package/dist/types/logic/admin/reads/lazyWalletRegistry.reads.d.ts +20 -0
- package/dist/types/logic/admin/reads/registry.reads.d.ts +34 -0
- package/dist/types/logic/admin/registry.eoa.d.ts +7 -0
- package/dist/types/logic/deviceWallet.d.ts +1 -5
- package/dist/types/logic/deviceWalletFactory.d.ts +5 -4
- package/dist/types/logic/eSIMWallet.d.ts +1 -3
- package/dist/types/logic/eSIMWalletFactory.d.ts +2 -4
- package/dist/types/logic/errors.d.ts +63 -0
- package/dist/types/logic/lazyWalletRegistry.d.ts +1 -6
- package/dist/types/logic/utils.d.ts +8 -1
- package/dist/types/types.d.ts +1 -1
- package/package.json +12 -3
- package/dist/esm/interface/utilsClass.js +0 -13
- package/dist/types/interface/utilsClass.d.ts +0 -2567
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Address, WalletClient } from "viem";
|
|
2
2
|
import { SmartAccountClient } from "@aa-sdk/core";
|
|
3
|
+
import { P256Key } from "../types.js";
|
|
3
4
|
export declare class DeviceWalletFactorySubPackage {
|
|
4
5
|
smartAccountClient: SmartAccountClient;
|
|
5
6
|
walletClient: {
|
|
@@ -1406,7 +1407,7 @@ export declare class DeviceWalletFactorySubPackage {
|
|
|
1406
1407
|
authorizationList: import("viem").TransactionSerializableEIP7702["authorizationList"];
|
|
1407
1408
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_34 extends string ? T_34 : undefined : never : never) | undefined>>> & {
|
|
1408
1409
|
chainId?: number | undefined;
|
|
1409
|
-
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "
|
|
1410
|
+
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "type" | "chainId" | "gas" | "blobVersionedHashes" | "fees") extends infer T_39 ? T_39 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "type" | "chainId" | "gas" | "blobVersionedHashes" | "fees") ? T_39 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_39 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) & {
|
|
1410
1411
|
_capabilities?: {
|
|
1411
1412
|
[x: string]: any;
|
|
1412
1413
|
} | undefined;
|
|
@@ -1420,6 +1421,7 @@ export declare class DeviceWalletFactorySubPackage {
|
|
|
1420
1421
|
id: string;
|
|
1421
1422
|
}>;
|
|
1422
1423
|
sendCallsSync: <const calls extends readonly unknown[], chainOverride extends import("viem").Chain | undefined = undefined>(parameters: import("viem").SendCallsSyncParameters<import("viem").Chain | undefined, import("viem").Account | undefined, chainOverride, calls>) => Promise<{
|
|
1424
|
+
version: string;
|
|
1423
1425
|
atomic: boolean;
|
|
1424
1426
|
capabilities?: {
|
|
1425
1427
|
[key: string]: any;
|
|
@@ -1429,7 +1431,6 @@ export declare class DeviceWalletFactorySubPackage {
|
|
|
1429
1431
|
chainId: number;
|
|
1430
1432
|
id: string;
|
|
1431
1433
|
receipts?: import("viem").WalletCallReceipt<bigint, "success" | "reverted">[] | undefined;
|
|
1432
|
-
version: string;
|
|
1433
1434
|
statusCode: number;
|
|
1434
1435
|
status: "pending" | "success" | "failure" | undefined;
|
|
1435
1436
|
}>;
|
|
@@ -2338,24 +2339,27 @@ export declare class DeviceWalletFactorySubPackage {
|
|
|
2338
2339
|
[x: `function[${string}]`]: undefined;
|
|
2339
2340
|
[x: `address[${string}]`]: undefined;
|
|
2340
2341
|
[x: `bool[${string}]`]: undefined;
|
|
2342
|
+
[x: `uint256[${string}]`]: undefined;
|
|
2343
|
+
[x: `uint64[${string}]`]: undefined;
|
|
2341
2344
|
[x: `bytes[${string}]`]: undefined;
|
|
2342
|
-
[x: `
|
|
2343
|
-
[x: `
|
|
2345
|
+
[x: `bytes32[${string}]`]: undefined;
|
|
2346
|
+
[x: `bytes4[${string}]`]: undefined;
|
|
2344
2347
|
[x: `bytes2[${string}]`]: undefined;
|
|
2348
|
+
[x: `bytes1[${string}]`]: undefined;
|
|
2345
2349
|
[x: `bytes3[${string}]`]: undefined;
|
|
2346
|
-
[x: `bytes4[${string}]`]: undefined;
|
|
2347
2350
|
[x: `bytes5[${string}]`]: undefined;
|
|
2348
|
-
[x: `
|
|
2351
|
+
[x: `bytes9[${string}]`]: undefined;
|
|
2349
2352
|
[x: `bytes7[${string}]`]: undefined;
|
|
2353
|
+
[x: `bytes6[${string}]`]: undefined;
|
|
2354
|
+
[x: `bytes17[${string}]`]: undefined;
|
|
2350
2355
|
[x: `bytes8[${string}]`]: undefined;
|
|
2351
|
-
[x: `
|
|
2356
|
+
[x: `bytes10[${string}]`]: undefined;
|
|
2357
|
+
[x: `bytes15[${string}]`]: undefined;
|
|
2352
2358
|
[x: `bytes11[${string}]`]: undefined;
|
|
2353
2359
|
[x: `bytes12[${string}]`]: undefined;
|
|
2354
2360
|
[x: `bytes13[${string}]`]: undefined;
|
|
2355
2361
|
[x: `bytes14[${string}]`]: undefined;
|
|
2356
|
-
[x: `bytes15[${string}]`]: undefined;
|
|
2357
2362
|
[x: `bytes16[${string}]`]: undefined;
|
|
2358
|
-
[x: `bytes17[${string}]`]: undefined;
|
|
2359
2363
|
[x: `bytes18[${string}]`]: undefined;
|
|
2360
2364
|
[x: `bytes19[${string}]`]: undefined;
|
|
2361
2365
|
[x: `bytes20[${string}]`]: undefined;
|
|
@@ -2370,7 +2374,6 @@ export declare class DeviceWalletFactorySubPackage {
|
|
|
2370
2374
|
[x: `bytes29[${string}]`]: undefined;
|
|
2371
2375
|
[x: `bytes30[${string}]`]: undefined;
|
|
2372
2376
|
[x: `bytes31[${string}]`]: undefined;
|
|
2373
|
-
[x: `bytes32[${string}]`]: undefined;
|
|
2374
2377
|
[x: `int[${string}]`]: undefined;
|
|
2375
2378
|
[x: `int8[${string}]`]: undefined;
|
|
2376
2379
|
[x: `int16[${string}]`]: undefined;
|
|
@@ -2412,7 +2415,6 @@ export declare class DeviceWalletFactorySubPackage {
|
|
|
2412
2415
|
[x: `uint40[${string}]`]: undefined;
|
|
2413
2416
|
[x: `uint48[${string}]`]: undefined;
|
|
2414
2417
|
[x: `uint56[${string}]`]: undefined;
|
|
2415
|
-
[x: `uint64[${string}]`]: undefined;
|
|
2416
2418
|
[x: `uint72[${string}]`]: undefined;
|
|
2417
2419
|
[x: `uint80[${string}]`]: undefined;
|
|
2418
2420
|
[x: `uint88[${string}]`]: undefined;
|
|
@@ -2436,28 +2438,30 @@ export declare class DeviceWalletFactorySubPackage {
|
|
|
2436
2438
|
[x: `uint232[${string}]`]: undefined;
|
|
2437
2439
|
[x: `uint240[${string}]`]: undefined;
|
|
2438
2440
|
[x: `uint248[${string}]`]: undefined;
|
|
2439
|
-
[x: `uint256[${string}]`]: undefined;
|
|
2440
2441
|
string?: undefined;
|
|
2441
2442
|
address?: undefined;
|
|
2442
2443
|
bool?: undefined;
|
|
2444
|
+
uint256?: undefined;
|
|
2445
|
+
uint64?: undefined;
|
|
2443
2446
|
bytes?: undefined;
|
|
2444
|
-
|
|
2445
|
-
|
|
2447
|
+
bytes32?: undefined;
|
|
2448
|
+
bytes4?: undefined;
|
|
2446
2449
|
bytes2?: undefined;
|
|
2450
|
+
bytes1?: undefined;
|
|
2447
2451
|
bytes3?: undefined;
|
|
2448
|
-
bytes4?: undefined;
|
|
2449
2452
|
bytes5?: undefined;
|
|
2450
|
-
|
|
2453
|
+
bytes9?: undefined;
|
|
2451
2454
|
bytes7?: undefined;
|
|
2455
|
+
bytes6?: undefined;
|
|
2456
|
+
bytes17?: undefined;
|
|
2452
2457
|
bytes8?: undefined;
|
|
2453
|
-
|
|
2458
|
+
bytes10?: undefined;
|
|
2459
|
+
bytes15?: undefined;
|
|
2454
2460
|
bytes11?: undefined;
|
|
2455
2461
|
bytes12?: undefined;
|
|
2456
2462
|
bytes13?: undefined;
|
|
2457
2463
|
bytes14?: undefined;
|
|
2458
|
-
bytes15?: undefined;
|
|
2459
2464
|
bytes16?: undefined;
|
|
2460
|
-
bytes17?: undefined;
|
|
2461
2465
|
bytes18?: undefined;
|
|
2462
2466
|
bytes19?: undefined;
|
|
2463
2467
|
bytes20?: undefined;
|
|
@@ -2472,7 +2476,6 @@ export declare class DeviceWalletFactorySubPackage {
|
|
|
2472
2476
|
bytes29?: undefined;
|
|
2473
2477
|
bytes30?: undefined;
|
|
2474
2478
|
bytes31?: undefined;
|
|
2475
|
-
bytes32?: undefined;
|
|
2476
2479
|
int8?: undefined;
|
|
2477
2480
|
int16?: undefined;
|
|
2478
2481
|
int24?: undefined;
|
|
@@ -2512,7 +2515,6 @@ export declare class DeviceWalletFactorySubPackage {
|
|
|
2512
2515
|
uint40?: undefined;
|
|
2513
2516
|
uint48?: undefined;
|
|
2514
2517
|
uint56?: undefined;
|
|
2515
|
-
uint64?: undefined;
|
|
2516
2518
|
uint72?: undefined;
|
|
2517
2519
|
uint80?: undefined;
|
|
2518
2520
|
uint88?: undefined;
|
|
@@ -2536,7 +2538,6 @@ export declare class DeviceWalletFactorySubPackage {
|
|
|
2536
2538
|
uint232?: undefined;
|
|
2537
2539
|
uint240?: undefined;
|
|
2538
2540
|
uint248?: undefined;
|
|
2539
|
-
uint256?: undefined;
|
|
2540
2541
|
} | {
|
|
2541
2542
|
[key: string]: unknown;
|
|
2542
2543
|
}, primaryType extends string>(args: import("viem").SignTypedDataParameters<typedData, primaryType, import("viem").Account | undefined>) => Promise<import("viem").SignTypedDataReturnType>;
|
|
@@ -2561,10 +2562,10 @@ export declare class DeviceWalletFactorySubPackage {
|
|
|
2561
2562
|
transport?: undefined;
|
|
2562
2563
|
type?: undefined;
|
|
2563
2564
|
uid?: undefined;
|
|
2564
|
-
} & import("viem").ExactPartial<Pick<import("viem").PublicActions<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined>, "
|
|
2565
|
+
} & import("viem").ExactPartial<Pick<import("viem").PublicActions<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined>, "call" | "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>) => client) => import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, { [K in keyof client]: client[K]; } & import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>;
|
|
2565
2566
|
};
|
|
2566
2567
|
constructor(walletClient: WalletClient, smartAccountClient: SmartAccountClient);
|
|
2567
|
-
createAccountWithEOA(deviceUniqueIdentifier: string, deviceWalletOwnerKey:
|
|
2568
|
-
getAddress(deviceUniqueIdentifier: string, deviceWalletOwnerKey:
|
|
2569
|
-
getCurrentDeviceWalletImplementation(): Promise
|
|
2568
|
+
createAccountWithEOA(deviceUniqueIdentifier: string, deviceWalletOwnerKey: P256Key, salt: bigint, depositAmount: bigint): Promise<`0x${string}`>;
|
|
2569
|
+
getAddress(deviceUniqueIdentifier: string, deviceWalletOwnerKey: P256Key, salt: bigint): Promise<`0x${string}`>;
|
|
2570
|
+
getCurrentDeviceWalletImplementation(): Promise<`0x${string}`>;
|
|
2570
2571
|
}
|
|
@@ -7,10 +7,8 @@ export declare class ESIMWalletSubPackage {
|
|
|
7
7
|
constructor(client: SmartAccountClient, address: Address);
|
|
8
8
|
acceptOwnershipTransfer(): Promise<import("@aa-sdk/core").SendUserOperationResult<keyof import("@aa-sdk/core").EntryPointRegistryBase<unknown>>>;
|
|
9
9
|
buyDataBundle(dataBundleDetails: DataBundleDetails): Promise<import("@aa-sdk/core").SendUserOperationResult<keyof import("@aa-sdk/core").EntryPointRegistryBase<unknown>>>;
|
|
10
|
-
owner(): Promise
|
|
11
|
-
populateHistory(dataBundleDetails: Array<DataBundleDetails>): Promise<import("@aa-sdk/core").SendUserOperationResult<keyof import("@aa-sdk/core").EntryPointRegistryBase<unknown>>>;
|
|
10
|
+
owner(): Promise<`0x${string}`>;
|
|
12
11
|
requestTransferOwnership(newOwner: Address): Promise<import("@aa-sdk/core").SendUserOperationResult<keyof import("@aa-sdk/core").EntryPointRegistryBase<unknown>>>;
|
|
13
12
|
sendETHToDeviceWallet(amount: bigint): Promise<import("@aa-sdk/core").SendUserOperationResult<keyof import("@aa-sdk/core").EntryPointRegistryBase<unknown>>>;
|
|
14
|
-
|
|
15
|
-
_transferOwnership(amount: bigint): Promise<import("@aa-sdk/core").SendUserOperationResult<keyof import("@aa-sdk/core").EntryPointRegistryBase<unknown>>>;
|
|
13
|
+
setESIMUniqueIdentifier(eSIMUniqueIdentifier: string): Promise<import("@aa-sdk/core").SendUserOperationResult<keyof import("@aa-sdk/core").EntryPointRegistryBase<unknown>>>;
|
|
16
14
|
}
|
|
@@ -1406,7 +1406,7 @@ export declare class ESIMWalletFactorySubPackage {
|
|
|
1406
1406
|
authorizationList: import("viem").TransactionSerializableEIP7702["authorizationList"];
|
|
1407
1407
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_34 extends string ? T_34 : undefined : never : never) | undefined>>> & {
|
|
1408
1408
|
chainId?: number | undefined;
|
|
1409
|
-
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "
|
|
1409
|
+
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "type" | "chainId" | "gas" | "blobVersionedHashes" | "fees") extends infer T_39 ? T_39 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "type" | "chainId" | "gas" | "blobVersionedHashes" | "fees") ? T_39 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_39 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) & {
|
|
1410
1410
|
_capabilities?: {
|
|
1411
1411
|
[x: string]: any;
|
|
1412
1412
|
} | undefined;
|
|
@@ -1420,6 +1420,7 @@ export declare class ESIMWalletFactorySubPackage {
|
|
|
1420
1420
|
id: string;
|
|
1421
1421
|
}>;
|
|
1422
1422
|
sendCallsSync: <const calls extends readonly unknown[], chainOverride extends import("viem").Chain | undefined = undefined>(parameters: import("viem").SendCallsSyncParameters<import("viem").Chain | undefined, import("viem").Account | undefined, chainOverride, calls>) => Promise<{
|
|
1423
|
+
version: string;
|
|
1423
1424
|
atomic: boolean;
|
|
1424
1425
|
capabilities?: {
|
|
1425
1426
|
[key: string]: any;
|
|
@@ -1429,7 +1430,6 @@ export declare class ESIMWalletFactorySubPackage {
|
|
|
1429
1430
|
chainId: number;
|
|
1430
1431
|
id: string;
|
|
1431
1432
|
receipts?: import("viem").WalletCallReceipt<bigint, "success" | "reverted">[] | undefined;
|
|
1432
|
-
version: string;
|
|
1433
1433
|
statusCode: number;
|
|
1434
1434
|
status: "pending" | "success" | "failure" | undefined;
|
|
1435
1435
|
}>;
|
|
@@ -2338,24 +2338,27 @@ export declare class ESIMWalletFactorySubPackage {
|
|
|
2338
2338
|
[x: `function[${string}]`]: undefined;
|
|
2339
2339
|
[x: `address[${string}]`]: undefined;
|
|
2340
2340
|
[x: `bool[${string}]`]: undefined;
|
|
2341
|
+
[x: `uint256[${string}]`]: undefined;
|
|
2342
|
+
[x: `uint64[${string}]`]: undefined;
|
|
2341
2343
|
[x: `bytes[${string}]`]: undefined;
|
|
2342
|
-
[x: `
|
|
2343
|
-
[x: `
|
|
2344
|
+
[x: `bytes32[${string}]`]: undefined;
|
|
2345
|
+
[x: `bytes4[${string}]`]: undefined;
|
|
2344
2346
|
[x: `bytes2[${string}]`]: undefined;
|
|
2347
|
+
[x: `bytes1[${string}]`]: undefined;
|
|
2345
2348
|
[x: `bytes3[${string}]`]: undefined;
|
|
2346
|
-
[x: `bytes4[${string}]`]: undefined;
|
|
2347
2349
|
[x: `bytes5[${string}]`]: undefined;
|
|
2348
|
-
[x: `
|
|
2350
|
+
[x: `bytes9[${string}]`]: undefined;
|
|
2349
2351
|
[x: `bytes7[${string}]`]: undefined;
|
|
2352
|
+
[x: `bytes6[${string}]`]: undefined;
|
|
2353
|
+
[x: `bytes17[${string}]`]: undefined;
|
|
2350
2354
|
[x: `bytes8[${string}]`]: undefined;
|
|
2351
|
-
[x: `
|
|
2355
|
+
[x: `bytes10[${string}]`]: undefined;
|
|
2356
|
+
[x: `bytes15[${string}]`]: undefined;
|
|
2352
2357
|
[x: `bytes11[${string}]`]: undefined;
|
|
2353
2358
|
[x: `bytes12[${string}]`]: undefined;
|
|
2354
2359
|
[x: `bytes13[${string}]`]: undefined;
|
|
2355
2360
|
[x: `bytes14[${string}]`]: undefined;
|
|
2356
|
-
[x: `bytes15[${string}]`]: undefined;
|
|
2357
2361
|
[x: `bytes16[${string}]`]: undefined;
|
|
2358
|
-
[x: `bytes17[${string}]`]: undefined;
|
|
2359
2362
|
[x: `bytes18[${string}]`]: undefined;
|
|
2360
2363
|
[x: `bytes19[${string}]`]: undefined;
|
|
2361
2364
|
[x: `bytes20[${string}]`]: undefined;
|
|
@@ -2370,7 +2373,6 @@ export declare class ESIMWalletFactorySubPackage {
|
|
|
2370
2373
|
[x: `bytes29[${string}]`]: undefined;
|
|
2371
2374
|
[x: `bytes30[${string}]`]: undefined;
|
|
2372
2375
|
[x: `bytes31[${string}]`]: undefined;
|
|
2373
|
-
[x: `bytes32[${string}]`]: undefined;
|
|
2374
2376
|
[x: `int[${string}]`]: undefined;
|
|
2375
2377
|
[x: `int8[${string}]`]: undefined;
|
|
2376
2378
|
[x: `int16[${string}]`]: undefined;
|
|
@@ -2412,7 +2414,6 @@ export declare class ESIMWalletFactorySubPackage {
|
|
|
2412
2414
|
[x: `uint40[${string}]`]: undefined;
|
|
2413
2415
|
[x: `uint48[${string}]`]: undefined;
|
|
2414
2416
|
[x: `uint56[${string}]`]: undefined;
|
|
2415
|
-
[x: `uint64[${string}]`]: undefined;
|
|
2416
2417
|
[x: `uint72[${string}]`]: undefined;
|
|
2417
2418
|
[x: `uint80[${string}]`]: undefined;
|
|
2418
2419
|
[x: `uint88[${string}]`]: undefined;
|
|
@@ -2436,28 +2437,30 @@ export declare class ESIMWalletFactorySubPackage {
|
|
|
2436
2437
|
[x: `uint232[${string}]`]: undefined;
|
|
2437
2438
|
[x: `uint240[${string}]`]: undefined;
|
|
2438
2439
|
[x: `uint248[${string}]`]: undefined;
|
|
2439
|
-
[x: `uint256[${string}]`]: undefined;
|
|
2440
2440
|
string?: undefined;
|
|
2441
2441
|
address?: undefined;
|
|
2442
2442
|
bool?: undefined;
|
|
2443
|
+
uint256?: undefined;
|
|
2444
|
+
uint64?: undefined;
|
|
2443
2445
|
bytes?: undefined;
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
+
bytes32?: undefined;
|
|
2447
|
+
bytes4?: undefined;
|
|
2446
2448
|
bytes2?: undefined;
|
|
2449
|
+
bytes1?: undefined;
|
|
2447
2450
|
bytes3?: undefined;
|
|
2448
|
-
bytes4?: undefined;
|
|
2449
2451
|
bytes5?: undefined;
|
|
2450
|
-
|
|
2452
|
+
bytes9?: undefined;
|
|
2451
2453
|
bytes7?: undefined;
|
|
2454
|
+
bytes6?: undefined;
|
|
2455
|
+
bytes17?: undefined;
|
|
2452
2456
|
bytes8?: undefined;
|
|
2453
|
-
|
|
2457
|
+
bytes10?: undefined;
|
|
2458
|
+
bytes15?: undefined;
|
|
2454
2459
|
bytes11?: undefined;
|
|
2455
2460
|
bytes12?: undefined;
|
|
2456
2461
|
bytes13?: undefined;
|
|
2457
2462
|
bytes14?: undefined;
|
|
2458
|
-
bytes15?: undefined;
|
|
2459
2463
|
bytes16?: undefined;
|
|
2460
|
-
bytes17?: undefined;
|
|
2461
2464
|
bytes18?: undefined;
|
|
2462
2465
|
bytes19?: undefined;
|
|
2463
2466
|
bytes20?: undefined;
|
|
@@ -2472,7 +2475,6 @@ export declare class ESIMWalletFactorySubPackage {
|
|
|
2472
2475
|
bytes29?: undefined;
|
|
2473
2476
|
bytes30?: undefined;
|
|
2474
2477
|
bytes31?: undefined;
|
|
2475
|
-
bytes32?: undefined;
|
|
2476
2478
|
int8?: undefined;
|
|
2477
2479
|
int16?: undefined;
|
|
2478
2480
|
int24?: undefined;
|
|
@@ -2512,7 +2514,6 @@ export declare class ESIMWalletFactorySubPackage {
|
|
|
2512
2514
|
uint40?: undefined;
|
|
2513
2515
|
uint48?: undefined;
|
|
2514
2516
|
uint56?: undefined;
|
|
2515
|
-
uint64?: undefined;
|
|
2516
2517
|
uint72?: undefined;
|
|
2517
2518
|
uint80?: undefined;
|
|
2518
2519
|
uint88?: undefined;
|
|
@@ -2536,7 +2537,6 @@ export declare class ESIMWalletFactorySubPackage {
|
|
|
2536
2537
|
uint232?: undefined;
|
|
2537
2538
|
uint240?: undefined;
|
|
2538
2539
|
uint248?: undefined;
|
|
2539
|
-
uint256?: undefined;
|
|
2540
2540
|
} | {
|
|
2541
2541
|
[key: string]: unknown;
|
|
2542
2542
|
}, primaryType extends string>(args: import("viem").SignTypedDataParameters<typedData, primaryType, import("viem").Account | undefined>) => Promise<import("viem").SignTypedDataReturnType>;
|
|
@@ -2561,11 +2561,9 @@ export declare class ESIMWalletFactorySubPackage {
|
|
|
2561
2561
|
transport?: undefined;
|
|
2562
2562
|
type?: undefined;
|
|
2563
2563
|
uid?: undefined;
|
|
2564
|
-
} & import("viem").ExactPartial<Pick<import("viem").PublicActions<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined>, "
|
|
2564
|
+
} & import("viem").ExactPartial<Pick<import("viem").PublicActions<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined>, "call" | "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>) => client) => import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, { [K in keyof client]: client[K]; } & import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>;
|
|
2565
2565
|
};
|
|
2566
2566
|
constructor(walletClient: WalletClient, smartAccountClient: SmartAccountClient);
|
|
2567
|
-
deployESIMWalletWithEOA(deviceWalletAddress: Address, salt: bigint): Promise<`0x${string}`>;
|
|
2568
2567
|
deployESIMWalletWithUserOp(deviceWalletAddress: Address, salt: bigint): Promise<import("@aa-sdk/core").SendUserOperationResult<keyof import("@aa-sdk/core").EntryPointRegistryBase<unknown>>>;
|
|
2569
|
-
|
|
2570
|
-
_getCurrentESIMWalletImplementation(): Promise<import("@aa-sdk/core").SendUserOperationResult<keyof import("@aa-sdk/core").EntryPointRegistryBase<unknown>>>;
|
|
2568
|
+
getCurrentESIMWalletImplementation(): Promise<`0x${string}`>;
|
|
2571
2569
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { Hex } from "viem";
|
|
2
|
-
import { DataBundleDetails } from "../types";
|
|
3
1
|
import { SmartAccountClient } from "@aa-sdk/core";
|
|
4
2
|
export declare class LazyWalletRegistrySubPackage {
|
|
5
3
|
client: SmartAccountClient;
|
|
6
4
|
constructor(client: SmartAccountClient);
|
|
7
|
-
|
|
8
|
-
_deployLazyWalletAndSetESIMIdentifier(deviceOwnerPublicKey: Hex[2], deviceUniqueIdentifier: string, salt: bigint, depositAmount: bigint): Promise<import("@aa-sdk/core").SendUserOperationResult<keyof import("@aa-sdk/core").EntryPointRegistryBase<unknown>>>;
|
|
9
|
-
_isLazyWalletDeployed(deviceUniqueIdentifier: string): Promise<import("@aa-sdk/core").SendUserOperationResult<keyof import("@aa-sdk/core").EntryPointRegistryBase<unknown>>>;
|
|
10
|
-
_switchESIMIdentifierToNewDeviceIdentifier(eSIMIdentifier: string, oldDeviceIdentifier: string, newDeviceIdentifier: string): Promise<import("@aa-sdk/core").SendUserOperationResult<keyof import("@aa-sdk/core").EntryPointRegistryBase<unknown>>>;
|
|
5
|
+
isLazyWalletDeployed(deviceUniqueIdentifier: string): Promise<boolean>;
|
|
11
6
|
}
|
|
@@ -1406,7 +1406,7 @@ export declare class SmartAccountSubPackage {
|
|
|
1406
1406
|
authorizationList: import("viem").TransactionSerializableEIP7702["authorizationList"];
|
|
1407
1407
|
} ? "eip7702" : never) | (request["type"] extends string | undefined ? Extract<request["type"], string> : never)>) ? T_34 extends string ? T_34 : undefined : never : never) | undefined>>> & {
|
|
1408
1408
|
chainId?: number | undefined;
|
|
1409
|
-
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "
|
|
1409
|
+
}, (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "type" | "chainId" | "gas" | "blobVersionedHashes" | "fees") extends infer T_39 ? T_39 extends (request["parameters"] extends readonly import("viem").PrepareTransactionRequestParameterType[] ? request["parameters"][number] : "nonce" | "type" | "chainId" | "gas" | "blobVersionedHashes" | "fees") ? T_39 extends "fees" ? "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" : T_39 : never : never> & (unknown extends request["kzg"] ? {} : Pick<request, "kzg">) & {
|
|
1410
1410
|
_capabilities?: {
|
|
1411
1411
|
[x: string]: any;
|
|
1412
1412
|
} | undefined;
|
|
@@ -1420,6 +1420,7 @@ export declare class SmartAccountSubPackage {
|
|
|
1420
1420
|
id: string;
|
|
1421
1421
|
}>;
|
|
1422
1422
|
sendCallsSync: <const calls extends readonly unknown[], chainOverride extends import("viem").Chain | undefined = undefined>(parameters: import("viem").SendCallsSyncParameters<import("viem").Chain | undefined, import("viem").Account | undefined, chainOverride, calls>) => Promise<{
|
|
1423
|
+
version: string;
|
|
1423
1424
|
atomic: boolean;
|
|
1424
1425
|
capabilities?: {
|
|
1425
1426
|
[key: string]: any;
|
|
@@ -1429,7 +1430,6 @@ export declare class SmartAccountSubPackage {
|
|
|
1429
1430
|
chainId: number;
|
|
1430
1431
|
id: string;
|
|
1431
1432
|
receipts?: import("viem").WalletCallReceipt<bigint, "success" | "reverted">[] | undefined;
|
|
1432
|
-
version: string;
|
|
1433
1433
|
statusCode: number;
|
|
1434
1434
|
status: "pending" | "success" | "failure" | undefined;
|
|
1435
1435
|
}>;
|
|
@@ -2338,24 +2338,27 @@ export declare class SmartAccountSubPackage {
|
|
|
2338
2338
|
[x: `function[${string}]`]: undefined;
|
|
2339
2339
|
[x: `address[${string}]`]: undefined;
|
|
2340
2340
|
[x: `bool[${string}]`]: undefined;
|
|
2341
|
+
[x: `uint256[${string}]`]: undefined;
|
|
2342
|
+
[x: `uint64[${string}]`]: undefined;
|
|
2341
2343
|
[x: `bytes[${string}]`]: undefined;
|
|
2342
|
-
[x: `
|
|
2343
|
-
[x: `
|
|
2344
|
+
[x: `bytes32[${string}]`]: undefined;
|
|
2345
|
+
[x: `bytes4[${string}]`]: undefined;
|
|
2344
2346
|
[x: `bytes2[${string}]`]: undefined;
|
|
2347
|
+
[x: `bytes1[${string}]`]: undefined;
|
|
2345
2348
|
[x: `bytes3[${string}]`]: undefined;
|
|
2346
|
-
[x: `bytes4[${string}]`]: undefined;
|
|
2347
2349
|
[x: `bytes5[${string}]`]: undefined;
|
|
2348
|
-
[x: `
|
|
2350
|
+
[x: `bytes9[${string}]`]: undefined;
|
|
2349
2351
|
[x: `bytes7[${string}]`]: undefined;
|
|
2352
|
+
[x: `bytes6[${string}]`]: undefined;
|
|
2353
|
+
[x: `bytes17[${string}]`]: undefined;
|
|
2350
2354
|
[x: `bytes8[${string}]`]: undefined;
|
|
2351
|
-
[x: `
|
|
2355
|
+
[x: `bytes10[${string}]`]: undefined;
|
|
2356
|
+
[x: `bytes15[${string}]`]: undefined;
|
|
2352
2357
|
[x: `bytes11[${string}]`]: undefined;
|
|
2353
2358
|
[x: `bytes12[${string}]`]: undefined;
|
|
2354
2359
|
[x: `bytes13[${string}]`]: undefined;
|
|
2355
2360
|
[x: `bytes14[${string}]`]: undefined;
|
|
2356
|
-
[x: `bytes15[${string}]`]: undefined;
|
|
2357
2361
|
[x: `bytes16[${string}]`]: undefined;
|
|
2358
|
-
[x: `bytes17[${string}]`]: undefined;
|
|
2359
2362
|
[x: `bytes18[${string}]`]: undefined;
|
|
2360
2363
|
[x: `bytes19[${string}]`]: undefined;
|
|
2361
2364
|
[x: `bytes20[${string}]`]: undefined;
|
|
@@ -2370,7 +2373,6 @@ export declare class SmartAccountSubPackage {
|
|
|
2370
2373
|
[x: `bytes29[${string}]`]: undefined;
|
|
2371
2374
|
[x: `bytes30[${string}]`]: undefined;
|
|
2372
2375
|
[x: `bytes31[${string}]`]: undefined;
|
|
2373
|
-
[x: `bytes32[${string}]`]: undefined;
|
|
2374
2376
|
[x: `int[${string}]`]: undefined;
|
|
2375
2377
|
[x: `int8[${string}]`]: undefined;
|
|
2376
2378
|
[x: `int16[${string}]`]: undefined;
|
|
@@ -2412,7 +2414,6 @@ export declare class SmartAccountSubPackage {
|
|
|
2412
2414
|
[x: `uint40[${string}]`]: undefined;
|
|
2413
2415
|
[x: `uint48[${string}]`]: undefined;
|
|
2414
2416
|
[x: `uint56[${string}]`]: undefined;
|
|
2415
|
-
[x: `uint64[${string}]`]: undefined;
|
|
2416
2417
|
[x: `uint72[${string}]`]: undefined;
|
|
2417
2418
|
[x: `uint80[${string}]`]: undefined;
|
|
2418
2419
|
[x: `uint88[${string}]`]: undefined;
|
|
@@ -2436,28 +2437,30 @@ export declare class SmartAccountSubPackage {
|
|
|
2436
2437
|
[x: `uint232[${string}]`]: undefined;
|
|
2437
2438
|
[x: `uint240[${string}]`]: undefined;
|
|
2438
2439
|
[x: `uint248[${string}]`]: undefined;
|
|
2439
|
-
[x: `uint256[${string}]`]: undefined;
|
|
2440
2440
|
string?: undefined;
|
|
2441
2441
|
address?: undefined;
|
|
2442
2442
|
bool?: undefined;
|
|
2443
|
+
uint256?: undefined;
|
|
2444
|
+
uint64?: undefined;
|
|
2443
2445
|
bytes?: undefined;
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
+
bytes32?: undefined;
|
|
2447
|
+
bytes4?: undefined;
|
|
2446
2448
|
bytes2?: undefined;
|
|
2449
|
+
bytes1?: undefined;
|
|
2447
2450
|
bytes3?: undefined;
|
|
2448
|
-
bytes4?: undefined;
|
|
2449
2451
|
bytes5?: undefined;
|
|
2450
|
-
|
|
2452
|
+
bytes9?: undefined;
|
|
2451
2453
|
bytes7?: undefined;
|
|
2454
|
+
bytes6?: undefined;
|
|
2455
|
+
bytes17?: undefined;
|
|
2452
2456
|
bytes8?: undefined;
|
|
2453
|
-
|
|
2457
|
+
bytes10?: undefined;
|
|
2458
|
+
bytes15?: undefined;
|
|
2454
2459
|
bytes11?: undefined;
|
|
2455
2460
|
bytes12?: undefined;
|
|
2456
2461
|
bytes13?: undefined;
|
|
2457
2462
|
bytes14?: undefined;
|
|
2458
|
-
bytes15?: undefined;
|
|
2459
2463
|
bytes16?: undefined;
|
|
2460
|
-
bytes17?: undefined;
|
|
2461
2464
|
bytes18?: undefined;
|
|
2462
2465
|
bytes19?: undefined;
|
|
2463
2466
|
bytes20?: undefined;
|
|
@@ -2472,7 +2475,6 @@ export declare class SmartAccountSubPackage {
|
|
|
2472
2475
|
bytes29?: undefined;
|
|
2473
2476
|
bytes30?: undefined;
|
|
2474
2477
|
bytes31?: undefined;
|
|
2475
|
-
bytes32?: undefined;
|
|
2476
2478
|
int8?: undefined;
|
|
2477
2479
|
int16?: undefined;
|
|
2478
2480
|
int24?: undefined;
|
|
@@ -2512,7 +2514,6 @@ export declare class SmartAccountSubPackage {
|
|
|
2512
2514
|
uint40?: undefined;
|
|
2513
2515
|
uint48?: undefined;
|
|
2514
2516
|
uint56?: undefined;
|
|
2515
|
-
uint64?: undefined;
|
|
2516
2517
|
uint72?: undefined;
|
|
2517
2518
|
uint80?: undefined;
|
|
2518
2519
|
uint88?: undefined;
|
|
@@ -2536,7 +2537,6 @@ export declare class SmartAccountSubPackage {
|
|
|
2536
2537
|
uint232?: undefined;
|
|
2537
2538
|
uint240?: undefined;
|
|
2538
2539
|
uint248?: undefined;
|
|
2539
|
-
uint256?: undefined;
|
|
2540
2540
|
} | {
|
|
2541
2541
|
[key: string]: unknown;
|
|
2542
2542
|
}, primaryType extends string>(args: import("viem").SignTypedDataParameters<typedData, primaryType, import("viem").Account | undefined>) => Promise<import("viem").SignTypedDataReturnType>;
|
|
@@ -2561,7 +2561,7 @@ export declare class SmartAccountSubPackage {
|
|
|
2561
2561
|
transport?: undefined;
|
|
2562
2562
|
type?: undefined;
|
|
2563
2563
|
uid?: undefined;
|
|
2564
|
-
} & import("viem").ExactPartial<Pick<import("viem").PublicActions<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined>, "
|
|
2564
|
+
} & import("viem").ExactPartial<Pick<import("viem").PublicActions<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined>, "call" | "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>) => client) => import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, { [K in keyof client]: client[K]; } & import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>;
|
|
2565
2565
|
};
|
|
2566
2566
|
credentialId: string;
|
|
2567
2567
|
rpId: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Hex } from "viem";
|
|
1
2
|
import { WebAuthnSignature } from "../types.js";
|
|
2
3
|
import { SmartAccountClient } from "@aa-sdk/core";
|
|
3
|
-
export declare const _verifySignature: (client: SmartAccountClient, message:
|
|
4
|
+
export declare const _verifySignature: (client: SmartAccountClient, message: Hex, requireMessageVerification: boolean, webAuthnSignature: WebAuthnSignature, x: bigint, y: bigint) => Promise<boolean>;
|
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
import { SmartContractAccount, SmartAccountClient } from "@aa-sdk/core";
|
|
2
|
-
import { WalletClient, Hex } from "viem";
|
|
2
|
+
import { type SignableMessage, WalletClient, Hex, TypedDataDefinition, TypedData } from "viem";
|
|
3
3
|
import { P256Key, WebAuthnSignature } from "../../types.js";
|
|
4
|
+
/**
|
|
5
|
+
* BeaconProxy creation bytecode, used to compute the CREATE2 counterfactual
|
|
6
|
+
* DeviceWallet address off-chain (initCode = creationCode ++ abi.encode(beacon, initData)).
|
|
7
|
+
*
|
|
8
|
+
* PINNED - this MUST byte-for-byte match the BeaconProxy the on-chain
|
|
9
|
+
* DeviceWalletFactory deploys, or the computed address will diverge from the
|
|
10
|
+
* deployed one. Source of truth:
|
|
11
|
+
* OpenZeppelin Contracts v5.0.0 - proxy/beacon/BeaconProxy.sol
|
|
12
|
+
* compiled by Hardhat (smart-contract-suite `artifacts/@openzeppelin/contracts/
|
|
13
|
+
* proxy/beacon/BeaconProxy.sol/BeaconProxy.json`), solc 0.8.25+commit.b61c2a91,
|
|
14
|
+
* optimizer { enabled: true, runs: 200 }, viaIR: true.
|
|
15
|
+
* NOTE: the Foundry `out/` artifact (different optimizer settings) produces a
|
|
16
|
+
* DIFFERENT bytecode - do not swap it in without re-verifying the counterfactual.
|
|
17
|
+
* `_assertCounterfactualMatchesOnChain` guards against drift at runtime.
|
|
18
|
+
*/
|
|
19
|
+
export declare const BEACON_PROXY_CREATION_CODE: Hex;
|
|
4
20
|
export declare const _stamp: (credentialId: string, rpId: string, payload: Hex) => Promise<WebAuthnSignature>;
|
|
21
|
+
export declare const _getAccountInitCode: (client: WalletClient, deviceUniqueIdentifier: string, deviceWalletOwnerKey: P256Key, salt: bigint) => Promise<Hex>;
|
|
22
|
+
export declare const getInitCodeHash: (client: WalletClient, deviceUniqueIdentifier: string, deviceWalletOwnerKey: P256Key) => Promise<Hex>;
|
|
23
|
+
export declare const getCounterFactualAddress: (client: WalletClient, deviceUniqueIdentifier: string, deviceWalletOwnerKey: P256Key, salt: bigint) => Promise<Hex>;
|
|
24
|
+
/**
|
|
25
|
+
* Optional drift guard. Recomputes the counterfactual address off-chain (using
|
|
26
|
+
* the pinned {@link BEACON_PROXY_CREATION_CODE}) and compares it against the
|
|
27
|
+
* on-chain `DeviceWalletFactory.getCounterFactualAddress` view - which derives
|
|
28
|
+
* the address from the BeaconProxy the factory ACTUALLY deploys. A mismatch
|
|
29
|
+
* means the pinned proxy bytecode (or init encoding) has drifted from the
|
|
30
|
+
* deployed contract, so this throws early instead of letting a UserOp deploy to,
|
|
31
|
+
* or fund, the wrong address.
|
|
32
|
+
*
|
|
33
|
+
* Not wired into the default account-creation path (it costs one extra RPC);
|
|
34
|
+
* call it explicitly in environments where you want the extra safety, e.g.
|
|
35
|
+
* after a contract redeploy or on first use against a new chain.
|
|
36
|
+
*/
|
|
37
|
+
export declare const _assertCounterfactualMatchesOnChain: (client: WalletClient, deviceUniqueIdentifier: string, deviceWalletOwnerKey: P256Key, salt: bigint) => Promise<Hex>;
|
|
38
|
+
export declare const _encodeSignature: (webAuthnSignature: WebAuthnSignature, validUntil: number) => Promise<Hex>;
|
|
39
|
+
export declare const _signMessage: (message: SignableMessage, credentialId: string, rpId: string) => Promise<Hex>;
|
|
40
|
+
export declare const _signTypedData: <const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(typedData: TypedDataDefinition<typedData, primaryType>, credentialId: string, rpId: string) => Promise<Hex>;
|
|
41
|
+
export declare const _signUserOperationHash: (credentialId: string, rpId: string, userOpHash: Hex) => Promise<Hex>;
|
|
5
42
|
export declare const _getSmartWallet: (client: WalletClient, credentialId: string, rpId: string, organiationId: string, deviceUniqueIdentifier: string, deviceWalletOwnerKey: P256Key, salt: bigint) => Promise<SmartContractAccount>;
|
|
6
43
|
export declare const _getSmartWalletClient: (client: WalletClient, pimlicoAPIKey: string, gasPolicyId: string, account: SmartContractAccount) => Promise<SmartAccountClient>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Address, WalletClient } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* Admin-EOA logic targeting a specific `DeviceWallet` instance (its address is
|
|
4
|
+
* passed in - there is no single factory address). Both functions are admin
|
|
5
|
+
* gated on chain (`deployESIMWallet` is `onlyESIMWalletAdmin`,
|
|
6
|
+
* `setESIMUniqueIdentifierForAnESIMWallet` is `onlyESIMWalletAdminOrRegistry`),
|
|
7
|
+
* so they cannot be driven from a device-wallet userOp and live on the EOA surface.
|
|
8
|
+
*/
|
|
9
|
+
/** Deploy a new eSIM wallet under a device wallet. `onlyESIMWalletAdmin`. */
|
|
10
|
+
export declare const _deployESIMWallet: (client: WalletClient, deviceWalletAddress: Address, hasAccessToETH: boolean, salt: bigint) => Promise<`0x${string}`>;
|
|
11
|
+
/** Bind an eSIM's unique identifier to its wallet. `onlyESIMWalletAdminOrRegistry`. */
|
|
12
|
+
export declare const _setESIMUniqueIdentifierForAnESIMWallet: (client: WalletClient, deviceWalletAddress: Address, eSIMWalletAddress: Address, eSIMUniqueIdentifier: string) => Promise<`0x${string}`>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Address, WalletClient } from "viem";
|
|
2
|
+
import { P256Key } from "../../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Admin-EOA logic for `DeviceWalletFactory`.
|
|
5
|
+
*
|
|
6
|
+
* Every function here is `onlyAdmin` / `onlyAdminOrRegistry` / `onlyOwner` on
|
|
7
|
+
* chain, i.e. the caller must be the `eSIMWalletAdmin` (or `upgradeManager`)
|
|
8
|
+
* EOA - never a device-wallet userOp. They therefore live on the EOA surface
|
|
9
|
+
* (`KokioAdmin`) and use `writeContract`, mirroring `_createAccountWithEOA`
|
|
10
|
+
* (which is reused as-is from `../deviceWalletFactory.js`).
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Batch-deploy device wallets for lazy/fiat users. `onlyAdminOrRegistry`,
|
|
14
|
+
* `payable`: `value` is the total ETH pot from which each `depositAmounts[i]`
|
|
15
|
+
* is drawn; any surplus is refunded to the caller on chain.
|
|
16
|
+
*/
|
|
17
|
+
export declare const _deployDeviceWalletForUsers: (client: WalletClient, deviceUniqueIdentifiers: Array<string>, deviceWalletOwnersKey: Array<P256Key>, salts: Array<bigint>, depositAmounts: Array<bigint>, value: bigint) => Promise<`0x${string}`>;
|
|
18
|
+
/** Register a freshly created device wallet with the factory. `onlyAdminOrRegistry`. */
|
|
19
|
+
export declare const _postCreateAccount: (client: WalletClient, deviceWallet: Address, deviceUniqueIdentifier: string, deviceWalletOwnerKey: P256Key) => Promise<`0x${string}`>;
|
|
20
|
+
/** One-time wiring of the registry into the factory. `onlyAdmin`. */
|
|
21
|
+
export declare const _addRegistryAddress: (client: WalletClient, registryContractAddress: Address) => Promise<`0x${string}`>;
|
|
22
|
+
/** Update the vault that receives eSIM payments. `onlyAdmin`. */
|
|
23
|
+
export declare const _updateVaultAddress: (client: WalletClient, newVaultAddress: Address) => Promise<`0x${string}`>;
|
|
24
|
+
/** Step 1 of the 2-step admin handover: propose a new admin. `onlyAdmin`. */
|
|
25
|
+
export declare const _requestAdminUpdate: (client: WalletClient, newAdmin: Address) => Promise<`0x${string}`>;
|
|
26
|
+
/**
|
|
27
|
+
* Step 2 of the 2-step admin handover: the proposed admin accepts. The chain
|
|
28
|
+
* requires `msg.sender` to equal the pending admin, so the `client` here must
|
|
29
|
+
* be the newly proposed admin EOA.
|
|
30
|
+
*/
|
|
31
|
+
export declare const _acceptAdminUpdate: (client: WalletClient) => Promise<`0x${string}`>;
|
|
32
|
+
/** Point the device-wallet beacon at a new implementation. `onlyOwner` (upgradeManager). */
|
|
33
|
+
export declare const _updateDeviceWalletImplementation: (client: WalletClient, newDeviceImpl: Address) => Promise<`0x${string}`>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Address, WalletClient } from "viem";
|
|
2
|
+
import { DataBundleDetails } from "../../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Admin-EOA logic targeting a specific `ESIMWallet` instance (address passed in).
|
|
5
|
+
* `buyDataBundle` is `onlyDeviceWalletOrESIMWalletAdmin`, so the admin EOA can
|
|
6
|
+
* call it directly.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Buy a data bundle for an eSIM wallet. `onlyDeviceWalletOrESIMWalletAdmin`,
|
|
10
|
+
* `payable`. `value` is optional: the contract pulls any shortfall from the
|
|
11
|
+
* device wallet's balance, so an admin can pass `0n` when the wallet is funded,
|
|
12
|
+
* or forward `dataBundlePrice` to pay directly.
|
|
13
|
+
*/
|
|
14
|
+
export declare const _buyDataBundle: (client: WalletClient, eSIMWalletAddress: Address, dataBundleDetails: DataBundleDetails, value?: bigint) => Promise<`0x${string}`>;
|