@account-kit/smart-contracts 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/dist/esm/plugindefs/session-key/config.js.map +1 -1
- package/dist/esm/src/light-account/accounts/account.js.map +1 -1
- package/dist/esm/src/light-account/accounts/base.js.map +1 -1
- package/dist/esm/src/light-account/accounts/multiOwner.js.map +1 -1
- package/dist/esm/src/light-account/accounts/predictAddress.js.map +1 -1
- package/dist/esm/src/light-account/actions/transferOwnership.d.ts +1 -1
- package/dist/esm/src/light-account/actions/transferOwnership.js.map +1 -1
- package/dist/esm/src/light-account/actions/updateOwners.js.map +1 -1
- package/dist/esm/src/light-account/clients/alchemyClient.js.map +1 -1
- package/dist/esm/src/light-account/clients/client.js.map +1 -1
- package/dist/esm/src/light-account/clients/multiOwnerAlchemyClient.js.map +1 -1
- package/dist/esm/src/light-account/clients/multiOwnerLightAccount.js.map +1 -1
- package/dist/esm/src/light-account/decorators/lightAccount.js.map +1 -1
- package/dist/esm/src/light-account/decorators/multiOwnerLightAccount.js.map +1 -1
- package/dist/esm/src/light-account/types.js.map +1 -1
- package/dist/esm/src/light-account/utils.d.ts +1 -1
- package/dist/esm/src/light-account/utils.js.map +1 -1
- package/dist/esm/src/ma-v2/account/common/modularAccountV2Base.js.map +1 -1
- package/dist/esm/src/ma-v2/account/modularAccountV2.js.map +1 -1
- package/dist/esm/src/ma-v2/account/nativeSMASigner.d.ts +2 -207
- package/dist/esm/src/ma-v2/account/nativeSMASigner.js +7 -4
- package/dist/esm/src/ma-v2/account/nativeSMASigner.js.map +1 -1
- package/dist/esm/src/ma-v2/account/predictAddress.js.map +1 -1
- package/dist/esm/src/ma-v2/actions/deferralActions.js.map +1 -1
- package/dist/esm/src/ma-v2/actions/install-validation/installValidation.js.map +1 -1
- package/dist/esm/src/ma-v2/client/client.js.map +1 -1
- package/dist/esm/src/ma-v2/modules/allowlist-module/module.js.map +1 -1
- package/dist/esm/src/ma-v2/modules/native-token-limit-module/module.js.map +1 -1
- package/dist/esm/src/ma-v2/modules/paymaster-guard-module/module.js.map +1 -1
- package/dist/esm/src/ma-v2/modules/single-signer-validation/module.js.map +1 -1
- package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.d.ts +2 -207
- package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js +7 -4
- package/dist/esm/src/ma-v2/modules/single-signer-validation/signer.js.map +1 -1
- package/dist/esm/src/ma-v2/modules/time-range-module/module.js.map +1 -1
- package/dist/esm/src/ma-v2/modules/utils.js.map +1 -1
- package/dist/esm/src/ma-v2/modules/webauthn-validation/module.js.map +1 -1
- package/dist/esm/src/ma-v2/permissionBuilder.js.map +1 -1
- package/dist/esm/src/ma-v2/permissionBuilderErrors.js +1 -1
- package/dist/esm/src/ma-v2/permissionBuilderErrors.js.map +1 -1
- package/dist/esm/src/ma-v2/utils.js.map +1 -1
- package/dist/esm/src/msca/account/multiOwnerAccount.js.map +1 -1
- package/dist/esm/src/msca/account/multisigAccount.d.ts +1 -1
- package/dist/esm/src/msca/account/multisigAccount.js.map +1 -1
- package/dist/esm/src/msca/account-loupe/decorator.js.map +1 -1
- package/dist/esm/src/msca/account-loupe/types.js.map +1 -1
- package/dist/esm/src/msca/client/alchemyClient.js.map +1 -1
- package/dist/esm/src/msca/client/client.js.map +1 -1
- package/dist/esm/src/msca/client/multiSigAlchemyClient.js.map +1 -1
- package/dist/esm/src/msca/plugin-manager/decorator.js.map +1 -1
- package/dist/esm/src/msca/plugin-manager/installPlugin.js.map +1 -1
- package/dist/esm/src/msca/plugin-manager/uninstallPlugin.js.map +1 -1
- package/dist/esm/src/msca/plugins/multi-owner/extension.js.map +1 -1
- package/dist/esm/src/msca/plugins/multi-owner/plugin.js.map +1 -1
- package/dist/esm/src/msca/plugins/multi-owner/signer.d.ts +3 -208
- package/dist/esm/src/msca/plugins/multi-owner/signer.js.map +1 -1
- package/dist/esm/src/msca/plugins/multisig/actions/getThreshold.js.map +1 -1
- package/dist/esm/src/msca/plugins/multisig/actions/isOwnerOf.js.map +1 -1
- package/dist/esm/src/msca/plugins/multisig/actions/proposeUserOperation.js.map +1 -1
- package/dist/esm/src/msca/plugins/multisig/actions/readOwners.js.map +1 -1
- package/dist/esm/src/msca/plugins/multisig/actions/signMultisigUserOperation.js.map +1 -1
- package/dist/esm/src/msca/plugins/multisig/extension.js.map +1 -1
- package/dist/esm/src/msca/plugins/multisig/middleware.js.map +1 -1
- package/dist/esm/src/msca/plugins/multisig/plugin.js.map +1 -1
- package/dist/esm/src/msca/plugins/multisig/signer.d.ts +3 -208
- package/dist/esm/src/msca/plugins/multisig/signer.js.map +1 -1
- package/dist/esm/src/msca/plugins/multisig/types.js.map +1 -1
- package/dist/esm/src/msca/plugins/multisig/utils/formatSignatures.js.map +1 -1
- package/dist/esm/src/msca/plugins/multisig/utils/getSignerType.d.ts +1 -1
- package/dist/esm/src/msca/plugins/multisig/utils/getSignerType.js.map +1 -1
- package/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.d.ts +1 -1
- package/dist/esm/src/msca/plugins/multisig/utils/splitAggregatedSignature.js.map +1 -1
- package/dist/esm/src/msca/plugins/session-key/extension.js.map +1 -1
- package/dist/esm/src/msca/plugins/session-key/permissions.js.map +1 -1
- package/dist/esm/src/msca/plugins/session-key/plugin.js.map +1 -1
- package/dist/esm/src/msca/plugins/session-key/signer.d.ts +4 -209
- package/dist/esm/src/msca/plugins/session-key/signer.js.map +1 -1
- package/dist/esm/src/msca/plugins/session-key/utils.js.map +1 -1
- package/dist/esm/src/msca/plugins/types.js.map +1 -1
- package/dist/esm/src/msca/utils.js.map +1 -1
- package/dist/types/src/light-account/accounts/account.d.ts.map +1 -1
- package/dist/types/src/light-account/accounts/base.d.ts.map +1 -1
- package/dist/types/src/light-account/accounts/multiOwner.d.ts.map +1 -1
- package/dist/types/src/light-account/actions/transferOwnership.d.ts +1 -1
- package/dist/types/src/light-account/actions/transferOwnership.d.ts.map +1 -1
- package/dist/types/src/light-account/actions/updateOwners.d.ts.map +1 -1
- package/dist/types/src/light-account/types.d.ts.map +1 -1
- package/dist/types/src/light-account/utils.d.ts +1 -1
- package/dist/types/src/light-account/utils.d.ts.map +1 -1
- package/dist/types/src/ma-v2/account/nativeSMASigner.d.ts +2 -207
- package/dist/types/src/ma-v2/account/nativeSMASigner.d.ts.map +1 -1
- package/dist/types/src/ma-v2/modules/allowlist-module/module.d.ts.map +1 -1
- package/dist/types/src/ma-v2/modules/single-signer-validation/signer.d.ts +2 -207
- package/dist/types/src/ma-v2/modules/single-signer-validation/signer.d.ts.map +1 -1
- package/dist/types/src/ma-v2/modules/utils.d.ts.map +1 -1
- package/dist/types/src/ma-v2/permissionBuilderErrors.d.ts.map +1 -1
- package/dist/types/src/ma-v2/utils.d.ts.map +1 -1
- package/dist/types/src/msca/account/multisigAccount.d.ts +1 -1
- package/dist/types/src/msca/account/multisigAccount.d.ts.map +1 -1
- package/dist/types/src/msca/plugin-manager/decorator.d.ts.map +1 -1
- package/dist/types/src/msca/plugin-manager/installPlugin.d.ts.map +1 -1
- package/dist/types/src/msca/plugin-manager/uninstallPlugin.d.ts.map +1 -1
- package/dist/types/src/msca/plugins/multi-owner/plugin.d.ts.map +1 -1
- package/dist/types/src/msca/plugins/multi-owner/signer.d.ts +3 -208
- package/dist/types/src/msca/plugins/multi-owner/signer.d.ts.map +1 -1
- package/dist/types/src/msca/plugins/multisig/actions/proposeUserOperation.d.ts.map +1 -1
- package/dist/types/src/msca/plugins/multisig/plugin.d.ts.map +1 -1
- package/dist/types/src/msca/plugins/multisig/signer.d.ts +3 -208
- package/dist/types/src/msca/plugins/multisig/signer.d.ts.map +1 -1
- package/dist/types/src/msca/plugins/multisig/types.d.ts.map +1 -1
- package/dist/types/src/msca/plugins/multisig/utils/formatSignatures.d.ts.map +1 -1
- package/dist/types/src/msca/plugins/multisig/utils/getSignerType.d.ts +1 -1
- package/dist/types/src/msca/plugins/multisig/utils/getSignerType.d.ts.map +1 -1
- package/dist/types/src/msca/plugins/multisig/utils/splitAggregatedSignature.d.ts +1 -1
- package/dist/types/src/msca/plugins/multisig/utils/splitAggregatedSignature.d.ts.map +1 -1
- package/dist/types/src/msca/plugins/session-key/extension.d.ts.map +1 -1
- package/dist/types/src/msca/plugins/session-key/plugin.d.ts.map +1 -1
- package/dist/types/src/msca/plugins/session-key/signer.d.ts +4 -209
- package/dist/types/src/msca/plugins/session-key/signer.d.ts.map +1 -1
- package/dist/types/src/msca/utils.d.ts.map +1 -1
- package/package.json +7 -9
- package/plugindefs/session-key/config.ts +1 -1
- package/src/light-account/accounts/account.ts +7 -5
- package/src/light-account/accounts/base.ts +18 -15
- package/src/light-account/accounts/multiOwner.ts +9 -6
- package/src/light-account/accounts/predictAddress.ts +5 -5
- package/src/light-account/actions/transferOwnership.ts +5 -4
- package/src/light-account/actions/updateOwners.ts +6 -5
- package/src/light-account/clients/alchemyClient.ts +3 -3
- package/src/light-account/clients/client.ts +6 -6
- package/src/light-account/clients/multiOwnerAlchemyClient.ts +3 -3
- package/src/light-account/clients/multiOwnerLightAccount.ts +7 -7
- package/src/light-account/decorators/lightAccount.ts +4 -4
- package/src/light-account/decorators/multiOwnerLightAccount.ts +4 -4
- package/src/light-account/types.ts +3 -2
- package/src/light-account/utils.ts +10 -10
- package/src/ma-v2/account/common/modularAccountV2Base.ts +8 -8
- package/src/ma-v2/account/modularAccountV2.ts +4 -4
- package/src/ma-v2/account/nativeSMASigner.ts +16 -13
- package/src/ma-v2/account/predictAddress.ts +13 -13
- package/src/ma-v2/actions/deferralActions.ts +7 -7
- package/src/ma-v2/actions/install-validation/installValidation.ts +14 -14
- package/src/ma-v2/client/client.ts +8 -8
- package/src/ma-v2/modules/allowlist-module/module.ts +5 -5
- package/src/ma-v2/modules/native-token-limit-module/module.ts +1 -1
- package/src/ma-v2/modules/paymaster-guard-module/module.ts +2 -2
- package/src/ma-v2/modules/single-signer-validation/module.ts +2 -2
- package/src/ma-v2/modules/single-signer-validation/signer.ts +14 -11
- package/src/ma-v2/modules/time-range-module/module.ts +6 -6
- package/src/ma-v2/modules/utils.ts +4 -4
- package/src/ma-v2/modules/webauthn-validation/module.ts +2 -2
- package/src/ma-v2/permissionBuilder.ts +14 -14
- package/src/ma-v2/permissionBuilderErrors.ts +9 -7
- package/src/ma-v2/utils.ts +4 -4
- package/src/msca/account/multiOwnerAccount.ts +5 -5
- package/src/msca/account/multisigAccount.ts +6 -6
- package/src/msca/account-loupe/decorator.ts +11 -11
- package/src/msca/account-loupe/types.ts +1 -1
- package/src/msca/client/alchemyClient.ts +4 -4
- package/src/msca/client/client.ts +12 -12
- package/src/msca/client/multiSigAlchemyClient.ts +4 -4
- package/src/msca/plugin-manager/decorator.ts +6 -5
- package/src/msca/plugin-manager/installPlugin.ts +8 -7
- package/src/msca/plugin-manager/uninstallPlugin.ts +6 -5
- package/src/msca/plugins/multi-owner/extension.ts +10 -10
- package/src/msca/plugins/multi-owner/plugin.ts +21 -19
- package/src/msca/plugins/multi-owner/signer.ts +4 -4
- package/src/msca/plugins/multisig/actions/getThreshold.ts +3 -3
- package/src/msca/plugins/multisig/actions/isOwnerOf.ts +2 -2
- package/src/msca/plugins/multisig/actions/proposeUserOperation.ts +4 -3
- package/src/msca/plugins/multisig/actions/readOwners.ts +3 -3
- package/src/msca/plugins/multisig/actions/signMultisigUserOperation.ts +5 -5
- package/src/msca/plugins/multisig/extension.ts +16 -16
- package/src/msca/plugins/multisig/middleware.ts +2 -2
- package/src/msca/plugins/multisig/plugin.ts +21 -19
- package/src/msca/plugins/multisig/signer.ts +5 -5
- package/src/msca/plugins/multisig/types.ts +4 -2
- package/src/msca/plugins/multisig/utils/formatSignatures.ts +1 -1
- package/src/msca/plugins/multisig/utils/getSignerType.ts +2 -2
- package/src/msca/plugins/multisig/utils/splitAggregatedSignature.ts +7 -6
- package/src/msca/plugins/session-key/extension.ts +16 -14
- package/src/msca/plugins/session-key/permissions.ts +7 -7
- package/src/msca/plugins/session-key/plugin.ts +30 -28
- package/src/msca/plugins/session-key/signer.ts +5 -5
- package/src/msca/plugins/session-key/utils.ts +4 -4
- package/src/msca/plugins/types.ts +1 -1
- package/src/msca/utils.ts +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSignerType.js","sourceRoot":"","sources":["../../../../../../../src/msca/plugins/multisig/utils/getSignerType.ts"],"names":[],"mappings":"AACA,OAAO,EAML,IAAI,GAEL,MAAM,MAAM,CAAC;AAsBd;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAGhC,EACA,MAAM,EACN,SAAS,EACT,MAAM,GACkC,EAAuB,EAAE;IACjE,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;IAChD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;IAEtE,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;QAC1D,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,UAAU,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import type { SmartAccountSigner, SmartContractAccount } from \"@aa-sdk/core\";\nimport {\n type Chain,\n type Client,\n type Hex,\n type PublicActions,\n type PublicRpcSchema,\n size,\n type Transport,\n} from \"viem\";\nimport type { SignerType } from \"../types\";\n\ntype GetSignerTypeParams<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TClient extends Client<\n TTransport,\n TChain,\n TAccount,\n PublicRpcSchema,\n PublicActions\n > = Client<TTransport, TChain, TAccount, PublicRpcSchema, PublicActions
|
|
1
|
+
{"version":3,"file":"getSignerType.js","sourceRoot":"","sources":["../../../../../../../src/msca/plugins/multisig/utils/getSignerType.ts"],"names":[],"mappings":"AACA,OAAO,EAML,IAAI,GAEL,MAAM,MAAM,CAAC;AAsBd;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAGhC,EACA,MAAM,EACN,SAAS,EACT,MAAM,GACkC,EAAuB,EAAE;IACjE,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,UAAU,EAAE,CAAC;IAChD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;IAEtE,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;QAC1D,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,UAAU,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import type { SmartAccountSigner, SmartContractAccount } from \"@aa-sdk/core\";\nimport {\n type Chain,\n type Client,\n type Hex,\n type PublicActions,\n type PublicRpcSchema,\n size,\n type Transport,\n} from \"viem\";\nimport type { SignerType } from \"../types\";\n\ntype GetSignerTypeParams<\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TClient extends Client<\n TTransport,\n TChain,\n TAccount,\n PublicRpcSchema,\n PublicActions\n > = Client<TTransport, TChain, TAccount, PublicRpcSchema, PublicActions>,\n> = {\n signer: SmartAccountSigner<any>;\n signature: Hex;\n client: TClient;\n};\n\n/**\n * Determines the type of signer (Externally Owned Account (EOA) or CONTRACT) based on the provided client, signature, and signer.\n *\n * @example\n * ```ts\n * import { getSignerType } from \"@account-kit/smart-contracts\";\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { createPublicClient, generatePrivateKey } from \"viem\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * const client = createPublicClient(...);\n * const signature = signer.signMessage(\"Hello World\");\n *\n * const signerType = await getSignerType({ client, signature, signer }); // EOA\n * ```\n *\n * @param {GetSignerTypeParams<TTransport, TChain>} params the parameters including the client, signature, and signer\n * @returns {Promise<SignerType>} A promise that resolves to the signer type, which is either \"EOA\" or \"CONTRACT\"\n */\nexport const getSignerType = async <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n>({\n client,\n signature,\n signer,\n}: GetSignerTypeParams<TTransport, TChain>): Promise<SignerType> => {\n const signerAddress = await signer.getAddress();\n const byteCode = await client.getBytecode({ address: signerAddress });\n\n return (byteCode ?? \"0x\") === \"0x\" && size(signature) === 65\n ? \"EOA\"\n : \"CONTRACT\";\n};\n"]}
|
|
@@ -23,4 +23,4 @@ export type SplitAggregateSignatureResult = {
|
|
|
23
23
|
* @param {UserOperationRequest<TEntryPointVersion>} args.request - the user operation request that the signature is for
|
|
24
24
|
* @returns {Promise<SplitAggregateSignatureResult>} the signature split into its upper limits and current signatures
|
|
25
25
|
*/
|
|
26
|
-
export declare const splitAggregatedSignature: <TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>(args: SplitAggregateSignatureParams<TAccount
|
|
26
|
+
export declare const splitAggregatedSignature: <TAccount extends SmartContractAccount | undefined = SmartContractAccount | undefined>(args: SplitAggregateSignatureParams<TAccount>) => Promise<SplitAggregateSignatureResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splitAggregatedSignature.js","sourceRoot":"","sources":["../../../../../../../src/msca/plugins/multisig/utils/splitAggregatedSignature.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,GAIV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAY,MAAM,MAAM,CAAC;AACtE,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"splitAggregatedSignature.js","sourceRoot":"","sources":["../../../../../../../src/msca/plugins/multisig/utils/splitAggregatedSignature.ts"],"names":[],"mappings":"A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AE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,EAC/C,QAAQ,CACT,CAAC;QACF,MAAM,eAAe,GAAG,OAAO,CAC7B,SAAS,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EACnD,QAAQ,CACT,CAAC;QAEF,OAAO;YACL,MAAM;YACN,UAAU;YACV,aAAa,EAAE,YAAY;YAC3B,SAAS,EAAE,SAAS,CAAC,iBAAiB,EAAE;gBACtC,KAAK,EAAE,eAAe;gBACtB,MAAM,EAAE,MAAM,GAAG,EAAE;aACpB,CAAC;SACH,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,OAAO;QACL,aAAa,EAAE,GAAG;QAClB,sBAAsB,EAAE,YAAY;QACpC,8BAA8B,EAAE,oBAAoB;QACpD,UAAU,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;KAC1C,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n takeBytes,\n type GetEntryPointFromAccount,\n type SmartContractAccount,\n type UserOperationRequest,\n} from \"@aa-sdk/core\";\nimport { fromHex, hashMessage, recoverAddress, type Hex } from \"viem\";\nimport { InvalidAggregatedSignatureError } from \"../../../errors.js\";\nimport type { Signature } from \"../types.js\";\n\nexport type SplitAggregateSignatureParams<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n> = {\n aggregatedSignature: Hex;\n threshold: number;\n account: SmartContractAccount;\n request: UserOperationRequest<TEntryPointVersion>;\n};\n\nexport type SplitAggregateSignatureResult = {\n upperLimitPvg: Hex;\n upperLimitMaxFeePerGas: Hex;\n upperLimitMaxPriorityFeePerGas: Hex;\n signatures: Signature[];\n};\n\n/**\n * Takes an aggregated signature and threshold and splits it into its components\n *\n * @param {SplitAggregateSignatureParams<TAccount>} args - the arguments for the split\n * @param {Hex} args.aggregateSignature - the aggregated signature to split\n * @param {number} args.threshold - the threshold for the signature\n * @param {SmartContractAccount} args.account - the account which the signature is valid for\n * @param {UserOperationRequest<TEntryPointVersion>} args.request - the user operation request that the signature is for\n * @returns {Promise<SplitAggregateSignatureResult>} the signature split into its upper limits and current signatures\n */\nexport const splitAggregatedSignature = async <\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n>(\n args: SplitAggregateSignatureParams<TAccount>,\n): Promise<SplitAggregateSignatureResult> => {\n const { aggregatedSignature, threshold, account, request } = args;\n if (aggregatedSignature.length < 192 + (65 * threshold - 1)) {\n throw new InvalidAggregatedSignatureError();\n }\n\n // UserOp.sig format:\n // 0-32: upperLimitPreVerificationGas\n // 32-64: upperLimitMaxFeePerGas\n // 64-96: upperLimitMaxPriorityFeePerGas\n // 96-96+n: k signatures, each sig is 65 bytes each (so n = 65 * k)\n // 96+n-: contract signatures if any\n const pvg = takeBytes(aggregatedSignature, { count: 32 });\n const maxFeePerGas = takeBytes(aggregatedSignature, {\n count: 32,\n offset: 32,\n });\n const maxPriorityFeePerGas = takeBytes(aggregatedSignature, {\n count: 32,\n offset: 64,\n });\n const signaturesAndData = takeBytes(aggregatedSignature, {\n offset: 96,\n });\n\n const signatureHexes = (() => {\n const signatureStr = takeBytes(signaturesAndData, {\n count: 65 * threshold - 1,\n });\n const signatures: Hex[] = [];\n for (let i = 0; i < threshold - 1; i++) {\n signatures.push(takeBytes(signatureStr, { count: 65, offset: i * 65 }));\n }\n\n return signatures;\n })();\n\n const signatures: Promise<Signature>[] = signatureHexes.map(\n async (signature): Promise<Signature> => {\n // in RSV, v is the last byte of a 65 byte signature\n const v = BigInt(takeBytes(signature, { count: 1, offset: 64 }));\n const signerType = v === 0n ? \"CONTRACT\" : \"EOA\";\n if (signerType === \"EOA\") {\n // To recover the signer from just the user op and the raw EOA signature, we need to perform an EC recover. The input hash to recover from should be the original user op hash, with the upper limit gas values, wrapped in the standard EIP-191 wrapper format.\n const hash = hashMessage({\n raw: account.getEntryPoint().getUserOperationHash({\n ...request,\n preVerificationGas: pvg,\n maxFeePerGas,\n maxPriorityFeePerGas,\n }),\n });\n\n return {\n // the signer doesn't get used here for EOAs\n // TODO: nope. this needs to actually do an ec recover\n signer: await recoverAddress({ hash, signature }),\n signature,\n signerType,\n userOpSigType: \"UPPERLIMIT\",\n };\n }\n\n const signer = takeBytes(signature, { count: 20, offset: 12 });\n const offset = fromHex(\n takeBytes(signature, { count: 32, offset: 32 }),\n \"number\",\n );\n const signatureLength = fromHex(\n takeBytes(signaturesAndData, { count: 32, offset }),\n \"number\",\n );\n\n return {\n signer,\n signerType,\n userOpSigType: \"UPPERLIMIT\",\n signature: takeBytes(signaturesAndData, {\n count: signatureLength,\n offset: offset + 32,\n }),\n };\n },\n );\n\n return {\n upperLimitPvg: pvg,\n upperLimitMaxFeePerGas: maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: maxPriorityFeePerGas,\n signatures: await Promise.all(signatures),\n };\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/session-key/extension.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GAMrB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,gBAAgB,EAChB,uBAAuB,IAAI,wBAAwB,GAEpD,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAgE5D;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAQK,CAQvC,MAA4C,EAC5C,EAAE;IACF,MAAM,EACJ,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,GAAG,EAAE,EACN,GAAG,wBAAwB,CAA+B,MAAM,CAAC,CAAC;IAEnE,4EAA4E;IAC5E,6EAA6E;IAC7E,2EAA2E;IAC3E,8EA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C,MAAM,QAAQ,GAAG,gBAAgB,CAAC,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;YAErE,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC;gBACtD,OAAO,CAAC,OAAO;gBACf,MAAM;aACP,CAAC,CAAC;YAEH,OAAO,gBAAgB,CAAC;gBACtB,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC;gBACnC,SAAS,EAAE,SAAuD;gBAClE,OAAO;gBACP,aAAa;aACd,CAAC,CAAC;QACL,CAAC;QAED,2BAA2B,EAAE,KAAK,EAAE,EAClC,GAAG,EACH,WAAW,EACX,SAAS,EACT,aAAa,EACb,OAAO,GAAG,MAAM,CAAC,OAAO,GACzB,EAAE,EAAE;YACH,IAAI,CAAC,OAAO;gBAAE,MAAM,IAAI,oBAAoB,EAAE,CAAC;YAE/C,OAAO,oBAAoB,CAAC;gBAC1B,IAAI,EAAE,CAAC,GAAG,EAAE,WAAW,CAAC;gBACxB,SAAS,EAAE,SAEV;gBACD,OAAO;gBACP,aAAa;aACd,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,+BAA+B,CAAC,KAAc;IACrD,MAAM,OAAO,GAAI,KAAa,EAAE,OAAO,CAAC;IACxC,OAAO,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3D,CAAC;AAED,MAAM,yBAA0B,SAAQ,KAAK;CAAG","sourcesContent":["import type {\n GetEntryPointFromAccount,\n UserOperationOverridesParameter,\n} from \"@aa-sdk/core\";\nimport {\n AccountNotFoundError,\n isSmartAccountClient,\n type GetAccountParameter,\n type IsUndefined,\n type SendUserOperationResult,\n type SmartContractAccount,\n type UserOperationOverrides,\n} from \"@aa-sdk/core\";\nimport type { Address, Chain, Client, Hex, Transport } from \"viem\";\nimport type { GetPluginAddressParameter } from \"../types.js\";\nimport {\n SessionKeyPlugin,\n sessionKeyPluginActions as sessionKeyPluginActions_,\n type SessionKeyPluginActions as SessionKeyPluginActions_,\n} from \"./plugin.js\";\nimport { buildSessionKeysToRemoveStruct } from \"./utils.js\";\n\nexport type SessionKeyPluginActions<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>\n> = Omit<\n SessionKeyPluginActions_<TAccount>,\n | \"removeSessionKey\"\n | \"addSessionKey\"\n | \"rotateSessionKey\"\n | \"updateKeyPermissions\"\n> & {\n isAccountSessionKey: (\n args: { key: Address } & GetPluginAddressParameter &\n GetAccountParameter<TAccount>\n ) => Promise<boolean>;\n\n getAccountSessionKeys: (\n args: GetPluginAddressParameter & GetAccountParameter<TAccount>\n ) => Promise<ReadonlyArray<Address>>;\n\n removeSessionKey: (\n args: { key: Address } & GetPluginAddressParameter &\n GetAccountParameter<TAccount> &\n UserOperationOverridesParameter<TEntryPointVersion>\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n addSessionKey: (\n args: {\n key: Address;\n permissions: Hex[];\n tag: Hex;\n } & GetPluginAddressParameter &\n GetAccountParameter<TAccount> &\n UserOperationOverridesParameter<TEntryPointVersion>\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n rotateSessionKey: (\n args: {\n oldKey: Address;\n newKey: Address;\n } & GetPluginAddressParameter &\n GetAccountParameter<TAccount> &\n UserOperationOverridesParameter<TEntryPointVersion>\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n updateSessionKeyPermissions: (\n args: {\n key: Address;\n permissions: Hex[];\n } & GetPluginAddressParameter &\n GetAccountParameter<TAccount> &\n UserOperationOverridesParameter<TEntryPointVersion>\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n} & (IsUndefined<TAccount> extends false\n ? {\n getAccountSessionKeys: (\n args?: GetPluginAddressParameter & GetAccountParameter<TAccount>\n ) => Promise<ReadonlyArray<Address>>;\n }\n : {});\n\n/**\n * Creates actions for managing session keys in a smart contract associated with a client, including adding, removing, rotating, and updating session key permissions.\n *\n * @example\n * ```ts\n * import { createModularAccountAlchemyClient, sessionKeyPluginActions } from \"@account-kit/smart-contracts\";\n *\n * const client = createModularAccountAlchemyClient(...).extend(sessionKeyPluginActions);\n * ```\n *\n * @param {Client<TTransport, TChain, TAccount>} client The client instance to use for managing session keys\n * @returns {SessionKeyPluginActions<TAccount>} An object containing methods for session key management and interaction with the smart contract\n */\nexport const sessionKeyPluginActions: <\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) => SessionKeyPluginActions<TAccount> = <\n TTransport extends Transport = Transport,\n TChain extends Chain | undefined = Chain | undefined,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>\n>(\n client: Client<TTransport, TChain, TAccount>\n) => {\n const {\n removeSessionKey,\n addSessionKey,\n rotateSessionKey,\n updateKeyPermissions,\n executeWithSessionKey,\n ...og\n } = sessionKeyPluginActions_<TTransport, TChain, TAccount>(client);\n\n // The session key plugin returns an opaque error when the permissions check\n // fails. We want the SDK to return a helpful error instead. After validation\n // fails, rerun the user op simulation but using state overrides to replace\n // the code of the session key plugin with a version that produces descriptive\n // errors.\n const fixedExecuteWithSessionKey: typeof executeWithSessionKey = async (\n ...originalArgs\n ) => {\n let initialError: unknown;\n try {\n return await executeWithSessionKey(...originalArgs);\n } catch (error) {\n initialError = error;\n }\n const details = getRpcErrorMessageFromViemError(initialError);\n if (!details?.includes(\"AA23 reverted (or OOG)\")) {\n throw initialError;\n }\n if (!isSmartAccountClient(client) || !client.chain) {\n throw initialError;\n }\n const {\n args,\n overrides,\n context,\n account = client.account,\n } = originalArgs[0];\n if (!account) {\n throw initialError;\n }\n const data = og.encodeExecuteWithSessionKey({ args });\n const sessionKeyPluginAddress =\n SessionKeyPlugin.meta.addresses[client.chain.id];\n // The bytecode is 10kb of hex. Only import it if needed.\n const { DEBUG_SESSION_KEY_BYTECODE } = await import(\n \"./debug-session-key-bytecode.js\"\n );\n const updatedOverrides: UserOperationOverrides<TEntryPointVersion> = {\n ...(overrides as UserOperationOverrides<TEntryPointVersion>),\n stateOverride: [\n ...(overrides?.stateOverride ?? []),\n {\n address: sessionKeyPluginAddress,\n code: DEBUG_SESSION_KEY_BYTECODE,\n },\n ],\n };\n try {\n await client.buildUserOperation({\n uo: data,\n overrides: updatedOverrides,\n context,\n account,\n });\n // We expect this to fail because we just saw the same user op fail a\n // moment ago. It could succeed if the state of the chain has changed but\n // there's not much we can do with a successful result so return the\n // original error.\n throw initialError;\n } catch (improvedError) {\n const details = getRpcErrorMessageFromViemError(improvedError) ?? \"\";\n const reason = details.match(/AA23 reverted: (.+)/)?.[1];\n if (!reason) {\n throw initialError;\n }\n throw new SessionKeyPermissionError(reason);\n }\n };\n\n return {\n ...og,\n\n executeWithSessionKey: fixedExecuteWithSessionKey,\n\n isAccountSessionKey: async ({\n key,\n pluginAddress,\n account = client.account,\n }) => {\n if (!account) throw new AccountNotFoundError();\n\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n\n return await contract.read.isSessionKeyOf([account.address, key]);\n },\n\n getAccountSessionKeys: async (\n args: GetPluginAddressParameter & GetAccountParameter<TAccount>\n ) => {\n const account = args?.account ?? client.account;\n if (!account) throw new AccountNotFoundError();\n\n const contract = SessionKeyPlugin.getContract(\n client,\n args?.pluginAddress\n );\n\n return await contract.read.sessionKeysOf([account.address]);\n },\n\n removeSessionKey: async ({\n key,\n overrides,\n account = client.account,\n pluginAddress,\n }) => {\n if (!account) throw new AccountNotFoundError();\n\n const sessionKeysToRemove = await buildSessionKeysToRemoveStruct(client, {\n keys: [key],\n account,\n pluginAddress,\n });\n\n return removeSessionKey({\n args: [key, sessionKeysToRemove[0].predecessor],\n overrides: overrides as UserOperationOverrides<TEntryPointVersion>,\n account,\n });\n },\n\n addSessionKey: async ({\n key,\n tag,\n permissions,\n overrides,\n pluginAddress,\n account = client.account,\n }) => {\n if (!account) throw new AccountNotFoundError();\n\n return addSessionKey({\n args: [key, tag, permissions],\n overrides: overrides as UserOperationOverrides<TEntryPointVersion>,\n account,\n pluginAddress,\n });\n },\n\n rotateSessionKey: async ({\n newKey,\n oldKey,\n overrides,\n pluginAddress,\n account = client.account,\n }) => {\n if (!account) throw new AccountNotFoundError();\n\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n\n const predecessor = await contract.read.findPredecessor([\n account.address,\n oldKey,\n ]);\n\n return rotateSessionKey({\n args: [oldKey, predecessor, newKey],\n overrides: overrides as UserOperationOverrides<TEntryPointVersion>,\n account,\n pluginAddress,\n });\n },\n\n updateSessionKeyPermissions: async ({\n key,\n permissions,\n overrides,\n pluginAddress,\n account = client.account,\n }) => {\n if (!account) throw new AccountNotFoundError();\n\n return updateKeyPermissions({\n args: [key, permissions],\n overrides: overrides as UserOperationOverrides<\n GetEntryPointFromAccount<TAccount>\n >,\n account,\n pluginAddress,\n });\n },\n };\n};\n\nfunction getRpcErrorMessageFromViemError(error: unknown): string | undefined {\n const details = (error as any)?.details;\n return typeof details === \"string\" ? details : undefined;\n}\n\nclass SessionKeyPermissionError extends Error {}\n"]}
|
|
1
|
+
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/session-key/extension.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GAMrB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,gBAAgB,EAChB,uBAAuB,IAAI,wBAAwB,GAEpD,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAiE5D;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAQK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ationOverridesParameter,\n} from \"@aa-sdk/core\";\nimport {\n AccountNotFoundError,\n isSmartAccountClient,\n type GetAccountParameter,\n type IsUndefined,\n type SendUserOperationResult,\n type SmartContractAccount,\n type UserOperationOverrides,\n} from \"@aa-sdk/core\";\nimport type { Address, Chain, Client, Hex, Transport } from \"viem\";\nimport type { GetPluginAddressParameter } from \"../types.js\";\nimport {\n SessionKeyPlugin,\n sessionKeyPluginActions as sessionKeyPluginActions_,\n type SessionKeyPluginActions as SessionKeyPluginActions_,\n} from \"./plugin.js\";\nimport { buildSessionKeysToRemoveStruct } from \"./utils.js\";\n\nexport type SessionKeyPluginActions<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n> = Omit<\n SessionKeyPluginActions_<TAccount>,\n | \"removeSessionKey\"\n | \"addSessionKey\"\n | \"rotateSessionKey\"\n | \"updateKeyPermissions\"\n> & {\n isAccountSessionKey: (\n args: { key: Address } & GetPluginAddressParameter &\n GetAccountParameter<TAccount>,\n ) => Promise<boolean>;\n\n getAccountSessionKeys: (\n args: GetPluginAddressParameter & GetAccountParameter<TAccount>,\n ) => Promise<ReadonlyArray<Address>>;\n\n removeSessionKey: (\n args: { key: Address } & GetPluginAddressParameter &\n GetAccountParameter<TAccount> &\n UserOperationOverridesParameter<TEntryPointVersion>,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n addSessionKey: (\n args: {\n key: Address;\n permissions: Hex[];\n tag: Hex;\n } & GetPluginAddressParameter &\n GetAccountParameter<TAccount> &\n UserOperationOverridesParameter<TEntryPointVersion>,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n rotateSessionKey: (\n args: {\n oldKey: Address;\n newKey: Address;\n } & GetPluginAddressParameter &\n GetAccountParameter<TAccount> &\n UserOperationOverridesParameter<TEntryPointVersion>,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n updateSessionKeyPermissions: (\n args: {\n key: Address;\n permissions: Hex[];\n } & GetPluginAddressParameter &\n GetAccountParameter<TAccount> &\n UserOperationOverridesParameter<TEntryPointVersion>,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n} & (IsUndefined<TAccount> extends false\n ? {\n getAccountSessionKeys: (\n args?: GetPluginAddressParameter & GetAccountParameter<TAccount>,\n ) => Promise<ReadonlyArray<Address>>;\n }\n : {});\n\n/**\n * Creates actions for managing session keys in a smart contract associated with a client, including adding, removing, rotating, and updating session key permissions.\n *\n * @example\n * ```ts\n * import { createModularAccountAlchemyClient, sessionKeyPluginActions } from \"@account-kit/smart-contracts\";\n *\n * const client = createModularAccountAlchemyClient(...).extend(sessionKeyPluginActions);\n * ```\n *\n * @param {Client<TTransport, TChain, TAccount>} client The client instance to use for managing session keys\n * @returns {SessionKeyPluginActions<TAccount>} An object containing methods for session key management and interaction with the smart contract\n */\nexport const sessionKeyPluginActions: <\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) => SessionKeyPluginActions<TAccount> = <\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) => {\n const {\n removeSessionKey,\n addSessionKey,\n rotateSessionKey,\n updateKeyPermissions,\n executeWithSessionKey,\n ...og\n } = sessionKeyPluginActions_<TTransport, TChain, TAccount>(client);\n\n // The session key plugin returns an opaque error when the permissions check\n // fails. We want the SDK to return a helpful error instead. After validation\n // fails, rerun the user op simulation but using state overrides to replace\n // the code of the session key plugin with a version that produces descriptive\n // errors.\n const fixedExecuteWithSessionKey: typeof executeWithSessionKey = async (\n ...originalArgs\n ) => {\n let initialError: unknown;\n try {\n return await executeWithSessionKey(...originalArgs);\n } catch (error) {\n initialError = error;\n }\n const details = getRpcErrorMessageFromViemError(initialError);\n if (!details?.includes(\"AA23 reverted (or OOG)\")) {\n throw initialError;\n }\n if (!isSmartAccountClient(client) || !client.chain) {\n throw initialError;\n }\n const {\n args,\n overrides,\n context,\n account = client.account,\n } = originalArgs[0];\n if (!account) {\n throw initialError;\n }\n const data = og.encodeExecuteWithSessionKey({ args });\n const sessionKeyPluginAddress =\n SessionKeyPlugin.meta.addresses[client.chain.id];\n // The bytecode is 10kb of hex. Only import it if needed.\n const { DEBUG_SESSION_KEY_BYTECODE } = await import(\n \"./debug-session-key-bytecode.js\"\n );\n const updatedOverrides: UserOperationOverrides<TEntryPointVersion> = {\n ...(overrides as UserOperationOverrides<TEntryPointVersion>),\n stateOverride: [\n ...(overrides?.stateOverride ?? []),\n {\n address: sessionKeyPluginAddress,\n code: DEBUG_SESSION_KEY_BYTECODE,\n },\n ],\n };\n try {\n await client.buildUserOperation({\n uo: data,\n overrides: updatedOverrides,\n context,\n account,\n });\n // We expect this to fail because we just saw the same user op fail a\n // moment ago. It could succeed if the state of the chain has changed but\n // there's not much we can do with a successful result so return the\n // original error.\n throw initialError;\n } catch (improvedError) {\n const details = getRpcErrorMessageFromViemError(improvedError) ?? \"\";\n const reason = details.match(/AA23 reverted: (.+)/)?.[1];\n if (!reason) {\n throw initialError;\n }\n throw new SessionKeyPermissionError(reason);\n }\n };\n\n return {\n ...og,\n\n executeWithSessionKey: fixedExecuteWithSessionKey,\n\n isAccountSessionKey: async ({\n key,\n pluginAddress,\n account = client.account,\n }) => {\n if (!account) throw new AccountNotFoundError();\n\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n\n return await contract.read.isSessionKeyOf([account.address, key]);\n },\n\n getAccountSessionKeys: async (\n args: GetPluginAddressParameter & GetAccountParameter<TAccount>,\n ) => {\n const account = args?.account ?? client.account;\n if (!account) throw new AccountNotFoundError();\n\n const contract = SessionKeyPlugin.getContract(\n client,\n args?.pluginAddress,\n );\n\n return await contract.read.sessionKeysOf([account.address]);\n },\n\n removeSessionKey: async ({\n key,\n overrides,\n account = client.account,\n pluginAddress,\n }) => {\n if (!account) throw new AccountNotFoundError();\n\n const sessionKeysToRemove = await buildSessionKeysToRemoveStruct(client, {\n keys: [key],\n account,\n pluginAddress,\n });\n\n return removeSessionKey({\n args: [key, sessionKeysToRemove[0].predecessor],\n overrides: overrides as UserOperationOverrides<TEntryPointVersion>,\n account,\n });\n },\n\n addSessionKey: async ({\n key,\n tag,\n permissions,\n overrides,\n pluginAddress,\n account = client.account,\n }) => {\n if (!account) throw new AccountNotFoundError();\n\n return addSessionKey({\n args: [key, tag, permissions],\n overrides: overrides as UserOperationOverrides<TEntryPointVersion>,\n account,\n pluginAddress,\n });\n },\n\n rotateSessionKey: async ({\n newKey,\n oldKey,\n overrides,\n pluginAddress,\n account = client.account,\n }) => {\n if (!account) throw new AccountNotFoundError();\n\n const contract = SessionKeyPlugin.getContract(client, pluginAddress);\n\n const predecessor = await contract.read.findPredecessor([\n account.address,\n oldKey,\n ]);\n\n return rotateSessionKey({\n args: [oldKey, predecessor, newKey],\n overrides: overrides as UserOperationOverrides<TEntryPointVersion>,\n account,\n pluginAddress,\n });\n },\n\n updateSessionKeyPermissions: async ({\n key,\n permissions,\n overrides,\n pluginAddress,\n account = client.account,\n }) => {\n if (!account) throw new AccountNotFoundError();\n\n return updateKeyPermissions({\n args: [key, permissions],\n overrides: overrides as UserOperationOverrides<\n GetEntryPointFromAccount<TAccount>\n >,\n account,\n pluginAddress,\n });\n },\n };\n};\n\nfunction getRpcErrorMessageFromViemError(error: unknown): string | undefined {\n const details = (error as any)?.details;\n return typeof details === \"string\" ? details : undefined;\n}\n\nclass SessionKeyPermissionError extends Error {}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/session-key/permissions.ts"],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AAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;IAC9B,CAAC;IAEO,eAAe,CAAI,MAAyB,EAAE,KAAS;QAC7D,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC;QAExB,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;CACF","sourcesContent":["import { encodeFunctionData, type Address, type Hex } from \"viem\";\nimport { SessionKeyPermissionsUpdatesAbi } from \"./SessionKeyPermissionsUpdatesAbi.js\";\n\nexport enum SessionKeyAccessListType {\n ALLOWLIST = 0,\n DENYLIST = 1,\n ALLOW_ALL_ACCESS = 2,\n}\n\nexport type ContractAccessEntry = {\n // The contract address to add or remove.\n contractAddress: Address;\n // Whether the contract address should be on the list.\n isOnList: boolean;\n // Whether to check selectors for the contract address.\n checkSelectors: boolean;\n};\n\nexport type ContractMethodEntry = {\n // The contract address to add or remove.\n contractAddress: Address;\n // The function selector to add or remove.\n methodSelector: Hex;\n // Whether the function selector should be on the list.\n isOnList: boolean;\n};\n\nexport type TimeRange = {\n validFrom: number;\n validUntil: number;\n};\n\nexport type NativeTokenLimit = {\n spendLimit: bigint;\n // The time interval over which the spend limit is enforced. If unset, there is no time\n /// interval by which the limit is refreshed.\n refreshInterval?: number;\n};\n\nexport type Erc20TokenLimit = {\n tokenAddress: Address;\n spendLimit: bigint;\n // The time interval over which the spend limit is enforced. If unset, there is no time\n /// interval by which the limit is refreshed.\n refreshInterval?: number;\n};\n\n// uint256 spendLimit, uint48 refreshInterval\nexport type GasSpendLimit = {\n // The amount, in wei, of native tokens that a session key can spend on gas.\n // Note that this is not the same as the gas limit for a user operation, which is measured in units of gas.\n // This tracks gas units * gas price.\n spendLimit: bigint;\n // The time interval over which the spend limit is enforced. If unset, there is no time\n /// interval by which the limit is refreshed.\n refreshInterval?: number;\n};\n\n/**\n * A builder for creating the hex-encoded data for updating session key permissions.\n */\nexport class SessionKeyPermissionsBuilder {\n private _contractAccessControlType: SessionKeyAccessListType =\n SessionKeyAccessListType.ALLOWLIST;\n private _contractAddressAccessEntrys: ContractAccessEntry[] = [];\n private _contractMethodAccessEntrys: ContractMethodEntry[] = [];\n private _timeRange?: TimeRange;\n private _nativeTokenSpendLimit?: NativeTokenLimit;\n private _erc20TokenSpendLimits: Erc20TokenLimit[] = [];\n private _gasSpendLimit?: GasSpendLimit;\n private _requiredPaymaster?: Address;\n\n /**\n * Sets the access control type for the contract and returns the current instance for method chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setContractAccessControlType(SessionKeyAccessListType.ALLOWLIST);\n * ```\n *\n * @param {SessionKeyAccessListType} aclType The access control type for the session key\n * @returns {SessionKeyPermissionsBuilder} The current instance for method chaining\n */\n public setContractAccessControlType(aclType: SessionKeyAccessListType) {\n this._contractAccessControlType = aclType;\n return this;\n }\n\n /**\n * Adds a contract access entry to the internal list of contract address access entries.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addContractAddressAccessEntry({\n * contractAddress: \"0x1234\",\n * isOnList: true,\n * checkSelectors: true,\n * });\n * ```\n *\n * @param {ContractAccessEntry} entry the contract access entry to be added\n * @returns {SessionKeyPermissionsBuilder} the instance of the current class for chaining\n */\n public addContractAddressAccessEntry(entry: ContractAccessEntry) {\n this._contractAddressAccessEntrys.push(entry);\n return this;\n }\n\n /**\n * Adds a contract method entry to the `_contractMethodAccessEntrys` array.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addContractAddressAccessEntry({\n * contractAddress: \"0x1234\",\n * methodSelector: \"0x45678\",\n * isOnList: true,\n * });\n * ```\n *\n * @param {ContractMethodEntry} entry The contract method entry to be added\n * @returns {SessionKeyPermissionsBuilder} The instance of the class for method chaining\n */\n public addContractFunctionAccessEntry(entry: ContractMethodEntry) {\n this._contractMethodAccessEntrys.push(entry);\n return this;\n }\n\n /**\n * Sets the time range for an object and returns the object itself for chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setTimeRange({\n * validFrom: Date.now(),\n * validUntil: Date.now() + (15 * 60 * 1000),\n * });\n * ```\n *\n * @param {TimeRange} timeRange The time range to be set\n * @returns {SessionKeyPermissionsBuilder} The current object for method chaining\n */\n public setTimeRange(timeRange: TimeRange) {\n this._timeRange = timeRange;\n return this;\n }\n\n /**\n * Sets the native token spend limit and returns the instance for chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setNativeTokenSpendLimit({\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {NativeTokenLimit} limit The limit to set for native token spending\n * @returns {SessionKeyPermissionsBuilder} The instance for chaining\n */\n public setNativeTokenSpendLimit(limit: NativeTokenLimit) {\n this._nativeTokenSpendLimit = limit;\n return this;\n }\n\n /**\n * Adds an ERC20 token spend limit to the list of limits and returns the updated object.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addErc20TokenSpendLimit({\n * tokenAddress: \"0x1234\",\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {Erc20TokenLimit} limit The ERC20 token spend limit to be added\n * @returns {object} The updated object with the new ERC20 token spend limit\n */\n public addErc20TokenSpendLimit(limit: Erc20TokenLimit) {\n this._erc20TokenSpendLimits.push(limit);\n return this;\n }\n\n /**\n * Sets the gas spend limit and returns the current instance for method chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setGasSpendLimit({\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {GasSpendLimit} limit - The gas spend limit to be set\n * @returns {SessionKeyPermissionsBuilder} The current instance for chaining\n */ public setGasSpendLimit(limit: GasSpendLimit) {\n this._gasSpendLimit = limit;\n return this;\n }\n\n /**\n * Sets the required paymaster address.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setRequiredPaymaster(\"0x1234\");\n * ```\n *\n * @param {Address} paymaster the address of the paymaster to be set\n * @returns {SessionKeyPermissionsBuilder} the current instance for method chaining\n */\n public setRequiredPaymaster(paymaster: Address) {\n this._requiredPaymaster = paymaster;\n return this;\n }\n\n /**\n * Encodes various function calls into an array of hexadecimal strings based on the provided permissions and limits.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setRequiredPaymaster(\"0x1234\");\n * const encoded = builder.encode();\n * ```\n *\n * @returns {Hex[]} An array of encoded hexadecimal strings representing the function calls for setting access control, permissions, and limits.\n */\n public encode(): Hex[] {\n return [\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setAccessListType\",\n args: [this._contractAccessControlType],\n }),\n ...this._contractAddressAccessEntrys.map((entry) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateAccessListAddressEntry\",\n args: [entry.contractAddress, entry.isOnList, entry.checkSelectors],\n })\n ),\n ...this._contractMethodAccessEntrys.map((entry) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateAccessListFunctionEntry\",\n args: [entry.contractAddress, entry.methodSelector, entry.isOnList],\n })\n ),\n this.encodeIfDefined(\n (timeRange) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateTimeRange\",\n args: [timeRange.validFrom, timeRange.validUntil],\n }),\n this._timeRange\n ),\n this.encodeIfDefined(\n (nativeSpendLimit) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setNativeTokenSpendLimit\",\n args: [\n nativeSpendLimit.spendLimit,\n nativeSpendLimit.refreshInterval ?? 0,\n ],\n }),\n this._nativeTokenSpendLimit\n ),\n ...this._erc20TokenSpendLimits.map((erc20SpendLimit) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setERC20SpendLimit\",\n args: [\n erc20SpendLimit.tokenAddress,\n erc20SpendLimit.spendLimit,\n erc20SpendLimit.refreshInterval ?? 0,\n ],\n })\n ),\n this.encodeIfDefined(\n (spendLimit) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setGasSpendLimit\",\n args: [spendLimit.spendLimit, spendLimit.refreshInterval ?? 0],\n }),\n this._gasSpendLimit\n ),\n this.encodeIfDefined(\n (paymaster) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setRequiredPaymaster\",\n args: [paymaster],\n }),\n this._requiredPaymaster\n ),\n ].filter((x) => x !== \"0x\");\n }\n\n private encodeIfDefined<T>(encode: (param: T) => Hex, param?: T): Hex {\n if (!param) return \"0x\";\n\n return encode(param);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/session-key/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA0B,MAAM,MAAM,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AAEvF,MAAM,CAAN,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IAClC,iFAAa,CAAA;IACb,+EAAY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IACvB,CAAC;CACF","sourcesContent":["import { encodeFunctionData, type Address, type Hex } from \"viem\";\nimport { SessionKeyPermissionsUpdatesAbi } from \"./SessionKeyPermissionsUpdatesAbi.js\";\n\nexport enum SessionKeyAccessListType {\n ALLOWLIST = 0,\n DENYLIST = 1,\n ALLOW_ALL_ACCESS = 2,\n}\n\nexport type ContractAccessEntry = {\n // The contract address to add or remove.\n contractAddress: Address;\n // Whether the contract address should be on the list.\n isOnList: boolean;\n // Whether to check selectors for the contract address.\n checkSelectors: boolean;\n};\n\nexport type ContractMethodEntry = {\n // The contract address to add or remove.\n contractAddress: Address;\n // The function selector to add or remove.\n methodSelector: Hex;\n // Whether the function selector should be on the list.\n isOnList: boolean;\n};\n\nexport type TimeRange = {\n validFrom: number;\n validUntil: number;\n};\n\nexport type NativeTokenLimit = {\n spendLimit: bigint;\n // The time interval over which the spend limit is enforced. If unset, there is no time\n /// interval by which the limit is refreshed.\n refreshInterval?: number;\n};\n\nexport type Erc20TokenLimit = {\n tokenAddress: Address;\n spendLimit: bigint;\n // The time interval over which the spend limit is enforced. If unset, there is no time\n /// interval by which the limit is refreshed.\n refreshInterval?: number;\n};\n\n// uint256 spendLimit, uint48 refreshInterval\nexport type GasSpendLimit = {\n // The amount, in wei, of native tokens that a session key can spend on gas.\n // Note that this is not the same as the gas limit for a user operation, which is measured in units of gas.\n // This tracks gas units * gas price.\n spendLimit: bigint;\n // The time interval over which the spend limit is enforced. If unset, there is no time\n /// interval by which the limit is refreshed.\n refreshInterval?: number;\n};\n\n/**\n * A builder for creating the hex-encoded data for updating session key permissions.\n */\nexport class SessionKeyPermissionsBuilder {\n private _contractAccessControlType: SessionKeyAccessListType =\n SessionKeyAccessListType.ALLOWLIST;\n private _contractAddressAccessEntrys: ContractAccessEntry[] = [];\n private _contractMethodAccessEntrys: ContractMethodEntry[] = [];\n private _timeRange?: TimeRange;\n private _nativeTokenSpendLimit?: NativeTokenLimit;\n private _erc20TokenSpendLimits: Erc20TokenLimit[] = [];\n private _gasSpendLimit?: GasSpendLimit;\n private _requiredPaymaster?: Address;\n\n /**\n * Sets the access control type for the contract and returns the current instance for method chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setContractAccessControlType(SessionKeyAccessListType.ALLOWLIST);\n * ```\n *\n * @param {SessionKeyAccessListType} aclType The access control type for the session key\n * @returns {SessionKeyPermissionsBuilder} The current instance for method chaining\n */\n public setContractAccessControlType(aclType: SessionKeyAccessListType) {\n this._contractAccessControlType = aclType;\n return this;\n }\n\n /**\n * Adds a contract access entry to the internal list of contract address access entries.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addContractAddressAccessEntry({\n * contractAddress: \"0x1234\",\n * isOnList: true,\n * checkSelectors: true,\n * });\n * ```\n *\n * @param {ContractAccessEntry} entry the contract access entry to be added\n * @returns {SessionKeyPermissionsBuilder} the instance of the current class for chaining\n */\n public addContractAddressAccessEntry(entry: ContractAccessEntry) {\n this._contractAddressAccessEntrys.push(entry);\n return this;\n }\n\n /**\n * Adds a contract method entry to the `_contractMethodAccessEntrys` array.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addContractAddressAccessEntry({\n * contractAddress: \"0x1234\",\n * methodSelector: \"0x45678\",\n * isOnList: true,\n * });\n * ```\n *\n * @param {ContractMethodEntry} entry The contract method entry to be added\n * @returns {SessionKeyPermissionsBuilder} The instance of the class for method chaining\n */\n public addContractFunctionAccessEntry(entry: ContractMethodEntry) {\n this._contractMethodAccessEntrys.push(entry);\n return this;\n }\n\n /**\n * Sets the time range for an object and returns the object itself for chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setTimeRange({\n * validFrom: Date.now(),\n * validUntil: Date.now() + (15 * 60 * 1000),\n * });\n * ```\n *\n * @param {TimeRange} timeRange The time range to be set\n * @returns {SessionKeyPermissionsBuilder} The current object for method chaining\n */\n public setTimeRange(timeRange: TimeRange) {\n this._timeRange = timeRange;\n return this;\n }\n\n /**\n * Sets the native token spend limit and returns the instance for chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setNativeTokenSpendLimit({\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {NativeTokenLimit} limit The limit to set for native token spending\n * @returns {SessionKeyPermissionsBuilder} The instance for chaining\n */\n public setNativeTokenSpendLimit(limit: NativeTokenLimit) {\n this._nativeTokenSpendLimit = limit;\n return this;\n }\n\n /**\n * Adds an ERC20 token spend limit to the list of limits and returns the updated object.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.addErc20TokenSpendLimit({\n * tokenAddress: \"0x1234\",\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {Erc20TokenLimit} limit The ERC20 token spend limit to be added\n * @returns {object} The updated object with the new ERC20 token spend limit\n */\n public addErc20TokenSpendLimit(limit: Erc20TokenLimit) {\n this._erc20TokenSpendLimits.push(limit);\n return this;\n }\n\n /**\n * Sets the gas spend limit and returns the current instance for method chaining.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setGasSpendLimit({\n * spendLimit: 1000000000000000000n,\n * refreshInterval: 3600,\n * });\n * ```\n *\n * @param {GasSpendLimit} limit - The gas spend limit to be set\n * @returns {SessionKeyPermissionsBuilder} The current instance for chaining\n */ public setGasSpendLimit(limit: GasSpendLimit) {\n this._gasSpendLimit = limit;\n return this;\n }\n\n /**\n * Sets the required paymaster address.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setRequiredPaymaster(\"0x1234\");\n * ```\n *\n * @param {Address} paymaster the address of the paymaster to be set\n * @returns {SessionKeyPermissionsBuilder} the current instance for method chaining\n */\n public setRequiredPaymaster(paymaster: Address) {\n this._requiredPaymaster = paymaster;\n return this;\n }\n\n /**\n * Encodes various function calls into an array of hexadecimal strings based on the provided permissions and limits.\n *\n * @example\n * ```ts\n * import { SessionKeyPermissionsBuilder } from \"@account-kit/smart-contracts\";\n *\n * const builder = new SessionKeyPermissionsBuilder();\n * builder.setRequiredPaymaster(\"0x1234\");\n * const encoded = builder.encode();\n * ```\n *\n * @returns {Hex[]} An array of encoded hexadecimal strings representing the function calls for setting access control, permissions, and limits.\n */\n public encode(): Hex[] {\n return [\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setAccessListType\",\n args: [this._contractAccessControlType],\n }),\n ...this._contractAddressAccessEntrys.map((entry) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateAccessListAddressEntry\",\n args: [entry.contractAddress, entry.isOnList, entry.checkSelectors],\n }),\n ),\n ...this._contractMethodAccessEntrys.map((entry) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateAccessListFunctionEntry\",\n args: [entry.contractAddress, entry.methodSelector, entry.isOnList],\n }),\n ),\n this.encodeIfDefined(\n (timeRange) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"updateTimeRange\",\n args: [timeRange.validFrom, timeRange.validUntil],\n }),\n this._timeRange,\n ),\n this.encodeIfDefined(\n (nativeSpendLimit) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setNativeTokenSpendLimit\",\n args: [\n nativeSpendLimit.spendLimit,\n nativeSpendLimit.refreshInterval ?? 0,\n ],\n }),\n this._nativeTokenSpendLimit,\n ),\n ...this._erc20TokenSpendLimits.map((erc20SpendLimit) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setERC20SpendLimit\",\n args: [\n erc20SpendLimit.tokenAddress,\n erc20SpendLimit.spendLimit,\n erc20SpendLimit.refreshInterval ?? 0,\n ],\n }),\n ),\n this.encodeIfDefined(\n (spendLimit) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setGasSpendLimit\",\n args: [spendLimit.spendLimit, spendLimit.refreshInterval ?? 0],\n }),\n this._gasSpendLimit,\n ),\n this.encodeIfDefined(\n (paymaster) =>\n encodeFunctionData({\n abi: SessionKeyPermissionsUpdatesAbi,\n functionName: \"setRequiredPaymaster\",\n args: [paymaster],\n }),\n this._requiredPaymaster,\n ),\n ].filter((x) => x !== \"0x\");\n }\n\n private encodeIfDefined<T>(encode: (param: T) => Hex, param?: T): Hex {\n if (!param) return \"0x\";\n\n return encode(param);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/session-key/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,GASnB,MAAM,MAAM,CAAC;AACd,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,GAQxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,aAAa,IAAI,cAAc,GAGhC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAyK5D,MAAM,SAAS,GAAG;IAChB,CAAC,EAAE,4CAAuD;IAC1D,EAA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AI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;SACjE;KACF;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,mBAAmB;QACzB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;KACvE;IACD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE;YAC5D,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE;SAC7D;KACF;IACD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,EAAE,EAAE;IACrD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,oBAAoB;QAC1B,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;KAC3E;CACO,CAAC","sourcesContent":["import {\n getContract,\n encodePacked,\n encodeAbiParameters,\n encodeFunctionData,\n type Address,\n type GetContractReturnType,\n type Transport,\n type PublicClient,\n type Client,\n type EncodeFunctionDataParameters,\n type Chain,\n type Hex,\n} from \"viem\";\nimport {\n ChainNotFoundError,\n AccountNotFoundError,\n isSmartAccountClient,\n IncompatibleClientError,\n type SmartContractAccount,\n type GetAccountParameter,\n type SendUserOperationResult,\n type GetEntryPointFromAccount,\n type UserOperationOverridesParameter,\n type UserOperationContext,\n type GetContextParameter,\n} from \"@aa-sdk/core\";\nimport {\n installPlugin as installPlugin_,\n type Plugin,\n type FunctionReference,\n} from \"@account-kit/smart-contracts\";\nimport { MultiOwnerPlugin } from \"../multi-owner/plugin.js\";\n\ntype ExecutionActions<\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 executeWithSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"executeWithSessionKey\"\n >,\n \"args\"\n > &\n UserOperationOverridesParameter<TEntryPointVersion> &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n addSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"addSessionKey\"\n >,\n \"args\"\n > &\n UserOperationOverridesParameter<TEntryPointVersion> &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n removeSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"removeSessionKey\"\n >,\n \"args\"\n > &\n UserOperationOverridesParameter<TEntryPointVersion> &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n rotateSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"rotateSessionKey\"\n >,\n \"args\"\n > &\n UserOperationOverridesParameter<TEntryPointVersion> &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n updateKeyPermissions: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"updateKeyPermissions\"\n >,\n \"args\"\n > &\n UserOperationOverridesParameter<TEntryPointVersion> &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n};\n\ntype InstallArgs = [\n { type: \"address[]\"; name: \"initialKeys\" },\n { type: \"bytes32[]\"; name: \"tags\" },\n { type: \"bytes[][]\"; name: \"initialPermissions\" }\n];\n\nexport type InstallSessionKeyPluginParams = {\n args: Parameters<typeof encodeAbiParameters<InstallArgs>>[1];\n pluginAddress?: Address;\n dependencyOverrides?: FunctionReference[];\n};\n\ntype ManagementActions<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | Record<string, any>\n | undefined,\n TEntryPointVersion extends GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>\n> = {\n installSessionKeyPlugin: (\n args: UserOperationOverridesParameter<TEntryPointVersion> &\n InstallSessionKeyPluginParams &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n};\n\ntype ReadAndEncodeActions = {\n encodeExecuteWithSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"executeWithSessionKey\"\n >,\n \"args\"\n >\n ) => Hex;\n\n encodeAddSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"addSessionKey\"\n >,\n \"args\"\n >\n ) => Hex;\n\n encodeRemoveSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"removeSessionKey\"\n >,\n \"args\"\n >\n ) => Hex;\n\n encodeRotateSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"rotateSessionKey\"\n >,\n \"args\"\n >\n ) => Hex;\n\n encodeUpdateKeyPermissions: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"updateKeyPermissions\"\n >,\n \"args\"\n >\n ) => Hex;\n};\n\nexport type SessionKeyPluginActions<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n> = ExecutionActions<TAccount, TContext> &\n ManagementActions<TAccount, TContext> &\n ReadAndEncodeActions;\n\nconst addresses = {\n 1: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 10: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 137: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 252: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 2523: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 8453: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 42161: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 80001: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 80002: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 84532: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 421614: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 7777777: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 11155111: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 11155420: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 999999999: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n} as Record<number, Address>;\n\nexport const SessionKeyPlugin: Plugin<typeof SessionKeyPluginAbi> = {\n meta: {\n name: \"Session Key Plugin\",\n version: \"1.0.1\",\n addresses,\n },\n getContract: <C extends Client>(\n client: C,\n address?: Address\n ): GetContractReturnType<\n typeof SessionKeyPluginAbi,\n PublicClient,\n Address\n > => {\n if (!client.chain) throw new ChainNotFoundError();\n\n return getContract({\n address: address || addresses[client.chain.id],\n abi: SessionKeyPluginAbi,\n client: client,\n }) as GetContractReturnType<\n typeof SessionKeyPluginAbi,\n PublicClient,\n Address\n >;\n },\n};\n\nexport const sessionKeyPluginActions: <\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) => SessionKeyPluginActions<TAccount, TContext> = (client) => ({\n executeWithSessionKey({\n args,\n overrides,\n context,\n account = client.account,\n }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"executeWithSessionKey\",\n client\n );\n }\n\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"executeWithSessionKey\",\n args,\n });\n\n return client.sendUserOperation({ uo, overrides, account, context });\n },\n addSessionKey({ args, overrides, context, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"addSessionKey\",\n client\n );\n }\n\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"addSessionKey\",\n args,\n });\n\n return client.sendUserOperation({ uo, overrides, account, context });\n },\n removeSessionKey({ args, overrides, context, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"removeSessionKey\",\n client\n );\n }\n\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"removeSessionKey\",\n args,\n });\n\n return client.sendUserOperation({ uo, overrides, account, context });\n },\n rotateSessionKey({ args, overrides, context, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"rotateSessionKey\",\n client\n );\n }\n\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"rotateSessionKey\",\n args,\n });\n\n return client.sendUserOperation({ uo, overrides, account, context });\n },\n updateKeyPermissions({ args, overrides, context, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"updateKeyPermissions\",\n client\n );\n }\n\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"updateKeyPermissions\",\n args,\n });\n\n return client.sendUserOperation({ uo, overrides, account, context });\n },\n installSessionKeyPlugin({\n account = client.account,\n overrides,\n context,\n ...params\n }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"installSessionKeyPlugin\",\n client\n );\n }\n\n const chain = client.chain;\n if (!chain) {\n throw new ChainNotFoundError();\n }\n\n const dependencies = params.dependencyOverrides ?? [\n (() => {\n const pluginAddress = MultiOwnerPlugin.meta.addresses[chain.id];\n if (!pluginAddress) {\n throw new Error(\n \"missing MultiOwnerPlugin address for chain \" + chain.name\n );\n }\n\n return encodePacked([\"address\", \"uint8\"], [pluginAddress, 0x0]);\n })(),\n\n (() => {\n const pluginAddress = MultiOwnerPlugin.meta.addresses[chain.id];\n if (!pluginAddress) {\n throw new Error(\n \"missing MultiOwnerPlugin address for chain \" + chain.name\n );\n }\n\n return encodePacked([\"address\", \"uint8\"], [pluginAddress, 0x1]);\n })(),\n ];\n const pluginAddress =\n params.pluginAddress ??\n (SessionKeyPlugin.meta.addresses[chain.id] as Address | undefined);\n\n if (!pluginAddress) {\n throw new Error(\n \"missing SessionKeyPlugin address for chain \" + chain.name\n );\n }\n\n return installPlugin_(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters(\n [\n { type: \"address[]\", name: \"initialKeys\" },\n { type: \"bytes32[]\", name: \"tags\" },\n { type: \"bytes[][]\", name: \"initialPermissions\" },\n ],\n params.args\n ),\n dependencies,\n overrides,\n account,\n context,\n });\n },\n encodeExecuteWithSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"executeWithSessionKey\",\n args,\n });\n },\n encodeAddSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"addSessionKey\",\n args,\n });\n },\n encodeRemoveSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"removeSessionKey\",\n args,\n });\n },\n encodeRotateSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"rotateSessionKey\",\n args,\n });\n },\n encodeUpdateKeyPermissions({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"updateKeyPermissions\",\n args,\n });\n },\n});\n\nexport const SessionKeyPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"executeWithSessionKey\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"addSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"tag\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"permissionUpdates\", type: \"bytes[]\", internalType: \"bytes[]\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"removeSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"rotateSessionKey\",\n inputs: [\n { name: \"oldSessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"newSessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"updateKeyPermissions\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"updates\", type: \"bytes[]\", internalType: \"bytes[]\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n] as const;\n\nexport const SessionKeyPluginAbi = [\n {\n type: \"function\",\n name: \"addSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"tag\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"permissionUpdates\", type: \"bytes[]\", internalType: \"bytes[]\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"executeWithSessionKey\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"findPredecessor\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getAccessControlEntry\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"contractAddress\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" },\n { name: \"checkSelectors\", type: \"bool\", internalType: \"bool\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getAccessControlType\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint8\",\n internalType: \"enum ISessionKeyPlugin.ContractAccessControlType\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getERC20SpendLimitInfo\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getGasSpendLimit\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [\n {\n name: \"info\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" },\n ],\n },\n { name: \"shouldReset\", type: \"bool\", internalType: \"bool\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getKeyTimeRange\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [\n { name: \"validAfter\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"validUntil\", type: \"uint48\", internalType: \"uint48\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getNativeTokenSpendLimitInfo\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [\n {\n name: \"info\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getRequiredPaymaster\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isSelectorOnAccessControlList\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"contractAddress\", type: \"address\", internalType: \"address\" },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n ],\n outputs: [{ name: \"isOnList\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isSessionKeyOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\",\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\",\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\",\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\",\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n ],\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\",\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\",\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\",\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\",\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\",\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\",\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\",\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\",\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\",\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\",\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\",\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n stateMutability: \"pure\",\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\",\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\",\n },\n ],\n },\n ],\n },\n ],\n stateMutability: \"pure\",\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" },\n ],\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"removeSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"resetSessionKeyGasLimitTimestamp\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"rotateSessionKey\",\n inputs: [\n { name: \"oldSessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"newSessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"sessionKeysOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"updateKeyPermissions\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"updates\", type: \"bytes[]\", internalType: \"bytes[]\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" },\n ],\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"event\",\n name: \"PermissionsUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"updates\",\n type: \"bytes[]\",\n indexed: false,\n internalType: \"bytes[]\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"SessionKeyAdded\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n { name: \"tag\", type: \"bytes32\", indexed: true, internalType: \"bytes32\" },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"SessionKeyRemoved\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"SessionKeyRotated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"oldSessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"newSessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n ],\n anonymous: false,\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"ERC20SpendLimitExceeded\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n ],\n },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidPermissionsUpdate\",\n inputs: [\n { name: \"updateSelector\", type: \"bytes4\", internalType: \"bytes4\" },\n ],\n },\n {\n type: \"error\",\n name: \"InvalidSessionKey\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"InvalidSignature\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"InvalidToken\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }],\n },\n { type: \"error\", name: \"LengthMismatch\", inputs: [] },\n {\n type: \"error\",\n name: \"NativeTokenSpendLimitExceeded\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n ],\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"SessionKeyNotFound\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }],\n },\n] as const;\n"]}
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/session-key/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,GASnB,MAAM,MAAM,CAAC;AACd,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,GAQxB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,aAAa,IAAI,cAAc,GAGhC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AA2K5D,MAAM,SAAS,GAAG;IAChB,CAAC,EAAE,4CAAuD;IAC1D,EAAE,EAAE,4CAAuD;IAC3D,GAAG,EAAE,4CAAuD;IAC5D,GAAG,EAAE,4CAAuD;IAC5D,IAAI,EAAE,4CAAuD;IAC7D,IAAI,EAAE,4CAAuD;IAC7D,KAAK,EAAE,4CAAuD;IAC9D,KAAK,EAAE,4CAAuD;IAC9D,KAAK,EAAE,4CAAuD;IAC9D,KAAK,EAAE,4CAAuD;IAC9D,MAAM,EAAE,4CAAuD;IAC/D,OAAO,EAAE,4CAAuD;IAChE,QAAQ,EAAE,4CAAuD;IACjE,QAAQ,EAAE,4CAAuD;IACjE,SAAS,EAAE,4CAAuD;CACxC,CAA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5D,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE;SAC7D;KACF;IACD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,EAAE,EAAE;IACrD;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,oBAAoB;QAC1B,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;KAC3E;CACO,CAAC","sourcesContent":["import {\n getContract,\n encodePacked,\n encodeAbiParameters,\n encodeFunctionData,\n type Address,\n type GetContractReturnType,\n type Transport,\n type PublicClient,\n type Client,\n type EncodeFunctionDataParameters,\n type Chain,\n type Hex,\n} from \"viem\";\nimport {\n ChainNotFoundError,\n AccountNotFoundError,\n isSmartAccountClient,\n IncompatibleClientError,\n type SmartContractAccount,\n type GetAccountParameter,\n type SendUserOperationResult,\n type GetEntryPointFromAccount,\n type UserOperationOverridesParameter,\n type UserOperationContext,\n type GetContextParameter,\n} from \"@aa-sdk/core\";\nimport {\n installPlugin as installPlugin_,\n type Plugin,\n type FunctionReference,\n} from \"@account-kit/smart-contracts\";\nimport { MultiOwnerPlugin } from \"../multi-owner/plugin.js\";\n\ntype ExecutionActions<\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 executeWithSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"executeWithSessionKey\"\n >,\n \"args\"\n > &\n UserOperationOverridesParameter<TEntryPointVersion> &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n addSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"addSessionKey\"\n >,\n \"args\"\n > &\n UserOperationOverridesParameter<TEntryPointVersion> &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n removeSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"removeSessionKey\"\n >,\n \"args\"\n > &\n UserOperationOverridesParameter<TEntryPointVersion> &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n rotateSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"rotateSessionKey\"\n >,\n \"args\"\n > &\n UserOperationOverridesParameter<TEntryPointVersion> &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n\n updateKeyPermissions: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"updateKeyPermissions\"\n >,\n \"args\"\n > &\n UserOperationOverridesParameter<TEntryPointVersion> &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n};\n\ntype InstallArgs = [\n { type: \"address[]\"; name: \"initialKeys\" },\n { type: \"bytes32[]\"; name: \"tags\" },\n { type: \"bytes[][]\"; name: \"initialPermissions\" },\n];\n\nexport type InstallSessionKeyPluginParams = {\n args: Parameters<typeof encodeAbiParameters<InstallArgs>>[1];\n pluginAddress?: Address;\n dependencyOverrides?: FunctionReference[];\n};\n\ntype ManagementActions<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | Record<string, any>\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n> = {\n installSessionKeyPlugin: (\n args: UserOperationOverridesParameter<TEntryPointVersion> &\n InstallSessionKeyPluginParams &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n};\n\ntype ReadAndEncodeActions = {\n encodeExecuteWithSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"executeWithSessionKey\"\n >,\n \"args\"\n >,\n ) => Hex;\n\n encodeAddSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"addSessionKey\"\n >,\n \"args\"\n >,\n ) => Hex;\n\n encodeRemoveSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"removeSessionKey\"\n >,\n \"args\"\n >,\n ) => Hex;\n\n encodeRotateSessionKey: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"rotateSessionKey\"\n >,\n \"args\"\n >,\n ) => Hex;\n\n encodeUpdateKeyPermissions: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof SessionKeyPluginExecutionFunctionAbi,\n \"updateKeyPermissions\"\n >,\n \"args\"\n >,\n ) => Hex;\n};\n\nexport type SessionKeyPluginActions<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined,\n> = ExecutionActions<TAccount, TContext> &\n ManagementActions<TAccount, TContext> &\n ReadAndEncodeActions;\n\nconst addresses = {\n 1: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 10: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 137: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 252: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 2523: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 8453: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 42161: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 80001: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 80002: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 84532: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 421614: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 7777777: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 11155111: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 11155420: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n 999999999: \"0x0000003E0000a96de4058e1E02a62FaaeCf23d8d\" as Address,\n} as Record<number, Address>;\n\nexport const SessionKeyPlugin: Plugin<typeof SessionKeyPluginAbi> = {\n meta: {\n name: \"Session Key Plugin\",\n version: \"1.0.1\",\n addresses,\n },\n getContract: <C extends Client>(\n client: C,\n address?: Address,\n ): GetContractReturnType<\n typeof SessionKeyPluginAbi,\n PublicClient,\n Address\n > => {\n if (!client.chain) throw new ChainNotFoundError();\n\n return getContract({\n address: address || addresses[client.chain.id],\n abi: SessionKeyPluginAbi,\n client: client,\n }) as GetContractReturnType<\n typeof SessionKeyPluginAbi,\n PublicClient,\n Address\n >;\n },\n};\n\nexport const sessionKeyPluginActions: <\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) => SessionKeyPluginActions<TAccount, TContext> = (client) => ({\n executeWithSessionKey({\n args,\n overrides,\n context,\n account = client.account,\n }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"executeWithSessionKey\",\n client,\n );\n }\n\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"executeWithSessionKey\",\n args,\n });\n\n return client.sendUserOperation({ uo, overrides, account, context });\n },\n addSessionKey({ args, overrides, context, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"addSessionKey\",\n client,\n );\n }\n\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"addSessionKey\",\n args,\n });\n\n return client.sendUserOperation({ uo, overrides, account, context });\n },\n removeSessionKey({ args, overrides, context, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"removeSessionKey\",\n client,\n );\n }\n\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"removeSessionKey\",\n args,\n });\n\n return client.sendUserOperation({ uo, overrides, account, context });\n },\n rotateSessionKey({ args, overrides, context, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"rotateSessionKey\",\n client,\n );\n }\n\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"rotateSessionKey\",\n args,\n });\n\n return client.sendUserOperation({ uo, overrides, account, context });\n },\n updateKeyPermissions({ args, overrides, context, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"updateKeyPermissions\",\n client,\n );\n }\n\n const uo = encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"updateKeyPermissions\",\n args,\n });\n\n return client.sendUserOperation({ uo, overrides, account, context });\n },\n installSessionKeyPlugin({\n account = client.account,\n overrides,\n context,\n ...params\n }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"installSessionKeyPlugin\",\n client,\n );\n }\n\n const chain = client.chain;\n if (!chain) {\n throw new ChainNotFoundError();\n }\n\n const dependencies = params.dependencyOverrides ?? [\n (() => {\n const pluginAddress = MultiOwnerPlugin.meta.addresses[chain.id];\n if (!pluginAddress) {\n throw new Error(\n \"missing MultiOwnerPlugin address for chain \" + chain.name,\n );\n }\n\n return encodePacked([\"address\", \"uint8\"], [pluginAddress, 0x0]);\n })(),\n\n (() => {\n const pluginAddress = MultiOwnerPlugin.meta.addresses[chain.id];\n if (!pluginAddress) {\n throw new Error(\n \"missing MultiOwnerPlugin address for chain \" + chain.name,\n );\n }\n\n return encodePacked([\"address\", \"uint8\"], [pluginAddress, 0x1]);\n })(),\n ];\n const pluginAddress =\n params.pluginAddress ??\n (SessionKeyPlugin.meta.addresses[chain.id] as Address | undefined);\n\n if (!pluginAddress) {\n throw new Error(\n \"missing SessionKeyPlugin address for chain \" + chain.name,\n );\n }\n\n return installPlugin_(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters(\n [\n { type: \"address[]\", name: \"initialKeys\" },\n { type: \"bytes32[]\", name: \"tags\" },\n { type: \"bytes[][]\", name: \"initialPermissions\" },\n ],\n params.args,\n ),\n dependencies,\n overrides,\n account,\n context,\n });\n },\n encodeExecuteWithSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"executeWithSessionKey\",\n args,\n });\n },\n encodeAddSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"addSessionKey\",\n args,\n });\n },\n encodeRemoveSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"removeSessionKey\",\n args,\n });\n },\n encodeRotateSessionKey({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"rotateSessionKey\",\n args,\n });\n },\n encodeUpdateKeyPermissions({ args }) {\n return encodeFunctionData({\n abi: SessionKeyPluginExecutionFunctionAbi,\n functionName: \"updateKeyPermissions\",\n args,\n });\n },\n});\n\nexport const SessionKeyPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"executeWithSessionKey\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"addSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"tag\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"permissionUpdates\", type: \"bytes[]\", internalType: \"bytes[]\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"removeSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"rotateSessionKey\",\n inputs: [\n { name: \"oldSessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"newSessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"updateKeyPermissions\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"updates\", type: \"bytes[]\", internalType: \"bytes[]\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n] as const;\n\nexport const SessionKeyPluginAbi = [\n {\n type: \"function\",\n name: \"addSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"tag\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"permissionUpdates\", type: \"bytes[]\", internalType: \"bytes[]\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"executeWithSessionKey\",\n inputs: [\n {\n name: \"calls\",\n type: \"tuple[]\",\n internalType: \"struct Call[]\",\n components: [\n { name: \"target\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bytes[]\", internalType: \"bytes[]\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"findPredecessor\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getAccessControlEntry\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"contractAddress\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [\n { name: \"isOnList\", type: \"bool\", internalType: \"bool\" },\n { name: \"checkSelectors\", type: \"bool\", internalType: \"bool\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getAccessControlType\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint8\",\n internalType: \"enum ISessionKeyPlugin.ContractAccessControlType\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getERC20SpendLimitInfo\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getGasSpendLimit\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [\n {\n name: \"info\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" },\n ],\n },\n { name: \"shouldReset\", type: \"bool\", internalType: \"bool\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getKeyTimeRange\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [\n { name: \"validAfter\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"validUntil\", type: \"uint48\", internalType: \"uint48\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getNativeTokenSpendLimitInfo\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [\n {\n name: \"info\",\n type: \"tuple\",\n internalType: \"struct ISessionKeyPlugin.SpendLimitInfo\",\n components: [\n { name: \"hasLimit\", type: \"bool\", internalType: \"bool\" },\n { name: \"limit\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"limitUsed\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"refreshInterval\", type: \"uint48\", internalType: \"uint48\" },\n { name: \"lastUsedTime\", type: \"uint48\", internalType: \"uint48\" },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getRequiredPaymaster\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isSelectorOnAccessControlList\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"contractAddress\", type: \"address\", internalType: \"address\" },\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n ],\n outputs: [{ name: \"isOnList\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isSessionKeyOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"onInstall\",\n inputs: [{ name: \"data\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"onUninstall\",\n inputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"pluginManifest\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginManifest\",\n components: [\n { name: \"interfaceIds\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n {\n name: \"dependencyInterfaceIds\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\",\n },\n {\n name: \"executionFunctions\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\",\n },\n {\n name: \"permittedExecutionSelectors\",\n type: \"bytes4[]\",\n internalType: \"bytes4[]\",\n },\n {\n name: \"permitAnyExternalAddress\",\n type: \"bool\",\n internalType: \"bool\",\n },\n { name: \"canSpendNativeToken\", type: \"bool\", internalType: \"bool\" },\n {\n name: \"permittedExternalCalls\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExternalCallPermission[]\",\n components: [\n {\n name: \"externalAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n { name: \"permitAnySelector\", type: \"bool\", internalType: \"bool\" },\n { name: \"selectors\", type: \"bytes4[]\", internalType: \"bytes4[]\" },\n ],\n },\n {\n name: \"userOpValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\",\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\",\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n name: \"runtimeValidationFunctions\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\",\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\",\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n name: \"preUserOpValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\",\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\",\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n name: \"preRuntimeValidationHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestAssociatedFunction[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\",\n },\n {\n name: \"associatedFunction\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\",\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n {\n name: \"executionHooks\",\n type: \"tuple[]\",\n internalType: \"struct ManifestExecutionHook[]\",\n components: [\n {\n name: \"executionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\",\n },\n {\n name: \"preExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\",\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n {\n name: \"postExecHook\",\n type: \"tuple\",\n internalType: \"struct ManifestFunction\",\n components: [\n {\n name: \"functionType\",\n type: \"uint8\",\n internalType: \"enum ManifestAssociatedFunctionType\",\n },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"dependencyIndex\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n stateMutability: \"pure\",\n },\n {\n type: \"function\",\n name: \"pluginMetadata\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct PluginMetadata\",\n components: [\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"author\", type: \"string\", internalType: \"string\" },\n {\n name: \"permissionDescriptors\",\n type: \"tuple[]\",\n internalType: \"struct SelectorPermission[]\",\n components: [\n {\n name: \"functionSelector\",\n type: \"bytes4\",\n internalType: \"bytes4\",\n },\n {\n name: \"permissionDescription\",\n type: \"string\",\n internalType: \"string\",\n },\n ],\n },\n ],\n },\n ],\n stateMutability: \"pure\",\n },\n {\n type: \"function\",\n name: \"postExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"preExecHookData\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"preExecutionHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"preRuntimeValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"preUserOpValidationHook\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" },\n ],\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"removeSessionKey\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"resetSessionKeyGasLimitTimestamp\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"rotateSessionKey\",\n inputs: [\n { name: \"oldSessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"predecessor\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"newSessionKey\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"runtimeValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"value\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"data\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"sessionKeysOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"address[]\", internalType: \"address[]\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"supportsInterface\",\n inputs: [{ name: \"interfaceId\", type: \"bytes4\", internalType: \"bytes4\" }],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"updateKeyPermissions\",\n inputs: [\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"updates\", type: \"bytes[]\", internalType: \"bytes[]\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"userOpValidationFunction\",\n inputs: [\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n {\n name: \"userOp\",\n type: \"tuple\",\n internalType: \"struct UserOperation\",\n components: [\n { name: \"sender\", type: \"address\", internalType: \"address\" },\n { name: \"nonce\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"initCode\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"callGasLimit\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"verificationGasLimit\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"preVerificationGas\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n { name: \"maxFeePerGas\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"maxPriorityFeePerGas\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n { name: \"paymasterAndData\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" },\n ],\n },\n { name: \"userOpHash\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"event\",\n name: \"PermissionsUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"updates\",\n type: \"bytes[]\",\n indexed: false,\n internalType: \"bytes[]\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"SessionKeyAdded\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n { name: \"tag\", type: \"bytes32\", indexed: true, internalType: \"bytes32\" },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"SessionKeyRemoved\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"sessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n ],\n anonymous: false,\n },\n {\n type: \"event\",\n name: \"SessionKeyRotated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"oldSessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"newSessionKey\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n ],\n anonymous: false,\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"ERC20SpendLimitExceeded\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n { name: \"token\", type: \"address\", internalType: \"address\" },\n ],\n },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidPermissionsUpdate\",\n inputs: [\n { name: \"updateSelector\", type: \"bytes4\", internalType: \"bytes4\" },\n ],\n },\n {\n type: \"error\",\n name: \"InvalidSessionKey\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"InvalidSignature\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"InvalidToken\",\n inputs: [{ name: \"token\", type: \"address\", internalType: \"address\" }],\n },\n { type: \"error\", name: \"LengthMismatch\", inputs: [] },\n {\n type: \"error\",\n name: \"NativeTokenSpendLimitExceeded\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"sessionKey\", type: \"address\", internalType: \"address\" },\n ],\n },\n {\n type: \"error\",\n name: \"NotContractCaller\",\n inputs: [{ name: \"caller\", type: \"address\", internalType: \"address\" }],\n },\n {\n type: \"error\",\n name: \"NotImplemented\",\n inputs: [\n { name: \"selector\", type: \"bytes4\", internalType: \"bytes4\" },\n { name: \"functionId\", type: \"uint8\", internalType: \"uint8\" },\n ],\n },\n { type: \"error\", name: \"NotInitialized\", inputs: [] },\n {\n type: \"error\",\n name: \"SessionKeyNotFound\",\n inputs: [{ name: \"sessionKey\", type: \"address\", internalType: \"address\" }],\n },\n] as const;\n"]}
|