@account-kit/wallet-client 4.75.2 → 4.75.3

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 (68) hide show
  1. package/dist/esm/client/actions/formatSign.d.ts +9 -4
  2. package/dist/esm/client/actions/formatSign.js.map +1 -1
  3. package/dist/esm/client/actions/getCallsStatus.d.ts +9 -4
  4. package/dist/esm/client/actions/getCallsStatus.js.map +1 -1
  5. package/dist/esm/client/actions/grantPermissions.d.ts +8 -3
  6. package/dist/esm/client/actions/grantPermissions.js.map +1 -1
  7. package/dist/esm/client/actions/listAccounts.d.ts +9 -4
  8. package/dist/esm/client/actions/listAccounts.js.map +1 -1
  9. package/dist/esm/client/actions/prepareCalls.d.ts +9 -4
  10. package/dist/esm/client/actions/prepareCalls.js.map +1 -1
  11. package/dist/esm/client/actions/prepareSign.d.ts +9 -4
  12. package/dist/esm/client/actions/prepareSign.js.map +1 -1
  13. package/dist/esm/client/actions/requestAccount.d.ts +8 -3
  14. package/dist/esm/client/actions/requestAccount.js.map +1 -1
  15. package/dist/esm/client/actions/sendPreparedCalls.d.ts +9 -4
  16. package/dist/esm/client/actions/sendPreparedCalls.js.map +1 -1
  17. package/dist/esm/client/actions/signPreparedCalls.d.ts +8 -3
  18. package/dist/esm/client/actions/signPreparedCalls.js.map +1 -1
  19. package/dist/esm/client/actions/waitForCallsStatus.d.ts +2 -2
  20. package/dist/esm/experimental/actions/requestQuoteV0.d.ts +9 -4
  21. package/dist/esm/experimental/actions/requestQuoteV0.js.map +1 -1
  22. package/dist/esm/internal/account.d.ts +1 -2
  23. package/dist/esm/internal/account.js.map +1 -1
  24. package/dist/esm/metrics.d.ts +1 -2
  25. package/dist/esm/metrics.js.map +1 -1
  26. package/dist/esm/version.d.ts +1 -1
  27. package/dist/esm/version.js +1 -1
  28. package/dist/esm/version.js.map +1 -1
  29. package/dist/types/client/actions/formatSign.d.ts +9 -4
  30. package/dist/types/client/actions/formatSign.d.ts.map +1 -1
  31. package/dist/types/client/actions/getCallsStatus.d.ts +9 -4
  32. package/dist/types/client/actions/getCallsStatus.d.ts.map +1 -1
  33. package/dist/types/client/actions/grantPermissions.d.ts +8 -3
  34. package/dist/types/client/actions/grantPermissions.d.ts.map +1 -1
  35. package/dist/types/client/actions/listAccounts.d.ts +9 -4
  36. package/dist/types/client/actions/listAccounts.d.ts.map +1 -1
  37. package/dist/types/client/actions/prepareCalls.d.ts +9 -4
  38. package/dist/types/client/actions/prepareCalls.d.ts.map +1 -1
  39. package/dist/types/client/actions/prepareSign.d.ts +9 -4
  40. package/dist/types/client/actions/prepareSign.d.ts.map +1 -1
  41. package/dist/types/client/actions/requestAccount.d.ts +8 -3
  42. package/dist/types/client/actions/requestAccount.d.ts.map +1 -1
  43. package/dist/types/client/actions/sendPreparedCalls.d.ts +9 -4
  44. package/dist/types/client/actions/sendPreparedCalls.d.ts.map +1 -1
  45. package/dist/types/client/actions/signPreparedCalls.d.ts +8 -3
  46. package/dist/types/client/actions/signPreparedCalls.d.ts.map +1 -1
  47. package/dist/types/client/actions/waitForCallsStatus.d.ts +2 -2
  48. package/dist/types/experimental/actions/requestQuoteV0.d.ts +9 -4
  49. package/dist/types/experimental/actions/requestQuoteV0.d.ts.map +1 -1
  50. package/dist/types/internal/account.d.ts +1 -2
  51. package/dist/types/internal/account.d.ts.map +1 -1
  52. package/dist/types/metrics.d.ts +1 -2
  53. package/dist/types/metrics.d.ts.map +1 -1
  54. package/dist/types/version.d.ts +1 -1
  55. package/package.json +5 -5
  56. package/src/client/actions/formatSign.ts +12 -11
  57. package/src/client/actions/getCallsStatus.ts +12 -8
  58. package/src/client/actions/grantPermissions.ts +11 -8
  59. package/src/client/actions/listAccounts.ts +12 -6
  60. package/src/client/actions/prepareCalls.ts +12 -11
  61. package/src/client/actions/prepareSign.ts +12 -9
  62. package/src/client/actions/requestAccount.ts +11 -6
  63. package/src/client/actions/sendPreparedCalls.ts +12 -8
  64. package/src/client/actions/signPreparedCalls.ts +11 -5
  65. package/src/experimental/actions/requestQuoteV0.ts +12 -13
  66. package/src/internal/account.ts +1 -2
  67. package/src/metrics.ts +1 -2
  68. package/src/version.ts +1 -1
