@account-kit/wallet-client 0.1.0-alpha.0 → 0.1.0-alpha.2

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 (179) hide show
  1. package/dist/esm/abi/index.d.ts +8 -8
  2. package/dist/esm/abi/index.js +8 -8
  3. package/dist/esm/abi/index.js.map +1 -1
  4. package/dist/esm/capabilities/index.js +3 -3
  5. package/dist/esm/capabilities/index.js.map +1 -1
  6. package/dist/esm/capabilities/overrides.js +1 -1
  7. package/dist/esm/capabilities/overrides.js.map +1 -1
  8. package/dist/esm/capabilities/permissions/index.js +1 -1
  9. package/dist/esm/capabilities/permissions/index.js.map +1 -1
  10. package/dist/esm/capabilities/permissions/mav2.d.ts +2 -2
  11. package/dist/esm/capabilities/permissions/mav2.js +1 -1
  12. package/dist/esm/capabilities/permissions/mav2.js.map +1 -1
  13. package/dist/esm/client/actions/createAccount.d.ts +27 -2
  14. package/dist/esm/client/actions/createAccount.js +25 -0
  15. package/dist/esm/client/actions/createAccount.js.map +1 -1
  16. package/dist/esm/client/actions/getCallsStatus.d.ts +21 -2
  17. package/dist/esm/client/actions/getCallsStatus.js.map +1 -1
  18. package/dist/esm/client/actions/grantPermissions.d.ts +60 -2
  19. package/dist/esm/client/actions/grantPermissions.js.map +1 -1
  20. package/dist/esm/client/actions/listAccounts.d.ts +26 -2
  21. package/dist/esm/client/actions/listAccounts.js +24 -0
  22. package/dist/esm/client/actions/listAccounts.js.map +1 -1
  23. package/dist/esm/client/actions/prepareCalls.d.ts +28 -2
  24. package/dist/esm/client/actions/prepareCalls.js.map +1 -1
  25. package/dist/esm/client/actions/requestAccount.d.ts +23 -4
  26. package/dist/esm/client/actions/requestAccount.js +16 -5
  27. package/dist/esm/client/actions/requestAccount.js.map +1 -1
  28. package/dist/esm/client/actions/sendPreparedCalls.d.ts +39 -2
  29. package/dist/esm/client/actions/sendPreparedCalls.js +37 -0
  30. package/dist/esm/client/actions/sendPreparedCalls.js.map +1 -1
  31. package/dist/esm/client/actions/signMessage.d.ts +23 -3
  32. package/dist/esm/client/actions/signMessage.js +5 -3
  33. package/dist/esm/client/actions/signMessage.js.map +1 -1
  34. package/dist/esm/client/actions/signSignatureRequest.d.ts +32 -1
  35. package/dist/esm/client/actions/signSignatureRequest.js +2 -2
  36. package/dist/esm/client/actions/signSignatureRequest.js.map +1 -1
  37. package/dist/esm/client/actions/signTypedData.d.ts +36 -3
  38. package/dist/esm/client/actions/signTypedData.js +4 -2
  39. package/dist/esm/client/actions/signTypedData.js.map +1 -1
  40. package/dist/esm/client/client.e2e-test.js +101 -13
  41. package/dist/esm/client/client.e2e-test.js.map +1 -1
  42. package/dist/esm/client/decorator.d.ts +14 -12
  43. package/dist/esm/client/decorator.js +10 -10
  44. package/dist/esm/client/decorator.js.map +1 -1
  45. package/dist/esm/client/index.d.ts +5 -5
  46. package/dist/esm/client/index.js +32 -6
  47. package/dist/esm/client/index.js.map +1 -1
  48. package/dist/esm/exports/index.d.ts +14 -13
  49. package/dist/esm/exports/index.js +14 -13
  50. package/dist/esm/exports/index.js.map +1 -1
  51. package/dist/esm/exports/internal.d.ts +13 -13
  52. package/dist/esm/exports/internal.js +11 -11
  53. package/dist/esm/exports/internal.js.map +1 -1
  54. package/dist/esm/internal/decorator.d.ts +2 -0
  55. package/dist/esm/internal/decorator.js +10 -0
  56. package/dist/esm/internal/decorator.js.map +1 -0
  57. package/dist/esm/isomorphic/actions/createSession.d.ts +3 -3
  58. package/dist/esm/isomorphic/actions/createSession.js +5 -5
  59. package/dist/esm/isomorphic/actions/createSession.js.map +1 -1
  60. package/dist/esm/isomorphic/actions/getCallsStatus.d.ts +2 -2
  61. package/dist/esm/isomorphic/actions/getCallsStatus.js +3 -3
  62. package/dist/esm/isomorphic/actions/getCallsStatus.js.map +1 -1
  63. package/dist/esm/isomorphic/actions/prepareCalls.d.ts +2 -2
  64. package/dist/esm/isomorphic/actions/prepareCalls.js +2 -2
  65. package/dist/esm/isomorphic/actions/prepareCalls.js.map +1 -1
  66. package/dist/esm/isomorphic/actions/sendPreparedCalls.d.ts +2 -2
  67. package/dist/esm/isomorphic/actions/sendPreparedCalls.js +2 -2
  68. package/dist/esm/isomorphic/actions/sendPreparedCalls.js.map +1 -1
  69. package/dist/esm/isomorphic/client.d.ts +6 -6
  70. package/dist/esm/isomorphic/client.js +4 -4
  71. package/dist/esm/isomorphic/client.js.map +1 -1
  72. package/dist/esm/isomorphic/utils/createAccount.d.ts +2 -2
  73. package/dist/esm/isomorphic/utils/createAccount.js +1 -1
  74. package/dist/esm/isomorphic/utils/createAccount.js.map +1 -1
  75. package/dist/esm/isomorphic/utils/parsePermissionsContext.d.ts +4 -4
  76. package/dist/esm/isomorphic/utils/parsePermissionsContext.js +1 -1
  77. package/dist/esm/isomorphic/utils/parsePermissionsContext.js.map +1 -1
  78. package/dist/esm/local/client.d.ts +1 -1
  79. package/dist/esm/local/client.js +12 -5
  80. package/dist/esm/local/client.js.map +1 -1
  81. package/dist/esm/remote/client.d.ts +1 -1
  82. package/dist/esm/remote/client.js +9 -4
  83. package/dist/esm/remote/client.js.map +1 -1
  84. package/dist/esm/rpc/request.js +3 -3
  85. package/dist/esm/rpc/request.js.map +1 -1
  86. package/dist/esm/rpc/schema.d.ts +1 -1
  87. package/dist/esm/rpc/schema.js +1 -1
  88. package/dist/esm/rpc/schema.js.map +1 -1
  89. package/dist/esm/types.d.ts +15 -4
  90. package/dist/esm/types.js.map +1 -1
  91. package/dist/types/abi/index.d.ts +8 -8
  92. package/dist/types/abi/index.d.ts.map +1 -1
  93. package/dist/types/capabilities/permissions/mav2.d.ts +2 -2
  94. package/dist/types/capabilities/permissions/mav2.d.ts.map +1 -1
  95. package/dist/types/client/actions/createAccount.d.ts +27 -2
  96. package/dist/types/client/actions/createAccount.d.ts.map +1 -1
  97. package/dist/types/client/actions/getCallsStatus.d.ts +21 -2
  98. package/dist/types/client/actions/getCallsStatus.d.ts.map +1 -1
  99. package/dist/types/client/actions/grantPermissions.d.ts +60 -2
  100. package/dist/types/client/actions/grantPermissions.d.ts.map +1 -1
  101. package/dist/types/client/actions/listAccounts.d.ts +26 -2
  102. package/dist/types/client/actions/listAccounts.d.ts.map +1 -1
  103. package/dist/types/client/actions/prepareCalls.d.ts +28 -2
  104. package/dist/types/client/actions/prepareCalls.d.ts.map +1 -1
  105. package/dist/types/client/actions/requestAccount.d.ts +23 -4
  106. package/dist/types/client/actions/requestAccount.d.ts.map +1 -1
  107. package/dist/types/client/actions/sendPreparedCalls.d.ts +39 -2
  108. package/dist/types/client/actions/sendPreparedCalls.d.ts.map +1 -1
  109. package/dist/types/client/actions/signMessage.d.ts +23 -3
  110. package/dist/types/client/actions/signMessage.d.ts.map +1 -1
  111. package/dist/types/client/actions/signSignatureRequest.d.ts +32 -1
  112. package/dist/types/client/actions/signSignatureRequest.d.ts.map +1 -1
  113. package/dist/types/client/actions/signTypedData.d.ts +36 -3
  114. package/dist/types/client/actions/signTypedData.d.ts.map +1 -1
  115. package/dist/types/client/decorator.d.ts +14 -12
  116. package/dist/types/client/decorator.d.ts.map +1 -1
  117. package/dist/types/client/index.d.ts +5 -5
  118. package/dist/types/client/index.d.ts.map +1 -1
  119. package/dist/types/exports/index.d.ts +14 -13
  120. package/dist/types/exports/index.d.ts.map +1 -1
  121. package/dist/types/exports/internal.d.ts +13 -13
  122. package/dist/types/exports/internal.d.ts.map +1 -1
  123. package/dist/types/internal/decorator.d.ts +3 -0
  124. package/dist/types/internal/decorator.d.ts.map +1 -0
  125. package/dist/types/isomorphic/actions/createSession.d.ts +3 -3
  126. package/dist/types/isomorphic/actions/createSession.d.ts.map +1 -1
  127. package/dist/types/isomorphic/actions/getCallsStatus.d.ts +2 -2
  128. package/dist/types/isomorphic/actions/getCallsStatus.d.ts.map +1 -1
  129. package/dist/types/isomorphic/actions/prepareCalls.d.ts +2 -2
  130. package/dist/types/isomorphic/actions/prepareCalls.d.ts.map +1 -1
  131. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts +2 -2
  132. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts.map +1 -1
  133. package/dist/types/isomorphic/client.d.ts +6 -6
  134. package/dist/types/isomorphic/client.d.ts.map +1 -1
  135. package/dist/types/isomorphic/utils/createAccount.d.ts +2 -2
  136. package/dist/types/isomorphic/utils/createAccount.d.ts.map +1 -1
  137. package/dist/types/isomorphic/utils/parsePermissionsContext.d.ts +4 -4
  138. package/dist/types/isomorphic/utils/parsePermissionsContext.d.ts.map +1 -1
  139. package/dist/types/local/client.d.ts +1 -1
  140. package/dist/types/local/client.d.ts.map +1 -1
  141. package/dist/types/remote/client.d.ts +1 -1
  142. package/dist/types/remote/client.d.ts.map +1 -1
  143. package/dist/types/rpc/schema.d.ts +1 -1
  144. package/dist/types/types.d.ts +15 -4
  145. package/dist/types/types.d.ts.map +1 -1
  146. package/package.json +14 -7
  147. package/src/abi/index.ts +8 -8
  148. package/src/capabilities/index.ts +3 -3
  149. package/src/capabilities/overrides.ts +1 -1
  150. package/src/capabilities/permissions/index.ts +1 -1
  151. package/src/capabilities/permissions/mav2.ts +3 -3
  152. package/src/client/actions/createAccount.ts +27 -2
  153. package/src/client/actions/getCallsStatus.ts +21 -2
  154. package/src/client/actions/grantPermissions.ts +60 -2
  155. package/src/client/actions/listAccounts.ts +26 -2
  156. package/src/client/actions/prepareCalls.ts +28 -2
  157. package/src/client/actions/requestAccount.ts +44 -9
  158. package/src/client/actions/sendPreparedCalls.ts +39 -2
  159. package/src/client/actions/signMessage.ts +26 -6
  160. package/src/client/actions/signSignatureRequest.ts +33 -2
  161. package/src/client/actions/signTypedData.ts +41 -5
  162. package/src/client/client.e2e-test.ts +122 -13
  163. package/src/client/decorator.ts +25 -27
  164. package/src/client/index.ts +47 -13
  165. package/src/exports/index.ts +14 -13
  166. package/src/exports/internal.ts +13 -13
  167. package/src/internal/decorator.ts +12 -0
  168. package/src/isomorphic/actions/createSession.ts +15 -15
  169. package/src/isomorphic/actions/getCallsStatus.ts +6 -6
  170. package/src/isomorphic/actions/prepareCalls.ts +4 -4
  171. package/src/isomorphic/actions/sendPreparedCalls.ts +4 -4
  172. package/src/isomorphic/client.ts +8 -5
  173. package/src/isomorphic/utils/createAccount.ts +3 -3
  174. package/src/isomorphic/utils/parsePermissionsContext.ts +3 -3
  175. package/src/local/client.ts +56 -46
  176. package/src/remote/client.ts +13 -8
  177. package/src/rpc/request.ts +3 -3
  178. package/src/rpc/schema.ts +1 -1
  179. package/src/types.ts +18 -4
