@aastar/sdk 0.22.0 → 0.24.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/UserClient-KYDCMAIU.js +6 -0
- package/dist/{UserClient-Y65JLJ23.js.map → UserClient-KYDCMAIU.js.map} +1 -1
- package/dist/UserClient-S6LS3CB6.cjs +15 -0
- package/dist/{UserClient-AJOGJXOC.cjs.map → UserClient-S6LS3CB6.cjs.map} +1 -1
- package/dist/account.cjs +7 -7
- package/dist/account.js +2 -2
- package/dist/admin.cjs +3 -3
- package/dist/admin.js +2 -2
- package/dist/airaccount.cjs +117 -97
- package/dist/airaccount.d.cts +2 -1
- package/dist/airaccount.d.ts +2 -1
- package/dist/airaccount.js +2 -2
- package/dist/channel.cjs +6 -6
- package/dist/channel.js +2 -2
- package/dist/{chunk-RF3MSLRW.cjs → chunk-5PH5CSM7.cjs} +16 -16
- package/dist/{chunk-RF3MSLRW.cjs.map → chunk-5PH5CSM7.cjs.map} +1 -1
- package/dist/{chunk-LKSQASFZ.js → chunk-654GQ7G7.js} +3 -3
- package/dist/{chunk-LKSQASFZ.js.map → chunk-654GQ7G7.js.map} +1 -1
- package/dist/{chunk-3OIVYXUG.cjs → chunk-72JZKARR.cjs} +6 -6
- package/dist/{chunk-3OIVYXUG.cjs.map → chunk-72JZKARR.cjs.map} +1 -1
- package/dist/{chunk-JCK7VAZF.js → chunk-7RVONA2R.js} +8 -8
- package/dist/{chunk-JCK7VAZF.js.map → chunk-7RVONA2R.js.map} +1 -1
- package/dist/{chunk-MG72SGVS.cjs → chunk-A4ICWCHR.cjs} +5 -5
- package/dist/{chunk-MG72SGVS.cjs.map → chunk-A4ICWCHR.cjs.map} +1 -1
- package/dist/{chunk-6ISQM3SF.cjs → chunk-BOVDJSMK.cjs} +26 -26
- package/dist/{chunk-6ISQM3SF.cjs.map → chunk-BOVDJSMK.cjs.map} +1 -1
- package/dist/{chunk-2TS6T2WY.js → chunk-BYVG7MO7.js} +35 -4
- package/dist/chunk-BYVG7MO7.js.map +1 -0
- package/dist/{chunk-7RNOKMAJ.cjs → chunk-D667CUUS.cjs} +9 -9
- package/dist/{chunk-7RNOKMAJ.cjs.map → chunk-D667CUUS.cjs.map} +1 -1
- package/dist/{chunk-XZDMKHKG.js → chunk-DAMWXGKD.js} +3 -3
- package/dist/{chunk-XZDMKHKG.js.map → chunk-DAMWXGKD.js.map} +1 -1
- package/dist/{chunk-BLA57KBS.cjs → chunk-GDH4DSVM.cjs} +12 -12
- package/dist/{chunk-BLA57KBS.cjs.map → chunk-GDH4DSVM.cjs.map} +1 -1
- package/dist/{chunk-FZLBMUPN.cjs → chunk-HNJBQR5U.cjs} +5 -5
- package/dist/{chunk-FZLBMUPN.cjs.map → chunk-HNJBQR5U.cjs.map} +1 -1
- package/dist/{chunk-VUNNHEND.js → chunk-JMW5AHLC.js} +9 -9
- package/dist/{chunk-VUNNHEND.js.map → chunk-JMW5AHLC.js.map} +1 -1
- package/dist/{chunk-SNVHOCU6.js → chunk-LDARLWS3.js} +3 -3
- package/dist/{chunk-SNVHOCU6.js.map → chunk-LDARLWS3.js.map} +1 -1
- package/dist/{chunk-TS5CXRNI.cjs → chunk-MOJJ7QF6.cjs} +40 -3
- package/dist/{chunk-TS5CXRNI.cjs.map → chunk-MOJJ7QF6.cjs.map} +1 -1
- package/dist/{chunk-BBZAD5G2.cjs → chunk-NVYVTCHJ.cjs} +11 -11
- package/dist/{chunk-BBZAD5G2.cjs.map → chunk-NVYVTCHJ.cjs.map} +1 -1
- package/dist/{chunk-MQMTICTP.js → chunk-PNBK2CLK.js} +3 -3
- package/dist/{chunk-MQMTICTP.js.map → chunk-PNBK2CLK.js.map} +1 -1
- package/dist/{chunk-T2GF4S3E.js → chunk-PXQDAFXD.js} +6 -6
- package/dist/{chunk-T2GF4S3E.js.map → chunk-PXQDAFXD.js.map} +1 -1
- package/dist/{chunk-XTF6MNIK.js → chunk-RZ2M2RVP.js} +3 -3
- package/dist/{chunk-XTF6MNIK.js.map → chunk-RZ2M2RVP.js.map} +1 -1
- package/dist/{chunk-7HO4IUHZ.cjs → chunk-VHY6R2PI.cjs} +32 -32
- package/dist/{chunk-7HO4IUHZ.cjs.map → chunk-VHY6R2PI.cjs.map} +1 -1
- package/dist/{chunk-R3N7L7RE.js → chunk-WC25H5VG.js} +4 -4
- package/dist/{chunk-R3N7L7RE.js.map → chunk-WC25H5VG.js.map} +1 -1
- package/dist/{chunk-UUT246S2.js → chunk-WVJ4LQVB.js} +3 -3
- package/dist/{chunk-UUT246S2.js.map → chunk-WVJ4LQVB.js.map} +1 -1
- package/dist/{chunk-DOVGH7HB.cjs → chunk-WVOJV4Q5.cjs} +4 -4
- package/dist/{chunk-DOVGH7HB.cjs.map → chunk-WVOJV4Q5.cjs.map} +1 -1
- package/dist/{chunk-OVNOSAL3.cjs → chunk-Y5U7URNZ.cjs} +260 -6
- package/dist/chunk-Y5U7URNZ.cjs.map +1 -0
- package/dist/{chunk-6OWZOTE7.js → chunk-YUFQIYLR.js} +258 -9
- package/dist/chunk-YUFQIYLR.js.map +1 -0
- package/dist/core.cjs +226 -202
- package/dist/core.d.cts +100 -513
- package/dist/core.d.ts +100 -513
- package/dist/core.js +1 -1
- package/dist/dapp.cjs +5 -5
- package/dist/dapp.js +2 -2
- package/dist/enduser.cjs +6 -6
- package/dist/enduser.js +3 -3
- package/dist/identity.cjs +5 -5
- package/dist/identity.js +2 -2
- package/dist/index.cjs +327 -303
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +15 -15
- package/dist/initConfig-D8jgrcDb.d.cts +518 -0
- package/dist/initConfig-D8jgrcDb.d.ts +518 -0
- package/dist/kms.cjs +117 -97
- package/dist/kms.d.cts +223 -3
- package/dist/kms.d.ts +223 -3
- package/dist/kms.js +2 -2
- package/dist/operator.cjs +6 -6
- package/dist/operator.js +2 -2
- package/dist/paymaster.cjs +15 -15
- package/dist/paymaster.js +2 -2
- package/dist/src-5URXSFKD.js +5 -0
- package/dist/src-5URXSFKD.js.map +1 -0
- package/dist/{src-WGYHZSLY.cjs → src-72GWEAPA.cjs} +17 -17
- package/dist/src-72GWEAPA.cjs.map +1 -0
- package/dist/{src-UQ4RDCJG.cjs → src-N72HAQXS.cjs} +228 -204
- package/dist/src-N72HAQXS.cjs.map +1 -0
- package/dist/{src-MDGW57S5.js → src-UNS5B7FX.js} +4 -4
- package/dist/{src-UQ4RDCJG.cjs.map → src-UNS5B7FX.js.map} +1 -1
- package/dist/tokens.cjs +3 -3
- package/dist/tokens.js +2 -2
- package/dist/x402.cjs +25 -25
- package/dist/x402.js +2 -2
- package/package.json +1 -1
- package/dist/UserClient-AJOGJXOC.cjs +0 -15
- package/dist/UserClient-Y65JLJ23.js +0 -6
- package/dist/chunk-2TS6T2WY.js.map +0 -1
- package/dist/chunk-6OWZOTE7.js.map +0 -1
- package/dist/chunk-OVNOSAL3.cjs.map +0 -1
- package/dist/src-MDGW57S5.js.map +0 -1
- package/dist/src-SCR3OCME.js +0 -5
- package/dist/src-SCR3OCME.js.map +0 -1
- package/dist/src-WGYHZSLY.cjs.map +0 -1
package/dist/kms.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { y as UserOperation, P as PackedUserOperation, j as BLSSignatureData, w as TierLevel$1, T as TierConfig, p as GuardStatus, v as PreCheckResult } from './tier-router-DeeVg69O.cjs';
|
|
2
2
|
export { A as ALG_BLS, a as ALG_CUMULATIVE_T2, b as ALG_CUMULATIVE_T3, c as ALG_ECDSA, d as ALG_P256, e as AirAccountClient, f as AirAccountConfig, g as AlgId, B as BLSConfig, h as BLSManager, i as BLSNode, k as BeginAuthenticationResponse, l as BeginRegistrationResponse, m as BeginTransactionVerificationResponse, C as CryptoUtil, n as CumulativeT2SignatureData, o as CumulativeT3SignatureData, D as DEFAULT_PASSKEY_ROUTES, E as ERC4337Utils, G as GasEstimate, q as PasskeyAuthenticationParams, r as PasskeyInfo, s as PasskeyManager, t as PasskeyRegistrationParams, u as PasskeyRoutes, x as TransactionVerificationParams, U as UserOpBuilder, Y as YAAAClient, z as YAAAConfig, F as algIdForTier, H as resolveTier } from './tier-router-DeeVg69O.cjs';
|
|
3
3
|
import { AxiosRequestConfig } from 'axios';
|
|
4
|
-
import { PublicClient, Address, Abi, WalletClient,
|
|
4
|
+
import { PublicClient, Address, Abi, Hex, WalletClient, Hash } from 'viem';
|
|
5
|
+
import { I as InitConfig, G as GuardianSpec } from './initConfig-D8jgrcDb.cjs';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Account record stored by the SDK.
|
|
@@ -10,7 +11,15 @@ interface AccountRecord {
|
|
|
10
11
|
userId: string;
|
|
11
12
|
address: string;
|
|
12
13
|
signerAddress: string;
|
|
13
|
-
|
|
14
|
+
/**
|
|
15
|
+
* CREATE2 salt. Canonically persisted as a DECIMAL STRING (lossless, like dailyLimit) — the
|
|
16
|
+
* full-config / P-256 path (#118 M2) writes it this way so a large salt (> 2^53) neither truncates
|
|
17
|
+
* as a JS number nor fails JSON serialization as a bigint. The deploy-time rebuild reconstructs it
|
|
18
|
+
* with `BigInt(account.salt)`, which MUST match the salt used to predict the address
|
|
19
|
+
* (`_getSalt(owner, salt, configHash)`) or funds sent to the predicted address are stranded.
|
|
20
|
+
* `number | bigint` retained for back-compat with the legacy create paths.
|
|
21
|
+
*/
|
|
22
|
+
salt: string | number | bigint;
|
|
14
23
|
deployed: boolean;
|
|
15
24
|
deploymentTxHash: string | null;
|
|
16
25
|
validatorAddress: string;
|
|
@@ -32,6 +41,31 @@ interface AccountRecord {
|
|
|
32
41
|
guardian1Sig?: string;
|
|
33
42
|
guardian2?: string;
|
|
34
43
|
guardian2Sig?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Full-config (8-field InitConfig) guardian slots — each is either an ECDSA address or a
|
|
46
|
+
* P-256 (passkey) public key (x, y). Present ONLY for accounts created via
|
|
47
|
+
* createAccountWithP256Guardians() (the factory's createAccount(owner, salt, config) path).
|
|
48
|
+
* transfer-manager rebuilds the byte-identical InitConfig from these at first-UserOp deploy
|
|
49
|
+
* time so the deployed CREATE2 address matches the create-time prediction.
|
|
50
|
+
*/
|
|
51
|
+
guardianSpecs?: Array<{
|
|
52
|
+
ecdsa: string;
|
|
53
|
+
} | {
|
|
54
|
+
p256: {
|
|
55
|
+
x: string;
|
|
56
|
+
y: string;
|
|
57
|
+
};
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Resolved approvedAlgIds written into the init config (full-config path). Persisted so the
|
|
61
|
+
* deploy-time InitConfig is reconstructed EXACTLY (no re-defaulting). Paired with guardianSpecs.
|
|
62
|
+
*/
|
|
63
|
+
approvedAlgIds?: number[];
|
|
64
|
+
/**
|
|
65
|
+
* minDailyLimit floor (wei, decimal string) written into the init config (full-config path).
|
|
66
|
+
* Paired with guardianSpecs for exact deploy-time reconstruction.
|
|
67
|
+
*/
|
|
68
|
+
minDailyLimit?: string;
|
|
35
69
|
}
|
|
36
70
|
/**
|
|
37
71
|
* Transfer record stored by the SDK.
|
|
@@ -1009,6 +1043,8 @@ declare class EthereumProvider {
|
|
|
1009
1043
|
getProvider(): PublicClient;
|
|
1010
1044
|
/** Returns the viem PublicClient bound to the bundler RPC (raw .request only). */
|
|
1011
1045
|
getBundlerProvider(): PublicClient;
|
|
1046
|
+
/** EVM chain id from the validated ServerConfig (deterministic — no RPC round-trip). */
|
|
1047
|
+
getChainId(): number;
|
|
1012
1048
|
/**
|
|
1013
1049
|
* Raw bundler JSON-RPC call. The bundler exposes non-standard methods
|
|
1014
1050
|
* (eth_sendUserOperation, pimlico_getUserOperationGasPrice, ...) that are not in
|
|
@@ -1047,6 +1083,110 @@ declare class EthereumProvider {
|
|
|
1047
1083
|
}>;
|
|
1048
1084
|
}
|
|
1049
1085
|
|
|
1086
|
+
/**
|
|
1087
|
+
* Shared helpers for the FULL-config (8-field `InitConfig`) account-creation path —
|
|
1088
|
+
* the only factory path that can install P-256 (passkey) guardian keys at deploy time
|
|
1089
|
+
* (airaccount-contract v0.20.0 / #120, #118).
|
|
1090
|
+
*
|
|
1091
|
+
* ## Why a dedicated path (not `createAccountWithDefaults`)
|
|
1092
|
+
* The factory exposes two account-creation entrypoints with DIFFERENT salt + acceptance
|
|
1093
|
+
* semantics (verified against `AAStarAirAccountFactoryV7.sol`):
|
|
1094
|
+
*
|
|
1095
|
+
* - `createAccountWithDefaults(owner, salt, g1, g1Sig, g2, g2Sig, dailyLimit)` — ECDSA-only.
|
|
1096
|
+
* CREATE2 salt = `keccak256(owner, salt)` (does NOT bind the config), so the contract
|
|
1097
|
+
* REQUIRES each ECDSA guardian's `ACCEPT_GUARDIAN` acceptance signature to stop a
|
|
1098
|
+
* front-runner from seizing the counterfactual address with different guardians. This is
|
|
1099
|
+
* the existing `AccountManager.createAccountWithGuardians` path; it has no InitConfig and
|
|
1100
|
+
* thus no way to set `guardianP256X/Y`.
|
|
1101
|
+
*
|
|
1102
|
+
* - `createAccount(owner, salt, config)` — full 8-field `InitConfig`. CREATE2 salt =
|
|
1103
|
+
* `keccak256(owner, salt, keccak256(InitConfig))` (`_getSalt` over `_getConfigHash`),
|
|
1104
|
+
* so the address is BOUND to the exact config. Because any config change yields a
|
|
1105
|
+
* different address, the contract performs NO guardian-acceptance check on this path —
|
|
1106
|
+
* for either ECDSA or P-256 guardians (`_initAccount` installs every slot directly).
|
|
1107
|
+
* P-256 guardian bootstrap is owner-only and acceptance-sig-free by design (#110④):
|
|
1108
|
+
* a single guardian cannot form a recovery quorum, so no consent ceremony is needed.
|
|
1109
|
+
*
|
|
1110
|
+
* Consequence: the deploy-time initCode MUST embed the BYTE-IDENTICAL `InitConfig` used to
|
|
1111
|
+
* predict the address, or the deployed account lands at a different CREATE2 address. These
|
|
1112
|
+
* helpers build the config once (via the core `buildInitConfig`) and reconstruct it
|
|
1113
|
+
* deterministically from the persisted record at first-UserOp deploy time so the two match.
|
|
1114
|
+
*/
|
|
1115
|
+
/** A P-256 (passkey) guardian public key — SEC1 affine coordinates, each a 32-byte hex word. */
|
|
1116
|
+
interface P256GuardianKey {
|
|
1117
|
+
x: Hex;
|
|
1118
|
+
y: Hex;
|
|
1119
|
+
}
|
|
1120
|
+
/** Inputs for the full-config (8-field `InitConfig`) account-creation path. */
|
|
1121
|
+
interface FullConfigGuardianParams {
|
|
1122
|
+
/** P-256 (passkey) guardians installed at deploy time. Owner-bootstrap — NO acceptance sig. */
|
|
1123
|
+
p256Guardians: P256GuardianKey[];
|
|
1124
|
+
/**
|
|
1125
|
+
* Optional ECDSA guardians, installed via the SAME full-config path. NOTE: on this path the
|
|
1126
|
+
* contract does not verify ECDSA acceptance signatures (the config-hash-in-salt binding stands
|
|
1127
|
+
* in for them), so none are required or accepted here.
|
|
1128
|
+
*/
|
|
1129
|
+
ecdsaGuardians?: Address[];
|
|
1130
|
+
/** Daily spend limit (wei). MUST be > 0 — a guardian set enables the on-chain GUARD. */
|
|
1131
|
+
dailyLimit: bigint;
|
|
1132
|
+
/** Validator algorithm ids approved at init. Defaults (in buildInitConfig) to ECDSA (+P-256). */
|
|
1133
|
+
approvedAlgIds?: number[];
|
|
1134
|
+
/** Floor the daily limit may be lowered to via the guard. Defaults to 0. */
|
|
1135
|
+
minDailyLimit?: bigint;
|
|
1136
|
+
}
|
|
1137
|
+
/** A guardian slot serialized for JSON persistence on the {@link AccountRecord}. */
|
|
1138
|
+
type SerializedGuardianSpec = {
|
|
1139
|
+
ecdsa: string;
|
|
1140
|
+
} | {
|
|
1141
|
+
p256: {
|
|
1142
|
+
x: string;
|
|
1143
|
+
y: string;
|
|
1144
|
+
};
|
|
1145
|
+
};
|
|
1146
|
+
/**
|
|
1147
|
+
* Map the public params to core {@link GuardianSpec}s in a DETERMINISTIC order
|
|
1148
|
+
* (ECDSA slots first, then P-256). Order is consensus-critical: it determines both the
|
|
1149
|
+
* predicted CREATE2 address and the guardian slot index each key occupies on-chain.
|
|
1150
|
+
*/
|
|
1151
|
+
declare function toGuardianSpecs(p: FullConfigGuardianParams): GuardianSpec[];
|
|
1152
|
+
/**
|
|
1153
|
+
* Build the full 8-field `InitConfig` for the create path. Delegates to the core
|
|
1154
|
+
* `buildInitConfig` (the 0.22.0 builder) so the P-256 slots, sentinel handling, and
|
|
1155
|
+
* approvedAlgId defaulting are produced by ONE audited implementation — never hand-rolled.
|
|
1156
|
+
*/
|
|
1157
|
+
declare function buildFullInitConfig(p: FullConfigGuardianParams): InitConfig;
|
|
1158
|
+
/**
|
|
1159
|
+
* Flatten a typed {@link InitConfig} into the POSITIONAL tuple the local human-readable
|
|
1160
|
+
* factory ABI (`AIRACCOUNT_FACTORY_ABI`, fed through viem `parseAbi`) expects as the
|
|
1161
|
+
* `config` argument of `getAddress` / `createAccount`. Field order is consensus-critical
|
|
1162
|
+
* and matches `AAStarAirAccountBase.InitConfig` exactly.
|
|
1163
|
+
*/
|
|
1164
|
+
declare function initConfigToTuple(c: InitConfig): readonly unknown[];
|
|
1165
|
+
/** Serialize core {@link GuardianSpec}s for JSON storage on the account record. */
|
|
1166
|
+
declare function serializeGuardianSpecs(specs: readonly GuardianSpec[]): SerializedGuardianSpec[];
|
|
1167
|
+
/**
|
|
1168
|
+
* Reconstruct the BYTE-IDENTICAL `InitConfig` from a persisted record at deploy time.
|
|
1169
|
+
*
|
|
1170
|
+
* Re-derivation is exact because the record persists the RESOLVED `approvedAlgIds`,
|
|
1171
|
+
* `minDailyLimit`, and `dailyLimit` (not just the create-time inputs), and `buildInitConfig`
|
|
1172
|
+
* is a pure function of its arguments. The resulting config therefore hashes to the same
|
|
1173
|
+
* `_getConfigHash`, yielding the same CREATE2 address that was predicted at create time.
|
|
1174
|
+
*
|
|
1175
|
+
* @throws if the record carries no `guardianSpecs` (i.e. it is not a full-config account).
|
|
1176
|
+
*/
|
|
1177
|
+
declare function initConfigFromRecord(record: AccountRecord): InitConfig;
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* Result of {@link AccountManager.ensureValidatorRouter}.
|
|
1181
|
+
* `set: true` only when an on-chain `setValidator(router)` tx was actually sent (`tx`
|
|
1182
|
+
* carries the hash). `set: false` is a no-op with a `reason` explaining the decision.
|
|
1183
|
+
*/
|
|
1184
|
+
interface EnsureValidatorRouterResult {
|
|
1185
|
+
set: boolean;
|
|
1186
|
+
reason?: string;
|
|
1187
|
+
tx?: Hash;
|
|
1188
|
+
router?: Address;
|
|
1189
|
+
}
|
|
1050
1190
|
/**
|
|
1051
1191
|
* Account manager — extracted from NestJS AccountService.
|
|
1052
1192
|
* Creates and retrieves smart accounts without framework dependencies.
|
|
@@ -1062,6 +1202,18 @@ declare class AccountManager {
|
|
|
1062
1202
|
salt?: number | bigint;
|
|
1063
1203
|
/** Daily transfer limit in wei. When > 0 the account is created with on-chain guard enforcement. */
|
|
1064
1204
|
dailyLimit?: bigint;
|
|
1205
|
+
/**
|
|
1206
|
+
* P-256 (passkey) guardians to install at deploy time. When present, the account is created
|
|
1207
|
+
* via the full-config createAccount(owner, salt, config) path (delegates to
|
|
1208
|
+
* {@link createAccountWithP256Guardians}); `dailyLimit` MUST be > 0 (guardians enable the guard).
|
|
1209
|
+
*/
|
|
1210
|
+
p256Guardians?: P256GuardianKey[];
|
|
1211
|
+
/** Optional ECDSA guardians installed via the same full-config path (no acceptance sig required). */
|
|
1212
|
+
ecdsaGuardians?: Address[];
|
|
1213
|
+
/** Validator algorithm ids approved at init (full-config path). Defaults to ECDSA (+P-256). */
|
|
1214
|
+
approvedAlgIds?: number[];
|
|
1215
|
+
/** Floor the daily limit may be lowered to via the guard (full-config path). Defaults to 0. */
|
|
1216
|
+
minDailyLimit?: bigint;
|
|
1065
1217
|
}): Promise<AccountRecord>;
|
|
1066
1218
|
getAccount(userId: string): Promise<(AccountRecord & {
|
|
1067
1219
|
balance: string;
|
|
@@ -1128,6 +1280,74 @@ declare class AccountManager {
|
|
|
1128
1280
|
salt?: number | bigint;
|
|
1129
1281
|
entryPointVersion?: EntryPointVersion;
|
|
1130
1282
|
}): Promise<AccountRecord>;
|
|
1283
|
+
/**
|
|
1284
|
+
* Create an AirAccount with one or more P-256 (WebAuthn passkey) guardians installed at
|
|
1285
|
+
* DEPLOY time — the server-client path #118 adds for KMS-custodied / counterfactual accounts
|
|
1286
|
+
* (e.g. YAA) that cannot drive the viem extension layer for account creation.
|
|
1287
|
+
*
|
|
1288
|
+
* Uses the factory's full-config `createAccount(owner, salt, config)` path because it is the
|
|
1289
|
+
* ONLY entrypoint that accepts an 8-field `InitConfig` (and therefore `guardianP256X/Y`). The
|
|
1290
|
+
* 8-field config is built by the core `buildInitConfig` (0.22.0) — never hand-rolled — and the
|
|
1291
|
+
* address is predicted via the factory's full-config `getAddress(owner, salt, config)` (NOT
|
|
1292
|
+
* `getAddressWithDefaults`), binding the address to `keccak256(config)`.
|
|
1293
|
+
*
|
|
1294
|
+
* ### Acceptance-signature semantics (verified against AAStarAirAccountFactoryV7.sol)
|
|
1295
|
+
* On this path the contract performs NO guardian-acceptance signature check — for P-256 OR ECDSA
|
|
1296
|
+
* guardians. Front-run protection comes from `_getSalt(owner, salt, _getConfigHash(config))`:
|
|
1297
|
+
* any change to the guardian set (or any other config field) yields a different CREATE2 address,
|
|
1298
|
+
* so an attacker cannot collide on the victim's counterfactual address with a weaker config.
|
|
1299
|
+
* P-256 guardians are an owner-bootstrap (single guardian can't form a recovery quorum), so no
|
|
1300
|
+
* acceptance ceremony exists for them by design (#110④). This is why optional ECDSA guardians may
|
|
1301
|
+
* also be passed here WITHOUT signatures — distinct from createAccountWithGuardians(), which uses
|
|
1302
|
+
* the owner-only-salt `createAccountWithDefaults` path and DOES require ECDSA acceptance sigs.
|
|
1303
|
+
*
|
|
1304
|
+
* The deploy UserOp is still signed by the existing KMS owner-key path (unchanged): this method
|
|
1305
|
+
* only predicts the address and persists the full config; transfer-manager rebuilds the
|
|
1306
|
+
* byte-identical initCode (via {@link initConfigFromRecord}) at first-UserOp deploy time.
|
|
1307
|
+
*
|
|
1308
|
+
* @throws if no P-256 guardian is supplied, dailyLimit <= 0, or EntryPoint is v0.6.
|
|
1309
|
+
*/
|
|
1310
|
+
createAccountWithP256Guardians(userId: string, params: {
|
|
1311
|
+
/** P-256 (passkey) guardian public keys to install at deploy time (at least one required). */
|
|
1312
|
+
p256Guardians: P256GuardianKey[];
|
|
1313
|
+
/** Optional ECDSA guardians installed via the same full-config path (no acceptance sig). */
|
|
1314
|
+
ecdsaGuardians?: Address[];
|
|
1315
|
+
/** Daily spend limit in wei. MUST be > 0 — a guardian set enables the on-chain guard. */
|
|
1316
|
+
dailyLimit: bigint;
|
|
1317
|
+
/** Validator algorithm ids approved at init. Defaults to ECDSA (+P-256 when a passkey is present). */
|
|
1318
|
+
approvedAlgIds?: number[];
|
|
1319
|
+
/** Floor the daily limit may be lowered to via the guard. Defaults to 0. */
|
|
1320
|
+
minDailyLimit?: bigint;
|
|
1321
|
+
salt?: number | bigint;
|
|
1322
|
+
entryPointVersion?: EntryPointVersion;
|
|
1323
|
+
}): Promise<AccountRecord>;
|
|
1324
|
+
/**
|
|
1325
|
+
* Gap B — wire the validator router for an account that approved a ROUTER-DELEGATED signature
|
|
1326
|
+
* algorithm (BLS 0x01, cumulative T2 0x04, T3 0x05, weighted 0x07, session 0x08, ...). Such an
|
|
1327
|
+
* account's `_validateTripleSignature` / `_callBLSValidator` return `1` (FAIL) while
|
|
1328
|
+
* `validator() == address(0)`, so the algorithm is non-functional until the owner calls
|
|
1329
|
+
* `setValidator(router)` (onlyOwner, SET-ONCE). Inline algIds (ECDSA 0x02, P256 0x03, COMBINED_T1
|
|
1330
|
+
* 0x06) need no router and are a no-op here.
|
|
1331
|
+
*
|
|
1332
|
+
* MUST be called AFTER the account is deployed (setValidator is onlyOwner and needs code) — the
|
|
1333
|
+
* lazy/counterfactual deploy path cannot setValidator at predict-time. Idempotent: re-running after
|
|
1334
|
+
* the validator is set is a no-op (`reason: 'validator already set'`).
|
|
1335
|
+
*
|
|
1336
|
+
* On-chain access matches the rest of this package: reads via the EthereumProvider's PublicClient
|
|
1337
|
+
* (`getAccountContract(...).read.validator()` and `getProvider().getCode()`); the state-changing
|
|
1338
|
+
* `setValidator` is sent through a caller-supplied `WalletClient` whose account is the owner —
|
|
1339
|
+
* the same convention used by `PaymasterManager.updatePrice` / `ForceExitService` (this manager's
|
|
1340
|
+
* narrow `ISignerAdapter` only EIP-191 personal-signs and cannot send transactions).
|
|
1341
|
+
*
|
|
1342
|
+
* @param userId the account owner's user id (storage key)
|
|
1343
|
+
* @param opts.router override the router address (defaults to the chain's canonical
|
|
1344
|
+
* `aaStarValidator`); pass to target a non-canonical router
|
|
1345
|
+
* @param opts.walletClient viem WalletClient signing as the account OWNER — REQUIRED to send the tx
|
|
1346
|
+
*/
|
|
1347
|
+
ensureValidatorRouter(userId: string, opts?: {
|
|
1348
|
+
router?: Address;
|
|
1349
|
+
walletClient?: WalletClient;
|
|
1350
|
+
}): Promise<EnsureValidatorRouterResult>;
|
|
1131
1351
|
}
|
|
1132
1352
|
|
|
1133
1353
|
/**
|
|
@@ -3101,4 +3321,4 @@ declare class LocalWalletSigner implements ISignerAdapter {
|
|
|
3101
3321
|
}>;
|
|
3102
3322
|
}
|
|
3103
3323
|
|
|
3104
|
-
export { ACCOUNT_ABI, AGENT_SESSION_KEY_VALIDATOR_ABI, AIRACCOUNT_ABI, AIRACCOUNT_ADDRESSES, AIRACCOUNT_FACTORY_ABI, AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI, AIR_ACCOUNT_DELEGATE_ABI, AIR_ACCOUNT_DELEGATE_ADDRESS, ALG_ID, AccountManager, type AccountRecord, type ActiveRecovery, AgentRegistryService, type AgentReputationSummary, type AgentSessionConfig, type AgentSessionInfo, AirAccountServerClient, type AirAccountVersion, BLSSignatureData, BLSSignatureService, type BeginCeremonyResponse, type BindERC8004AgentWalletParams, type BlsConfigRecord, type BuildCredentialOptions, CALLDATA_PARSER_REGISTRY_ABI, ConsoleLogger, type CreateAgentAccountParams, type CreateP256SessionKeyRequest, type CreateP256SessionKeyResponse, DEFAULT_CREDENTIAL_ID, DEFAULT_KMS_ENDPOINT, DEFAULT_ORIGIN, DEFAULT_RP_ID, type DelegateInitParams, DvtPendingConfirmationError, type EIP7702Authorization, EIP7702DelegateService, ENTRYPOINT_ABI_V6, ENTRYPOINT_ABI_V7_V8, ENTRYPOINT_ADDRESSES, ERC20_ABI, ERC8004Service, ERC8004_ADDRESSES, EXECUTE_BATCH_SELECTOR, EXECUTE_SELECTOR, EXECUTE_USER_OP_SELECTOR, type EntryPointConfig, EntryPointVersion, type EntryPointVersionConfig, type EstimateGasParams, EthereumProvider, type ExecuteTransferParams, FACTORY_ABI_V6, FACTORY_ABI_V7_V8, FORCE_EXIT_MODULE_ABI, ForceExitService, GLOBAL_GUARD_ABI, type GrantP256SessionParams, type GrantSessionParams, GuardChecker, type GuardState, GuardStateReader, GuardStatus, type ILogger, type ISignerAdapter, type IStorageAdapter, type InstallModuleParams, KmsAgentService, type KmsAttestationManifestResponse, type KmsAttestationProofResponse, type KmsAttestationResponse, type KmsBeginAuthenticationRequest, type KmsBeginAuthenticationResponse, type KmsBeginGrantSessionAuthRequest, type KmsBeginGrantSessionAuthResponse, type KmsBeginRegistrationRequest, type KmsBeginRegistrationResponse, type KmsChangePasskeyResponse, type KmsCompleteRegistrationRequest, type KmsCompleteRegistrationResponse, type KmsCreateAgentKeyRequest, type KmsCreateAgentKeyResponse, type KmsCreateKeyRequest, type KmsCreateKeyResponse, type KmsDeleteKeyResponse, type KmsDeriveAddressResponse, type KmsDescribeKeyResponse, type KmsEip712Domain, type KmsEip712FieldValue, type KmsEip712TypeDef, type KmsEthereumTransaction, type KmsGetPublicKeyResponse, type KmsHealthResponse, KmsHttpClient, type KmsHttpClientOptions, type KmsKeyStatusResponse, type KmsListKeysResponse, KmsManager, KmsMonitorService, type KmsPaymentAuth, type KmsPaymentSignatureResponse, KmsPaymentSigner, type KmsPurgeKeyResponse, type KmsQueueStatusResponse, type KmsRefreshAgentCredentialRequest, type KmsRefreshAgentCredentialResponse, type KmsRevokeAgentCredentialRequest, type KmsRevokeAgentCredentialResponse, type KmsRollbackCounterResponse, KmsSessionService, type KmsSignAgentRequest, type KmsSignAgentResponse, type KmsSignGTokenAuthorizationRequest, type KmsSignGrantSessionRequest, type KmsSignGrantSessionResponse, type KmsSignHashResponse, type KmsSignMicropaymentVoucherRequest, type KmsSignP256GrantSessionRequest, type KmsSignRequest, type KmsSignResponse, type KmsSignTypedDataRequest, type KmsSignTypedDataResponse, type KmsSignX402PaymentRequest, KmsSigner, type KmsStatsResponse, type KmsVersionResponse, type L2Type, L2_TYPE, type LegacyPasskeyAssertion, LocalWalletSigner, MAX_GUARDIANS, MODULE_TYPE, MemoryStorage, type MintAgentIdentityParams, ModuleManager, type ModuleTypeId, type OapdConfig, P256PasskeySigner, PackedUserOperation, type PasskeyAssertionContext, type PasskeyCeremonySigner, PaymasterManager, PaymasterPriceStalenessError, type PaymasterRecord, type PendingExit, type PendingWeightChange, PreCheckResult, type QueryAgentReputationParams, RECOVERY_THRESHOLD, RECOVERY_TIMELOCK_SECONDS, RecoveryService, type RevokeP256SessionKeyRequest, type RevokeP256SessionKeyResponse, type RunCeremonyOptions, SESSION_KEY_VALIDATOR_ABI, type ServerConfig, type SessionInfo, SessionKeyService, type SetAgentWalletParams, type SignP256UserOpRequest, type SignP256UserOpResponse, SilentLogger, type SubmitAgentReputationParams, TIER_GUARD_HOOK_ABI, TierConfig, TierLevel$1 as TierLevel, type TokenBalance, type TokenGuardState, type TokenInfo, TokenService, TransferManager, type TransferRecord, type TransferResult, type UninstallModuleParams, UserOperation, VALIDATOR_ABI, WEIGHT_CHANGE_EXPIRY_SECONDS, WEIGHT_CHANGE_THRESHOLD, WEIGHT_CHANGE_TIMELOCK_SECONDS, WalletManager, type WebAuthnAssertion, type WebAuthnAuthenticationCredential, type WeightConfig, WeightedSignatureService, YAAAServerClient, base64UrlDecode, base64UrlEncode, beginAuthenticationChallenge, beginGrantSessionChallenge, buildAuthenticationCredential, buildAuthenticatorData, buildClientDataJSON, buildInstallModuleHash, buildUninstallModuleHash, computeOapdSalt, erc8004AddressesForChain, getOapdAddress, getOapdAddressWithChainId, isExecuteUserOpWrapped, isOapdDeployed, isPendingConfirmation, packP256SessionSignature, packSecp256k1SessionSignature, runAuthenticationCeremony, runGrantSessionCeremony, runWebAuthnCeremony, sepoliaV07Config, validateConfig, wrapExecuteUserOp };
|
|
3324
|
+
export { ACCOUNT_ABI, AGENT_SESSION_KEY_VALIDATOR_ABI, AIRACCOUNT_ABI, AIRACCOUNT_ADDRESSES, AIRACCOUNT_FACTORY_ABI, AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI, AIR_ACCOUNT_DELEGATE_ABI, AIR_ACCOUNT_DELEGATE_ADDRESS, ALG_ID, AccountManager, type AccountRecord, type ActiveRecovery, AgentRegistryService, type AgentReputationSummary, type AgentSessionConfig, type AgentSessionInfo, AirAccountServerClient, type AirAccountVersion, BLSSignatureData, BLSSignatureService, type BeginCeremonyResponse, type BindERC8004AgentWalletParams, type BlsConfigRecord, type BuildCredentialOptions, CALLDATA_PARSER_REGISTRY_ABI, ConsoleLogger, type CreateAgentAccountParams, type CreateP256SessionKeyRequest, type CreateP256SessionKeyResponse, DEFAULT_CREDENTIAL_ID, DEFAULT_KMS_ENDPOINT, DEFAULT_ORIGIN, DEFAULT_RP_ID, type DelegateInitParams, DvtPendingConfirmationError, type EIP7702Authorization, EIP7702DelegateService, ENTRYPOINT_ABI_V6, ENTRYPOINT_ABI_V7_V8, ENTRYPOINT_ADDRESSES, ERC20_ABI, ERC8004Service, ERC8004_ADDRESSES, EXECUTE_BATCH_SELECTOR, EXECUTE_SELECTOR, EXECUTE_USER_OP_SELECTOR, type EntryPointConfig, EntryPointVersion, type EntryPointVersionConfig, type EstimateGasParams, EthereumProvider, type ExecuteTransferParams, FACTORY_ABI_V6, FACTORY_ABI_V7_V8, FORCE_EXIT_MODULE_ABI, ForceExitService, type FullConfigGuardianParams, GLOBAL_GUARD_ABI, type GrantP256SessionParams, type GrantSessionParams, GuardChecker, type GuardState, GuardStateReader, GuardStatus, type ILogger, type ISignerAdapter, type IStorageAdapter, type InstallModuleParams, KmsAgentService, type KmsAttestationManifestResponse, type KmsAttestationProofResponse, type KmsAttestationResponse, type KmsBeginAuthenticationRequest, type KmsBeginAuthenticationResponse, type KmsBeginGrantSessionAuthRequest, type KmsBeginGrantSessionAuthResponse, type KmsBeginRegistrationRequest, type KmsBeginRegistrationResponse, type KmsChangePasskeyResponse, type KmsCompleteRegistrationRequest, type KmsCompleteRegistrationResponse, type KmsCreateAgentKeyRequest, type KmsCreateAgentKeyResponse, type KmsCreateKeyRequest, type KmsCreateKeyResponse, type KmsDeleteKeyResponse, type KmsDeriveAddressResponse, type KmsDescribeKeyResponse, type KmsEip712Domain, type KmsEip712FieldValue, type KmsEip712TypeDef, type KmsEthereumTransaction, type KmsGetPublicKeyResponse, type KmsHealthResponse, KmsHttpClient, type KmsHttpClientOptions, type KmsKeyStatusResponse, type KmsListKeysResponse, KmsManager, KmsMonitorService, type KmsPaymentAuth, type KmsPaymentSignatureResponse, KmsPaymentSigner, type KmsPurgeKeyResponse, type KmsQueueStatusResponse, type KmsRefreshAgentCredentialRequest, type KmsRefreshAgentCredentialResponse, type KmsRevokeAgentCredentialRequest, type KmsRevokeAgentCredentialResponse, type KmsRollbackCounterResponse, KmsSessionService, type KmsSignAgentRequest, type KmsSignAgentResponse, type KmsSignGTokenAuthorizationRequest, type KmsSignGrantSessionRequest, type KmsSignGrantSessionResponse, type KmsSignHashResponse, type KmsSignMicropaymentVoucherRequest, type KmsSignP256GrantSessionRequest, type KmsSignRequest, type KmsSignResponse, type KmsSignTypedDataRequest, type KmsSignTypedDataResponse, type KmsSignX402PaymentRequest, KmsSigner, type KmsStatsResponse, type KmsVersionResponse, type L2Type, L2_TYPE, type LegacyPasskeyAssertion, LocalWalletSigner, MAX_GUARDIANS, MODULE_TYPE, MemoryStorage, type MintAgentIdentityParams, ModuleManager, type ModuleTypeId, type OapdConfig, type P256GuardianKey, P256PasskeySigner, PackedUserOperation, type PasskeyAssertionContext, type PasskeyCeremonySigner, PaymasterManager, PaymasterPriceStalenessError, type PaymasterRecord, type PendingExit, type PendingWeightChange, PreCheckResult, type QueryAgentReputationParams, RECOVERY_THRESHOLD, RECOVERY_TIMELOCK_SECONDS, RecoveryService, type RevokeP256SessionKeyRequest, type RevokeP256SessionKeyResponse, type RunCeremonyOptions, SESSION_KEY_VALIDATOR_ABI, type SerializedGuardianSpec, type ServerConfig, type SessionInfo, SessionKeyService, type SetAgentWalletParams, type SignP256UserOpRequest, type SignP256UserOpResponse, SilentLogger, type SubmitAgentReputationParams, TIER_GUARD_HOOK_ABI, TierConfig, TierLevel$1 as TierLevel, type TokenBalance, type TokenGuardState, type TokenInfo, TokenService, TransferManager, type TransferRecord, type TransferResult, type UninstallModuleParams, UserOperation, VALIDATOR_ABI, WEIGHT_CHANGE_EXPIRY_SECONDS, WEIGHT_CHANGE_THRESHOLD, WEIGHT_CHANGE_TIMELOCK_SECONDS, WalletManager, type WebAuthnAssertion, type WebAuthnAuthenticationCredential, type WeightConfig, WeightedSignatureService, YAAAServerClient, base64UrlDecode, base64UrlEncode, beginAuthenticationChallenge, beginGrantSessionChallenge, buildAuthenticationCredential, buildAuthenticatorData, buildClientDataJSON, buildFullInitConfig, buildInstallModuleHash, buildUninstallModuleHash, computeOapdSalt, erc8004AddressesForChain, getOapdAddress, getOapdAddressWithChainId, initConfigFromRecord, initConfigToTuple, isExecuteUserOpWrapped, isOapdDeployed, isPendingConfirmation, packP256SessionSignature, packSecp256k1SessionSignature, runAuthenticationCeremony, runGrantSessionCeremony, runWebAuthnCeremony, sepoliaV07Config, serializeGuardianSpecs, toGuardianSpecs, validateConfig, wrapExecuteUserOp };
|
package/dist/kms.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { y as UserOperation, P as PackedUserOperation, j as BLSSignatureData, w as TierLevel$1, T as TierConfig, p as GuardStatus, v as PreCheckResult } from './tier-router-DeeVg69O.js';
|
|
2
2
|
export { A as ALG_BLS, a as ALG_CUMULATIVE_T2, b as ALG_CUMULATIVE_T3, c as ALG_ECDSA, d as ALG_P256, e as AirAccountClient, f as AirAccountConfig, g as AlgId, B as BLSConfig, h as BLSManager, i as BLSNode, k as BeginAuthenticationResponse, l as BeginRegistrationResponse, m as BeginTransactionVerificationResponse, C as CryptoUtil, n as CumulativeT2SignatureData, o as CumulativeT3SignatureData, D as DEFAULT_PASSKEY_ROUTES, E as ERC4337Utils, G as GasEstimate, q as PasskeyAuthenticationParams, r as PasskeyInfo, s as PasskeyManager, t as PasskeyRegistrationParams, u as PasskeyRoutes, x as TransactionVerificationParams, U as UserOpBuilder, Y as YAAAClient, z as YAAAConfig, F as algIdForTier, H as resolveTier } from './tier-router-DeeVg69O.js';
|
|
3
3
|
import { AxiosRequestConfig } from 'axios';
|
|
4
|
-
import { PublicClient, Address, Abi, WalletClient,
|
|
4
|
+
import { PublicClient, Address, Abi, Hex, WalletClient, Hash } from 'viem';
|
|
5
|
+
import { I as InitConfig, G as GuardianSpec } from './initConfig-D8jgrcDb.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Account record stored by the SDK.
|
|
@@ -10,7 +11,15 @@ interface AccountRecord {
|
|
|
10
11
|
userId: string;
|
|
11
12
|
address: string;
|
|
12
13
|
signerAddress: string;
|
|
13
|
-
|
|
14
|
+
/**
|
|
15
|
+
* CREATE2 salt. Canonically persisted as a DECIMAL STRING (lossless, like dailyLimit) — the
|
|
16
|
+
* full-config / P-256 path (#118 M2) writes it this way so a large salt (> 2^53) neither truncates
|
|
17
|
+
* as a JS number nor fails JSON serialization as a bigint. The deploy-time rebuild reconstructs it
|
|
18
|
+
* with `BigInt(account.salt)`, which MUST match the salt used to predict the address
|
|
19
|
+
* (`_getSalt(owner, salt, configHash)`) or funds sent to the predicted address are stranded.
|
|
20
|
+
* `number | bigint` retained for back-compat with the legacy create paths.
|
|
21
|
+
*/
|
|
22
|
+
salt: string | number | bigint;
|
|
14
23
|
deployed: boolean;
|
|
15
24
|
deploymentTxHash: string | null;
|
|
16
25
|
validatorAddress: string;
|
|
@@ -32,6 +41,31 @@ interface AccountRecord {
|
|
|
32
41
|
guardian1Sig?: string;
|
|
33
42
|
guardian2?: string;
|
|
34
43
|
guardian2Sig?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Full-config (8-field InitConfig) guardian slots — each is either an ECDSA address or a
|
|
46
|
+
* P-256 (passkey) public key (x, y). Present ONLY for accounts created via
|
|
47
|
+
* createAccountWithP256Guardians() (the factory's createAccount(owner, salt, config) path).
|
|
48
|
+
* transfer-manager rebuilds the byte-identical InitConfig from these at first-UserOp deploy
|
|
49
|
+
* time so the deployed CREATE2 address matches the create-time prediction.
|
|
50
|
+
*/
|
|
51
|
+
guardianSpecs?: Array<{
|
|
52
|
+
ecdsa: string;
|
|
53
|
+
} | {
|
|
54
|
+
p256: {
|
|
55
|
+
x: string;
|
|
56
|
+
y: string;
|
|
57
|
+
};
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Resolved approvedAlgIds written into the init config (full-config path). Persisted so the
|
|
61
|
+
* deploy-time InitConfig is reconstructed EXACTLY (no re-defaulting). Paired with guardianSpecs.
|
|
62
|
+
*/
|
|
63
|
+
approvedAlgIds?: number[];
|
|
64
|
+
/**
|
|
65
|
+
* minDailyLimit floor (wei, decimal string) written into the init config (full-config path).
|
|
66
|
+
* Paired with guardianSpecs for exact deploy-time reconstruction.
|
|
67
|
+
*/
|
|
68
|
+
minDailyLimit?: string;
|
|
35
69
|
}
|
|
36
70
|
/**
|
|
37
71
|
* Transfer record stored by the SDK.
|
|
@@ -1009,6 +1043,8 @@ declare class EthereumProvider {
|
|
|
1009
1043
|
getProvider(): PublicClient;
|
|
1010
1044
|
/** Returns the viem PublicClient bound to the bundler RPC (raw .request only). */
|
|
1011
1045
|
getBundlerProvider(): PublicClient;
|
|
1046
|
+
/** EVM chain id from the validated ServerConfig (deterministic — no RPC round-trip). */
|
|
1047
|
+
getChainId(): number;
|
|
1012
1048
|
/**
|
|
1013
1049
|
* Raw bundler JSON-RPC call. The bundler exposes non-standard methods
|
|
1014
1050
|
* (eth_sendUserOperation, pimlico_getUserOperationGasPrice, ...) that are not in
|
|
@@ -1047,6 +1083,110 @@ declare class EthereumProvider {
|
|
|
1047
1083
|
}>;
|
|
1048
1084
|
}
|
|
1049
1085
|
|
|
1086
|
+
/**
|
|
1087
|
+
* Shared helpers for the FULL-config (8-field `InitConfig`) account-creation path —
|
|
1088
|
+
* the only factory path that can install P-256 (passkey) guardian keys at deploy time
|
|
1089
|
+
* (airaccount-contract v0.20.0 / #120, #118).
|
|
1090
|
+
*
|
|
1091
|
+
* ## Why a dedicated path (not `createAccountWithDefaults`)
|
|
1092
|
+
* The factory exposes two account-creation entrypoints with DIFFERENT salt + acceptance
|
|
1093
|
+
* semantics (verified against `AAStarAirAccountFactoryV7.sol`):
|
|
1094
|
+
*
|
|
1095
|
+
* - `createAccountWithDefaults(owner, salt, g1, g1Sig, g2, g2Sig, dailyLimit)` — ECDSA-only.
|
|
1096
|
+
* CREATE2 salt = `keccak256(owner, salt)` (does NOT bind the config), so the contract
|
|
1097
|
+
* REQUIRES each ECDSA guardian's `ACCEPT_GUARDIAN` acceptance signature to stop a
|
|
1098
|
+
* front-runner from seizing the counterfactual address with different guardians. This is
|
|
1099
|
+
* the existing `AccountManager.createAccountWithGuardians` path; it has no InitConfig and
|
|
1100
|
+
* thus no way to set `guardianP256X/Y`.
|
|
1101
|
+
*
|
|
1102
|
+
* - `createAccount(owner, salt, config)` — full 8-field `InitConfig`. CREATE2 salt =
|
|
1103
|
+
* `keccak256(owner, salt, keccak256(InitConfig))` (`_getSalt` over `_getConfigHash`),
|
|
1104
|
+
* so the address is BOUND to the exact config. Because any config change yields a
|
|
1105
|
+
* different address, the contract performs NO guardian-acceptance check on this path —
|
|
1106
|
+
* for either ECDSA or P-256 guardians (`_initAccount` installs every slot directly).
|
|
1107
|
+
* P-256 guardian bootstrap is owner-only and acceptance-sig-free by design (#110④):
|
|
1108
|
+
* a single guardian cannot form a recovery quorum, so no consent ceremony is needed.
|
|
1109
|
+
*
|
|
1110
|
+
* Consequence: the deploy-time initCode MUST embed the BYTE-IDENTICAL `InitConfig` used to
|
|
1111
|
+
* predict the address, or the deployed account lands at a different CREATE2 address. These
|
|
1112
|
+
* helpers build the config once (via the core `buildInitConfig`) and reconstruct it
|
|
1113
|
+
* deterministically from the persisted record at first-UserOp deploy time so the two match.
|
|
1114
|
+
*/
|
|
1115
|
+
/** A P-256 (passkey) guardian public key — SEC1 affine coordinates, each a 32-byte hex word. */
|
|
1116
|
+
interface P256GuardianKey {
|
|
1117
|
+
x: Hex;
|
|
1118
|
+
y: Hex;
|
|
1119
|
+
}
|
|
1120
|
+
/** Inputs for the full-config (8-field `InitConfig`) account-creation path. */
|
|
1121
|
+
interface FullConfigGuardianParams {
|
|
1122
|
+
/** P-256 (passkey) guardians installed at deploy time. Owner-bootstrap — NO acceptance sig. */
|
|
1123
|
+
p256Guardians: P256GuardianKey[];
|
|
1124
|
+
/**
|
|
1125
|
+
* Optional ECDSA guardians, installed via the SAME full-config path. NOTE: on this path the
|
|
1126
|
+
* contract does not verify ECDSA acceptance signatures (the config-hash-in-salt binding stands
|
|
1127
|
+
* in for them), so none are required or accepted here.
|
|
1128
|
+
*/
|
|
1129
|
+
ecdsaGuardians?: Address[];
|
|
1130
|
+
/** Daily spend limit (wei). MUST be > 0 — a guardian set enables the on-chain GUARD. */
|
|
1131
|
+
dailyLimit: bigint;
|
|
1132
|
+
/** Validator algorithm ids approved at init. Defaults (in buildInitConfig) to ECDSA (+P-256). */
|
|
1133
|
+
approvedAlgIds?: number[];
|
|
1134
|
+
/** Floor the daily limit may be lowered to via the guard. Defaults to 0. */
|
|
1135
|
+
minDailyLimit?: bigint;
|
|
1136
|
+
}
|
|
1137
|
+
/** A guardian slot serialized for JSON persistence on the {@link AccountRecord}. */
|
|
1138
|
+
type SerializedGuardianSpec = {
|
|
1139
|
+
ecdsa: string;
|
|
1140
|
+
} | {
|
|
1141
|
+
p256: {
|
|
1142
|
+
x: string;
|
|
1143
|
+
y: string;
|
|
1144
|
+
};
|
|
1145
|
+
};
|
|
1146
|
+
/**
|
|
1147
|
+
* Map the public params to core {@link GuardianSpec}s in a DETERMINISTIC order
|
|
1148
|
+
* (ECDSA slots first, then P-256). Order is consensus-critical: it determines both the
|
|
1149
|
+
* predicted CREATE2 address and the guardian slot index each key occupies on-chain.
|
|
1150
|
+
*/
|
|
1151
|
+
declare function toGuardianSpecs(p: FullConfigGuardianParams): GuardianSpec[];
|
|
1152
|
+
/**
|
|
1153
|
+
* Build the full 8-field `InitConfig` for the create path. Delegates to the core
|
|
1154
|
+
* `buildInitConfig` (the 0.22.0 builder) so the P-256 slots, sentinel handling, and
|
|
1155
|
+
* approvedAlgId defaulting are produced by ONE audited implementation — never hand-rolled.
|
|
1156
|
+
*/
|
|
1157
|
+
declare function buildFullInitConfig(p: FullConfigGuardianParams): InitConfig;
|
|
1158
|
+
/**
|
|
1159
|
+
* Flatten a typed {@link InitConfig} into the POSITIONAL tuple the local human-readable
|
|
1160
|
+
* factory ABI (`AIRACCOUNT_FACTORY_ABI`, fed through viem `parseAbi`) expects as the
|
|
1161
|
+
* `config` argument of `getAddress` / `createAccount`. Field order is consensus-critical
|
|
1162
|
+
* and matches `AAStarAirAccountBase.InitConfig` exactly.
|
|
1163
|
+
*/
|
|
1164
|
+
declare function initConfigToTuple(c: InitConfig): readonly unknown[];
|
|
1165
|
+
/** Serialize core {@link GuardianSpec}s for JSON storage on the account record. */
|
|
1166
|
+
declare function serializeGuardianSpecs(specs: readonly GuardianSpec[]): SerializedGuardianSpec[];
|
|
1167
|
+
/**
|
|
1168
|
+
* Reconstruct the BYTE-IDENTICAL `InitConfig` from a persisted record at deploy time.
|
|
1169
|
+
*
|
|
1170
|
+
* Re-derivation is exact because the record persists the RESOLVED `approvedAlgIds`,
|
|
1171
|
+
* `minDailyLimit`, and `dailyLimit` (not just the create-time inputs), and `buildInitConfig`
|
|
1172
|
+
* is a pure function of its arguments. The resulting config therefore hashes to the same
|
|
1173
|
+
* `_getConfigHash`, yielding the same CREATE2 address that was predicted at create time.
|
|
1174
|
+
*
|
|
1175
|
+
* @throws if the record carries no `guardianSpecs` (i.e. it is not a full-config account).
|
|
1176
|
+
*/
|
|
1177
|
+
declare function initConfigFromRecord(record: AccountRecord): InitConfig;
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* Result of {@link AccountManager.ensureValidatorRouter}.
|
|
1181
|
+
* `set: true` only when an on-chain `setValidator(router)` tx was actually sent (`tx`
|
|
1182
|
+
* carries the hash). `set: false` is a no-op with a `reason` explaining the decision.
|
|
1183
|
+
*/
|
|
1184
|
+
interface EnsureValidatorRouterResult {
|
|
1185
|
+
set: boolean;
|
|
1186
|
+
reason?: string;
|
|
1187
|
+
tx?: Hash;
|
|
1188
|
+
router?: Address;
|
|
1189
|
+
}
|
|
1050
1190
|
/**
|
|
1051
1191
|
* Account manager — extracted from NestJS AccountService.
|
|
1052
1192
|
* Creates and retrieves smart accounts without framework dependencies.
|
|
@@ -1062,6 +1202,18 @@ declare class AccountManager {
|
|
|
1062
1202
|
salt?: number | bigint;
|
|
1063
1203
|
/** Daily transfer limit in wei. When > 0 the account is created with on-chain guard enforcement. */
|
|
1064
1204
|
dailyLimit?: bigint;
|
|
1205
|
+
/**
|
|
1206
|
+
* P-256 (passkey) guardians to install at deploy time. When present, the account is created
|
|
1207
|
+
* via the full-config createAccount(owner, salt, config) path (delegates to
|
|
1208
|
+
* {@link createAccountWithP256Guardians}); `dailyLimit` MUST be > 0 (guardians enable the guard).
|
|
1209
|
+
*/
|
|
1210
|
+
p256Guardians?: P256GuardianKey[];
|
|
1211
|
+
/** Optional ECDSA guardians installed via the same full-config path (no acceptance sig required). */
|
|
1212
|
+
ecdsaGuardians?: Address[];
|
|
1213
|
+
/** Validator algorithm ids approved at init (full-config path). Defaults to ECDSA (+P-256). */
|
|
1214
|
+
approvedAlgIds?: number[];
|
|
1215
|
+
/** Floor the daily limit may be lowered to via the guard (full-config path). Defaults to 0. */
|
|
1216
|
+
minDailyLimit?: bigint;
|
|
1065
1217
|
}): Promise<AccountRecord>;
|
|
1066
1218
|
getAccount(userId: string): Promise<(AccountRecord & {
|
|
1067
1219
|
balance: string;
|
|
@@ -1128,6 +1280,74 @@ declare class AccountManager {
|
|
|
1128
1280
|
salt?: number | bigint;
|
|
1129
1281
|
entryPointVersion?: EntryPointVersion;
|
|
1130
1282
|
}): Promise<AccountRecord>;
|
|
1283
|
+
/**
|
|
1284
|
+
* Create an AirAccount with one or more P-256 (WebAuthn passkey) guardians installed at
|
|
1285
|
+
* DEPLOY time — the server-client path #118 adds for KMS-custodied / counterfactual accounts
|
|
1286
|
+
* (e.g. YAA) that cannot drive the viem extension layer for account creation.
|
|
1287
|
+
*
|
|
1288
|
+
* Uses the factory's full-config `createAccount(owner, salt, config)` path because it is the
|
|
1289
|
+
* ONLY entrypoint that accepts an 8-field `InitConfig` (and therefore `guardianP256X/Y`). The
|
|
1290
|
+
* 8-field config is built by the core `buildInitConfig` (0.22.0) — never hand-rolled — and the
|
|
1291
|
+
* address is predicted via the factory's full-config `getAddress(owner, salt, config)` (NOT
|
|
1292
|
+
* `getAddressWithDefaults`), binding the address to `keccak256(config)`.
|
|
1293
|
+
*
|
|
1294
|
+
* ### Acceptance-signature semantics (verified against AAStarAirAccountFactoryV7.sol)
|
|
1295
|
+
* On this path the contract performs NO guardian-acceptance signature check — for P-256 OR ECDSA
|
|
1296
|
+
* guardians. Front-run protection comes from `_getSalt(owner, salt, _getConfigHash(config))`:
|
|
1297
|
+
* any change to the guardian set (or any other config field) yields a different CREATE2 address,
|
|
1298
|
+
* so an attacker cannot collide on the victim's counterfactual address with a weaker config.
|
|
1299
|
+
* P-256 guardians are an owner-bootstrap (single guardian can't form a recovery quorum), so no
|
|
1300
|
+
* acceptance ceremony exists for them by design (#110④). This is why optional ECDSA guardians may
|
|
1301
|
+
* also be passed here WITHOUT signatures — distinct from createAccountWithGuardians(), which uses
|
|
1302
|
+
* the owner-only-salt `createAccountWithDefaults` path and DOES require ECDSA acceptance sigs.
|
|
1303
|
+
*
|
|
1304
|
+
* The deploy UserOp is still signed by the existing KMS owner-key path (unchanged): this method
|
|
1305
|
+
* only predicts the address and persists the full config; transfer-manager rebuilds the
|
|
1306
|
+
* byte-identical initCode (via {@link initConfigFromRecord}) at first-UserOp deploy time.
|
|
1307
|
+
*
|
|
1308
|
+
* @throws if no P-256 guardian is supplied, dailyLimit <= 0, or EntryPoint is v0.6.
|
|
1309
|
+
*/
|
|
1310
|
+
createAccountWithP256Guardians(userId: string, params: {
|
|
1311
|
+
/** P-256 (passkey) guardian public keys to install at deploy time (at least one required). */
|
|
1312
|
+
p256Guardians: P256GuardianKey[];
|
|
1313
|
+
/** Optional ECDSA guardians installed via the same full-config path (no acceptance sig). */
|
|
1314
|
+
ecdsaGuardians?: Address[];
|
|
1315
|
+
/** Daily spend limit in wei. MUST be > 0 — a guardian set enables the on-chain guard. */
|
|
1316
|
+
dailyLimit: bigint;
|
|
1317
|
+
/** Validator algorithm ids approved at init. Defaults to ECDSA (+P-256 when a passkey is present). */
|
|
1318
|
+
approvedAlgIds?: number[];
|
|
1319
|
+
/** Floor the daily limit may be lowered to via the guard. Defaults to 0. */
|
|
1320
|
+
minDailyLimit?: bigint;
|
|
1321
|
+
salt?: number | bigint;
|
|
1322
|
+
entryPointVersion?: EntryPointVersion;
|
|
1323
|
+
}): Promise<AccountRecord>;
|
|
1324
|
+
/**
|
|
1325
|
+
* Gap B — wire the validator router for an account that approved a ROUTER-DELEGATED signature
|
|
1326
|
+
* algorithm (BLS 0x01, cumulative T2 0x04, T3 0x05, weighted 0x07, session 0x08, ...). Such an
|
|
1327
|
+
* account's `_validateTripleSignature` / `_callBLSValidator` return `1` (FAIL) while
|
|
1328
|
+
* `validator() == address(0)`, so the algorithm is non-functional until the owner calls
|
|
1329
|
+
* `setValidator(router)` (onlyOwner, SET-ONCE). Inline algIds (ECDSA 0x02, P256 0x03, COMBINED_T1
|
|
1330
|
+
* 0x06) need no router and are a no-op here.
|
|
1331
|
+
*
|
|
1332
|
+
* MUST be called AFTER the account is deployed (setValidator is onlyOwner and needs code) — the
|
|
1333
|
+
* lazy/counterfactual deploy path cannot setValidator at predict-time. Idempotent: re-running after
|
|
1334
|
+
* the validator is set is a no-op (`reason: 'validator already set'`).
|
|
1335
|
+
*
|
|
1336
|
+
* On-chain access matches the rest of this package: reads via the EthereumProvider's PublicClient
|
|
1337
|
+
* (`getAccountContract(...).read.validator()` and `getProvider().getCode()`); the state-changing
|
|
1338
|
+
* `setValidator` is sent through a caller-supplied `WalletClient` whose account is the owner —
|
|
1339
|
+
* the same convention used by `PaymasterManager.updatePrice` / `ForceExitService` (this manager's
|
|
1340
|
+
* narrow `ISignerAdapter` only EIP-191 personal-signs and cannot send transactions).
|
|
1341
|
+
*
|
|
1342
|
+
* @param userId the account owner's user id (storage key)
|
|
1343
|
+
* @param opts.router override the router address (defaults to the chain's canonical
|
|
1344
|
+
* `aaStarValidator`); pass to target a non-canonical router
|
|
1345
|
+
* @param opts.walletClient viem WalletClient signing as the account OWNER — REQUIRED to send the tx
|
|
1346
|
+
*/
|
|
1347
|
+
ensureValidatorRouter(userId: string, opts?: {
|
|
1348
|
+
router?: Address;
|
|
1349
|
+
walletClient?: WalletClient;
|
|
1350
|
+
}): Promise<EnsureValidatorRouterResult>;
|
|
1131
1351
|
}
|
|
1132
1352
|
|
|
1133
1353
|
/**
|
|
@@ -3101,4 +3321,4 @@ declare class LocalWalletSigner implements ISignerAdapter {
|
|
|
3101
3321
|
}>;
|
|
3102
3322
|
}
|
|
3103
3323
|
|
|
3104
|
-
export { ACCOUNT_ABI, AGENT_SESSION_KEY_VALIDATOR_ABI, AIRACCOUNT_ABI, AIRACCOUNT_ADDRESSES, AIRACCOUNT_FACTORY_ABI, AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI, AIR_ACCOUNT_DELEGATE_ABI, AIR_ACCOUNT_DELEGATE_ADDRESS, ALG_ID, AccountManager, type AccountRecord, type ActiveRecovery, AgentRegistryService, type AgentReputationSummary, type AgentSessionConfig, type AgentSessionInfo, AirAccountServerClient, type AirAccountVersion, BLSSignatureData, BLSSignatureService, type BeginCeremonyResponse, type BindERC8004AgentWalletParams, type BlsConfigRecord, type BuildCredentialOptions, CALLDATA_PARSER_REGISTRY_ABI, ConsoleLogger, type CreateAgentAccountParams, type CreateP256SessionKeyRequest, type CreateP256SessionKeyResponse, DEFAULT_CREDENTIAL_ID, DEFAULT_KMS_ENDPOINT, DEFAULT_ORIGIN, DEFAULT_RP_ID, type DelegateInitParams, DvtPendingConfirmationError, type EIP7702Authorization, EIP7702DelegateService, ENTRYPOINT_ABI_V6, ENTRYPOINT_ABI_V7_V8, ENTRYPOINT_ADDRESSES, ERC20_ABI, ERC8004Service, ERC8004_ADDRESSES, EXECUTE_BATCH_SELECTOR, EXECUTE_SELECTOR, EXECUTE_USER_OP_SELECTOR, type EntryPointConfig, EntryPointVersion, type EntryPointVersionConfig, type EstimateGasParams, EthereumProvider, type ExecuteTransferParams, FACTORY_ABI_V6, FACTORY_ABI_V7_V8, FORCE_EXIT_MODULE_ABI, ForceExitService, GLOBAL_GUARD_ABI, type GrantP256SessionParams, type GrantSessionParams, GuardChecker, type GuardState, GuardStateReader, GuardStatus, type ILogger, type ISignerAdapter, type IStorageAdapter, type InstallModuleParams, KmsAgentService, type KmsAttestationManifestResponse, type KmsAttestationProofResponse, type KmsAttestationResponse, type KmsBeginAuthenticationRequest, type KmsBeginAuthenticationResponse, type KmsBeginGrantSessionAuthRequest, type KmsBeginGrantSessionAuthResponse, type KmsBeginRegistrationRequest, type KmsBeginRegistrationResponse, type KmsChangePasskeyResponse, type KmsCompleteRegistrationRequest, type KmsCompleteRegistrationResponse, type KmsCreateAgentKeyRequest, type KmsCreateAgentKeyResponse, type KmsCreateKeyRequest, type KmsCreateKeyResponse, type KmsDeleteKeyResponse, type KmsDeriveAddressResponse, type KmsDescribeKeyResponse, type KmsEip712Domain, type KmsEip712FieldValue, type KmsEip712TypeDef, type KmsEthereumTransaction, type KmsGetPublicKeyResponse, type KmsHealthResponse, KmsHttpClient, type KmsHttpClientOptions, type KmsKeyStatusResponse, type KmsListKeysResponse, KmsManager, KmsMonitorService, type KmsPaymentAuth, type KmsPaymentSignatureResponse, KmsPaymentSigner, type KmsPurgeKeyResponse, type KmsQueueStatusResponse, type KmsRefreshAgentCredentialRequest, type KmsRefreshAgentCredentialResponse, type KmsRevokeAgentCredentialRequest, type KmsRevokeAgentCredentialResponse, type KmsRollbackCounterResponse, KmsSessionService, type KmsSignAgentRequest, type KmsSignAgentResponse, type KmsSignGTokenAuthorizationRequest, type KmsSignGrantSessionRequest, type KmsSignGrantSessionResponse, type KmsSignHashResponse, type KmsSignMicropaymentVoucherRequest, type KmsSignP256GrantSessionRequest, type KmsSignRequest, type KmsSignResponse, type KmsSignTypedDataRequest, type KmsSignTypedDataResponse, type KmsSignX402PaymentRequest, KmsSigner, type KmsStatsResponse, type KmsVersionResponse, type L2Type, L2_TYPE, type LegacyPasskeyAssertion, LocalWalletSigner, MAX_GUARDIANS, MODULE_TYPE, MemoryStorage, type MintAgentIdentityParams, ModuleManager, type ModuleTypeId, type OapdConfig, P256PasskeySigner, PackedUserOperation, type PasskeyAssertionContext, type PasskeyCeremonySigner, PaymasterManager, PaymasterPriceStalenessError, type PaymasterRecord, type PendingExit, type PendingWeightChange, PreCheckResult, type QueryAgentReputationParams, RECOVERY_THRESHOLD, RECOVERY_TIMELOCK_SECONDS, RecoveryService, type RevokeP256SessionKeyRequest, type RevokeP256SessionKeyResponse, type RunCeremonyOptions, SESSION_KEY_VALIDATOR_ABI, type ServerConfig, type SessionInfo, SessionKeyService, type SetAgentWalletParams, type SignP256UserOpRequest, type SignP256UserOpResponse, SilentLogger, type SubmitAgentReputationParams, TIER_GUARD_HOOK_ABI, TierConfig, TierLevel$1 as TierLevel, type TokenBalance, type TokenGuardState, type TokenInfo, TokenService, TransferManager, type TransferRecord, type TransferResult, type UninstallModuleParams, UserOperation, VALIDATOR_ABI, WEIGHT_CHANGE_EXPIRY_SECONDS, WEIGHT_CHANGE_THRESHOLD, WEIGHT_CHANGE_TIMELOCK_SECONDS, WalletManager, type WebAuthnAssertion, type WebAuthnAuthenticationCredential, type WeightConfig, WeightedSignatureService, YAAAServerClient, base64UrlDecode, base64UrlEncode, beginAuthenticationChallenge, beginGrantSessionChallenge, buildAuthenticationCredential, buildAuthenticatorData, buildClientDataJSON, buildInstallModuleHash, buildUninstallModuleHash, computeOapdSalt, erc8004AddressesForChain, getOapdAddress, getOapdAddressWithChainId, isExecuteUserOpWrapped, isOapdDeployed, isPendingConfirmation, packP256SessionSignature, packSecp256k1SessionSignature, runAuthenticationCeremony, runGrantSessionCeremony, runWebAuthnCeremony, sepoliaV07Config, validateConfig, wrapExecuteUserOp };
|
|
3324
|
+
export { ACCOUNT_ABI, AGENT_SESSION_KEY_VALIDATOR_ABI, AIRACCOUNT_ABI, AIRACCOUNT_ADDRESSES, AIRACCOUNT_FACTORY_ABI, AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI, AIR_ACCOUNT_DELEGATE_ABI, AIR_ACCOUNT_DELEGATE_ADDRESS, ALG_ID, AccountManager, type AccountRecord, type ActiveRecovery, AgentRegistryService, type AgentReputationSummary, type AgentSessionConfig, type AgentSessionInfo, AirAccountServerClient, type AirAccountVersion, BLSSignatureData, BLSSignatureService, type BeginCeremonyResponse, type BindERC8004AgentWalletParams, type BlsConfigRecord, type BuildCredentialOptions, CALLDATA_PARSER_REGISTRY_ABI, ConsoleLogger, type CreateAgentAccountParams, type CreateP256SessionKeyRequest, type CreateP256SessionKeyResponse, DEFAULT_CREDENTIAL_ID, DEFAULT_KMS_ENDPOINT, DEFAULT_ORIGIN, DEFAULT_RP_ID, type DelegateInitParams, DvtPendingConfirmationError, type EIP7702Authorization, EIP7702DelegateService, ENTRYPOINT_ABI_V6, ENTRYPOINT_ABI_V7_V8, ENTRYPOINT_ADDRESSES, ERC20_ABI, ERC8004Service, ERC8004_ADDRESSES, EXECUTE_BATCH_SELECTOR, EXECUTE_SELECTOR, EXECUTE_USER_OP_SELECTOR, type EntryPointConfig, EntryPointVersion, type EntryPointVersionConfig, type EstimateGasParams, EthereumProvider, type ExecuteTransferParams, FACTORY_ABI_V6, FACTORY_ABI_V7_V8, FORCE_EXIT_MODULE_ABI, ForceExitService, type FullConfigGuardianParams, GLOBAL_GUARD_ABI, type GrantP256SessionParams, type GrantSessionParams, GuardChecker, type GuardState, GuardStateReader, GuardStatus, type ILogger, type ISignerAdapter, type IStorageAdapter, type InstallModuleParams, KmsAgentService, type KmsAttestationManifestResponse, type KmsAttestationProofResponse, type KmsAttestationResponse, type KmsBeginAuthenticationRequest, type KmsBeginAuthenticationResponse, type KmsBeginGrantSessionAuthRequest, type KmsBeginGrantSessionAuthResponse, type KmsBeginRegistrationRequest, type KmsBeginRegistrationResponse, type KmsChangePasskeyResponse, type KmsCompleteRegistrationRequest, type KmsCompleteRegistrationResponse, type KmsCreateAgentKeyRequest, type KmsCreateAgentKeyResponse, type KmsCreateKeyRequest, type KmsCreateKeyResponse, type KmsDeleteKeyResponse, type KmsDeriveAddressResponse, type KmsDescribeKeyResponse, type KmsEip712Domain, type KmsEip712FieldValue, type KmsEip712TypeDef, type KmsEthereumTransaction, type KmsGetPublicKeyResponse, type KmsHealthResponse, KmsHttpClient, type KmsHttpClientOptions, type KmsKeyStatusResponse, type KmsListKeysResponse, KmsManager, KmsMonitorService, type KmsPaymentAuth, type KmsPaymentSignatureResponse, KmsPaymentSigner, type KmsPurgeKeyResponse, type KmsQueueStatusResponse, type KmsRefreshAgentCredentialRequest, type KmsRefreshAgentCredentialResponse, type KmsRevokeAgentCredentialRequest, type KmsRevokeAgentCredentialResponse, type KmsRollbackCounterResponse, KmsSessionService, type KmsSignAgentRequest, type KmsSignAgentResponse, type KmsSignGTokenAuthorizationRequest, type KmsSignGrantSessionRequest, type KmsSignGrantSessionResponse, type KmsSignHashResponse, type KmsSignMicropaymentVoucherRequest, type KmsSignP256GrantSessionRequest, type KmsSignRequest, type KmsSignResponse, type KmsSignTypedDataRequest, type KmsSignTypedDataResponse, type KmsSignX402PaymentRequest, KmsSigner, type KmsStatsResponse, type KmsVersionResponse, type L2Type, L2_TYPE, type LegacyPasskeyAssertion, LocalWalletSigner, MAX_GUARDIANS, MODULE_TYPE, MemoryStorage, type MintAgentIdentityParams, ModuleManager, type ModuleTypeId, type OapdConfig, type P256GuardianKey, P256PasskeySigner, PackedUserOperation, type PasskeyAssertionContext, type PasskeyCeremonySigner, PaymasterManager, PaymasterPriceStalenessError, type PaymasterRecord, type PendingExit, type PendingWeightChange, PreCheckResult, type QueryAgentReputationParams, RECOVERY_THRESHOLD, RECOVERY_TIMELOCK_SECONDS, RecoveryService, type RevokeP256SessionKeyRequest, type RevokeP256SessionKeyResponse, type RunCeremonyOptions, SESSION_KEY_VALIDATOR_ABI, type SerializedGuardianSpec, type ServerConfig, type SessionInfo, SessionKeyService, type SetAgentWalletParams, type SignP256UserOpRequest, type SignP256UserOpResponse, SilentLogger, type SubmitAgentReputationParams, TIER_GUARD_HOOK_ABI, TierConfig, TierLevel$1 as TierLevel, type TokenBalance, type TokenGuardState, type TokenInfo, TokenService, TransferManager, type TransferRecord, type TransferResult, type UninstallModuleParams, UserOperation, VALIDATOR_ABI, WEIGHT_CHANGE_EXPIRY_SECONDS, WEIGHT_CHANGE_THRESHOLD, WEIGHT_CHANGE_TIMELOCK_SECONDS, WalletManager, type WebAuthnAssertion, type WebAuthnAuthenticationCredential, type WeightConfig, WeightedSignatureService, YAAAServerClient, base64UrlDecode, base64UrlEncode, beginAuthenticationChallenge, beginGrantSessionChallenge, buildAuthenticationCredential, buildAuthenticatorData, buildClientDataJSON, buildFullInitConfig, buildInstallModuleHash, buildUninstallModuleHash, computeOapdSalt, erc8004AddressesForChain, getOapdAddress, getOapdAddressWithChainId, initConfigFromRecord, initConfigToTuple, isExecuteUserOpWrapped, isOapdDeployed, isPendingConfirmation, packP256SessionSignature, packSecp256k1SessionSignature, runAuthenticationCeremony, runGrantSessionCeremony, runWebAuthnCeremony, sepoliaV07Config, serializeGuardianSpecs, toGuardianSpecs, validateConfig, wrapExecuteUserOp };
|
package/dist/kms.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ACCOUNT_ABI, AGENT_SESSION_KEY_VALIDATOR_ABI, AIRACCOUNT_ABI, AIRACCOUNT_ADDRESSES, AIRACCOUNT_FACTORY_ABI, AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI, AIR_ACCOUNT_DELEGATE_ABI, AIR_ACCOUNT_DELEGATE_ADDRESS, ALG_ID, AccountManager, AgentRegistryService, AirAccountServerClient, BLSSignatureService, CALLDATA_PARSER_REGISTRY_ABI, ConsoleLogger, DEFAULT_CREDENTIAL_ID, DEFAULT_KMS_ENDPOINT, DEFAULT_ORIGIN, DEFAULT_RP_ID, DvtPendingConfirmationError, EIP7702DelegateService, ENTRYPOINT_ABI_V6, ENTRYPOINT_ABI_V7_V8, ENTRYPOINT_ADDRESSES, ERC20_ABI, ERC8004Service, ERC8004_ADDRESSES, EXECUTE_BATCH_SELECTOR, EXECUTE_SELECTOR, EXECUTE_USER_OP_SELECTOR, EntryPointVersion, EthereumProvider, FACTORY_ABI_V6, FACTORY_ABI_V7_V8, FORCE_EXIT_MODULE_ABI, ForceExitService, GLOBAL_GUARD_ABI, GuardChecker, GuardStateReader, KmsAgentService, KmsHttpClient, KmsManager, KmsMonitorService, KmsPaymentSigner, KmsSessionService, KmsSigner, L2_TYPE, LocalWalletSigner, MAX_GUARDIANS, MODULE_TYPE, MemoryStorage, ModuleManager, P256PasskeySigner, PaymasterManager, PaymasterPriceStalenessError, RECOVERY_THRESHOLD, RECOVERY_TIMELOCK_SECONDS, RecoveryService, SESSION_KEY_VALIDATOR_ABI, SessionKeyService, SilentLogger, TIER_GUARD_HOOK_ABI, TokenService, TransferManager, VALIDATOR_ABI, WEIGHT_CHANGE_EXPIRY_SECONDS, WEIGHT_CHANGE_THRESHOLD, WEIGHT_CHANGE_TIMELOCK_SECONDS, WalletManager, WeightedSignatureService, YAAAServerClient, base64UrlDecode, base64UrlEncode, beginAuthenticationChallenge, beginGrantSessionChallenge, buildAuthenticationCredential, buildAuthenticatorData, buildClientDataJSON, buildInstallModuleHash, buildUninstallModuleHash, computeOapdSalt, erc8004AddressesForChain, getOapdAddress, getOapdAddressWithChainId, isExecuteUserOpWrapped, isOapdDeployed, isPendingConfirmation, packP256SessionSignature, packSecp256k1SessionSignature, runAuthenticationCeremony, runGrantSessionCeremony, runWebAuthnCeremony, sepoliaV07Config, validateConfig, wrapExecuteUserOp } from './chunk-
|
|
1
|
+
export { ACCOUNT_ABI, AGENT_SESSION_KEY_VALIDATOR_ABI, AIRACCOUNT_ABI, AIRACCOUNT_ADDRESSES, AIRACCOUNT_FACTORY_ABI, AIR_ACCOUNT_COMPOSITE_VALIDATOR_ABI, AIR_ACCOUNT_DELEGATE_ABI, AIR_ACCOUNT_DELEGATE_ADDRESS, ALG_ID, AccountManager, AgentRegistryService, AirAccountServerClient, BLSSignatureService, CALLDATA_PARSER_REGISTRY_ABI, ConsoleLogger, DEFAULT_CREDENTIAL_ID, DEFAULT_KMS_ENDPOINT, DEFAULT_ORIGIN, DEFAULT_RP_ID, DvtPendingConfirmationError, EIP7702DelegateService, ENTRYPOINT_ABI_V6, ENTRYPOINT_ABI_V7_V8, ENTRYPOINT_ADDRESSES, ERC20_ABI, ERC8004Service, ERC8004_ADDRESSES, EXECUTE_BATCH_SELECTOR, EXECUTE_SELECTOR, EXECUTE_USER_OP_SELECTOR, EntryPointVersion, EthereumProvider, FACTORY_ABI_V6, FACTORY_ABI_V7_V8, FORCE_EXIT_MODULE_ABI, ForceExitService, GLOBAL_GUARD_ABI, GuardChecker, GuardStateReader, KmsAgentService, KmsHttpClient, KmsManager, KmsMonitorService, KmsPaymentSigner, KmsSessionService, KmsSigner, L2_TYPE, LocalWalletSigner, MAX_GUARDIANS, MODULE_TYPE, MemoryStorage, ModuleManager, P256PasskeySigner, PaymasterManager, PaymasterPriceStalenessError, RECOVERY_THRESHOLD, RECOVERY_TIMELOCK_SECONDS, RecoveryService, SESSION_KEY_VALIDATOR_ABI, SessionKeyService, SilentLogger, TIER_GUARD_HOOK_ABI, TokenService, TransferManager, VALIDATOR_ABI, WEIGHT_CHANGE_EXPIRY_SECONDS, WEIGHT_CHANGE_THRESHOLD, WEIGHT_CHANGE_TIMELOCK_SECONDS, WalletManager, WeightedSignatureService, YAAAServerClient, base64UrlDecode, base64UrlEncode, beginAuthenticationChallenge, beginGrantSessionChallenge, buildAuthenticationCredential, buildAuthenticatorData, buildClientDataJSON, buildFullInitConfig, buildInstallModuleHash, buildUninstallModuleHash, computeOapdSalt, erc8004AddressesForChain, getOapdAddress, getOapdAddressWithChainId, initConfigFromRecord, initConfigToTuple, isExecuteUserOpWrapped, isOapdDeployed, isPendingConfirmation, packP256SessionSignature, packSecp256k1SessionSignature, runAuthenticationCeremony, runGrantSessionCeremony, runWebAuthnCeremony, sepoliaV07Config, serializeGuardianSpecs, toGuardianSpecs, validateConfig, wrapExecuteUserOp } from './chunk-YUFQIYLR.js';
|
|
2
2
|
export { ALG_BLS, ALG_CUMULATIVE_T2, ALG_CUMULATIVE_T3, ALG_ECDSA, ALG_P256, AirAccountClient, BLSManager, CryptoUtil, DEFAULT_PASSKEY_ROUTES, ERC4337Utils, PasskeyManager, UserOpBuilder, YAAAClient, algIdForTier, resolveTier } from './chunk-X3AMH53O.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-BYVG7MO7.js';
|
|
4
4
|
import './chunk-UCLK6LTB.js';
|
|
5
5
|
import './chunk-PZ5AY32C.js';
|
|
6
6
|
//# sourceMappingURL=kms.js.map
|
package/dist/operator.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkVHY6R2PI_cjs = require('./chunk-VHY6R2PI.cjs');
|
|
4
|
+
require('./chunk-MOJJ7QF6.cjs');
|
|
5
5
|
require('./chunk-MXJEULSE.cjs');
|
|
6
6
|
require('./chunk-Q7SFCCGT.cjs');
|
|
7
7
|
|
|
@@ -9,19 +9,19 @@ require('./chunk-Q7SFCCGT.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "OperatorLifecycle", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkVHY6R2PI_cjs.OperatorLifecycle; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "PaymasterOperatorClient", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkVHY6R2PI_cjs.PaymasterOperatorClient; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "ProposalState", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkVHY6R2PI_cjs.ProposalState; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "ProtocolClient", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkVHY6R2PI_cjs.ProtocolClient; }
|
|
25
25
|
});
|
|
26
26
|
//# sourceMappingURL=operator.cjs.map
|
|
27
27
|
//# sourceMappingURL=operator.cjs.map
|