@@ -1,21 +1,24 @@
1
1
  import type { InnerWalletApiClient } from "../../types.ts";
2
2
  import { toHex, type Address, type IsUndefined } from "viem";
3
3
  import { AccountNotFoundError } from "@aa-sdk/core";
4
- import type { Static } from "typebox";
5
- import type { wallet_prepareSign } from "@alchemy/wallet-api-types/rpc";
4
+ import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc";
6
5
  import { metrics } from "../../metrics.js";
7
6
 
7
+ type RpcSchema = Extract<
8
+ WalletServerRpcSchemaType,
9
+ {
10
+ Request: {
11
+ method: "wallet_prepareSign";
12
+ };
13
+ }
14
+ >;
15
+
8
16
  export type PrepareSignParams<
9
17
  TAccount extends Address | undefined = Address | undefined,
10
- > = Omit<
11
- Static<
12
- (typeof wallet_prepareSign)["properties"]["Request"]["properties"]["params"]
13
- >[0],
14
- "from" | "chainId"
15
- > &
18
+ > = Omit<RpcSchema["Request"]["params"][0], "from" | "chainId"> &
16
19
  (IsUndefined<TAccount> extends true ? { from: Address } : { from?: never });
17
20
 
18
- export type PrepareSignResult = Static<typeof wallet_prepareSign>["ReturnType"];
21
+ export type PrepareSignResult = RpcSchema["ReturnType"];
19
22
 