@@ -1,7 +1,7 @@
1
1
  import { type Address, type Hex, type IsUndefined, type JsonRpcAccount } from "viem";
2
- import type { InnerWalletApiClient } from "../../types";
2
+ import type { InnerWalletApiClient } from "../../types.ts";
3
3
  import type { SmartAccountSigner } from "@aa-sdk/core";
4
- import type { CreateSessionParams } from "../../isomorphic/actions/createSession";
4
+ import type { CreateSessionParams } from "../../isomorphic/actions/createSession.ts";
5
5
  export type GrantPermissionsParams<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined> = Omit<CreateSessionParams, "account" | "chainId"> & (IsUndefined<TAccount> extends true ? {
6
6
  account: Address;
7
7
  } : {
@@ -10,5 +10,63 @@ export type GrantPermissionsParams<TAccount extends JsonRpcAccount<Address> | un
10
10
  export type GrantPermissionsResult = {
11
11
  context: Hex;
12
12
  };
13
+ /**
14
+ * Grants permissions to a smart account by creating a session.
15
+ * This allows another key to perform operations on behalf of the account.
16
+ *
17
+ * @param {InnerWalletApiClient} client - The wallet API client to use for the request
18
+ * @param {SmartAccountSigner} signer - The signer of the smart account
19
+ * @param {GrantPermissionsParams} params - The parameters for granting permissions
20
+ * @param {Address} [params.account] - The account address (required if client was not initialized with an account)
21
+ * @param {number} params.expiry - Unix timestamp when the permissions expire
22
+ * @param {object} params.key - The session key information
23
+ * @param {string} params.key.publicKey - The public key of the session key
24
+ * @param {string} params.key.type - The type of the key (e.g., "secp256k1")
25
+ * @param {Array} params.permissions - Array of permission objects defining what the session key can do
26
+ * @returns {Promise<GrantPermissionsResult>} A Promise that resolves to the result containing a context identifier
27
+ * @returns {Hex} result.context - A hex identifier for the granted permissions context
28
+ *
29
+ * @example
30
+ * // Create a session key and grant root permissions
31
+ * const sessionKey = LocalAccountSigner.generatePrivateKeySigner();
32
+ * const account = await client.requestAccount();
33
+ *
34
+ * const permissions = await client.grantPermissions({
35
+ * account: account.address,
36
+ * expiry: Math.floor(Date.now() / 1000) + 60 * 60, // 1 hour from now
37
+ * key: {
38
+ * publicKey: await sessionKey.getAddress(),
39
+ * type: "secp256k1",
40
+ * },
41
+ * permissions: [{ type: "root" }],
42
+ * });
43
+ *
44
+ * // Use the permissions to prepare a call
45
+ * const preparedUO = await client.prepareCalls({
46
+ * calls: [{ to: zeroAddress, value: "0x0" }],
47
+ * from: account.address,
48
+ * capabilities: {
49
+ * paymasterService: {
50
+ * policyId: "your-paymaster-policy-id",
51
+ * },
52
+ * permissions,
53
+ * },
54
+ * });
55
+ *
56
+ * // Sign with the session key
57
+ * const signature = await signSignatureRequest(
58
+ * sessionKey,
59
+ * preparedUO.signatureRequest,
60
+ * );
61
+ *
62
+ * // Send the prepared call using the session key
63
+ * const result = await client.sendPreparedCalls({
64
+ * ...preparedUO,
65
+ * signature,
66
+ * capabilities: {
67
+ * permissions,
68
+ * },
69
+ * });
70
+ */
13
71
  export declare function grantPermissions<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined>(client: InnerWalletApiClient<TAccount>, signer: SmartAccountSigner, params: GrantPermissionsParams<TAccount>): Promise<GrantPermissionsResult>;
14
72
  //# sourceMappingURL=grantPermissions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"grantPermissions.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/grantPermissions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,WAAW,EAChB,KAAK,cAAc,EAEpB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,oBAAoB,EAAE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AS,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,GAChD,cAAc,CAAC,OAAO,CAAC,GACvB,SAAS,IACX,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,SAAS,CAAC,GAClD,CAAC,WAAW,CAAC,QAAQ,CAAC,SAAS,IAAI,GAC/B;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GACpB;IAAE,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC;AAE3B,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,GAAG,CAAC;CACd,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,SAAS,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,GAChD,cAAc,CAAC,OAAO,CAAC,GACvB,SAAS,EAEb,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EACtC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,GACvC,OAAO,CAAC,sBAAsB,CAAC,CAAC"}
@@ -1,7 +1,31 @@
1
1
  import type { Static } from "@sinclair/typebox";
2
- import type { wallet_listAccounts } from "../../rpc/request";
3
- import type { InnerWalletApiClient } from "../../types";
2
+ import type { wallet_listAccounts } from "../../rpc/request.ts";
3
+ import type { InnerWalletApiClient } from "../../types.ts";
4
4
  export type ListAccountsParams = Static<typeof wallet_listAccounts>["Request"]["params"][0];
5
5
  export type ListAccountsResult = Static<typeof wallet_listAccounts>["ReturnType"];
6
+ /**
7
+ * Lists all smart accounts for a given signer using the wallet API client.
8
+ *
9
+ * @param {InnerWalletApiClient} client - The wallet API client to use for the request
10
+ * @param {ListAccountsParams} params - Parameters for listing accounts
11
+ * @param {string} params.signerAddress - The address of the signer to list accounts for
12
+ * @param {number} [params.limit] - Optional maximum number of accounts to return (default: 100, max: 100)
13
+ * @param {string} [params.after] - Optional pagination cursor for fetching subsequent pages
14
+ * @returns {Promise<ListAccountsResult>} A Promise that resolves to the list of accounts and pagination metadata
15
+ *
16
+ * @example
17
+ * // Fetch the first page of accounts
18
+ * const firstPage = await client.listAccounts({
19
+ * signerAddress: "0x123...",
20
+ * limit: 10
21
+ * });
22
+ *
23
+ * // If an 'after' cursor exists, use it to fetch the next page
24
+ * const nextPage = await client.listAccounts({
25
+ * signerAddress: "0x123...",
26
+ * limit: 10,
27
+ * after: firstPage.meta.after
28
+ * });
29
+ */
6
30
  export declare function listAccounts(client: InnerWalletApiClient, params: ListAccountsParams): Promise<ListAccountsResult>;
7
31
  //# sourceMappingURL=listAccounts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"listAccounts.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/listAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,kBAAkB,GAAG,MAAM,CACrC,OAAO,mBAAmB,CAC3B,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1B,MAAM,MAAM,kBAAkB,GAAG,MAAM,CACrC,OAAO,mBAAmB,CAC3B,CAAC,YAAY,CAAC,CAAC;AAEhB,wBAAsB,YAAY,CAChC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CAE7B"}
1
+ {"version":3,"file":"listAccounts.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/listAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,MAAM,kBAAkB,GAAG,MAAM,CACrC,OAAO,mBAAmB,CAC3B,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1B,MAAM,MAAM,kBAAkB,GAAG,MAAM,CACrC,OAAO,mBAAmB,CAC3B,CAAC,YAAY,CAAC,CAAC;AAEhB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,kBAAkB,CAAC,CAE7B"}
@@ -1,6 +1,6 @@
1
1
  import { type Address, type IsUndefined, type JsonRpcAccount } from "viem";
2
- import type { PrepareCallsParams as IsomorphicPrepareCallsParams, PrepareCallsResult as IsomorphicPrepareCallsResult } from "../../isomorphic/actions/prepareCalls";
3
- import type { InnerWalletApiClient } from "../../types";
2
+ import type { PrepareCallsParams as IsomorphicPrepareCallsParams, PrepareCallsResult as IsomorphicPrepareCallsResult } from "../../isomorphic/actions/prepareCalls.ts";
3
+ import type { InnerWalletApiClient } from "../../types.ts";
4
4
  export type GetAccountParam<TAccount> = IsUndefined<TAccount> extends true ? {
5
5
  account: Address;
6
6
  } : {
@@ -12,5 +12,31 @@ export type PrepareCallsParams<TAccount extends JsonRpcAccount<Address> | undefi
12
12
  from?: never;
13
13
  });
14
14
  export type PrepareCallsResult = IsomorphicPrepareCallsResult;
15
+ /**
16
+ * Prepares a set of contract calls for execution by building a user operation.
17
+ * Returns the built user operation and a signature request that needs to be signed
18
+ * before submitting to sendPreparedCalls.
19
+ *
20
+ * @param {InnerWalletApiClient<TAccount>} client - The wallet API client to use for the request
21
+ * @param {PrepareCallsParams<TAccount>} params - Parameters for preparing calls
22
+ * @param {Array<{to: Address, data?: Hex, value?: Hex}>} params.calls - Array of contract calls to execute
23
+ * @param {Address} [params.from] - The address to execute the calls from (required if the client wasn't initialized with an account)
24
+ * @param {object} [params.capabilities] - Optional capabilities to include with the request
25
+ * @returns {Promise<PrepareCallsResult>} A Promise that resolves to the prepared calls result containing
26
+ * the user operation data and signature request
27
+ *
28
+ * @example
29
+ * // Prepare a sponosored user operation call
30
+ * const result = await client.prepareCalls({
31
+ * calls: [{
32
+ * to: "0x1234...",
33
+ * data: "0xabcdef...",
34
+ * value: "0x0"
35
+ * }],
36
+ * capabilities: {
37
+ * paymasterService: { policyId: "your-policy-id" }
38
+ * }
39
+ * });
40
+ */
15
41
  export declare function prepareCalls<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined>(client: InnerWalletApiClient<TAccount>, params: PrepareCallsParams<TAccount>): Promise<PrepareCallsResult>;
16
42
  //# sourceMappingURL=prepareCalls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prepareCalls.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/prepareCalls.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EACV,kBAAkB,IAAI,4BAA4B,EAClD,kBAAkB,IAAI,4BAA4B,EACnD,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,eAAe,CAAC,QAAQ,IAClC,WAAW,CAAC,QAAQ,CAAC,SAAS,IAAI,GAC9B;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GACpB;IAAE,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAE1B,MAAM,MAAM,kBAAkB,CAC5B,QAAQ,SAAS,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,GAChD,cAAc,CAAC,OAAO,CAAC,GACvB,SAAS,IACX,IAAI,CAAC,4BAA4B,EAAE,MAAM,GAAG,SAAS,CAAC,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;CAAE,GAAG;IAAE,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC;AAE9E,MAAM,MAAM,kBAAkB,GAAG,4BAA4B,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,YAAY,CAChC,QAAQ,SAAS,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,GAChD,cAAc,CAAC,OAAO,CAAC,GACvB,SAAS,EAEb,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EACtC,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GACnC,OAAO,CAAC,kBAAkB,CAAC,CAAC"}
@@ -1,12 +1,31 @@
1
- import type { SmartAccountSigner, SmartContractAccount } from "@aa-sdk/core";
1
+ import { type SmartAccountSigner, type SmartContractAccount } from "@aa-sdk/core";
2
2
  import type { Static } from "@sinclair/typebox";
3
3
  import type { Address } from "abitype";
4
4
  import { type IsUndefined, type JsonRpcAccount } from "viem";
5
- import type { wallet_requestAccount } from "../../rpc/request";
6
- import type { InnerWalletApiClient } from "../../types";
5
+ import type { wallet_requestAccount } from "../../rpc/request.js";
6
+ import type { InnerWalletApiClient } from "../../types.js";
7
7
  export type RequestAccountParams<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined> = IsUndefined<TAccount> extends true ? Omit<Extract<Static<typeof wallet_requestAccount>["Request"]["params"][0], {
8
8
  signerAddress: Address;
9
- }>, "signerAddress" | "includeCounterfactualInfo"> : never;
9
+ }>, "signerAddress" | "includeCounterfactualInfo"> & {
10
+ accountAddress?: Address;
11
+ } : never;
10
12
  export type RequestAccountResult = SmartContractAccount;
