@account-kit/infra 4.0.0-alpha.6 → 4.0.0-alpha.8
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/cjs/client/decorators/alchemyEnhancedApis.d.ts +1132 -1276
- package/dist/cjs/client/internal/smartAccountClientFromRpc.js +2 -14
- package/dist/cjs/client/internal/smartAccountClientFromRpc.js.map +1 -1
- package/dist/cjs/client/isAlchemySmartAccountClient.d.ts +1132 -1276
- package/dist/cjs/client/smartAccountClient.d.ts +2 -3
- package/dist/cjs/client/smartAccountClient.js +2 -2
- package/dist/cjs/client/smartAccountClient.js.map +1 -1
- package/dist/cjs/client/types.d.ts +1 -48
- package/dist/cjs/client/types.js.map +1 -1
- package/dist/cjs/middleware/gasManager.d.ts +2 -29
- package/dist/cjs/middleware/gasManager.js +4 -146
- package/dist/cjs/middleware/gasManager.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/client/decorators/alchemyEnhancedApis.d.ts +1132 -1276
- package/dist/esm/client/internal/smartAccountClientFromRpc.js +2 -14
- package/dist/esm/client/internal/smartAccountClientFromRpc.js.map +1 -1
- package/dist/esm/client/isAlchemySmartAccountClient.d.ts +1132 -1276
- package/dist/esm/client/smartAccountClient.d.ts +2 -3
- package/dist/esm/client/smartAccountClient.js +2 -3
- package/dist/esm/client/smartAccountClient.js.map +1 -1
- package/dist/esm/client/types.d.ts +1 -48
- package/dist/esm/client/types.js.map +1 -1
- package/dist/esm/middleware/gasManager.d.ts +2 -29
- package/dist/esm/middleware/gasManager.js +5 -147
- package/dist/esm/middleware/gasManager.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/client/decorators/alchemyEnhancedApis.d.ts +1132 -1276
- package/dist/types/client/decorators/alchemyEnhancedApis.d.ts.map +1 -1
- package/dist/types/client/isAlchemySmartAccountClient.d.ts +1132 -1276
- package/dist/types/client/isAlchemySmartAccountClient.d.ts.map +1 -1
- package/dist/types/client/smartAccountClient.d.ts +2 -3
- package/dist/types/client/smartAccountClient.d.ts.map +1 -1
- package/dist/types/client/types.d.ts +1 -48
- package/dist/types/client/types.d.ts.map +1 -1
- package/dist/types/middleware/gasManager.d.ts +15 -87
- package/dist/types/middleware/gasManager.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/client/internal/smartAccountClientFromRpc.ts +2 -18
- package/src/client/smartAccountClient.ts +4 -5
- package/src/client/types.ts +1 -54
- package/src/middleware/gasManager.ts +20 -432
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isAlchemySmartAccountClient.d.ts","sourceRoot":"","sources":["../../../src/client/isAlchemySmartAccountClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAGrD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"isAlchemySmartAccountClient.d.ts","sourceRoot":"","sources":["../../../src/client/isAlchemySmartAccountClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAGrD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6OAcvC,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { type Prettify, type SmartAccountClient, type SmartAccountClientActions, type SmartAccountClientConfig, type SmartAccountClientRpcSchema, type SmartContractAccount, type UserOperationContext } from "@aa-sdk/core";
|
|
2
2
|
import { type Chain, type Transport } from "viem";
|
|
3
|
-
import { type AlchemyGasManagerConfig } from "../middleware/gasManager.js";
|
|
4
3
|
import type { AlchemyProviderConfig } from "../type.js";
|
|
5
4
|
import type { AlchemySmartAccountClientActions } from "./decorators/smartAccount.js";
|
|
6
5
|
import type { AlchemyRpcSchema } from "./types.js";
|
|
7
6
|
export type AlchemySmartAccountClientConfig<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends SmartContractAccount | undefined = SmartContractAccount | undefined, context extends UserOperationContext | undefined = UserOperationContext | undefined> = {
|
|
8
7
|
account?: account;
|
|
9
8
|
useSimulation?: boolean;
|
|
10
|
-
|
|
9
|
+
policyId?: string;
|
|
11
10
|
} & AlchemyProviderConfig & Pick<SmartAccountClientConfig<transport, chain, account, context>, "customMiddleware" | "feeEstimator" | "gasEstimator" | "signUserOperation">;
|
|
12
11
|
export type BaseAlchemyActions<chain extends Chain | undefined = Chain | undefined, account extends SmartContractAccount | undefined = SmartContractAccount | undefined, context extends UserOperationContext | undefined = UserOperationContext | undefined> = SmartAccountClientActions<chain, account, context> & AlchemySmartAccountClientActions<account, context>;
|
|
13
12
|
export type AlchemySmartAccountClient_Base<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends SmartContractAccount | undefined = SmartContractAccount | undefined, actions extends Record<string, unknown> = Record<string, unknown>, context extends UserOperationContext | undefined = UserOperationContext | undefined> = Prettify<SmartAccountClient<transport, chain, account, actions & BaseAlchemyActions<chain, account, context>, [
|
|
@@ -15,5 +14,5 @@ export type AlchemySmartAccountClient_Base<transport extends Transport = Transpo
|
|
|
15
14
|
...AlchemyRpcSchema
|
|
16
15
|
], context>>;
|
|
17
16
|
export type AlchemySmartAccountClient<transport extends Transport = Transport, chain extends Chain | undefined = Chain | undefined, account extends SmartContractAccount | undefined = SmartContractAccount | undefined, actions extends Record<string, unknown> = Record<string, unknown>, context extends UserOperationContext | undefined = UserOperationContext | undefined> = Prettify<AlchemySmartAccountClient_Base<transport, chain, account, actions, context>>;
|
|
18
|
-
export declare function createAlchemySmartAccountClient<TTransport extends Transport = Transport, TChain extends Chain = Chain, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined>({ account,
|
|
17
|
+
export declare function createAlchemySmartAccountClient<TTransport extends Transport = Transport, TChain extends Chain = Chain, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined>({ account, policyId, useSimulation, feeEstimator, customMiddleware, gasEstimator, signUserOperation, ...config_ }: AlchemySmartAccountClientConfig<TTransport, TChain, TAccount, TContext>): AlchemySmartAccountClient<TTransport, TChain, TAccount, Record<string, never>, TContext>;
|
|
19
18
|
//# sourceMappingURL=smartAccountClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartAccountClient.d.ts","sourceRoot":"","sources":["../../../src/client/smartAccountClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"smartAccountClient.d.ts","source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oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,EACA,OAAO,EACP,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,GAAG,OAAO,EACX,EAAE,+BAA+B,CAChC,UAAU,EACV,MAAM,EACN,QAAQ,EACR,QAAQ,CACT,GAAG,yBAAyB,CAC3B,UAAU,EACV,MAAM,EACN,QAAQ,EACR,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACrB,QAAQ,CACT,CAAC"}
|
|
@@ -1,32 +1,7 @@
|
|
|
1
1
|
import { type BundlerClient, type UserOperationRequest } from "@aa-sdk/core";
|
|
2
|
-
import type {
|
|
2
|
+
import type { HttpTransport } from "viem";
|
|
3
3
|
import type { SimulateUserOperationAssetChangesRequest, SimulateUserOperationAssetChangesResponse } from "../actions/types";
|
|
4
|
-
import type { RequestGasAndPaymasterAndDataOverrides, RequestGasAndPaymasterAndDataResponse, RequestPaymasterAndDataResponse } from "../middleware/gasManager";
|
|
5
4
|
export type AlchemyRpcSchema = [
|
|
6
|
-
{
|
|
7
|
-
Method: "alchemy_requestPaymasterAndData";
|
|
8
|
-
Parameters: [
|
|
9
|
-
{
|
|
10
|
-
policyId: string;
|
|
11
|
-
entryPoint: Address;
|
|
12
|
-
userOperation: UserOperationRequest;
|
|
13
|
-
}
|
|
14
|
-
];
|
|
15
|
-
ReturnType: RequestPaymasterAndDataResponse;
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
Method: "alchemy_requestGasAndPaymasterAndData";
|
|
19
|
-
Parameters: [
|
|
20
|
-
{
|
|
21
|
-
policyId: string;
|
|
22
|
-
entryPoint: Address;
|
|
23
|
-
userOperation: UserOperationRequest;
|
|
24
|
-
dummySignature: Hex;
|
|
25
|
-
overrides?: RequestGasAndPaymasterAndDataOverrides;
|
|
26
|
-
}
|
|
27
|
-
];
|
|
28
|
-
ReturnType: RequestGasAndPaymasterAndDataResponse;
|
|
29
|
-
},
|
|
30
5
|
{
|
|
31
6
|
Method: "alchemy_simulateUserOperationAssetChanges";
|
|
32
7
|
Parameters: SimulateUserOperationAssetChangesRequest;
|
|
@@ -40,28 +15,6 @@ export type AlchemyRpcSchema = [
|
|
|
40
15
|
];
|
|
41
16
|
export type ClientWithAlchemyMethods = BundlerClient<HttpTransport> & {
|
|
42
17
|
request: BundlerClient<HttpTransport>["request"] & {
|
|
43
|
-
request(args: {
|
|
44
|
-
method: "alchemy_requestPaymasterAndData";
|
|
45
|
-
params: [
|
|
46
|
-
{
|
|
47
|
-
policyId: string;
|
|
48
|
-
entryPoint: Address;
|
|
49
|
-
userOperation: UserOperationRequest;
|
|
50
|
-
}
|
|
51
|
-
];
|
|
52
|
-
}): Promise<RequestPaymasterAndDataResponse>;
|
|
53
|
-
request(args: {
|
|
54
|
-
method: "alchemy_requestGasAndPaymasterAndData";
|
|
55
|
-
params: [
|
|
56
|
-
{
|
|
57
|
-
policyId: string;
|
|
58
|
-
entryPoint: Address;
|
|
59
|
-
userOperation: UserOperationRequest;
|
|
60
|
-
dummySignature: Hex;
|
|
61
|
-
overrides?: RequestGasAndPaymasterAndDataOverrides;
|
|
62
|
-
}
|
|
63
|
-
];
|
|
64
|
-
}): Promise<RequestGasAndPaymasterAndDataResponse>;
|
|
65
18
|
request(args: {
|
|
66
19
|
method: "alchemy_simulateUserOperationAssetChanges";
|
|
67
20
|
params: SimulateUserOperationAssetChangesRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,KAAK,EACV,wCAAwC,EACxC,yCAAyC,EAC1C,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,gBAAgB,GAAG;IAC7B;QACE,MAAM,EAAE,2CAA2C,CAAC;QACpD,UAAU,EAAE,wCAAwC,CAAC;QACrD,UAAU,EAAE,yCAAyC,CAAC;KACvD;IACD;QACE,MAAM,EAAE,8BAA8B,CAAC;QACvC,UAAU,EAAE,EAAE,CAAC;QACf,UAAU,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;KAC1D;CACF,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC,aAAa,CAAC,GAAG;IACpE,OAAO,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,GAC9C;QACE,OAAO,CAAC,IAAI,EAAE;YACZ,MAAM,EAAE,2CAA2C,CAAC;YACpD,MAAM,EAAE,wCAAwC,CAAC;SAClD,GAAG,OAAO,CAAC,yCAAyC,CAAC,CAAC;QAEvD,OAAO,CAAC,IAAI,EAAE;YACZ,MAAM,EAAE,8BAA8B,CAAC;YACvC,MAAM,EAAE,EAAE,CAAC;SACZ,GAAG,OAAO,CAAC,oBAAoB,CAAC,sBAAsB,CAAC,CAAC,CAAC;KAC3D,CAAC,SAAS,CAAC,CAAC;CAChB,GAAG;IACF,aAAa,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CAC/C,CAAC"}
|
|
@@ -1,94 +1,22 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { type Hex } from "viem";
|
|
3
|
-
import type { ClientWithAlchemyMethods } from "../client/types";
|
|
1
|
+
import type { ClientMiddlewareConfig } from "@aa-sdk/core";
|
|
4
2
|
/**
|
|
5
|
-
*
|
|
3
|
+
* Paymaster middleware factory that uses Alchemy's Gas Manager for sponsoring transactions.
|
|
6
4
|
*
|
|
7
|
-
* @
|
|
8
|
-
|
|
9
|
-
export type RequestGasAndPaymasterAndDataOverrides<TEntryPointVersion extends EntryPointVersion = EntryPointVersion> = Partial<{
|
|
10
|
-
maxFeePerGas: UserOperationRequest<TEntryPointVersion>["maxFeePerGas"] | Multiplier;
|
|
11
|
-
maxPriorityFeePerGas: UserOperationRequest<TEntryPointVersion>["maxPriorityFeePerGas"] | Multiplier;
|
|
12
|
-
callGasLimit: UserOperationRequest<TEntryPointVersion>["callGasLimit"] | Multiplier;
|
|
13
|
-
verificationGasLimit: UserOperationRequest<TEntryPointVersion>["verificationGasLimit"] | Multiplier;
|
|
14
|
-
preVerificationGas: UserOperationRequest<TEntryPointVersion>["preVerificationGas"] | Multiplier;
|
|
15
|
-
} & TEntryPointVersion extends "0.7.0" ? {
|
|
16
|
-
paymasterVerificationGasLimit: UserOperationRequest<"0.7.0">["paymasterVerificationGasLimit"] | Multiplier;
|
|
17
|
-
paymasterPostOpGasLimit: UserOperationRequest<"0.7.0">["paymasterPostOpGasLimit"] | Multiplier;
|
|
18
|
-
} : {}>;
|
|
19
|
-
/**
|
|
20
|
-
* [`alchemy-requestpaymasteranddata`](https://docs.alchemy.com/reference/alchemy-requestpaymasteranddata)
|
|
21
|
-
* response type
|
|
22
|
-
*
|
|
23
|
-
* @template {EntryPointVersion} TEntryPointVersion entry point version type
|
|
24
|
-
*/
|
|
25
|
-
export type RequestPaymasterAndDataResponse<TEntryPointVersion extends EntryPointVersion = EntryPointVersion> = TEntryPointVersion extends "0.6.0" ? {
|
|
26
|
-
paymasterAndData: UserOperationRequest<"0.6.0">["paymasterAndData"];
|
|
27
|
-
} : TEntryPointVersion extends "0.7.0" ? Pick<UserOperationRequest<"0.7.0">, "paymaster" | "paymasterData"> : {};
|
|
28
|
-
/**
|
|
29
|
-
* [`alchemy_requestGasAndPaymasterData`](https://docs.alchemy.com/reference/alchemy-requestgasandpaymasteranddata)
|
|
30
|
-
* response type
|
|
31
|
-
*
|
|
32
|
-
* @template {EntryPointVersion} TEntryPointVersion entry point version type
|
|
33
|
-
*/
|
|
34
|
-
export type RequestGasAndPaymasterAndDataResponse<TEntryPointVersion extends EntryPointVersion = EntryPointVersion> = Pick<UserOperationRequest, "callGasLimit" | "preVerificationGas" | "verificationGasLimit" | "maxFeePerGas" | "maxPriorityFeePerGas"> & RequestPaymasterAndDataResponse<TEntryPointVersion>;
|
|
35
|
-
/**
|
|
36
|
-
* Alchemy gas manager configuration with gas policy id and optional gas estimation options
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
37
7
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
export interface AlchemyGasManagerConfig {
|
|
42
|
-
/**
|
|
43
|
-
* the policy id of the gas manager you want to use.
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
policyId: string;
|
|
47
|
-
/**
|
|
48
|
-
* optional option configurable for the gas estimation portion of the Alchemy gas manager
|
|
49
|
-
*
|
|
50
|
-
*/
|
|
51
|
-
gasEstimationOptions?: AlchemyGasEstimationOptions;
|
|
52
|
-
/**
|
|
53
|
-
* paymaster address to use for the gas estimation.
|
|
54
|
-
* If not provided, the default paymaster address for the chain will be used.
|
|
55
|
-
*
|
|
56
|
-
*/
|
|
57
|
-
paymasterAddress?: Address;
|
|
58
|
-
/**
|
|
59
|
-
* dummy paymaster data to use for the gas estimation.
|
|
60
|
-
*
|
|
61
|
-
*/
|
|
62
|
-
dummyData?: Hex;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Alchemy gas manager configuration option configurable for the gas estimation portion of the Alchemy gas manager
|
|
8
|
+
* import { sepolia } from "@account-kit/infra";
|
|
9
|
+
* import { http } from "viem";
|
|
66
10
|
*
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
disableGasEstimation: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* optional fallback gas estimator to use when gas estimation is disabled.
|
|
76
|
-
*
|
|
77
|
-
*/
|
|
78
|
-
fallbackGasEstimator?: ClientMiddlewareFn;
|
|
79
|
-
/**
|
|
80
|
-
* optional fallback fee estimator to use when gas estimation is disabled.
|
|
81
|
-
*
|
|
82
|
-
*/
|
|
83
|
-
fallbackFeeDataGetter?: ClientMiddlewareFn;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Alchemy gas manager middleware used as the paymaster middleware overrides param to the client middleware config
|
|
11
|
+
* const client = createSmartAccountClient({
|
|
12
|
+
* http("rpc-url"),
|
|
13
|
+
* sepolia,
|
|
14
|
+
* alchemyErc7677Middleware("policyId")
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
87
17
|
*
|
|
88
|
-
* @
|
|
89
|
-
* @
|
|
90
|
-
* @param {AlchemyGasManagerConfig} config alchemy gas manager configuration
|
|
91
|
-
* @returns {Pick<ClientMiddlewareConfig,"paymasterAndData" | "feeEstimator" | "gasEstimator">} the gas estimator, fee estimator, and paymasterAndData middleware for Alchemy gas manager
|
|
18
|
+
* @param {string} policyId the policyId for Alchemy's gas manager
|
|
19
|
+
* @returns {Pick<ClientMiddlewareConfig, "dummyPaymasterAndData" | "paymasterAndData">} partial client middleware configuration containing `dummyPaymasterAndData` and `paymasterAndData`
|
|
92
20
|
*/
|
|
93
|
-
export declare function alchemyGasManagerMiddleware
|
|
21
|
+
export declare function alchemyGasManagerMiddleware(policyId: string): Pick<ClientMiddlewareConfig, "dummyPaymasterAndData" | "paymasterAndData">;
|
|
94
22
|
//# sourceMappingURL=gasManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gasManager.d.ts","sourceRoot":"","sources":["../../../src/middleware/gasManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"gasManager.d.ts","sourceRoot":"","sources":["../../../src/middleware/gasManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAG3D;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,GACf,IAAI,CAAC,sBAAsB,EAAE,uBAAuB,GAAG,kBAAkB,CAAC,CAI5E"}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.0.0-alpha.
|
|
1
|
+
export declare const VERSION = "4.0.0-alpha.8";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@account-kit/infra",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.8",
|
|
4
4
|
"description": "adapters for @aa-sdk/core for interacting with alchemy services",
|
|
5
5
|
"author": "Alchemy",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"vitest": "^0.31.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@aa-sdk/core": "^4.0.0-alpha.
|
|
49
|
+
"@aa-sdk/core": "^4.0.0-alpha.8",
|
|
50
50
|
"eventemitter3": "^5.0.1",
|
|
51
51
|
"viem": "2.8.6",
|
|
52
52
|
"zod": "^3.22.4"
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"url": "https://github.com/alchemyplatform/aa-sdk/issues"
|
|
70
70
|
},
|
|
71
71
|
"homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "1203942ed4e10f7b4c1685c8835006fbf3a4bcae",
|
|
73
73
|
"optionalDependencies": {
|
|
74
74
|
"alchemy-sdk": "^3.0.0"
|
|
75
75
|
}
|
|
@@ -84,7 +84,7 @@ export function createAlchemySmartAccountClientFromRpcClient(
|
|
|
84
84
|
opts,
|
|
85
85
|
account,
|
|
86
86
|
useSimulation,
|
|
87
|
-
|
|
87
|
+
policyId,
|
|
88
88
|
feeEstimator,
|
|
89
89
|
gasEstimator,
|
|
90
90
|
customMiddleware,
|
|
@@ -106,7 +106,6 @@ export function createAlchemySmartAccountClientFromRpcClient(
|
|
|
106
106
|
if (isSmartAccountWithSigner(args.account)) {
|
|
107
107
|
client.updateHeaders(getSignerTypeHeader(args.account));
|
|
108
108
|
}
|
|
109
|
-
|
|
110
109
|
return customMiddleware ? customMiddleware(struct, args) : struct;
|
|
111
110
|
},
|
|
112
111
|
feeEstimator: feeEstimator ?? alchemyFeeEstimator(client),
|
|
@@ -114,22 +113,7 @@ export function createAlchemySmartAccountClientFromRpcClient(
|
|
|
114
113
|
? alchemyUserOperationSimulator(client)
|
|
115
114
|
: undefined,
|
|
116
115
|
gasEstimator,
|
|
117
|
-
...(
|
|
118
|
-
alchemyGasManagerMiddleware(client, {
|
|
119
|
-
...gasManagerConfig,
|
|
120
|
-
gasEstimationOptions: {
|
|
121
|
-
...gasManagerConfig.gasEstimationOptions,
|
|
122
|
-
disableGasEstimation:
|
|
123
|
-
gasManagerConfig.gasEstimationOptions?.disableGasEstimation ??
|
|
124
|
-
false,
|
|
125
|
-
fallbackFeeDataGetter:
|
|
126
|
-
gasManagerConfig.gasEstimationOptions?.fallbackFeeDataGetter ??
|
|
127
|
-
feeEstimator,
|
|
128
|
-
fallbackGasEstimator:
|
|
129
|
-
gasManagerConfig.gasEstimationOptions?.fallbackGasEstimator ??
|
|
130
|
-
gasEstimator,
|
|
131
|
-
},
|
|
132
|
-
})),
|
|
116
|
+
...(policyId && alchemyGasManagerMiddleware(policyId)),
|
|
133
117
|
signUserOperation,
|
|
134
118
|
}).extend(alchemyActions);
|
|
135
119
|
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
} from "@aa-sdk/core";
|
|
10
10
|
import { type Chain, type Transport } from "viem";
|
|
11
11
|
import { getDefaultUserOperationFeeOptions } from "../defaults.js";
|
|
12
|
-
import { type AlchemyGasManagerConfig } from "../middleware/gasManager.js";
|
|
13
12
|
import { AlchemyProviderConfigSchema } from "../schema.js";
|
|
14
13
|
import type { AlchemyProviderConfig } from "../type.js";
|
|
15
14
|
import type { AlchemySmartAccountClientActions } from "./decorators/smartAccount.js";
|
|
@@ -30,7 +29,7 @@ export type AlchemySmartAccountClientConfig<
|
|
|
30
29
|
> = {
|
|
31
30
|
account?: account;
|
|
32
31
|
useSimulation?: boolean;
|
|
33
|
-
|
|
32
|
+
policyId?: string;
|
|
34
33
|
} & AlchemyProviderConfig &
|
|
35
34
|
Pick<
|
|
36
35
|
SmartAccountClientConfig<transport, chain, account, context>,
|
|
@@ -95,7 +94,7 @@ export function createAlchemySmartAccountClient<
|
|
|
95
94
|
| undefined
|
|
96
95
|
>({
|
|
97
96
|
account,
|
|
98
|
-
|
|
97
|
+
policyId,
|
|
99
98
|
useSimulation,
|
|
100
99
|
feeEstimator,
|
|
101
100
|
customMiddleware,
|
|
@@ -134,7 +133,7 @@ export function createAlchemySmartAccountClient<
|
|
|
134
133
|
*/
|
|
135
134
|
export function createAlchemySmartAccountClient({
|
|
136
135
|
account,
|
|
137
|
-
|
|
136
|
+
policyId,
|
|
138
137
|
useSimulation,
|
|
139
138
|
feeEstimator,
|
|
140
139
|
customMiddleware,
|
|
@@ -160,7 +159,7 @@ export function createAlchemySmartAccountClient({
|
|
|
160
159
|
...opts,
|
|
161
160
|
feeOptions,
|
|
162
161
|
},
|
|
163
|
-
|
|
162
|
+
policyId,
|
|
164
163
|
useSimulation,
|
|
165
164
|
feeEstimator,
|
|
166
165
|
customMiddleware,
|
package/src/client/types.ts
CHANGED
|
@@ -1,40 +1,11 @@
|
|
|
1
1
|
import { type BundlerClient, type UserOperationRequest } from "@aa-sdk/core";
|
|
2
|
-
import type {
|
|
2
|
+
import type { HttpTransport } from "viem";
|
|
3
3
|
import type {
|
|
4
4
|
SimulateUserOperationAssetChangesRequest,
|
|
5
5
|
SimulateUserOperationAssetChangesResponse,
|
|
6
6
|
} from "../actions/types";
|
|
7
|
-
import type {
|
|
8
|
-
RequestGasAndPaymasterAndDataOverrides,
|
|
9
|
-
RequestGasAndPaymasterAndDataResponse,
|
|
10
|
-
RequestPaymasterAndDataResponse,
|
|
11
|
-
} from "../middleware/gasManager";
|
|
12
7
|
|
|
13
8
|
export type AlchemyRpcSchema = [
|
|
14
|
-
{
|
|
15
|
-
Method: "alchemy_requestPaymasterAndData";
|
|
16
|
-
Parameters: [
|
|
17
|
-
{
|
|
18
|
-
policyId: string;
|
|
19
|
-
entryPoint: Address;
|
|
20
|
-
userOperation: UserOperationRequest;
|
|
21
|
-
}
|
|
22
|
-
];
|
|
23
|
-
ReturnType: RequestPaymasterAndDataResponse;
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
Method: "alchemy_requestGasAndPaymasterAndData";
|
|
27
|
-
Parameters: [
|
|
28
|
-
{
|
|
29
|
-
policyId: string;
|
|
30
|
-
entryPoint: Address;
|
|
31
|
-
userOperation: UserOperationRequest;
|
|
32
|
-
dummySignature: Hex;
|
|
33
|
-
overrides?: RequestGasAndPaymasterAndDataOverrides;
|
|
34
|
-
}
|
|
35
|
-
];
|
|
36
|
-
ReturnType: RequestGasAndPaymasterAndDataResponse;
|
|
37
|
-
},
|
|
38
9
|
{
|
|
39
10
|
Method: "alchemy_simulateUserOperationAssetChanges";
|
|
40
11
|
Parameters: SimulateUserOperationAssetChangesRequest;
|
|
@@ -50,30 +21,6 @@ export type AlchemyRpcSchema = [
|
|
|
50
21
|
export type ClientWithAlchemyMethods = BundlerClient<HttpTransport> & {
|
|
51
22
|
request: BundlerClient<HttpTransport>["request"] &
|
|
52
23
|
{
|
|
53
|
-
request(args: {
|
|
54
|
-
method: "alchemy_requestPaymasterAndData";
|
|
55
|
-
params: [
|
|
56
|
-
{
|
|
57
|
-
policyId: string;
|
|
58
|
-
entryPoint: Address;
|
|
59
|
-
userOperation: UserOperationRequest;
|
|
60
|
-
}
|
|
61
|
-
];
|
|
62
|
-
}): Promise<RequestPaymasterAndDataResponse>;
|
|
63
|
-
|
|
64
|
-
request(args: {
|
|
65
|
-
method: "alchemy_requestGasAndPaymasterAndData";
|
|
66
|
-
params: [
|
|
67
|
-
{
|
|
68
|
-
policyId: string;
|
|
69
|
-
entryPoint: Address;
|
|
70
|
-
userOperation: UserOperationRequest;
|
|
71
|
-
dummySignature: Hex;
|
|
72
|
-
overrides?: RequestGasAndPaymasterAndDataOverrides;
|
|
73
|
-
}
|
|
74
|
-
];
|
|
75
|
-
}): Promise<RequestGasAndPaymasterAndDataResponse>;
|
|
76
|
-
|
|
77
24
|
request(args: {
|
|
78
25
|
method: "alchemy_simulateUserOperationAssetChanges";
|
|
79
26
|
params: SimulateUserOperationAssetChangesRequest;
|