@account-kit/infra 4.0.0-beta.0 → 4.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/alchemyTransport.d.ts +69 -0
- package/dist/esm/alchemyTransport.js +139 -0
- package/dist/esm/alchemyTransport.js.map +1 -0
- package/dist/esm/chains.d.ts +1 -0
- package/dist/esm/chains.js +17 -0
- package/dist/esm/chains.js.map +1 -1
- package/dist/esm/client/decorators/alchemyEnhancedApis.d.ts +2 -2
- package/dist/esm/client/decorators/alchemyEnhancedApis.js +3 -7
- package/dist/esm/client/decorators/alchemyEnhancedApis.js.map +1 -1
- package/dist/esm/client/decorators/smartAccount.d.ts +7 -4
- package/dist/esm/client/decorators/smartAccount.js +33 -0
- package/dist/esm/client/decorators/smartAccount.js.map +1 -1
- package/dist/esm/client/isAlchemySmartAccountClient.d.ts +1 -1
- package/dist/esm/client/isAlchemySmartAccountClient.js +2 -6
- package/dist/esm/client/isAlchemySmartAccountClient.js.map +1 -1
- package/dist/esm/client/rpcClient.d.ts +9 -10
- package/dist/esm/client/rpcClient.js +9 -33
- package/dist/esm/client/rpcClient.js.map +1 -1
- package/dist/esm/client/smartAccountClient.d.ts +12 -9
- package/dist/esm/client/smartAccountClient.js +34 -20
- package/dist/esm/client/smartAccountClient.js.map +1 -1
- package/dist/esm/client/types.d.ts +8 -7
- package/dist/esm/client/types.js.map +1 -1
- package/dist/esm/index.d.ts +3 -4
- package/dist/esm/index.js +2 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/metrics.d.ts +12 -0
- package/dist/esm/metrics.js +7 -0
- package/dist/esm/metrics.js.map +1 -0
- package/dist/esm/middleware/feeEstimator.d.ts +10 -6
- package/dist/esm/middleware/feeEstimator.js +11 -6
- package/dist/esm/middleware/feeEstimator.js.map +1 -1
- package/dist/esm/middleware/gasManager.d.ts +5 -6
- package/dist/esm/middleware/gasManager.js +5 -6
- package/dist/esm/middleware/gasManager.js.map +1 -1
- package/dist/esm/middleware/userOperationSimulator.d.ts +11 -7
- package/dist/esm/middleware/userOperationSimulator.js +12 -8
- package/dist/esm/middleware/userOperationSimulator.js.map +1 -1
- package/dist/esm/schema.d.ts +0 -391
- package/dist/esm/schema.js +1 -5
- package/dist/esm/schema.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/alchemyTransport.d.ts +70 -0
- package/dist/types/alchemyTransport.d.ts.map +1 -0
- package/dist/types/chains.d.ts +1 -0
- package/dist/types/chains.d.ts.map +1 -1
- package/dist/types/client/decorators/alchemyEnhancedApis.d.ts +2 -2
- package/dist/types/client/decorators/alchemyEnhancedApis.d.ts.map +1 -1
- package/dist/types/client/decorators/smartAccount.d.ts +7 -4
- package/dist/types/client/decorators/smartAccount.d.ts.map +1 -1
- package/dist/types/client/isAlchemySmartAccountClient.d.ts +1 -1
- package/dist/types/client/isAlchemySmartAccountClient.d.ts.map +1 -1
- package/dist/types/client/rpcClient.d.ts +9 -10
- package/dist/types/client/rpcClient.d.ts.map +1 -1
- package/dist/types/client/smartAccountClient.d.ts +12 -9
- package/dist/types/client/smartAccountClient.d.ts.map +1 -1
- package/dist/types/client/types.d.ts +8 -7
- package/dist/types/client/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/metrics.d.ts +13 -0
- package/dist/types/metrics.d.ts.map +1 -0
- package/dist/types/middleware/feeEstimator.d.ts +10 -6
- package/dist/types/middleware/feeEstimator.d.ts.map +1 -1
- package/dist/types/middleware/gasManager.d.ts +5 -6
- package/dist/types/middleware/gasManager.d.ts.map +1 -1
- package/dist/types/middleware/userOperationSimulator.d.ts +11 -7
- package/dist/types/middleware/userOperationSimulator.d.ts.map +1 -1
- package/dist/types/schema.d.ts +0 -391
- package/dist/types/schema.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +6 -10
- package/src/alchemyTransport.ts +214 -0
- package/src/chains.ts +18 -0
- package/src/client/decorators/alchemyEnhancedApis.ts +9 -16
- package/src/client/decorators/smartAccount.ts +77 -7
- package/src/client/isAlchemySmartAccountClient.ts +4 -9
- package/src/client/rpcClient.ts +14 -47
- package/src/client/smartAccountClient.ts +64 -57
- package/src/client/types.ts +10 -7
- package/src/index.ts +8 -8
- package/src/metrics.ts +19 -0
- package/src/middleware/feeEstimator.ts +15 -10
- package/src/middleware/gasManager.ts +5 -6
- package/src/middleware/userOperationSimulator.ts +13 -10
- package/src/schema.ts +1 -14
- package/src/version.ts +1 -1
- package/dist/esm/client/internal/smartAccountClientFromRpc.d.ts +0 -18
- package/dist/esm/client/internal/smartAccountClientFromRpc.js +0 -56
- package/dist/esm/client/internal/smartAccountClientFromRpc.js.map +0 -1
- package/dist/esm/type.d.ts +0 -3
- package/dist/esm/type.js +0 -2
- package/dist/esm/type.js.map +0 -1
- package/dist/types/client/internal/smartAccountClientFromRpc.d.ts +0 -19
- package/dist/types/client/internal/smartAccountClientFromRpc.d.ts.map +0 -1
- package/dist/types/type.d.ts +0 -4
- package/dist/types/type.d.ts.map +0 -1
- package/src/client/internal/smartAccountClientFromRpc.ts +0 -125
- package/src/type.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpcClient.d.ts","sourceRoot":"","sources":["../../../src/client/rpcClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rpcClient.d.ts","sourceRoot":"","sources":["../../../src/client/rpcClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,4BAA4B;eAI5B,gBAAgB;WACpB,KAAK,GAAG,SAAS;MACtB,wBAKH,CAAC"}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { type Prettify, type SmartAccountClient, type SmartAccountClientActions, type SmartAccountClientConfig, type SmartAccountClientRpcSchema, type SmartContractAccount, type UserOperationContext } from "@aa-sdk/core";
|
|
2
|
-
import { type Chain
|
|
3
|
-
import type {
|
|
4
|
-
import type
|
|
1
|
+
import { type Prettify, type SmartAccountClient, type SmartAccountClientActions, type SmartAccountClientConfig, type SmartAccountClientRpcSchema, type SmartContractAccount, type SmartContractAccountWithSigner, type UserOperationContext } from "@aa-sdk/core";
|
|
2
|
+
import { type Chain } from "viem";
|
|
3
|
+
import type { AlchemyTransport } from "../alchemyTransport.js";
|
|
4
|
+
import { type AlchemySmartAccountClientActions } from "./decorators/smartAccount.js";
|
|
5
5
|
import type { AlchemyRpcSchema } from "./types.js";
|
|
6
|
-
export
|
|
6
|
+
export declare function getSignerTypeHeader<TAccount extends SmartContractAccountWithSigner>(account: TAccount): {
|
|
7
|
+
"Alchemy-Aa-Sdk-Signer": string;
|
|
8
|
+
};
|
|
9
|
+
export type AlchemySmartAccountClientConfig<chain extends Chain | undefined = Chain | undefined, account extends SmartContractAccount | undefined = SmartContractAccount | undefined, context extends UserOperationContext | undefined = UserOperationContext | undefined> = {
|
|
7
10
|
account?: account;
|
|
8
11
|
useSimulation?: boolean;
|
|
9
12
|
policyId?: string;
|
|
10
|
-
} &
|
|
13
|
+
} & Pick<SmartAccountClientConfig<AlchemyTransport, chain, account, context>, "customMiddleware" | "feeEstimator" | "gasEstimator" | "signUserOperation" | "transport" | "chain" | "opts">;
|
|
11
14
|
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>;
|
|
12
|
-
export type AlchemySmartAccountClient_Base<
|
|
15
|
+
export type AlchemySmartAccountClient_Base<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<AlchemyTransport, chain, account, actions & BaseAlchemyActions<chain, account, context>, [
|
|
13
16
|
...SmartAccountClientRpcSchema,
|
|
14
17
|
...AlchemyRpcSchema
|
|
15
18
|
], context>>;
|
|
16
|
-
export type AlchemySmartAccountClient<
|
|
17
|
-
export declare function createAlchemySmartAccountClient<
|
|
19
|
+
export type AlchemySmartAccountClient<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<chain, account, actions, context>>;
|
|
20
|
+
export declare function createAlchemySmartAccountClient<TChain extends Chain = Chain, TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined, TContext extends UserOperationContext | undefined = UserOperationContext | undefined>(params: AlchemySmartAccountClientConfig<TChain, TAccount, TContext>): AlchemySmartAccountClient<TChain, TAccount, Record<string, never>, TContext>;
|
|
18
21
|
//# sourceMappingURL=smartAccountClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartAccountClient.d.ts","sourceRoot":"","sources":["../../../src/client/smartAccountClient.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"smartAccountClient.d.ts","sourceRoot":"","sources":["../../../src/client/smartAccountClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB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 -1,6 +1,6 @@
|
|
|
1
|
-
import { type BundlerClient, type UserOperationRequest } from "@aa-sdk/core";
|
|
2
|
-
import type { HttpTransport } from "viem";
|
|
1
|
+
import { type BundlerClient, type Erc7677RpcSchema, type UserOperationRequest } from "@aa-sdk/core";
|
|
3
2
|
import type { SimulateUserOperationAssetChangesRequest, SimulateUserOperationAssetChangesResponse } from "../actions/types";
|
|
3
|
+
import type { AlchemyTransport } from "../alchemyTransport";
|
|
4
4
|
export type AlchemyRpcSchema = [
|
|
5
5
|
{
|
|
6
6
|
Method: "alchemy_simulateUserOperationAssetChanges";
|
|
@@ -11,10 +11,13 @@ export type AlchemyRpcSchema = [
|
|
|
11
11
|
Method: "rundler_maxPriorityFeePerGas";
|
|
12
12
|
Parameters: [];
|
|
13
13
|
ReturnType: UserOperationRequest["maxPriorityFeePerGas"];
|
|
14
|
-
}
|
|
14
|
+
},
|
|
15
|
+
...Erc7677RpcSchema<{
|
|
16
|
+
policyId: string;
|
|
17
|
+
}>
|
|
15
18
|
];
|
|
16
|
-
export type ClientWithAlchemyMethods = BundlerClient<
|
|
17
|
-
request: BundlerClient<
|
|
19
|
+
export type ClientWithAlchemyMethods = BundlerClient<AlchemyTransport> & {
|
|
20
|
+
request: BundlerClient<AlchemyTransport>["request"] & {
|
|
18
21
|
request(args: {
|
|
19
22
|
method: "alchemy_simulateUserOperationAssetChanges";
|
|
20
23
|
params: SimulateUserOperationAssetChangesRequest;
|
|
@@ -24,7 +27,5 @@ export type ClientWithAlchemyMethods = BundlerClient<HttpTransport> & {
|
|
|
24
27
|
params: [];
|
|
25
28
|
}): Promise<UserOperationRequest["maxPriorityFeePerGas"]>;
|
|
26
29
|
}["request"];
|
|
27
|
-
} & {
|
|
28
|
-
updateHeaders: (headers: HeadersInit) => void;
|
|
29
30
|
};
|
|
30
31
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,wCAAwC,EACxC,yCAAyC,EAC1C,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,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;IACD,GAAG,gBAAgB,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAAC,gBAAgB,CAAC,GAAG;IACvE,OAAO,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,GACjD;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,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
export type * from "./actions/simulateUserOperationChanges.js";
|
|
2
2
|
export { simulateUserOperationChanges } from "./actions/simulateUserOperationChanges.js";
|
|
3
3
|
export type * from "./actions/types.js";
|
|
4
|
+
export type * from "./alchemyTransport.js";
|
|
5
|
+
export { alchemy } from "./alchemyTransport.js";
|
|
4
6
|
export type * from "./chains.js";
|
|
5
|
-
export { arbitrum, arbitrumGoerli,
|
|
7
|
+
export { arbitrum, arbitrumGoerli, arbitrumNova, arbitrumSepolia, base, baseGoerli, baseSepolia, defineAlchemyChain, fraxtal, fraxtalSepolia, goerli, mainnet, optimism, optimismGoerli, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, shape, shapeSepolia, worldChain, worldChainSepolia, zora, zoraSepolia, beraChainBartio, } from "./chains.js";
|
|
6
8
|
export type * from "./client/decorators/alchemyEnhancedApis.js";
|
|
7
9
|
export { alchemyEnhancedApiActions } from "./client/decorators/alchemyEnhancedApis.js";
|
|
8
10
|
export type * from "./client/decorators/smartAccount.js";
|
|
9
11
|
export { alchemyActions } from "./client/decorators/smartAccount.js";
|
|
10
|
-
export { createAlchemySmartAccountClientFromRpcClient as createAlchemySmartAccountClientFromExisting } from "./client/internal/smartAccountClientFromRpc.js";
|
|
11
12
|
export { isAlchemySmartAccountClient } from "./client/isAlchemySmartAccountClient.js";
|
|
12
13
|
export type * from "./client/rpcClient.js";
|
|
13
14
|
export { createAlchemyPublicRpcClient } from "./client/rpcClient.js";
|
|
@@ -21,6 +22,4 @@ export type * from "./middleware/gasManager.js";
|
|
|
21
22
|
export { alchemyGasManagerMiddleware } from "./middleware/gasManager.js";
|
|
22
23
|
export { alchemyUserOperationSimulator } from "./middleware/userOperationSimulator.js";
|
|
23
24
|
export type * from "./schema.js";
|
|
24
|
-
export { AlchemyProviderConfigSchema } from "./schema.js";
|
|
25
|
-
export type { AlchemyProviderConfig } from "./type.js";
|
|
26
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,2CAA2C,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,mBAAmB,oBAAoB,CAAC;AACxC,mBAAmB,aAAa,CAAC;AACjC,OAAO,EACL,QAAQ,EACR,cAAc,EACd,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,2CAA2C,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,mBAAmB,oBAAoB,CAAC;AACxC,mBAAmB,uBAAuB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,mBAAmB,aAAa,CAAC;AACjC,OAAO,EACL,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,eAAe,EACf,IAAI,EACJ,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,cAAc,EACd,MAAM,EACN,OAAO,EACP,QAAQ,EACR,cAAc,EACd,eAAe,EACf,OAAO,EACP,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,EACL,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,IAAI,EACJ,WAAW,EACX,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,mBAAmB,4CAA4C,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,mBAAmB,qCAAqC,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,mBAAmB,uBAAuB,CAAC;AAC3C,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,mBAAmB,gCAAgC,CAAC;AACpD,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACjF,mBAAmB,mBAAmB,CAAC;AACvC,OAAO,EAAE,iCAAiC,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,mBAAmB,4BAA4B,CAAC;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,mBAAmB,aAAa,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
export type InfraEventsSchema = [
|
|
3
|
+
{
|
|
4
|
+
EventName: "client_send_uo";
|
|
5
|
+
EventData: {
|
|
6
|
+
signerType: string;
|
|
7
|
+
chainId: number;
|
|
8
|
+
entryPoint: Address;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
export declare const InfraLogger: import("@account-kit/logging").EventLogger<InfraEventsSchema>;
|
|
13
|
+
//# sourceMappingURL=metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/metrics.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,MAAM,MAAM,iBAAiB,GAAG;IAC9B;QACE,SAAS,EAAE,gBAAgB,CAAC;QAC5B,SAAS,EAAE;YACT,UAAU,EAAE,MAAM,CAAC;YACnB,OAAO,EAAE,MAAM,CAAC;YAChB,UAAU,EAAE,OAAO,CAAC;SACrB,CAAC;KACH;CACF,CAAC;AAEF,eAAO,MAAM,WAAW,+DAGtB,CAAC"}
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import type { ClientMiddlewareFn } from "@aa-sdk/core";
|
|
2
|
-
import type {
|
|
2
|
+
import type { AlchemyTransport } from "../alchemyTransport";
|
|
3
3
|
/**
|
|
4
4
|
* Function that estimates the transaction fees using Alchemy methods for a given client.
|
|
5
5
|
* It fetches the latest block and estimates the max priority fee per gas, applying any overrides or fee options provided.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```ts
|
|
9
|
-
* import { alchemyFeeEstimator,
|
|
9
|
+
* import { alchemyFeeEstimator, alchemy } from "@account-kit/infra";
|
|
10
10
|
* import { createSmartAccountClient } from "@aa-sdk/core";
|
|
11
11
|
*
|
|
12
|
-
* const
|
|
12
|
+
* const alchemyTransport = alchemy({
|
|
13
|
+
* chain: sepolia,
|
|
14
|
+
* apiKey: "your-api-key"
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
13
17
|
* const client = createSmartAccountClient({
|
|
14
|
-
* feeEstimator: alchemyFeeEstimator(
|
|
18
|
+
* feeEstimator: alchemyFeeEstimator(alchemyTransport),
|
|
15
19
|
* ...otherParams
|
|
16
20
|
* });
|
|
17
21
|
* ```
|
|
18
22
|
*
|
|
19
|
-
* @param {
|
|
23
|
+
* @param {AlchemyTransport} transport An alchemy transport for making Alchemy specific RPC calls
|
|
20
24
|
* @returns {ClientMiddlewareFn} A middleware function that takes a transaction structure and fee options, and returns the augmented structure with estimated fees
|
|
21
25
|
*/
|
|
22
|
-
export declare const alchemyFeeEstimator:
|
|
26
|
+
export declare const alchemyFeeEstimator: (transport: AlchemyTransport) => ClientMiddlewareFn;
|
|
23
27
|
//# sourceMappingURL=feeEstimator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feeEstimator.d.ts","sourceRoot":"","sources":["../../../src/middleware/feeEstimator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"feeEstimator.d.ts","sourceRoot":"","sources":["../../../src/middleware/feeEstimator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,mBAAmB,EAAE,CAChC,SAAS,EAAE,gBAAgB,KACxB,kBAkCF,CAAC"}
|
|
@@ -4,15 +4,14 @@ import type { ClientMiddlewareConfig } from "@aa-sdk/core";
|
|
|
4
4
|
*
|
|
5
5
|
* @example
|
|
6
6
|
* ```ts
|
|
7
|
-
*
|
|
8
|
-
* import { sepolia } from "@account-kit/infra";
|
|
7
|
+
* import { sepolia, alchemyErc7677Middleware } from "@account-kit/infra";
|
|
9
8
|
* import { http } from "viem";
|
|
10
9
|
*
|
|
11
10
|
* const client = createSmartAccountClient({
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* transport: http("rpc-url"),
|
|
12
|
+
* chain: sepolia,
|
|
13
|
+
* ...alchemyErc7677Middleware("policyId")
|
|
14
|
+
* });
|
|
16
15
|
* ```
|
|
17
16
|
*
|
|
18
17
|
* @param {string} policyId the policyId for Alchemy's gas manager
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,GACf,IAAI,CAAC,sBAAsB,EAAE,uBAAuB,GAAG,kBAAkB,CAAC,CAI5E"}
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import { type ClientMiddlewareFn, type UserOperationContext } from "@aa-sdk/core";
|
|
2
|
-
import type {
|
|
2
|
+
import type { AlchemyTransport } from "../alchemyTransport";
|
|
3
3
|
/**
|
|
4
4
|
* A middleware function to be used during simulation of user operations which leverages Alchemy's RPC uo simulation method.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```ts
|
|
8
|
-
* import { alchemyUserOperationSimulator,
|
|
8
|
+
* import { alchemyUserOperationSimulator, alchemy, sepolia } from "@account-kit/infra";
|
|
9
9
|
* import { createSmartAccountClient } from "@aa-sdk/core";
|
|
10
10
|
*
|
|
11
|
-
* const
|
|
11
|
+
* const alchemyTransport = alchemy({
|
|
12
|
+
* chain: sepolia,
|
|
13
|
+
* apiKey: "your-api-key"
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
12
16
|
* const client = createSmartAccountClient({
|
|
13
|
-
*
|
|
17
|
+
* chain: sepolia,
|
|
18
|
+
* userOperationSimulator: alchemyUserOperationSimulator(alchemyTransport),
|
|
14
19
|
* ...otherParams
|
|
15
20
|
* });
|
|
16
21
|
* ```
|
|
17
22
|
*
|
|
18
|
-
* @
|
|
19
|
-
* @param {C} client The client object with Alchemy methods
|
|
23
|
+
* @param {AlchemyTransport} transport An Alchemy Transport that can be used for making RPC calls to alchemy
|
|
20
24
|
* @returns {ClientMiddlewareFn} A middleware function to simulate and process user operations
|
|
21
25
|
*/
|
|
22
|
-
export declare function alchemyUserOperationSimulator<
|
|
26
|
+
export declare function alchemyUserOperationSimulator<TContext extends UserOperationContext | undefined = UserOperationContext | undefined>(transport: AlchemyTransport): ClientMiddlewareFn<TContext>;
|
|
23
27
|
//# sourceMappingURL=userOperationSimulator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userOperationSimulator.d.ts","sourceRoot":"","sources":["../../../src/middleware/userOperationSimulator.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"userOperationSimulator.d.ts","sourceRoot":"","sources":["../../../src/middleware/userOperationSimulator.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,SAAS,EAAE,gBAAgB,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAgB3D"}
|