@account-kit/wallet-client 4.77.0 → 4.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/esm/client/actions/requestAccount.d.ts +1 -1
  2. package/dist/esm/client/actions/requestAccount.js +2 -4
  3. package/dist/esm/client/actions/requestAccount.js.map +1 -1
  4. package/dist/esm/client/actions/signMessage.d.ts +1 -1
  5. package/dist/esm/client/actions/signMessage.js +0 -1
  6. package/dist/esm/client/actions/signMessage.js.map +1 -1
  7. package/dist/esm/client/actions/signTypedData.d.ts +1 -1
  8. package/dist/esm/client/actions/signTypedData.js +0 -1
  9. package/dist/esm/client/actions/signTypedData.js.map +1 -1
  10. package/dist/esm/client/decorator.d.ts +1 -1
  11. package/dist/esm/client/decorator.js +0 -1
  12. package/dist/esm/client/decorator.js.map +1 -1
  13. package/dist/esm/version.d.ts +1 -1
  14. package/dist/esm/version.js +1 -1
  15. package/dist/esm/version.js.map +1 -1
  16. package/dist/types/client/actions/requestAccount.d.ts +1 -1
  17. package/dist/types/client/actions/requestAccount.d.ts.map +1 -1
  18. package/dist/types/client/actions/signMessage.d.ts +1 -1
  19. package/dist/types/client/actions/signMessage.d.ts.map +1 -1
  20. package/dist/types/client/actions/signTypedData.d.ts +1 -1
  21. package/dist/types/client/actions/signTypedData.d.ts.map +1 -1
  22. package/dist/types/client/decorator.d.ts +1 -1
  23. package/dist/types/client/decorator.d.ts.map +1 -1
  24. package/dist/types/version.d.ts +1 -1
  25. package/package.json +6 -7
  26. package/src/client/actions/requestAccount.ts +6 -5
  27. package/src/client/actions/signMessage.ts +1 -1
  28. package/src/client/actions/signTypedData.ts +1 -1
  29. package/src/client/decorator.ts +3 -3
  30. package/src/version.ts +1 -1
@@ -3,7 +3,7 @@ import type { Address } from "abitype";
3
3
  import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc";
4
4
  import type { InnerWalletApiClient } from "../../types.js";
5
5
  import type { SmartWalletSigner } from "../index.js";
