@aa-sdk/core 4.60.0 → 4.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/actions/bundler/getUserOperationReceipt.d.ts +1 -0
- package/dist/esm/actions/bundler/getUserOperationReceipt.js +7 -1
- package/dist/esm/actions/bundler/getUserOperationReceipt.js.map +1 -1
- package/dist/esm/actions/smartAccount/types.d.ts +4 -0
- package/dist/esm/actions/smartAccount/types.js.map +1 -1
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js +1 -1
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js.map +1 -1
- package/dist/esm/client/decorators/bundlerClient.d.ts +3 -2
- package/dist/esm/client/decorators/bundlerClient.js +4 -1
- package/dist/esm/client/decorators/bundlerClient.js.map +1 -1
- package/dist/esm/types.d.ts +1 -0
- package/dist/esm/types.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/actions/bundler/getUserOperationReceipt.d.ts +1 -0
- package/dist/types/actions/bundler/getUserOperationReceipt.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/types.d.ts +4 -0
- package/dist/types/actions/smartAccount/types.d.ts.map +1 -1
- package/dist/types/client/decorators/bundlerClient.d.ts +3 -2
- package/dist/types/client/decorators/bundlerClient.d.ts.map +1 -1
- package/dist/types/types.d.ts +1 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/actions/bundler/getUserOperationReceipt.ts +8 -1
- package/src/actions/smartAccount/types.ts +4 -0
- package/src/actions/smartAccount/waitForUserOperationTransacation.ts +1 -1
- package/src/client/decorators/bundlerClient.ts +11 -4
- package/src/types.ts +2 -0
- package/src/version.ts +1 -1
|
@@ -3,4 +3,5 @@ import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient";
|
|
|
3
3
|
import type { UserOperationReceipt } from "../../types";
|
|
4
4
|
export declare const getUserOperationReceipt: <TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema>>(client: TClient, args: {
|
|
5
5
|
hash: Hex;
|
|
6
|
+
tag: "pending" | "latest" | undefined;
|
|
6
7
|
}) => Promise<UserOperationReceipt | null>;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
export const getUserOperationReceipt = async (client, args) => {
|
|
2
|
+
if (args.tag === undefined) {
|
|
3
|
+
return client.request({
|
|
4
|
+
method: "eth_getUserOperationReceipt",
|
|
5
|
+
params: [args.hash],
|
|
6
|
+
});
|
|
7
|
+
}
|
|
2
8
|
return client.request({
|
|
3
9
|
method: "eth_getUserOperationReceipt",
|
|
4
|
-
params: [args.hash],
|
|
10
|
+
params: [args.hash, args.tag],
|
|
5
11
|
});
|
|
6
12
|
};
|
|
7
13
|
//# sourceMappingURL=getUserOperationReceipt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserOperationReceipt.js","sourceRoot":"","sources":["../../../../src/actions/bundler/getUserOperationReceipt.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,EAG1C,MAAe,EACf,
|
|
1
|
+
{"version":3,"file":"getUserOperationReceipt.js","sourceRoot":"","sources":["../../../../src/actions/bundler/getUserOperationReceipt.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,EAG1C,MAAe,EACf,IAGC,EACqC,EAAE;IACxC,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,MAAM,CAAC,OAAO,CAAC;YACpB,MAAM,EAAE,6BAA6B;YACrC,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;SACpB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,CAAC;QACpB,MAAM,EAAE,6BAA6B;QACrC,MAAM,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC;KAC9B,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import type { Chain, Client, Hex, Transport } from \"viem\";\nimport type { BundlerRpcSchema } from \"../../client/decorators/bundlerClient\";\nimport type { UserOperationReceipt } from \"../../types\";\n\nexport const getUserOperationReceipt = async <\n TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema>,\n>(\n client: TClient,\n args: {\n hash: Hex;\n tag: \"pending\" | \"latest\" | undefined;\n },\n): Promise<UserOperationReceipt | null> => {\n if (args.tag === undefined) {\n return client.request({\n method: \"eth_getUserOperationReceipt\",\n params: [args.hash],\n });\n }\n return client.request({\n method: \"eth_getUserOperationReceipt\",\n params: [args.hash, args.tag],\n });\n};\n"]}
|
|
@@ -24,6 +24,10 @@ export type DropAndReplaceUserOperationParameters<TAccount extends SmartContract
|
|
|
24
24
|
} & GetAccountParameter<TAccount> & GetContextParameter<TContext> & UserOperationOverridesParameter<TEntryPointVersion>;
|
|
25
25
|
export type WaitForUserOperationTxParameters = {
|
|
26
26
|
hash: Hex;
|
|
27
|
+
/**
|
|
28
|
+
* The tag to use for the UO status.
|
|
29
|
+
*/
|
|
30
|
+
tag?: "pending" | "latest";
|
|
27
31
|
/**
|
|
28
32
|
* Exponential backoff paramters that can be used to override
|
|
29
33
|
* the configuration on the client. If not provided, this method
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/types.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/types.ts"],"names":[],"mappings":";AAyKA,mCAAmC","sourcesContent":["import type { Hex, RpcTransactionRequest } from \"viem\";\nimport type {\n GetAccountParameter,\n GetEntryPointFromAccount,\n SmartContractAccount,\n} from \"../../account/smartContractAccount\";\nimport type { UpgradeToData } from \"../../client/types\";\nimport type { EntryPointVersion } from \"../../entrypoint/types\";\nimport type {\n BatchUserOperationCallData,\n UserOperationCallData,\n UserOperationOverridesParameter,\n UserOperationRequest,\n UserOperationStruct,\n} from \"../../types\";\nimport type { IsUndefined } from \"../../utils\";\n\n// [!region UpgradeAccountParams]\nexport type UpgradeAccountParams<\n TAccount extends SmartContractAccount | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n> = {\n upgradeTo: UpgradeToData;\n waitForTx?: boolean;\n} & GetAccountParameter<TAccount> &\n GetContextParameter<TContext> &\n UserOperationOverridesParameter<TEntryPointVersion>;\n// [!endregion UpgradeAccountParams]\n\n// [!region SendUserOperationParameters]\nexport type SendUserOperationParameters<\n TAccount extends SmartContractAccount | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n> = {\n uo: UserOperationCallData | BatchUserOperationCallData;\n} & GetAccountParameter<TAccount> &\n GetContextParameter<TContext> &\n UserOperationOverridesParameter<TEntryPointVersion>;\n// [!endregion SendUserOperationParameters]\n\n// [!region BuildUserOperationParameters]\nexport type BuildUserOperationParameters<\n TAccount extends SmartContractAccount | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n> = SendUserOperationParameters<TAccount, TContext, TEntryPointVersion>;\n// [!endregion BuildUserOperationParameters]\n\n// [!region SignUserOperationParameters]\nexport type SignUserOperationParameters<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n> = {\n uoStruct: UserOperationStruct<TEntryPointVersion>;\n} & GetAccountParameter<TAccount> &\n GetContextParameter<TContext>;\n// [!endregion SignUserOperationParameters]\n\n// [!region SendTransactionsParameters]\nexport type SendTransactionsParameters<\n TAccount extends SmartContractAccount | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n> = {\n requests: RpcTransactionRequest[];\n} & GetAccountParameter<TAccount> &\n GetContextParameter<TContext> &\n UserOperationOverridesParameter<TEntryPointVersion>;\n// [!endregion SendTransactionsParameters]\n\n// [!region BuildTransactionParameters]\nexport type BuildTransactionParameters<\n TAccount extends SmartContractAccount | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n> = SendTransactionsParameters<TAccount, TContext, TEntryPointVersion>;\n// [!endregion BuildTransactionParameters]\n\n// [!region DropAndReplaceUserOperationParameters]\nexport type DropAndReplaceUserOperationParameters<\n TAccount extends SmartContractAccount | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n> = {\n uoToDrop: UserOperationRequest<TEntryPointVersion>;\n} & GetAccountParameter<TAccount> &\n GetContextParameter<TContext> &\n UserOperationOverridesParameter<TEntryPointVersion>;\n// [!endregion DropAndReplaceUserOperationParameters]\n\n// [!region WaitForUserOperationTxParameters]\nexport type WaitForUserOperationTxParameters = {\n hash: Hex;\n /**\n * The tag to use for the UO status.\n */\n tag?: \"pending\" | \"latest\";\n /**\n * Exponential backoff paramters that can be used to override\n * the configuration on the client. If not provided, this method\n * will use the paramters passed via the `opts` parameter on the\n * smart account client.\n */\n retries?: {\n /**\n * the base retry interval or delay between requests\n */\n intervalMs: number;\n /**\n * the multiplier to exponentiate based on the number retries\n * setting this to one will result in a linear backoff\n */\n multiplier: number;\n /** the maximum number of retries before failing */\n maxRetries: number;\n };\n};\n// [!endregion WaitForUserOperationTxParameters]\n\n// [!region BuildUserOperationFromTransactionsResult]\nexport type BuildUserOperationFromTransactionsResult<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = {\n uoStruct: UserOperationStruct<TEntryPointVersion>;\n batch: BatchUserOperationCallData;\n} & UserOperationOverridesParameter<TEntryPointVersion, true>;\n// [!endregion BuildUserOperationFromTransactionsResult]\n\n// [!region UserOperationContext]\nexport type UserOperationContext = Record<string, any>;\n// [!endregion UserOperationContext]\n\n// [!region GetContextParameter]\nexport type GetContextParameter<\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n> =\n IsUndefined<TContext> extends true\n ? {\n context?: TContext;\n }\n : { context: TContext };\n// [!endregion GetContextParameter]\n"]}
|
|
@@ -42,7 +42,7 @@ export const waitForUserOperationTransaction = async (client_, args) => {
|
|
|
42
42
|
Math.random() * 100;
|
|
43
43
|
await new Promise((resolve) => setTimeout(resolve, txRetryIntervalWithJitterMs));
|
|
44
44
|
const receipt = await client
|
|
45
|
-
.getUserOperationReceipt(hash)
|
|
45
|
+
.getUserOperationReceipt(hash, args.tag)
|
|
46
46
|
.catch((e) => {
|
|
47
47
|
Logger.error(`[SmartAccountProvider] waitForUserOperationTransaction error fetching receipt for ${hash}: ${e}`);
|
|
48
48
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waitForUserOperationTransacation.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/waitForUserOperationTransacation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAMxB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAC1C,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,EAAE,iCAAiC,CAAC,CAAC;IAC7E,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,uBAAuB,CAC/B,wBAAwB,EACxB,iCAAiC,EACjC,MAAM,CACP,CAAC;IACJ,CAAC;IAED,MAAM,EACJ,IAAI,EACJ,OAAO,GAAG;QACR,UAAU,EAAE,MAAM,CAAC,YAAY;QAC/B,UAAU,EAAE,MAAM,CAAC,iBAAiB;QACpC,UAAU,EAAE,MAAM,CAAC,iBAAiB;KACrC,GACF,GAAG,IAAI,CAAC;IAET,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5C,MAAM,2BAA2B,GAC/B,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;YACpD,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC;QAEtB,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAC5B,UAAU,CAAC,OAAO,EAAE,2BAA2B,CAAC,CACjD,CAAC;QAEF,MAAM,OAAO,GAAG,MAAM,MAAM;aACzB,uBAAuB,CAAC,IAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"waitForUserOperationTransacation.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/waitForUserOperationTransacation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,C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CAAC,CAAC;QAEL,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,MAAM,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC;AAC/C,CAAC,CAAC","sourcesContent":["import type { Chain, Client, Hex, Transport } from \"viem\";\nimport { isBaseSmartAccountClient } from \"../../client/isSmartAccountClient.js\";\nimport { IncompatibleClientError } from \"../../errors/client.js\";\nimport { FailedToFindTransactionError } from \"../../errors/transaction.js\";\nimport { Logger } from \"../../logger.js\";\nimport type { WaitForUserOperationTxParameters } from \"./types.js\";\nimport { clientHeaderTrack } from \"../../index.js\";\n\n/**\n * Waits for a user operation transaction to be confirmed by checking the receipt periodically until it is found or a maximum number of retries is reached.\n *\n * @example\n * ```ts\n * import { createSmartAccountClient } from \"@aa-sdk/core\";\n *\n * // smart account client is already extended with waitForUserOperationTransaction\n * const client = createSmartAccountClient(...);\n * const result = await client.waitForUserOperationTransaction({\n * hash: \"0x...\",\n * retries: {...} // optional param to configure the retry amounts\n * });\n * ```\n *\n * @param {Client<TTransport, TChain, any>} client_ The client instance used to interact with the blockchain\n * @param {WaitForUserOperationTxParameters} args The parameters for the transaction to wait for\n * @param {Hex} args.hash The transaction hash to wait for\n * @param {WaitForUserOperationTxParameters[\"retries\"]} [args.retries] Optional retry parameters\n * @param {number} [args.retries.maxRetries] The maximum number of retry attempts\n * @param {number} [args.retries.intervalMs] The interval in milliseconds between retries\n * @param {number} [args.retries.multiplier] The multiplier for the interval between retries\n * @returns {Promise<Hex>} A promise that resolves to the transaction hash when the transaction is confirmed\n */\nexport const waitForUserOperationTransaction: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n>(\n client: Client<TTransport, TChain, any>,\n args: WaitForUserOperationTxParameters,\n) => Promise<Hex> = async (client_, args) => {\n const client = clientHeaderTrack(client_, \"waitForUserOperationTransaction\");\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"BaseSmartAccountClient\",\n \"waitForUserOperationTransaction\",\n client,\n );\n }\n\n const {\n hash,\n retries = {\n maxRetries: client.txMaxRetries,\n intervalMs: client.txRetryIntervalMs,\n multiplier: client.txRetryMultiplier,\n },\n } = args;\n\n for (let i = 0; i < retries.maxRetries; i++) {\n const txRetryIntervalWithJitterMs =\n retries.intervalMs * Math.pow(retries.multiplier, i) +\n Math.random() * 100;\n\n await new Promise((resolve) =>\n setTimeout(resolve, txRetryIntervalWithJitterMs),\n );\n\n const receipt = await client\n .getUserOperationReceipt(hash as `0x${string}`, args.tag)\n .catch((e) => {\n Logger.error(\n `[SmartAccountProvider] waitForUserOperationTransaction error fetching receipt for ${hash}: ${e}`,\n );\n });\n\n if (receipt) {\n return receipt?.receipt.transactionHash;\n }\n }\n\n throw new FailedToFindTransactionError(hash);\n};\n"]}
|
|
@@ -14,7 +14,7 @@ export type BundlerRpcSchema = [
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
Method: "eth_getUserOperationReceipt";
|
|
17
|
-
Parameters: [Hash];
|
|
17
|
+
Parameters: [Hash, ("pending" | "latest")?];
|
|
18
18
|
ReturnType: UserOperationReceipt | null;
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -57,9 +57,10 @@ export type BundlerActions = {
|
|
|
57
57
|
* calls `eth_getUserOperationReceipt` and returns the UserOperationReceipt
|
|
58
58
|
*
|
|
59
59
|
* @param hash - the hash of the UserOperation to get the receipt for
|
|
60
|
+
* @param tag - if client want to get receipt for different block tag.
|
|
60
61
|
* @returns - a user operation receipt or null if not found
|
|
61
62
|
*/
|
|
62
|
-
getUserOperationReceipt(hash: Hash): Promise<UserOperationReceipt | null>;
|
|
63
|
+
getUserOperationReceipt(hash: Hash, tag?: "pending" | "latest"): Promise<UserOperationReceipt | null>;
|
|
63
64
|
/**
|
|
64
65
|
* calls `eth_supportedEntryPoints` and returns the entry points the RPC supports
|
|
65
66
|
*
|
|
@@ -18,6 +18,9 @@ export const bundlerActions = (client) => ({
|
|
|
18
18
|
sendRawUserOperation: async (request, entryPoint) => sendRawUserOperation(client, { request, entryPoint }),
|
|
19
19
|
getUserOperationByHash: async (hash) => getUserOperationByHash(client, { hash }),
|
|
20
20
|
getSupportedEntryPoints: async () => getSupportedEntryPoints(client),
|
|
21
|
-
getUserOperationReceipt: async (hash) => getUserOperationReceipt(client, {
|
|
21
|
+
getUserOperationReceipt: async (hash, tag) => getUserOperationReceipt(client, {
|
|
22
|
+
hash,
|
|
23
|
+
tag,
|
|
24
|
+
}),
|
|
22
25
|
});
|
|
23
26
|
//# sourceMappingURL=bundlerClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundlerClient.js","sourceRoot":"","sources":["../../../../src/client/decorators/bundlerClient.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"bundlerClient.js","sourceRoot":"","sources":["../../../../src/client/decorators/bundlerClient.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAiGrF,8BAA8B;AAE9B;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GASL,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACjC,wBAAwB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,CACrE,wBAAwB,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC;IAC1E,oBAAoB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,CAClD,oBAAoB,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IACvD,sBAAsB,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CACrC,sBAAsB,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC;IAC1C,uBAAuB,EAAE,KAAK,IAAI,EAAE,CAAC,uBAAuB,CAAC,MAAM,CAAC;IACpE,uBAAuB,EAAE,KAAK,EAAE,IAAI,EAAE,GAAI,EAAE,EAAE,CAC5C,uBAAuB,CAAC,MAAM,EAAE;QAC9B,IAAI;QACJ,GAAG;KACJ,CAAC;CACL,CAAC,CAAC","sourcesContent":["import type {\n Address,\n Chain,\n Client,\n Hash,\n PublicRpcSchema,\n RpcStateOverride,\n StateOverride,\n Transport,\n} from \"viem\";\nimport { estimateUserOperationGas } from \"../../actions/bundler/estimateUserOperationGas.js\";\nimport { getSupportedEntryPoints } from \"../../actions/bundler/getSupportedEntryPoints.js\";\nimport { getUserOperationByHash } from \"../../actions/bundler/getUserOperationByHash.js\";\nimport { getUserOperationReceipt } from \"../../actions/bundler/getUserOperationReceipt.js\";\nimport { sendRawUserOperation } from \"../../actions/bundler/sendRawUserOperation.js\";\nimport type { EntryPointVersion } from \"../../entrypoint/types.js\";\nimport type {\n UserOperationEstimateGasResponse,\n UserOperationReceipt,\n UserOperationRequest,\n UserOperationResponse,\n} from \"../../types.js\";\n\n// Reference: https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace\nexport type BundlerRpcSchema = [\n {\n Method: \"eth_sendUserOperation\";\n Parameters: [UserOperationRequest, Address];\n ReturnType: Hash;\n },\n {\n Method: \"eth_estimateUserOperationGas\";\n Parameters: [UserOperationRequest, Address, RpcStateOverride?];\n ReturnType: UserOperationEstimateGasResponse;\n },\n {\n Method: \"eth_getUserOperationReceipt\";\n Parameters: [Hash, (\"pending\" | \"latest\")?];\n ReturnType: UserOperationReceipt | null;\n },\n {\n Method: \"eth_getUserOperationByHash\";\n Parameters: [Hash];\n ReturnType: UserOperationResponse | null;\n },\n {\n Method: \"eth_supportedEntryPoints\";\n Parameters: [];\n ReturnType: Address[];\n },\n];\n\n// [!region BundlerActions]\nexport type BundlerActions = {\n /**\n * calls `eth_estimateUserOperationGas` and returns the result\n *\n * @param request - the UserOperationRequest to estimate gas for\n * @param entryPoint - the entry point address the op will be sent to\n * @param stateOverride - the state override to use for the estimation\n * @returns the gas estimates for the given response\n */\n estimateUserOperationGas<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n >(\n request: UserOperationRequest<TEntryPointVersion>,\n entryPoint: Address,\n stateOverride?: StateOverride,\n ): Promise<UserOperationEstimateGasResponse<TEntryPointVersion>>;\n\n /**\n * calls `eth_sendUserOperation` and returns the hash of the sent UserOperation\n *\n * @param request - the UserOperationRequest to send\n * @param entryPoint - the entry point address the op will be sent to\n * @returns the hash of the sent UserOperation\n */\n sendRawUserOperation<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n >(\n request: UserOperationRequest<TEntryPointVersion>,\n entryPoint: Address,\n ): Promise<Hash>;\n\n /**\n * calls `eth_getUserOperationByHash` and returns the UserOperationResponse\n *\n * @param hash - the hash of the UserOperation to fetch\n * @returns - the user operation if found or null\n */\n getUserOperationByHash(hash: Hash): Promise<UserOperationResponse | null>;\n\n /**\n * calls `eth_getUserOperationReceipt` and returns the UserOperationReceipt\n *\n * @param hash - the hash of the UserOperation to get the receipt for\n * @param tag - if client want to get receipt for different block tag.\n * @returns - a user operation receipt or null if not found\n */\n getUserOperationReceipt(\n hash: Hash,\n tag?: \"pending\" | \"latest\",\n ): Promise<UserOperationReceipt | null>;\n\n /**\n * calls `eth_supportedEntryPoints` and returns the entry points the RPC supports\n *\n * @returns - an array of the entrypoint addresses supported\n */\n getSupportedEntryPoints(): Promise<Address[]>;\n};\n// [!endregion BundlerActions]\n\n/**\n * A viem client decorator that provides Bundler specific actions.\n * These actions include estimating gas for user operations, sending raw user operations, retrieving user operations by hash, getting supported entry points, and getting user operation receipts.\n *\n * NOTE: this is already added to the client returned from `createBundlerClient`\n *\n * @param {TClient} client The client instance that will be used to perform bundler actions\n * @returns {BundlerActions} An object containing various bundler-related actions that can be executed using the provided client\n */\nexport const bundlerActions: <\n TClient extends Client<\n Transport,\n Chain | undefined,\n any,\n [...PublicRpcSchema, ...BundlerRpcSchema]\n >,\n>(\n client: TClient,\n) => BundlerActions = (client) => ({\n estimateUserOperationGas: async (request, entryPoint, stateOverride) =>\n estimateUserOperationGas(client, { request, entryPoint, stateOverride }),\n sendRawUserOperation: async (request, entryPoint) =>\n sendRawUserOperation(client, { request, entryPoint }),\n getUserOperationByHash: async (hash) =>\n getUserOperationByHash(client, { hash }),\n getSupportedEntryPoints: async () => getSupportedEntryPoints(client),\n getUserOperationReceipt: async (hash, tag?) =>\n getUserOperationReceipt(client, {\n hash,\n tag,\n }),\n});\n"]}
|
package/dist/esm/types.d.ts
CHANGED
package/dist/esm/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAMN,MAAM,MAAM,CAAC;AA+Wd,mCAAmC","sourcesContent":["import {\n type Address,\n type Hash,\n type Hex,\n type StateOverride,\n type TransactionReceipt,\n} from \"viem\";\nimport type { z } from \"zod\";\nimport type {\n UserOperationFeeOptionsFieldSchema,\n UserOperationFeeOptionsSchema,\n UserOperationFeeOptionsSchema_v6,\n UserOperationFeeOptionsSchema_v7,\n} from \"./client/schema\";\nimport type { EntryPointVersion } from \"./entrypoint/types\";\nimport type {\n BigNumberishRangeSchema,\n BigNumberishSchema,\n MultiplierSchema,\n NoUndefined,\n} from \"./utils\";\n\nexport type EmptyHex = `0x`;\nexport type NullAddress = `0x0`;\n\n// based on @account-abstraction/common\nexport type PromiseOrValue<T> = T | Promise<T>;\nexport type BytesLike = Uint8Array | Hex;\nexport type Multiplier = z.input<typeof MultiplierSchema>;\n\nexport type BigNumberish = z.input<typeof BigNumberishSchema>;\nexport type BigNumberishRange = z.input<typeof BigNumberishRangeSchema>;\n\n// [!region UserOperationCallData]\nexport type UserOperationCallData =\n | {\n /* the target of the call */\n target: Address;\n /* the data passed to the target */\n data: Hex;\n /* the amount of native token to send to the target (default: 0) */\n value?: bigint;\n }\n | Hex;\n// [!endregion UserOperationCallData]\n\n// [!region BatchUserOperationCallData]\nexport type BatchUserOperationCallData = Exclude<UserOperationCallData, Hex>[];\n// [!endregion BatchUserOperationCallData]\n\nexport type UserOperationFeeOptionsField = z.input<\n typeof UserOperationFeeOptionsFieldSchema\n>;\n\nexport type UserOperationFeeOptions<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = TEntryPointVersion extends \"0.6.0\"\n ? z.input<typeof UserOperationFeeOptionsSchema_v6>\n : TEntryPointVersion extends \"0.7.0\"\n ? z.input<typeof UserOperationFeeOptionsSchema_v7>\n : z.input<typeof UserOperationFeeOptionsSchema>;\n\nexport type UserOperationOverridesParameter<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n Required extends boolean = false,\n> = Required extends true\n ? { overrides: UserOperationOverrides<TEntryPointVersion> }\n : { overrides?: UserOperationOverrides<TEntryPointVersion> };\n\n// [!region UserOperationPaymasterOverrides]\nexport type UserOperationPaymasterOverrides<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = TEntryPointVersion extends \"0.6.0\"\n ? {\n // paymasterData overrides to bypass paymaster middleware\n paymasterAndData: Hex;\n }\n : TEntryPointVersion extends \"0.7.0\"\n ? {\n // paymasterData overrides to bypass paymaster middleware\n // if set to '0x', all paymaster related fields are omitted from the user op request\n paymasterData: Hex;\n paymaster: Address;\n paymasterVerificationGasLimit:\n | NoUndefined<\n UserOperationStruct<\"0.7.0\">[\"paymasterVerificationGasLimit\"]\n >\n | Multiplier;\n paymasterPostOpGasLimit:\n | NoUndefined<UserOperationStruct<\"0.7.0\">[\"paymasterPostOpGasLimit\"]>\n | Multiplier;\n }\n : {};\n// [!endregion UserOperationOverridesParameter]\n\n// [!region UserOperationOverrides]\nexport type UserOperationOverrides<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = Partial<\n {\n callGasLimit:\n | UserOperationStruct<TEntryPointVersion>[\"callGasLimit\"]\n | Multiplier;\n maxFeePerGas:\n | UserOperationStruct<TEntryPointVersion>[\"maxFeePerGas\"]\n | Multiplier;\n maxPriorityFeePerGas:\n | UserOperationStruct<TEntryPointVersion>[\"maxPriorityFeePerGas\"]\n | Multiplier;\n preVerificationGas:\n | UserOperationStruct<TEntryPointVersion>[\"preVerificationGas\"]\n | Multiplier;\n verificationGasLimit:\n | UserOperationStruct<TEntryPointVersion>[\"verificationGasLimit\"]\n | Multiplier;\n\n /**\n * The same state overrides for\n * [`eth_call`](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-eth#eth-call) method.\n * An address-to-state mapping, where each entry specifies some state to be ephemerally overridden\n * prior to executing the call. State overrides allow you to customize the network state for\n * the purpose of the simulation, so this feature is useful when you need to estimate gas\n * for user operation scenarios under conditions that aren’t currently present on the live network.\n */\n stateOverride: StateOverride;\n } & UserOperationPaymasterOverrides<TEntryPointVersion>\n> &\n /**\n * This can be used to override the nonce or nonce key used when calling `entryPoint.getNonce`\n * It is useful when you want to use parallel nonces for user operations\n *\n * NOTE: not all bundlers fully support this feature and it could be that your bundler will still only include\n * one user operation for your account in a bundle\n */\n Partial<\n | {\n nonceKey: bigint;\n nonce: never;\n }\n | { nonceKey: never; nonce: bigint }\n >;\n// [!endregion UserOperationOverrides]\n\n// [!region UserOperationRequest_v6]\n// represents the request as it needs to be formatted for v0.6 RPC requests\n// Reference: https://github.com/ethereum/ERCs/blob/8dd085d159cb123f545c272c0d871a5339550e79/ERCS/erc-4337.md#definitions\nexport interface UserOperationRequest_v6 {\n /* the origin of the request */\n sender: Address;\n /* nonce (as hex) of the transaction, returned from the entry point for this Address */\n nonce: Hex;\n /* the initCode for creating the sender if it does not exist yet, otherwise \"0x\" */\n initCode: Hex | EmptyHex;\n /* the callData passed to the target */\n callData: Hex;\n /* Gas value (as hex) used by inner account execution */\n callGasLimit: Hex;\n /* Actual gas (as hex) used by the validation of this UserOperation */\n verificationGasLimit: Hex;\n /* Gas overhead (as hex) of this UserOperation */\n preVerificationGas: Hex;\n /* Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) (as hex)*/\n maxFeePerGas: Hex;\n /* Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) (as hex)*/\n maxPriorityFeePerGas: Hex;\n /* Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (\"0x\" for self-sponsored transaction) */\n paymasterAndData: Hex | EmptyHex;\n /* Data passed into the account along with the nonce during the verification step */\n signature: Hex;\n}\n// [!endregion UserOperationRequest_v6]\n\n// [!region UserOperationRequest_v7]\n// represents the request as it needs to be formatted for v0.7 RPC requests\n// Reference: https://eips.ethereum.org/EIPS/eip-4337#definitions\nexport interface UserOperationRequest_v7 {\n /* the account making the operation */\n sender: Address;\n /* anti-replay parameter. nonce of the transaction, returned from the entry point for this address */\n nonce: Hex;\n /* account factory, only for new accounts */\n factory?: Address;\n /* data for account factory (only if account factory exists) */\n factoryData?: Hex;\n /* the data to pass to the sender during the main execution call */\n callData: Hex;\n /* the amount of gas to allocate the main execution call */\n callGasLimit: Hex;\n /* the amount of gas to allocate for the verification step */\n verificationGasLimit: Hex;\n /* extra gas to pay the bunder */\n preVerificationGas: Hex;\n /* maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */\n maxFeePerGas: Hex;\n /* maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */\n maxPriorityFeePerGas: Hex;\n /* address of paymaster contract, (or empty, if account pays for itself) */\n paymaster?: Address;\n /* the amount of gas to allocate for the paymaster validation code */\n paymasterVerificationGasLimit?: Hex;\n /* the amount of gas to allocate for the paymaster post-operation code */\n paymasterPostOpGasLimit?: Hex;\n /* data for paymaster (only if paymaster exists) */\n paymasterData?: Hex;\n /* data passed into the account to verify authorization */\n signature: Hex;\n}\n// [!endregion UserOperationRequest_v7]\n\nexport type Eip7702ExtendedFields = {\n eip7702Auth?: {\n chainId: Hex;\n nonce: Hex;\n address: Address;\n r: Hex;\n s: Hex;\n yParity: Hex;\n };\n};\n\n// [!region UserOperationRequest]\n// Reference: https://eips.ethereum.org/EIPS/eip-4337#definitions\nexport type UserOperationRequest<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = (TEntryPointVersion extends \"0.6.0\"\n ? UserOperationRequest_v6\n : TEntryPointVersion extends \"0.7.0\"\n ? UserOperationRequest_v7\n : never) &\n Eip7702ExtendedFields;\n\n// [!endregion UserOperationRequest]\n\n// [!region UserOperationEstimateGasResponse]\nexport interface UserOperationEstimateGasResponse<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> {\n /* Gas overhead of this UserOperation */\n preVerificationGas: BigNumberish;\n /* Actual gas used by the validation of this UserOperation */\n verificationGasLimit: BigNumberish;\n /* Value used by inner account execution */\n callGasLimit: BigNumberish;\n /*\n * EntryPoint v0.7.0 operations only.\n * The amount of gas to allocate for the paymaster validation code.\n * Note: `eth_estimateUserOperationGas` does not return paymasterPostOpGasLimit.\n */\n paymasterVerificationGasLimit: TEntryPointVersion extends \"0.7.0\"\n ? BigNumberish | undefined\n : never;\n}\n// [!endregion UserOperationEstimateGasResponse]\n\n// [!region UserOperationResponse]\nexport interface UserOperationResponse<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> {\n /* the User Operation */\n userOperation: UserOperationRequest<TEntryPointVersion>;\n /* the address of the entry point contract that executed the user operation */\n entryPoint: Address;\n /* the block number the user operation was included in */\n blockNumber: BigNumberish;\n /* the hash of the block the user operation was included in */\n blockHash: Hash;\n /* the hash of the transaction that included the user operation */\n transactionHash: Hash;\n}\n// [!endregion UserOperationResponse]\n\n// [!region UserOperationReceipt]\nexport interface UserOperationReceipt {\n /* The request hash of the UserOperation. */\n userOpHash: Hash;\n /* The entry point address used for the UserOperation. */\n entryPoint: Address;\n /* The account initiating the UserOperation. */\n sender: Address;\n /* The nonce used in the UserOperation. */\n nonce: BigNumberish;\n /* The paymaster used for this UserOperation (or empty). */\n paymaster?: Address;\n /* The actual amount paid (by account or paymaster) for this UserOperation. */\n actualGasCost: BigNumberish;\n /* The total gas used by this UserOperation (including preVerification, creation, validation, and execution). */\n actualGasUsed: BigNumberish;\n /* Indicates whether the execution completed without reverting. */\n success: boolean;\n /* In case of revert, this is the revert reason. */\n reason?: string;\n /* The logs generated by this UserOperation (not including logs of other UserOperations in the same bundle). */\n logs: string[];\n /* The TransactionReceipt object for the entire bundle, not only for this UserOperation. */\n receipt: TransactionReceipt;\n}\n// [!endregion UserOperationReceipt]\n\n// [!region UserOperationStruct_v6]\n// https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.6/test/UserOperation.ts\n// this is used for building requests for v0.6 entry point contract\nexport interface UserOperationStruct_v6 {\n /* the origin of the request */\n sender: string;\n /* nonce of the transaction, returned from the entry point for this address */\n nonce: BigNumberish;\n /* the initCode for creating the sender if it does not exist yet, otherwise \"0x\" */\n initCode: BytesLike | \"0x\";\n /* the callData passed to the target */\n callData: BytesLike;\n /* Value used by inner account execution */\n callGasLimit?: BigNumberish;\n /* Actual gas used by the validation of this UserOperation */\n verificationGasLimit?: BigNumberish;\n /* Gas overhead of this UserOperation */\n preVerificationGas?: BigNumberish;\n /* Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */\n maxFeePerGas?: BigNumberish;\n /* Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */\n maxPriorityFeePerGas?: BigNumberish;\n /* Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (\"0x\" for self-sponsored transaction) */\n paymasterAndData: BytesLike | \"0x\";\n /* Data passed into the account along with the nonce during the verification step */\n signature: BytesLike;\n}\n// [!endregion UserOperationStruct_v6]\n\n// [!region UserOperationStruct_v7]\n// based on https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.7/test/UserOperation.ts\n// this is used for building requests for v0.7 entry point contract\nexport interface UserOperationStruct_v7 {\n /* the account making the operation */\n sender: string;\n /* anti-replay parameter. nonce of the transaction, returned from the entry point for this address */\n nonce: BigNumberish;\n /* account factory, only for new accounts */\n factory?: string;\n /* data for account factory (only if account factory exists) */\n factoryData?: BytesLike;\n /* the data to pass to the sender during the main execution call */\n callData: BytesLike;\n /* the amount of gas to allocate the main execution call */\n callGasLimit?: BigNumberish;\n /* the amount of gas to allocate for the verification step */\n verificationGasLimit?: BigNumberish;\n /* extra gas to pay the bunder */\n preVerificationGas?: BigNumberish;\n /* maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */\n maxFeePerGas?: BigNumberish;\n /* maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */\n maxPriorityFeePerGas?: BigNumberish;\n /* address of paymaster contract, (or empty, if account pays for itself) */\n paymaster?: string;\n /* the amount of gas to allocate for the paymaster validation code */\n paymasterVerificationGasLimit?: BigNumberish;\n /* the amount of gas to allocate for the paymaster post-operation code */\n paymasterPostOpGasLimit?: BigNumberish;\n /* data for paymaster (only if paymaster exists) */\n paymasterData?: BytesLike;\n /* data passed into the account to verify authorization */\n signature: BytesLike;\n}\n// [!endregion UserOperationStruct_v7]\n\n// [!region UserOperationStruct]\nexport type UserOperationStruct<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = (TEntryPointVersion extends \"0.6.0\"\n ? UserOperationStruct_v6\n : TEntryPointVersion extends \"0.7.0\"\n ? UserOperationStruct_v7\n : never) &\n Eip7702ExtendedFields;\n// [!endregion UserOperationStruct]\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAMN,MAAM,MAAM,CAAC;AAiXd,mCAAmC","sourcesContent":["import {\n type Address,\n type Hash,\n type Hex,\n type StateOverride,\n type TransactionReceipt,\n} from \"viem\";\nimport type { z } from \"zod\";\nimport type {\n UserOperationFeeOptionsFieldSchema,\n UserOperationFeeOptionsSchema,\n UserOperationFeeOptionsSchema_v6,\n UserOperationFeeOptionsSchema_v7,\n} from \"./client/schema\";\nimport type { EntryPointVersion } from \"./entrypoint/types\";\nimport type {\n BigNumberishRangeSchema,\n BigNumberishSchema,\n MultiplierSchema,\n NoUndefined,\n} from \"./utils\";\n\nexport type EmptyHex = `0x`;\nexport type NullAddress = `0x0`;\n\n// based on @account-abstraction/common\nexport type PromiseOrValue<T> = T | Promise<T>;\nexport type BytesLike = Uint8Array | Hex;\nexport type Multiplier = z.input<typeof MultiplierSchema>;\n\nexport type BigNumberish = z.input<typeof BigNumberishSchema>;\nexport type BigNumberishRange = z.input<typeof BigNumberishRangeSchema>;\n\n// [!region UserOperationCallData]\nexport type UserOperationCallData =\n | {\n /* the target of the call */\n target: Address;\n /* the data passed to the target */\n data: Hex;\n /* the amount of native token to send to the target (default: 0) */\n value?: bigint;\n }\n | Hex;\n// [!endregion UserOperationCallData]\n\n// [!region BatchUserOperationCallData]\nexport type BatchUserOperationCallData = Exclude<UserOperationCallData, Hex>[];\n// [!endregion BatchUserOperationCallData]\n\nexport type UserOperationFeeOptionsField = z.input<\n typeof UserOperationFeeOptionsFieldSchema\n>;\n\nexport type UserOperationFeeOptions<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = TEntryPointVersion extends \"0.6.0\"\n ? z.input<typeof UserOperationFeeOptionsSchema_v6>\n : TEntryPointVersion extends \"0.7.0\"\n ? z.input<typeof UserOperationFeeOptionsSchema_v7>\n : z.input<typeof UserOperationFeeOptionsSchema>;\n\nexport type UserOperationOverridesParameter<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n Required extends boolean = false,\n> = Required extends true\n ? { overrides: UserOperationOverrides<TEntryPointVersion> }\n : { overrides?: UserOperationOverrides<TEntryPointVersion> };\n\n// [!region UserOperationPaymasterOverrides]\nexport type UserOperationPaymasterOverrides<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = TEntryPointVersion extends \"0.6.0\"\n ? {\n // paymasterData overrides to bypass paymaster middleware\n paymasterAndData: Hex;\n }\n : TEntryPointVersion extends \"0.7.0\"\n ? {\n // paymasterData overrides to bypass paymaster middleware\n // if set to '0x', all paymaster related fields are omitted from the user op request\n paymasterData: Hex;\n paymaster: Address;\n paymasterVerificationGasLimit:\n | NoUndefined<\n UserOperationStruct<\"0.7.0\">[\"paymasterVerificationGasLimit\"]\n >\n | Multiplier;\n paymasterPostOpGasLimit:\n | NoUndefined<UserOperationStruct<\"0.7.0\">[\"paymasterPostOpGasLimit\"]>\n | Multiplier;\n }\n : {};\n// [!endregion UserOperationOverridesParameter]\n\n// [!region UserOperationOverrides]\nexport type UserOperationOverrides<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = Partial<\n {\n callGasLimit:\n | UserOperationStruct<TEntryPointVersion>[\"callGasLimit\"]\n | Multiplier;\n maxFeePerGas:\n | UserOperationStruct<TEntryPointVersion>[\"maxFeePerGas\"]\n | Multiplier;\n maxPriorityFeePerGas:\n | UserOperationStruct<TEntryPointVersion>[\"maxPriorityFeePerGas\"]\n | Multiplier;\n preVerificationGas:\n | UserOperationStruct<TEntryPointVersion>[\"preVerificationGas\"]\n | Multiplier;\n verificationGasLimit:\n | UserOperationStruct<TEntryPointVersion>[\"verificationGasLimit\"]\n | Multiplier;\n\n /**\n * The same state overrides for\n * [`eth_call`](https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-eth#eth-call) method.\n * An address-to-state mapping, where each entry specifies some state to be ephemerally overridden\n * prior to executing the call. State overrides allow you to customize the network state for\n * the purpose of the simulation, so this feature is useful when you need to estimate gas\n * for user operation scenarios under conditions that aren’t currently present on the live network.\n */\n stateOverride: StateOverride;\n } & UserOperationPaymasterOverrides<TEntryPointVersion>\n> &\n /**\n * This can be used to override the nonce or nonce key used when calling `entryPoint.getNonce`\n * It is useful when you want to use parallel nonces for user operations\n *\n * NOTE: not all bundlers fully support this feature and it could be that your bundler will still only include\n * one user operation for your account in a bundle\n */\n Partial<\n | {\n nonceKey: bigint;\n nonce: never;\n }\n | { nonceKey: never; nonce: bigint }\n >;\n// [!endregion UserOperationOverrides]\n\n// [!region UserOperationRequest_v6]\n// represents the request as it needs to be formatted for v0.6 RPC requests\n// Reference: https://github.com/ethereum/ERCs/blob/8dd085d159cb123f545c272c0d871a5339550e79/ERCS/erc-4337.md#definitions\nexport interface UserOperationRequest_v6 {\n /* the origin of the request */\n sender: Address;\n /* nonce (as hex) of the transaction, returned from the entry point for this Address */\n nonce: Hex;\n /* the initCode for creating the sender if it does not exist yet, otherwise \"0x\" */\n initCode: Hex | EmptyHex;\n /* the callData passed to the target */\n callData: Hex;\n /* Gas value (as hex) used by inner account execution */\n callGasLimit: Hex;\n /* Actual gas (as hex) used by the validation of this UserOperation */\n verificationGasLimit: Hex;\n /* Gas overhead (as hex) of this UserOperation */\n preVerificationGas: Hex;\n /* Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) (as hex)*/\n maxFeePerGas: Hex;\n /* Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) (as hex)*/\n maxPriorityFeePerGas: Hex;\n /* Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (\"0x\" for self-sponsored transaction) */\n paymasterAndData: Hex | EmptyHex;\n /* Data passed into the account along with the nonce during the verification step */\n signature: Hex;\n}\n// [!endregion UserOperationRequest_v6]\n\n// [!region UserOperationRequest_v7]\n// represents the request as it needs to be formatted for v0.7 RPC requests\n// Reference: https://eips.ethereum.org/EIPS/eip-4337#definitions\nexport interface UserOperationRequest_v7 {\n /* the account making the operation */\n sender: Address;\n /* anti-replay parameter. nonce of the transaction, returned from the entry point for this address */\n nonce: Hex;\n /* account factory, only for new accounts */\n factory?: Address;\n /* data for account factory (only if account factory exists) */\n factoryData?: Hex;\n /* the data to pass to the sender during the main execution call */\n callData: Hex;\n /* the amount of gas to allocate the main execution call */\n callGasLimit: Hex;\n /* the amount of gas to allocate for the verification step */\n verificationGasLimit: Hex;\n /* extra gas to pay the bunder */\n preVerificationGas: Hex;\n /* maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */\n maxFeePerGas: Hex;\n /* maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */\n maxPriorityFeePerGas: Hex;\n /* address of paymaster contract, (or empty, if account pays for itself) */\n paymaster?: Address;\n /* the amount of gas to allocate for the paymaster validation code */\n paymasterVerificationGasLimit?: Hex;\n /* the amount of gas to allocate for the paymaster post-operation code */\n paymasterPostOpGasLimit?: Hex;\n /* data for paymaster (only if paymaster exists) */\n paymasterData?: Hex;\n /* data passed into the account to verify authorization */\n signature: Hex;\n}\n// [!endregion UserOperationRequest_v7]\n\nexport type Eip7702ExtendedFields = {\n eip7702Auth?: {\n chainId: Hex;\n nonce: Hex;\n address: Address;\n r: Hex;\n s: Hex;\n yParity: Hex;\n };\n};\n\n// [!region UserOperationRequest]\n// Reference: https://eips.ethereum.org/EIPS/eip-4337#definitions\nexport type UserOperationRequest<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = (TEntryPointVersion extends \"0.6.0\"\n ? UserOperationRequest_v6\n : TEntryPointVersion extends \"0.7.0\"\n ? UserOperationRequest_v7\n : never) &\n Eip7702ExtendedFields;\n\n// [!endregion UserOperationRequest]\n\n// [!region UserOperationEstimateGasResponse]\nexport interface UserOperationEstimateGasResponse<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> {\n /* Gas overhead of this UserOperation */\n preVerificationGas: BigNumberish;\n /* Actual gas used by the validation of this UserOperation */\n verificationGasLimit: BigNumberish;\n /* Value used by inner account execution */\n callGasLimit: BigNumberish;\n /*\n * EntryPoint v0.7.0 operations only.\n * The amount of gas to allocate for the paymaster validation code.\n * Note: `eth_estimateUserOperationGas` does not return paymasterPostOpGasLimit.\n */\n paymasterVerificationGasLimit: TEntryPointVersion extends \"0.7.0\"\n ? BigNumberish | undefined\n : never;\n}\n// [!endregion UserOperationEstimateGasResponse]\n\n// [!region UserOperationResponse]\nexport interface UserOperationResponse<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> {\n /* the User Operation */\n userOperation: UserOperationRequest<TEntryPointVersion>;\n /* the address of the entry point contract that executed the user operation */\n entryPoint: Address;\n /* the block number the user operation was included in */\n blockNumber: BigNumberish;\n /* the hash of the block the user operation was included in */\n blockHash: Hash;\n /* the hash of the transaction that included the user operation */\n transactionHash: Hash;\n}\n// [!endregion UserOperationResponse]\n\n// [!region UserOperationReceipt]\nexport interface UserOperationReceipt {\n /* The request hash of the UserOperation. */\n userOpHash: Hash;\n /* The entry point address used for the UserOperation. */\n entryPoint: Address;\n /* The account initiating the UserOperation. */\n sender: Address;\n /* The nonce used in the UserOperation. */\n nonce: BigNumberish;\n /* The paymaster used for this UserOperation (or empty). */\n paymaster?: Address;\n /* The actual amount paid (by account or paymaster) for this UserOperation. */\n actualGasCost: BigNumberish;\n /* The total gas used by this UserOperation (including preVerification, creation, validation, and execution). */\n actualGasUsed: BigNumberish;\n /* Indicates whether the execution completed without reverting. */\n success: boolean;\n /* In case of revert, this is the revert reason. */\n reason?: string;\n /* The logs generated by this UserOperation (not including logs of other UserOperations in the same bundle). */\n logs: string[];\n /* The TransactionReceipt object for the entire bundle, not only for this UserOperation. */\n receipt: TransactionReceipt;\n /* The status of the useroperation. Could be \"Mined\" or \"Preconfirmed\". */\n status: string;\n}\n// [!endregion UserOperationReceipt]\n\n// [!region UserOperationStruct_v6]\n// https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.6/test/UserOperation.ts\n// this is used for building requests for v0.6 entry point contract\nexport interface UserOperationStruct_v6 {\n /* the origin of the request */\n sender: string;\n /* nonce of the transaction, returned from the entry point for this address */\n nonce: BigNumberish;\n /* the initCode for creating the sender if it does not exist yet, otherwise \"0x\" */\n initCode: BytesLike | \"0x\";\n /* the callData passed to the target */\n callData: BytesLike;\n /* Value used by inner account execution */\n callGasLimit?: BigNumberish;\n /* Actual gas used by the validation of this UserOperation */\n verificationGasLimit?: BigNumberish;\n /* Gas overhead of this UserOperation */\n preVerificationGas?: BigNumberish;\n /* Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */\n maxFeePerGas?: BigNumberish;\n /* Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */\n maxPriorityFeePerGas?: BigNumberish;\n /* Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (\"0x\" for self-sponsored transaction) */\n paymasterAndData: BytesLike | \"0x\";\n /* Data passed into the account along with the nonce during the verification step */\n signature: BytesLike;\n}\n// [!endregion UserOperationStruct_v6]\n\n// [!region UserOperationStruct_v7]\n// based on https://github.com/eth-infinitism/account-abstraction/blob/releases/v0.7/test/UserOperation.ts\n// this is used for building requests for v0.7 entry point contract\nexport interface UserOperationStruct_v7 {\n /* the account making the operation */\n sender: string;\n /* anti-replay parameter. nonce of the transaction, returned from the entry point for this address */\n nonce: BigNumberish;\n /* account factory, only for new accounts */\n factory?: string;\n /* data for account factory (only if account factory exists) */\n factoryData?: BytesLike;\n /* the data to pass to the sender during the main execution call */\n callData: BytesLike;\n /* the amount of gas to allocate the main execution call */\n callGasLimit?: BigNumberish;\n /* the amount of gas to allocate for the verification step */\n verificationGasLimit?: BigNumberish;\n /* extra gas to pay the bunder */\n preVerificationGas?: BigNumberish;\n /* maximum fee per gas (similar to EIP-1559 max_fee_per_gas) */\n maxFeePerGas?: BigNumberish;\n /* maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) */\n maxPriorityFeePerGas?: BigNumberish;\n /* address of paymaster contract, (or empty, if account pays for itself) */\n paymaster?: string;\n /* the amount of gas to allocate for the paymaster validation code */\n paymasterVerificationGasLimit?: BigNumberish;\n /* the amount of gas to allocate for the paymaster post-operation code */\n paymasterPostOpGasLimit?: BigNumberish;\n /* data for paymaster (only if paymaster exists) */\n paymasterData?: BytesLike;\n /* data passed into the account to verify authorization */\n signature: BytesLike;\n}\n// [!endregion UserOperationStruct_v7]\n\n// [!region UserOperationStruct]\nexport type UserOperationStruct<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion,\n> = (TEntryPointVersion extends \"0.6.0\"\n ? UserOperationStruct_v6\n : TEntryPointVersion extends \"0.7.0\"\n ? UserOperationStruct_v7\n : never) &\n Eip7702ExtendedFields;\n// [!endregion UserOperationStruct]\n"]}
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.61.0";
|
package/dist/esm/version.js
CHANGED
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.61.0\";\n"]}
|
|
@@ -3,5 +3,6 @@ import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient";
|
|
|
3
3
|
import type { UserOperationReceipt } from "../../types";
|
|
4
4
|
export declare const getUserOperationReceipt: <TClient extends Client<Transport, Chain | undefined, any, BundlerRpcSchema>>(client: TClient, args: {
|
|
5
5
|
hash: Hex;
|
|
6
|
+
tag: "pending" | "latest" | undefined;
|
|
6
7
|
}) => Promise<UserOperationReceipt | null>;
|
|
7
8
|
//# sourceMappingURL=getUserOperationReceipt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserOperationReceipt.d.ts","sourceRoot":"","sources":["../../../../src/actions/bundler/getUserOperationReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,eAAO,MAAM,uBAAuB,GAClC,OAAO,SAAS,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,GAAG,EAAE,gBAAgB,CAAC,EAE3E,QAAQ,OAAO,EACf,MAAM;IACJ,IAAI,EAAE,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"getUserOperationReceipt.d.ts","sourceRoot":"","sources":["../../../../src/actions/bundler/getUserOperationReceipt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,eAAO,MAAM,uBAAuB,GAClC,OAAO,SAAS,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,GAAG,EAAE,gBAAgB,CAAC,EAE3E,QAAQ,OAAO,EACf,MAAM;IACJ,IAAI,EAAE,GAAG,CAAC;IACV,GAAG,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACvC,KACA,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAWrC,CAAC"}
|
|
@@ -24,6 +24,10 @@ export type DropAndReplaceUserOperationParameters<TAccount extends SmartContract
|
|
|
24
24
|
} & GetAccountParameter<TAccount> & GetContextParameter<TContext> & UserOperationOverridesParameter<TEntryPointVersion>;
|
|
25
25
|
export type WaitForUserOperationTxParameters = {
|
|
26
26
|
hash: Hex;
|
|
27
|
+
/**
|
|
28
|
+
* The tag to use for the UO status.
|
|
29
|
+
*/
|
|
30
|
+
tag?: "pending" | "latest";
|
|
27
31
|
/**
|
|
28
32
|
* Exponential backoff paramters that can be used to override
|
|
29
33
|
* the configuration on the client. If not provided, this method
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,qBAAqB,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EACV,0BAA0B,EAC1B,qBAAqB,EACrB,+BAA+B,EAC/B,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,MAAM,oBAAoB,CAC9B,QAAQ,SAAS,oBAAoB,GAAG,SAAS,EACjD,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,EACb,kBAAkB,SAChB,wBAAwB,CAAC,QAAQ,CAAC,GAAG,wBAAwB,CAAC,QAAQ,CAAC,IACvE;IACF,SAAS,EAAE,aAAa,CAAC;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EAAE,SAAS,GAAG,QAAQ,CAAC;IAC3B;;;;;OAKG;IACH,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QACnB;;;WAGG;QACH,UAAU,EAAE,MAAM,CAAC;QACnB,mDAAmD;QACnD,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAIF,MAAM,MAAM,wCAAwC,CAClD,kBAAkB,SAAS,iBAAiB,GAAG,iBAAiB,IAC9D;IACF,QAAQ,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;IAClD,KAAK,EAAE,0BAA0B,CAAC;CACnC,GAAG,+BAA+B,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;AAI9D,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAIvD,MAAM,MAAM,mBAAmB,CAC7B,QAAQ,SAAS,oBAAoB,GAAG,SAAS,GAC7C,oBAAoB,GACpB,SAAS,IAEb,WAAW,CAAC,QAAQ,CAAC,SAAS,IAAI,GAC9B;IACE,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB,GACD;IAAE,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC"}
|
|
@@ -14,7 +14,7 @@ export type BundlerRpcSchema = [
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
Method: "eth_getUserOperationReceipt";
|
|
17
|
-
Parameters: [Hash];
|
|
17
|
+
Parameters: [Hash, ("pending" | "latest")?];
|
|
18
18
|
ReturnType: UserOperationReceipt | null;
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -57,9 +57,10 @@ export type BundlerActions = {
|
|
|
57
57
|
* calls `eth_getUserOperationReceipt` and returns the UserOperationReceipt
|
|
58
58
|
*
|
|
59
59
|
* @param hash - the hash of the UserOperation to get the receipt for
|
|
60
|
+
* @param tag - if client want to get receipt for different block tag.
|
|
60
61
|
* @returns - a user operation receipt or null if not found
|
|
61
62
|
*/
|
|
62
|
-
getUserOperationReceipt(hash: Hash): Promise<UserOperationReceipt | null>;
|
|
63
|
+
getUserOperationReceipt(hash: Hash, tag?: "pending" | "latest"): Promise<UserOperationReceipt | null>;
|
|
63
64
|
/**
|
|
64
65
|
* calls `eth_supportedEntryPoints` and returns the entry points the RPC supports
|
|
65
66
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundlerClient.d.ts","sourceRoot":"","sources":["../../../../src/client/decorators/bundlerClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EACL,MAAM,EACN,IAAI,EACJ,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,SAAS,EACV,MAAM,MAAM,CAAC;AAMd,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EACV,gCAAgC,EAChC,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAGxB,MAAM,MAAM,gBAAgB,GAAG;IAC7B;QACE,MAAM,EAAE,uBAAuB,CAAC;QAChC,UAAU,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;QAC5C,UAAU,EAAE,IAAI,CAAC;KAClB;IACD;QACE,MAAM,EAAE,8BAA8B,CAAC;QACvC,UAAU,EAAE,CAAC,oBAAoB,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC;QAC/D,UAAU,EAAE,gCAAgC,CAAC;KAC9C;IACD;QACE,MAAM,EAAE,6BAA6B,CAAC;QACtC,UAAU,EAAE,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"bundlerClient.d.ts","sourceRoot":"","sources":["../../../../src/client/decorators/bundlerClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EACL,MAAM,EACN,IAAI,EACJ,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,SAAS,EACV,MAAM,MAA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AAE,YAAY,CAAC;IAEpC,kBAAkB,CAAC,EAAE,YAAY,CAAC;IAElC,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,oBAAoB,CAAC,EAAE,YAAY,CAAC;IAEpC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,6BAA6B,CAAC,EAAE,YAAY,CAAC;IAE7C,uBAAuB,CAAC,EAAE,YAAY,CAAC;IAEvC,aAAa,CAAC,EAAE,SAAS,CAAC;IAE1B,SAAS,EAAE,SAAS,CAAC;CACtB;AAID,MAAM,MAAM,mBAAmB,CAC7B,kBAAkB,SAAS,iBAAiB,GAAG,iBAAiB,IAC9D,CAAC,kBAAkB,SAAS,OAAO,GACnC,sBAAsB,GACtB,kBAAkB,SAAS,OAAO,GAChC,sBAAsB,GACtB,KAAK,CAAC,GACV,qBAAqB,CAAC"}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.61.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aa-sdk/core",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.61.0",
|
|
5
5
|
"description": "viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts",
|
|
6
6
|
"author": "Alchemy",
|
|
7
7
|
"type": "module",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"url": "https://github.com/alchemyplatform/aa-sdk/issues"
|
|
63
63
|
},
|
|
64
64
|
"homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "cb25c3a1f44b589de97fefcf930fc373a6ff9bc9"
|
|
66
66
|
}
|
|
@@ -8,10 +8,17 @@ export const getUserOperationReceipt = async <
|
|
|
8
8
|
client: TClient,
|
|
9
9
|
args: {
|
|
10
10
|
hash: Hex;
|
|
11
|
+
tag: "pending" | "latest" | undefined;
|
|
11
12
|
},
|
|
12
13
|
): Promise<UserOperationReceipt | null> => {
|
|
14
|
+
if (args.tag === undefined) {
|
|
15
|
+
return client.request({
|
|
16
|
+
method: "eth_getUserOperationReceipt",
|
|
17
|
+
params: [args.hash],
|
|
18
|
+
});
|
|
19
|
+
}
|
|
13
20
|
return client.request({
|
|
14
21
|
method: "eth_getUserOperationReceipt",
|
|
15
|
-
params: [args.hash],
|
|
22
|
+
params: [args.hash, args.tag],
|
|
16
23
|
});
|
|
17
24
|
};
|
|
@@ -117,6 +117,10 @@ export type DropAndReplaceUserOperationParameters<
|
|
|
117
117
|
// [!region WaitForUserOperationTxParameters]
|
|
118
118
|
export type WaitForUserOperationTxParameters = {
|
|
119
119
|
hash: Hex;
|
|
120
|
+
/**
|
|
121
|
+
* The tag to use for the UO status.
|
|
122
|
+
*/
|
|
123
|
+
tag?: "pending" | "latest";
|
|
120
124
|
/**
|
|
121
125
|
* Exponential backoff paramters that can be used to override
|
|
122
126
|
* the configuration on the client. If not provided, this method
|
|
@@ -65,7 +65,7 @@ export const waitForUserOperationTransaction: <
|
|
|
65
65
|
);
|
|
66
66
|
|
|
67
67
|
const receipt = await client
|
|
68
|
-
.getUserOperationReceipt(hash as `0x${string}
|
|
68
|
+
.getUserOperationReceipt(hash as `0x${string}`, args.tag)
|
|
69
69
|
.catch((e) => {
|
|
70
70
|
Logger.error(
|
|
71
71
|
`[SmartAccountProvider] waitForUserOperationTransaction error fetching receipt for ${hash}: ${e}`,
|
|
@@ -35,7 +35,7 @@ export type BundlerRpcSchema = [
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
Method: "eth_getUserOperationReceipt";
|
|
38
|
-
Parameters: [Hash];
|
|
38
|
+
Parameters: [Hash, ("pending" | "latest")?];
|
|
39
39
|
ReturnType: UserOperationReceipt | null;
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -94,9 +94,13 @@ export type BundlerActions = {
|
|
|
94
94
|
* calls `eth_getUserOperationReceipt` and returns the UserOperationReceipt
|
|
95
95
|
*
|
|
96
96
|
* @param hash - the hash of the UserOperation to get the receipt for
|
|
97
|
+
* @param tag - if client want to get receipt for different block tag.
|
|
97
98
|
* @returns - a user operation receipt or null if not found
|
|
98
99
|
*/
|
|
99
|
-
getUserOperationReceipt(
|
|
100
|
+
getUserOperationReceipt(
|
|
101
|
+
hash: Hash,
|
|
102
|
+
tag?: "pending" | "latest",
|
|
103
|
+
): Promise<UserOperationReceipt | null>;
|
|
100
104
|
|
|
101
105
|
/**
|
|
102
106
|
* calls `eth_supportedEntryPoints` and returns the entry points the RPC supports
|
|
@@ -133,6 +137,9 @@ export const bundlerActions: <
|
|
|
133
137
|
getUserOperationByHash: async (hash) =>
|
|
134
138
|
getUserOperationByHash(client, { hash }),
|
|
135
139
|
getSupportedEntryPoints: async () => getSupportedEntryPoints(client),
|
|
136
|
-
getUserOperationReceipt: async (hash) =>
|
|
137
|
-
getUserOperationReceipt(client, {
|
|
140
|
+
getUserOperationReceipt: async (hash, tag?) =>
|
|
141
|
+
getUserOperationReceipt(client, {
|
|
142
|
+
hash,
|
|
143
|
+
tag,
|
|
144
|
+
}),
|
|
138
145
|
});
|
package/src/types.ts
CHANGED
|
@@ -293,6 +293,8 @@ export interface UserOperationReceipt {
|
|
|
293
293
|
logs: string[];
|
|
294
294
|
/* The TransactionReceipt object for the entire bundle, not only for this UserOperation. */
|
|
295
295
|
receipt: TransactionReceipt;
|
|
296
|
+
/* The status of the useroperation. Could be "Mined" or "Preconfirmed". */
|
|
297
|
+
status: string;
|
|
296
298
|
}
|
|
297
299
|
// [!endregion UserOperationReceipt]
|
|
298
300
|
|
package/src/version.ts
CHANGED