@account-kit/smart-contracts 4.34.1 → 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":"middleware.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/multisig/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,mCAAmC,EACnC,WAAW,EACX,wBAAwB,EACxB,cAAc,EACd,iBAAiB,GAIlB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAY,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAqC,MAAM,YAAY,CAAC;AAC/D,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,wBAAwB,GACzB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAEpC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;IACjD,qGAAqG;IACrG,IACE,CAAC,OAAO;QACR,CAAC,OAAO,CAAC,mBAAmB,KAAK,QAAQ;YACvC,CAAC,OAAO,CAAC,UAAU;YACnB,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAC/B,CAAC;QACD,MAAM,IAAI,4BAA4B,EAAE,CAAC;IAC3C,CAAC;IAED,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,mCAAmC,EAAE,CAAC;IAClD,CAAC;IAED,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,4BAA4B,EAAE,CAAC;IAC3C,CAAC;IAED,MAAM,cAAc,GAAG,MAAM,iBAAiB,CAAC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SmartAccountWithSigner,\n isValidRequest,\n resolveProperties,\n type ClientMiddlewareFn,\n type UserOperationRequest_v6,\n type UserOperationRequest_v7,\n} from \"@aa-sdk/core\";\nimport { type Hex } from \"viem\";\nimport { isMultisigModularAccount } from \"../../account/multisigAccount.js\";\nimport {\n InvalidContextSignatureError,\n MultisigAccountExpectedError,\n} from \"../../errors.js\";\nimport { type MultisigUserOperationContext } from \"./types.js\";\nimport {\n combineSignatures,\n getSignerType,\n splitAggregatedSignature,\n} from \"./utils/index.js\";\n\n/**\n * A signer middleware to be used with Multisig Account Clients.\n * This middleware handles correctly aggregating signatures passed through\n * as context when sending UserOperations, proposing UserOperations, or adding signatures to a UserOperation.\n *\n * @param {Deferrable<UserOperationStruct<TEntryPointVersion>>} struct the user operation struct to be signed\n * @param {ClientMiddlewareArgs<TAccount, C, TContext, TEntryPointVersion>} args the parameters to be passed to the middleware\n * @param {UserOperationOverrides<TEntryPointVersion>} args.account the account to be used for signing\n * @param {MiddlewareClient} args.client the smart account client that will be used for RPC requests\n * @param {MultisigUserOperationContext} args.context the context object containing the signatures to be aggregated MultisigUserOperationContext\n * @returns {Promise<Deferrable<UserOperationStruct<TEntryPointVersion>>>} a Promise containing a UserOperation with an aggregated signature in the `signature` field\n */\nexport const multisigSignatureMiddleware: ClientMiddlewareFn<\n MultisigUserOperationContext\n> = async (struct, { account, client, context }) => {\n // if the signature is not present, this has to be UPPERLIMIT because it's likely a propose operation\n if (\n !context ||\n (context.userOpSignatureType === \"ACTUAL\" &&\n !context.signatures &&\n !context.aggregatedSignature)\n ) {\n throw new InvalidContextSignatureError();\n }\n\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n\n if (!isMultisigModularAccount(account)) {\n throw new MultisigAccountExpectedError();\n }\n\n const resolvedStruct = await resolveProperties(struct);\n\n const request = deepHexlify(resolvedStruct);\n if (!isValidRequest(request)) {\n throw new InvalidUserOperationError(resolvedStruct);\n }\n\n const signature = await account.signUserOperationHash(\n account.getEntryPoint().getUserOperationHash(request)
|
|
1
|
+
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/multisig/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,mCAAmC,EACnC,WAAW,EACX,wBAAwB,EACxB,cAAc,EACd,iBAAiB,GAIlB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAY,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAqC,MAAM,YAAY,CAAC;AAC/D,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,wBAAwB,GACzB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAEpC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;IACjD,qGAAqG;IACrG,IACE,CAAC,OAAO;QACR,CAAC,OAAO,CAAC,mBAAmB,KAAK,QAAQ;YACvC,CAAC,OAAO,CAAC,UAAU;YACnB,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAC/B,CAAC;QACD,MAAM,IAAI,4BAA4B,EAAE,CAAC;IAC3C,CAAC;IAED,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,mCAAmC,EAAE,CAAC;IAClD,CAAC;IAED,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,4BAA4B,EAAE,CAAC;IAC3C,CAAC;IAED,MAAM,cAAc,GAAG,MAAM,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAEvD,MAAM,OAAO,GAAG,WAAW,CAAC,cAAc,CAAC,CAAC;IAC5C,IAAI,CAAC,cAAc,CAAC,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AC,UAAU,CAAC,MAAM,GAAG,CAAC;QACxC,OAAO;QACP,OAAO;KACR,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,iBAAiB,CAAC;QACvC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;YACpC,aAAa,EAAE,OAAO,CAAC,mBAAmB;YAC1C,UAAU;YACV,SAAS;YACT,MAAM,EAAE,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE;SAC/C,CAAC;QACF,aAAa;QACb,sBAAsB;QACtB,8BAA8B;QAC9B,cAAc,EAAE,gBAAgB,CAAC,OAAO,EAAE;YACxC,aAAa;YACb,sBAAsB;YACtB,8BAA8B;SAC/B,CAAC;KACH,CAAC,CAAC;IAEH,OAAO;QACL,GAAG,cAAc;QACjB,SAAS,EAAE,cAAc;KAC1B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CACvB,OAA0D,EAC1D,WAIC,EACQ,EAAE;IACX,IACE,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,EACxE,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IACE,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,MAAM,CAAC,WAAW,CAAC,sBAAsB,CAAC,EAC3E,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IACE,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC;QACpC,MAAM,CAAC,WAAW,CAAC,8BAA8B,CAAC,EAClD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["import {\n InvalidUserOperationError,\n SmartAccountWithSignerRequiredError,\n deepHexlify,\n isSmartAccountWithSigner,\n isValidRequest,\n resolveProperties,\n type ClientMiddlewareFn,\n type UserOperationRequest_v6,\n type UserOperationRequest_v7,\n} from \"@aa-sdk/core\";\nimport { type Hex } from \"viem\";\nimport { isMultisigModularAccount } from \"../../account/multisigAccount.js\";\nimport {\n InvalidContextSignatureError,\n MultisigAccountExpectedError,\n} from \"../../errors.js\";\nimport { type MultisigUserOperationContext } from \"./types.js\";\nimport {\n combineSignatures,\n getSignerType,\n splitAggregatedSignature,\n} from \"./utils/index.js\";\n\n/**\n * A signer middleware to be used with Multisig Account Clients.\n * This middleware handles correctly aggregating signatures passed through\n * as context when sending UserOperations, proposing UserOperations, or adding signatures to a UserOperation.\n *\n * @param {Deferrable<UserOperationStruct<TEntryPointVersion>>} struct the user operation struct to be signed\n * @param {ClientMiddlewareArgs<TAccount, C, TContext, TEntryPointVersion>} args the parameters to be passed to the middleware\n * @param {UserOperationOverrides<TEntryPointVersion>} args.account the account to be used for signing\n * @param {MiddlewareClient} args.client the smart account client that will be used for RPC requests\n * @param {MultisigUserOperationContext} args.context the context object containing the signatures to be aggregated MultisigUserOperationContext\n * @returns {Promise<Deferrable<UserOperationStruct<TEntryPointVersion>>>} a Promise containing a UserOperation with an aggregated signature in the `signature` field\n */\nexport const multisigSignatureMiddleware: ClientMiddlewareFn<\n MultisigUserOperationContext\n> = async (struct, { account, client, context }) => {\n // if the signature is not present, this has to be UPPERLIMIT because it's likely a propose operation\n if (\n !context ||\n (context.userOpSignatureType === \"ACTUAL\" &&\n !context.signatures &&\n !context.aggregatedSignature)\n ) {\n throw new InvalidContextSignatureError();\n }\n\n if (!isSmartAccountWithSigner(account)) {\n throw new SmartAccountWithSignerRequiredError();\n }\n\n if (!isMultisigModularAccount(account)) {\n throw new MultisigAccountExpectedError();\n }\n\n const resolvedStruct = await resolveProperties(struct);\n\n const request = deepHexlify(resolvedStruct);\n if (!isValidRequest(request)) {\n throw new InvalidUserOperationError(resolvedStruct);\n }\n\n const signature = await account.signUserOperationHash(\n account.getEntryPoint().getUserOperationHash(request),\n );\n\n const signerType = await getSignerType({\n client,\n signature: signature,\n signer: account.getSigner(),\n });\n\n // then this is a propose operation\n if (\n context.userOpSignatureType === \"UPPERLIMIT\" &&\n context?.signatures?.length == null &&\n context?.aggregatedSignature == null\n ) {\n return {\n ...resolvedStruct,\n signature: combineSignatures({\n signatures: [\n {\n signature,\n signer: await account.getSigner().getAddress(),\n signerType,\n userOpSigType: context.userOpSignatureType,\n },\n ],\n upperLimitMaxFeePerGas: request.maxFeePerGas,\n upperLimitMaxPriorityFeePerGas: request.maxPriorityFeePerGas,\n upperLimitPvg: request.preVerificationGas,\n usingMaxValues: false,\n }),\n };\n }\n\n if (context.aggregatedSignature == null || context.signatures == null) {\n throw new InvalidContextSignatureError();\n }\n\n // otherwise this is a sign operation\n const {\n upperLimitPvg,\n upperLimitMaxFeePerGas,\n upperLimitMaxPriorityFeePerGas,\n } = await splitAggregatedSignature({\n aggregatedSignature: context.aggregatedSignature,\n threshold: context.signatures.length + 1,\n account,\n request,\n });\n\n const finalSignature = combineSignatures({\n signatures: context.signatures.concat({\n userOpSigType: context.userOpSignatureType,\n signerType,\n signature,\n signer: await account.getSigner().getAddress(),\n }),\n upperLimitPvg,\n upperLimitMaxFeePerGas,\n upperLimitMaxPriorityFeePerGas,\n usingMaxValues: isUsingMaxValues(request, {\n upperLimitPvg,\n upperLimitMaxFeePerGas,\n upperLimitMaxPriorityFeePerGas,\n }),\n });\n\n return {\n ...resolvedStruct,\n signature: finalSignature,\n };\n};\n\nconst isUsingMaxValues = (\n request: UserOperationRequest_v6 | UserOperationRequest_v7,\n upperLimits: {\n upperLimitPvg: Hex;\n upperLimitMaxFeePerGas: Hex;\n upperLimitMaxPriorityFeePerGas: Hex;\n },\n): boolean => {\n if (\n BigInt(request.preVerificationGas) !== BigInt(upperLimits.upperLimitPvg)\n ) {\n return false;\n }\n\n if (\n BigInt(request.maxFeePerGas) !== BigInt(upperLimits.upperLimitMaxFeePerGas)\n ) {\n return false;\n }\n\n if (\n BigInt(request.maxPriorityFeePerGas) !==\n BigInt(upperLimits.upperLimitMaxPriorityFeePerGas)\n ) {\n return false;\n }\n\n return true;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/multisig/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,kBAAkB,GAUnB,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;AA0HtC,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,MAAM,EAAE,4CAAuD;IAC/D,OAAO,EAAE,4CAAuD;IAChE,QAAQ,EAAE,4CAAuD;IACjE,QAAQ,EAAE,4CAAuD;IACjE,SAAS,EAAE,4CAAuD;CACxC,CAAC;AAE7B,MAAM,CAAC,MAAM,cAAc,GAAqC;IAC9D,IAAI,EAAE;QACJ,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,OAAO;QAChB,SAAS;KACV;IACD,WAAW,EAAE,CACX,MAAS,EACT,OAAiB,EACuD,EAAE;QAC1E,IAAI,CAAC,MAAM,CAAC,KAAK;YAAE,MAAM,IAAI,kBAAkB,EAAE,CAAC;QAElD,OAAO,WAAW,CAAC;YACjB,OAAO,EAAE,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9C,GAAG,EAAE,iBAAiB;YACtB,MAAM,EAAE,MAAM;SACf,CAIA,CAAC;IACJ,CAAC;CACF,CAAC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AChE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,EAAE,EAAE;IACvD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,EAAE,EAAE;IACvD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,EAAE,EAAE;IACvD;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,mBAAmB;QACzB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;KACtE;CACO,CAAC","sourcesContent":["import {\n getContract,\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 type ReadContractReturnType,\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\";\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 updateOwnership: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof MultisigPluginExecutionFunctionAbi,\n \"updateOwnership\"\n >,\n \"args\"\n > &\n UserOperationOverridesParameter<TEntryPointVersion> &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n};\n\ntype InstallArgs = [{ type: \"address[]\" }, { type: \"uint256\" }];\n\nexport type InstallMultisigPluginParams = {\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 installMultisigPlugin: (\n args: UserOperationOverridesParameter<TEntryPointVersion> &\n InstallMultisigPluginParams &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n};\n\ntype ReadAndEncodeActions<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined\n> = {\n encodeUpdateOwnership: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof MultisigPluginExecutionFunctionAbi,\n \"updateOwnership\"\n >,\n \"args\"\n >\n ) => Hex;\n\n encodeEip712Domain: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof MultisigPluginExecutionFunctionAbi,\n \"eip712Domain\"\n >,\n \"args\"\n >\n ) => Hex;\n\n readEip712Domain: (\n args: GetAccountParameter<TAccount>\n ) => Promise<\n ReadContractReturnType<\n typeof MultisigPluginExecutionFunctionAbi,\n \"eip712Domain\"\n >\n >;\n\n encodeIsValidSignature: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof MultisigPluginExecutionFunctionAbi,\n \"isValidSignature\"\n >,\n \"args\"\n >\n ) => Hex;\n\n readIsValidSignature: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof MultisigPluginExecutionFunctionAbi,\n \"isValidSignature\"\n >,\n \"args\"\n > &\n GetAccountParameter<TAccount>\n ) => Promise<\n ReadContractReturnType<\n typeof MultisigPluginExecutionFunctionAbi,\n \"isValidSignature\"\n >\n >;\n};\n\nexport type MultisigPluginActions<\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<TAccount>;\n\nconst addresses = {\n 1: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 10: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 137: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 252: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 2523: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 8453: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 42161: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 80002: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 84532: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 421614: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 7777777: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 11155111: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 11155420: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 999999999: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n} as Record<number, Address>;\n\nexport const MultisigPlugin: Plugin<typeof MultisigPluginAbi> = {\n meta: {\n name: \"Multisig Plugin\",\n version: \"1.0.0\",\n addresses,\n },\n getContract: <C extends Client>(\n client: C,\n address?: Address\n ): GetContractReturnType<typeof MultisigPluginAbi, PublicClient, Address> => {\n if (!client.chain) throw new ChainNotFoundError();\n\n return getContract({\n address: address || addresses[client.chain.id],\n abi: MultisigPluginAbi,\n client: client,\n }) as GetContractReturnType<\n typeof MultisigPluginAbi,\n PublicClient,\n Address\n >;\n },\n};\n\nexport const multisigPluginActions: <\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) => MultisigPluginActions<TAccount, TContext> = (client) => ({\n updateOwnership({ 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 \"updateOwnership\",\n client\n );\n }\n\n const uo = encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"updateOwnership\",\n args,\n });\n\n return client.sendUserOperation({ uo, overrides, account, context });\n },\n installMultisigPlugin({\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 \"installMultisigPlugin\",\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 const pluginAddress =\n params.pluginAddress ??\n (MultisigPlugin.meta.addresses[chain.id] as Address | undefined);\n\n if (!pluginAddress) {\n throw new Error(\"missing MultisigPlugin address for chain \" + chain.name);\n }\n\n return installPlugin_(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters(\n [{ type: \"address[]\" }, { type: \"uint256\" }],\n params.args\n ),\n dependencies,\n overrides,\n account,\n context,\n });\n },\n encodeUpdateOwnership({ args }) {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"updateOwnership\",\n args,\n });\n },\n encodeEip712Domain() {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\",\n });\n },\n\n async readEip712Domain({ account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"readEip712Domain\",\n client\n );\n }\n\n return client.readContract({\n address: account.address,\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\",\n });\n },\n encodeIsValidSignature({ args }) {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args,\n });\n },\n\n async readIsValidSignature({ args, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"readIsValidSignature\",\n client\n );\n }\n\n return client.readContract({\n address: account.address,\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args,\n });\n },\n});\n\nexport const MultisigPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"updateOwnership\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"newThreshold\", type: \"uint128\", internalType: \"uint128\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\",\n },\n] as const;\n\nexport const MultisigPluginAbi = [\n {\n type: \"constructor\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"checkNSignatures\",\n inputs: [\n { name: \"actualDigest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"upperLimitGasDigest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"signatures\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [\n { name: \"success\", type: \"bool\", internalType: \"bool\" },\n { name: \"firstFailure\", type: \"uint256\", internalType: \"uint256\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"encodeMessageData\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getMessageHash\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isOwnerOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"ownerToCheck\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\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: \"ownershipInfoOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [\n { name: \"\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n ],\n stateMutability: \"view\",\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: \"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: \"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: \"updateOwnership\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"newThreshold\", type: \"uint128\", internalType: \"uint128\" },\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: \"view\",\n },\n {\n type: \"event\",\n name: \"OwnerUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\",\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\",\n },\n {\n name: \"threshold\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n ],\n anonymous: false,\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"ECDSARecoverFailure\", inputs: [] },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n { type: \"error\", name: \"InvalidAddress\", inputs: [] },\n { type: \"error\", name: \"InvalidMaxFeePerGas\", inputs: [] },\n { type: \"error\", name: \"InvalidMaxPriorityFeePerGas\", inputs: [] },\n { type: \"error\", name: \"InvalidNumSigsOnActualGas\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }],\n },\n { type: \"error\", name: \"InvalidPreVerificationGas\", inputs: [] },\n { type: \"error\", name: \"InvalidSigLength\", inputs: [] },\n { type: \"error\", name: \"InvalidSigOffset\", inputs: [] },\n { type: \"error\", name: \"InvalidThreshold\", inputs: [] },\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: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }],\n },\n] as const;\n"]}
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/multisig/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,k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D,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,EAAE,EAAE;IACvD;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,mBAAmB;QACzB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;KACtE;CACO,CAAC","sourcesContent":["import {\n getContract,\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 type ReadContractReturnType,\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\";\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 updateOwnership: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof MultisigPluginExecutionFunctionAbi,\n \"updateOwnership\"\n >,\n \"args\"\n > &\n UserOperationOverridesParameter<TEntryPointVersion> &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n};\n\ntype InstallArgs = [{ type: \"address[]\" }, { type: \"uint256\" }];\n\nexport type InstallMultisigPluginParams = {\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 installMultisigPlugin: (\n args: UserOperationOverridesParameter<TEntryPointVersion> &\n InstallMultisigPluginParams &\n GetAccountParameter<TAccount> &\n GetContextParameter<TContext>,\n ) => Promise<SendUserOperationResult<TEntryPointVersion>>;\n};\n\ntype ReadAndEncodeActions<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n> = {\n encodeUpdateOwnership: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof MultisigPluginExecutionFunctionAbi,\n \"updateOwnership\"\n >,\n \"args\"\n >,\n ) => Hex;\n\n encodeEip712Domain: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof MultisigPluginExecutionFunctionAbi,\n \"eip712Domain\"\n >,\n \"args\"\n >,\n ) => Hex;\n\n readEip712Domain: (\n args: GetAccountParameter<TAccount>,\n ) => Promise<\n ReadContractReturnType<\n typeof MultisigPluginExecutionFunctionAbi,\n \"eip712Domain\"\n >\n >;\n\n encodeIsValidSignature: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof MultisigPluginExecutionFunctionAbi,\n \"isValidSignature\"\n >,\n \"args\"\n >,\n ) => Hex;\n\n readIsValidSignature: (\n args: Pick<\n EncodeFunctionDataParameters<\n typeof MultisigPluginExecutionFunctionAbi,\n \"isValidSignature\"\n >,\n \"args\"\n > &\n GetAccountParameter<TAccount>,\n ) => Promise<\n ReadContractReturnType<\n typeof MultisigPluginExecutionFunctionAbi,\n \"isValidSignature\"\n >\n >;\n};\n\nexport type MultisigPluginActions<\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<TAccount>;\n\nconst addresses = {\n 1: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 10: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 137: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 252: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 2523: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 8453: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 42161: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 80002: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 84532: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 421614: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 7777777: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 11155111: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 11155420: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n 999999999: \"0x000000000000A53f64b7bcf4Cd59624943C43Fc7\" as Address,\n} as Record<number, Address>;\n\nexport const MultisigPlugin: Plugin<typeof MultisigPluginAbi> = {\n meta: {\n name: \"Multisig Plugin\",\n version: \"1.0.0\",\n addresses,\n },\n getContract: <C extends Client>(\n client: C,\n address?: Address,\n ): GetContractReturnType<typeof MultisigPluginAbi, PublicClient, Address> => {\n if (!client.chain) throw new ChainNotFoundError();\n\n return getContract({\n address: address || addresses[client.chain.id],\n abi: MultisigPluginAbi,\n client: client,\n }) as GetContractReturnType<\n typeof MultisigPluginAbi,\n PublicClient,\n Address\n >;\n },\n};\n\nexport const multisigPluginActions: <\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) => MultisigPluginActions<TAccount, TContext> = (client) => ({\n updateOwnership({ 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 \"updateOwnership\",\n client,\n );\n }\n\n const uo = encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"updateOwnership\",\n args,\n });\n\n return client.sendUserOperation({ uo, overrides, account, context });\n },\n installMultisigPlugin({\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 \"installMultisigPlugin\",\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 const pluginAddress =\n params.pluginAddress ??\n (MultisigPlugin.meta.addresses[chain.id] as Address | undefined);\n\n if (!pluginAddress) {\n throw new Error(\"missing MultisigPlugin address for chain \" + chain.name);\n }\n\n return installPlugin_(client, {\n pluginAddress,\n pluginInitData: encodeAbiParameters(\n [{ type: \"address[]\" }, { type: \"uint256\" }],\n params.args,\n ),\n dependencies,\n overrides,\n account,\n context,\n });\n },\n encodeUpdateOwnership({ args }) {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"updateOwnership\",\n args,\n });\n },\n encodeEip712Domain() {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\",\n });\n },\n\n async readEip712Domain({ account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"readEip712Domain\",\n client,\n );\n }\n\n return client.readContract({\n address: account.address,\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"eip712Domain\",\n });\n },\n encodeIsValidSignature({ args }) {\n return encodeFunctionData({\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args,\n });\n },\n\n async readIsValidSignature({ args, account = client.account }) {\n if (!account) {\n throw new AccountNotFoundError();\n }\n\n if (!isSmartAccountClient(client)) {\n throw new IncompatibleClientError(\n \"SmartAccountClient\",\n \"readIsValidSignature\",\n client,\n );\n }\n\n return client.readContract({\n address: account.address,\n abi: MultisigPluginExecutionFunctionAbi,\n functionName: \"isValidSignature\",\n args,\n });\n },\n});\n\nexport const MultisigPluginExecutionFunctionAbi = [\n {\n type: \"function\",\n name: \"updateOwnership\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"newThreshold\", type: \"uint128\", internalType: \"uint128\" },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\n stateMutability: \"view\",\n },\n] as const;\n\nexport const MultisigPluginAbi = [\n {\n type: \"constructor\",\n inputs: [{ name: \"entryPoint\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"ENTRYPOINT\",\n inputs: [],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"checkNSignatures\",\n inputs: [\n { name: \"actualDigest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"upperLimitGasDigest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"signatures\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [\n { name: \"success\", type: \"bool\", internalType: \"bool\" },\n { name: \"firstFailure\", type: \"uint256\", internalType: \"uint256\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"eip712Domain\",\n inputs: [],\n outputs: [\n { name: \"fields\", type: \"bytes1\", internalType: \"bytes1\" },\n { name: \"name\", type: \"string\", internalType: \"string\" },\n { name: \"version\", type: \"string\", internalType: \"string\" },\n { name: \"chainId\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\", internalType: \"address\" },\n { name: \"salt\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"extensions\", type: \"uint256[]\", internalType: \"uint256[]\" },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"encodeMessageData\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getMessageHash\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"message\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isOwnerOf\",\n inputs: [\n { name: \"account\", type: \"address\", internalType: \"address\" },\n { name: \"ownerToCheck\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bool\", internalType: \"bool\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"isValidSignature\",\n inputs: [\n { name: \"digest\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"signature\", type: \"bytes\", internalType: \"bytes\" },\n ],\n outputs: [{ name: \"\", type: \"bytes4\", internalType: \"bytes4\" }],\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: \"ownershipInfoOf\",\n inputs: [{ name: \"account\", type: \"address\", internalType: \"address\" }],\n outputs: [\n { name: \"\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"\", type: \"uint256\", internalType: \"uint256\" },\n ],\n stateMutability: \"view\",\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: \"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: \"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: \"updateOwnership\",\n inputs: [\n { name: \"ownersToAdd\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"ownersToRemove\", type: \"address[]\", internalType: \"address[]\" },\n { name: \"newThreshold\", type: \"uint128\", internalType: \"uint128\" },\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: \"view\",\n },\n {\n type: \"event\",\n name: \"OwnerUpdated\",\n inputs: [\n {\n name: \"account\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"addedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\",\n },\n {\n name: \"removedOwners\",\n type: \"address[]\",\n indexed: false,\n internalType: \"address[]\",\n },\n {\n name: \"threshold\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n ],\n anonymous: false,\n },\n { type: \"error\", name: \"AlreadyInitialized\", inputs: [] },\n { type: \"error\", name: \"ECDSARecoverFailure\", inputs: [] },\n { type: \"error\", name: \"EmptyOwnersNotAllowed\", inputs: [] },\n { type: \"error\", name: \"InvalidAction\", inputs: [] },\n { type: \"error\", name: \"InvalidAddress\", inputs: [] },\n { type: \"error\", name: \"InvalidMaxFeePerGas\", inputs: [] },\n { type: \"error\", name: \"InvalidMaxPriorityFeePerGas\", inputs: [] },\n { type: \"error\", name: \"InvalidNumSigsOnActualGas\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidOwner\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }],\n },\n { type: \"error\", name: \"InvalidPreVerificationGas\", inputs: [] },\n { type: \"error\", name: \"InvalidSigLength\", inputs: [] },\n { type: \"error\", name: \"InvalidSigOffset\", inputs: [] },\n { type: \"error\", name: \"InvalidThreshold\", inputs: [] },\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: \"OwnerDoesNotExist\",\n inputs: [{ name: \"owner\", type: \"address\", internalType: \"address\" }],\n },\n] as const;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Address, BundlerClient, SmartAccountSigner } from "@aa-sdk/core";
|
|
2
|
-
import { type Hex, type SignableMessage, type Transport, type TypedDataDefinition } from "viem";
|
|
2
|
+
import { type Hex, type SignableMessage, type Transport, type TypedData, type TypedDataDefinition } from "viem";
|
|
3
3
|
type MultisigSignMethodsParams<TTransport extends Transport, TSigner extends SmartAccountSigner> = {
|
|
4
4
|
client: BundlerClient<TTransport>;
|
|
5
5
|
accountAddress: Address;
|
|
@@ -7,217 +7,12 @@ type MultisigSignMethodsParams<TTransport extends Transport, TSigner extends Sma
|
|
|
7
7
|
threshold: bigint;
|
|
8
8
|
pluginAddress?: Address;
|
|
9
9
|
};
|
|
10
|
-
export declare const multisigSignMethods: <TTransport extends Transport, TSigner extends SmartAccountSigner
|
|
10
|
+
export declare const multisigSignMethods: <TTransport extends Transport, TSigner extends SmartAccountSigner>({ client, accountAddress, signer, threshold, pluginAddress, }: MultisigSignMethodsParams<TTransport, TSigner>) => {
|
|
11
11
|
getDummySignature: () => Promise<`0x${string}`>;
|
|
12
12
|
signUserOperationHash: (uoHash: Hex) => Promise<Hex>;
|
|
13
13
|
signMessage({ message }: {
|
|
14
14
|
message: SignableMessage;
|
|
15
15
|
}): Promise<Hex>;
|
|
16
|
-
signTypedData: <const typedData extends Record<string, unknown
|
|
17
|
-
[x: string]: readonly import("viem").TypedDataParameter[];
|
|
18
|
-
[x: `string[${string}]`]: undefined;
|
|
19
|
-
[x: `function[${string}]`]: undefined;
|
|
20
|
-
[x: `address[${string}]`]: undefined;
|
|
21
|
-
[x: `uint64[${string}]`]: undefined;
|
|
22
|
-
[x: `bytes32[${string}]`]: undefined;
|
|
23
|
-
[x: `bytes[${string}]`]: undefined;
|
|
24
|
-
[x: `uint256[${string}]`]: undefined;
|
|
25
|
-
[x: `bytes4[${string}]`]: undefined;
|
|
26
|
-
[x: `bool[${string}]`]: undefined;
|
|
27
|
-
[x: `bytes1[${string}]`]: undefined;
|
|
28
|
-
[x: `uint32[${string}]`]: undefined;
|
|
29
|
-
[x: `bytes2[${string}]`]: undefined;
|
|
30
|
-
[x: `bytes3[${string}]`]: undefined;
|
|
31
|
-
[x: `bytes5[${string}]`]: undefined;
|
|
32
|
-
[x: `bytes6[${string}]`]: undefined;
|
|
33
|
-
[x: `bytes11[${string}]`]: undefined;
|
|
34
|
-
[x: `bytes7[${string}]`]: undefined;
|
|
35
|
-
[x: `bytes9[${string}]`]: undefined;
|
|
36
|
-
[x: `bytes27[${string}]`]: undefined;
|
|
37
|
-
[x: `bytes22[${string}]`]: undefined;
|
|
38
|
-
[x: `bytes8[${string}]`]: undefined;
|
|
39
|
-
[x: `bytes10[${string}]`]: undefined;
|
|
40
|
-
[x: `bytes12[${string}]`]: undefined;
|
|
41
|
-
[x: `bytes13[${string}]`]: undefined;
|
|
42
|
-
[x: `bytes14[${string}]`]: undefined;
|
|
43
|
-
[x: `bytes15[${string}]`]: undefined;
|
|
44
|
-
[x: `bytes16[${string}]`]: undefined;
|
|
45
|
-
[x: `bytes17[${string}]`]: undefined;
|
|
46
|
-
[x: `bytes18[${string}]`]: undefined;
|
|
47
|
-
[x: `bytes19[${string}]`]: undefined;
|
|
48
|
-
[x: `bytes20[${string}]`]: undefined;
|
|
49
|
-
[x: `bytes21[${string}]`]: undefined;
|
|
50
|
-
[x: `bytes23[${string}]`]: undefined;
|
|
51
|
-
[x: `bytes24[${string}]`]: undefined;
|
|
52
|
-
[x: `bytes25[${string}]`]: undefined;
|
|
53
|
-
[x: `bytes26[${string}]`]: undefined;
|
|
54
|
-
[x: `bytes28[${string}]`]: undefined;
|
|
55
|
-
[x: `bytes29[${string}]`]: undefined;
|
|
56
|
-
[x: `bytes30[${string}]`]: undefined;
|
|
57
|
-
[x: `bytes31[${string}]`]: undefined;
|
|
58
|
-
[x: `int[${string}]`]: undefined;
|
|
59
|
-
[x: `int8[${string}]`]: undefined;
|
|
60
|
-
[x: `int16[${string}]`]: undefined;
|
|
61
|
-
[x: `int24[${string}]`]: undefined;
|
|
62
|
-
[x: `int32[${string}]`]: undefined;
|
|
63
|
-
[x: `int40[${string}]`]: undefined;
|
|
64
|
-
[x: `int48[${string}]`]: undefined;
|
|
65
|
-
[x: `int56[${string}]`]: undefined;
|
|
66
|
-
[x: `int64[${string}]`]: undefined;
|
|
67
|
-
[x: `int72[${string}]`]: undefined;
|
|
68
|
-
[x: `int80[${string}]`]: undefined;
|
|
69
|
-
[x: `int88[${string}]`]: undefined;
|
|
70
|
-
[x: `int96[${string}]`]: undefined;
|
|
71
|
-
[x: `int104[${string}]`]: undefined;
|
|
72
|
-
[x: `int112[${string}]`]: undefined;
|
|
73
|
-
[x: `int120[${string}]`]: undefined;
|
|
74
|
-
[x: `int128[${string}]`]: undefined;
|
|
75
|
-
[x: `int136[${string}]`]: undefined;
|
|
76
|
-
[x: `int144[${string}]`]: undefined;
|
|
77
|
-
[x: `int152[${string}]`]: undefined;
|
|
78
|
-
[x: `int160[${string}]`]: undefined;
|
|
79
|
-
[x: `int168[${string}]`]: undefined;
|
|
80
|
-
[x: `int176[${string}]`]: undefined;
|
|
81
|
-
[x: `int184[${string}]`]: undefined;
|
|
82
|
-
[x: `int192[${string}]`]: undefined;
|
|
83
|
-
[x: `int200[${string}]`]: undefined;
|
|
84
|
-
[x: `int208[${string}]`]: undefined;
|
|
85
|
-
[x: `int216[${string}]`]: undefined;
|
|
86
|
-
[x: `int224[${string}]`]: undefined;
|
|
87
|
-
[x: `int232[${string}]`]: undefined;
|
|
88
|
-
[x: `int240[${string}]`]: undefined;
|
|
89
|
-
[x: `int248[${string}]`]: undefined;
|
|
90
|
-
[x: `int256[${string}]`]: undefined;
|
|
91
|
-
[x: `uint[${string}]`]: undefined;
|
|
92
|
-
[x: `uint8[${string}]`]: undefined;
|
|
93
|
-
[x: `uint16[${string}]`]: undefined;
|
|
94
|
-
[x: `uint24[${string}]`]: undefined;
|
|
95
|
-
[x: `uint40[${string}]`]: undefined;
|
|
96
|
-
[x: `uint48[${string}]`]: undefined;
|
|
97
|
-
[x: `uint56[${string}]`]: undefined;
|
|
98
|
-
[x: `uint72[${string}]`]: undefined;
|
|
99
|
-
[x: `uint80[${string}]`]: undefined;
|
|
100
|
-
[x: `uint88[${string}]`]: undefined;
|
|
101
|
-
[x: `uint96[${string}]`]: undefined;
|
|
102
|
-
[x: `uint104[${string}]`]: undefined;
|
|
103
|
-
[x: `uint112[${string}]`]: undefined;
|
|
104
|
-
[x: `uint120[${string}]`]: undefined;
|
|
105
|
-
[x: `uint128[${string}]`]: undefined;
|
|
106
|
-
[x: `uint136[${string}]`]: undefined;
|
|
107
|
-
[x: `uint144[${string}]`]: undefined;
|
|
108
|
-
[x: `uint152[${string}]`]: undefined;
|
|
109
|
-
[x: `uint160[${string}]`]: undefined;
|
|
110
|
-
[x: `uint168[${string}]`]: undefined;
|
|
111
|
-
[x: `uint176[${string}]`]: undefined;
|
|
112
|
-
[x: `uint184[${string}]`]: undefined;
|
|
113
|
-
[x: `uint192[${string}]`]: undefined;
|
|
114
|
-
[x: `uint200[${string}]`]: undefined;
|
|
115
|
-
[x: `uint208[${string}]`]: undefined;
|
|
116
|
-
[x: `uint216[${string}]`]: undefined;
|
|
117
|
-
[x: `uint224[${string}]`]: undefined;
|
|
118
|
-
[x: `uint232[${string}]`]: undefined;
|
|
119
|
-
[x: `uint240[${string}]`]: undefined;
|
|
120
|
-
[x: `uint248[${string}]`]: undefined;
|
|
121
|
-
string?: undefined;
|
|
122
|
-
address?: undefined;
|
|
123
|
-
uint64?: undefined;
|
|
124
|
-
bytes32?: undefined;
|
|
125
|
-
bytes?: undefined;
|
|
126
|
-
uint256?: undefined;
|
|
127
|
-
bytes4?: undefined;
|
|
128
|
-
bool?: undefined;
|
|
129
|
-
bytes1?: undefined;
|
|
130
|
-
uint32?: undefined;
|
|
131
|
-
bytes2?: undefined;
|
|
132
|
-
bytes3?: undefined;
|
|
133
|
-
bytes5?: undefined;
|
|
134
|
-
bytes6?: undefined;
|
|
135
|
-
bytes11?: undefined;
|
|
136
|
-
bytes7?: undefined;
|
|
137
|
-
bytes9?: undefined;
|
|
138
|
-
bytes27?: undefined;
|
|
139
|
-
bytes22?: undefined;
|
|
140
|
-
bytes8?: undefined;
|
|
141
|
-
bytes10?: undefined;
|
|
142
|
-
bytes12?: undefined;
|
|
143
|
-
bytes13?: undefined;
|
|
144
|
-
bytes14?: undefined;
|
|
145
|
-
bytes15?: undefined;
|
|
146
|
-
bytes16?: undefined;
|
|
147
|
-
bytes17?: undefined;
|
|
148
|
-
bytes18?: undefined;
|
|
149
|
-
bytes19?: undefined;
|
|
150
|
-
bytes20?: undefined;
|
|
151
|
-
bytes21?: undefined;
|
|
152
|
-
bytes23?: undefined;
|
|
153
|
-
bytes24?: undefined;
|
|
154
|
-
bytes25?: undefined;
|
|
155
|
-
bytes26?: undefined;
|
|
156
|
-
bytes28?: undefined;
|
|
157
|
-
bytes29?: undefined;
|
|
158
|
-
bytes30?: undefined;
|
|
159
|
-
bytes31?: undefined;
|
|
160
|
-
int8?: undefined;
|
|
161
|
-
int16?: undefined;
|
|
162
|
-
int24?: undefined;
|
|
163
|
-
int32?: undefined;
|
|
164
|
-
int40?: undefined;
|
|
165
|
-
int48?: undefined;
|
|
166
|
-
int56?: undefined;
|
|
167
|
-
int64?: undefined;
|
|
168
|
-
int72?: undefined;
|
|
169
|
-
int80?: undefined;
|
|
170
|
-
int88?: undefined;
|
|
171
|
-
int96?: undefined;
|
|
172
|
-
int104?: undefined;
|
|
173
|
-
int112?: undefined;
|
|
174
|
-
int120?: undefined;
|
|
175
|
-
int128?: undefined;
|
|
176
|
-
int136?: undefined;
|
|
177
|
-
int144?: undefined;
|
|
178
|
-
int152?: undefined;
|
|
179
|
-
int160?: undefined;
|
|
180
|
-
int168?: undefined;
|
|
181
|
-
int176?: undefined;
|
|
182
|
-
int184?: undefined;
|
|
183
|
-
int192?: undefined;
|
|
184
|
-
int200?: undefined;
|
|
185
|
-
int208?: undefined;
|
|
186
|
-
int216?: undefined;
|
|
187
|
-
int224?: undefined;
|
|
188
|
-
int232?: undefined;
|
|
189
|
-
int240?: undefined;
|
|
190
|
-
int248?: undefined;
|
|
191
|
-
int256?: undefined;
|
|
192
|
-
uint8?: undefined;
|
|
193
|
-
uint16?: undefined;
|
|
194
|
-
uint24?: undefined;
|
|
195
|
-
uint40?: undefined;
|
|
196
|
-
uint48?: undefined;
|
|
197
|
-
uint56?: undefined;
|
|
198
|
-
uint72?: undefined;
|
|
199
|
-
uint80?: undefined;
|
|
200
|
-
uint88?: undefined;
|
|
201
|
-
uint96?: undefined;
|
|
202
|
-
uint104?: undefined;
|
|
203
|
-
uint112?: undefined;
|
|
204
|
-
uint120?: undefined;
|
|
205
|
-
uint128?: undefined;
|
|
206
|
-
uint136?: undefined;
|
|
207
|
-
uint144?: undefined;
|
|
208
|
-
uint152?: undefined;
|
|
209
|
-
uint160?: undefined;
|
|
210
|
-
uint168?: undefined;
|
|
211
|
-
uint176?: undefined;
|
|
212
|
-
uint184?: undefined;
|
|
213
|
-
uint192?: undefined;
|
|
214
|
-
uint200?: undefined;
|
|
215
|
-
uint208?: undefined;
|
|
216
|
-
uint216?: undefined;
|
|
217
|
-
uint224?: undefined;
|
|
218
|
-
uint232?: undefined;
|
|
219
|
-
uint240?: undefined;
|
|
220
|
-
uint248?: undefined;
|
|
221
|
-
}, primaryType extends "EIP712Domain" | keyof typedData = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
|
|
16
|
+
signTypedData: <const typedData extends TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(typedDataDefinition: TypedDataDefinition<typedData, primaryType>) => Promise<Hex>;
|
|
222
17
|
};
|
|
223
18
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signer.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/multisig/signer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,aAAa,GAOd,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAahE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAGjC,EACA,MAAM,EACN,cAAc,EACd,MAAM,EACN,SAAS,EACT,aAAa,GAAG,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,GACf,EAAE,EAAE;IAC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,CAAQ,CAAC;QACd,CAAC;QAED,qBAAqB,EAAE,CAAC,MAAW,EAAgB,EAAE;YACnD,OAAO,MAAM,EAAE,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC;QAC/C,CAAC;QAED,WAAW,CAAC,EAAE,OAAO,EAAgC;YACnD,OAAO,kBAAkB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;QAClD,CAAC;QAED,aAAa,EAAE,CAIb,mBAAgE,EAClD,EAAE;YAChB,OAAO,kBAAkB,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC;QAChE,CAAC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { Address, BundlerClient, SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n hashMessage,\n hashTypedData,\n type Hash,\n type Hex,\n type SignableMessage,\n type Transport,\n type TypedData,\n type TypedDataDefinition,\n} from \"viem\";\nimport { MultisigPlugin, MultisigPluginAbi } from \"./plugin.js\";\n\ntype MultisigSignMethodsParams<\n TTransport extends Transport,\n TSigner extends SmartAccountSigner
|
|
1
|
+
{"version":3,"file":"signer.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/multisig/signer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,aAAa,GAOd,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAahE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAGjC,EACA,MAAM,EACN,cAAc,EACd,MAAM,EACN,SAAS,EACT,aAAa,GAAG,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,GACf,EAAE,EAAE;IACnD,MAAM,kBAAkB,GAAG,KAAK,EAAE,GAAS,EAA0B,EAAE;QACrE,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,CAAC,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CAAC,CAAC;QAC/C,CAAC;QAED,WAAW,CAAC,EAAE,OAAO,EAAgC;YACnD,OAAO,kBAAkB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;QAClD,CAAC;QAED,aAAa,EAAE,CAIb,mBAAgE,EAClD,EAAE;YAChB,OAAO,kBAAkB,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC,CAAC;QAChE,CAAC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { Address, BundlerClient, SmartAccountSigner } from \"@aa-sdk/core\";\nimport {\n hashMessage,\n hashTypedData,\n type Hash,\n type Hex,\n type SignableMessage,\n type Transport,\n type TypedData,\n type TypedDataDefinition,\n} from \"viem\";\nimport { MultisigPlugin, MultisigPluginAbi } from \"./plugin.js\";\n\ntype MultisigSignMethodsParams<\n TTransport extends Transport,\n TSigner extends SmartAccountSigner,\n> = {\n client: BundlerClient<TTransport>;\n accountAddress: Address;\n signer: () => TSigner;\n threshold: bigint;\n pluginAddress?: Address;\n};\n\nexport const multisigSignMethods = <\n TTransport extends Transport,\n TSigner extends SmartAccountSigner,\n>({\n client,\n accountAddress,\n signer,\n threshold,\n pluginAddress = MultisigPlugin.meta.addresses[client.chain.id],\n}: MultisigSignMethodsParams<TTransport, TSigner>) => {\n const signWith712Wrapper = async (msg: Hash): Promise<`0x${string}`> => {\n const [, name, version, chainId, verifyingContract, salt] =\n await client.readContract({\n abi: MultisigPluginAbi,\n address: pluginAddress,\n functionName: \"eip712Domain\",\n account: accountAddress,\n });\n\n return signer().signTypedData({\n domain: {\n chainId: Number(chainId),\n name,\n salt,\n verifyingContract,\n version,\n },\n types: {\n AlchemyMultisigMessage: [{ name: \"message\", type: \"bytes\" }],\n },\n message: {\n message: msg,\n },\n primaryType: \"AlchemyMultisigMessage\",\n });\n };\n\n return {\n getDummySignature: async (): Promise<`0x${string}`> => {\n const [, thresholdRead] = await client.readContract({\n abi: MultisigPluginAbi,\n address: pluginAddress,\n functionName: \"ownershipInfoOf\",\n args: [accountAddress],\n });\n\n const actualThreshold = thresholdRead === 0n ? threshold : thresholdRead;\n\n // (uint upperLimitPreVerificationGas, uint upperLimitMaxFeePerGas, uint upperLimitMaxPriorityFeePerGas)\n // the first sig will be on \"actual\" with v = 32\n return (\"0x\" +\n \"FF\".repeat(32 * 3) +\n \"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa3c\" +\n \"fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c\".repeat(\n Number(actualThreshold) - 1,\n )) as Hex;\n },\n\n signUserOperationHash: (uoHash: Hex): Promise<Hex> => {\n return signer().signMessage({ raw: uoHash });\n },\n\n signMessage({ message }: { message: SignableMessage }): Promise<Hex> {\n return signWith712Wrapper(hashMessage(message));\n },\n\n signTypedData: <\n const typedData extends TypedData | Record<string, unknown>,\n primaryType extends keyof typedData | \"EIP712Domain\" = keyof typedData,\n >(\n typedDataDefinition: TypedDataDefinition<typedData, primaryType>,\n ): Promise<Hex> => {\n return signWith712Wrapper(hashTypedData(typedDataDefinition));\n },\n };\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/multisig/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n GetAccountParameter,\n GetEntryPointFromAccount,\n SmartContractAccount,\n UserOperationRequest,\n} from \"@aa-sdk/core\";\nimport type { Hex } from \"viem\";\nimport type { GetPluginAddressParameter } from \"../types\";\n\nexport type SignerType = \"EOA\" | \"CONTRACT\";\n\nexport type UserOpSignatureType = \"ACTUAL\" | \"UPPERLIMIT\";\n\nexport type Signature = {\n signerType: SignerType;\n userOpSigType: UserOpSignatureType;\n signer: `0x${string}`;\n signature: `0x${string}`;\n};\n\nexport type SignMultisigUserOperationResult = {\n signature: Hex;\n aggregatedSignature: Hex;\n signatureObj: Signature;\n};\n\nexport type SignMultisigUserOperationParams<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TEntryPointVersion extends
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/msca/plugins/multisig/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n GetAccountParameter,\n GetEntryPointFromAccount,\n SmartContractAccount,\n UserOperationRequest,\n} from \"@aa-sdk/core\";\nimport type { Hex } from \"viem\";\nimport type { GetPluginAddressParameter } from \"../types\";\n\nexport type SignerType = \"EOA\" | \"CONTRACT\";\n\nexport type UserOpSignatureType = \"ACTUAL\" | \"UPPERLIMIT\";\n\nexport type Signature = {\n signerType: SignerType;\n userOpSigType: UserOpSignatureType;\n signer: `0x${string}`;\n signature: `0x${string}`;\n};\n\nexport type SignMultisigUserOperationResult = {\n signature: Hex;\n aggregatedSignature: Hex;\n signatureObj: Signature;\n};\n\nexport type SignMultisigUserOperationParams<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n> = {\n userOperationRequest: UserOperationRequest<TEntryPointVersion>;\n signatures: Signature[];\n} & GetAccountParameter<TAccount> &\n GetPluginAddressParameter;\n\nexport type ProposeUserOperationResult<\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TEntryPointVersion extends\n GetEntryPointFromAccount<TAccount> = GetEntryPointFromAccount<TAccount>,\n> = {\n request: UserOperationRequest<TEntryPointVersion>;\n aggregatedSignature: Hex;\n signatureObj: Signature;\n};\n\nexport type MultisigUserOperationContext =\n | {\n userOpSignatureType: Extract<UserOpSignatureType, \"UPPERLIMIT\">;\n aggregatedSignature?: Hex;\n signatures?: Signature[];\n }\n | {\n aggregatedSignature: Hex;\n signatures: Signature[];\n userOpSignatureType: Extract<UserOpSignatureType, \"ACTUAL\">;\n };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatSignatures.js","sourceRoot":"","sources":["../../../../../../../src/msca/plugins/multisig/utils/formatSignatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAGvD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,UAAuB,EACvB,iBAA0B,KAAK,EAC/B,EAAE;IACF,IAAI,OAAO,GAAW,EAAE,CAAC;IACzB,IAAI,YAAY,GAAW,EAAE,CAAC;IAC9B,IAAI,MAAM,GAAW,MAAM,CAAC,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACpD,UAAU;SACP,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACtC,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QAEtC,OAAO,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D,CAAC,CAAC;SACD,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACf,4DAA4D;QAC5D,MAAM,IAAI,GAAG,GAAG,CAAC,aAAa,KAAK,QAAQ,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAExE,IAAI,GAAG,CAAC,UAAU,KAAK,KAAK,EAAE,CAAC;YAC7B,IAAI,CAAC,GACH,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;YACtE,OAAO,IAAI,MAAM,CAAC;gBAChB,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;gBACvC,KAAK,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;aACtB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACd,CAAC;aAAM,CAAC;YACN,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YACzD,OAAO,IAAI,MAAM,CAAC;gBAChB,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC;gBACf,KAAK,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;gBAC3B,KAAK,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;aACzB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACZ,YAAY,IAAI,MAAM,CAAC;gBACrB,KAAK,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;gBAC3B,GAAG,CAAC,SAAS;aACd,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACZ,MAAM,IAAI,MAAM,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;IACL,OAAO,CAAC,IAAI,GAAG,OAAO,GAAG,YAAY,CAAkB,CAAC;AAC1D,CAAC,CAAC","sourcesContent":["import { takeBytes } from \"@aa-sdk/core\";\nimport { concat, hexToBigInt, pad, toHex } from \"viem\";\nimport type { Signature } from \"../types\";\n\n/**\n * Formats a collection of Signature objects into a single aggregated signature.\n * The format is in the form of EOA_SIGS | CONTRACT_SIG_DATAS. The signatures are ordered\n * by signer address. The EOA SIGS contain the 65 signautre data for EOA signers and 65 bytes containing SIGNER | OFFSET | V for contract signers.\n * The OFFSET is used to fetch the signature data from the CONTRACT_SIG_DATAS.\n *\n * @param {Signature[]} signatures the array of Signature objects to combine into the correct aggregated signature format excluding the upper limits\n * @param {boolean} usingMaxValues a boolean indicating wether or not the UserOperation is using the UPPER_LIMIT for the gas and fee values\n * @returns {Hex} the Hex representation of the signature\n */\nexport const formatSignatures = (\n signatures: Signature[],\n usingMaxValues: boolean = false
|
|
1
|
+
{"version":3,"file":"formatSignatures.js","sourceRoot":"","sources":["../../../../../../../src/msca/plugins/multisig/utils/formatSignatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAGvD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,UAAuB,EACvB,iBAA0B,KAAK,EAC/B,EAAE;IACF,IAAI,OAAO,GAAW,EAAE,CAAC;IACzB,IAAI,YAAY,GAAW,EAAE,CAAC;IAC9B,IAAI,MAAM,GAAW,MAAM,CAAC,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACpD,UAAU;SACP,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACtC,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QAEtC,OAAO,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D,CAAC,CAAC;SACD,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACf,4DAA4D;QAC5D,MAAM,IAAI,GAAG,G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;AAC1D,CAAC,CAAC","sourcesContent":["import { takeBytes } from \"@aa-sdk/core\";\nimport { concat, hexToBigInt, pad, toHex } from \"viem\";\nimport type { Signature } from \"../types\";\n\n/**\n * Formats a collection of Signature objects into a single aggregated signature.\n * The format is in the form of EOA_SIGS | CONTRACT_SIG_DATAS. The signatures are ordered\n * by signer address. The EOA SIGS contain the 65 signautre data for EOA signers and 65 bytes containing SIGNER | OFFSET | V for contract signers.\n * The OFFSET is used to fetch the signature data from the CONTRACT_SIG_DATAS.\n *\n * @param {Signature[]} signatures the array of Signature objects to combine into the correct aggregated signature format excluding the upper limits\n * @param {boolean} usingMaxValues a boolean indicating wether or not the UserOperation is using the UPPER_LIMIT for the gas and fee values\n * @returns {Hex} the Hex representation of the signature\n */\nexport const formatSignatures = (\n signatures: Signature[],\n usingMaxValues: boolean = false,\n) => {\n let eoaSigs: string = \"\";\n let contractSigs: string = \"\";\n let offset: bigint = BigInt(65 * signatures.length);\n signatures\n .sort((a, b) => {\n const bigintA = hexToBigInt(a.signer);\n const bigintB = hexToBigInt(b.signer);\n\n return bigintA < bigintB ? -1 : bigintA > bigintB ? 1 : 0;\n })\n .forEach((sig) => {\n // add 32 to v if the signature covers the actual gas values\n const addV = sig.userOpSigType === \"ACTUAL\" && !usingMaxValues ? 32 : 0;\n\n if (sig.signerType === \"EOA\") {\n let v =\n parseInt(takeBytes(sig.signature, { count: 1, offset: 64 })) + addV;\n eoaSigs += concat([\n takeBytes(sig.signature, { count: 64 }),\n toHex(v, { size: 1 }),\n ]).slice(2);\n } else {\n const sigLen = BigInt(sig.signature.slice(2).length / 2);\n eoaSigs += concat([\n pad(sig.signer),\n toHex(offset, { size: 32 }),\n toHex(addV, { size: 1 }),\n ]).slice(2);\n contractSigs += concat([\n toHex(sigLen, { size: 32 }),\n sig.signature,\n ]).slice(2);\n offset += sigLen;\n }\n });\n return (\"0x\" + eoaSigs + contractSigs) as `0x${string}`;\n};\n"]}
|
|
@@ -25,5 +25,5 @@ type GetSignerTypeParams<TTransport extends Transport = Transport, TChain extend
|
|
|
25
25
|
* @param {GetSignerTypeParams<TTransport, TChain>} params the parameters including the client, signature, and signer
|
|
26
26
|
* @returns {Promise<SignerType>} A promise that resolves to the signer type, which is either "EOA" or "CONTRACT"
|
|
27
27
|
*/
|
|
28
|
-
export declare const getSignerType: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>({ client, signature, signer, }: GetSignerTypeParams<TTransport, TChain
|
|
28
|
+
export declare const getSignerType: <TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>({ client, signature, signer, }: GetSignerTypeParams<TTransport, TChain>) => Promise<SignerType>;
|
|
29
29
|
export {};
|