20
23
  /**
21
24
  * Prepares a signature request for signing messages or transactions.
@@ -2,19 +2,24 @@ import {
2
2
  type SmartAccountSigner,
3
3
  type SmartContractAccount,
4
4
  } from "@aa-sdk/core";
5
- import type { Static } from "typebox";
6
5
  import type { Address } from "abitype";
7
6
  import deepEqual from "deep-equal";
8
7
  import { custom } from "viem";
9
- import type { wallet_requestAccount } from "@alchemy/wallet-api-types/rpc";
8
+ import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc";
10
9
  import type { InnerWalletApiClient } from "../../types.js";
11
10
  import { createAccount } from "../../internal/account.js";
12
11
 
12
+ type RpcSchema = Extract<
13
+ WalletServerRpcSchemaType,
14
+ {
15
+ Request: {
16
+ method: "wallet_requestAccount";
17
+ };
18
+ }
19
+ >;
20
+
13
21
  export type RequestAccountParams = Omit<
14
- Extract<
15
- Static<typeof wallet_requestAccount>["Request"]["params"][0],
16
- { signerAddress: Address }
17
- >,
22
+ Extract<RpcSchema["Request"]["params"][0], { signerAddress: Address }>,
18
23
  "signerAddress" | "includeCounterfactualInfo"
19
24
  > & { accountAddress?: Address };
20
25
 
@@ -1,18 +1,22 @@
1
- import type { Static } from "typebox";
2
1
  import { toHex } from "viem";
3
- import type { wallet_sendPreparedCalls } from "@alchemy/wallet-api-types/rpc";
2
+ import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc";
4
3
  import type { InnerWalletApiClient, WithoutChainId } from "../../types.ts";
5
4
  import { metrics } from "../../metrics.js";
6
5
 
6
+ type RpcSchema = Extract<
7
+ WalletServerRpcSchemaType,
8
+ {
9
+ Request: {
10
+ method: "wallet_sendPreparedCalls";
11
+ };
12
+ }
13
+ >;
14
+
7
15
  export type SendPreparedCallsParams = WithoutChainId<
8
- Static<
9
- (typeof wallet_sendPreparedCalls)["properties"]["Request"]["properties"]["params"]
10
- >[0]
16
+ RpcSchema["Request"]["params"][0]
11
17
  >;
12
18
 
13
- export type SendPreparedCallsResult = Static<
14
- typeof wallet_sendPreparedCalls
15
- >["ReturnType"];
19
+ export type SendPreparedCallsResult = RpcSchema["ReturnType"];
16
20
 
17
21
  /**
18
22
  * Sends prepared calls by submitting a signed user operation.
@@ -1,8 +1,7 @@
1
1
  import type { PrepareCallsResult } from "./prepareCalls.ts";
2
2
  import { BaseError, type SmartAccountSigner } from "@aa-sdk/core";
3
3
  import { signSignatureRequest } from "./signSignatureRequest.js";
4
- import type { Static } from "typebox";
5
- import type { wallet_sendPreparedCalls } from "@alchemy/wallet-api-types/rpc";
4
+ import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc";
6
5
  import type {
7
6
  PreparedCall_Authorization,
8
7
  PreparedCall_UserOpV060,
@@ -11,11 +10,18 @@ import type {
11
10
  import { metrics } from "../../metrics.js";
12
11
  import { assertNever } from "../../utils.js";
13
12
 
13
+ type RpcSchema = Extract<
14
+ WalletServerRpcSchemaType,
15
+ {
16
+ Request: {
17
+ method: "wallet_sendPreparedCalls";
18
+ };
19
+ }
20
+ >;
21
+
14
22
  export type SignPreparedCallsParams = PrepareCallsResult;
15
23
 
16
- export type SignPreparedCallsResult = Static<
17
- (typeof wallet_sendPreparedCalls)["properties"]["Request"]["properties"]["params"]
18
- >[0];
24
+ export type SignPreparedCallsResult = RpcSchema["Request"]["params"][0];
19
25
 
20
26
  /**
21
27
  * Signs prepared calls using the provided signer.
@@ -1,4 +1,3 @@
1
- import type { Static } from "typebox";
2
1
  import {
3
2
  toHex,
4
3
  type Address,
@@ -6,26 +5,26 @@ import {
6
5
  type Prettify,
7
6
  type UnionOmit,
8
7
  } from "viem";
9
- import type { wallet_requestQuote_v0 } from "@alchemy/wallet-api-types/rpc";
8
+ import type { WalletServerRpcSchemaType } from "@alchemy/wallet-api-types/rpc";
10
9
  import type { InnerWalletApiClientBase } from "../../types.js";
11
10
  import { AccountNotFoundError } from "@aa-sdk/core";
12
11
  import { mergeClientCapabilities } from "../../internal/capabilities.js";
13
12
 
13
+ type RpcSchema = Extract<
14
+ WalletServerRpcSchemaType,
15
+ {
16
+ Request: {
17
+ method: "wallet_requestQuote_v0";
18
+ };
19
+ }
20
+ >;
21
+
14
22
  export type RequestQuoteV0Params<
15
23
  TAccount extends Address | undefined = Address | undefined,
16
- > = Prettify<
17
- UnionOmit<
18
- Static<
19
- (typeof wallet_requestQuote_v0)["properties"]["Request"]["properties"]["params"]
20
- >[0],
21
- "from" | "chainId"
22
- >
23
- > &
24
+ > = Prettify<UnionOmit<RpcSchema["Request"]["params"][0], "from" | "chainId">> &
24
25
  (IsUndefined<TAccount> extends true ? { from: Address } : { from?: never });
25
26
 
26
- export type RequestQuoteV0Result = Prettify<
27
- Static<typeof wallet_requestQuote_v0>["ReturnType"]
28
- >;
27
+ export type RequestQuoteV0Result = Prettify<RpcSchema["ReturnType"]>;
29
28
 
30
29
  export async function requestQuoteV0<
31
30
  TAccount extends Address | undefined = Address | undefined,
@@ -12,7 +12,6 @@ import {
12
12
  type Address,
13
13
  isAddressEqual,
14
14
  } from "viem";
15
- import type { StaticDecode } from "typebox";
16
15
  import type { SerializedInitcode } from "@alchemy/wallet-api-types";
17
16
  import { InternalError, InvalidRequestError } from "ox/RpcResponse";
18
17
  import { assertNever } from "../utils.js";
@@ -23,7 +22,7 @@ type CreateAccountParams = {
23
22
  transport: Transport;
24
23
  signer: SmartAccountSigner;
25
24
  accountAddress: Address;
26
- counterfactualInfo?: StaticDecode<typeof SerializedInitcode>; // undefined for 7702 accounts
25
+ counterfactualInfo?: SerializedInitcode; // undefined for 7702 accounts
27
26
  delegation?: Address; // for 7702 accounts
28
27
  };
29
28
 
package/src/metrics.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { createLogger } from "@account-kit/logging";
2
2
  import { VERSION } from "./version.js";
3
- import type { StaticDecode } from "typebox";
4
3
  import type { SerializedInitcode } from "@alchemy/wallet-api-types";
5
4
 
6
5
  export type CoreEventsSchema = [
@@ -14,7 +13,7 @@ export type CoreEventsSchema = [
14
13
  EventName: "account_initialized";
15
14
  EventData: {
16
15
  chainId: number;
17
- factory: StaticDecode<typeof SerializedInitcode>["factoryType"] | "7702";
16
+ factory: SerializedInitcode["factoryType"] | "7702";
18
17
  };
19
18
  },
20
19
  {
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.75.2";
3
+ export const VERSION = "4.75.3";