abstractionkit 0.0.8 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -5
- package/dist/Bundler.d.ts +8 -16
- package/dist/Bundler.d.ts.map +1 -1
- package/dist/abstractionkit.d.ts +6 -10
- package/dist/abstractionkit.d.ts.map +1 -1
- package/dist/account/Safe/SafeAccountV0_2_0.d.ts +36 -0
- package/dist/account/Safe/SafeAccountV0_2_0.d.ts.map +1 -0
- package/dist/account/Safe/multisend.d.ts +4 -0
- package/dist/account/Safe/multisend.d.ts.map +1 -0
- package/dist/account/Safe/types.d.ts +26 -0
- package/dist/account/Safe/types.d.ts.map +1 -0
- package/dist/account/SendUseroperationResponse.d.ts +11 -0
- package/dist/account/SendUseroperationResponse.d.ts.map +1 -0
- package/dist/account/SmartAccount.d.ts +9 -12
- 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/SafeAccountFactory.d.ts +5 -0
- package/dist/factory/SafeAccountFactory.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 +22 -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 +4 -0
- package/dist/paymaster/types.d.ts.map +1 -0
- package/dist/types.d.ts +72 -44
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +8 -6
- package/dist/utils.d.ts.map +1 -1
- package/package.json +4 -3
- package/dist/account/Candide/CandideAccount.d.ts +0 -21
- package/dist/account/Candide/CandideAccount.d.ts.map +0 -1
- package/dist/account/Candide/multisend.d.ts +0 -3
- package/dist/account/Candide/multisend.d.ts.map +0 -1
- package/dist/account/Candide/types.d.ts +0 -9
- package/dist/account/Candide/types.d.ts.map +0 -1
- package/dist/account/SimpleAccount.d.ts +0 -17
- package/dist/account/SimpleAccount.d.ts.map +0 -1
- package/dist/factory/CandideAccountFactory.d.ts +0 -5
- package/dist/factory/CandideAccountFactory.d.ts.map +0 -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/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "Candidelabs",
|
|
5
5
|
"url": "https://candide.dev"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.0
|
|
7
|
+
"version": "0.1.0",
|
|
8
8
|
"description": "Account Abstraction 4337 SDK by Candidelabs",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"module": "dist/index.m.js",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "rm -rf dist && microbundle --tsconfig tsconfig.json --no-sourcemap",
|
|
15
15
|
"clean": "rm -rf dist",
|
|
16
|
-
"format": "prettier --write src/**/*.ts",
|
|
17
|
-
"lint": "eslint src/**/*.ts",
|
|
16
|
+
"format": "prettier --write src/*.ts src/**/*.ts src/**/**/*.ts",
|
|
17
|
+
"lint": "eslint -f unix \"src/**/*.{ts,tsx}\"",
|
|
18
18
|
"prepare": "husky install"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
|
47
47
|
"@typescript-eslint/parser": "^6.2.0",
|
|
48
48
|
"eslint": "^8.46.0",
|
|
49
|
+
"eslint-plugin-tsdoc": "^0.2.17",
|
|
49
50
|
"husky": ">=6",
|
|
50
51
|
"lint-staged": ">=10",
|
|
51
52
|
"microbundle": "^0.15.1",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SmartAccount } from "../SmartAccount";
|
|
2
|
-
import type { BigNumberish, BytesLike } from "ethers";
|
|
3
|
-
import { Operation } from "../../types";
|
|
4
|
-
import { SmartAccountFactory } from "../../factory/SmartAccountFactory";
|
|
5
|
-
import { MetaTransaction } from "./types";
|
|
6
|
-
export declare class CandideAccount extends SmartAccount {
|
|
7
|
-
readonly entrypointAddress: string;
|
|
8
|
-
readonly candideAccountFactory: SmartAccountFactory;
|
|
9
|
-
constructor(singletonAddress?: string, entrypointAddress?: string, candideAccountFactory?: SmartAccountFactory);
|
|
10
|
-
createNewAccount(owners: string[], threshold?: BigNumberish): [string, BytesLike];
|
|
11
|
-
createNewAccount(owners: string[], threshold: BigNumberish, c2nonce: BigNumberish): [string, BytesLike];
|
|
12
|
-
createNewAccount(owners: string[], threshold: BigNumberish, c2nonce: BigNumberish, fallbackHandler: string): [string, BytesLike];
|
|
13
|
-
createSendEthCallData(to: string, value: BigNumberish): BytesLike;
|
|
14
|
-
createCallData(to: string, value: BigNumberish, data: BytesLike, operation: Operation, paymaster: string, approveToken: string, approveAmount: BigNumberish): BytesLike;
|
|
15
|
-
getProxyAddress(initializerCallData: BytesLike, factoryAddress: string, c2Nonce: BigNumberish): string;
|
|
16
|
-
createCallDataSingleTransactionWithPaymaster(tx: MetaTransaction, paymaster: string, approveToken: string, approveAmount: BigNumberish): BytesLike;
|
|
17
|
-
createCallDataSingleTransaction(tx: MetaTransaction): BytesLike;
|
|
18
|
-
createCallDataBatchTransactionWithPaymaster(txs: MetaTransaction[], paymaster: string, approveToken: string, approveAmount: BigNumberish): BytesLike;
|
|
19
|
-
createCallDataBatchTransaction(txs: MetaTransaction[]): BytesLike;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=CandideAccount.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CandideAccount.d.ts","sourceRoot":"","sources":["../../../src/account/Candide/CandideAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AASxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAI1C,qBAAa,cAAe,SAAQ,YAAY;IAC/C,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,qBAAqB,EAAE,mBAAmB,CAAC;gBAGnD,gBAAgB,GAAE,MAAqD,EACvE,iBAAiB,GAAE,MAAqD,EACxE,qBAAqB,GAAE,mBAAiD;IAuCzE,gBAAgB,CACf,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,CAAC,EAAE,YAAY,GACtB,CAAC,MAAM,EAAE,SAAS,CAAC;IACtB,gBAAgB,CACf,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,YAAY,GACnB,CAAC,MAAM,EAAE,SAAS,CAAC;IACtB,gBAAgB,CACf,MAAM,EAAE,MAAM,EAAE,EAChB,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,YAAY,EACrB,eAAe,EAAE,MAAM,GACrB,CAAC,MAAM,EAAE,SAAS,CAAC;IA2CtB,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,SAAS;IAIjE,cAAc,CACb,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,YAAY,GACzB,SAAS;IAaZ,eAAe,CACd,mBAAmB,EAAE,SAAS,EAC9B,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,YAAY,GACnB,MAAM;IAsBT,4CAA4C,CAC3C,EAAE,EAAE,eAAe,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,YAAY,GACzB,SAAS;IAaZ,+BAA+B,CAC9B,EAAE,EAAE,eAAe,GAChB,SAAS;IAKb,2CAA2C,CAC1C,GAAG,EAAE,eAAe,EAAE,EACtB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,YAAY,GACxB,SAAS;IAwBb,8BAA8B,CAC7B,GAAG,EAAE,eAAe,EAAE,GACnB,SAAS;CAIb"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"multisend.d.ts","sourceRoot":"","sources":["../../../src/account/Candide/multisend.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAW1C,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,MAAM,CAEtE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/account/Candide/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,YAAY,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,SAAS,CAAC;CACxB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SmartAccount } from "./SmartAccount";
|
|
2
|
-
import type { BigNumberish, BytesLike } from "ethers";
|
|
3
|
-
import { SimpleAccountFactory } from "../factory/SimpleAccountFactory";
|
|
4
|
-
import { SmartAccountFactory } from "../factory/SmartAccountFactory";
|
|
5
|
-
export declare class SimpleAccount extends SmartAccount {
|
|
6
|
-
readonly entrypointAddress: string;
|
|
7
|
-
readonly simpleAccountFactory: SimpleAccountFactory;
|
|
8
|
-
readonly batchExecutorFunctionSelector: string;
|
|
9
|
-
readonly batchExecutorFunctionInputAbi: string[];
|
|
10
|
-
constructor(singletonAddress?: string, entrypointAddress?: string, simpleAccountFactory?: SmartAccountFactory);
|
|
11
|
-
createNewAccount(owner: string, c2nonce?: BigNumberish): [string, BytesLike];
|
|
12
|
-
getProxyAddress(initializerCallData: BytesLike, factoryAddress: string, c2Nonce: BigNumberish): string;
|
|
13
|
-
createSendEthCallData(to: string, value: BigNumberish): BytesLike;
|
|
14
|
-
createCallData(to: string, value: BigNumberish, data: BytesLike): BytesLike;
|
|
15
|
-
createBatchCallData(to_list: string[], data_list: BytesLike[]): BytesLike;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=SimpleAccount.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleAccount.d.ts","sourceRoot":"","sources":["../../src/account/SimpleAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAO9C,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAIrE,qBAAa,aAAc,SAAQ,YAAY;IAC9C,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IACpD,QAAQ,CAAC,6BAA6B,EAAE,MAAM,CAAC;IAC/C,QAAQ,CAAC,6BAA6B,EAAE,MAAM,EAAE,CAAC;gBAGhD,gBAAgB,GAAE,MAAqD,EACvE,iBAAiB,GAAE,MAAqD,EACxE,oBAAoB,GAAE,mBAAgD;IA4BvE,gBAAgB,CACf,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,YAAgB,GACvB,CAAC,MAAM,EAAE,SAAS,CAAC;IA2BtB,eAAe,CACd,mBAAmB,EAAE,SAAS,EAC9B,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,YAAY,GACnB,MAAM;IAoBT,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,SAAS;IAIjE,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,GAAG,SAAS;IAS3E,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,SAAS;CASzE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CandideAccountFactory.d.ts","sourceRoot":"","sources":["../../src/factory/CandideAccountFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,qBAAa,qBAAsB,SAAQ,mBAAmB;gBACjD,OAAO,GAAE,MAAqD;CAK1E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleAccountFactory.d.ts","sourceRoot":"","sources":["../../src/factory/SimpleAccountFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,qBAAa,oBAAqB,SAAQ,mBAAmB;gBAChD,OAAO,GAAE,MAAqD;CAK1E"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Paymaster } from "./Paymaster";
|
|
2
|
-
import { UserOperation, JsonRpcError, SupportedERC20Tokens, PmSponsorUserOperationResult } from "../types";
|
|
3
|
-
export declare class CandideValidationPaymaster extends Paymaster {
|
|
4
|
-
readonly rpcUrl: string;
|
|
5
|
-
readonly entrypointAddress: string;
|
|
6
|
-
constructor(entrypointAddress: string, rpcUrl: string);
|
|
7
|
-
getSupportedERC20Tokens(): Promise<SupportedERC20Tokens | JsonRpcError>;
|
|
8
|
-
getSupportedEntrypoint(): Promise<string | JsonRpcError>;
|
|
9
|
-
getPaymasterCallDataForPayingGasWithErc20(userOperation: UserOperation, erc20TokenAddress: string): Promise<PmSponsorUserOperationResult | JsonRpcError>;
|
|
10
|
-
getPaymasterCallDataForGaslessTx(userOperation: UserOperation): Promise<PmSponsorUserOperationResult | JsonRpcError>;
|
|
11
|
-
getPaymasterCallData(userOperation: UserOperation, config: string[]): Promise<PmSponsorUserOperationResult | JsonRpcError>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=CandideValidationPaymaster.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CandideValidationPaymaster.d.ts","sourceRoot":"","sources":["../../src/paymaster/CandideValidationPaymaster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EACN,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,4BAA4B,EAC5B,MAAM,UAAU,CAAC;AAElB,qBAAa,0BAA2B,SAAQ,SAAS;IACxD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;gBAEvB,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAM/C,uBAAuB,IAAI,OAAO,CACvC,oBAAoB,GAAG,YAAY,CACnC;IAeK,sBAAsB,IAAI,OAAO,CAAC,MAAM,GAAG,YAAY,CAAC;IAcxD,yCAAyC,CAC9C,aAAa,EAAE,aAAa,EAC5B,iBAAiB,EAAE,MAAM,GACvB,OAAO,CAAC,4BAA4B,GAAG,YAAY,CAAC;IAMjD,gCAAgC,CACrC,aAAa,EAAE,aAAa,GAC1B,OAAO,CAAC,4BAA4B,GAAG,YAAY,CAAC;IAMjD,oBAAoB,CACzB,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM,EAAE,GACd,OAAO,CAAC,4BAA4B,GAAG,YAAY,CAAC;CAiBvD"}
|