@account-kit/smart-contracts 4.6.1 → 4.8.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/dist/esm/src/ma-v2/abis/accountFactoryAbi.d.ts +492 -0
- package/dist/esm/src/ma-v2/abis/accountFactoryAbi.js +639 -0
- package/dist/esm/src/ma-v2/abis/accountFactoryAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/abis/modularAccountAbi.d.ts +954 -0
- package/dist/esm/src/ma-v2/abis/modularAccountAbi.js +1242 -0
- package/dist/esm/src/ma-v2/abis/modularAccountAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.d.ts +991 -0
- package/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.js +1289 -0
- package/dist/esm/src/ma-v2/abis/semiModularAccountBytecodeAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.d.ts +1001 -0
- package/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.js +1302 -0
- package/dist/esm/src/ma-v2/abis/semiModularAccountStorageAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/account/nativeSMASigner.d.ts +238 -0
- package/dist/esm/src/ma-v2/account/nativeSMASigner.js +88 -0
- package/dist/esm/src/ma-v2/account/nativeSMASigner.js.map +1 -0
- package/dist/esm/src/ma-v2/account/semiModularAccountV2.d.ts +41 -0
- package/dist/esm/src/ma-v2/account/semiModularAccountV2.js +148 -0
- package/dist/esm/src/ma-v2/account/semiModularAccountV2.js.map +1 -0
- package/dist/esm/src/ma-v2/actions/common/types.d.ts +31 -0
- package/dist/esm/src/ma-v2/actions/common/types.js +6 -0
- package/dist/esm/src/ma-v2/actions/common/types.js.map +1 -0
- package/dist/esm/src/ma-v2/actions/common/utils.d.ts +76 -0
- package/dist/esm/src/ma-v2/actions/common/utils.js +100 -0
- package/dist/esm/src/ma-v2/actions/common/utils.js.map +1 -0
- package/dist/esm/src/ma-v2/actions/install-validation/installValidation.d.ts +71 -0
- package/dist/esm/src/ma-v2/actions/install-validation/installValidation.js +109 -0
- package/dist/esm/src/ma-v2/actions/install-validation/installValidation.js.map +1 -0
- package/dist/esm/src/ma-v2/client/client.d.ts +6 -0
- package/dist/esm/src/ma-v2/client/client.js +40 -0
- package/dist/esm/src/ma-v2/client/client.js.map +1 -0
- package/dist/esm/src/ma-v2/index.d.ts +26 -0
- package/dist/esm/src/ma-v2/index.js +24 -0
- package/dist/esm/src/ma-v2/index.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/allowlist-module/abis/allowlistModuleAbi.d.ts +556 -0
- package/dist/esm/src/ma-v2/modules/allowlist-module/abis/allowlistModuleAbi.js +716 -0
- package/dist/esm/src/ma-v2/modules/allowlist-module/abis/allowlistModuleAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/allowlist-module/module.d.ts +579 -0
- package/dist/esm/src/ma-v2/modules/allowlist-module/module.js +56 -0
- package/dist/esm/src/ma-v2/modules/allowlist-module/module.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.d.ts +312 -0
- package/dist/esm/src/ma-v2/modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.js +404 -0
- package/dist/esm/src/ma-v2/modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/native-token-limit-module/module.d.ts +322 -0
- package/dist/esm/src/ma-v2/modules/native-token-limit-module/module.js +14 -0
- package/dist/esm/src/ma-v2/modules/native-token-limit-module/module.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.d.ts +186 -0
- package/dist/esm/src/ma-v2/modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.js +242 -0
- package/dist/esm/src/ma-v2/modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/paymaster-guard-module/module.d.ts +196 -0
- package/dist/esm/src/ma-v2/modules/paymaster-guard-module/module.js +25 -0
- package/dist/esm/src/ma-v2/modules/paymaster-guard-module/module.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/abis/singleSignerValidationModuleAbi.d.ts +45 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/abis/singleSignerValidationModuleAbi.js +331 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/abis/singleSignerValidationModuleAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/module.d.ts +10 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/module.js +16 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/module.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.d.ts +239 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js +93 -0
- package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/time-range-module/abis/timeRangeModuleAbi.d.ts +229 -0
- package/dist/esm/src/ma-v2/modules/time-range-module/abis/timeRangeModuleAbi.js +296 -0
- package/dist/esm/src/ma-v2/modules/time-range-module/abis/timeRangeModuleAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/time-range-module/module.d.ts +245 -0
- package/dist/esm/src/ma-v2/modules/time-range-module/module.js +42 -0
- package/dist/esm/src/ma-v2/modules/time-range-module/module.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/utils.d.ts +91 -0
- package/dist/esm/src/ma-v2/modules/utils.js +188 -0
- package/dist/esm/src/ma-v2/modules/utils.js.map +1 -0
- package/dist/esm/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.d.ts +287 -0
- package/dist/esm/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.js +374 -0
- package/dist/esm/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.js.map +1 -0
- package/dist/esm/src/ma-v2/utils.d.ts +16 -0
- package/dist/esm/src/ma-v2/utils.js +105 -0
- package/dist/esm/src/ma-v2/utils.js.map +1 -0
- package/dist/types/src/ma-v2/abis/accountFactoryAbi.d.ts +493 -0
- package/dist/types/src/ma-v2/abis/accountFactoryAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/abis/modularAccountAbi.d.ts +955 -0
- package/dist/types/src/ma-v2/abis/modularAccountAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/abis/semiModularAccountBytecodeAbi.d.ts +992 -0
- package/dist/types/src/ma-v2/abis/semiModularAccountBytecodeAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/abis/semiModularAccountStorageAbi.d.ts +1002 -0
- package/dist/types/src/ma-v2/abis/semiModularAccountStorageAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/account/nativeSMASigner.d.ts +239 -0
- package/dist/types/src/ma-v2/account/nativeSMASigner.d.ts.map +1 -0
- package/dist/types/src/ma-v2/account/semiModularAccountV2.d.ts +42 -0
- package/dist/types/src/ma-v2/account/semiModularAccountV2.d.ts.map +1 -0
- package/dist/types/src/ma-v2/actions/common/types.d.ts +32 -0
- package/dist/types/src/ma-v2/actions/common/types.d.ts.map +1 -0
- package/dist/types/src/ma-v2/actions/common/utils.d.ts +77 -0
- package/dist/types/src/ma-v2/actions/common/utils.d.ts.map +1 -0
- package/dist/types/src/ma-v2/actions/install-validation/installValidation.d.ts +72 -0
- package/dist/types/src/ma-v2/actions/install-validation/installValidation.d.ts.map +1 -0
- package/dist/types/src/ma-v2/client/client.d.ts +7 -0
- package/dist/types/src/ma-v2/client/client.d.ts.map +1 -0
- package/dist/types/src/ma-v2/index.d.ts +27 -0
- package/dist/types/src/ma-v2/index.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/allowlist-module/abis/allowlistModuleAbi.d.ts +557 -0
- package/dist/types/src/ma-v2/modules/allowlist-module/abis/allowlistModuleAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/allowlist-module/module.d.ts +580 -0
- package/dist/types/src/ma-v2/modules/allowlist-module/module.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.d.ts +313 -0
- package/dist/types/src/ma-v2/modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/native-token-limit-module/module.d.ts +323 -0
- package/dist/types/src/ma-v2/modules/native-token-limit-module/module.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.d.ts +187 -0
- package/dist/types/src/ma-v2/modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/paymaster-guard-module/module.d.ts +197 -0
- package/dist/types/src/ma-v2/modules/paymaster-guard-module/module.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/single-signer-validation/abis/singleSignerValidationModuleAbi.d.ts +46 -0
- package/dist/types/src/ma-v2/modules/single-signer-validation/abis/singleSignerValidationModuleAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/single-signer-validation/module.d.ts +11 -0
- package/dist/types/src/ma-v2/modules/single-signer-validation/module.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/single-signer-validation/signer.d.ts +240 -0
- package/dist/types/src/ma-v2/modules/single-signer-validation/signer.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/time-range-module/abis/timeRangeModuleAbi.d.ts +230 -0
- package/dist/types/src/ma-v2/modules/time-range-module/abis/timeRangeModuleAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/time-range-module/module.d.ts +246 -0
- package/dist/types/src/ma-v2/modules/time-range-module/module.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/utils.d.ts +92 -0
- package/dist/types/src/ma-v2/modules/utils.d.ts.map +1 -0
- package/dist/types/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.d.ts +288 -0
- package/dist/types/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.d.ts.map +1 -0
- package/dist/types/src/ma-v2/utils.d.ts +17 -0
- package/dist/types/src/ma-v2/utils.d.ts.map +1 -0
- package/package.json +10 -5
- package/src/ma-v2/abis/accountFactoryAbi.ts +638 -0
- package/src/ma-v2/abis/modularAccountAbi.ts +1241 -0
- package/src/ma-v2/abis/semiModularAccountBytecodeAbi.ts +1288 -0
- package/src/ma-v2/abis/semiModularAccountStorageAbi.ts +1301 -0
- package/src/ma-v2/account/nativeSMASigner.ts +121 -0
- package/src/ma-v2/account/semiModularAccountV2.ts +289 -0
- package/src/ma-v2/actions/common/types.ts +37 -0
- package/src/ma-v2/actions/common/utils.ts +103 -0
- package/src/ma-v2/actions/install-validation/installValidation.ts +213 -0
- package/src/ma-v2/client/client.ts +74 -0
- package/src/ma-v2/index.ts +47 -0
- package/src/ma-v2/modules/allowlist-module/abis/allowlistModuleAbi.ts +715 -0
- package/src/ma-v2/modules/allowlist-module/module.ts +87 -0
- package/src/ma-v2/modules/native-token-limit-module/abis/nativeTokenLimitModuleAbi.ts +403 -0
- package/src/ma-v2/modules/native-token-limit-module/module.ts +21 -0
- package/src/ma-v2/modules/paymaster-guard-module/abis/paymasterGuardModuleAbi.ts +241 -0
- package/src/ma-v2/modules/paymaster-guard-module/module.ts +35 -0
- package/src/ma-v2/modules/single-signer-validation/abis/singleSignerValidationModuleAbi.ts +330 -0
- package/src/ma-v2/modules/single-signer-validation/module.ts +24 -0
- package/src/ma-v2/modules/single-signer-validation/signer.ts +127 -0
- package/src/ma-v2/modules/time-range-module/abis/timeRangeModuleAbi.ts +295 -0
- package/src/ma-v2/modules/time-range-module/module.ts +63 -0
- package/src/ma-v2/modules/utils.ts +213 -0
- package/src/ma-v2/modules/webauthn-validation/abis/webauthnValidationAbi.ts +373 -0
- package/src/ma-v2/utils.ts +138 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { type Hex } from "viem";
|
|
2
|
+
export declare const TimeRangeModule: {
|
|
3
|
+
abi: readonly [{
|
|
4
|
+
readonly type: "function";
|
|
5
|
+
readonly name: "moduleId";
|
|
6
|
+
readonly inputs: readonly [];
|
|
7
|
+
readonly outputs: readonly [{
|
|
8
|
+
readonly name: "";
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
readonly internalType: "string";
|
|
11
|
+
}];
|
|
12
|
+
readonly stateMutability: "pure";
|
|
13
|
+
}, {
|
|
14
|
+
readonly type: "function";
|
|
15
|
+
readonly name: "onInstall";
|
|
16
|
+
readonly inputs: readonly [{
|
|
17
|
+
readonly name: "data";
|
|
18
|
+
readonly type: "bytes";
|
|
19
|
+
readonly internalType: "bytes";
|
|
20
|
+
}];
|
|
21
|
+
readonly outputs: readonly [];
|
|
22
|
+
readonly stateMutability: "nonpayable";
|
|
23
|
+
}, {
|
|
24
|
+
readonly type: "function";
|
|
25
|
+
readonly name: "onUninstall";
|
|
26
|
+
readonly inputs: readonly [{
|
|
27
|
+
readonly name: "data";
|
|
28
|
+
readonly type: "bytes";
|
|
29
|
+
readonly internalType: "bytes";
|
|
30
|
+
}];
|
|
31
|
+
readonly outputs: readonly [];
|
|
32
|
+
readonly stateMutability: "nonpayable";
|
|
33
|
+
}, {
|
|
34
|
+
readonly type: "function";
|
|
35
|
+
readonly name: "preRuntimeValidationHook";
|
|
36
|
+
readonly inputs: readonly [{
|
|
37
|
+
readonly name: "entityId";
|
|
38
|
+
readonly type: "uint32";
|
|
39
|
+
readonly internalType: "uint32";
|
|
40
|
+
}, {
|
|
41
|
+
readonly name: "";
|
|
42
|
+
readonly type: "address";
|
|
43
|
+
readonly internalType: "address";
|
|
44
|
+
}, {
|
|
45
|
+
readonly name: "";
|
|
46
|
+
readonly type: "uint256";
|
|
47
|
+
readonly internalType: "uint256";
|
|
48
|
+
}, {
|
|
49
|
+
readonly name: "";
|
|
50
|
+
readonly type: "bytes";
|
|
51
|
+
readonly internalType: "bytes";
|
|
52
|
+
}, {
|
|
53
|
+
readonly name: "";
|
|
54
|
+
readonly type: "bytes";
|
|
55
|
+
readonly internalType: "bytes";
|
|
56
|
+
}];
|
|
57
|
+
readonly outputs: readonly [];
|
|
58
|
+
readonly stateMutability: "view";
|
|
59
|
+
}, {
|
|
60
|
+
readonly type: "function";
|
|
61
|
+
readonly name: "preSignatureValidationHook";
|
|
62
|
+
readonly inputs: readonly [{
|
|
63
|
+
readonly name: "";
|
|
64
|
+
readonly type: "uint32";
|
|
65
|
+
readonly internalType: "uint32";
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "";
|
|
68
|
+
readonly type: "address";
|
|
69
|
+
readonly internalType: "address";
|
|
70
|
+
}, {
|
|
71
|
+
readonly name: "";
|
|
72
|
+
readonly type: "bytes32";
|
|
73
|
+
readonly internalType: "bytes32";
|
|
74
|
+
}, {
|
|
75
|
+
readonly name: "";
|
|
76
|
+
readonly type: "bytes";
|
|
77
|
+
readonly internalType: "bytes";
|
|
78
|
+
}];
|
|
79
|
+
readonly outputs: readonly [];
|
|
80
|
+
readonly stateMutability: "pure";
|
|
81
|
+
}, {
|
|
82
|
+
readonly type: "function";
|
|
83
|
+
readonly name: "preUserOpValidationHook";
|
|
84
|
+
readonly inputs: readonly [{
|
|
85
|
+
readonly name: "entityId";
|
|
86
|
+
readonly type: "uint32";
|
|
87
|
+
readonly internalType: "uint32";
|
|
88
|
+
}, {
|
|
89
|
+
readonly name: "userOp";
|
|
90
|
+
readonly type: "tuple";
|
|
91
|
+
readonly internalType: "struct PackedUserOperation";
|
|
92
|
+
readonly components: readonly [{
|
|
93
|
+
readonly name: "sender";
|
|
94
|
+
readonly type: "address";
|
|
95
|
+
readonly internalType: "address";
|
|
96
|
+
}, {
|
|
97
|
+
readonly name: "nonce";
|
|
98
|
+
readonly type: "uint256";
|
|
99
|
+
readonly internalType: "uint256";
|
|
100
|
+
}, {
|
|
101
|
+
readonly name: "initCode";
|
|
102
|
+
readonly type: "bytes";
|
|
103
|
+
readonly internalType: "bytes";
|
|
104
|
+
}, {
|
|
105
|
+
readonly name: "callData";
|
|
106
|
+
readonly type: "bytes";
|
|
107
|
+
readonly internalType: "bytes";
|
|
108
|
+
}, {
|
|
109
|
+
readonly name: "accountGasLimits";
|
|
110
|
+
readonly type: "bytes32";
|
|
111
|
+
readonly internalType: "bytes32";
|
|
112
|
+
}, {
|
|
113
|
+
readonly name: "preVerificationGas";
|
|
114
|
+
readonly type: "uint256";
|
|
115
|
+
readonly internalType: "uint256";
|
|
116
|
+
}, {
|
|
117
|
+
readonly name: "gasFees";
|
|
118
|
+
readonly type: "bytes32";
|
|
119
|
+
readonly internalType: "bytes32";
|
|
120
|
+
}, {
|
|
121
|
+
readonly name: "paymasterAndData";
|
|
122
|
+
readonly type: "bytes";
|
|
123
|
+
readonly internalType: "bytes";
|
|
124
|
+
}, {
|
|
125
|
+
readonly name: "signature";
|
|
126
|
+
readonly type: "bytes";
|
|
127
|
+
readonly internalType: "bytes";
|
|
128
|
+
}];
|
|
129
|
+
}, {
|
|
130
|
+
readonly name: "";
|
|
131
|
+
readonly type: "bytes32";
|
|
132
|
+
readonly internalType: "bytes32";
|
|
133
|
+
}];
|
|
134
|
+
readonly outputs: readonly [{
|
|
135
|
+
readonly name: "";
|
|
136
|
+
readonly type: "uint256";
|
|
137
|
+
readonly internalType: "uint256";
|
|
138
|
+
}];
|
|
139
|
+
readonly stateMutability: "view";
|
|
140
|
+
}, {
|
|
141
|
+
readonly type: "function";
|
|
142
|
+
readonly name: "setTimeRange";
|
|
143
|
+
readonly inputs: readonly [{
|
|
144
|
+
readonly name: "entityId";
|
|
145
|
+
readonly type: "uint32";
|
|
146
|
+
readonly internalType: "uint32";
|
|
147
|
+
}, {
|
|
148
|
+
readonly name: "validUntil";
|
|
149
|
+
readonly type: "uint48";
|
|
150
|
+
readonly internalType: "uint48";
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "validAfter";
|
|
153
|
+
readonly type: "uint48";
|
|
154
|
+
readonly internalType: "uint48";
|
|
155
|
+
}];
|
|
156
|
+
readonly outputs: readonly [];
|
|
157
|
+
readonly stateMutability: "nonpayable";
|
|
158
|
+
}, {
|
|
159
|
+
readonly type: "function";
|
|
160
|
+
readonly name: "supportsInterface";
|
|
161
|
+
readonly inputs: readonly [{
|
|
162
|
+
readonly name: "interfaceId";
|
|
163
|
+
readonly type: "bytes4";
|
|
164
|
+
readonly internalType: "bytes4";
|
|
165
|
+
}];
|
|
166
|
+
readonly outputs: readonly [{
|
|
167
|
+
readonly name: "";
|
|
168
|
+
readonly type: "bool";
|
|
169
|
+
readonly internalType: "bool";
|
|
170
|
+
}];
|
|
171
|
+
readonly stateMutability: "view";
|
|
172
|
+
}, {
|
|
173
|
+
readonly type: "function";
|
|
174
|
+
readonly name: "timeRanges";
|
|
175
|
+
readonly inputs: readonly [{
|
|
176
|
+
readonly name: "entityId";
|
|
177
|
+
readonly type: "uint32";
|
|
178
|
+
readonly internalType: "uint32";
|
|
179
|
+
}, {
|
|
180
|
+
readonly name: "account";
|
|
181
|
+
readonly type: "address";
|
|
182
|
+
readonly internalType: "address";
|
|
183
|
+
}];
|
|
184
|
+
readonly outputs: readonly [{
|
|
185
|
+
readonly name: "validUntil";
|
|
186
|
+
readonly type: "uint48";
|
|
187
|
+
readonly internalType: "uint48";
|
|
188
|
+
}, {
|
|
189
|
+
readonly name: "validAfter";
|
|
190
|
+
readonly type: "uint48";
|
|
191
|
+
readonly internalType: "uint48";
|
|
192
|
+
}];
|
|
193
|
+
readonly stateMutability: "view";
|
|
194
|
+
}, {
|
|
195
|
+
readonly type: "event";
|
|
196
|
+
readonly name: "TimeRangeSet";
|
|
197
|
+
readonly inputs: readonly [{
|
|
198
|
+
readonly name: "entityId";
|
|
199
|
+
readonly type: "uint32";
|
|
200
|
+
readonly indexed: true;
|
|
201
|
+
readonly internalType: "uint32";
|
|
202
|
+
}, {
|
|
203
|
+
readonly name: "account";
|
|
204
|
+
readonly type: "address";
|
|
205
|
+
readonly indexed: true;
|
|
206
|
+
readonly internalType: "address";
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "validUntil";
|
|
209
|
+
readonly type: "uint48";
|
|
210
|
+
readonly indexed: false;
|
|
211
|
+
readonly internalType: "uint48";
|
|
212
|
+
}, {
|
|
213
|
+
readonly name: "validAfter";
|
|
214
|
+
readonly type: "uint48";
|
|
215
|
+
readonly indexed: false;
|
|
216
|
+
readonly internalType: "uint48";
|
|
217
|
+
}];
|
|
218
|
+
readonly anonymous: false;
|
|
219
|
+
}, {
|
|
220
|
+
readonly type: "error";
|
|
221
|
+
readonly name: "NotImplemented";
|
|
222
|
+
readonly inputs: readonly [];
|
|
223
|
+
}, {
|
|
224
|
+
readonly type: "error";
|
|
225
|
+
readonly name: "TimeRangeNotValid";
|
|
226
|
+
readonly inputs: readonly [];
|
|
227
|
+
}, {
|
|
228
|
+
readonly type: "error";
|
|
229
|
+
readonly name: "UnexpectedDataPassed";
|
|
230
|
+
readonly inputs: readonly [];
|
|
231
|
+
}];
|
|
232
|
+
encodeOnInstallData: (args: {
|
|
233
|
+
entityId: number;
|
|
234
|
+
validUntil: number;
|
|
235
|
+
validAfter: number;
|
|
236
|
+
}) => Hex;
|
|
237
|
+
encodeOnUninstallData: (args: {
|
|
238
|
+
entityId: number;
|
|
239
|
+
}) => Hex;
|
|
240
|
+
encodeSetTimeRange: (args: {
|
|
241
|
+
entityId: number;
|
|
242
|
+
validUntil: number;
|
|
243
|
+
validAfter: number;
|
|
244
|
+
}) => Hex;
|
|
245
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { encodeAbiParameters } from "viem";
|
|
2
|
+
import { timeRangeModuleAbi } from "./abis/timeRangeModuleAbi.js";
|
|
3
|
+
export const TimeRangeModule = {
|
|
4
|
+
abi: timeRangeModuleAbi,
|
|
5
|
+
encodeOnInstallData: (args) => {
|
|
6
|
+
const { entityId, validUntil, validAfter } = args;
|
|
7
|
+
return encodeAbiParameters([
|
|
8
|
+
{
|
|
9
|
+
type: "uint32",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
type: "uint48",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
type: "uint48",
|
|
16
|
+
},
|
|
17
|
+
], [entityId, validUntil, validAfter]);
|
|
18
|
+
},
|
|
19
|
+
encodeOnUninstallData: (args) => {
|
|
20
|
+
const { entityId } = args;
|
|
21
|
+
return encodeAbiParameters([
|
|
22
|
+
{
|
|
23
|
+
type: "uint32",
|
|
24
|
+
},
|
|
25
|
+
], [entityId]);
|
|
26
|
+
},
|
|
27
|
+
encodeSetTimeRange: (args) => {
|
|
28
|
+
const { entityId, validUntil, validAfter } = args;
|
|
29
|
+
return encodeAbiParameters([
|
|
30
|
+
{
|
|
31
|
+
type: "uint32",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: "uint48",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: "uint48",
|
|
38
|
+
},
|
|
39
|
+
], [entityId, validUntil, validAfter]);
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../../../../../src/ma-v2/modules/time-range-module/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAY,MAAM,MAAM,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,GAAG,EAAE,kBAAkB;IACvB,mBAAmB,EAAE,CAAC,IAIrB,EAAO,EAAE;QACR,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAElD,OAAO,mBAAmB,CACxB;YACE;gBACE,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,IAAI,EAAE,QAAQ;aACf;SACF,EACD,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,CACnC,CAAC;IACJ,CAAC;IACD,qBAAqB,EAAE,CAAC,IAA0B,EAAO,EAAE;QACzD,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QAE1B,OAAO,mBAAmB,CACxB;YACE;gBACE,IAAI,EAAE,QAAQ;aACf;SACF,EACD,CAAC,QAAQ,CAAC,CACX,CAAC;IACJ,CAAC;IACD,kBAAkB,EAAE,CAAC,IAIpB,EAAO,EAAE;QACR,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAElD,OAAO,mBAAmB,CACxB;YACE;gBACE,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,IAAI,EAAE,QAAQ;aACf;SACF,EACD,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,CACnC,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["import { encodeAbiParameters, type Hex } from \"viem\";\n\nimport { timeRangeModuleAbi } from \"./abis/timeRangeModuleAbi.js\";\n\nexport const TimeRangeModule = {\n abi: timeRangeModuleAbi,\n encodeOnInstallData: (args: {\n entityId: number;\n validUntil: number;\n validAfter: number;\n }): Hex => {\n const { entityId, validUntil, validAfter } = args;\n\n return encodeAbiParameters(\n [\n {\n type: \"uint32\",\n },\n {\n type: \"uint48\",\n },\n {\n type: \"uint48\",\n },\n ],\n [entityId, validUntil, validAfter]\n );\n },\n encodeOnUninstallData: (args: { entityId: number }): Hex => {\n const { entityId } = args;\n\n return encodeAbiParameters(\n [\n {\n type: \"uint32\",\n },\n ],\n [entityId]\n );\n },\n encodeSetTimeRange: (args: {\n entityId: number;\n validUntil: number;\n validAfter: number;\n }): Hex => {\n const { entityId, validUntil, validAfter } = args;\n\n return encodeAbiParameters(\n [\n {\n type: \"uint32\",\n },\n {\n type: \"uint48\",\n },\n {\n type: \"uint48\",\n },\n ],\n [entityId, validUntil, validAfter]\n );\n },\n};\n"]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { Chain, Address } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* Maps a given chain to a specific address of the webauthn validation module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { getDefaultWebauthnValidationModuleAddress } from "@account-kit/smart-contracts";
|
|
8
|
+
* import { Chain, Address } from "viem";
|
|
9
|
+
*
|
|
10
|
+
* const chain: Chain = ...
|
|
11
|
+
* const webauthnValidationAddress: Address = getDefaultWebauthnValidationModuleAddress(chain);
|
|
12
|
+
* ```
|
|
13
|
+
* @param {Chain} chain The chain object containing the chain ID to map
|
|
14
|
+
* @returns {Address} The webauthn validation module address associated with the specified chain ID or a default address if no specific mapping exists
|
|
15
|
+
*/
|
|
16
|
+
export declare const getDefaultWebauthnValidationModuleAddress: (chain: Chain) => Address;
|
|
17
|
+
/**
|
|
18
|
+
* Maps a given chain to a specific address of the time range module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { getDefaultTimeRangeModuleAddress } from "@account-kit/smart-contracts";
|
|
23
|
+
* import { Chain, Address } from "viem";
|
|
24
|
+
*
|
|
25
|
+
* const chain: Chain = ...
|
|
26
|
+
* const timeRangeModuleAddress: Address = getDefaultTimeRangeModuleAddress(chain);
|
|
27
|
+
* ```
|
|
28
|
+
* @param {Chain} chain The chain object containing the chain ID to map
|
|
29
|
+
* @returns {Address} The time range module address associated with the specified chain ID or a default address if no specific mapping exists
|
|
30
|
+
*/
|
|
31
|
+
export declare const getDefaultTimeRangeModuleAddress: (chain: Chain) => Address;
|
|
32
|
+
/**
|
|
33
|
+
* Maps a given chain to a specific address of the single signer validation module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* import { getDefaultSingleSignerValidationModuleAddress } from "@account-kit/smart-contracts";
|
|
38
|
+
* import { Chain, Address } from "viem";
|
|
39
|
+
*
|
|
40
|
+
* const chain: Chain = ...
|
|
41
|
+
* const singleSignerValidationAddress: Address = getDefaultSingleSignerValidationModuleAddress(chain);
|
|
42
|
+
* ```
|
|
43
|
+
* @param {Chain} chain The chain object containing the chain ID to map
|
|
44
|
+
* @returns {Address} The single signer validation module address associated with the specified chain ID or a default address if no specific mapping exists
|
|
45
|
+
*/
|
|
46
|
+
export declare const getDefaultSingleSignerValidationModuleAddress: (chain: Chain) => Address;
|
|
47
|
+
/**
|
|
48
|
+
* Maps a given chain to a specific address of the paymaster guard module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* import { getDefaultPaymasterGuardModuleAddress } from "@account-kit/smart-contracts";
|
|
53
|
+
* import { Chain, Address } from "viem";
|
|
54
|
+
*
|
|
55
|
+
* const chain: Chain = ...
|
|
56
|
+
* const paymasterGuardAddress: Address = getDefaultPaymasterGuardModuleAddress(chain);
|
|
57
|
+
* ```
|
|
58
|
+
* @param {Chain} chain The chain object containing the chain ID to map
|
|
59
|
+
* @returns {Address} The paymaster guard module address associated with the specified chain ID or a default address if no specific mapping exists
|
|
60
|
+
*/
|
|
61
|
+
export declare const getDefaultPaymasterGuardModuleAddress: (chain: Chain) => Address;
|
|
62
|
+
/**
|
|
63
|
+
* Maps a given chain to a specific address of the native token limit module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* import { getDefaultNativeTokenLimitModuleAddress } from "@account-kit/smart-contracts";
|
|
68
|
+
* import { Chain, Address } from "viem";
|
|
69
|
+
*
|
|
70
|
+
* const chain: Chain = ...
|
|
71
|
+
* const nativeTokenLimitAddress: Address = getDefaultNativeTokenLimitModuleAddress(chain);
|
|
72
|
+
* ```
|
|
73
|
+
* @param {Chain} chain The chain object containing the chain ID to map
|
|
74
|
+
* @returns {Address} The native token limit module address associated with the specified chain ID or a default address if no specific mapping exists
|
|
75
|
+
*/
|
|
76
|
+
export declare const getDefaultNativeTokenLimitModuleAddress: (chain: Chain) => Address;
|
|
77
|
+
/**
|
|
78
|
+
* Maps a given chain to a specific address of the allowlist module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* import { getDefaultAllowlistModuleAddress } from "@account-kit/smart-contracts";
|
|
83
|
+
* import { Chain, Address } from "viem";
|
|
84
|
+
*
|
|
85
|
+
* const chain: Chain = ...
|
|
86
|
+
* const allowlistModule: Address = getDefaultAllowlistModuleAddress(chain);
|
|
87
|
+
* ```
|
|
88
|
+
* @param {Chain} chain The chain object containing the chain ID to map
|
|
89
|
+
* @returns {Address} The allowlist module address associated with the specified chain ID or a default address if no specific mapping exists
|
|
90
|
+
*/
|
|
91
|
+
export declare const getDefaultAllowlistModuleAddress: (chain: Chain) => Address;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { arbitrum, arbitrumSepolia, base, baseSepolia, mainnet, optimism, optimismSepolia, polygon, polygonAmoy, sepolia, } from "@account-kit/infra";
|
|
2
|
+
/**
|
|
3
|
+
* Maps a given chain to a specific address of the webauthn validation module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import { getDefaultWebauthnValidationModuleAddress } from "@account-kit/smart-contracts";
|
|
8
|
+
* import { Chain, Address } from "viem";
|
|
9
|
+
*
|
|
10
|
+
* const chain: Chain = ...
|
|
11
|
+
* const webauthnValidationAddress: Address = getDefaultWebauthnValidationModuleAddress(chain);
|
|
12
|
+
* ```
|
|
13
|
+
* @param {Chain} chain The chain object containing the chain ID to map
|
|
14
|
+
* @returns {Address} The webauthn validation module address associated with the specified chain ID or a default address if no specific mapping exists
|
|
15
|
+
*/
|
|
16
|
+
export const getDefaultWebauthnValidationModuleAddress = (chain) => {
|
|
17
|
+
switch (chain.id) {
|
|
18
|
+
// TODO: case mekong.id:
|
|
19
|
+
case sepolia.id:
|
|
20
|
+
case baseSepolia.id:
|
|
21
|
+
case polygon.id:
|
|
22
|
+
case mainnet.id:
|
|
23
|
+
case polygonAmoy.id:
|
|
24
|
+
case optimism.id:
|
|
25
|
+
case optimismSepolia.id:
|
|
26
|
+
case arbitrum.id:
|
|
27
|
+
case arbitrumSepolia.id:
|
|
28
|
+
case base.id:
|
|
29
|
+
default:
|
|
30
|
+
return "0x0000000000001D9d34E07D9834274dF9ae575217";
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Maps a given chain to a specific address of the time range module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* import { getDefaultTimeRangeModuleAddress } from "@account-kit/smart-contracts";
|
|
39
|
+
* import { Chain, Address } from "viem";
|
|
40
|
+
*
|
|
41
|
+
* const chain: Chain = ...
|
|
42
|
+
* const timeRangeModuleAddress: Address = getDefaultTimeRangeModuleAddress(chain);
|
|
43
|
+
* ```
|
|
44
|
+
* @param {Chain} chain The chain object containing the chain ID to map
|
|
45
|
+
* @returns {Address} The time range module address associated with the specified chain ID or a default address if no specific mapping exists
|
|
46
|
+
*/
|
|
47
|
+
export const getDefaultTimeRangeModuleAddress = (chain) => {
|
|
48
|
+
switch (chain.id) {
|
|
49
|
+
// TODO: case mekong.id:
|
|
50
|
+
case sepolia.id:
|
|
51
|
+
case baseSepolia.id:
|
|
52
|
+
case polygon.id:
|
|
53
|
+
case mainnet.id:
|
|
54
|
+
case polygonAmoy.id:
|
|
55
|
+
case optimism.id:
|
|
56
|
+
case optimismSepolia.id:
|
|
57
|
+
case arbitrum.id:
|
|
58
|
+
case arbitrumSepolia.id:
|
|
59
|
+
case base.id:
|
|
60
|
+
default:
|
|
61
|
+
return "0x00000000000082B8e2012be914dFA4f62A0573eA";
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Maps a given chain to a specific address of the single signer validation module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* import { getDefaultSingleSignerValidationModuleAddress } from "@account-kit/smart-contracts";
|
|
70
|
+
* import { Chain, Address } from "viem";
|
|
71
|
+
*
|
|
72
|
+
* const chain: Chain = ...
|
|
73
|
+
* const singleSignerValidationAddress: Address = getDefaultSingleSignerValidationModuleAddress(chain);
|
|
74
|
+
* ```
|
|
75
|
+
* @param {Chain} chain The chain object containing the chain ID to map
|
|
76
|
+
* @returns {Address} The single signer validation module address associated with the specified chain ID or a default address if no specific mapping exists
|
|
77
|
+
*/
|
|
78
|
+
export const getDefaultSingleSignerValidationModuleAddress = (chain) => {
|
|
79
|
+
switch (chain.id) {
|
|
80
|
+
// TODO: case mekong.id:
|
|
81
|
+
case sepolia.id:
|
|
82
|
+
case baseSepolia.id:
|
|
83
|
+
case polygon.id:
|
|
84
|
+
case mainnet.id:
|
|
85
|
+
case polygonAmoy.id:
|
|
86
|
+
case optimism.id:
|
|
87
|
+
case optimismSepolia.id:
|
|
88
|
+
case arbitrum.id:
|
|
89
|
+
case arbitrumSepolia.id:
|
|
90
|
+
case base.id:
|
|
91
|
+
default:
|
|
92
|
+
return "0x00000000000099DE0BF6fA90dEB851E2A2df7d83";
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Maps a given chain to a specific address of the paymaster guard module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* import { getDefaultPaymasterGuardModuleAddress } from "@account-kit/smart-contracts";
|
|
101
|
+
* import { Chain, Address } from "viem";
|
|
102
|
+
*
|
|
103
|
+
* const chain: Chain = ...
|
|
104
|
+
* const paymasterGuardAddress: Address = getDefaultPaymasterGuardModuleAddress(chain);
|
|
105
|
+
* ```
|
|
106
|
+
* @param {Chain} chain The chain object containing the chain ID to map
|
|
107
|
+
* @returns {Address} The paymaster guard module address associated with the specified chain ID or a default address if no specific mapping exists
|
|
108
|
+
*/
|
|
109
|
+
export const getDefaultPaymasterGuardModuleAddress = (chain) => {
|
|
110
|
+
switch (chain.id) {
|
|
111
|
+
// TODO: case mekong.id:
|
|
112
|
+
case sepolia.id:
|
|
113
|
+
case baseSepolia.id:
|
|
114
|
+
case polygon.id:
|
|
115
|
+
case mainnet.id:
|
|
116
|
+
case polygonAmoy.id:
|
|
117
|
+
case optimism.id:
|
|
118
|
+
case optimismSepolia.id:
|
|
119
|
+
case arbitrum.id:
|
|
120
|
+
case arbitrumSepolia.id:
|
|
121
|
+
case base.id:
|
|
122
|
+
default:
|
|
123
|
+
return "0x0000000000001aA7A7F7E29abe0be06c72FD42A1";
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Maps a given chain to a specific address of the native token limit module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```ts
|
|
131
|
+
* import { getDefaultNativeTokenLimitModuleAddress } from "@account-kit/smart-contracts";
|
|
132
|
+
* import { Chain, Address } from "viem";
|
|
133
|
+
*
|
|
134
|
+
* const chain: Chain = ...
|
|
135
|
+
* const nativeTokenLimitAddress: Address = getDefaultNativeTokenLimitModuleAddress(chain);
|
|
136
|
+
* ```
|
|
137
|
+
* @param {Chain} chain The chain object containing the chain ID to map
|
|
138
|
+
* @returns {Address} The native token limit module address associated with the specified chain ID or a default address if no specific mapping exists
|
|
139
|
+
*/
|
|
140
|
+
export const getDefaultNativeTokenLimitModuleAddress = (chain) => {
|
|
141
|
+
switch (chain.id) {
|
|
142
|
+
// TODO: case mekong.id:
|
|
143
|
+
case sepolia.id:
|
|
144
|
+
case baseSepolia.id:
|
|
145
|
+
case polygon.id:
|
|
146
|
+
case mainnet.id:
|
|
147
|
+
case polygonAmoy.id:
|
|
148
|
+
case optimism.id:
|
|
149
|
+
case optimismSepolia.id:
|
|
150
|
+
case arbitrum.id:
|
|
151
|
+
case arbitrumSepolia.id:
|
|
152
|
+
case base.id:
|
|
153
|
+
default:
|
|
154
|
+
return "0x00000000000001e541f0D090868FBe24b59Fbe06";
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Maps a given chain to a specific address of the allowlist module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```ts
|
|
162
|
+
* import { getDefaultAllowlistModuleAddress } from "@account-kit/smart-contracts";
|
|
163
|
+
* import { Chain, Address } from "viem";
|
|
164
|
+
*
|
|
165
|
+
* const chain: Chain = ...
|
|
166
|
+
* const allowlistModule: Address = getDefaultAllowlistModuleAddress(chain);
|
|
167
|
+
* ```
|
|
168
|
+
* @param {Chain} chain The chain object containing the chain ID to map
|
|
169
|
+
* @returns {Address} The allowlist module address associated with the specified chain ID or a default address if no specific mapping exists
|
|
170
|
+
*/
|
|
171
|
+
export const getDefaultAllowlistModuleAddress = (chain) => {
|
|
172
|
+
switch (chain.id) {
|
|
173
|
+
// TODO: case mekong.id:
|
|
174
|
+
case sepolia.id:
|
|
175
|
+
case baseSepolia.id:
|
|
176
|
+
case polygon.id:
|
|
177
|
+
case mainnet.id:
|
|
178
|
+
case polygonAmoy.id:
|
|
179
|
+
case optimism.id:
|
|
180
|
+
case optimismSepolia.id:
|
|
181
|
+
case arbitrum.id:
|
|
182
|
+
case arbitrumSepolia.id:
|
|
183
|
+
case base.id:
|
|
184
|
+
default:
|
|
185
|
+
return "0x0000000000002311EEE9A2B887af1F144dbb4F6e";
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/ma-v2/modules/utils.ts"],"names":[],"mappings":"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","sourcesContent":["import type { Chain, Address } from \"viem\";\nimport {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n polygon,\n polygonAmoy,\n sepolia,\n} from \"@account-kit/infra\";\n\n/**\n * Maps a given chain to a specific address of the webauthn validation module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.\n *\n * @example\n * ```ts\n * import { getDefaultWebauthnValidationModuleAddress } from \"@account-kit/smart-contracts\";\n * import { Chain, Address } from \"viem\";\n *\n * const chain: Chain = ...\n * const webauthnValidationAddress: Address = getDefaultWebauthnValidationModuleAddress(chain);\n * ```\n * @param {Chain} chain The chain object containing the chain ID to map\n * @returns {Address} The webauthn validation module address associated with the specified chain ID or a default address if no specific mapping exists\n */\nexport const getDefaultWebauthnValidationModuleAddress = (\n chain: Chain\n): Address => {\n switch (chain.id) {\n // TODO: case mekong.id:\n case sepolia.id:\n case baseSepolia.id:\n case polygon.id:\n case mainnet.id:\n case polygonAmoy.id:\n case optimism.id:\n case optimismSepolia.id:\n case arbitrum.id:\n case arbitrumSepolia.id:\n case base.id:\n default:\n return \"0x0000000000001D9d34E07D9834274dF9ae575217\";\n }\n};\n\n/**\n * Maps a given chain to a specific address of the time range module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.\n *\n * @example\n * ```ts\n * import { getDefaultTimeRangeModuleAddress } from \"@account-kit/smart-contracts\";\n * import { Chain, Address } from \"viem\";\n *\n * const chain: Chain = ...\n * const timeRangeModuleAddress: Address = getDefaultTimeRangeModuleAddress(chain);\n * ```\n * @param {Chain} chain The chain object containing the chain ID to map\n * @returns {Address} The time range module address associated with the specified chain ID or a default address if no specific mapping exists\n */\nexport const getDefaultTimeRangeModuleAddress = (chain: Chain): Address => {\n switch (chain.id) {\n // TODO: case mekong.id:\n case sepolia.id:\n case baseSepolia.id:\n case polygon.id:\n case mainnet.id:\n case polygonAmoy.id:\n case optimism.id:\n case optimismSepolia.id:\n case arbitrum.id:\n case arbitrumSepolia.id:\n case base.id:\n default:\n return \"0x00000000000082B8e2012be914dFA4f62A0573eA\";\n }\n};\n\n/**\n * Maps a given chain to a specific address of the single signer validation module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.\n *\n * @example\n * ```ts\n * import { getDefaultSingleSignerValidationModuleAddress } from \"@account-kit/smart-contracts\";\n * import { Chain, Address } from \"viem\";\n *\n * const chain: Chain = ...\n * const singleSignerValidationAddress: Address = getDefaultSingleSignerValidationModuleAddress(chain);\n * ```\n * @param {Chain} chain The chain object containing the chain ID to map\n * @returns {Address} The single signer validation module address associated with the specified chain ID or a default address if no specific mapping exists\n */\nexport const getDefaultSingleSignerValidationModuleAddress = (\n chain: Chain\n): Address => {\n switch (chain.id) {\n // TODO: case mekong.id:\n case sepolia.id:\n case baseSepolia.id:\n case polygon.id:\n case mainnet.id:\n case polygonAmoy.id:\n case optimism.id:\n case optimismSepolia.id:\n case arbitrum.id:\n case arbitrumSepolia.id:\n case base.id:\n default:\n return \"0x00000000000099DE0BF6fA90dEB851E2A2df7d83\";\n }\n};\n\n/**\n * Maps a given chain to a specific address of the paymaster guard module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.\n *\n * @example\n * ```ts\n * import { getDefaultPaymasterGuardModuleAddress } from \"@account-kit/smart-contracts\";\n * import { Chain, Address } from \"viem\";\n *\n * const chain: Chain = ...\n * const paymasterGuardAddress: Address = getDefaultPaymasterGuardModuleAddress(chain);\n * ```\n * @param {Chain} chain The chain object containing the chain ID to map\n * @returns {Address} The paymaster guard module address associated with the specified chain ID or a default address if no specific mapping exists\n */\nexport const getDefaultPaymasterGuardModuleAddress = (\n chain: Chain\n): Address => {\n switch (chain.id) {\n // TODO: case mekong.id:\n case sepolia.id:\n case baseSepolia.id:\n case polygon.id:\n case mainnet.id:\n case polygonAmoy.id:\n case optimism.id:\n case optimismSepolia.id:\n case arbitrum.id:\n case arbitrumSepolia.id:\n case base.id:\n default:\n return \"0x0000000000001aA7A7F7E29abe0be06c72FD42A1\";\n }\n};\n\n/**\n * Maps a given chain to a specific address of the native token limit module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.\n *\n * @example\n * ```ts\n * import { getDefaultNativeTokenLimitModuleAddress } from \"@account-kit/smart-contracts\";\n * import { Chain, Address } from \"viem\";\n *\n * const chain: Chain = ...\n * const nativeTokenLimitAddress: Address = getDefaultNativeTokenLimitModuleAddress(chain);\n * ```\n * @param {Chain} chain The chain object containing the chain ID to map\n * @returns {Address} The native token limit module address associated with the specified chain ID or a default address if no specific mapping exists\n */\nexport const getDefaultNativeTokenLimitModuleAddress = (\n chain: Chain\n): Address => {\n switch (chain.id) {\n // TODO: case mekong.id:\n case sepolia.id:\n case baseSepolia.id:\n case polygon.id:\n case mainnet.id:\n case polygonAmoy.id:\n case optimism.id:\n case optimismSepolia.id:\n case arbitrum.id:\n case arbitrumSepolia.id:\n case base.id:\n default:\n return \"0x00000000000001e541f0D090868FBe24b59Fbe06\";\n }\n};\n\n/**\n * Maps a given chain to a specific address of the allowlist module by its chain ID. If no direct mapping exists, it defaults to returning a specific address.\n *\n * @example\n * ```ts\n * import { getDefaultAllowlistModuleAddress } from \"@account-kit/smart-contracts\";\n * import { Chain, Address } from \"viem\";\n *\n * const chain: Chain = ...\n * const allowlistModule: Address = getDefaultAllowlistModuleAddress(chain);\n * ```\n * @param {Chain} chain The chain object containing the chain ID to map\n * @returns {Address} The allowlist module address associated with the specified chain ID or a default address if no specific mapping exists\n */\nexport const getDefaultAllowlistModuleAddress = (chain: Chain): Address => {\n switch (chain.id) {\n // TODO: case mekong.id:\n case sepolia.id:\n case baseSepolia.id:\n case polygon.id:\n case mainnet.id:\n case polygonAmoy.id:\n case optimism.id:\n case optimismSepolia.id:\n case arbitrum.id:\n case arbitrumSepolia.id:\n case base.id:\n default:\n return \"0x0000000000002311EEE9A2B887af1F144dbb4F6e\";\n }\n};\n"]}
|