abstractionkit 0.1.4 → 0.1.5
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/Bundler.d.ts +7 -8
- package/dist/Bundler.d.ts.map +1 -1
- package/dist/abstractionkit.d.ts +8 -8
- package/dist/abstractionkit.d.ts.map +1 -1
- package/dist/account/Safe/SafeAccount.d.ts +24 -20
- package/dist/account/Safe/SafeAccount.d.ts.map +1 -1
- package/dist/account/Safe/SafeAccountV0_2_0.d.ts +17 -0
- package/dist/account/Safe/SafeAccountV0_2_0.d.ts.map +1 -0
- package/dist/account/Safe/SafeAccountWebAuth.d.ts +31 -0
- package/dist/account/Safe/SafeAccountWebAuth.d.ts.map +1 -0
- package/dist/account/Safe/multisend.d.ts +3 -2
- package/dist/account/Safe/multisend.d.ts.map +1 -1
- package/dist/account/Safe/types.d.ts +51 -16
- package/dist/account/Safe/types.d.ts.map +1 -1
- package/dist/account/SendUseroperationResponse.d.ts +2 -2
- package/dist/account/SendUseroperationResponse.d.ts.map +1 -1
- package/dist/account/SmartAccount.d.ts +2 -3
- package/dist/account/SmartAccount.d.ts.map +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/errors.d.ts +24 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/factory/SmartAccountFactory.d.ts +1 -2
- package/dist/factory/SmartAccountFactory.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.m.js +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/paymaster/CandidePaymaster.d.ts +21 -0
- package/dist/paymaster/CandidePaymaster.d.ts.map +1 -0
- package/dist/paymaster/Paymaster.d.ts +3 -6
- package/dist/paymaster/Paymaster.d.ts.map +1 -1
- package/dist/paymaster/types.d.ts +7 -0
- package/dist/paymaster/types.d.ts.map +1 -0
- package/dist/types.d.ts +49 -59
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +7 -7
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/factory/SimpleAccountFactory.d.ts +0 -5
- package/dist/factory/SimpleAccountFactory.d.ts.map +0 -1
- package/dist/paymaster/CandideValidationPaymaster.d.ts +0 -13
- package/dist/paymaster/CandideValidationPaymaster.d.ts.map +0 -1
package/dist/Bundler.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import type { UserOperation,
|
|
2
|
-
import { BytesLike } from "ethers";
|
|
1
|
+
import type { UserOperation, GasEstimationResult, UserOperationByHashResult, UserOperationReceiptResult, StateOverrideSet } from "./types";
|
|
3
2
|
export declare class Bundler {
|
|
4
3
|
readonly rpcUrl: string;
|
|
5
4
|
constructor(rpcUrl: string);
|
|
6
|
-
chainId(): Promise<string
|
|
7
|
-
supportedEntryPoints(): Promise<string[]
|
|
8
|
-
estimateUserOperationGas(useroperation: UserOperation, entrypointAddress: string, state_override_set?: StateOverrideSet): Promise<GasEstimationResult
|
|
9
|
-
sendUserOperation(useroperation: UserOperation, entrypointAddress: string): Promise<string
|
|
10
|
-
getUserOperationReceipt(useroperationhash:
|
|
11
|
-
getUserOperationByHash(useroperationhash:
|
|
5
|
+
chainId(): Promise<string>;
|
|
6
|
+
supportedEntryPoints(): Promise<string[]>;
|
|
7
|
+
estimateUserOperationGas(useroperation: UserOperation, entrypointAddress: string, state_override_set?: StateOverrideSet): Promise<GasEstimationResult>;
|
|
8
|
+
sendUserOperation(useroperation: UserOperation, entrypointAddress: string): Promise<string>;
|
|
9
|
+
getUserOperationReceipt(useroperationhash: string): Promise<UserOperationReceiptResult>;
|
|
10
|
+
getUserOperationByHash(useroperationhash: string): Promise<UserOperationByHashResult>;
|
|
12
11
|
}
|
|
13
12
|
//# sourceMappingURL=Bundler.d.ts.map
|
package/dist/Bundler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bundler.d.ts","sourceRoot":"","sources":["../src/Bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,EACb,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"Bundler.d.ts","sourceRoot":"","sources":["../src/Bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,EACb,mBAAmB,EACnB,yBAAyB,EAEzB,0BAA0B,EAC1B,gBAAgB,EAEhB,MAAM,SAAS,CAAC;AAIjB,qBAAa,OAAO;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE,MAAM;IAQpB,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAgC1B,oBAAoB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IA4BzC,wBAAwB,CAC7B,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,MAAM,EACzB,kBAAkB,CAAC,EAAE,gBAAgB,GACnC,OAAO,CAAC,mBAAmB,CAAC;IA2CzB,iBAAiB,CACtB,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,MAAM,GACvB,OAAO,CAAC,MAAM,CAAC;IA0BZ,uBAAuB,CAC5B,iBAAiB,EAAE,MAAM,GACvB,OAAO,CAAC,0BAA0B,CAAC;IAyDhC,sBAAsB,CAC3B,iBAAiB,EAAE,MAAM,GACvB,OAAO,CAAC,yBAAyB,CAAC;CA+BrC"}
|
package/dist/abstractionkit.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export { SmartAccount } from "./account/SmartAccount";
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
2
|
+
export { SafeAccountV0_2_0 } from "./account/Safe/SafeAccountV0_2_0";
|
|
3
|
+
export { SafeAccountWebAuth } from "./account/Safe/SafeAccountWebAuth";
|
|
4
4
|
export { SendUseroperationResponse } from "./account/SendUseroperationResponse";
|
|
5
5
|
export { SmartAccountFactory } from "./factory/SmartAccountFactory";
|
|
6
6
|
export { SafeAccountFactory } from "./factory/SafeAccountFactory";
|
|
7
|
-
export { SimpleAccountFactory } from "./factory/SimpleAccountFactory";
|
|
8
7
|
export { Bundler } from "./Bundler";
|
|
9
|
-
export {
|
|
10
|
-
export { createUserOperationHash, createCallData, getFunctionSelector, fetchAccountNonce } from "./utils";
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export
|
|
8
|
+
export { CandidePaymaster } from "./paymaster/CandidePaymaster";
|
|
9
|
+
export { createUserOperationHash, createCallData, getFunctionSelector, fetchAccountNonce, calculateUserOperationMaxGasCost, } from "./utils";
|
|
10
|
+
export { CreateUserOperationOverrides, InitCodeOverrides, SafeModuleExecutorFunctionSelector, SafeUserOperationTypedDataDomain, SafeUserOperationTypedDataValues, WebauthPublicKey, DummySignature, WebauthSignatureData, SignerSignaturePair } from "./account/Safe/types";
|
|
11
|
+
export { CandidePaymasterContext, PrependTokenPaymasterApproveAccount, } from "./paymaster/types";
|
|
12
|
+
export { UserOperation, AbiInputValue, JsonRpcParam, JsonRpcResponse, JsonRpcResult, GasEstimationResult, UserOperationByHashResult, UserOperationReceipt, UserOperationReceiptResult, JsonRpcError, StateOverrideSet, Operation, MetaTransaction, } from "./types";
|
|
13
|
+
export { ZeroAddress, UserOperationDummyValues } from "./constants";
|
|
14
14
|
//# sourceMappingURL=abstractionkit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstractionkit.d.ts","sourceRoot":"","sources":["../src/abstractionkit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"abstractionkit.d.ts","sourceRoot":"","sources":["../src/abstractionkit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAEhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EACN,uBAAuB,EACvB,cAAc,EACd,mBAAmB,EACnB,iBAAiB,EACjB,gCAAgC,GAChC,MAAM,SAAS,CAAC;AAEjB,OAAO,EACN,4BAA4B,EAC5B,iBAAiB,EACjB,kCAAkC,EAClC,gCAAgC,EAChC,gCAAgC,EAChC,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACN,uBAAuB,EACvB,mCAAmC,GACnC,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,aAAa,EACb,aAAa,EACb,YAAY,EACZ,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,0BAA0B,EAC1B,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,eAAe,GACf,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,33 +1,37 @@
|
|
|
1
|
-
import { BytesLike } from "ethers";
|
|
2
1
|
import { SmartAccount } from "../SmartAccount";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { CreateUserOperationOverrides, InitCodeOverrides, MetaTransaction, SafeModuleExecutorFunctionSelector } from "./types";
|
|
2
|
+
import { MetaTransaction, Operation, UserOperation } from "../../types";
|
|
3
|
+
import { SafeModuleExecutorFunctionSelector } from "./types";
|
|
6
4
|
import { SendUseroperationResponse } from "../SendUseroperationResponse";
|
|
7
5
|
export declare class SafeAccount extends SmartAccount {
|
|
8
6
|
static readonly DEFAULT_ENTRYPOINT_ADDRESS = "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789";
|
|
9
|
-
static readonly DEFAULT_SAFE_4337_MODULE_ADDRESS = "
|
|
10
|
-
static readonly DEFAULT_SINGLETON_ADDRESS = "
|
|
11
|
-
static readonly DEFAULT_ADD_MODULE_LIB_ADDRESS = "
|
|
7
|
+
static readonly DEFAULT_SAFE_4337_MODULE_ADDRESS = "0xa581c4A4DB7175302464fF3C06380BC3270b4037";
|
|
8
|
+
static readonly DEFAULT_SINGLETON_ADDRESS = "0x29fcB43b46531BcA003ddC8FCB67FFE91900C762";
|
|
9
|
+
static readonly DEFAULT_ADD_MODULE_LIB_ADDRESS = "0x8EcD4ec46D4D2a6B64fE960B3D64e8B94B2234eb";
|
|
12
10
|
static readonly DEFAULT_MULTISEND_CONTRACT_ADDRESS = "0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526";
|
|
13
|
-
static readonly proxyByteCode:
|
|
11
|
+
static readonly proxyByteCode: string;
|
|
14
12
|
static readonly initializerFunctionSelector: string;
|
|
15
13
|
static readonly initializerFunctionInputAbi: string[];
|
|
16
14
|
static readonly DEFAULT_EXECUTOR_FUCNTION_SELECTOR = SafeModuleExecutorFunctionSelector.executeUserOpWithErrorString;
|
|
17
15
|
static readonly executorFunctionInputAbi: string[];
|
|
16
|
+
static readonly EIP712_SAFE_OPERATION_TYPE: {
|
|
17
|
+
SafeOp: {
|
|
18
|
+
type: string;
|
|
19
|
+
name: string;
|
|
20
|
+
}[];
|
|
21
|
+
};
|
|
18
22
|
readonly entrypointAddress: string;
|
|
19
23
|
readonly safe4337ModuleAddress: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
static
|
|
23
|
-
static
|
|
24
|
-
static
|
|
25
|
-
static
|
|
26
|
-
static
|
|
27
|
-
static
|
|
28
|
-
static
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
sendUserOperation(
|
|
24
|
+
protected initCode: string | null;
|
|
25
|
+
constructor(accountAddress: string, safe4337ModuleAddress?: string, entrypointAddress?: string);
|
|
26
|
+
static createProxyAddress(initializerCallData: string, c2Nonce: bigint, safeFactoryAddress: string, singletonAddress: string): string;
|
|
27
|
+
static createAccountCallDataSingleTransaction(metaTransaction: MetaTransaction): string;
|
|
28
|
+
static createAccountCallDataBatchTransactions(metaTransactions: MetaTransaction[], multisendContractAddress?: string): string;
|
|
29
|
+
static createAccountCallData(to: string, value: bigint, data: string, operation: Operation, safeModuleExecutorFunctionSelector?: SafeModuleExecutorFunctionSelector): string;
|
|
30
|
+
static decodeAccountCallData(callData: string): [string, bigint, string, number];
|
|
31
|
+
static prependTokenPaymasterApproveToCallDataStatic(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint, multisendContractAddress?: string): string;
|
|
32
|
+
static formatEip712SignaturesToUseroperationSignature(signersAddresses: string[], signatures: string[], validAfter?: bigint, validUntil?: bigint): string;
|
|
33
|
+
static getUserOperationEip712Hash(useroperation: UserOperation, chainId: bigint, validAfter: bigint | undefined, validUntil: bigint | undefined, entrypointAddress: string): string;
|
|
34
|
+
static formatEip712SingleSignatureToUseroperationSignature(signature: string, validAfter?: bigint, validUntil?: bigint): string;
|
|
35
|
+
sendUserOperation(userOperation: UserOperation, bundlerRpc: string): Promise<SendUseroperationResponse>;
|
|
32
36
|
}
|
|
33
37
|
//# sourceMappingURL=SafeAccount.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SafeAccount.d.ts","sourceRoot":"","sources":["../../../src/account/Safe/SafeAccount.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SafeAccount.d.ts","sourceRoot":"","sources":["../../../src/account/Safe/SafeAccount.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACN,eAAe,EACf,SAAS,EACT,aAAa,EACb,MAAM,aAAa,CAAC;AAMrB,OAAO,EACN,kCAAkC,EAGlC,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EACV,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,SAAS,EACpB,kCAAkC,GAAE,kCAAmF,GACrH,MAAM;WAcK,qBAAqB,CAClC,QAAQ,EAAE,MAAM,GACd,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;WA4CrB,4CAA4C,CACzD,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,MAAM,EACxB,aAAa,EAAE,MAAM,EACrB,wBAAwB,GAAE,MAAuD,GAC/E,MAAM;WAyEK,8CAA8C,CAC3D,gBAAgB,EAAE,MAAM,EAAE,EAC1B,UAAU,EAAE,MAAM,EAAE,EACpB,UAAU,GAAE,MAAW,EACvB,UAAU,GAAE,MAAW,GACrB,MAAM;WA4BK,0BAA0B,CACvC,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAC,MAAM,EACd,UAAU,oBAAa,EACvB,UAAU,oBAAa,EACvB,iBAAiB,EAAE,MAAM,GACtB,MAAM;WAoCI,mDAAmD,CAChE,SAAS,EAAE,MAAM,EACjB,UAAU,GAAE,MAAW,EACvB,UAAU,GAAE,MAAW,GACrB,MAAM;IAoBI,iBAAiB,CAC7B,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,MAAM,GAChB,OAAO,CAAC,yBAAyB,CAAC;CAarC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SafeAccount } from "./SafeAccount";
|
|
2
|
+
import { MetaTransaction, StateOverrideSet, UserOperation } from "../../types";
|
|
3
|
+
import { CreateUserOperationOverrides, InitCodeOverrides } from "./types";
|
|
4
|
+
import { SafeAccountFactory } from "src/factory/SafeAccountFactory";
|
|
5
|
+
export declare class SafeAccountV0_2_0 extends SafeAccount {
|
|
6
|
+
constructor(accountAddress: string, safe4337ModuleAddress?: string, entrypointAddress?: string);
|
|
7
|
+
static initializeNewAccount(owners: string[], overrides?: InitCodeOverrides): SafeAccountV0_2_0;
|
|
8
|
+
static createAccountAddress(owners: string[], overrides?: InitCodeOverrides): string;
|
|
9
|
+
static createAccountAddressAndInitCode(owners: string[], overrides?: InitCodeOverrides): [string, string];
|
|
10
|
+
protected static createInitializerCallData(owners: string[], threshold: number, safe4337ModuleAddress?: string, addModuleLibAddress?: string): string;
|
|
11
|
+
static createInitCode(owners: string[], threshold?: number, c2Nonce?: bigint, singletonAddress?: string, safeAccountFactory?: SafeAccountFactory, safe4337ModuleAddress?: string, addModuleLibAddress?: string): string;
|
|
12
|
+
prependTokenPaymasterApproveToCallData(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint, multisendContractAddress?: string): string;
|
|
13
|
+
estimateUserOperationGas(userOperation: UserOperation, bundlerRpc: string, state_override_set?: StateOverrideSet, numberOfSigners?: number): Promise<[bigint, bigint, bigint]>;
|
|
14
|
+
createUserOperation(transactions: MetaTransaction[], providerRpc?: string, bundlerRpc?: string, overrids?: CreateUserOperationOverrides): Promise<UserOperation>;
|
|
15
|
+
signUserOperation(useroperation: UserOperation, privateKeys: string[], chainId: bigint, validAfter?: bigint, validUntil?: bigint): string;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=SafeAccountV0_2_0.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SafeAccountV0_2_0.d.ts","sourceRoot":"","sources":["../../../src/account/Safe/SafeAccountV0_2_0.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACN,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,MAAM,aAAa,CAAC;AAOrB,OAAO,EACN,4BAA4B,EAC5B,iBAAiB,EACjB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,qBAAa,iBAAkB,SAAQ,WAAW;gBAGhD,cAAc,EAAE,MAAM,EACtB,qBAAqB,GAAE,MAA2D,EAClF,i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aAAa,EAC5B,WAAW,EAAE,MAAM,EAAE,EACrB,OAAO,EAAE,MAAM,EACf,UAAU,GAAE,MAAW,EACvB,UAAU,GAAE,MAAW,GACrB,MAAM;CAwCT"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SafeAccount } from "./SafeAccount";
|
|
2
|
+
import { MetaTransaction, StateOverrideSet, UserOperation } from "../../types";
|
|
3
|
+
import { CreateUserOperationOverrides, DummySignature, InitCodeOverrides, Signer, SignerSignaturePair, WebauthSignatureData } from "./types";
|
|
4
|
+
import { SafeAccountFactory } from "src/factory/SafeAccountFactory";
|
|
5
|
+
export declare class SafeAccountWebAuth extends SafeAccount {
|
|
6
|
+
static readonly DEFAULT_WEB_AUTHN_SIGNATURE_VALIDATOR_SINGLETON: string;
|
|
7
|
+
static readonly DEFAULT_WEB_AUTHN_SIGNER_FACTORY: string;
|
|
8
|
+
static readonly DEFAULT_WEB_AUTHN_VERIFIER: string;
|
|
9
|
+
static readonly DEFAULT_SIGNATURE_VALIDATOR = "0x21E4747C7215fe6E343376034F08261bBD9ac497";
|
|
10
|
+
static readonly DEFAULT_WEB_AUTHN_SIGNER_CREATION_CODE = "0x608060405234801561001057600080fd5b5060405161017238038061017283398101604081905261002f916100b9565b6001600160a01b0381166100945760405162461bcd60e51b815260206004820152602260248201527f496e76616c69642073696e676c65746f6e20616464726573732070726f766964604482015261195960f21b606482015260840160405180910390fd5b600080546001600160a01b0319166001600160a01b03929092169190911790556100e9565b6000602082840312156100cb57600080fd5b81516001600160a01b03811681146100e257600080fd5b9392505050565b607b806100f76000396000f3fe608060405260008054632cf35bc960e11b8235016027576001600160f41b0381168252602082f35b3682833781823684845af490503d82833e806040573d82fd5b503d81f3fea264697066735822122062f4785a59897477a798d8218290ac5cf89f803649d66b453fa58689dd461e3164736f6c63430008140033";
|
|
11
|
+
private isInitWebAuthn;
|
|
12
|
+
private x;
|
|
13
|
+
private y;
|
|
14
|
+
constructor(accountAddress: string, safe4337ModuleAddress?: string, entrypointAddress?: string);
|
|
15
|
+
static initializeNewAccount(owners: Signer[], overrides?: InitCodeOverrides): SafeAccountWebAuth;
|
|
16
|
+
static createAccountAddress(owners: Signer[], overrides?: InitCodeOverrides): string;
|
|
17
|
+
static createAccountAddressAndInitCode(owners: Signer[], overrides?: InitCodeOverrides): [string, string];
|
|
18
|
+
protected static createInitializerCallData(owners: Signer[], threshold: number, safe4337ModuleAddress?: string, addModuleLibAddress?: string): string;
|
|
19
|
+
static createInitCode(owners: Signer[], threshold?: number, c2Nonce?: bigint, singletonAddress?: string, safeAccountFactory?: SafeAccountFactory, safe4337ModuleAddress?: string, addModuleLibAddress?: string): string;
|
|
20
|
+
prependTokenPaymasterApproveToCallData(callData: string, tokenAddress: string, paymasterAddress: string, approveAmount: bigint, multisendContractAddress?: string): string;
|
|
21
|
+
estimateUserOperationGas(userOperation: UserOperation, bundlerRpc: string, state_override_set?: StateOverrideSet, numberOfSigners?: number, dummySingatures?: DummySignature[] | null): Promise<[bigint, bigint, bigint]>;
|
|
22
|
+
createUserOperation(transactions: MetaTransaction[], providerRpc?: string, bundlerRpc?: string, overrids?: CreateUserOperationOverrides): Promise<UserOperation>;
|
|
23
|
+
signUserOperation(useroperation: UserOperation, privateKeys: string[], chainId: bigint, validAfter?: bigint, validUntil?: bigint): string;
|
|
24
|
+
static createWebAuthnSignerVerifierAddress(x: bigint, y: bigint): string;
|
|
25
|
+
static formatSignaturesToUseroperationSignature(signatures: SignerSignaturePair[], isInit?: boolean | null, validAfter?: bigint, validUntil?: bigint): string;
|
|
26
|
+
static getLowerCaseAddress(signer: Signer): string;
|
|
27
|
+
static sortSignatures(signatures: SignerSignaturePair[]): void;
|
|
28
|
+
static buildSignatures(signatures: SignerSignaturePair[], isInit?: boolean | null): string;
|
|
29
|
+
static createWebAuthnSignature(signatureData: WebauthSignatureData): string;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=SafeAccountWebAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
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AAW,GACrB,MAAM;WAYK,mBAAmB,CAAC,MAAM,EAAC,MAAM,GAAE,MAAM;WAWxC,cAAc,CAAC,UAAU,EAAE,mBAAmB,EAAE;WAIjD,eAAe,CAAC,UAAU,EAAE,mBAAmB,EAAE,EAAE,MAAM,GAAC,OAAO,GAAE,IAAW,GAAG,MAAM;WA4CvF,uBAAuB,CAAC,aAAa,EAAC,oBAAoB,GAAE,MAAM;CAWhF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { MetaTransaction } from "
|
|
2
|
-
export declare function encodeMultiSendCallData(
|
|
1
|
+
import { MetaTransaction } from "src/types";
|
|
2
|
+
export declare function encodeMultiSendCallData(metaTransactions: MetaTransaction[]): string;
|
|
3
|
+
export declare function decodeMultiSendCallData(callData: string): string;
|
|
3
4
|
//# sourceMappingURL=multisend.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multisend.d.ts","sourceRoot":"","sources":["../../../src/account/Safe/multisend.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"multisend.d.ts","sourceRoot":"","sources":["../../../src/account/Safe/multisend.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAa,MAAM,WAAW,CAAC;AAuBvD,wBAAgB,uBAAuB,CACtC,gBAAgB,EAAE,eAAe,EAAE,GACjC,MAAM,CAIR;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIhE"}
|
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { Operation } from "../../types";
|
|
3
|
-
export interface MetaTransactionInput {
|
|
4
|
-
to: string;
|
|
5
|
-
value?: bigint;
|
|
6
|
-
data?: BytesLike;
|
|
7
|
-
operation?: Operation;
|
|
8
|
-
}
|
|
9
|
-
export interface MetaTransaction {
|
|
10
|
-
to: string;
|
|
11
|
-
value: bigint;
|
|
12
|
-
data: BytesLike;
|
|
13
|
-
operation?: Operation;
|
|
14
|
-
}
|
|
1
|
+
import type { StateOverrideSet } from "../../types";
|
|
15
2
|
export interface CreateUserOperationOverrides {
|
|
16
3
|
nonce?: bigint;
|
|
17
|
-
initCode?:
|
|
18
|
-
callData?:
|
|
4
|
+
initCode?: string;
|
|
5
|
+
callData?: string;
|
|
19
6
|
callGasLimit?: bigint;
|
|
20
7
|
verificationGasLimit?: bigint;
|
|
21
8
|
preVerificationGas?: bigint;
|
|
22
9
|
maxFeePerGas?: bigint;
|
|
23
10
|
maxPriorityFeePerGas?: bigint;
|
|
11
|
+
callGasLimitPercentageMultiplier?: number;
|
|
12
|
+
verificationGasLimitPercentageMultiplier?: number;
|
|
13
|
+
preVerificationGasPercentageMultiplier?: number;
|
|
14
|
+
maxFeePerGasPercentageMultiplier?: number;
|
|
15
|
+
maxPriorityFeePerGasPercentageMultiplier?: number;
|
|
16
|
+
numberOfSigners?: number;
|
|
17
|
+
state_override_set?: StateOverrideSet;
|
|
18
|
+
dummySingatures?: DummySignature[] | null;
|
|
24
19
|
}
|
|
25
20
|
export interface InitCodeOverrides {
|
|
26
21
|
threshold?: number;
|
|
@@ -34,4 +29,44 @@ export declare enum SafeModuleExecutorFunctionSelector {
|
|
|
34
29
|
executeUserOpWithErrorString = "0x541d63c8",
|
|
35
30
|
executeUserOp = "0x7bb37428"
|
|
36
31
|
}
|
|
32
|
+
export interface SafeUserOperationTypedDataDomain {
|
|
33
|
+
chainId: bigint;
|
|
34
|
+
verifyingContract: string;
|
|
35
|
+
}
|
|
36
|
+
export interface SafeUserOperationTypedDataValues {
|
|
37
|
+
safe: string;
|
|
38
|
+
nonce: bigint;
|
|
39
|
+
initCode: string;
|
|
40
|
+
callData: string;
|
|
41
|
+
callGasLimit: bigint;
|
|
42
|
+
verificationGasLimit: bigint;
|
|
43
|
+
preVerificationGas: bigint;
|
|
44
|
+
maxFeePerGas: bigint;
|
|
45
|
+
maxPriorityFeePerGas: bigint;
|
|
46
|
+
paymasterAndData: string;
|
|
47
|
+
validAfter: bigint;
|
|
48
|
+
validUntil: bigint;
|
|
49
|
+
entryPoint: string;
|
|
50
|
+
}
|
|
51
|
+
export type ECDSAPublicAddress = string;
|
|
52
|
+
export interface WebauthPublicKey {
|
|
53
|
+
x: bigint;
|
|
54
|
+
y: bigint;
|
|
55
|
+
}
|
|
56
|
+
export type Signer = ECDSAPublicAddress | WebauthPublicKey;
|
|
57
|
+
export declare enum DummySignature {
|
|
58
|
+
eoa = "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
|
59
|
+
webauth = "ca66c5a0eeab0fe74f343bb4a539042c68ae45f90000000000000000000000000000000000000000000000000000000000000041000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e01e638dbc81c4fc4402ae3c845dd5c7dd76f1abb5ebe281abad04ee9b2d93bbd0b743b83bc1ce08fa3a821dcd3e59903fd5399bd1379c1a34ad9fc2444c425e3b0000000000000000000000000000000000000000000000000000000000000025a24f744b28d73f066bf3203d145765a7bc735e6328168c8b03e476da3ad0d8fe0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e226f726967696e223a2268747470733a2f2f736166652e676c6f62616c220000"
|
|
60
|
+
}
|
|
61
|
+
export type ECDSASignature = string;
|
|
62
|
+
export interface WebauthSignatureData {
|
|
63
|
+
authenticatorData: ArrayBuffer;
|
|
64
|
+
clientDataFields: string;
|
|
65
|
+
rs: [bigint, bigint];
|
|
66
|
+
}
|
|
67
|
+
export interface SignerSignaturePair {
|
|
68
|
+
signer: Signer;
|
|
69
|
+
signature: string;
|
|
70
|
+
isContractSignature?: boolean;
|
|
71
|
+
}
|
|
37
72
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/account/Safe/types.ts"],"names":[],"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AAiB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,gCAAgC;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAA;AAEvC,MAAM,WAAW,gBAAgB;IAC7B,CAAC,EAAC,MAAM,CAAC;IACT,CAAC,EAAC,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,MAAM,GAAG,kBAAkB,GAAG,gBAAgB,CAAA;AAE1D,oBAAY,cAAc;IACzB,GAAG,uIAAuI;IAC1I,OAAO,+uBAA+uB;CACtvB;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,CAAA;AAEnC,MAAM,WAAW,oBAAoB;IACjC,iBAAiB,EAAE,WAAW,CAAA;IAC9B,gBAAgB,EAAE,MAAM,CAAA;IACxB,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACvB;AAED,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC7B"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Bundler } from "src/Bundler";
|
|
2
|
-
import {
|
|
2
|
+
import { UserOperationReceiptResult } from "src/types";
|
|
3
3
|
export declare class SendUseroperationResponse {
|
|
4
4
|
readonly userOperationHash: string;
|
|
5
5
|
readonly bundler: Bundler;
|
|
6
6
|
readonly entrypointAddress: string;
|
|
7
7
|
constructor(userOperationHash: string, bundler: Bundler, entrypointAddress: string);
|
|
8
8
|
private delay;
|
|
9
|
-
included(timeoutInSeconds?: number, requestIntervalInSeconds?: number): Promise<UserOperationReceiptResult
|
|
9
|
+
included(timeoutInSeconds?: number, requestIntervalInSeconds?: number): Promise<UserOperationReceiptResult>;
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=SendUseroperationResponse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendUseroperationResponse.d.ts","sourceRoot":"","sources":["../../src/account/SendUseroperationResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"SendUseroperationResponse.d.ts","sourceRoot":"","sources":["../../src/account/SendUseroperationResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAEvD,qBAAa,yBAAyB;IACrC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;gBAGlC,iBAAiB,EAAE,MAAM,EACzB,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAE,MAAM;IAO1B,OAAO,CAAC,KAAK;IAWP,QAAQ,CACb,gBAAgB,GAAE,MAAY,EAC9B,wBAAwB,GAAE,MAAU,GAClC,OAAO,CAAC,0BAA0B,CAAC;CA2BtC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export declare class SmartAccount {
|
|
1
|
+
export declare abstract class SmartAccount {
|
|
3
2
|
readonly accountAddress: string;
|
|
4
|
-
static readonly proxyByteCode:
|
|
3
|
+
static readonly proxyByteCode: string;
|
|
5
4
|
static readonly initializerFunctionSelector: string;
|
|
6
5
|
static readonly initializerFunctionInputAbi: string[];
|
|
7
6
|
static readonly executorFunctionSelector: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmartAccount.d.ts","sourceRoot":"","sources":["../../src/account/SmartAccount.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"SmartAccount.d.ts","sourceRoot":"","sources":["../../src/account/SmartAccount.ts"],"names":[],"mappings":"AAAA,8BAAsB,YAAY;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IACtC,MAAM,CAAC,QAAQ,CAAC,2BAA2B,EAAE,MAAM,CAAC;IACpD,MAAM,CAAC,QAAQ,CAAC,2BAA2B,EAAE,MAAM,EAAE,CAAC;IACtD,MAAM,CAAC,QAAQ,CAAC,wBAAwB,EAAE,MAAM,CAAC;IACjD,MAAM,CAAC,QAAQ,CAAC,wBAAwB,EAAE,MAAM,EAAE,CAAC;gBAEvC,cAAc,EAAE,MAAM;CAGlC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare const
|
|
1
|
+
import { type UserOperation } from "./types";
|
|
2
|
+
export declare const ZeroAddress = "0x0000000000000000000000000000000000000000";
|
|
3
3
|
export declare const UserOperationDummyValues: UserOperation;
|
|
4
4
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,WAAW,+CAA+C,CAAC;AAExE,eAAO,MAAM,wBAAwB,EAAE,aAatC,CAAC"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Dictionary } from "./types";
|
|
2
|
+
export type BasicErrorCode = "UNKNOWN_ERROR" | "TIMEOUT" | "BAD_DATA" | "BUNDLER_ERROR" | "PAYMASTER_ERROR";
|
|
3
|
+
export type BundlerErrorCode = "INVALID_FIELDS" | "SIMULATE_VALIDATION" | "SIMULATE_PAYMASTER_VALIDATION" | "OPCODE_VALIDATION" | "EXPIRE_SHORTLY" | "REPUTATION" | "INSUFFICIENT_STAKE" | "UNSUPPORTED_SIGNATURE_AGGREGATOR" | "INVALID_SIGNATURE" | "INVALID_USEROPERATION_HASH" | "EXECUTION_REVERTED";
|
|
4
|
+
export type JsonRpcErrorCode = "PARSE_ERROR" | "INVALID_REQUEST" | "METHOD_NOT_FOUND" | "INVALID_PARAMS" | "INTERNAL_ERROR" | "SERVER_ERROR";
|
|
5
|
+
export declare const BundlerErrorCodeDict: Dictionary<BundlerErrorCode>;
|
|
6
|
+
export declare const JsonRpcErrorDict: Dictionary<JsonRpcErrorCode>;
|
|
7
|
+
type Jsonable = string | number | boolean | null | undefined | readonly Jsonable[] | {
|
|
8
|
+
readonly [key: string]: Jsonable;
|
|
9
|
+
} | {
|
|
10
|
+
toJSON(): Jsonable;
|
|
11
|
+
};
|
|
12
|
+
export declare class AbstractionKitError extends Error {
|
|
13
|
+
readonly code: BundlerErrorCode | BasicErrorCode | JsonRpcErrorCode;
|
|
14
|
+
readonly context?: Jsonable;
|
|
15
|
+
readonly errno?: number;
|
|
16
|
+
constructor(code: BundlerErrorCode | BasicErrorCode | JsonRpcErrorCode, message: string, options?: {
|
|
17
|
+
cause?: Error;
|
|
18
|
+
errno?: number;
|
|
19
|
+
context?: Jsonable;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export declare function ensureError(value: unknown): Error;
|
|
23
|
+
export {};
|
|
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E,KAAK,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,QAAQ,CAAA;KAAO;CAWpE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAcjD"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { BytesLike } from "ethers";
|
|
2
1
|
import type { AbiInputValue } from "../types";
|
|
3
2
|
export declare class SmartAccountFactory {
|
|
4
3
|
readonly address: string;
|
|
5
4
|
readonly generatorFunctionSelector: string;
|
|
6
5
|
readonly generatorFunctionInputAbi: string[];
|
|
7
6
|
constructor(address: string, generatorFunctionSelector: string, generatorFunctionInputAbi: string[]);
|
|
8
|
-
getFactoryGeneratorFunctionCallData(generatorFunctionInputParameters: AbiInputValue[]):
|
|
7
|
+
getFactoryGeneratorFunctionCallData(generatorFunctionInputParameters: AbiInputValue[]): string;
|
|
9
8
|
}
|
|
10
9
|
//# sourceMappingURL=SmartAccountFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmartAccountFactory.d.ts","sourceRoot":"","sources":["../../src/factory/SmartAccountFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"SmartAccountFactory.d.ts","sourceRoot":"","sources":["../../src/factory/SmartAccountFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,qBAAa,mBAAmB;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC;IAC3C,QAAQ,CAAC,yBAAyB,EAAE,MAAM,EAAE,CAAC;gBAG5C,OAAO,EAAE,MAAM,EACf,yBAAyB,EAAE,MAAM,EACjC,yBAAyB,EAAE,MAAM,EAAE;IAOpC,mCAAmC,CAClC,gCAAgC,EAAE,aAAa,EAAE,GAC/C,MAAM;CAUT"}
|