@aa-sdk/core 4.35.0 → 4.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/esm/account/smartContractAccount.d.ts +1 -1
- package/dist/esm/account/smartContractAccount.js.map +1 -1
- package/dist/esm/actions/bundler/estimateUserOperationGas.d.ts +3 -2
- package/dist/esm/actions/bundler/estimateUserOperationGas.js.map +1 -1
- package/dist/esm/actions/bundler/getSupportedEntryPoints.js.map +1 -1
- package/dist/esm/actions/bundler/getUserOperationByHash.js.map +1 -1
- package/dist/esm/actions/bundler/getUserOperationReceipt.js.map +1 -1
- package/dist/esm/actions/bundler/sendRawUserOperation.d.ts +2 -1
- package/dist/esm/actions/bundler/sendRawUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperationFromTx.js.map +1 -1
- package/dist/esm/actions/smartAccount/buildUserOperationFromTxs.js.map +1 -1
- package/dist/esm/actions/smartAccount/checkGasSponsorshipEligibility.js.map +1 -1
- package/dist/esm/actions/smartAccount/dropAndReplaceUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/estimateUserOperationGas.js.map +1 -1
- package/dist/esm/actions/smartAccount/getAddress.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/initUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/runMiddlewareStack.js.map +1 -1
- package/dist/esm/actions/smartAccount/internal/sendUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendTransaction.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendTransactions.js.map +1 -1
- package/dist/esm/actions/smartAccount/sendUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/signMessage.js.map +1 -1
- package/dist/esm/actions/smartAccount/signTypedData.js.map +1 -1
- package/dist/esm/actions/smartAccount/signUserOperation.js.map +1 -1
- package/dist/esm/actions/smartAccount/types.js.map +1 -1
- package/dist/esm/actions/smartAccount/upgradeAccount.js.map +1 -1
- package/dist/esm/actions/smartAccount/waitForUserOperationTransacation.js.map +1 -1
- package/dist/esm/client/addBreadcrumb.js.map +1 -1
- package/dist/esm/client/bundlerClient.js.map +1 -1
- package/dist/esm/client/decorators/bundlerClient.js.map +1 -1
- package/dist/esm/client/decorators/smartAccountClient.js.map +1 -1
- package/dist/esm/client/isSmartAccountClient.js.map +1 -1
- package/dist/esm/client/schema.d.ts +25 -25
- package/dist/esm/client/schema.js.map +1 -1
- package/dist/esm/client/smartAccountClient.js.map +1 -1
- package/dist/esm/client/types.js.map +1 -1
- package/dist/esm/ens/utils.js.map +1 -1
- package/dist/esm/entrypoint/0.6.d.ts +2 -2
- package/dist/esm/entrypoint/0.6.js.map +1 -1
- package/dist/esm/entrypoint/0.7.d.ts +1 -1
- package/dist/esm/entrypoint/0.7.js.map +1 -1
- package/dist/esm/entrypoint/index.d.ts +1 -1
- package/dist/esm/entrypoint/index.js.map +1 -1
- package/dist/esm/entrypoint/types.js.map +1 -1
- package/dist/esm/errors/account.js.map +1 -1
- package/dist/esm/errors/client.js.map +1 -1
- package/dist/esm/errors/entrypoint.js.map +1 -1
- package/dist/esm/errors/signer.js.map +1 -1
- package/dist/esm/errors/useroperation.js.map +1 -1
- package/dist/esm/middleware/actions.js.map +1 -1
- package/dist/esm/middleware/defaults/7702gasEstimator.d.ts +2 -2
- package/dist/esm/middleware/defaults/7702gasEstimator.js +2 -2
- package/dist/esm/middleware/defaults/7702gasEstimator.js.map +1 -1
- package/dist/esm/middleware/defaults/7702signer.d.ts +1 -1
- package/dist/esm/middleware/defaults/7702signer.js +1 -1
- package/dist/esm/middleware/defaults/7702signer.js.map +1 -1
- package/dist/esm/middleware/defaults/feeEstimator.js.map +1 -1
- package/dist/esm/middleware/defaults/gasEstimator.js.map +1 -1
- package/dist/esm/middleware/defaults/paymasterAndData.js.map +1 -1
- package/dist/esm/middleware/defaults/userOpSigner.js.map +1 -1
- package/dist/esm/middleware/erc7677middleware.js.map +1 -1
- package/dist/esm/middleware/types.js.map +1 -1
- package/dist/esm/signer/local-account.d.ts +2 -207
- package/dist/esm/signer/local-account.js.map +1 -1
- package/dist/esm/signer/schema.d.ts +1 -1
- package/dist/esm/signer/types.js.map +1 -1
- package/dist/esm/signer/wallet-client.d.ts +2 -207
- package/dist/esm/signer/wallet-client.js.map +1 -1
- package/dist/esm/transport/split.js.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/bigint.js.map +1 -1
- package/dist/esm/utils/defaults.js.map +1 -1
- package/dist/esm/utils/index.d.ts +2 -2
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/schema.js.map +1 -1
- package/dist/esm/utils/stateOverride.js.map +1 -1
- package/dist/esm/utils/testUtils.js.map +1 -1
- package/dist/esm/utils/traceHeader.js.map +1 -1
- package/dist/esm/utils/types.js.map +1 -1
- package/dist/esm/utils/userop.d.ts +2 -2
- package/dist/esm/utils/userop.js +1 -1
- package/dist/esm/utils/userop.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/account/smartContractAccount.d.ts +1 -1
- package/dist/types/account/smartContractAccount.d.ts.map +1 -1
- package/dist/types/actions/bundler/estimateUserOperationGas.d.ts +3 -2
- package/dist/types/actions/bundler/estimateUserOperationGas.d.ts.map +1 -1
- package/dist/types/actions/bundler/getSupportedEntryPoints.d.ts.map +1 -1
- package/dist/types/actions/bundler/getUserOperationByHash.d.ts.map +1 -1
- package/dist/types/actions/bundler/getUserOperationReceipt.d.ts.map +1 -1
- package/dist/types/actions/bundler/sendRawUserOperation.d.ts +2 -1
- package/dist/types/actions/bundler/sendRawUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/buildUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/buildUserOperationFromTx.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/buildUserOperationFromTxs.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/checkGasSponsorshipEligibility.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/dropAndReplaceUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/estimateUserOperationGas.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/internal/initUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/internal/runMiddlewareStack.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/internal/sendUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/sendTransaction.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/sendUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/signUserOperation.d.ts.map +1 -1
- package/dist/types/actions/smartAccount/types.d.ts.map +1 -1
- package/dist/types/client/decorators/smartAccountClient.d.ts.map +1 -1
- package/dist/types/client/schema.d.ts +25 -25
- package/dist/types/client/schema.d.ts.map +1 -1
- package/dist/types/ens/utils.d.ts.map +1 -1
- package/dist/types/entrypoint/0.6.d.ts +2 -2
- package/dist/types/entrypoint/0.6.d.ts.map +1 -1
- package/dist/types/entrypoint/0.7.d.ts +1 -1
- package/dist/types/entrypoint/0.7.d.ts.map +1 -1
- package/dist/types/entrypoint/index.d.ts +1 -1
- package/dist/types/entrypoint/index.d.ts.map +1 -1
- package/dist/types/entrypoint/types.d.ts.map +1 -1
- package/dist/types/errors/useroperation.d.ts.map +1 -1
- package/dist/types/middleware/actions.d.ts.map +1 -1
- package/dist/types/middleware/defaults/7702gasEstimator.d.ts +2 -2
- package/dist/types/middleware/defaults/7702signer.d.ts +1 -1
- package/dist/types/middleware/types.d.ts.map +1 -1
- package/dist/types/signer/local-account.d.ts +2 -207
- package/dist/types/signer/local-account.d.ts.map +1 -1
- package/dist/types/signer/schema.d.ts +1 -1
- package/dist/types/signer/schema.d.ts.map +1 -1
- package/dist/types/signer/utils.d.ts.map +1 -1
- package/dist/types/signer/wallet-client.d.ts +2 -207
- package/dist/types/signer/wallet-client.d.ts.map +1 -1
- package/dist/types/transport/split.d.ts.map +1 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/bigint.d.ts.map +1 -1
- package/dist/types/utils/bytes.d.ts.map +1 -1
- package/dist/types/utils/defaults.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/testUtils.d.ts.map +1 -1
- package/dist/types/utils/traceHeader.d.ts.map +1 -1
- package/dist/types/utils/userop.d.ts +2 -2
- package/dist/types/utils/userop.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -6
- package/src/account/smartContractAccount.ts +27 -25
- package/src/actions/bundler/estimateUserOperationGas.ts +2 -2
- package/src/actions/bundler/getSupportedEntryPoints.ts +2 -2
- package/src/actions/bundler/getUserOperationByHash.ts +2 -2
- package/src/actions/bundler/getUserOperationReceipt.ts +2 -2
- package/src/actions/bundler/sendRawUserOperation.ts +2 -2
- package/src/actions/smartAccount/buildUserOperation.ts +5 -4
- package/src/actions/smartAccount/buildUserOperationFromTx.ts +4 -3
- package/src/actions/smartAccount/buildUserOperationFromTxs.ts +9 -8
- package/src/actions/smartAccount/checkGasSponsorshipEligibility.ts +5 -4
- package/src/actions/smartAccount/dropAndReplaceUserOperation.ts +7 -6
- package/src/actions/smartAccount/estimateUserOperationGas.ts +5 -4
- package/src/actions/smartAccount/getAddress.ts +2 -2
- package/src/actions/smartAccount/internal/initUserOperation.ts +7 -6
- package/src/actions/smartAccount/internal/runMiddlewareStack.ts +13 -12
- package/src/actions/smartAccount/internal/sendUserOperation.ts +3 -2
- package/src/actions/smartAccount/sendTransaction.ts +5 -4
- package/src/actions/smartAccount/sendTransactions.ts +3 -3
- package/src/actions/smartAccount/sendUserOperation.ts +4 -3
- package/src/actions/smartAccount/signMessage.ts +3 -3
- package/src/actions/smartAccount/signTypedData.ts +3 -3
- package/src/actions/smartAccount/signUserOperation.ts +4 -3
- package/src/actions/smartAccount/types.ts +23 -15
- package/src/actions/smartAccount/upgradeAccount.ts +3 -3
- package/src/actions/smartAccount/waitForUserOperationTransacation.ts +5 -5
- package/src/client/addBreadcrumb.ts +1 -1
- package/src/client/bundlerClient.ts +5 -5
- package/src/client/decorators/bundlerClient.ts +7 -7
- package/src/client/decorators/smartAccountClient.ts +20 -18
- package/src/client/isSmartAccountClient.ts +4 -4
- package/src/client/schema.ts +2 -2
- package/src/client/smartAccountClient.ts +14 -14
- package/src/client/types.ts +2 -2
- package/src/ens/utils.ts +1 -1
- package/src/entrypoint/0.6.ts +3 -3
- package/src/entrypoint/0.7.ts +4 -4
- package/src/entrypoint/index.ts +10 -9
- package/src/entrypoint/types.ts +30 -28
- package/src/errors/account.ts +1 -1
- package/src/errors/client.ts +3 -3
- package/src/errors/entrypoint.ts +2 -2
- package/src/errors/signer.ts +1 -1
- package/src/errors/useroperation.ts +6 -3
- package/src/middleware/actions.ts +3 -3
- package/src/middleware/defaults/7702gasEstimator.ts +4 -4
- package/src/middleware/defaults/7702signer.ts +3 -3
- package/src/middleware/defaults/feeEstimator.ts +4 -4
- package/src/middleware/defaults/gasEstimator.ts +6 -6
- package/src/middleware/defaults/paymasterAndData.ts +1 -1
- package/src/middleware/defaults/userOpSigner.ts +2 -2
- package/src/middleware/erc7677middleware.ts +9 -9
- package/src/middleware/types.ts +7 -5
- package/src/signer/local-account.ts +7 -7
- package/src/signer/types.ts +3 -3
- package/src/signer/wallet-client.ts +2 -2
- package/src/transport/split.ts +1 -1
- package/src/types.ts +29 -29
- package/src/utils/bigint.ts +4 -4
- package/src/utils/defaults.ts +1 -1
- package/src/utils/index.ts +12 -9
- package/src/utils/schema.ts +2 -2
- package/src/utils/stateOverride.ts +4 -4
- package/src/utils/testUtils.ts +2 -2
- package/src/utils/traceHeader.ts +14 -11
- package/src/utils/types.ts +1 -1
- package/src/utils/userop.ts +17 -17
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendUserOperation.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/sendUserOperation.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAEhF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAKrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,
|
|
1
|
+
{"version":3,"file":"sendUserOperation.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/sendUserOperation.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAEhF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAKrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAYrC,OAA6C,EAC7C,IAAqD;IAErD,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;IAC/D,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAE9D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,oBAAoB,EAAE,CAAC;IACnC,CAAC;IAED,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,uBAAuB,CAC/B,wBAAwB,EACxB,mBAAmB,EACnB,MAAM,CACP,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE;QAChD,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,OAAO;QACP,OAAO;QACP,SAAS;KACV,CAAC,CAAC;IAEH,OAAO,kBAAkB,CAAC,MAAM,EAAE;QAChC,OAAO;QACP,QAAQ;QACR,OAAO;QACP,SAAS;KACV,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { Chain, Client, Transport } from \"viem\";\nimport type {\n GetEntryPointFromAccount,\n SmartContractAccount,\n} from \"../../account/smartContractAccount.js\";\nimport { isBaseSmartAccountClient } from \"../../client/isSmartAccountClient.js\";\nimport type { SendUserOperationResult } from \"../../client/types.js\";\nimport { AccountNotFoundError } from \"../../errors/account.js\";\nimport { IncompatibleClientError } from \"../../errors/client.js\";\nimport { buildUserOperation } from \"./buildUserOperation.js\";\nimport { _sendUserOperation } from \"./internal/sendUserOperation.js\";\nimport type {\n SendUserOperationParameters,\n UserOperationContext,\n} from \"./types.js\";\nimport { clientHeaderTrack } from \"../../index.js\";\n\n/**\n * Sends a user operation or batch of user operations using the connected account. Before executing, sendUserOperation will run the user operation through the middleware pipeline.\n *\n * @example\n * ```ts\n * import { createSmartAccountClient, toSmartContractAccount } from \"@aa-sdk/core\";\n *\n * const account = await toSmartContractAccount(...);\n * const result = await createSmartAccountClient(...).sendUserOperation({\n * uo: {\n * target: \"0x...\",\n * data: \"0x...\", // or \"0x\",\n * value: 0n, // optional\n * }\n * });\n * ```\n *\n * @param {Client<TTransport, TChain, TAccount>} client_ the smart account client to use for RPC requests\n * @param {SendUserOperationParameters<TAccount, TContext>} args contains the UO or batch to send, context, overrides, and account if not hoisted on the client\n * @returns {Promise<SendUserOperationResult<TEntryPointVersion>>} a Promise containing the result of the user operation\n */\nexport async function sendUserOperation<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n>(\n client_: Client<TTransport, TChain, TAccount>,\n args: SendUserOperationParameters<TAccount, TContext>,\n): Promise<SendUserOperationResult<TEntryPointVersion>> {\n const client = clientHeaderTrack(client_, \"sendUserOperation\");\n const { account = client.account, context, overrides } = args;\n\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"BaseSmartAccountClient\",\n \"sendUserOperation\",\n client,\n );\n }\n\n const uoStruct = await buildUserOperation(client, {\n uo: args.uo,\n account,\n context,\n overrides,\n });\n\n return _sendUserOperation(client, {\n account,\n uoStruct,\n context,\n overrides,\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signMessage.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/signMessage.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAQ/D,MAAM,CAAC,MAAM,WAAW,GASJ,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;IAC1E,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,oBAAoB,EAAE,CAAC;IACnC,CAAC;IACD,OAAO,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC","sourcesContent":["import type { Chain, Client, Hex, SignableMessage, Transport } from \"viem\";\nimport type {\n GetAccountParameter,\n SmartContractAccount,\n} from \"../../account/smartContractAccount\";\nimport { AccountNotFoundError } from \"../../errors/account.js\";\n\nexport type SignMessageParameters<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined
|
|
1
|
+
{"version":3,"file":"signMessage.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/signMessage.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAQ/D,MAAM,CAAC,MAAM,WAAW,GASJ,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;IAC1E,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,oBAAoB,EAAE,CAAC;IACnC,CAAC;IACD,OAAO,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC","sourcesContent":["import type { Chain, Client, Hex, SignableMessage, Transport } from \"viem\";\nimport type {\n GetAccountParameter,\n SmartContractAccount,\n} from \"../../account/smartContractAccount\";\nimport { AccountNotFoundError } from \"../../errors/account.js\";\n\nexport type SignMessageParameters<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n> = { message: SignableMessage } & GetAccountParameter<TAccount>;\n\nexport const signMessage: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n>(\n client: Client<TTransport, TChain, TAccount>,\n args: SignMessageParameters<TAccount>,\n) => Promise<Hex> = async (client, { account = client.account, message }) => {\n if (!account) {\n throw new AccountNotFoundError();\n }\n return account.signMessageWith6492({ message });\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signTypedData.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/signTypedData.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAY/D,MAAM,CAAC,MAAM,aAAa,GAWN,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE;IAC5E,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,oBAAoB,EAAE,CAAC;IACnC,CAAC;IAED,OAAO,OAAO,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;AAClD,CAAC,CAAC","sourcesContent":["import type {\n Chain,\n Client,\n Hex,\n Transport,\n TypedData,\n TypedDataDefinition,\n} from \"viem\";\nimport type {\n GetAccountParameter,\n SmartContractAccount,\n} from \"../../account/smartContractAccount\";\nimport { AccountNotFoundError } from \"../../errors/account.js\";\n\nexport type SignTypedDataParameters<\n TTypedData extends TypedData | { [key: string]: unknown },\n TPrimaryType extends string = string,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined
|
|
1
|
+
{"version":3,"file":"signTypedData.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/signTypedData.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAY/D,MAAM,CAAC,MAAM,aAAa,GAWN,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE;IAC5E,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,oBAAoB,EAAE,CAAC;IACnC,CAAC;IAED,OAAO,OAAO,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;AAClD,CAAC,CAAC","sourcesContent":["import type {\n Chain,\n Client,\n Hex,\n Transport,\n TypedData,\n TypedDataDefinition,\n} from \"viem\";\nimport type {\n GetAccountParameter,\n SmartContractAccount,\n} from \"../../account/smartContractAccount\";\nimport { AccountNotFoundError } from \"../../errors/account.js\";\n\nexport type SignTypedDataParameters<\n TTypedData extends TypedData | { [key: string]: unknown },\n TPrimaryType extends string = string,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n> = {\n typedData: TypedDataDefinition<TTypedData, TPrimaryType>;\n} & GetAccountParameter<TAccount>;\n\nexport const signTypedData: <\n const TTypedData extends TypedData | { [key: string]: unknown },\n TPrimaryType extends string = string,\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n>(\n client: Client<TTransport, TChain, TAccount>,\n args: SignTypedDataParameters<TTypedData, TPrimaryType, TAccount>,\n) => Promise<Hex> = async (client, { account = client.account, typedData }) => {\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n return account.signTypedDataWith6492(typedData);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signUserOperation.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/signUserOperation.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACL,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGtE,MAAM,CAAC,KAAK,UAAU,iBAAiB,
|
|
1
|
+
{"version":3,"file":"signUserOperation.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/signUserOperation.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACL,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGtE,MAAM,CAAC,KAAK,UAAU,iBAAiB,CASrC,MAA4C,EAC5C,IAA2C;IAE3C,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAEnD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,oBAAoB,EAAE,CAAC;IACnC,CAAC;IAED,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,uBAAuB,CAC/B,wBAAwB,EACxB,mBAAmB,EACnB,MAAM,CACP,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,IAAI,kBAAkB,EAAE,CAAC;IACjC,CAAC;IAED,OAAO,MAAM,MAAM,CAAC,UAAU;SAC3B,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,GAAG,IAAI;QACP,OAAO;QACP,MAAM;QACN,OAAO;KACR,CAAC;SACD,IAAI,CAAC,iBAAiB,CAAC;SACvB,IAAI,CAAC,WAAW,CAAC,CAAC;AACvB,CAAC","sourcesContent":["import type { Chain, Client, Transport } from \"viem\";\nimport type {\n GetEntryPointFromAccount,\n SmartContractAccount,\n} from \"../../account/smartContractAccount\";\nimport { isBaseSmartAccountClient } from \"../../client/isSmartAccountClient.js\";\nimport { AccountNotFoundError } from \"../../errors/account.js\";\nimport {\n ChainNotFoundError,\n IncompatibleClientError,\n} from \"../../errors/client.js\";\nimport type { UserOperationRequest } from \"../../types\";\nimport { deepHexlify, resolveProperties } from \"../../utils/index.js\";\nimport type { SignUserOperationParameters } from \"./types\";\n\nexport async function signUserOperation<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n>(\n client: Client<TTransport, TChain, TAccount>,\n args: SignUserOperationParameters<TAccount>,\n): Promise<UserOperationRequest<TEntryPointVersion>> {\n const { account = client.account, context } = args;\n\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"BaseSmartAccountClient\",\n \"signUserOperation\",\n client,\n );\n }\n\n if (!client.chain) {\n throw new ChainNotFoundError();\n }\n\n return await client.middleware\n .signUserOperation(args.uoStruct, {\n ...args,\n account,\n client,\n context,\n })\n .then(resolveProperties)\n .then(deepHexlify);\n}\n"]}
|
|
@@ -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":";AAqKA,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 * 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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgradeAccount.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/upgradeAccount.ts"],"names":[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;IAEH,IAAI,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IACvB,IAAI,SAAS,EAAE,CAAC;QACd,IAAI,GAAG,MAAM,+BAA+B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["import type { Chain, Client, Hash, Transport } from \"viem\";\nimport type { SmartContractAccount } from \"../../account/smartContractAccount.js\";\nimport { isBaseSmartAccountClient } from \"../../client/isSmartAccountClient.js\";\nimport { AccountNotFoundError } from \"../../errors/account.js\";\nimport { IncompatibleClientError } from \"../../errors/client.js\";\nimport { sendUserOperation } from \"./sendUserOperation.js\";\nimport type { UpgradeAccountParams, UserOperationContext } from \"./types.js\";\nimport { waitForUserOperationTransaction } from \"./waitForUserOperationTransacation.js\";\nimport { clientHeaderTrack } from \"../../index.js\";\n\nexport const upgradeAccount: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined
|
|
1
|
+
{"version":3,"file":"upgradeAccount.js","sourceRoot":"","sources":["../../../../src/actions/smartAccount/upgradeAccount.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,CAAC,MAAM,cAAc,GAYN,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;IAC3C,MAAM,MAAM,GAAG,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAC5D,MAAM,EACJ,OAAO,GAAG,MAAM,CAAC,OAAO,EACxB,SAAS,EACT,SAAS,EACT,SAAS,EACT,OAAO,GACR,GAAG,IAAI,CAAC;IAET,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,oBAAoB,EAAE,CAAC;IACnC,CAAC;IAED,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,uBAAuB,CAC/B,wBAAwB,EACxB,gBAAgB,EAChB,MAAM,CACP,CAAC;IACJ,CAAC;IAED,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,GAAG,SAAS,CAAC;IAE1E,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC,sBAAsB,CAAC;QAC7D,gBAAgB,EAAE,kBAAkB;QACpC,iBAAiB,EAAE,kBAAkB;KACtC,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,MAAM,EAAE;QAC7C,EAAE,EAAE;YACF,MAAM,EAAE,OAAO,CAAC,OAAO;YACvB,IAAI,EAAE,iBAAiB;SACxB;QACD,OAAO;QACP,SAAS;QACT,OAAO;KACR,CAAC,CAAC;IAEH,IAAI,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IACvB,IAAI,SAAS,EAAE,CAAC;QACd,IAAI,GAAG,MAAM,+BAA+B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["import type { Chain, Client, Hash, Transport } from \"viem\";\nimport type { SmartContractAccount } from \"../../account/smartContractAccount.js\";\nimport { isBaseSmartAccountClient } from \"../../client/isSmartAccountClient.js\";\nimport { AccountNotFoundError } from \"../../errors/account.js\";\nimport { IncompatibleClientError } from \"../../errors/client.js\";\nimport { sendUserOperation } from \"./sendUserOperation.js\";\nimport type { UpgradeAccountParams, UserOperationContext } from \"./types.js\";\nimport { waitForUserOperationTransaction } from \"./waitForUserOperationTransacation.js\";\nimport { clientHeaderTrack } from \"../../index.js\";\n\nexport const upgradeAccount: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n>(\n client: Client<TTransport, TChain, TAccount>,\n args: UpgradeAccountParams<TAccount, TContext>,\n) => Promise<Hash> = async (client_, args) => {\n const client = clientHeaderTrack(client_, \"upgradeAccount\");\n const {\n account = client.account,\n upgradeTo,\n overrides,\n waitForTx,\n context,\n } = args;\n\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isBaseSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"BaseSmartAccountClient\",\n \"upgradeAccount\",\n client,\n );\n }\n\n const { implAddress: accountImplAddress, initializationData } = upgradeTo;\n\n const encodeUpgradeData = await account.encodeUpgradeToAndCall({\n upgradeToAddress: accountImplAddress,\n upgradeToInitData: initializationData,\n });\n\n const result = await sendUserOperation(client, {\n uo: {\n target: account.address,\n data: encodeUpgradeData,\n },\n account,\n overrides,\n context,\n });\n\n let hash = result.hash;\n if (waitForTx) {\n hash = await waitForUserOperationTransaction(client, result);\n }\n\n return hash;\n};\n"]}
|
|
@@ -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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AAI,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
|
|
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;AA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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}`)\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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addBreadcrumb.js","sourceRoot":"","sources":["../../../src/client/addBreadcrumb.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAEtD,SAAS,gBAAgB,CACvB,CAAI;IAEJ,OAAO,cAAc,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAe,MAAS,EAAE,KAAa;IACtE,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7B,OAAO,MAAM,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/**\n * The symbol that is used to add a breadcrumb to the headers. Is an optional\n * function that is used to add a breadcrumb to the headers.\n */\nexport const ADD_BREADCRUMB = Symbol(\"addBreadcrumb\");\n\nfunction hasAddBreadcrumb<A extends {}>(\n a: A
|
|
1
|
+
{"version":3,"file":"addBreadcrumb.js","sourceRoot":"","sources":["../../../src/client/addBreadcrumb.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAEtD,SAAS,gBAAgB,CACvB,CAAI;IAEJ,OAAO,cAAc,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAe,MAAS,EAAE,KAAa;IACtE,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7B,OAAO,MAAM,CAAC,cAAc,CAAC,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/**\n * The symbol that is used to add a breadcrumb to the headers. Is an optional\n * function that is used to add a breadcrumb to the headers.\n */\nexport const ADD_BREADCRUMB = Symbol(\"addBreadcrumb\");\n\nfunction hasAddBreadcrumb<A extends {}>(\n a: A,\n): a is A & { [ADD_BREADCRUMB]: (breadcrumb: string) => A } {\n return ADD_BREADCRUMB in a;\n}\n\n/**\n * Add a crumb to the breadcrumb.\n *\n * @param {X} client Clients are somethings like viem, that we are adding breadcrumbs to, and could be owning the transport. Usually a alchemy client.\n * @param {string} crumb The crumb to add to the breadcrumb\n * @returns {Function} A function that updates the headers\n */\nexport function clientHeaderTrack<X extends {}>(client: X, crumb: string): X {\n if (hasAddBreadcrumb(client)) {\n return client[ADD_BREADCRUMB](crumb);\n }\n return client;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundlerClient.js","sourceRoot":"","sources":["../../../src/client/bundlerClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,aAAa,GAUd,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EACL,cAAc,GAGf,MAAM,+BAA+B,CAAC;A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gBACjB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;oBACnB,GAAG,iBAAiB,CAAC,MAAM;oBAC3B,YAAY;iBACb,CAAC;aACH,CAAC,CAAC;QACL,CAAC;QAED,OAAO,YAAY,CAAmB,cAAc,CAAC,CAAC;IACxD,CAAC,CAAC,EAAE,CAAC;IAEL,OAAO,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["import {\n createClient,\n http,\n publicActions,\n type Chain,\n type Client,\n type FallbackTransport,\n type HttpTransportConfig,\n type PublicActions,\n type PublicClient,\n type PublicClientConfig,\n type PublicRpcSchema,\n type Transport,\n} from \"viem\";\nimport { ChainNotFoundError } from \"../errors/client.js\";\nimport { VERSION } from \"../version.js\";\nimport {\n bundlerActions,\n type BundlerActions,\n type BundlerRpcSchema,\n} from \"./decorators/bundlerClient.js\";\n\n// [!region BundlerClient]\nexport type BundlerClient<T extends Transport = Transport> = Client<\n T,\n Chain,\n undefined,\n [...PublicRpcSchema, ...BundlerRpcSchema],\n PublicActions<T, Chain> & BundlerActions\n>;\n\n/**\n * Creates a bundler client from an existing public client with the provided transport and chain.\n *\n * @example\n * ```ts\n * import { createPublicClient } from \"viem\";\n * import { createBundlerClientFromExisting } from \"@aa-sdk/core\";\n *\n * const publicClient = createPublicClient(...);\n * const bundlerClient = createBundlerClientFromExisting(publicClient);\n * ```\n *\n * @param {PublicClient<T, Chain>} client The existing public client to be extended with bundler actions\n * @returns {BundlerClient<T>} A bundler client that extends the functionality of the provided public client\n */\nexport const createBundlerClientFromExisting: <\n T extends Transport | FallbackTransport = Transport
|
|
1
|
+
{"version":3,"file":"bundlerClient.js","sourceRoot":"","sources":["../../../src/client/bundlerClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,aAAa,GAUd,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAA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CAAC,OAAO;oBACvB,wBAAwB,EAAE,OAAO;iBAClC,CAAC;YACJ,CAAC;YAED,OAAO,YAAY,CAAmB;gBACpC,GAAG,cAAc;gBACjB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;oBACnB,GAAG,iBAAiB,CAAC,MAAM;oBAC3B,YAAY;iBACb,CAAC;aACH,CAAC,CAAC;QACL,CAAC;QAED,OAAO,YAAY,CAAmB,cAAc,CAAC,CAAC;IACxD,CAAC,CAAC,EAAE,CAAC;IAEL,OAAO,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["import {\n createClient,\n http,\n publicActions,\n type Chain,\n type Client,\n type FallbackTransport,\n type HttpTransportConfig,\n type PublicActions,\n type PublicClient,\n type PublicClientConfig,\n type PublicRpcSchema,\n type Transport,\n} from \"viem\";\nimport { ChainNotFoundError } from \"../errors/client.js\";\nimport { VERSION } from \"../version.js\";\nimport {\n bundlerActions,\n type BundlerActions,\n type BundlerRpcSchema,\n} from \"./decorators/bundlerClient.js\";\n\n// [!region BundlerClient]\nexport type BundlerClient<T extends Transport = Transport> = Client<\n T,\n Chain,\n undefined,\n [...PublicRpcSchema, ...BundlerRpcSchema],\n PublicActions<T, Chain> & BundlerActions\n>;\n\n/**\n * Creates a bundler client from an existing public client with the provided transport and chain.\n *\n * @example\n * ```ts\n * import { createPublicClient } from \"viem\";\n * import { createBundlerClientFromExisting } from \"@aa-sdk/core\";\n *\n * const publicClient = createPublicClient(...);\n * const bundlerClient = createBundlerClientFromExisting(publicClient);\n * ```\n *\n * @param {PublicClient<T, Chain>} client The existing public client to be extended with bundler actions\n * @returns {BundlerClient<T>} A bundler client that extends the functionality of the provided public client\n */\nexport const createBundlerClientFromExisting: <\n T extends Transport | FallbackTransport = Transport,\n>(\n client: PublicClient<T, Chain>,\n) => BundlerClient<T> = <T extends Transport | FallbackTransport = Transport>(\n client: PublicClient<T, Chain>,\n): BundlerClient<T> => {\n return client.extend(bundlerActions);\n};\n// [!endregion BundlerClient]\n\n/**\n * Creates a PublicClient with methods for calling Bundler RPC methods\n *\n * @param {PublicClientConfig<TTransport, Chain> & { type?: string }} args - configuration for the client\n * @returns {BundlerClient<TTransport>} a PublicClient with methods for calling Bundler RPC methods\n */\nexport function createBundlerClient<TTransport extends Transport>(\n args: PublicClientConfig<TTransport, Chain> & { type?: string },\n): BundlerClient<TTransport>;\n\n/**\n * Creates a Bundler Client using the provided configuration parameters, including chain and optional type.\n *\n * @example\n * ```ts\n * import { createBundlerClient } from \"@aa-sdk/core\";\n * import { sepolia } from \"viem/chains\";\n *\n * const client = createBundlerClient({\n * chain: sepolia,\n * transport: http(\"RPC_URL\"),\n * });\n * ```\n *\n * @param {PublicClientConfig & { type?: string }} args Configuration for creating the Bundler Client, including parameters for the chain, transport, and optional type\n * @returns {BundlerClient} The created Bundler Client with extended public and bundler actions\n */\nexport function createBundlerClient(\n args: PublicClientConfig & { type?: string },\n): BundlerClient {\n if (!args.chain) {\n throw new ChainNotFoundError();\n }\n const {\n key = \"bundler-public\",\n name = \"Public Bundler Client\",\n type = \"bundlerClient\",\n } = args;\n\n const { transport, ...opts } = args;\n const resolvedTransport = transport({\n chain: args.chain,\n pollingInterval: opts.pollingInterval,\n });\n\n const baseParameters = {\n ...args,\n key,\n name,\n type,\n };\n\n const client = (() => {\n if (resolvedTransport.config.type === \"http\") {\n const { url, fetchOptions: fetchOptions_ } = resolvedTransport.value as {\n fetchOptions: HttpTransportConfig[\"fetchOptions\"];\n url: string;\n };\n\n const fetchOptions = fetchOptions_ ?? {};\n\n if (url.toLowerCase().indexOf(\"alchemy\") > -1) {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n \"Alchemy-AA-Sdk-Version\": VERSION,\n };\n }\n\n return createClient<Transport, Chain>({\n ...baseParameters,\n transport: http(url, {\n ...resolvedTransport.config,\n fetchOptions,\n }),\n });\n }\n\n return createClient<Transport, Chain>(baseParameters);\n })();\n\n return client.extend(publicActions).extend(bundlerActions);\n}\n"]}
|
|
@@ -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;AA6FrF,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,EAAE,CACtC,uBAAuB,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC;CAC5C,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];\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 }
|
|
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;AA6FrF,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,EAAE,CACtC,uBAAuB,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC;CAC5C,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];\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 * @returns - a user operation receipt or null if not found\n */\n getUserOperationReceipt(hash: Hash): 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) =>\n getUserOperationReceipt(client, { hash }),\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smartAccountClient.js","sourceRoot":"","sources":["../../../../src/client/decorators/smartAccountClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAQN,MAAM,MAAM,CAAC;AAMd,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAClG,OAAO,EAAE,yBAAyB,EAAE,MAAM,yDAAyD,CAAC;AACpG,OAAO,EACL,8BAA8B,GAE/B,MAAM,8DAA8D,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,2DAA2D,CAAC;AACxG,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAChF,OAAO,EAAE,gBAAgB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,CAAC,MAAM,EAAE,IAAI,CAAC;IAC1D,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC;IAC5D,+BAA+B,EAAE,CAAC,IAAI,EAAE,EAAE,CACxC,+BAA+B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC;IAC5D,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC;IACtD,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC;IAC9C,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC;IAChD,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC;CACrD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,IAAI;AACrD,gDAAgD;AAChD,yBAAyB,CAAC,SAAS,CAAC,CACrC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;IACvB,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChB,OAAO,KAAK,CAAC;AACf,CAAC,EAAE,IAAI,GAAG,EAAU,CAAC,CAAC","sourcesContent":["import {\n type Address,\n type Chain,\n type Client,\n type Hex,\n type SendTransactionParameters,\n type Transport,\n type TypedData,\n} from \"viem\";\nimport type {\n GetAccountParameter,\n GetEntryPointFromAccount,\n SmartContractAccount,\n} from \"../../account/smartContractAccount\";\nimport { buildUserOperation } from \"../../actions/smartAccount/buildUserOperation.js\";\nimport { buildUserOperationFromTx } from \"../../actions/smartAccount/buildUserOperationFromTx.js\";\nimport { buildUserOperationFromTxs } from \"../../actions/smartAccount/buildUserOperationFromTxs.js\";\nimport {\n checkGasSponsorshipEligibility,\n type CheckGasSponsorshipEligibilityResult,\n} from \"../../actions/smartAccount/checkGasSponsorshipEligibility.js\";\nimport { dropAndReplaceUserOperation } from \"../../actions/smartAccount/dropAndReplaceUserOperation.js\";\nimport { getAddress } from \"../../actions/smartAccount/getAddress.js\";\nimport { sendTransaction } from \"../../actions/smartAccount/sendTransaction.js\";\nimport { sendTransactions } from \"../../actions/smartAccount/sendTransactions.js\";\nimport { sendUserOperation } from \"../../actions/smartAccount/sendUserOperation.js\";\nimport {\n signMessage,\n type SignMessageParameters,\n} from \"../../actions/smartAccount/signMessage.js\";\nimport {\n signTypedData,\n type SignTypedDataParameters,\n} from \"../../actions/smartAccount/signTypedData.js\";\nimport { signUserOperation } from \"../../actions/smartAccount/signUserOperation.js\";\nimport type {\n BuildTransactionParameters,\n BuildUserOperationFromTransactionsResult,\n BuildUserOperationParameters,\n DropAndReplaceUserOperationParameters,\n SendTransactionsParameters,\n SendUserOperationParameters,\n SignUserOperationParameters,\n UpgradeAccountParams,\n UserOperationContext,\n WaitForUserOperationTxParameters,\n} from \"../../actions/smartAccount/types\";\nimport { upgradeAccount } from \"../../actions/smartAccount/upgradeAccount.js\";\nimport { waitForUserOperationTransaction } from \"../../actions/smartAccount/waitForUserOperationTransacation.js\";\nimport type {\n UserOperationOverrides,\n UserOperationRequest,\n UserOperationStruct,\n} from \"../../types\";\nimport type { IsUndefined } from \"../../utils\";\nimport type { SendUserOperationResult } from \"../types\";\n\n//#region SmartAccountClientActions\nexport type BaseSmartAccountClientActions<\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>\n> = {\n buildUserOperation: (\n args: BuildUserOperationParameters<TAccount, TContext>\n ) => Promise<UserOperationStruct<TEntryPointVersion>>;\n buildUserOperationFromTx: (\n args: SendTransactionParameters<TChain, TAccount>,\n overrides?: UserOperationOverrides<TEntryPointVersion>,\n context?: TContext\n ) => Promise<UserOperationStruct<TEntryPointVersion>>;\n buildUserOperationFromTxs: (\n args: BuildTransactionParameters<TAccount, TContext>\n ) => Promise<BuildUserOperationFromTransactionsResult<TEntryPointVersion>>;\n checkGasSponsorshipEligibility: <\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>\n >(\n args: SendUserOperationParameters<TAccount, TContext>\n ) => Promise<\n CheckGasSponsorshipEligibilityResult<TAccount, TEntryPointVersion>\n >;\n signUserOperation: (\n args: SignUserOperationParameters<TAccount, TEntryPointVersion, TContext>\n ) => Promise<UserOperationRequest<TEntryPointVersion>>;\n dropAndReplaceUserOperation: (\n args: DropAndReplaceUserOperationParameters<TAccount, TContext>\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n // TODO: for v4 we should combine override and context into an `opts` parameter\n // which wraps both of these properties so we can use GetContextParameter\n sendTransaction: <TChainOverride extends Chain | undefined = undefined>(\n args: SendTransactionParameters<TChain, TAccount, TChainOverride>,\n overrides?: UserOperationOverrides<TEntryPointVersion>,\n context?: TContext\n ) => Promise<Hex>;\n sendTransactions: (\n args: SendTransactionsParameters<TAccount, TContext>\n ) => Promise<Hex>;\n sendUserOperation: (\n args: SendUserOperationParameters<\n TAccount,\n TContext,\n GetEntryPointFromAccount<TAccount>\n >\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n waitForUserOperationTransaction: (\n args: WaitForUserOperationTxParameters\n ) => Promise<Hex>;\n upgradeAccount: (\n args: UpgradeAccountParams<TAccount, TContext>\n ) => Promise<Hex>;\n signMessage: (args: SignMessageParameters<TAccount>) => Promise<Hex>;\n signTypedData: <\n const TTypedData extends TypedData | { [key: string]: unknown },\n TPrimaryType extends string = string\n >(\n args: SignTypedDataParameters<TTypedData, TPrimaryType, TAccount>\n ) => Promise<Hex>;\n} & (IsUndefined<TAccount> extends false\n ? { getAddress: () => Address }\n : {\n getAddress: (args: GetAccountParameter<TAccount>) => Address;\n });\n// #endregion SmartAccountClientActions\n\n/**\n * Provides a set of smart account client actions to decorate the provided client. These actions include building and signing user operations, sending transactions, and more.\n *\n * NOTE: this is already added to clients returned from `createSmartAccountClient`\n *\n * @param {Client<TTransport, TChain, TAccount>} client The client to bind the smart account actions to\n * @returns {BaseSmartAccountClientActions<TChain, TAccount, TContext>} An object containing various smart account client actions\n */\nexport const smartAccountClientActions: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n>(\n client: Client<TTransport, TChain, TAccount>\n) => BaseSmartAccountClientActions<TChain, TAccount, TContext> = (client) => ({\n buildUserOperation: (args) => buildUserOperation(client, args),\n buildUserOperationFromTx: (args, overrides, context) =>\n buildUserOperationFromTx(client, args, overrides, context),\n buildUserOperationFromTxs: (args) => buildUserOperationFromTxs(client, args),\n checkGasSponsorshipEligibility: (args) =>\n checkGasSponsorshipEligibility(client, args),\n signUserOperation: (args) => signUserOperation(client, args),\n dropAndReplaceUserOperation: (args) =>\n dropAndReplaceUserOperation(client, args),\n sendTransaction: (args, overrides, context) =>\n sendTransaction(client, args, overrides, context),\n sendTransactions: (args) => sendTransactions(client, args),\n sendUserOperation: (args) => sendUserOperation(client, args),\n waitForUserOperationTransaction: (args) =>\n waitForUserOperationTransaction.bind(client)(client, args),\n upgradeAccount: (args) => upgradeAccount(client, args),\n getAddress: (args) => getAddress(client, args),\n signMessage: (args) => signMessage(client, args),\n signTypedData: (args) => signTypedData(client, args),\n});\n\nexport const smartAccountClientMethodKeys = Object.keys(\n // @ts-expect-error we just want to get the keys\n smartAccountClientActions(undefined)\n).reduce((accum, curr) => {\n accum.add(curr);\n return accum;\n}, new Set<string>());\n"]}
|
|
1
|
+
{"version":3,"file":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AAK,EAAE,IAAI,EAAE,EAAE;IACvB,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChB,OAAO,KAAK,CAAC;AACf,CAAC,EAAE,IAAI,GAAG,EAAU,CAAC,CAAC","sourcesContent":["import {\n type Address,\n type Chain,\n type Client,\n type Hex,\n type SendTransactionParameters,\n type Transport,\n type TypedData,\n} from \"viem\";\nimport type {\n GetAccountParameter,\n GetEntryPointFromAccount,\n SmartContractAccount,\n} from \"../../account/smartContractAccount\";\nimport { buildUserOperation } from \"../../actions/smartAccount/buildUserOperation.js\";\nimport { buildUserOperationFromTx } from \"../../actions/smartAccount/buildUserOperationFromTx.js\";\nimport { buildUserOperationFromTxs } from \"../../actions/smartAccount/buildUserOperationFromTxs.js\";\nimport {\n checkGasSponsorshipEligibility,\n type CheckGasSponsorshipEligibilityResult,\n} from \"../../actions/smartAccount/checkGasSponsorshipEligibility.js\";\nimport { dropAndReplaceUserOperation } from \"../../actions/smartAccount/dropAndReplaceUserOperation.js\";\nimport { getAddress } from \"../../actions/smartAccount/getAddress.js\";\nimport { sendTransaction } from \"../../actions/smartAccount/sendTransaction.js\";\nimport { sendTransactions } from \"../../actions/smartAccount/sendTransactions.js\";\nimport { sendUserOperation } from \"../../actions/smartAccount/sendUserOperation.js\";\nimport {\n signMessage,\n type SignMessageParameters,\n} from \"../../actions/smartAccount/signMessage.js\";\nimport {\n signTypedData,\n type SignTypedDataParameters,\n} from \"../../actions/smartAccount/signTypedData.js\";\nimport { signUserOperation } from \"../../actions/smartAccount/signUserOperation.js\";\nimport type {\n BuildTransactionParameters,\n BuildUserOperationFromTransactionsResult,\n BuildUserOperationParameters,\n DropAndReplaceUserOperationParameters,\n SendTransactionsParameters,\n SendUserOperationParameters,\n SignUserOperationParameters,\n UpgradeAccountParams,\n UserOperationContext,\n WaitForUserOperationTxParameters,\n} from \"../../actions/smartAccount/types\";\nimport { upgradeAccount } from \"../../actions/smartAccount/upgradeAccount.js\";\nimport { waitForUserOperationTransaction } from \"../../actions/smartAccount/waitForUserOperationTransacation.js\";\nimport type {\n UserOperationOverrides,\n UserOperationRequest,\n UserOperationStruct,\n} from \"../../types\";\nimport type { IsUndefined } from \"../../utils\";\nimport type { SendUserOperationResult } from \"../types\";\n\n//#region SmartAccountClientActions\nexport type BaseSmartAccountClientActions<\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n> = {\n buildUserOperation: (\n args: BuildUserOperationParameters<TAccount, TContext>,\n ) => Promise<UserOperationStruct<TEntryPointVersion>>;\n buildUserOperationFromTx: (\n args: SendTransactionParameters<TChain, TAccount>,\n overrides?: UserOperationOverrides<TEntryPointVersion>,\n context?: TContext,\n ) => Promise<UserOperationStruct<TEntryPointVersion>>;\n buildUserOperationFromTxs: (\n args: BuildTransactionParameters<TAccount, TContext>,\n ) => Promise<BuildUserOperationFromTransactionsResult<TEntryPointVersion>>;\n checkGasSponsorshipEligibility: <\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n >(\n args: SendUserOperationParameters<TAccount, TContext>,\n ) => Promise<\n CheckGasSponsorshipEligibilityResult<TAccount, TEntryPointVersion>\n >;\n signUserOperation: (\n args: SignUserOperationParameters<TAccount, TEntryPointVersion, TContext>,\n ) => Promise<UserOperationRequest<TEntryPointVersion>>;\n dropAndReplaceUserOperation: (\n args: DropAndReplaceUserOperationParameters<TAccount, TContext>,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n // TODO: for v4 we should combine override and context into an `opts` parameter\n // which wraps both of these properties so we can use GetContextParameter\n sendTransaction: <TChainOverride extends Chain | undefined = undefined>(\n args: SendTransactionParameters<TChain, TAccount, TChainOverride>,\n overrides?: UserOperationOverrides<TEntryPointVersion>,\n context?: TContext,\n ) => Promise<Hex>;\n sendTransactions: (\n args: SendTransactionsParameters<TAccount, TContext>,\n ) => Promise<Hex>;\n sendUserOperation: (\n args: SendUserOperationParameters<\n TAccount,\n TContext,\n GetEntryPointFromAccount<TAccount>\n >,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n waitForUserOperationTransaction: (\n args: WaitForUserOperationTxParameters,\n ) => Promise<Hex>;\n upgradeAccount: (\n args: UpgradeAccountParams<TAccount, TContext>,\n ) => Promise<Hex>;\n signMessage: (args: SignMessageParameters<TAccount>) => Promise<Hex>;\n signTypedData: <\n const TTypedData extends TypedData | { [key: string]: unknown },\n TPrimaryType extends string = string,\n >(\n args: SignTypedDataParameters<TTypedData, TPrimaryType, TAccount>,\n ) => Promise<Hex>;\n} & (IsUndefined<TAccount> extends false\n ? { getAddress: () => Address }\n : {\n getAddress: (args: GetAccountParameter<TAccount>) => Address;\n });\n// #endregion SmartAccountClientActions\n\n/**\n * Provides a set of smart account client actions to decorate the provided client. These actions include building and signing user operations, sending transactions, and more.\n *\n * NOTE: this is already added to clients returned from `createSmartAccountClient`\n *\n * @param {Client<TTransport, TChain, TAccount>} client The client to bind the smart account actions to\n * @returns {BaseSmartAccountClientActions<TChain, TAccount, TContext>} An object containing various smart account client actions\n */\nexport const smartAccountClientActions: <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n>(\n client: Client<TTransport, TChain, TAccount>,\n) => BaseSmartAccountClientActions<TChain, TAccount, TContext> = (client) => ({\n buildUserOperation: (args) => buildUserOperation(client, args),\n buildUserOperationFromTx: (args, overrides, context) =>\n buildUserOperationFromTx(client, args, overrides, context),\n buildUserOperationFromTxs: (args) => buildUserOperationFromTxs(client, args),\n checkGasSponsorshipEligibility: (args) =>\n checkGasSponsorshipEligibility(client, args),\n signUserOperation: (args) => signUserOperation(client, args),\n dropAndReplaceUserOperation: (args) =>\n dropAndReplaceUserOperation(client, args),\n sendTransaction: (args, overrides, context) =>\n sendTransaction(client, args, overrides, context),\n sendTransactions: (args) => sendTransactions(client, args),\n sendUserOperation: (args) => sendUserOperation(client, args),\n waitForUserOperationTransaction: (args) =>\n waitForUserOperationTransaction.bind(client)(client, args),\n upgradeAccount: (args) => upgradeAccount(client, args),\n getAddress: (args) => getAddress(client, args),\n signMessage: (args) => signMessage(client, args),\n signTypedData: (args) => signTypedData(client, args),\n});\n\nexport const smartAccountClientMethodKeys = Object.keys(\n // @ts-expect-error we just want to get the keys\n smartAccountClientActions(undefined),\n).reduce((accum, curr) => {\n accum.add(curr);\n return accum;\n}, new Set<string>());\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isSmartAccountClient.js","sourceRoot":"","sources":["../../../src/client/isSmartAccountClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAMlF;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAOlC,MAA4C;IAE5C,KAAK,MAAM,GAAG,IAAI,4BAA4B,EAAE,CAAC;QAC/C,IAAI,CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,EAAE,CAAC;YACrB,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,MAAM,IAAI,YAAY,IAAI,MAAM,CAAC;AAC1C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAOtC,MAA4C;IAE5C,OAAO,MAAM,IAAI,YAAY,IAAI,MAAM,CAAC;AAC1C,CAAC","sourcesContent":["import type { Chain, Client, Transport } from \"viem\";\nimport type { SmartContractAccount } from \"../account/smartContractAccount\";\nimport { smartAccountClientMethodKeys } from \"./decorators/smartAccountClient.js\";\nimport type {\n BaseSmartAccountClient,\n SmartAccountClient,\n} from \"./smartAccountClient\";\n\n/**\n * Use this method to assert that a client is a BaseSmartAccountClient.\n * Useful for narrowing the type of the client down when used within the\n * smart account client decorators\n *\n * @param {Client<TTransport, TChain, TAccount>} client a viem client\n * @returns {boolean} true if the client is a SmartAccountClient\n */\nexport function isSmartAccountClient<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined
|
|
1
|
+
{"version":3,"file":"isSmartAccountClient.js","sourceRoot":"","sources":["../../../src/client/isSmartAccountClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAMlF;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAOlC,MAA4C;IAE5C,KAAK,MAAM,GAAG,IAAI,4BAA4B,EAAE,CAAC;QAC/C,IAAI,CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,EAAE,CAAC;YACrB,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,MAAM,IAAI,YAAY,IAAI,MAAM,CAAC;AAC1C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAOtC,MAA4C;IAE5C,OAAO,MAAM,IAAI,YAAY,IAAI,MAAM,CAAC;AAC1C,CAAC","sourcesContent":["import type { Chain, Client, Transport } from \"viem\";\nimport type { SmartContractAccount } from \"../account/smartContractAccount\";\nimport { smartAccountClientMethodKeys } from \"./decorators/smartAccountClient.js\";\nimport type {\n BaseSmartAccountClient,\n SmartAccountClient,\n} from \"./smartAccountClient\";\n\n/**\n * Use this method to assert that a client is a BaseSmartAccountClient.\n * Useful for narrowing the type of the client down when used within the\n * smart account client decorators\n *\n * @param {Client<TTransport, TChain, TAccount>} client a viem client\n * @returns {boolean} true if the client is a SmartAccountClient\n */\nexport function isSmartAccountClient<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n>(\n client: Client<TTransport, TChain, TAccount>,\n): client is SmartAccountClient<TTransport, TChain, TAccount> {\n for (const key of smartAccountClientMethodKeys) {\n if (!(key in client)) {\n return false;\n }\n }\n\n return client && \"middleware\" in client;\n}\n\n/**\n * Use this method to assert that a client is a BaseSmartAccountClient.\n * Useful for narrowing the type of the client down when used within the\n * smart account action decorators\n *\n * @param {Client<TTransport, TChain, TAccount>} client a viem client\n * @returns {boolean} true if the account is a BaseSmartAccountClient\n */\nexport function isBaseSmartAccountClient<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n>(\n client: Client<TTransport, TChain, TAccount>,\n): client is BaseSmartAccountClient<TTransport, TChain, TAccount> {\n return client && \"middleware\" in client;\n}\n"]}
|
|
@@ -137,60 +137,60 @@ export declare const UserOperationFeeOptionsSchema_v6: z.ZodObject<{
|
|
|
137
137
|
multiplier?: number | undefined;
|
|
138
138
|
}>>;
|
|
139
139
|
}, "strict", z.ZodTypeAny, {
|
|
140
|
-
|
|
140
|
+
callGasLimit?: {
|
|
141
141
|
min?: number | bigint | `0x${string}` | undefined;
|
|
142
142
|
max?: number | bigint | `0x${string}` | undefined;
|
|
143
143
|
multiplier?: number | undefined;
|
|
144
144
|
} | undefined;
|
|
145
|
-
|
|
145
|
+
verificationGasLimit?: {
|
|
146
146
|
min?: number | bigint | `0x${string}` | undefined;
|
|
147
147
|
max?: number | bigint | `0x${string}` | undefined;
|
|
148
148
|
multiplier?: number | undefined;
|
|
149
149
|
} | undefined;
|
|
150
|
-
|
|
150
|
+
preVerificationGas?: {
|
|
151
151
|
min?: number | bigint | `0x${string}` | undefined;
|
|
152
152
|
max?: number | bigint | `0x${string}` | undefined;
|
|
153
153
|
multiplier?: number | undefined;
|
|
154
154
|
} | undefined;
|
|
155
|
-
|
|
155
|
+
maxFeePerGas?: {
|
|
156
156
|
min?: number | bigint | `0x${string}` | undefined;
|
|
157
157
|
max?: number | bigint | `0x${string}` | undefined;
|
|
158
158
|
multiplier?: number | undefined;
|
|
159
159
|
} | undefined;
|
|
160
|
-
|
|
160
|
+
maxPriorityFeePerGas?: {
|
|
161
161
|
min?: number | bigint | `0x${string}` | undefined;
|
|
162
162
|
max?: number | bigint | `0x${string}` | undefined;
|
|
163
163
|
multiplier?: number | undefined;
|
|
164
164
|
} | undefined;
|
|
165
165
|
}, {
|
|
166
|
-
|
|
166
|
+
callGasLimit?: {
|
|
167
167
|
min?: number | bigint | `0x${string}` | undefined;
|
|
168
168
|
max?: number | bigint | `0x${string}` | undefined;
|
|
169
169
|
multiplier?: number | undefined;
|
|
170
170
|
} | undefined;
|
|
171
|
-
|
|
171
|
+
verificationGasLimit?: {
|
|
172
172
|
min?: number | bigint | `0x${string}` | undefined;
|
|
173
173
|
max?: number | bigint | `0x${string}` | undefined;
|
|
174
174
|
multiplier?: number | undefined;
|
|
175
175
|
} | undefined;
|
|
176
|
-
|
|
176
|
+
preVerificationGas?: {
|
|
177
177
|
min?: number | bigint | `0x${string}` | undefined;
|
|
178
178
|
max?: number | bigint | `0x${string}` | undefined;
|
|
179
179
|
multiplier?: number | undefined;
|
|
180
180
|
} | undefined;
|
|
181
|
-
|
|
181
|
+
maxFeePerGas?: {
|
|
182
182
|
min?: number | bigint | `0x${string}` | undefined;
|
|
183
183
|
max?: number | bigint | `0x${string}` | undefined;
|
|
184
184
|
multiplier?: number | undefined;
|
|
185
185
|
} | undefined;
|
|
186
|
-
|
|
186
|
+
maxPriorityFeePerGas?: {
|
|
187
187
|
min?: number | bigint | `0x${string}` | undefined;
|
|
188
188
|
max?: number | bigint | `0x${string}` | undefined;
|
|
189
189
|
multiplier?: number | undefined;
|
|
190
190
|
} | undefined;
|
|
191
191
|
}>;
|
|
192
192
|
export declare const UserOperationFeeOptionsSchema_v7: z.ZodObject<{
|
|
193
|
-
|
|
193
|
+
maxFeePerGas: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
194
194
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
195
195
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
196
196
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -203,7 +203,7 @@ export declare const UserOperationFeeOptionsSchema_v7: z.ZodObject<{
|
|
|
203
203
|
max?: number | bigint | `0x${string}` | undefined;
|
|
204
204
|
multiplier?: number | undefined;
|
|
205
205
|
}>>>;
|
|
206
|
-
|
|
206
|
+
maxPriorityFeePerGas: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
207
207
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
208
208
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
209
209
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -216,7 +216,7 @@ export declare const UserOperationFeeOptionsSchema_v7: z.ZodObject<{
|
|
|
216
216
|
max?: number | bigint | `0x${string}` | undefined;
|
|
217
217
|
multiplier?: number | undefined;
|
|
218
218
|
}>>>;
|
|
219
|
-
|
|
219
|
+
callGasLimit: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
220
220
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
221
221
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
222
222
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -229,7 +229,7 @@ export declare const UserOperationFeeOptionsSchema_v7: z.ZodObject<{
|
|
|
229
229
|
max?: number | bigint | `0x${string}` | undefined;
|
|
230
230
|
multiplier?: number | undefined;
|
|
231
231
|
}>>>;
|
|
232
|
-
|
|
232
|
+
verificationGasLimit: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
233
233
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
234
234
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
235
235
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -242,7 +242,7 @@ export declare const UserOperationFeeOptionsSchema_v7: z.ZodObject<{
|
|
|
242
242
|
max?: number | bigint | `0x${string}` | undefined;
|
|
243
243
|
multiplier?: number | undefined;
|
|
244
244
|
}>>>;
|
|
245
|
-
|
|
245
|
+
preVerificationGas: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
246
246
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
247
247
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
248
248
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -355,7 +355,7 @@ export declare const UserOperationFeeOptionsSchema_v7: z.ZodObject<{
|
|
|
355
355
|
} | undefined;
|
|
356
356
|
}>;
|
|
357
357
|
export declare const UserOperationFeeOptionsSchema: z.ZodObject<{
|
|
358
|
-
|
|
358
|
+
maxFeePerGas: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
359
359
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
360
360
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
361
361
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -368,7 +368,7 @@ export declare const UserOperationFeeOptionsSchema: z.ZodObject<{
|
|
|
368
368
|
max?: number | bigint | `0x${string}` | undefined;
|
|
369
369
|
multiplier?: number | undefined;
|
|
370
370
|
}>>>;
|
|
371
|
-
|
|
371
|
+
maxPriorityFeePerGas: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
372
372
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
373
373
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
374
374
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -381,7 +381,7 @@ export declare const UserOperationFeeOptionsSchema: z.ZodObject<{
|
|
|
381
381
|
max?: number | bigint | `0x${string}` | undefined;
|
|
382
382
|
multiplier?: number | undefined;
|
|
383
383
|
}>>>;
|
|
384
|
-
|
|
384
|
+
callGasLimit: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
385
385
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
386
386
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
387
387
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -394,7 +394,7 @@ export declare const UserOperationFeeOptionsSchema: z.ZodObject<{
|
|
|
394
394
|
max?: number | bigint | `0x${string}` | undefined;
|
|
395
395
|
multiplier?: number | undefined;
|
|
396
396
|
}>>>;
|
|
397
|
-
|
|
397
|
+
verificationGasLimit: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
398
398
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
399
399
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
400
400
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -407,7 +407,7 @@ export declare const UserOperationFeeOptionsSchema: z.ZodObject<{
|
|
|
407
407
|
max?: number | bigint | `0x${string}` | undefined;
|
|
408
408
|
multiplier?: number | undefined;
|
|
409
409
|
}>>>;
|
|
410
|
-
|
|
410
|
+
preVerificationGas: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
411
411
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
412
412
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
413
413
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -536,7 +536,7 @@ export declare const SmartAccountClientOptsSchema: z.ZodObject<{
|
|
|
536
536
|
* Optional user operation fee options to be set globally at the provider level
|
|
537
537
|
*/
|
|
538
538
|
feeOptions: z.ZodOptional<z.ZodObject<{
|
|
539
|
-
|
|
539
|
+
maxFeePerGas: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
540
540
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
541
541
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
542
542
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -549,7 +549,7 @@ export declare const SmartAccountClientOptsSchema: z.ZodObject<{
|
|
|
549
549
|
max?: number | bigint | `0x${string}` | undefined;
|
|
550
550
|
multiplier?: number | undefined;
|
|
551
551
|
}>>>;
|
|
552
|
-
|
|
552
|
+
maxPriorityFeePerGas: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
553
553
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
554
554
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
555
555
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -562,7 +562,7 @@ export declare const SmartAccountClientOptsSchema: z.ZodObject<{
|
|
|
562
562
|
max?: number | bigint | `0x${string}` | undefined;
|
|
563
563
|
multiplier?: number | undefined;
|
|
564
564
|
}>>>;
|
|
565
|
-
|
|
565
|
+
callGasLimit: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
566
566
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
567
567
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
568
568
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -575,7 +575,7 @@ export declare const SmartAccountClientOptsSchema: z.ZodObject<{
|
|
|
575
575
|
max?: number | bigint | `0x${string}` | undefined;
|
|
576
576
|
multiplier?: number | undefined;
|
|
577
577
|
}>>>;
|
|
578
|
-
|
|
578
|
+
verificationGasLimit: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
579
579
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
580
580
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
581
581
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -588,7 +588,7 @@ export declare const SmartAccountClientOptsSchema: z.ZodObject<{
|
|
|
588
588
|
max?: number | bigint | `0x${string}` | undefined;
|
|
589
589
|
multiplier?: number | undefined;
|
|
590
590
|
}>>>;
|
|
591
|
-
|
|
591
|
+
preVerificationGas: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
592
592
|
min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
593
593
|
max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
|
|
594
594
|
multiplier: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/client/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG9E,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAE3C,EAAE,CACJ,CAAC,CAAC,MAAM,CAA4B,CAAC,QAAQ,EAAE,EAAE;IAC/C,OAAO,CACL,QAAQ,IAAI,IAAI;QAChB,OAAO,QAAQ,KAAK,QAAQ;QAC5B,SAAS,IAAI,QAAQ;QACrB,MAAM,IAAI,QAAQ;QAClB,KAAK,IAAI,QAAQ;QACjB,MAAM,IAAI,QAAQ,CACnB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEL,mCAAmC;AACnC,qGAAqG;AACrG,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,YAAY,CAClD,CAAC,CAAC,KAAK,CAAC;IACN,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,GAAG,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KAC1B,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAC5B,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAC5B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;KAChB,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,C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AAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAErD;;OAEG;IACH,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAK,CAAC;IAE9D;;OAEG;IACH,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC;IAE5D;;OAEG;IACH,UAAU,EAAE,6BAA6B,CAAC,QAAQ,EAAE;CACrD,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["import type { Transport } from \"viem\";\nimport { z } from \"zod\";\n\nimport { BigNumberishRangeSchema, MultiplierSchema } from \"../utils/index.js\";\nimport type { BundlerClient } from \"./bundlerClient.js\";\n\nexport const createPublicErc4337ClientSchema = <\n TTransport extends Transport = Transport
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/client/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG9E,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAE3C,EAAE,CACJ,CAAC,CAAC,MAAM,CAA4B,CAAC,QAAQ,EAAE,EAAE;IAC/C,OAAO,CACL,QAAQ,IAAI,IAAI;QAChB,OAAO,QAAQ,KAAK,QAAQ;QAC5B,SAAS,IAAI,QAAQ;QACrB,MAAM,IAAI,QAAQ;QAClB,KAAK,IAAI,QAAQ;QACjB,MAAM,IAAI,QAAQ,CACnB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEL,mCAAmC;AACnC,qGAAqG;AACrG,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,YAAY,CAClD,CAAC,CAAC,KAAK,CAAC;IACN,CAAC,CAAC,MAAM,CAAC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,CAAC;KACD,OAAO,EAAE;KACT,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,gCAAgC,GAC3C,gCAAgC,CAAC,MAAM,CAAC;IACtC,6BAA6B,EAAE,kCAAkC;IACjE,uBAAuB,EAAE,kCAAkC;CAC5D,CAAC;KACC,OAAO,EAAE;KACT,MAAM,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,6BAA6B,GAAG,gCAAgC,CAAC;AAE9E,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC;KAC1C,MAAM,CAAC;IACN;;OAEG;IACH,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAErD;;OAEG;IACH,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAK,CAAC;IAE9D;;OAEG;IACH,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC;IAE5D;;OAEG;IACH,UAAU,EAAE,6BAA6B,CAAC,QAAQ,EAAE;CACrD,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["import type { Transport } from \"viem\";\nimport { z } from \"zod\";\n\nimport { BigNumberishRangeSchema, MultiplierSchema } from \"../utils/index.js\";\nimport type { BundlerClient } from \"./bundlerClient.js\";\n\nexport const createPublicErc4337ClientSchema = <\n TTransport extends Transport = Transport,\n>() =>\n z.custom<BundlerClient<TTransport>>((provider) => {\n return (\n provider != null &&\n typeof provider === \"object\" &&\n \"request\" in provider &&\n \"type\" in provider &&\n \"key\" in provider &&\n \"name\" in provider\n );\n });\n\n// [!region ConnectionConfigSchema]\n// TODO: in v5 either remove this or simplify it (either way this should be moved out of aa-sdk/core)\nexport const ConnectionConfigSchema = z.intersection(\n z.union([\n z.object({\n rpcUrl: z.never().optional(),\n apiKey: z.string(),\n jwt: z.never().optional(),\n }),\n z.object({\n rpcUrl: z.never().optional(),\n apiKey: z.never().optional(),\n jwt: z.string(),\n }),\n z.object({\n rpcUrl: z.string(),\n apiKey: z.never().optional(),\n jwt: z.never().optional(),\n }),\n z.object({\n rpcUrl: z.string(),\n apiKey: z.never().optional(),\n jwt: z.string(),\n }),\n ]),\n z.object({\n chainAgnosticUrl: z.string().optional(),\n }),\n);\n// [!endregion ConnectionConfigSchema]\n\nexport const UserOperationFeeOptionsFieldSchema =\n BigNumberishRangeSchema.merge(MultiplierSchema).partial();\n\nexport const UserOperationFeeOptionsSchema_v6 = z\n .object({\n maxFeePerGas: UserOperationFeeOptionsFieldSchema,\n maxPriorityFeePerGas: UserOperationFeeOptionsFieldSchema,\n callGasLimit: UserOperationFeeOptionsFieldSchema,\n verificationGasLimit: UserOperationFeeOptionsFieldSchema,\n preVerificationGas: UserOperationFeeOptionsFieldSchema,\n })\n .partial()\n .strict();\n\nexport const UserOperationFeeOptionsSchema_v7 =\n UserOperationFeeOptionsSchema_v6.extend({\n paymasterVerificationGasLimit: UserOperationFeeOptionsFieldSchema,\n paymasterPostOpGasLimit: UserOperationFeeOptionsFieldSchema,\n })\n .partial()\n .strict();\n\nexport const UserOperationFeeOptionsSchema = UserOperationFeeOptionsSchema_v7;\n\nexport const SmartAccountClientOptsSchema = z\n .object({\n /**\n * The maximum number of times to try fetching a transaction receipt before giving up (default: 5)\n */\n txMaxRetries: z.number().min(0).optional().default(5),\n\n /**\n * The interval in milliseconds to wait between retries while waiting for tx receipts (default: 2_000)\n */\n txRetryIntervalMs: z.number().min(0).optional().default(2_000),\n\n /**\n * The multiplier on interval length to wait between retries while waiting for tx receipts (default: 1.5)\n */\n txRetryMultiplier: z.number().min(0).optional().default(1.5),\n\n /**\n * Optional user operation fee options to be set globally at the provider level\n */\n feeOptions: UserOperationFeeOptionsSchema.optional(),\n })\n .strict();\n"]}
|