13
+ /**
14
+ * Requests an account for the provided signer using the wallet API client.
15
+ * If an account already exists for the signer, it will always return that account unless a new ID is specified.
16
+ * If an account already exists, the creationHint will be ignored.
17
+ *
18
+ * @param {InnerWalletApiClient} client - The wallet API client to use for the request
19
+ * @param {SmartAccountSigner} signer - The signer that will be associated with the account
20
+ * @param {RequestAccountParams} [params] - Optional parameters for requesting a specific account
21
+ * @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
22
+ * @param {object} [params.creationHint] - Optional hints to guide account creation. These are ignored if an account already exists
23
+ * @returns {Promise<RequestAccountResult>} A Promise that resolves to a SmartContractAccount instance
24
+ *
25
+ * @example
26
+ * // Request an account with default parameters using a local signer
27
+ * const signer = LocalAccountSigner.privateKeyToAccountSigner("0x...");
28
+ * const account = await client.requestAccount(signer);
29
+ */
11
30
  export declare function requestAccount<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined>(client: InnerWalletApiClient<TAccount>, signer: SmartAccountSigner, params?: RequestAccountParams<TAccount>): Promise<RequestAccountResult>;
12
31
  //# sourceMappingURL=requestAccount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"requestAccount.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/requestAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAU,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,MAAM,CAAC;AAErE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,oBAAoB,CAC9B,QAAQ,SAAS,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,GAChD,cAAc,CAAC,OAAO,CAAC,GACvB,SAAS,IAEb,WAAW,CAAC,QAAQ,CAAC,SAAS,IAAI,GAC9B,IAAI,CACF,OAAO,CACL,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC,QAA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AAE,OAAO,CAAA;CAAE,CAC3B,EACD,eAAe,GAAG,2BAA2B,CAC9C,GAAG;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAE,GAChC,KAAK,CAAC;AAGZ,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAExD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,SAAS,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,GAChD,cAAc,CAAC,OAAO,CAAC,GACvB,SAAS,EAEb,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EACtC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,CAAC,EAAE,oBAAoB,CAAC,QAAQ,CAAC,GACtC,OAAO,CAAC,oBAAoB,CAAC,CAAC"}
