@account-kit/wallet-client 4.77.0 → 4.77.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.
@@ -26,8 +26,8 @@ import { CreationOptionsByPublicKey, CreationOptionsBySignerAddress, } from "@al
26
26
  export async function requestAccount(client, signer, params) {
27
27
  const { creationHint = {} } = params ?? {};
28
28
  if (isWebAuthnSigner(signer)) {
29
- if (creationHint.accountType !== "mav2-webauthn") {
30
- // todo: validate error details
29
+ if (creationHint.accountType &&
30
+ creationHint.accountType !== "mav2-webauthn") {
31
31
  throw new BaseError("WebAuthn signers are only supported with mav2-webauthn account type");
32
32
  }
33
33
  }
@@ -49,7 +49,6 @@ export async function requestAccount(client, signer, params) {
49
49
  ...credentialToWebAuthnPublicKey(signer.credential),
50
50
  type: "webauthn-p256",
51
51
  },
52
- // todo: re-enable after fixing type assertions above
53
52
  ...(creationHint
54
53
  ? { creationHint: creationHint }
55
54
  : {}),
@@ -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,CAAC;AAE1D,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,GAE/B,MAAM,2BAA2B,CAAC;AAqBnC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,MAA4B,EAC5B,MAAyB,EACzB,MAA6B;IAE7B,MAAM,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;IAE3C,IAAI,gBAAgB,CA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AC,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,gBAAgB,CAAC;AACxB,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,GAE/B,MAAM,2BAA2B,CAAC;AAqBnC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,MAA4B,EAC5B,MAAyB,EACzB,MAA6B;IAE7B,MAAM,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;IAE3C,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7B,IACE,YAAY,CAAC,WAAW;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AC,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 (\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 +1 @@
1
- export declare const VERSION = "4.77.0";
1
+ export declare const VERSION = "4.77.1";
@@ -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.77.1";
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.77.1\";\n"]}
@@ -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,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjC,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAExD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,iBAAiB,EACzB,MAAM,CAAC,EAAE,oBAAoB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CA+E/B"}
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,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjC,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAExD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,iBAAiB,EACzB,MAAM,CAAC,EAAE,oBAAoB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAgF/B"}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.77.0";
1
+ export declare const VERSION = "4.77.1";
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.77.1",
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.77.1",
48
+ "@account-kit/infra": "^4.77.1",
49
+ "@account-kit/smart-contracts": "^4.77.1",
50
50
  "@alchemy/wallet-api-types": "0.1.0-alpha.18",
51
51
  "deep-equal": "^2.2.3",
52
52
  "ox": "^0.6.12"
@@ -73,5 +73,5 @@
73
73
  "url": "https://github.com/alchemyplatform/aa-sdk/issues"
74
74
  },
75
75
  "homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
76
- "gitHead": "0aa4229e7b4b5aeea1f4a9642b7abe0a9ff49e75"
76
+ "gitHead": "59bb8fdc3b720c0363a23dea3450504890f598a7"
77
77
  }
@@ -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
  : {}),
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.77.1";