6
- import { type WebAuthnPublicKey } from "@alchemy/wallet-api-types";
6
+ import type { WebAuthnPublicKey } from "@alchemy/wallet-api-types";
7
7
  type RpcSchema = Extract<WalletServerRpcSchemaType, {
8
8
  Request: {
9
9
  method: "wallet_requestAccount";
@@ -3,7 +3,6 @@ import deepEqual from "deep-equal";
3
3
  import { custom } from "viem";
4
4
  import { createAccount } from "../../internal/account.js";
5
5
  import { credentialToWebAuthnPublicKey, isWebAuthnSigner, } from "../../utils.js";
6
- import { CreationOptionsByPublicKey, CreationOptionsBySignerAddress, } from "@alchemy/wallet-api-types";
7
6
  /**
8
7
  * Requests an account for the provided signer using the wallet API client.
9
8
  * If an account already exists for the signer, it will always return that account unless a new ID is specified.
@@ -26,8 +25,8 @@ import { CreationOptionsByPublicKey, CreationOptionsBySignerAddress, } from "@al
26
25
  export async function requestAccount(client, signer, params) {
27
26
  const { creationHint = {} } = params ?? {};
28
27
  if (isWebAuthnSigner(signer)) {
29
- if (creationHint.accountType !== "mav2-webauthn") {
30
- // todo: validate error details
28
+ if (creationHint.accountType &&
29
+ creationHint.accountType !== "mav2-webauthn") {
31
30
  throw new BaseError("WebAuthn signers are only supported with mav2-webauthn account type");
32
31
  }
33
32
  }
@@ -49,7 +48,6 @@ export async function requestAccount(client, signer, params) {
49
48
  ...credentialToWebAuthnPublicKey(signer.credential),
50
49
  type: "webauthn-p256",
51
50
  },
52
- // todo: re-enable after fixing type assertions above
53
51
  ...(creationHint
54
52
  ? { creationHint: creationHint }
55
53
  : {}),
@@ -1 +1 @@
1
- {"version":3,"file":"requestAccount.js","sourceRoot":"","sources":["../../../../src/client/actions/requestAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA6B,MAAM,cAAc,CAAC;AAEpE,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAG9B,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,C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,aAAa,EAAE,MAAM,MAAM,CAAC,UAAU,EAAE;oBACxC,GAAG,CAAC,YAAY;wBACd,CAAC,CAAC;4BACE,YAAY,EACV,YAA8C;yBACjD;wBACH,CAAC,CAAC,EAAE,CAAC;iBACR,CAAC;YACN,yBAAyB,EAAE,IAAI;SAChC,CACsC,CAAC;IAE9C,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IAEnD,IACE,aAAa;QACb,CAAC,CAAC,IAAI,CAAC,cAAc;YACnB,aAAa,CAAC,OAAO,CAAC,OAAO,KAAK,IAAI,CAAC,cAAc,CAAC;YACtD,SAAS,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EACjE,CAAC;QACD,OAAO,aAAa,CAAC,OAAO,CAAC;IAC/B,CAAC;IAED,MAAM,EAAE,cAAc,EAAE,kBAAkB,EAAE,UAAU,EAAE,GACtD,MAAM,MAAM,CAAC,OAAO,CAAC;QACnB,MAAM,EAAE,uBAAuB;QAC/B,MAAM,EAAE,CAAC,IAAI,CAAC;KACf,CAAC,CAAC;IAEL,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC;QAClC,cAAc;QACd,kBAAkB;QAClB,UAAU;QACV,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;QACnC,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAE7D,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import { BaseError, type SmartContractAccount } from \"@aa-sdk/core\";\nimport type { Address } from \"abitype\";\nimport deepEqual from \"deep-equal\";\nimport { custom } from \"viem\";\nimport type { WalletServerRpcSchemaType } from \"@alchemy/wallet-api-types/rpc\";\nimport type { InnerWalletApiClient } from \"../../types.js\";\nimport { createAccount } from \"../../internal/account.js\";\nimport type { SmartWalletSigner } from \"../index.js\";\nimport {\n credentialToWebAuthnPublicKey,\n isWebAuthnSigner,\n} from \"../../utils.js\";\nimport {\n CreationOptionsByPublicKey,\n CreationOptionsBySignerAddress,\n type WebAuthnPublicKey,\n} from \"@alchemy/wallet-api-types\";\n\ntype RpcSchema = Extract<\n WalletServerRpcSchemaType,\n {\n Request: {\n method: \"wallet_requestAccount\";\n };\n }\n>;\n\nexport type RequestAccountParams = Omit<\n Extract<\n RpcSchema[\"Request\"][\"params\"][0],\n { signerAddress: Address } | { signerPublicKey: WebAuthnPublicKey }\n >,\n \"signerAddress\" | \"signerPublicKey\" | \"includeCounterfactualInfo\"\n> & { accountAddress?: Address };\n\nexport type RequestAccountResult = SmartContractAccount;\n\n/**\n * Requests an account for the provided signer using the wallet API client.\n * If an account already exists for the signer, it will always return that account unless a new ID is specified.\n * If an account already exists, the creationHint will be ignored.\n *\n * @param {InnerWalletApiClient} client - The wallet API client to use for the request\n * @param {SmartAccountSigner | WebAuthnSigner} signer - The signer that will be associated with the account\n * @param {RequestAccountParams} [params] - Optional parameters for requesting a specific account\n * @param {string} [params.id] - Optional identifier for the account. If specified, a new account with this ID will be created even if one already exists for the signer\n * @param {object} [params.creationHint] - Optional hints to guide account creation. These are ignored if an account already exists\n * @returns {Promise<RequestAccountResult>} A Promise that resolves to a SmartContractAccount instance\n *\n * @example\n * ```ts\n * // Request an account with default parameters using a local signer\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(\"0x...\");\n * const account = await client.requestAccount(signer);\n * ```\n */\nexport async function requestAccount(\n client: InnerWalletApiClient,\n signer: SmartWalletSigner,\n params?: RequestAccountParams,\n): Promise<RequestAccountResult> {\n const { creationHint = {} } = params ?? {};\n\n if (isWebAuthnSigner(signer)) {\n if (creationHint.accountType !== \"mav2-webauthn\") {\n // todo: validate error details\n throw new BaseError(\n \"WebAuthn signers are only supported with mav2-webauthn account type\",\n );\n }\n } else {\n // non-webauthn signers do not support the \"mav2-webauthn\" account type\n if (creationHint.accountType === \"mav2-webauthn\") {\n throw new BaseError(\n \"ECDSA (secp256k1) signers are not supported with mav2-webauthn account type\",\n );\n }\n }\n\n const args = (\n (client.account && !params) || params?.accountAddress\n ? {\n accountAddress: params?.accountAddress ?? client.account!.address,\n includeCounterfactualInfo: true,\n }\n : {\n ...(isWebAuthnSigner(signer)\n ? {\n signerPublicKey: {\n ...credentialToWebAuthnPublicKey(signer.credential),\n type: \"webauthn-p256\",\n },\n // todo: re-enable after fixing type assertions above\n ...(creationHint\n ? { creationHint: creationHint as CreationOptionsByPublicKey }\n : {}),\n }\n : {\n signerAddress: await signer.getAddress(),\n ...(creationHint\n ? {\n creationHint:\n creationHint as CreationOptionsBySignerAddress,\n }\n : {}),\n }),\n includeCounterfactualInfo: true,\n }\n ) satisfies RpcSchema[\"Request\"][\"params\"][0];\n\n const cachedAccount = client.internal.getAccount();\n\n if (\n cachedAccount &&\n ((args.accountAddress &&\n cachedAccount.account.address === args.accountAddress) ||\n deepEqual(cachedAccount.requestParams, args, { strict: true }))\n ) {\n return cachedAccount.account;\n }\n\n const { accountAddress, counterfactualInfo, delegation } =\n await client.request({\n method: \"wallet_requestAccount\",\n params: [args],\n });\n\n const account = await createAccount({\n accountAddress,\n counterfactualInfo,\n delegation,\n chain: client.chain,\n transport: custom(client.transport),\n signer,\n });\n\n client.internal.setAccount({ account, requestParams: args });\n\n return account;\n}\n"]}
1
+ {"version":3,"file":"requestAccount.js","sourceRoot":"","sources":["../../../../src/client/actions/requestAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA6B,MAAM,cAAc,CAAC;AAEpE,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAG9B,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,GACjB,MAAM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,EAAE,CAAC;iBACR,CAAC;YACN,yBAAyB,EAAE,IAAI;SAChC,CACsC,CAAC;IAE9C,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IAEnD,IACE,aAAa;QACb,CAAC,CAAC,IAAI,CAAC,cAAc;YACnB,aAAa,CAAC,OAAO,CAAC,OAAO,KAAK,IAAI,CAAC,cAAc,CAAC;YACtD,SAAS,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EACjE,CAAC;QACD,OAAO,aAAa,CAAC,OAAO,CAAC;IAC/B,CAAC;IAED,MAAM,EAAE,cAAc,EAAE,kBAAkB,EAAE,UAAU,EAAE,GACtD,MAAM,MAAM,CAAC,OAAO,CAAC;QACnB,MAAM,EAAE,uBAAuB;QAC/B,MAAM,EAAE,CAAC,IAAI,CAAC;KACf,CAAC,CAAC;IAEL,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC;QAClC,cAAc;QACd,kBAAkB;QAClB,UAAU;QACV,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC;QACnC,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAE7D,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import { BaseError, type SmartContractAccount } from \"@aa-sdk/core\";\nimport type { Address } from \"abitype\";\nimport deepEqual from \"deep-equal\";\nimport { custom } from \"viem\";\nimport type { WalletServerRpcSchemaType } from \"@alchemy/wallet-api-types/rpc\";\nimport type { InnerWalletApiClient } from \"../../types.js\";\nimport { createAccount } from \"../../internal/account.js\";\nimport type { SmartWalletSigner } from \"../index.js\";\nimport {\n credentialToWebAuthnPublicKey,\n isWebAuthnSigner,\n} from \"../../utils.js\";\nimport type {\n CreationOptionsByPublicKey,\n CreationOptionsBySignerAddress,\n WebAuthnPublicKey,\n} from \"@alchemy/wallet-api-types\";\n\ntype RpcSchema = Extract<\n WalletServerRpcSchemaType,\n {\n Request: {\n method: \"wallet_requestAccount\";\n };\n }\n>;\n\nexport type RequestAccountParams = Omit<\n Extract<\n RpcSchema[\"Request\"][\"params\"][0],\n { signerAddress: Address } | { signerPublicKey: WebAuthnPublicKey }\n >,\n \"signerAddress\" | \"signerPublicKey\" | \"includeCounterfactualInfo\"\n> & { accountAddress?: Address };\n\nexport type RequestAccountResult = SmartContractAccount;\n\n/**\n * Requests an account for the provided signer using the wallet API client.\n * If an account already exists for the signer, it will always return that account unless a new ID is specified.\n * If an account already exists, the creationHint will be ignored.\n *\n * @param {InnerWalletApiClient} client - The wallet API client to use for the request\n * @param {SmartAccountSigner | WebAuthnSigner} signer - The signer that will be associated with the account\n * @param {RequestAccountParams} [params] - Optional parameters for requesting a specific account\n * @param {string} [params.id] - Optional identifier for the account. If specified, a new account with this ID will be created even if one already exists for the signer\n * @param {object} [params.creationHint] - Optional hints to guide account creation. These are ignored if an account already exists\n * @returns {Promise<RequestAccountResult>} A Promise that resolves to a SmartContractAccount instance\n *\n * @example\n * ```ts\n * // Request an account with default parameters using a local signer\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(\"0x...\");\n * const account = await client.requestAccount(signer);\n * ```\n */\nexport async function requestAccount(\n client: InnerWalletApiClient,\n signer: SmartWalletSigner,\n params?: RequestAccountParams,\n): Promise<RequestAccountResult> {\n const { creationHint = {} } = params ?? {};\n\n if (isWebAuthnSigner(signer)) {\n if (\n creationHint.accountType &&\n creationHint.accountType !== \"mav2-webauthn\"\n ) {\n throw new BaseError(\n \"WebAuthn signers are only supported with mav2-webauthn account type\",\n );\n }\n } else {\n // non-webauthn signers do not support the \"mav2-webauthn\" account type\n if (creationHint.accountType === \"mav2-webauthn\") {\n throw new BaseError(\n \"ECDSA (secp256k1) signers are not supported with mav2-webauthn account type\",\n );\n }\n }\n\n const args = (\n (client.account && !params) || params?.accountAddress\n ? {\n accountAddress: params?.accountAddress ?? client.account!.address,\n includeCounterfactualInfo: true,\n }\n : {\n ...(isWebAuthnSigner(signer)\n ? {\n signerPublicKey: {\n ...credentialToWebAuthnPublicKey(signer.credential),\n type: \"webauthn-p256\",\n },\n ...(creationHint\n ? { creationHint: creationHint as CreationOptionsByPublicKey }\n : {}),\n }\n : {\n signerAddress: await signer.getAddress(),\n ...(creationHint\n ? {\n creationHint:\n creationHint as CreationOptionsBySignerAddress,\n }\n : {}),\n }),\n includeCounterfactualInfo: true,\n }\n ) satisfies RpcSchema[\"Request\"][\"params\"][0];\n\n const cachedAccount = client.internal.getAccount();\n\n if (\n cachedAccount &&\n ((args.accountAddress &&\n cachedAccount.account.address === args.accountAddress) ||\n deepEqual(cachedAccount.requestParams, args, { strict: true }))\n ) {\n return cachedAccount.account;\n }\n\n const { accountAddress, counterfactualInfo, delegation } =\n await client.request({\n method: \"wallet_requestAccount\",\n params: [args],\n });\n\n const account = await createAccount({\n accountAddress,\n counterfactualInfo,\n delegation,\n chain: client.chain,\n transport: custom(client.transport),\n signer,\n });\n\n client.internal.setAccount({ account, requestParams: args });\n\n return account;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { type Address, type Hex, type SignableMessage } from "viem";
1
+ import type { Address, Hex, SignableMessage } from "viem";
2
2
  import type { InnerWalletApiClient } from "../../types.ts";
3
3
  import type { SmartWalletSigner } from "../index.js";
4
4
  export type SignMessageParams = {
@@ -1,4 +1,3 @@
1
- import {} from "viem";
2
1
  import { requestAccount } from "./requestAccount.js";
3
2
  import { metrics } from "../../metrics.js";
4
3
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"signMessage.js","sourceRoot":"","sources":["../../../../src/client/actions/signMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,MAAM,MAAM,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAO3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAA4B,EAC5B,MAAyB,EACzB,MAAyB;IAEzB,OAAO,CAAC,UAAU,CAAC;QACjB,IAAI,EAAE,cAAc;KACrB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE;QACnD,cAAc,EAAE,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO;KAC1D,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;AAClE,CAAC","sourcesContent":["import { type Address, type Hex, type SignableMessage } from \"viem\";\nimport type { InnerWalletApiClient } from \"../../types.ts\";\nimport { requestAccount } from \"./requestAccount.js\";\nimport { metrics } from \"../../metrics.js\";\nimport type { SmartWalletSigner } from \"../index.js\";\n\nexport type SignMessageParams = { message: SignableMessage; account?: Address };\n\nexport type SignMessageResult = Hex;\n\n/**\n * Signs a message using the smart account.\n * This method requests the account associated with the signer and uses it to sign the message.\n *\n * @param {InnerWalletApiClient} client - The wallet API client to use for the request\n * @param {SmartAccountSigner | WebAuthnSigner} signer - The signer of the smart account\n * @param {SignMessageParams} params - Parameters for signing the message\n * @param {SignableMessage} params.message - The message to sign using EIP-191. Can be a string, or object with raw bytes.\n * @param {Address} [params.account] - Optional account address to use for signing. If not provided, uses the client's current account.\n * @returns {Promise<SignMessageResult>} A Promise that resolves to the signed message as a hex string\n *\n * @example\n * ```ts\n * // Sign a simple text message\n * const signature = await client.signMessage(\"Hello, world!\");\n *\n * // Sign a raw hex message\n * const signature = await client.signMessage({ raw: \"0x48656c6c6f2c20776f726c6421\" });\n * ```\n */\nexport async function signMessage(\n client: InnerWalletApiClient,\n signer: SmartWalletSigner,\n params: SignMessageParams,\n): Promise<SignMessageResult> {\n metrics.trackEvent({\n name: \"sign_message\",\n });\n\n const account = await requestAccount(client, signer, {\n accountAddress: params.account ?? client.account?.address,\n });\n\n return account.signMessageWith6492({ message: params.message });\n}\n"]}
1
+ {"version":3,"file":"signMessage.js","sourceRoot":"","sources":["../../../../src/client/actions/signMessage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAO3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAA4B,EAC5B,MAAyB,EACzB,MAAyB;IAEzB,OAAO,CAAC,UAAU,CAAC;QACjB,IAAI,EAAE,cAAc;KACrB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE;QACnD,cAAc,EAAE,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO;KAC1D,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;AAClE,CAAC","sourcesContent":["import type { Address, Hex, SignableMessage } from \"viem\";\nimport type { InnerWalletApiClient } from \"../../types.ts\";\nimport { requestAccount } from \"./requestAccount.js\";\nimport { metrics } from \"../../metrics.js\";\nimport type { SmartWalletSigner } from \"../index.js\";\n\nexport type SignMessageParams = { message: SignableMessage; account?: Address };\n\nexport type SignMessageResult = Hex;\n\n/**\n * Signs a message using the smart account.\n * This method requests the account associated with the signer and uses it to sign the message.\n *\n * @param {InnerWalletApiClient} client - The wallet API client to use for the request\n * @param {SmartAccountSigner | WebAuthnSigner} signer - The signer of the smart account\n * @param {SignMessageParams} params - Parameters for signing the message\n * @param {SignableMessage} params.message - The message to sign using EIP-191. Can be a string, or object with raw bytes.\n * @param {Address} [params.account] - Optional account address to use for signing. If not provided, uses the client's current account.\n * @returns {Promise<SignMessageResult>} A Promise that resolves to the signed message as a hex string\n *\n * @example\n * ```ts\n * // Sign a simple text message\n * const signature = await client.signMessage(\"Hello, world!\");\n *\n * // Sign a raw hex message\n * const signature = await client.signMessage({ raw: \"0x48656c6c6f2c20776f726c6421\" });\n * ```\n */\nexport async function signMessage(\n client: InnerWalletApiClient,\n signer: SmartWalletSigner,\n params: SignMessageParams,\n): Promise<SignMessageResult> {\n metrics.trackEvent({\n name: \"sign_message\",\n });\n\n const account = await requestAccount(client, signer, {\n accountAddress: params.account ?? client.account?.address,\n });\n\n return account.signMessageWith6492({ message: params.message });\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { type Address, type Hex, type TypedDataDefinition } from "viem";
1
+ import type { Address, Hex, TypedDataDefinition } from "viem";
2
2
  import type { InnerWalletApiClient } from "../../types.ts";
3
3
  import type { SmartWalletSigner } from "../index.js";
4
4
  export type SignTypedDataParams = TypedDataDefinition & {
@@ -1,4 +1,3 @@
1
- import {} from "viem";
2
1
  import { requestAccount } from "./requestAccount.js";
3
2
  import { metrics } from "../../metrics.js";
4
3
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"signTypedData.js","sourceRoot":"","sources":["../../../../src/client/actions/signTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoD,MAAM,MAAM,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAS3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,MAA4B,EAC5B,MAAyB,EACzB,MAA2B;IAE3B,OAAO,CAAC,UAAU,CAAC;QACjB,IAAI,EAAE,iBAAiB;KACxB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE;QACnD,cAAc,EAAE,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO;KAC1D,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["import { type Address, type Hex, type TypedDataDefinition } from \"viem\";\nimport type { InnerWalletApiClient } from \"../../types.ts\";\nimport { requestAccount } from \"./requestAccount.js\";\nimport { metrics } from \"../../metrics.js\";\nimport type { SmartWalletSigner } from \"../index.js\";\n\nexport type SignTypedDataParams = TypedDataDefinition & {\n account?: Address;\n};\n\nexport type SignTypedDataResult = Hex;\n\n/**\n * Signs typed data (EIP-712) using the smart account.\n * This method requests the account associated with the signer and uses it to sign the typed data.\n *\n * @param {InnerWalletApiClient} client - The wallet API client to use for the request\n * @param {SmartAccountSigner | WebAuthnSigner} signer - The signer of the smart account\n * @param {TypedDataDefinition} params - The typed data to sign, following EIP-712 format\n * @returns {Promise<SignTypedDataResult>} A Promise that resolves to the signature as a hex string\n *\n * @example\n * ```ts\n * // Sign typed data\n * const signature = await client.signTypedData({\n * domain: {\n * name: 'Example DApp',\n * version: '1',\n * chainId: 1,\n * verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC'\n * },\n * types: {\n * Person: [\n * { name: 'name', type: 'string' },\n * { name: 'wallet', type: 'address' }\n * ]\n * },\n * primaryType: 'Person',\n * message: {\n * name: 'John Doe',\n * wallet: '0xAaAaAaAaAaAaAaAaAaAAAAAAAAaaaAaAaAaaAaAa'\n * }\n * });\n * ```\n */\nexport async function signTypedData(\n client: InnerWalletApiClient,\n signer: SmartWalletSigner,\n params: SignTypedDataParams,\n): Promise<SignTypedDataResult> {\n metrics.trackEvent({\n name: \"sign_typed_data\",\n });\n\n const account = await requestAccount(client, signer, {\n accountAddress: params.account ?? client.account?.address,\n });\n\n return account.signTypedDataWith6492(params);\n}\n"]}
1
+ {"version":3,"file":"signTypedData.js","sourceRoot":"","sources":["../../../../src/client/actions/signTypedData.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAS3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,MAA4B,EAC5B,MAAyB,EACzB,MAA2B;IAE3B,OAAO,CAAC,UAAU,CAAC;QACjB,IAAI,EAAE,iBAAiB;KACxB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE;QACnD,cAAc,EAAE,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO;KAC1D,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["import type { Address, Hex, TypedDataDefinition } from \"viem\";\nimport type { InnerWalletApiClient } from \"../../types.ts\";\nimport { requestAccount } from \"./requestAccount.js\";\nimport { metrics } from \"../../metrics.js\";\nimport type { SmartWalletSigner } from \"../index.js\";\n\nexport type SignTypedDataParams = TypedDataDefinition & {\n account?: Address;\n};\n\nexport type SignTypedDataResult = Hex;\n\n/**\n * Signs typed data (EIP-712) using the smart account.\n * This method requests the account associated with the signer and uses it to sign the typed data.\n *\n * @param {InnerWalletApiClient} client - The wallet API client to use for the request\n * @param {SmartAccountSigner | WebAuthnSigner} signer - The signer of the smart account\n * @param {TypedDataDefinition} params - The typed data to sign, following EIP-712 format\n * @returns {Promise<SignTypedDataResult>} A Promise that resolves to the signature as a hex string\n *\n * @example\n * ```ts\n * // Sign typed data\n * const signature = await client.signTypedData({\n * domain: {\n * name: 'Example DApp',\n * version: '1',\n * chainId: 1,\n * verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC'\n * },\n * types: {\n * Person: [\n * { name: 'name', type: 'string' },\n * { name: 'wallet', type: 'address' }\n * ]\n * },\n * primaryType: 'Person',\n * message: {\n * name: 'John Doe',\n * wallet: '0xAaAaAaAaAaAaAaAaAaAAAAAAAAaaaAaAaAaaAaAa'\n * }\n * });\n * ```\n */\nexport async function signTypedData(\n client: InnerWalletApiClient,\n signer: SmartWalletSigner,\n params: SignTypedDataParams,\n): Promise<SignTypedDataResult> {\n metrics.trackEvent({\n name: \"sign_typed_data\",\n });\n\n const account = await requestAccount(client, signer, {\n accountAddress: params.account ?? client.account?.address,\n });\n\n return account.signTypedDataWith6492(params);\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { Address, Hex } from "viem";
2
- import { type WaitForCallsStatusParameters, type WaitForCallsStatusReturnType } from "viem/actions";
2
+ import type { WaitForCallsStatusParameters, WaitForCallsStatusReturnType } from "viem/actions";
3
3
  import type { InnerWalletApiClient } from "../types.ts";
4
4
  import { type GetCallsStatusParams, type GetCallsStatusResult } from "./actions/getCallsStatus.js";
5
5
  import { type GrantPermissionsParams, type GrantPermissionsResult } from "./actions/grantPermissions.js";
@@ -1,4 +1,3 @@
1
- import {} from "viem/actions";
2
1
  import { getCallsStatus, } from "./actions/getCallsStatus.js";
3
2
  import { grantPermissions, } from "./actions/grantPermissions.js";
4
3
  import { listAccounts, } from "./actions/listAccounts.js";
@@ -1 +1 @@
1
- {"version":3,"file":"decorator.js","sourceRoot":"","sources":["../../../src/client/decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAGN,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,cAAc,GAGf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,gBAAgB,GAGjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,YAAY,GAGb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,YAAY,GAGb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,cAAc,GAGf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,GAGlB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE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AAM,EAAE,MAAM,EAAE,MAAM,CAAC;QACxD,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC;QAC1D,kBAAkB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC;QAClE,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC;QAC1E,iBAAiB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC;QAChE,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;QAC5D,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;QAChE,gBAAgB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;KACvE,CAAC;AACJ,CAAC","sourcesContent":["import type { Address, Hex } from \"viem\";\nimport {\n type WaitForCallsStatusParameters,\n type WaitForCallsStatusReturnType,\n} from \"viem/actions\";\nimport type { InnerWalletApiClient } from \"../types.ts\";\nimport {\n getCallsStatus,\n type GetCallsStatusParams,\n type GetCallsStatusResult,\n} from \"./actions/getCallsStatus.js\";\nimport {\n grantPermissions,\n type GrantPermissionsParams,\n type GrantPermissionsResult,\n} from \"./actions/grantPermissions.js\";\nimport {\n listAccounts,\n type ListAccountsParams,\n type ListAccountsResult,\n} from \"./actions/listAccounts.js\";\nimport {\n prepareCalls,\n type PrepareCallsParams,\n type PrepareCallsResult,\n} from \"./actions/prepareCalls.js\";\nimport {\n requestAccount,\n type RequestAccountParams,\n type RequestAccountResult,\n} from \"./actions/requestAccount.js\";\nimport {\n sendPreparedCalls,\n type SendPreparedCallsParams,\n type SendPreparedCallsResult,\n} from \"./actions/sendPreparedCalls.js\";\nimport { waitForCallsStatus } from \"./actions/waitForCallsStatus.js\";\nimport { signMessage, type SignMessageParams } from \"./actions/signMessage.js\";\nimport {\n signSignatureRequest,\n type SignSignatureRequestParams,\n type SignSignatureRequestResult,\n} from \"./actions/signSignatureRequest.js\";\nimport {\n signTypedData,\n type SignTypedDataParams,\n} from \"./actions/signTypedData.js\";\nimport {\n signPreparedCalls,\n type SignPreparedCallsParams,\n type SignPreparedCallsResult,\n} from \"./actions/signPreparedCalls.js\";\nimport {\n sendCalls,\n type SendCallsParams,\n type SendCallsResult,\n} from \"./actions/sendCalls.js\";\nimport type { SmartWalletSigner } from \"./index.js\";\nimport { isWebAuthnSigner } from \"../utils.js\";\n\nasync function signSignatureRequestSafe(\n signer: SmartWalletSigner,\n params: SignSignatureRequestParams,\n): Promise<SignSignatureRequestResult> {\n if (params.type === \"eip7702Auth\") {\n if (isWebAuthnSigner(signer)) {\n throw new Error(\n \"WebAuthn signer cannot sign EIP-7702 authorization requests\",\n );\n }\n // We must split up the call to signSignatureRequest across two conditionals for the TS compiler to\n // correctly infer which overload to use.\n return signSignatureRequest(signer, params);\n }\n return signSignatureRequest(signer, params);\n}\n\nexport type SmartWalletActions<\n TAccount extends Address | undefined = Address | undefined,\n> = {\n requestAccount: (\n params?: RequestAccountParams,\n ) => Promise<RequestAccountResult>;\n prepareCalls: (\n params: PrepareCallsParams<TAccount>,\n ) => Promise<PrepareCallsResult>;\n sendPreparedCalls: (\n params: SendPreparedCallsParams,\n ) => Promise<SendPreparedCallsResult>;\n sendCalls: (params: SendCallsParams<TAccount>) => Promise<SendCallsResult>;\n listAccounts: (params: ListAccountsParams) => Promise<ListAccountsResult>;\n getCallsStatus: (\n params: GetCallsStatusParams,\n ) => Promise<GetCallsStatusResult>;\n waitForCallsStatus: (\n params: WaitForCallsStatusParameters,\n ) => Promise<WaitForCallsStatusReturnType>;\n signSignatureRequest: (\n params: SignSignatureRequestParams,\n ) => Promise<SignSignatureRequestResult>;\n signPreparedCalls: (\n params: SignPreparedCallsParams,\n ) => Promise<SignPreparedCallsResult>;\n signMessage: (params: SignMessageParams) => Promise<Hex>;\n signTypedData: (params: SignTypedDataParams) => Promise<Hex>;\n grantPermissions: (\n params: GrantPermissionsParams<TAccount>,\n ) => Promise<GrantPermissionsResult>;\n};\n\nexport function smartWalletClientActions<\n TAccount extends Address | undefined = Address | undefined,\n>(\n client: InnerWalletApiClient,\n signer: SmartWalletSigner,\n): SmartWalletActions<TAccount> {\n return {\n requestAccount: (params) => requestAccount(client, signer, params),\n prepareCalls: (params) => prepareCalls(client, params),\n listAccounts: (params) => listAccounts(client, signer, params),\n sendPreparedCalls: (params) => sendPreparedCalls(client, params),\n sendCalls: (params) => sendCalls(client, signer, params),\n getCallsStatus: (params) => getCallsStatus(client, params),\n waitForCallsStatus: (params) => waitForCallsStatus(client, params),\n signSignatureRequest: (params) => signSignatureRequestSafe(signer, params),\n signPreparedCalls: (params) => signPreparedCalls(signer, params),\n signMessage: (params) => signMessage(client, signer, params),\n signTypedData: (params) => signTypedData(client, signer, params),\n grantPermissions: (params) => grantPermissions(client, signer, params),\n };\n}\n"]}
1
+ {"version":3,"file":"decorator.js","sourceRoot":"","sources":["../../../src/client/decorator.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,cAAc,GAGf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,gBAAgB,GAGjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,YAAY,GAGb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,YAAY,GAGb,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,cAAc,GAGf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,GAGlB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,WAAW,EAA0B,MAAM,0BAA0B,CAAC;AAC/E,OAAO,E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AAE,MAAM,CAAC;QAC1D,kBAAkB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC;QAClE,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC;QAC1E,iBAAiB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC;QAChE,WAAW,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;QAC5D,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;QAChE,gBAAgB,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;KACvE,CAAC;AACJ,CAAC","sourcesContent":["import type { Address, Hex } from \"viem\";\nimport type {\n WaitForCallsStatusParameters,\n WaitForCallsStatusReturnType,\n} from \"viem/actions\";\nimport type { InnerWalletApiClient } from \"../types.ts\";\nimport {\n getCallsStatus,\n type GetCallsStatusParams,\n type GetCallsStatusResult,\n} from \"./actions/getCallsStatus.js\";\nimport {\n grantPermissions,\n type GrantPermissionsParams,\n type GrantPermissionsResult,\n} from \"./actions/grantPermissions.js\";\nimport {\n listAccounts,\n type ListAccountsParams,\n type ListAccountsResult,\n} from \"./actions/listAccounts.js\";\nimport {\n prepareCalls,\n type PrepareCallsParams,\n type PrepareCallsResult,\n} from \"./actions/prepareCalls.js\";\nimport {\n requestAccount,\n type RequestAccountParams,\n type RequestAccountResult,\n} from \"./actions/requestAccount.js\";\nimport {\n sendPreparedCalls,\n type SendPreparedCallsParams,\n type SendPreparedCallsResult,\n} from \"./actions/sendPreparedCalls.js\";\nimport { waitForCallsStatus } from \"./actions/waitForCallsStatus.js\";\nimport { signMessage, type SignMessageParams } from \"./actions/signMessage.js\";\nimport {\n signSignatureRequest,\n type SignSignatureRequestParams,\n type SignSignatureRequestResult,\n} from \"./actions/signSignatureRequest.js\";\nimport {\n signTypedData,\n type SignTypedDataParams,\n} from \"./actions/signTypedData.js\";\nimport {\n signPreparedCalls,\n type SignPreparedCallsParams,\n type SignPreparedCallsResult,\n} from \"./actions/signPreparedCalls.js\";\nimport {\n sendCalls,\n type SendCallsParams,\n type SendCallsResult,\n} from \"./actions/sendCalls.js\";\nimport type { SmartWalletSigner } from \"./index.js\";\nimport { isWebAuthnSigner } from \"../utils.js\";\n\nasync function signSignatureRequestSafe(\n signer: SmartWalletSigner,\n params: SignSignatureRequestParams,\n): Promise<SignSignatureRequestResult> {\n if (params.type === \"eip7702Auth\") {\n if (isWebAuthnSigner(signer)) {\n throw new Error(\n \"WebAuthn signer cannot sign EIP-7702 authorization requests\",\n );\n }\n // We must split up the call to signSignatureRequest across two conditionals for the TS compiler to\n // correctly infer which overload to use.\n return signSignatureRequest(signer, params);\n }\n return signSignatureRequest(signer, params);\n}\n\nexport type SmartWalletActions<\n TAccount extends Address | undefined = Address | undefined,\n> = {\n requestAccount: (\n params?: RequestAccountParams,\n ) => Promise<RequestAccountResult>;\n prepareCalls: (\n params: PrepareCallsParams<TAccount>,\n ) => Promise<PrepareCallsResult>;\n sendPreparedCalls: (\n params: SendPreparedCallsParams,\n ) => Promise<SendPreparedCallsResult>;\n sendCalls: (params: SendCallsParams<TAccount>) => Promise<SendCallsResult>;\n listAccounts: (params: ListAccountsParams) => Promise<ListAccountsResult>;\n getCallsStatus: (\n params: GetCallsStatusParams,\n ) => Promise<GetCallsStatusResult>;\n waitForCallsStatus: (\n params: WaitForCallsStatusParameters,\n ) => Promise<WaitForCallsStatusReturnType>;\n signSignatureRequest: (\n params: SignSignatureRequestParams,\n ) => Promise<SignSignatureRequestResult>;\n signPreparedCalls: (\n params: SignPreparedCallsParams,\n ) => Promise<SignPreparedCallsResult>;\n signMessage: (params: SignMessageParams) => Promise<Hex>;\n signTypedData: (params: SignTypedDataParams) => Promise<Hex>;\n grantPermissions: (\n params: GrantPermissionsParams<TAccount>,\n ) => Promise<GrantPermissionsResult>;\n};\n\nexport function smartWalletClientActions<\n TAccount extends Address | undefined = Address | undefined,\n>(\n client: InnerWalletApiClient,\n signer: SmartWalletSigner,\n): SmartWalletActions<TAccount> {\n return {\n requestAccount: (params) => requestAccount(client, signer, params),\n prepareCalls: (params) => prepareCalls(client, params),\n listAccounts: (params) => listAccounts(client, signer, params),\n sendPreparedCalls: (params) => sendPreparedCalls(client, params),\n sendCalls: (params) => sendCalls(client, signer, params),\n getCallsStatus: (params) => getCallsStatus(client, params),\n waitForCallsStatus: (params) => waitForCallsStatus(client, params),\n signSignatureRequest: (params) => signSignatureRequestSafe(signer, params),\n signPreparedCalls: (params) => signPreparedCalls(signer, params),\n signMessage: (params) => signMessage(client, signer, params),\n signTypedData: (params) => signTypedData(client, signer, params),\n grantPermissions: (params) => grantPermissions(client, signer, params),\n };\n}\n"]}
@@ -1 +1 @@
1
- export declare const VERSION = "4.77.0";
1
+ export declare const VERSION = "4.78.0";
@@ -1,4 +1,4 @@
1
1
  // This file is autogenerated by inject-version.ts. Any changes will be
2
2
  // overwritten on commit!
3
- export const VERSION = "4.77.0";
3
+ export const VERSION = "4.78.0";
4
4
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.77.0\";\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.78.0\";\n"]}
@@ -3,7 +3,7 @@ import type { Address } from "abitype";
3
3
  import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc";
4
4
  import type { InnerWalletApiClient } from "../../types.js";
5
5
  import type { SmartWalletSigner } from "../index.js";
6
- import { type WebAuthnPublicKey } from "@alchemy/wallet-api-types";
6
+ import type { WebAuthnPublicKey } from "@alchemy/wallet-api-types";
7
7
  type RpcSchema = Extract<WalletServerRpcSchemaType, {
8
8
  Request: {
9
9
  method: "wallet_requestAccount";
@@ -1 +1 @@
1
- {"version":3,"file":"requestAccount.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/requestAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKrD,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,2BAA2B,CAAC;AAEnC,KAAK,SAAS,GAAG,OAAO,CACtB,yBAAyB,EACzB;IACE,OAAO,EAAE;QACP,MAAM,EAAE,uBAAuB,CAAC;KACjC,CAAC;CACH,CACF,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,OAAO,CACL,SAAS,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EACjC;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,eAAe,EAAE,iBAAiB,CAAA;CAAE,CACpE,EACD,eAAe,GAAG,iBAAiB,GAAG,2BAA2B,CAClE,GAAG;IAAE,cAAc,CAA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Ac,CAClC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,iBAAiB,EACzB,MAAM,CAAC,EAAE,oBAAoB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAgF/B"}
@@ -1,4 +1,4 @@
1
- import { type Address, type Hex, type SignableMessage } from "viem";
1
+ import type { Address, Hex, SignableMessage } from "viem";
2
2
  import type { InnerWalletApiClient } from "../../types.ts";
3
3
  import type { SmartWalletSigner } from "../index.js";
4
4
  export type SignMessageParams = {
@@ -1 +1 @@
1
- {"version":3,"file":"signMessage.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,eAAe,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEhF,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAU5B"}
1
+ {"version":3,"file":"signMessage.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEhF,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAU5B"}
@@ -1,4 +1,4 @@
1
- import { type Address, type Hex, type TypedDataDefinition } from "viem";
1
+ import type { Address, Hex, TypedDataDefinition } from "viem";
2
2
  import type { InnerWalletApiClient } from "../../types.ts";
3
3
  import type { SmartWalletSigner } from "../index.js";
4
4
  export type SignTypedDataParams = TypedDataDefinition & {
@@ -1 +1 @@
1
- {"version":3,"file":"signTypedData.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,mBAAmB,EAAE,MAAM,MAAM,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAU9B"}
1
+ {"version":3,"file":"signTypedData.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAU9B"}
@@ -1,5 +1,5 @@
1
1
  import type { Address, Hex } from "viem";
2
- import { type WaitForCallsStatusParameters, type WaitForCallsStatusReturnType } from "viem/actions";
2
+ import type { WaitForCallsStatusParameters, WaitForCallsStatusReturnType } from "viem/actions";
3
3
  import type { InnerWalletApiClient } from "../types.ts";
4
4
  import { type GetCallsStatusParams, type GetCallsStatusResult } from "./actions/getCallsStatus.js";
5
5
  import { type GrantPermissionsParams, type GrantPermissionsResult } from "./actions/grantPermissions.js";
@@ -1 +1 @@
1
- {"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../../../src/client/decorator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EAClC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,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AAC;IACtC,SAAS,EAAE,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;IAC3E,YAAY,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC1E,cAAc,EAAE,CACd,MAAM,EAAE,oBAAoB,KACzB,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACnC,kBAAkB,EAAE,CAClB,MAAM,EAAE,4BAA4B,KACjC,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAC3C,oBAAoB,EAAE,CACpB,MAAM,EAAE,0BAA0B,KAC/B,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACzC,iBAAiB,EAAE,CACjB,MAAM,EAAE,uBAAuB,KAC5B,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,WAAW,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,aAAa,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7D,gBAAgB,EAAE,CAChB,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,KACrC,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACtC,CAAC;AAEF,wBAAgB,wBAAwB,CACtC,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,EAE1D,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,iBAAiB,GACxB,kBAAkB,CAAC,QAAQ,CAAC,CAe9B"}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.77.0";
1
+ export declare const VERSION = "4.78.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@account-kit/wallet-client",
3
- "version": "4.77.0",
3
+ "version": "4.78.0",
4
4
  "description": "Wallet Client for Alchemy Account Kit",
5
5
  "author": "Alchemy",
6
6
  "license": "MIT",
@@ -44,9 +44,9 @@
44
44
  "test:e2e": "bun test ./src/**/*.e2e.test.*"
45
45
  },
46
46
  "dependencies": {
47
- "@aa-sdk/core": "^4.77.0",
48
- "@account-kit/infra": "^4.77.0",
49
- "@account-kit/smart-contracts": "^4.77.0",
47
+ "@aa-sdk/core": "^4.78.0",
48
+ "@account-kit/infra": "^4.78.0",
49
+ "@account-kit/smart-contracts": "^4.78.0",
50
50
  "@alchemy/wallet-api-types": "0.1.0-alpha.18",
51
51
  "deep-equal": "^2.2.3",
52
52
  "ox": "^0.6.12"
@@ -55,8 +55,7 @@
55
55
  "@types/deep-equal": "^1.0.4",
56
56
  "@types/node": "^24.0.11",
57
57
  "bun": "^1.2.18",
58
- "bun-types": "^1.2.18",
59
- "typebox": "^1.0.0"
58
+ "bun-types": "^1.2.18"
60
59
  },
61
60
  "peerDependencies": {
62
61
  "viem": "^2.29.2"
@@ -73,5 +72,5 @@
73
72
  "url": "https://github.com/alchemyplatform/aa-sdk/issues"
74
73
  },
75
74
  "homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
76
- "gitHead": "0aa4229e7b4b5aeea1f4a9642b7abe0a9ff49e75"
75
+ "gitHead": "78a221a80dfd66a06b1ae204ec7e10ada80acca7"
77
76
  }
@@ -10,10 +10,10 @@ import {
10
10
  credentialToWebAuthnPublicKey,
11
11
  isWebAuthnSigner,
12
12
  } from "../../utils.js";
13
- import {
13
+ import type {
14
14
  CreationOptionsByPublicKey,
15
15
  CreationOptionsBySignerAddress,
16
- type WebAuthnPublicKey,
16
+ WebAuthnPublicKey,
17
17
  } from "@alchemy/wallet-api-types";
18
18
 
19
19
  type RpcSchema = Extract<
@@ -62,8 +62,10 @@ export async function requestAccount(
62
62
  const { creationHint = {} } = params ?? {};
63
63
 
64
64
  if (isWebAuthnSigner(signer)) {
65
- if (creationHint.accountType !== "mav2-webauthn") {
66
- // todo: validate error details
65
+ if (
66
+ creationHint.accountType &&
67
+ creationHint.accountType !== "mav2-webauthn"
68
+ ) {
67
69
  throw new BaseError(
68
70
  "WebAuthn signers are only supported with mav2-webauthn account type",
69
71
  );
@@ -90,7 +92,6 @@ export async function requestAccount(
90
92
  ...credentialToWebAuthnPublicKey(signer.credential),
91
93
  type: "webauthn-p256",
92
94
  },
93
- // todo: re-enable after fixing type assertions above
94
95
  ...(creationHint
95
96
  ? { creationHint: creationHint as CreationOptionsByPublicKey }
96
97
  : {}),
@@ -1,4 +1,4 @@
1
- import { type Address, type Hex, type SignableMessage } from "viem";
1
+ import type { Address, Hex, SignableMessage } from "viem";
2
2
  import type { InnerWalletApiClient } from "../../types.ts";
3
3
  import { requestAccount } from "./requestAccount.js";
4
4
  import { metrics } from "../../metrics.js";
@@ -1,4 +1,4 @@
1
- import { type Address, type Hex, type TypedDataDefinition } from "viem";
1
+ import type { Address, Hex, TypedDataDefinition } from "viem";
2
2
  import type { InnerWalletApiClient } from "../../types.ts";
3
3
  import { requestAccount } from "./requestAccount.js";
4
4
  import { metrics } from "../../metrics.js";
@@ -1,7 +1,7 @@
1
1
  import type { Address, Hex } from "viem";
2
- import {
3
- type WaitForCallsStatusParameters,
4
- type WaitForCallsStatusReturnType,
2
+ import type {
3
+ WaitForCallsStatusParameters,
4
+ WaitForCallsStatusReturnType,
5
5
  } from "viem/actions";
6
6
  import type { InnerWalletApiClient } from "../types.ts";
7
7
  import {
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // This file is autogenerated by inject-version.ts. Any changes will be
2
2
  // overwritten on commit!
3
- export const VERSION = "4.77.0";
3
+ export const VERSION = "4.78.0";