@@ -1,7 +1,44 @@
1
1
  import type { Static, StaticDecode } from "@sinclair/typebox";
2
- import type { wallet_sendPreparedCalls } from "../../rpc/request";
3
- import type { InnerWalletApiClient } from "../../types";
2
+ import type { wallet_sendPreparedCalls } from "../../rpc/request.ts";
3
+ import type { InnerWalletApiClient } from "../../types.ts";
4
4
  export type SendPreparedCallsParams = Omit<StaticDecode<typeof wallet_sendPreparedCalls>["Request"]["params"][0], "chainId">;
5
5
  export type SendPreparedCallsResult = Static<typeof wallet_sendPreparedCalls>["ReturnType"];
6
+ /**
7
+ * Sends prepared calls by submitting a signed user operation.
8
+ * This method is used after signing the signature request returned from prepareCalls.
9
+ *
10
+ * @param {InnerWalletApiClient} client - The wallet API client to use for the request
11
+ * @param {SendPreparedCallsParams} params - Parameters for sending prepared calls
12
+ * @param {string} params.type - The user operation type ('user-operation-v060' or 'user-operation-v070')
13
+ * @param {object} params.data - The user operation data without signature
14
+ * @param {string} params.chainId - The chain ID in hex format
15
+ * @param {object} params.signature - The signature object
16
+ * @param {string} params.signature.type - The signature type (must be 'ecdsa')
17
+ * @param {string} params.signature.signature - The hex-encoded signature value
18
+ * @param {object} [params.capabilities] - Optional capabilities to include with the request
19
+ * @returns {Promise<SendPreparedCallsResult>} A Promise that resolves to the result containing the prepared call IDs
20
+ *
21
+ * @example
22
+ * // First prepare the calls
23
+ * const preparedCalls = await client.prepareCalls({
24
+ * calls: [{
25
+ * to: "0x1234...",
26
+ * data: "0xabcdef...",
27
+ * value: "0x0"
28
+ * }],
29
+ * capabilities: {
30
+ * paymasterService: { policyId: "your-policy-id" }
31
+ * }
32
+ * });
33
+ *
34
+ * // Sign the signature request using signSignatureRequest with your signer
35
+ * const signedRequest = await client.signSignatureRequest(preparedCalls.signatureRequest);
36
+ *
37
+ * // Then send the prepared calls with the signature
38
+ * const result = await client.sendPreparedCalls({
39
+ * ...preparedCalls,
40
+ * signature: signedRequest.signature,
41
+ * });
42
+ */
6
43
  export declare function sendPreparedCalls(client: InnerWalletApiClient, params: SendPreparedCallsParams): Promise<SendPreparedCallsResult>;
