@aa-sdk/core 4.61.0 → 4.62.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/smartAccount/waitForUserOperationTransacation.d.ts +1 -0
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js +1 -0
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.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/smartAccount/waitForUserOperationTransacation.d.ts +1 -0
- package/dist/types/actions/smartAccount/waitForUserOperationTransacation.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/actions/smartAccount/waitForUserOperationTransacation.ts +1 -0
- package/src/version.ts +1 -1
|
@@ -18,6 +18,7 @@ import type { WaitForUserOperationTxParameters } from "./types.js";
|
|
|
18
18
|
* @param {Client<TTransport, TChain, any>} client_ The client instance used to interact with the blockchain
|
|
19
19
|
* @param {WaitForUserOperationTxParameters} args The parameters for the transaction to wait for
|
|
20
20
|
* @param {Hex} args.hash The transaction hash to wait for
|
|
21
|
+
* @param {string} args.tag The tag to use for the UO status. "pending" or "latest". Defaults to "latest".
|
|
21
22
|
* @param {WaitForUserOperationTxParameters["retries"]} [args.retries] Optional retry parameters
|
|
22
23
|
* @param {number} [args.retries.maxRetries] The maximum number of retry attempts
|
|
23
24
|
* @param {number} [args.retries.intervalMs] The interval in milliseconds between retries
|
|
@@ -21,6 +21,7 @@ import { clientHeaderTrack } from "../../index.js";
|
|
|
21
21
|
* @param {Client<TTransport, TChain, any>} client_ The client instance used to interact with the blockchain
|
|
22
22
|
* @param {WaitForUserOperationTxParameters} args The parameters for the transaction to wait for
|
|
23
23
|
* @param {Hex} args.hash The transaction hash to wait for
|
|
24
|
+
* @param {string} args.tag The tag to use for the UO status. "pending" or "latest". Defaults to "latest".
|
|
24
25
|
* @param {WaitForUserOperationTxParameters["retries"]} [args.retries] Optional retry parameters
|
|
25
26
|
* @param {number} [args.retries.maxRetries] The maximum number of retry attempts
|
|
26
27
|
* @param {number} [args.retries.intervalMs] The interval in milliseconds between retries
|
|
@@ -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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;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,EAAE,IAAI,CAAC,GAAG,CAAC;aACxD,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;YACX,MAAM,CAAC,KAAK,CACV,qFAAqF,IAAI,KAAK,CAAC,EAAE,CAClG,CAAC;QACJ,CAAC,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 {string} args.tag The tag to use for the UO status. \"pending\" or \"latest\". Defaults to \"latest\".\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"]}
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.62.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.62.0\";\n"]}
|
|
@@ -18,6 +18,7 @@ import type { WaitForUserOperationTxParameters } from "./types.js";
|
|
|
18
18
|
* @param {Client<TTransport, TChain, any>} client_ The client instance used to interact with the blockchain
|
|
19
19
|
* @param {WaitForUserOperationTxParameters} args The parameters for the transaction to wait for
|
|
20
20
|
* @param {Hex} args.hash The transaction hash to wait for
|
|
21
|
+
* @param {string} args.tag The tag to use for the UO status. "pending" or "latest". Defaults to "latest".
|
|
21
22
|
* @param {WaitForUserOperationTxParameters["retries"]} [args.retries] Optional retry parameters
|
|
22
23
|
* @param {number} [args.retries.maxRetries] The maximum number of retry attempts
|
|
23
24
|
* @param {number} [args.retries.intervalMs] The interval in milliseconds between retries
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waitForUserOperationTransacation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/waitForUserOperationTransacation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAK1D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAGnE
|
|
1
|
+
{"version":3,"file":"waitForUserOperationTransacation.d.ts","sourceRoot":"","sources":["../../../../src/actions/smartAccount/waitForUserOperationTransacation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAK1D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAGnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,+BAA+B,EAAE,CAC5C,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,CAAC,EACvC,IAAI,EAAE,gCAAgC,KACnC,OAAO,CAAC,GAAG,CA0Cf,CAAC"}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.62.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.62.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": "9306dd1e2921046dd3d6402b3a569c34f5b66130"
|
|
66
66
|
}
|
|
@@ -24,6 +24,7 @@ import { clientHeaderTrack } from "../../index.js";
|
|
|
24
24
|
* @param {Client<TTransport, TChain, any>} client_ The client instance used to interact with the blockchain
|
|
25
25
|
* @param {WaitForUserOperationTxParameters} args The parameters for the transaction to wait for
|
|
26
26
|
* @param {Hex} args.hash The transaction hash to wait for
|
|
27
|
+
* @param {string} args.tag The tag to use for the UO status. "pending" or "latest". Defaults to "latest".
|
|
27
28
|
* @param {WaitForUserOperationTxParameters["retries"]} [args.retries] Optional retry parameters
|
|
28
29
|
* @param {number} [args.retries.maxRetries] The maximum number of retry attempts
|
|
29
30
|
* @param {number} [args.retries.intervalMs] The interval in milliseconds between retries
|
package/src/version.ts
CHANGED