7
44
  //# sourceMappingURL=sendPreparedCalls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sendPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/sendPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,YAAY,CAAC,OAAO,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EACrE,SAAS,CACV,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,OAAO,wBAAwB,CAChC,CAAC,YAAY,CAAC,CAAC;AAEhB,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,CAKlC"}
1
+ {"version":3,"file":"sendPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/sendPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,YAAY,CAAC,OAAO,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EACrE,SAAS,CACV,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,OAAO,wBAAwB,CAChC,CAAC,YAAY,CAAC,CAAC;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,CAKlC"}
@@ -1,7 +1,27 @@
1
- import { type Address, type Hex, type JsonRpcAccount, type SignableMessage } from "viem";
2
- import type { InnerWalletApiClient } from "../../types";
3
1
  import type { SmartAccountSigner } from "@aa-sdk/core";
4
- export type SignMessageParams = SignableMessage;
2
+ import { type Address, type Hex, type JsonRpcAccount, type SignableMessage } from "viem";
3
+ import type { InnerWalletApiClient } from "../../types.ts";
4
+ export type SignMessageParams = {
5
+ message: SignableMessage;
6
+ account?: Address;
7
+ };
5
8
  export type SignMessageResult = Hex;
9
+ /**
10
+ * Signs a message using the smart account.
11
+ * This method requests the account associated with the signer and uses it to sign the message.
12
+ *
13
+ * @param {InnerWalletApiClient} client - The wallet API client to use for the request
14
+ * @param {SmartAccountSigner} signer - The signer of the smart account
15
+ * @param {SignableMessage} message - The message to sign
16
+ * @returns {Promise<SignMessageResult>} A Promise that resolves to the signed message as a hex string
17
+ *
18
+ * @example
19
+ * // Sign a simple text message
20
+ * const signature = await client.signMessage("Hello, world!");
21
+ *
22
+ * @example
23
+ * // Sign a raw hex message
24
+ * const signature = await client.signMessage({ raw: "0x48656c6c6f2c20776f726c6421" });
25
+ */
6
26
  export declare function signMessage<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined>(client: InnerWalletApiClient<TAccount>, signer: SmartAccountSigner, params: SignMessageParams): Promise<SignMessageResult>;
7
27
  //# sourceMappingURL=signMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signMessage.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGvD,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAEpC,wBAAsB,WAAW,CAC/B,QAAQ,SAAS,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,GAChD,cAAc,CAAC,OAAO,CAAC,GACvB,SAAS,EAEb,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EACtC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"signMessage.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D,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;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,WAAW,CAC/B,QAAQ,SAAS,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,GAChD,cAAc,CAAC,OAAO,CAAC,GACvB,SAAS,EAEb,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EACtC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAAC"}
@@ -1,11 +1,42 @@
1
1
  import type { SmartAccountSigner } from "@aa-sdk/core";
2
2
  import type { Static } from "@sinclair/typebox";
3
3
  import { type Hex } from "viem";
4
- import { TypeSignatureRequest } from "../../schemas";
4
+ import { TypeSignatureRequest } from "../../schemas.js";
5
5
  export type SignSignatureRequestParams = Static<typeof TypeSignatureRequest>;
6
6
  export type SignSignatureRequestResult = {
7
7
  type: "ecdsa";
8
8
  signature: Hex;
9
9
  };
10
+ /**
11
+ * Signs a signature request using the provided signer.
12
+ * This method handles different types of signature requests including personal_sign and eth_signTypedData_v4.
13
+ *
14
+ * @param {SmartAccountSigner} signer - The signer to use for signing the request
15
+ * @param {SignSignatureRequestParams} params - The signature request parameters
16
+ * @param {string} params.type - The type of signature request ('personal_sign' or 'eth_signTypedData_v4')
17
+ * @param {any} params.data - The data to sign, format depends on the signature type
18
+ * @returns {Promise<SignSignatureRequestResult>} A Promise that resolves to the signature result
19
+ * @returns {string} result.type - The signature type (currently only 'ecdsa' is supported)
20
+ * @returns {Hex} result.signature - The hex-encoded signature
21
+ *
22
+ * @example
23
+ * // Sign a personal message
24
+ * const result = await client.signSignatureRequest({
25
+ * type: 'personal_sign',
26
+ * data: 'Hello, world!'
27
+ * });
28
+ *
29
+ * @example
30
+ * // Sign typed data (EIP-712)
31
+ * const result = await client.signSignatureRequest({
32
+ * type: 'eth_signTypedData_v4',
33
+ * data: {
34
+ * domain: { ... },
35
+ * types: { ... },
36
+ * primaryType: '...',
37
+ * message: { ... }
38
+ * }
39
+ * });
40
+ */
10
41
  export declare function signSignatureRequest(signer: SmartAccountSigner, params: SignSignatureRequestParams): Promise<SignSignatureRequestResult>;
11
42
  //# sourceMappingURL=signSignatureRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signSignatureRequest.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signSignatureRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAGrD,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE7E,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"signSignatureRequest.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signSignatureRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGxD,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE7E,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,CAAC,CAAC"}
@@ -1,7 +1,40 @@
1
- import { type Address, type Hex, type JsonRpcAccount, type TypedDataDefinition } from "viem";
2
- import type { InnerWalletApiClient } from "../../types";
3
1
  import type { SmartAccountSigner } from "@aa-sdk/core";
4
- export type SignTypedDataParams = TypedDataDefinition;
2
+ import { type Address, type Hex, type JsonRpcAccount, type TypedDataDefinition } from "viem";
3
+ import type { InnerWalletApiClient } from "../../types.ts";
4
+ export type SignTypedDataParams = TypedDataDefinition & {
5
+ account?: Address;
6
+ };
5
7
  export type SignTypedDataResult = Hex;
8
+ /**
9
+ * Signs typed data (EIP-712) using the smart account.
10
+ * This method requests the account associated with the signer and uses it to sign the typed data.
11
+ *
12
+ * @param {InnerWalletApiClient} client - The wallet API client to use for the request
13
+ * @param {SmartAccountSigner} signer - The signer of the smart account
14
+ * @param {TypedDataDefinition} params - The typed data to sign, following EIP-712 format
15
+ * @returns {Promise<SignTypedDataResult>} A Promise that resolves to the signature as a hex string
16
+ *
17
+ * @example
18
+ * // Sign typed data
19
+ * const signature = await client.signTypedData({
20
+ * domain: {
21
+ * name: 'Example DApp',
22
+ * version: '1',
23
+ * chainId: 1,
24
+ * verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC'
25
+ * },
26
+ * types: {
27
+ * Person: [
28
+ * { name: 'name', type: 'string' },
29
+ * { name: 'wallet', type: 'address' }
30
+ * ]
31
+ * },
32
+ * primaryType: 'Person',
33
+ * message: {
34
+ * name: 'John Doe',
35
+ * wallet: '0xAaAaAaAaAaAaAaAaAaAAAAAAAAaaaAaAaAaaAaAa'
36
+ * }
37
+ * });
38
+ */
6
39
  export declare function signTypedData<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined>(client: InnerWalletApiClient<TAccount>, signer: SmartAccountSigner, params: SignTypedDataParams): Promise<SignTypedDataResult>;
7
40
  //# sourceMappingURL=signTypedData.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signTypedData.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACzB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGvD,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEtC,wBAAsB,aAAa,CACjC,QAAQ,SAAS,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,GAChD,cAAc,CAAC,OAAO,CAAC,GACvB,SAAS,EAEb,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EACtC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"signTypedData.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,GAAG,EACR,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACzB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAG3D,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,aAAa,CACjC,QAAQ,SAAS,cAAc,CAAC,OAAO,CAAC,GAAG,SAAS,GAChD,cAAc,CAAC,OAAO,CAAC,GACvB,SAAS,EAEb,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EACtC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CAAC"}
@@ -1,14 +1,16 @@
1
1
  import type { SmartAccountSigner } from "@aa-sdk/core";
2
- import type { Hex, JsonRpcAccount, SignableMessage, TypedDataDefinition } from "viem";
3
- import type { SendPreparedCallsParams, SendPreparedCallsResult } from "../isomorphic/actions/sendPreparedCalls";
4
- import type { InnerWalletApiClient } from "../types";
5
- import { type CreateAccountParams, type CreateAccountResult } from "./actions/createAccount";
6
- import { type ListAccountsParams, type ListAccountsResult } from "./actions/listAccounts";
7
- import { type PrepareCallsParams, type PrepareCallsResult } from "./actions/prepareCalls";
8
- import { type RequestAccountParams, type RequestAccountResult } from "./actions/requestAccount";
9
- import { type GetCallsStatusParams, type GetCallsStatusResult } from "./actions/getCallsStatus";
10
- import { type SignSignatureRequestParams, type SignSignatureRequestResult } from "./actions/signSignatureRequest";
11
- import { type GrantPermissionsParams, type GrantPermissionsResult } from "./actions/grantPermissions";
2
+ import type { Hex, JsonRpcAccount } from "viem";
3
+ import type { SendPreparedCallsParams, SendPreparedCallsResult } from "../isomorphic/actions/sendPreparedCalls.ts";
4
+ import type { InnerWalletApiClient } from "../types.ts";
5
+ import { type CreateAccountParams, type CreateAccountResult } from "./actions/createAccount.js";
6
+ import { type GetCallsStatusParams, type GetCallsStatusResult } from "./actions/getCallsStatus.js";
7
+ import { type GrantPermissionsParams, type GrantPermissionsResult } from "./actions/grantPermissions.js";
8
+ import { type ListAccountsParams, type ListAccountsResult } from "./actions/listAccounts.js";
9
+ import { type PrepareCallsParams, type PrepareCallsResult } from "./actions/prepareCalls.js";
10
+ import { type RequestAccountParams, type RequestAccountResult } from "./actions/requestAccount.js";
11
+ import { type SignMessageParams } from "./actions/signMessage.js";
12
+ import { type SignSignatureRequestParams, type SignSignatureRequestResult } from "./actions/signSignatureRequest.js";
13
+ import { type SignTypedDataParams } from "./actions/signTypedData.js";
12
14
  export type SmartWalletActions<TAccount extends JsonRpcAccount | undefined = JsonRpcAccount | undefined> = {
13
15
  requestAccount: (params?: RequestAccountParams<TAccount>) => Promise<RequestAccountResult>;
14
16
  prepareCalls: (params: PrepareCallsParams<TAccount>) => Promise<PrepareCallsResult>;
@@ -17,8 +19,8 @@ export type SmartWalletActions<TAccount extends JsonRpcAccount | undefined = Jso
17
19
  listAccounts: (params: ListAccountsParams) => Promise<ListAccountsResult>;
18
20
  getCallsStatus: (params: GetCallsStatusParams) => Promise<GetCallsStatusResult>;
19
21
  signSignatureRequest: (params: SignSignatureRequestParams) => Promise<SignSignatureRequestResult>;
20
- signMessage: (params: SignableMessage) => Promise<Hex>;
21
- signTypedData: (params: TypedDataDefinition) => Promise<Hex>;
22
+ signMessage: (params: SignMessageParams) => Promise<Hex>;
23
+ signTypedData: (params: SignTypedDataParams) => Promise<Hex>;
22
24
  grantPermissions: (params: GrantPermissionsParams<TAccount>) => Promise<GrantPermissionsResult>;
23
25
  };
24
26
  export declare function smartWalletClientActions<TAccount extends JsonRpcAccount | undefined = JsonRpcAccount | undefined>(client: InnerWalletApiClient<TAccount>, signer: SmartAccountSigner): SmartWalletActions<TAccount>;
@@ -1 +1 @@
1
- {"version":3,"file":"decorator.d.ts","sourceRoot":"","sources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AAC,oBAAoB,CAAC,CAAC;IACnC,oBAAoB,EAAE,CACpB,MAAM,EAAE,0BAA0B,KAC/B,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACzC,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,cAAc,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,EAExE,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,EACtC,MAAM,EAAE,kBAAkB,GACzB,kBAAkB,CAAC,QAAQ,CAAC,CAAC"}
@@ -1,8 +1,8 @@
1
- import { type SmartAccountSigner } from "@aa-sdk/core";
2
- import { type AlchemyTransport } from "@account-kit/infra";
3
- import { type Address, type Chain, type IsUndefined, type JsonRpcAccount, type Prettify } from "viem";
4
- import type { InnerWalletApiClient } from "../types";
5
- import { type SmartWalletActions } from "./decorator";
1
+ import type { SmartAccountSigner } from "@aa-sdk/core";
2
+ import type { Address, Chain, IsUndefined, JsonRpcAccount, Prettify } from "viem";
3
+ import type { InnerWalletApiClient } from "../types.ts";
4
+ import { type SmartWalletActions } from "./decorator.js";
5
+ import type { AlchemyTransport } from "@account-kit/infra";
6
6
  export type SmartWalletClientParams<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined> = Prettify<{
7
7
  transport: AlchemyTransport;
8
8
  chain: Chain;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACv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B,CAAC,QAAQ,CAAC,GACxC,oBAAoB,CAAC,QAAQ,CAAC,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC"}
@@ -1,14 +1,15 @@
1
- export { createSmartWalletClient, type SmartWalletClientParams, } from "../client";
2
- export { WalletServerRpcSchema, type WalletServerRpcSchemaType, type WalletServerViemRpcSchema, } from "../rpc/schema";
3
- export { Capabilities } from "../capabilities";
4
- export { PaymasterCapability } from "../capabilities/paymaster";
5
- export { PermissionsArray, PermissionsCapability, PermissionsContext, PermissionsData, } from "../capabilities/permissions";
6
- export { createAccount } from "../client/actions/createAccount";
7
- export { listAccounts } from "../client/actions/listAccounts";
8
- export { prepareCalls } from "../client/actions/prepareCalls";
9
- export { requestAccount } from "../client/actions/requestAccount";
10
- export { getCallsStatus } from "../client/actions/getCallsStatus";
11
- export { signSignatureRequest } from "../client/actions/signSignatureRequest";
12
- export { signMessage } from "../client/actions/signMessage";
13
- export { signTypedData } from "../client/actions/signTypedData";
1
+ export { createSmartWalletClient, type SmartWalletClientParams, } from "../client/index.js";
2
+ export { WalletServerRpcSchema, type WalletServerRpcSchemaType, type WalletServerViemRpcSchema, } from "../rpc/schema.js";
3
+ export { Capabilities } from "../capabilities/index.js";
4
+ export { PaymasterCapability } from "../capabilities/paymaster.js";
5
+ export { PermissionsArray, PermissionsCapability, PermissionsContext, PermissionsData, } from "../capabilities/permissions/index.js";
6
+ export { createAccount } from "../client/actions/createAccount.js";
7
+ export { getCallsStatus } from "../client/actions/getCallsStatus.js";
8
+ export { listAccounts } from "../client/actions/listAccounts.js";
9
+ export { prepareCalls } from "../client/actions/prepareCalls.js";
10
+ export { requestAccount } from "../client/actions/requestAccount.js";
11
+ export { signMessage } from "../client/actions/signMessage.js";
12
+ export { signSignatureRequest } from "../client/actions/signSignatureRequest.js";
13
+ export { signTypedData } from "../client/actions/signTypedData.js";
14
+ export { grantPermissions } from "../client/actions/grantPermissions.js";
14
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exports/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,KAAK,uBAAuB,GAC7B,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,qBAAqB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,GAC/B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,GAChB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exports/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,KAAK,uBAAuB,GAC7B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,qBAAqB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,GAC/B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,GAChB,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC"}
@@ -1,14 +1,14 @@
1
- export * from "../capabilities";
2
- export * from "../capabilities/paymaster";
3
- export * from "../capabilities/permissions";
4
- export * from "../capabilities/permissions/mav2";
5
- export type * from "../isomorphic/client";
6
- export { createIsomorphicClient } from "../isomorphic/client";
7
- export { createDummySigner } from "../isomorphic/utils/createDummySigner";
8
- export * from "../rpc/request";
9
- export * as RpcSchemas from "../rpc/request";
10
- export * from "../rpc/schema";
11
- export * from "../schemas";
12
- export type * from "../types";
13
- export * from "../utils";
1
+ export * from "../capabilities/index.js";
2
+ export * from "../capabilities/paymaster.js";
3
+ export * from "../capabilities/permissions/index.js";
4
+ export * from "../capabilities/permissions/mav2.js";
5
+ export type * from "../isomorphic/client.js";
6
+ export { createIsomorphicClient } from "../isomorphic/client.js";
7
+ export { createDummySigner } from "../isomorphic/utils/createDummySigner.js";
8
+ export * from "../rpc/request.js";
9
+ export * as RpcSchemas from "../rpc/request.js";
10
+ export * from "../rpc/schema.js";
11
+ export * from "../schemas.js";
12
+ export type * from "../types.ts";
13
+ export * from "../utils.js";
14
14
  //# sourceMappingURL=internal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/exports/internal.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,mBAAmB,sBAAsB,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,cAAc,gBAAgB,CAAC;AAC/B,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAC7C,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,mBAAmB,UAAU,CAAC;AAC9B,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/exports/internal.ts"],"names":[],"mappings":"AAGA,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,mBAAmB,yBAAyB,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAC7E,cAAc,mBAAmB,CAAC;AAClC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,mBAAmB,aAAa,CAAC;AACjC,cAAc,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { InternalState } from "../types.ts";
2
+ export declare function internalStateDecorator(): InternalState;
3
+ //# sourceMappingURL=decorator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../../../src/internal/decorator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,aAAa,EAAE,MAAM,aAAa,CAAC;AAEhE,wBAAgB,sBAAsB,IAAI,aAAa,CAStD"}
@@ -1,8 +1,8 @@
1
1
  import { type SmartAccountClient, type SmartContractAccount } from "@aa-sdk/core";
2
- import { type Chain, type Transport, type Hex } from "viem";
3
- import type { wallet_createSession } from "../../rpc/request";
4
- import type { WalletServerViemRpcSchema } from "../../rpc/schema";
5
2
  import type { Static } from "@sinclair/typebox";
3
+ import { type Chain, type Hex, type Transport } from "viem";
4
+ import type { wallet_createSession } from "../../rpc/request.js";
5
+ import type { WalletServerViemRpcSchema } from "../../rpc/schema.js";
6
6
  export type CreateSessionParams = Omit<Static<(typeof wallet_createSession)["properties"]["Request"]["properties"]["params"]>[0], "chainId"> & {
7
7
  entityId?: Hex;
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"createSession.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/createSession.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,KAAK,KAAK,EACV,KAAK,SAAS,EAGd,KAAK,GAAG,EAET,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAWhD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,MAAM,CACJ,CAAC,OAAO,oBAAoB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CAC/E,CAAC,CAAC,CAAC,EACJ,SAAS,CACV,GAAG;IACF,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,MAAM,CAAC,CAAC,OAAO,oBAAoB,CAAC,CAA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