@polyester/sdk 0.24.1 → 0.25.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 (170) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +18 -12
  3. package/dist/account-signer/create-polyester-account-signer.d.ts +9 -5
  4. package/dist/account-signer/create-polyester-account-signer.d.ts.map +1 -1
  5. package/dist/account-signer/create-polyester-account-signer.js +9 -5
  6. package/dist/account-signer/create-polyester-account-signer.js.map +1 -1
  7. package/dist/account-signer/types.d.ts +9 -3
  8. package/dist/account-signer/types.d.ts.map +1 -1
  9. package/dist/account-signer/types.js.map +1 -1
  10. package/dist/core-client.d.ts +3 -0
  11. package/dist/core-client.d.ts.map +1 -1
  12. package/dist/core-client.js +5 -0
  13. package/dist/core-client.js.map +1 -1
  14. package/dist/gen/auth/v1/auth_pb.d.ts +7 -4
  15. package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
  16. package/dist/gen/auth/v1/auth_pb.js.map +1 -1
  17. package/dist/gen/claims/v1/claims_pb.d.ts +313 -0
  18. package/dist/gen/claims/v1/claims_pb.d.ts.map +1 -0
  19. package/dist/gen/claims/v1/claims_pb.js +135 -0
  20. package/dist/gen/claims/v1/claims_pb.js.map +1 -0
  21. package/dist/gen/index.d.ts +2 -1
  22. package/dist/gen/index.js +2 -1
  23. package/dist/gen/orders/v1/orders_pb.d.ts +50 -3
  24. package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
  25. package/dist/gen/orders/v1/orders_pb.js +55 -43
  26. package/dist/gen/orders/v1/orders_pb.js.map +1 -1
  27. package/dist/gen/orders/v1/orders_read_pb.d.ts +10 -0
  28. package/dist/gen/orders/v1/orders_read_pb.d.ts.map +1 -1
  29. package/dist/gen/orders/v1/orders_read_pb.js +3 -1
  30. package/dist/gen/orders/v1/orders_read_pb.js.map +1 -1
  31. package/dist/index.d.ts +4 -1
  32. package/dist/services/accounts/accounts.schemas.d.ts +2 -2
  33. package/dist/services/accounts/accounts.schemas.d.ts.map +1 -1
  34. package/dist/services/accounts/accounts.schemas.js +3 -3
  35. package/dist/services/accounts/accounts.schemas.js.map +1 -1
  36. package/dist/services/address-book/address-book.schemas.d.ts +67 -68
  37. package/dist/services/address-book/address-book.schemas.d.ts.map +1 -1
  38. package/dist/services/address-book/address-book.schemas.js +11 -13
  39. package/dist/services/address-book/address-book.schemas.js.map +1 -1
  40. package/dist/services/api-keys/api-keys.schemas.d.ts +1 -2
  41. package/dist/services/api-keys/api-keys.schemas.d.ts.map +1 -1
  42. package/dist/services/api-keys/api-keys.schemas.js +4 -9
  43. package/dist/services/api-keys/api-keys.schemas.js.map +1 -1
  44. package/dist/services/auth/auth.d.ts +2 -3
  45. package/dist/services/auth/auth.d.ts.map +1 -1
  46. package/dist/services/auth/auth.js +4 -2
  47. package/dist/services/auth/auth.js.map +1 -1
  48. package/dist/services/balances/balances.schemas.d.ts +3 -3
  49. package/dist/services/balances/balances.schemas.d.ts.map +1 -1
  50. package/dist/services/balances/balances.schemas.js +7 -12
  51. package/dist/services/balances/balances.schemas.js.map +1 -1
  52. package/dist/services/candles/candles.schemas.d.ts +10 -10
  53. package/dist/services/candles/candles.schemas.d.ts.map +1 -1
  54. package/dist/services/candles/candles.schemas.js +5 -6
  55. package/dist/services/candles/candles.schemas.js.map +1 -1
  56. package/dist/services/chain-analytics/chain-analytics.schemas.d.ts +3 -3
  57. package/dist/services/chain-analytics/chain-analytics.schemas.d.ts.map +1 -1
  58. package/dist/services/chain-analytics/chain-analytics.schemas.js +2 -3
  59. package/dist/services/chain-analytics/chain-analytics.schemas.js.map +1 -1
  60. package/dist/services/claims/claims.codecs.d.ts +8 -0
  61. package/dist/services/claims/claims.codecs.d.ts.map +1 -0
  62. package/dist/services/claims/claims.codecs.js +17 -0
  63. package/dist/services/claims/claims.codecs.js.map +1 -0
  64. package/dist/services/claims/claims.d.ts +19 -0
  65. package/dist/services/claims/claims.d.ts.map +1 -0
  66. package/dist/services/claims/claims.js +30 -0
  67. package/dist/services/claims/claims.js.map +1 -0
  68. package/dist/services/claims/claims.schemas.d.ts +122 -0
  69. package/dist/services/claims/claims.schemas.d.ts.map +1 -0
  70. package/dist/services/claims/claims.schemas.js +47 -0
  71. package/dist/services/claims/claims.schemas.js.map +1 -0
  72. package/dist/services/claims/claims.types.d.ts +3 -0
  73. package/dist/services/claims/index.d.ts +5 -0
  74. package/dist/services/heatmap/heatmap.schemas.d.ts +13 -13
  75. package/dist/services/heatmap/heatmap.schemas.d.ts.map +1 -1
  76. package/dist/services/heatmap/heatmap.schemas.js +10 -10
  77. package/dist/services/heatmap/heatmap.schemas.js.map +1 -1
  78. package/dist/services/internal-transfers/internal-transfers.schemas.d.ts.map +1 -1
  79. package/dist/services/internal-transfers/internal-transfers.schemas.js +1 -5
  80. package/dist/services/internal-transfers/internal-transfers.schemas.js.map +1 -1
  81. package/dist/services/lifecycle/lifecycle.schemas.d.ts +90 -90
  82. package/dist/services/lifecycle/lifecycle.schemas.d.ts.map +1 -1
  83. package/dist/services/lifecycle/lifecycle.schemas.js +10 -11
  84. package/dist/services/lifecycle/lifecycle.schemas.js.map +1 -1
  85. package/dist/services/market-overview/market-overview.schemas.d.ts +3 -3
  86. package/dist/services/market-overview/market-overview.schemas.d.ts.map +1 -1
  87. package/dist/services/market-overview/market-overview.schemas.js +3 -3
  88. package/dist/services/market-overview/market-overview.schemas.js.map +1 -1
  89. package/dist/services/mfa/mfa.schemas.d.ts +11 -11
  90. package/dist/services/mfa/mfa.schemas.d.ts.map +1 -1
  91. package/dist/services/mfa/mfa.schemas.js +4 -5
  92. package/dist/services/mfa/mfa.schemas.js.map +1 -1
  93. package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
  94. package/dist/services/orders/order-enums.codecs.js +2 -1
  95. package/dist/services/orders/order-enums.codecs.js.map +1 -1
  96. package/dist/services/orders/order-errors.schemas.d.ts +4 -5
  97. package/dist/services/orders/order-errors.schemas.d.ts.map +1 -1
  98. package/dist/services/orders/orders-batch.schemas.d.ts +110 -32
  99. package/dist/services/orders/orders-batch.schemas.d.ts.map +1 -1
  100. package/dist/services/orders/orders-batch.schemas.js +9 -10
  101. package/dist/services/orders/orders-batch.schemas.js.map +1 -1
  102. package/dist/services/orders/orders-input.schemas.d.ts +111 -8
  103. package/dist/services/orders/orders-input.schemas.d.ts.map +1 -1
  104. package/dist/services/orders/orders-input.schemas.js +20 -4
  105. package/dist/services/orders/orders-input.schemas.js.map +1 -1
  106. package/dist/services/orders/orders-modify.schemas.d.ts +2 -2
  107. package/dist/services/orders/orders-modify.schemas.d.ts.map +1 -1
  108. package/dist/services/orders/orders-modify.schemas.js +3 -3
  109. package/dist/services/orders/orders-modify.schemas.js.map +1 -1
  110. package/dist/services/orders/orders-output.schemas.d.ts +48 -32
  111. package/dist/services/orders/orders-output.schemas.d.ts.map +1 -1
  112. package/dist/services/orders/orders-output.schemas.js +16 -16
  113. package/dist/services/orders/orders-output.schemas.js.map +1 -1
  114. package/dist/services/orders/orders-risk.schemas.d.ts +0 -1
  115. package/dist/services/orders/orders-risk.schemas.d.ts.map +1 -1
  116. package/dist/services/orders/orders-risk.schemas.js +4 -4
  117. package/dist/services/orders/orders-risk.schemas.js.map +1 -1
  118. package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +4 -4
  119. package/dist/services/policies/shared.codecs.js +3 -3
  120. package/dist/services/policies/shared.codecs.js.map +1 -1
  121. package/dist/services/policies/shared.d.ts +0 -1
  122. package/dist/services/policies/shared.d.ts.map +1 -1
  123. package/dist/services/policies/shared.js +2 -3
  124. package/dist/services/policies/shared.js.map +1 -1
  125. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +2 -2
  126. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts.map +1 -1
  127. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.js +2 -5
  128. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.js.map +1 -1
  129. package/dist/services/rate-limits/rate-limits.schemas.d.ts +6 -7
  130. package/dist/services/rate-limits/rate-limits.schemas.d.ts.map +1 -1
  131. package/dist/services/rate-limits/rate-limits.schemas.js +2 -3
  132. package/dist/services/rate-limits/rate-limits.schemas.js.map +1 -1
  133. package/dist/services/social-verification/social-verification.schemas.d.ts.map +1 -1
  134. package/dist/services/social-verification/social-verification.schemas.js +4 -4
  135. package/dist/services/social-verification/social-verification.schemas.js.map +1 -1
  136. package/dist/services/subaccounts/subaccounts.schemas.d.ts +21 -22
  137. package/dist/services/subaccounts/subaccounts.schemas.d.ts.map +1 -1
  138. package/dist/services/subaccounts/subaccounts.schemas.js +10 -12
  139. package/dist/services/subaccounts/subaccounts.schemas.js.map +1 -1
  140. package/dist/services/trades/trades.schemas.d.ts +1 -1
  141. package/dist/services/trades/trades.schemas.d.ts.map +1 -1
  142. package/dist/services/trades/trades.schemas.js +4 -8
  143. package/dist/services/trades/trades.schemas.js.map +1 -1
  144. package/dist/services/transfers/transfers.schemas.d.ts +3 -4
  145. package/dist/services/transfers/transfers.schemas.d.ts.map +1 -1
  146. package/dist/services/transfers/transfers.schemas.js +5 -10
  147. package/dist/services/transfers/transfers.schemas.js.map +1 -1
  148. package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
  149. package/dist/services/triggers/triggers-output.schemas.d.ts +53 -55
  150. package/dist/services/triggers/triggers-output.schemas.d.ts.map +1 -1
  151. package/dist/services/triggers/triggers-output.schemas.js +34 -36
  152. package/dist/services/triggers/triggers-output.schemas.js.map +1 -1
  153. package/dist/services/whiteboard/whiteboard.schemas.d.ts +42 -42
  154. package/dist/services/whiteboard/whiteboard.schemas.d.ts.map +1 -1
  155. package/dist/services/whiteboard/whiteboard.schemas.js +9 -10
  156. package/dist/services/whiteboard/whiteboard.schemas.js.map +1 -1
  157. package/dist/shared/proto-enum-codec.js +11 -6
  158. package/dist/shared/proto-enum-codec.js.map +1 -1
  159. package/dist/shared/rate-limit.schemas.d.ts +4 -5
  160. package/dist/shared/rate-limit.schemas.d.ts.map +1 -1
  161. package/dist/shared/rate-limit.schemas.js +41 -46
  162. package/dist/shared/rate-limit.schemas.js.map +1 -1
  163. package/dist/shared/schemas.js +5 -1
  164. package/dist/shared/schemas.js.map +1 -1
  165. package/dist/utils/timestamp.js +8 -1
  166. package/dist/utils/timestamp.js.map +1 -1
  167. package/dist/wired-services.d.ts.map +1 -1
  168. package/dist/wired-services.js +2 -0
  169. package/dist/wired-services.js.map +1 -1
  170. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @polyester/sdk
2
2
 
3
+ ## 0.25.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add daily reward claim status and claiming, and support good-til-date limit orders with expiry validation and order expiry output. ([#152](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/152))
8
+
9
+ - Decode unknown proto enum values on read paths as `"unspecified"` instead of throwing a `ValidationError`. When the server adds a new enum member that this SDK build does not know, the affected field now degrades to `"unspecified"` and the rest of the payload stays readable. Public output unions are unchanged since they already included `"unspecified"`. ([#152](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/152))
10
+
11
+ - Validate wallet login signatures as 65-byte hexadecimal EOA signatures while preserving universal signature support for subaccount creation. ([#152](https://github.com/Fabric-Labs/polyester-sdk-typescript/pull/152))
12
+
3
13
  ## 0.24.1
4
14
 
5
15
  ### Patch Changes
package/README.md CHANGED
@@ -18,30 +18,36 @@ npm install @polyester/sdk
18
18
 
19
19
  ## Browser
20
20
 
21
- Polyester accounts are smart accounts, so you bring an owner wallet and the SDK
22
- derives the account signer. Nothing gets deployed just to log in.
21
+ Polyester accounts are smart accounts. You bring an owner wallet, the SDK
22
+ derives the smart account address, and the owner EOA signs the login challenge.
23
+ Nothing gets deployed just to log in.
23
24
 
24
25
  ```ts
25
26
  import { PolyesterBrowserClient, POLYESTER_DEVNET_ENVIRONMENT } from "@polyester/sdk";
27
+ import type { AccountSigner } from "@polyester/sdk";
26
28
  import { createPolyesterAccountSigner } from "@polyester/sdk/account-signer";
27
29
 
28
- const accountSigner = createPolyesterAccountSigner({
29
- environment: POLYESTER_DEVNET_ENVIRONMENT,
30
- owner,
31
- });
30
+ const environment = POLYESTER_DEVNET_ENVIRONMENT;
31
+ const { accountAddress } = createPolyesterAccountSigner({ environment, owner });
32
32
 
33
- const client = new PolyesterBrowserClient({
34
- environment: POLYESTER_DEVNET_ENVIRONMENT,
35
- accountSigner,
36
- });
33
+ const accountSigner: AccountSigner = {
34
+ environmentFingerprint: environment.fingerprint,
35
+ accountAddress,
36
+ ownerAddress: owner.address,
37
+ // Login expects a raw 65-byte EIP-191 signature from the owner EOA.
38
+ signMessage: (message) => owner.signMessage({ message }),
39
+ };
40
+
41
+ const client = new PolyesterBrowserClient({ environment, accountSigner });
37
42
 
38
43
  await client.auth.login({ provider: "turnkey" });
39
44
 
40
45
  const { orders } = await client.orders.listOpen();
41
46
  ```
42
47
 
43
- See [docs/browser-login.md](docs/browser-login.md) for how account identity and
44
- owner metadata relate.
48
+ `createPolyesterAccountSigner` on its own returns Safe/ERC-6492 wrapped
49
+ signatures. Those are accepted for subaccount creation but rejected by login,
50
+ which is why the quickstart only uses it to derive the account address.
45
51
 
46
52
  ## Server
47
53
 
@@ -11,16 +11,20 @@ interface CreatePolyesterAccountSignerParams {
11
11
  saltNonce?: bigint;
12
12
  }
13
13
  /**
14
- * Creates an AccountSigner for Polyester authentication without any RPC calls.
14
+ * Derives the Polyester Safe smart account address and a Safe/ERC-6492 signer
15
+ * without any RPC calls.
15
16
  *
16
- * This computes the Safe smart account address deterministically and produces
17
- * ERC-6492 wrapped signatures for counterfactual verification. The signature
18
- * matches what toSafeSmartAccount.signMessage() would produce for an undeployed Safe.
17
+ * The returned signMessage produces ERC-6492 wrapped signatures matching what
18
+ * toSafeSmartAccount.signMessage() would produce for an undeployed Safe. That
19
+ * form is accepted for subaccount creation but NOT for login, which requires the
20
+ * owner EOA's raw 65-byte EIP-191 signature. For login, use this only to derive
21
+ * accountAddress and build an AccountSigner whose signMessage calls
22
+ * owner.signMessage directly (see the README quickstart).
19
23
  *
20
24
  * For actual chain interactions (UserOperations), use createPolyesterSmartAccount instead.
21
25
  *
22
26
  * @param params - Owner account and optional salt nonce
23
- * @returns An AccountSigner that can be used for authentication
27
+ * @returns An AccountSigner with the derived Safe address and a wrapped signer
24
28
  */
25
29
  declare function createPolyesterAccountSigner(params: CreatePolyesterAccountSignerParams): AccountSigner;
26
30
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"create-polyester-account-signer.d.ts","names":[],"sources":["../../src/account-signer/create-polyester-account-signer.ts"],"mappings":";;;;UAaiB;;EAEb,aAAa;;EAEb,OAAO;;EAEP;;;;;;;;;;;;;;iBAqDY,6BACZ,QAAQ,qCACT"}
1
+ {"version":3,"file":"create-polyester-account-signer.d.ts","names":[],"sources":["../../src/account-signer/create-polyester-account-signer.ts"],"mappings":";;;;UAaiB;;EAEb,aAAa;;EAEb,OAAO;;EAEP;;;;;;;;;;;;;;;;;;iBAyDY,6BACZ,QAAQ,qCACT"}
@@ -47,16 +47,20 @@ function wrapErc6492Signature(factoryAddress, factoryCalldata, signature) {
47
47
  return concat([encoded, ERC6492_MAGIC_SUFFIX]);
48
48
  }
49
49
  /**
50
- * Creates an AccountSigner for Polyester authentication without any RPC calls.
50
+ * Derives the Polyester Safe smart account address and a Safe/ERC-6492 signer
51
+ * without any RPC calls.
51
52
  *
52
- * This computes the Safe smart account address deterministically and produces
53
- * ERC-6492 wrapped signatures for counterfactual verification. The signature
54
- * matches what toSafeSmartAccount.signMessage() would produce for an undeployed Safe.
53
+ * The returned signMessage produces ERC-6492 wrapped signatures matching what
54
+ * toSafeSmartAccount.signMessage() would produce for an undeployed Safe. That
55
+ * form is accepted for subaccount creation but NOT for login, which requires the
56
+ * owner EOA's raw 65-byte EIP-191 signature. For login, use this only to derive
57
+ * accountAddress and build an AccountSigner whose signMessage calls
58
+ * owner.signMessage directly (see the README quickstart).
55
59
  *
56
60
  * For actual chain interactions (UserOperations), use createPolyesterSmartAccount instead.
57
61
  *
58
62
  * @param params - Owner account and optional salt nonce
59
- * @returns An AccountSigner that can be used for authentication
63
+ * @returns An AccountSigner with the derived Safe address and a wrapped signer
60
64
  */
61
65
  function createPolyesterAccountSigner(params) {
62
66
  const { environment, owner, saltNonce = 0n } = params;
@@ -1 +1 @@
1
- {"version":3,"file":"create-polyester-account-signer.js","names":[],"sources":["../../src/account-signer/create-polyester-account-signer.ts"],"sourcesContent":["import type { Address, Hex, LocalAccount } from \"viem\";\nimport { concat, encodeAbiParameters, hashMessage, hashTypedData, toBytes } from \"viem\";\nimport {\n predictSafeAddressWithData,\n type PredictSafeAddressParams,\n} from \"./predict-safe-address.js\";\nimport type { AccountSigner, HexAddress } from \"./types.js\";\nimport type { PolyesterEnvironment } from \"../environment.js\";\n\n/** ERC-6492 magic suffix for counterfactual signature verification */\nconst ERC6492_MAGIC_SUFFIX: Hex =\n \"0x6492649264926492649264926492649264926492649264926492649264926492\";\n\nexport interface CreatePolyesterAccountSignerParams {\n /** The environment this signer should authenticate against */\n environment: PolyesterEnvironment;\n /** The owner account (EOA) that will sign messages */\n owner: LocalAccount;\n /** Salt nonce for deriving different Safe addresses from the same owner (default: 0n) */\n saltNonce?: bigint;\n}\n\n/**\n * Adjusts the V value in a signature for Safe's eth_sign verification.\n * Safe expects V to be 31+ for eth_sign signatures (27 base + 4 for eth_sign marker).\n */\nfunction adjustVInSignature(signature: Hex): Hex {\n const ETHEREUM_V_VALUES = [0, 1, 27, 28];\n const MIN_VALID_V_VALUE_FOR_SAFE_ECDSA = 27;\n\n let signatureV = Number.parseInt(signature.slice(-2), 16);\n if (!ETHEREUM_V_VALUES.includes(signatureV)) {\n throw new Error(\"Invalid signature V value\");\n }\n\n // for eth_sign: add 27 if V < 27, then add 4\n if (signatureV < MIN_VALID_V_VALUE_FOR_SAFE_ECDSA) {\n signatureV += MIN_VALID_V_VALUE_FOR_SAFE_ECDSA;\n }\n signatureV += 4;\n\n return (signature.slice(0, -2) + signatureV.toString(16).padStart(2, \"0\")) as Hex;\n}\n\n/**\n * Wraps a signature in ERC-6492 format for counterfactual verification.\n * This allows signature verification before the Safe is deployed.\n */\nfunction wrapErc6492Signature(factoryAddress: Address, factoryCalldata: Hex, signature: Hex): Hex {\n const encoded = encodeAbiParameters(\n [\n { name: \"factory\", type: \"address\" },\n { name: \"factoryCalldata\", type: \"bytes\" },\n { name: \"signature\", type: \"bytes\" },\n ],\n [factoryAddress, factoryCalldata, signature],\n );\n return concat([encoded, ERC6492_MAGIC_SUFFIX]);\n}\n\n/**\n * Creates an AccountSigner for Polyester authentication without any RPC calls.\n *\n * This computes the Safe smart account address deterministically and produces\n * ERC-6492 wrapped signatures for counterfactual verification. The signature\n * matches what toSafeSmartAccount.signMessage() would produce for an undeployed Safe.\n *\n * For actual chain interactions (UserOperations), use createPolyesterSmartAccount instead.\n *\n * @param params - Owner account and optional salt nonce\n * @returns An AccountSigner that can be used for authentication\n */\nexport function createPolyesterAccountSigner(\n params: CreatePolyesterAccountSignerParams,\n): AccountSigner {\n const { environment, owner, saltNonce = 0n } = params;\n const {\n safeProxyFactoryAddress,\n safeSingletonAddress,\n safeModuleSetupAddress,\n safe4337ModuleAddress,\n multiSendAddress,\n } = environment.accountAbstraction.safe;\n const chainId = environment.chain.id;\n\n const predictParams: PredictSafeAddressParams = {\n owners: [owner.address],\n saltNonce,\n safeProxyFactoryAddress,\n safeSingletonAddress,\n safeModuleSetupAddress,\n safe4337ModuleAddress,\n multiSendAddress,\n };\n\n const { address, factoryCalldata } = predictSafeAddressWithData(predictParams);\n\n return {\n environmentFingerprint: environment.fingerprint,\n accountAddress: address as HexAddress,\n ownerAddress: owner.address as HexAddress,\n signMessage: async (message: string): Promise<Hex> => {\n // 1. hash the original message (what Safe calls generateSafeMessageMessage for strings)\n const messageHash = hashMessage(message);\n\n // 2. create EIP-712 typed data hash matching Safe's signMessage\n const safeMessageHash = hashTypedData({\n domain: {\n chainId,\n verifyingContract: address,\n },\n types: {\n SafeMessage: [{ name: \"message\", type: \"bytes\" }],\n },\n primaryType: \"SafeMessage\",\n message: {\n message: messageHash,\n },\n });\n\n // 3. sign the Safe message hash with raw bytes\n const ownerSignature = await owner.signMessage({\n message: { raw: toBytes(safeMessageHash) },\n });\n\n // 4. adjust V value for Safe's eth_sign verification\n const innerSignature = adjustVInSignature(ownerSignature as Hex);\n\n // 5. wrap in ERC-6492 format for counterfactual verification\n return wrapErc6492Signature(safeProxyFactoryAddress, factoryCalldata, innerSignature);\n },\n };\n}\n"],"mappings":";;;;AAUA,MAAM,uBACF;;;;;AAeJ,SAAS,mBAAmB,WAAqB;CAC7C,MAAM,oBAAoB;EAAC;EAAG;EAAG;EAAI;CAAE;CACvC,MAAM,mCAAmC;CAEzC,IAAI,aAAa,OAAO,SAAS,UAAU,MAAM,EAAE,GAAG,EAAE;CACxD,IAAI,CAAC,kBAAkB,SAAS,UAAU,GACtC,MAAM,IAAI,MAAM,2BAA2B;CAI/C,IAAI,aAAa,kCACb,cAAc;CAElB,cAAc;CAEd,OAAQ,UAAU,MAAM,GAAG,EAAE,IAAI,WAAW,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;AAC5E;;;;;AAMA,SAAS,qBAAqB,gBAAyB,iBAAsB,WAAqB;CAC9F,MAAM,UAAU,oBACZ;EACI;GAAE,MAAM;GAAW,MAAM;EAAU;EACnC;GAAE,MAAM;GAAmB,MAAM;EAAQ;EACzC;GAAE,MAAM;GAAa,MAAM;EAAQ;CACvC,GACA;EAAC;EAAgB;EAAiB;CAAS,CAC/C;CACA,OAAO,OAAO,CAAC,SAAS,oBAAoB,CAAC;AACjD;;;;;;;;;;;;;AAcA,SAAgB,6BACZ,QACa;CACb,MAAM,EAAE,aAAa,OAAO,YAAY,OAAO;CAC/C,MAAM,EACF,yBACA,sBACA,wBACA,uBACA,qBACA,YAAY,mBAAmB;CACnC,MAAM,UAAU,YAAY,MAAM;CAElC,MAAM,gBAA0C;EAC5C,QAAQ,CAAC,MAAM,OAAO;EACtB;EACA;EACA;EACA;EACA;EACA;CACJ;CAEA,MAAM,EAAE,SAAS,oBAAoB,2BAA2B,aAAa;CAE7E,OAAO;EACH,wBAAwB,YAAY;EACpC,gBAAgB;EAChB,cAAc,MAAM;EACpB,aAAa,OAAO,YAAkC;GAElD,MAAM,cAAc,YAAY,OAAO;GAGvC,MAAM,kBAAkB,cAAc;IAClC,QAAQ;KACJ;KACA,mBAAmB;IACvB;IACA,OAAO,EACH,aAAa,CAAC;KAAE,MAAM;KAAW,MAAM;IAAQ,CAAC,EACpD;IACA,aAAa;IACb,SAAS,EACL,SAAS,YACb;GACJ,CAAC;GAQD,MAAM,iBAAiB,mBAAmB,MALb,MAAM,YAAY,EAC3C,SAAS,EAAE,KAAK,QAAQ,eAAe,EAAE,EAC7C,CAAC,CAG8D;GAG/D,OAAO,qBAAqB,yBAAyB,iBAAiB,cAAc;EACxF;CACJ;AACJ"}
1
+ {"version":3,"file":"create-polyester-account-signer.js","names":[],"sources":["../../src/account-signer/create-polyester-account-signer.ts"],"sourcesContent":["import type { Address, Hex, LocalAccount } from \"viem\";\nimport { concat, encodeAbiParameters, hashMessage, hashTypedData, toBytes } from \"viem\";\nimport {\n predictSafeAddressWithData,\n type PredictSafeAddressParams,\n} from \"./predict-safe-address.js\";\nimport type { AccountSigner, HexAddress } from \"./types.js\";\nimport type { PolyesterEnvironment } from \"../environment.js\";\n\n/** ERC-6492 magic suffix for counterfactual signature verification */\nconst ERC6492_MAGIC_SUFFIX: Hex =\n \"0x6492649264926492649264926492649264926492649264926492649264926492\";\n\nexport interface CreatePolyesterAccountSignerParams {\n /** The environment this signer should authenticate against */\n environment: PolyesterEnvironment;\n /** The owner account (EOA) that will sign messages */\n owner: LocalAccount;\n /** Salt nonce for deriving different Safe addresses from the same owner (default: 0n) */\n saltNonce?: bigint;\n}\n\n/**\n * Adjusts the V value in a signature for Safe's eth_sign verification.\n * Safe expects V to be 31+ for eth_sign signatures (27 base + 4 for eth_sign marker).\n */\nfunction adjustVInSignature(signature: Hex): Hex {\n const ETHEREUM_V_VALUES = [0, 1, 27, 28];\n const MIN_VALID_V_VALUE_FOR_SAFE_ECDSA = 27;\n\n let signatureV = Number.parseInt(signature.slice(-2), 16);\n if (!ETHEREUM_V_VALUES.includes(signatureV)) {\n throw new Error(\"Invalid signature V value\");\n }\n\n // for eth_sign: add 27 if V < 27, then add 4\n if (signatureV < MIN_VALID_V_VALUE_FOR_SAFE_ECDSA) {\n signatureV += MIN_VALID_V_VALUE_FOR_SAFE_ECDSA;\n }\n signatureV += 4;\n\n return (signature.slice(0, -2) + signatureV.toString(16).padStart(2, \"0\")) as Hex;\n}\n\n/**\n * Wraps a signature in ERC-6492 format for counterfactual verification.\n * This allows signature verification before the Safe is deployed.\n */\nfunction wrapErc6492Signature(factoryAddress: Address, factoryCalldata: Hex, signature: Hex): Hex {\n const encoded = encodeAbiParameters(\n [\n { name: \"factory\", type: \"address\" },\n { name: \"factoryCalldata\", type: \"bytes\" },\n { name: \"signature\", type: \"bytes\" },\n ],\n [factoryAddress, factoryCalldata, signature],\n );\n return concat([encoded, ERC6492_MAGIC_SUFFIX]);\n}\n\n/**\n * Derives the Polyester Safe smart account address and a Safe/ERC-6492 signer\n * without any RPC calls.\n *\n * The returned signMessage produces ERC-6492 wrapped signatures matching what\n * toSafeSmartAccount.signMessage() would produce for an undeployed Safe. That\n * form is accepted for subaccount creation but NOT for login, which requires the\n * owner EOA's raw 65-byte EIP-191 signature. For login, use this only to derive\n * accountAddress and build an AccountSigner whose signMessage calls\n * owner.signMessage directly (see the README quickstart).\n *\n * For actual chain interactions (UserOperations), use createPolyesterSmartAccount instead.\n *\n * @param params - Owner account and optional salt nonce\n * @returns An AccountSigner with the derived Safe address and a wrapped signer\n */\nexport function createPolyesterAccountSigner(\n params: CreatePolyesterAccountSignerParams,\n): AccountSigner {\n const { environment, owner, saltNonce = 0n } = params;\n const {\n safeProxyFactoryAddress,\n safeSingletonAddress,\n safeModuleSetupAddress,\n safe4337ModuleAddress,\n multiSendAddress,\n } = environment.accountAbstraction.safe;\n const chainId = environment.chain.id;\n\n const predictParams: PredictSafeAddressParams = {\n owners: [owner.address],\n saltNonce,\n safeProxyFactoryAddress,\n safeSingletonAddress,\n safeModuleSetupAddress,\n safe4337ModuleAddress,\n multiSendAddress,\n };\n\n const { address, factoryCalldata } = predictSafeAddressWithData(predictParams);\n\n return {\n environmentFingerprint: environment.fingerprint,\n accountAddress: address as HexAddress,\n ownerAddress: owner.address as HexAddress,\n signMessage: async (message: string): Promise<Hex> => {\n // 1. hash the original message (what Safe calls generateSafeMessageMessage for strings)\n const messageHash = hashMessage(message);\n\n // 2. create EIP-712 typed data hash matching Safe's signMessage\n const safeMessageHash = hashTypedData({\n domain: {\n chainId,\n verifyingContract: address,\n },\n types: {\n SafeMessage: [{ name: \"message\", type: \"bytes\" }],\n },\n primaryType: \"SafeMessage\",\n message: {\n message: messageHash,\n },\n });\n\n // 3. sign the Safe message hash with raw bytes\n const ownerSignature = await owner.signMessage({\n message: { raw: toBytes(safeMessageHash) },\n });\n\n // 4. adjust V value for Safe's eth_sign verification\n const innerSignature = adjustVInSignature(ownerSignature as Hex);\n\n // 5. wrap in ERC-6492 format for counterfactual verification\n return wrapErc6492Signature(safeProxyFactoryAddress, factoryCalldata, innerSignature);\n },\n };\n}\n"],"mappings":";;;;AAUA,MAAM,uBACF;;;;;AAeJ,SAAS,mBAAmB,WAAqB;CAC7C,MAAM,oBAAoB;EAAC;EAAG;EAAG;EAAI;CAAE;CACvC,MAAM,mCAAmC;CAEzC,IAAI,aAAa,OAAO,SAAS,UAAU,MAAM,EAAE,GAAG,EAAE;CACxD,IAAI,CAAC,kBAAkB,SAAS,UAAU,GACtC,MAAM,IAAI,MAAM,2BAA2B;CAI/C,IAAI,aAAa,kCACb,cAAc;CAElB,cAAc;CAEd,OAAQ,UAAU,MAAM,GAAG,EAAE,IAAI,WAAW,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;AAC5E;;;;;AAMA,SAAS,qBAAqB,gBAAyB,iBAAsB,WAAqB;CAC9F,MAAM,UAAU,oBACZ;EACI;GAAE,MAAM;GAAW,MAAM;EAAU;EACnC;GAAE,MAAM;GAAmB,MAAM;EAAQ;EACzC;GAAE,MAAM;GAAa,MAAM;EAAQ;CACvC,GACA;EAAC;EAAgB;EAAiB;CAAS,CAC/C;CACA,OAAO,OAAO,CAAC,SAAS,oBAAoB,CAAC;AACjD;;;;;;;;;;;;;;;;;AAkBA,SAAgB,6BACZ,QACa;CACb,MAAM,EAAE,aAAa,OAAO,YAAY,OAAO;CAC/C,MAAM,EACF,yBACA,sBACA,wBACA,uBACA,qBACA,YAAY,mBAAmB;CACnC,MAAM,UAAU,YAAY,MAAM;CAElC,MAAM,gBAA0C;EAC5C,QAAQ,CAAC,MAAM,OAAO;EACtB;EACA;EACA;EACA;EACA;EACA;CACJ;CAEA,MAAM,EAAE,SAAS,oBAAoB,2BAA2B,aAAa;CAE7E,OAAO;EACH,wBAAwB,YAAY;EACpC,gBAAgB;EAChB,cAAc,MAAM;EACpB,aAAa,OAAO,YAAkC;GAElD,MAAM,cAAc,YAAY,OAAO;GAGvC,MAAM,kBAAkB,cAAc;IAClC,QAAQ;KACJ;KACA,mBAAmB;IACvB;IACA,OAAO,EACH,aAAa,CAAC;KAAE,MAAM;KAAW,MAAM;IAAQ,CAAC,EACpD;IACA,aAAa;IACb,SAAS,EACL,SAAS,YACb;GACJ,CAAC;GAQD,MAAM,iBAAiB,mBAAmB,MALb,MAAM,YAAY,EAC3C,SAAS,EAAE,KAAK,QAAQ,eAAe,EAAE,EAC7C,CAAC,CAG8D;GAG/D,OAAO,qBAAqB,yBAAyB,iBAAiB,cAAc;EACxF;CACJ;AACJ"}
@@ -4,8 +4,10 @@ type HexAddress = `0x${string}`;
4
4
  /**
5
5
  * Minimal account signer interface for SDK operations.
6
6
  *
7
- * The SDK authenticates the Polyester smart account address. The owner address
8
- * is optional metadata about the EOA or custody provider that controls it.
7
+ * The SDK authenticates the Polyester smart account address. When ownerAddress
8
+ * is present it is declared as the LOGIN challenge signer, and signMessage must
9
+ * return that EOA's raw 65-byte EIP-191 signature: login rejects Safe/ERC-6492
10
+ * wrapped signatures. Subaccount creation accepts either form.
9
11
  */
10
12
  interface AccountSigner {
11
13
  /** Fingerprint of the PolyesterEnvironment this signer was created for */
@@ -14,7 +16,11 @@ interface AccountSigner {
14
16
  readonly accountAddress: HexAddress;
15
17
  /** The owner/EOA address. Declared as the LOGIN challenge signer when present; otherwise accountAddress signs. */
16
18
  readonly ownerAddress?: HexAddress;
17
- /** Sign the exact UTF-8 message with EIP-191 semantics for accountAddress (including smart-account wrapping when required). */
19
+ /**
20
+ * Sign the exact UTF-8 message with EIP-191 semantics. For login this must be
21
+ * the owner EOA's raw 65-byte signature (0x + 130 hex chars), not a
22
+ * smart-account wrapped one.
23
+ */
18
24
  signMessage(message: string): Promise<Hex>;
19
25
  }
20
26
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../src/account-signer/types.ts"],"mappings":";;KAIY;;;;;;;UAQK;;WAEJ;;WAGA,gBAAgB;;WAGhB,eAAe;;EAGxB,YAAY,kBAAkB,QAAQ;;;;;;KAO9B,6BAA6B,uBAAuB,QAAQ;;;;;KAM5D,sBAAsB,gBAAgB;;;;iBAKlC,uBACZ,QAAQ,sBACT,UAAU;;;;iBA4BS,qBAClB,QAAQ,kCACT,QAAQ"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../src/account-signer/types.ts"],"mappings":";;KAIY;;;;;;;;;UAUK;;WAEJ;;WAGA,gBAAgB;;WAGhB,eAAe;;;;;;EAOxB,YAAY,kBAAkB,QAAQ;;;;;;KAO9B,6BAA6B,uBAAuB,QAAQ;;;;;KAM5D,sBAAsB,gBAAgB;;;;iBAKlC,uBACZ,QAAQ,sBACT,UAAU;;;;iBA4BS,qBAClB,QAAQ,kCACT,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/account-signer/types.ts"],"sourcesContent":["import type { Hex } from \"viem\";\nimport { isEvmAddress } from \"../utils/evm.js\";\nimport { ConfigurationError } from \"../shared/errors.js\";\n\nexport type HexAddress = `0x${string}`;\n\n/**\n * Minimal account signer interface for SDK operations.\n *\n * The SDK authenticates the Polyester smart account address. The owner address\n * is optional metadata about the EOA or custody provider that controls it.\n */\nexport interface AccountSigner {\n /** Fingerprint of the PolyesterEnvironment this signer was created for */\n readonly environmentFingerprint: string;\n\n /** The smart account address (used for authentication and trading) */\n readonly accountAddress: HexAddress;\n\n /** The owner/EOA address. Declared as the LOGIN challenge signer when present; otherwise accountAddress signs. */\n readonly ownerAddress?: HexAddress;\n\n /** Sign the exact UTF-8 message with EIP-191 semantics for accountAddress (including smart-account wrapping when required). */\n signMessage(message: string): Promise<Hex>;\n}\n\n/**\n * Factory function type for lazy account signer initialization.\n * Useful when the signer might not be available at client creation time.\n */\nexport type AccountSignerFactory = () => AccountSigner | null | Promise<AccountSigner | null>;\n\n/**\n * Account signer configuration for the client.\n * Can be a signer instance or a factory for lazy initialization.\n */\nexport type AccountSignerConfig = AccountSigner | AccountSignerFactory;\n\n/**\n * Helper to check if an account signer config is a factory function.\n */\nexport function isAccountSignerFactory(\n config: AccountSignerConfig,\n): config is AccountSignerFactory {\n return typeof config === \"function\";\n}\n\n/**\n * Asserts that a value implements the account signer contract.\n */\nexport function assertAccountSigner(value: AccountSigner): void {\n if (typeof value !== \"object\" || value === null) {\n throw new ConfigurationError(\"Account signer must be an object or factory function.\");\n }\n if (!value.environmentFingerprint) {\n throw new ConfigurationError(\"Account signer must include an environmentFingerprint.\");\n }\n if (!isEvmAddress(value.accountAddress)) {\n throw new ConfigurationError(\"Account signer must include a valid accountAddress.\");\n }\n if (value.ownerAddress && !isEvmAddress(value.ownerAddress)) {\n throw new ConfigurationError(\"Account signer ownerAddress must be a valid address.\");\n }\n if (typeof value.signMessage !== \"function\") {\n throw new ConfigurationError(\"Account signer must include a signMessage function.\");\n }\n}\n\n/**\n * Helper to resolve an account signer from config.\n */\nexport async function resolveAccountSigner(\n config: AccountSignerConfig | undefined,\n): Promise<AccountSigner | null> {\n if (!config) return null;\n const accountSigner = isAccountSignerFactory(config) ? await config() : config;\n if (accountSigner) assertAccountSigner(accountSigner);\n return accountSigner;\n}\n"],"mappings":";;;;;;AAyCA,SAAgB,uBACZ,QAC8B;CAC9B,OAAO,OAAO,WAAW;AAC7B;;;;AAKA,SAAgB,oBAAoB,OAA4B;CAC5D,IAAI,OAAO,UAAU,YAAY,UAAU,MACvC,MAAM,IAAI,mBAAmB,uDAAuD;CAExF,IAAI,CAAC,MAAM,wBACP,MAAM,IAAI,mBAAmB,wDAAwD;CAEzF,IAAI,CAAC,aAAa,MAAM,cAAc,GAClC,MAAM,IAAI,mBAAmB,qDAAqD;CAEtF,IAAI,MAAM,gBAAgB,CAAC,aAAa,MAAM,YAAY,GACtD,MAAM,IAAI,mBAAmB,sDAAsD;CAEvF,IAAI,OAAO,MAAM,gBAAgB,YAC7B,MAAM,IAAI,mBAAmB,qDAAqD;AAE1F;;;;AAKA,eAAsB,qBAClB,QAC6B;CAC7B,IAAI,CAAC,QAAQ,OAAO;CACpB,MAAM,gBAAgB,uBAAuB,MAAM,IAAI,MAAM,OAAO,IAAI;CACxE,IAAI,eAAe,oBAAoB,aAAa;CACpD,OAAO;AACX"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/account-signer/types.ts"],"sourcesContent":["import type { Hex } from \"viem\";\nimport { isEvmAddress } from \"../utils/evm.js\";\nimport { ConfigurationError } from \"../shared/errors.js\";\n\nexport type HexAddress = `0x${string}`;\n\n/**\n * Minimal account signer interface for SDK operations.\n *\n * The SDK authenticates the Polyester smart account address. When ownerAddress\n * is present it is declared as the LOGIN challenge signer, and signMessage must\n * return that EOA's raw 65-byte EIP-191 signature: login rejects Safe/ERC-6492\n * wrapped signatures. Subaccount creation accepts either form.\n */\nexport interface AccountSigner {\n /** Fingerprint of the PolyesterEnvironment this signer was created for */\n readonly environmentFingerprint: string;\n\n /** The smart account address (used for authentication and trading) */\n readonly accountAddress: HexAddress;\n\n /** The owner/EOA address. Declared as the LOGIN challenge signer when present; otherwise accountAddress signs. */\n readonly ownerAddress?: HexAddress;\n\n /**\n * Sign the exact UTF-8 message with EIP-191 semantics. For login this must be\n * the owner EOA's raw 65-byte signature (0x + 130 hex chars), not a\n * smart-account wrapped one.\n */\n signMessage(message: string): Promise<Hex>;\n}\n\n/**\n * Factory function type for lazy account signer initialization.\n * Useful when the signer might not be available at client creation time.\n */\nexport type AccountSignerFactory = () => AccountSigner | null | Promise<AccountSigner | null>;\n\n/**\n * Account signer configuration for the client.\n * Can be a signer instance or a factory for lazy initialization.\n */\nexport type AccountSignerConfig = AccountSigner | AccountSignerFactory;\n\n/**\n * Helper to check if an account signer config is a factory function.\n */\nexport function isAccountSignerFactory(\n config: AccountSignerConfig,\n): config is AccountSignerFactory {\n return typeof config === \"function\";\n}\n\n/**\n * Asserts that a value implements the account signer contract.\n */\nexport function assertAccountSigner(value: AccountSigner): void {\n if (typeof value !== \"object\" || value === null) {\n throw new ConfigurationError(\"Account signer must be an object or factory function.\");\n }\n if (!value.environmentFingerprint) {\n throw new ConfigurationError(\"Account signer must include an environmentFingerprint.\");\n }\n if (!isEvmAddress(value.accountAddress)) {\n throw new ConfigurationError(\"Account signer must include a valid accountAddress.\");\n }\n if (value.ownerAddress && !isEvmAddress(value.ownerAddress)) {\n throw new ConfigurationError(\"Account signer ownerAddress must be a valid address.\");\n }\n if (typeof value.signMessage !== \"function\") {\n throw new ConfigurationError(\"Account signer must include a signMessage function.\");\n }\n}\n\n/**\n * Helper to resolve an account signer from config.\n */\nexport async function resolveAccountSigner(\n config: AccountSignerConfig | undefined,\n): Promise<AccountSigner | null> {\n if (!config) return null;\n const accountSigner = isAccountSignerFactory(config) ? await config() : config;\n if (accountSigner) assertAccountSigner(accountSigner);\n return accountSigner;\n}\n"],"mappings":";;;;;;AA+CA,SAAgB,uBACZ,QAC8B;CAC9B,OAAO,OAAO,WAAW;AAC7B;;;;AAKA,SAAgB,oBAAoB,OAA4B;CAC5D,IAAI,OAAO,UAAU,YAAY,UAAU,MACvC,MAAM,IAAI,mBAAmB,uDAAuD;CAExF,IAAI,CAAC,MAAM,wBACP,MAAM,IAAI,mBAAmB,wDAAwD;CAEzF,IAAI,CAAC,aAAa,MAAM,cAAc,GAClC,MAAM,IAAI,mBAAmB,qDAAqD;CAEtF,IAAI,MAAM,gBAAgB,CAAC,aAAa,MAAM,YAAY,GACtD,MAAM,IAAI,mBAAmB,sDAAsD;CAEvF,IAAI,OAAO,MAAM,gBAAgB,YAC7B,MAAM,IAAI,mBAAmB,qDAAqD;AAE1F;;;;AAKA,eAAsB,qBAClB,QAC6B;CAC7B,IAAI,CAAC,QAAQ,OAAO;CACpB,MAAM,gBAAgB,uBAAuB,MAAM,IAAI,MAAM,OAAO,IAAI;CACxE,IAAI,eAAe,oBAAoB,aAAa;CACpD,OAAO;AACX"}
@@ -55,6 +55,8 @@ import { ZipperService } from "./services/zipper/zipper.js";
55
55
  import "./services/zipper/index.js";
56
56
  import { MfaService } from "./services/mfa/mfa.js";
57
57
  import "./services/mfa/index.js";
58
+ import { ClaimsService } from "./services/claims/claims.js";
59
+ import "./services/claims/index.js";
58
60
  import { VipService } from "./services/vip/vip.js";
59
61
  import "./services/vip/index.js";
60
62
  import { FeesService } from "./services/fees/fees.js";
@@ -158,6 +160,7 @@ declare class PolyesterClient {
158
160
  get whiteboard(): WhiteboardService;
159
161
  get zipper(): ZipperService;
160
162
  get mfa(): MfaService;
163
+ get claims(): ClaimsService;
161
164
  get vip(): VipService;
162
165
  get fees(): FeesService;
163
166
  get tradingRateLimits(): RateLimitService;
@@ -1 +1 @@
1
- {"version":3,"file":"core-client.d.ts","names":[],"sources":["../src/core-client.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACV,aAAa;EACb,aAAa;;UAGP;EACN,cAAc,SAAS,8BAA8B;;;;;;;;;cAqC5C;;qBACU,YAAY;EA+CnB,YAAA,QAAQ,uBAAuB,UAAS;MAyBhD,YAAY;MAoBZ,WAAW;MAwCX,QAAQ;MAaR,YAAY;MAIZ,WAAW;MAQX,eAAe;MAQf,WAAW;MAQX,kBAAkB;MAOlB,cAAc;MAQd,kBAAkB;MAQlB,aAAa;MAQb,WAAW;MAQX,aAAa;MAIb,UAAU;MASV,UAAU;MASV,YAAY;MASZ,YAAY;MASZ,aAAa;MAQb,qBAAqB;MAQrB,oBAAoB;MAapB,WAAW;MAIX,eAAe;MAQf,eAAe;MAIf,sBAAsB;MAItB,cAAc;MAId,UAAU;MAQV,OAAO;MAIP,UAAU;MAIV,OAAO;MAIP,QAAQ;MAIR,qBAAqB;;;;;YAWf,4BAA4B"}
@@ -27,6 +27,7 @@ import { SocialVerificationService } from "./services/social-verification/social
27
27
  import { WhiteboardService } from "./services/whiteboard/whiteboard.js";
28
28
  import { ZipperService } from "./services/zipper/zipper.js";
29
29
  import { MfaService } from "./services/mfa/mfa.js";
30
+ import { ClaimsService } from "./services/claims/claims.js";
30
31
  import { VipService } from "./services/vip/vip.js";
31
32
  import { FeesService } from "./services/fees/fees.js";
32
33
  import { RateLimitService } from "./services/rate-limits/rate-limits.js";
@@ -128,6 +129,7 @@ var PolyesterClient = class {
128
129
  #whiteboard;
129
130
  #zipper;
130
131
  #mfa;
132
+ #claims;
131
133
  #vip;
132
134
  #fees;
133
135
  #tradingRateLimits;
@@ -276,6 +278,9 @@ var PolyesterClient = class {
276
278
  get mfa() {
277
279
  return this.#mfa ??= new MfaService(this.transports);
278
280
  }
281
+ get claims() {
282
+ return this.#claims ??= new ClaimsService(this.transports);
283
+ }
279
284
  get vip() {
280
285
  return this.#vip ??= new VipService(this.transports);
281
286
  }
@@ -1 +1 @@
1
- {"version":3,"file":"core-client.js","names":["#environment","#authProvider","#realtimeConfig","#configRealtimeClient","#configCatalog","#configCatalogSnapshot","#configCatalogCell","#createAuth","#realtime","#catalog","#getScales","#scales","#resolverInitialized","#resolver","#auth","#accounts","#apiKeys","#getResolver","#subaccounts","#candles","#chainAnalytics","#marketData","#marketOverview","#orderbook","#heatmap","#lifecycle","#trades","#orders","#triggers","#balances","#transfers","#internalTransfers","#tradingWithdraws","#deposit","#addressBook","#guardSigner","#socialVerification","#whiteboard","#zipper","#mfa","#vip","#fees","#tradingRateLimits"],"sources":["../src/core-client.ts"],"sourcesContent":["import type { Interceptor } from \"@connectrpc/connect\";\nimport { ConfigurationError } from \"./shared/errors.js\";\nimport {\n createApiKeyEd25519AuthHeaders,\n createTransports,\n resolveJwtToken,\n type AuthAndPublicApiTransports,\n type Transports,\n type JwtAuthProvider,\n type ApiKeyEd25519AuthProvider,\n} from \"./shared/transports.js\";\nimport { parsePolyesterEnvironment, type PolyesterEnvironment } from \"./environment.js\";\nimport { AccountsService } from \"./services/accounts/index.js\";\nimport { ApiKeysService } from \"./services/api-keys/index.js\";\nimport { AuthService } from \"./services/auth/auth.js\";\nimport { SubaccountsService } from \"./services/subaccounts/index.js\";\nimport { CandlesService } from \"./services/candles/index.js\";\nimport { ChainAnalyticsService } from \"./services/chain-analytics/index.js\";\nimport { MarketDataService } from \"./services/market-data/index.js\";\nimport { MarketOverviewService } from \"./services/market-overview/index.js\";\nimport { OrderbookService } from \"./services/orderbook/index.js\";\nimport { HeatmapService } from \"./services/heatmap/index.js\";\nimport { LifecycleService } from \"./services/lifecycle/index.js\";\nimport { TradesService } from \"./services/trades/index.js\";\nimport { OrdersService } from \"./services/orders/index.js\";\nimport { TriggersService } from \"./services/triggers/index.js\";\nimport { BalancesService } from \"./services/balances/index.js\";\nimport { TransfersService } from \"./services/transfers/index.js\";\nimport { InternalTransfersService } from \"./services/internal-transfers/index.js\";\nimport { TradingWithdrawsService } from \"./services/trading-withdraws/index.js\";\nimport { DepositService } from \"./services/deposit/index.js\";\nimport { AddressBookService } from \"./services/address-book/index.js\";\nimport { GuardSignerService } from \"./services/guard-signer/index.js\";\nimport { SocialVerificationService } from \"./services/social-verification/index.js\";\nimport { WhiteboardService } from \"./services/whiteboard/index.js\";\nimport { ZipperService } from \"./services/zipper/index.js\";\nimport { MfaService } from \"./services/mfa/index.js\";\nimport { VipService } from \"./services/vip/index.js\";\nimport { FeesService } from \"./services/fees/index.js\";\nimport { RateLimitService } from \"./services/rate-limits/index.js\";\nimport type { SubaccountResolver } from \"./services/subaccount-resolver.js\";\nimport {\n createPolyesterCatalog,\n type CatalogSnapshot,\n type CatalogSnapshotCell,\n type ClientCatalog,\n} from \"./catalogs/index.js\";\nimport { createCatalogSdkScales, type SdkScales } from \"./shared/decimal-surface.js\";\nimport { RealtimeClient, type PolyesterRealtime, type RealtimeConfig } from \"./realtime/index.js\";\n\nfunction realtimeAuthFromProvider(\n auth: JwtAuthProvider | ApiKeyEd25519AuthProvider | undefined,\n): Pick<RealtimeConfig, \"getAuthHeaders\" | \"hasAuth\"> {\n if (!auth) return {};\n if (auth.kind === \"jwt\") {\n return {\n getAuthHeaders: async () => {\n const token = await resolveJwtToken(auth);\n const headers: Record<string, string> = {};\n if (token) headers.authorization = `Bearer ${token}`;\n return headers;\n },\n hasAuth: () => {\n try {\n const token = auth.getToken();\n if (token !== null && typeof token !== \"string\") {\n // Async credentials are validated by the token request.\n void token.catch(() => {});\n return true;\n }\n return token !== null && token.length > 0;\n } catch {\n // Let the token request report provider failures as AuthenticationError.\n return true;\n }\n },\n };\n }\n return {\n getAuthHeaders: (request) =>\n createApiKeyEd25519AuthHeaders(auth, {\n url: request.url,\n method: request.method,\n }),\n hasAuth: () => true,\n };\n}\n\nexport type PolyesterRealtimeAuthConfig = Pick<RealtimeConfig, \"getAuthHeaders\" | \"hasAuth\">;\n\ninterface PolyesterClientCommonConfig {\n environment: PolyesterEnvironment;\n interceptors?: Interceptor[];\n auth?: JwtAuthProvider | ApiKeyEd25519AuthProvider;\n realtime?: PolyesterRealtimeAuthConfig;\n /**\n * Connect wire format. Defaults to binary for production performance.\n * Use `json` for human-readable debugging.\n */\n wireFormat?: \"binary\" | \"json\";\n /**\n * Advanced: inject pre-built Connect transports (in-memory mocks, custom\n * stacks). When provided, the SDK does not build its own transports and the\n * built-in auth/error-mapping interceptors are NOT applied — the injected\n * transports own their full interceptor chain.\n */\n transports?: Transports;\n /**\n * Advanced: inject a realtime implementation (in-memory mocks, custom\n * stacks). When provided, the SDK skips constructing its Centrifuge-backed\n * realtime client and the `realtime` auth config is ignored.\n */\n realtimeClient?: PolyesterRealtime;\n}\n\ntype PolyesterCatalogConfig =\n | {\n /** Client-owned catalog store. */\n catalog: ClientCatalog;\n catalogSnapshot?: never;\n catalogCell?: never;\n }\n | {\n catalog?: never;\n /**\n * Explicit initial catalog snapshot, commonly hydrated from server-rendered data.\n * Combines with `catalogCell` as the cell's initial value without clobbering a\n * pre-populated cell.\n */\n catalogSnapshot?: CatalogSnapshot;\n /**\n * External snapshot storage for the client-built catalog. A cell backed by a\n * reactive source makes every catalog read reactive.\n */\n catalogCell?: CatalogSnapshotCell;\n };\n\n/** Configuration shared by every Polyester client. */\nexport type PolyesterClientBaseConfig = PolyesterClientCommonConfig & PolyesterCatalogConfig;\n\n/** Configuration for the base Polyester client. */\nexport type PolyesterClientConfig = PolyesterClientBaseConfig;\n\n/** Preserves the exclusive catalog configuration while projecting client config fields. */\nexport function pickPolyesterCatalogConfig(\n config: PolyesterClientBaseConfig,\n): PolyesterCatalogConfig {\n return config.catalog === undefined\n ? {\n catalogSnapshot: config.catalogSnapshot,\n catalogCell: config.catalogCell,\n }\n : { catalog: config.catalog };\n}\n\ninterface AuthServiceFactoryContext {\n transports: AuthAndPublicApiTransports;\n realtime: PolyesterRealtime;\n subaccounts: SubaccountsService;\n environment: PolyesterEnvironment;\n}\n\ninterface PolyesterClientRuntimeConfig {\n createAuth?: (context: AuthServiceFactoryContext) => AuthService;\n}\n\n/**\n * Parses the configuration shared by every public client constructor.\n */\nexport function parsePolyesterClientConfig<TConfig extends PolyesterClientBaseConfig>(\n config: TConfig,\n): TConfig {\n if (typeof config !== \"object\" || config === null || Array.isArray(config)) {\n throw new ConfigurationError(\"Client configuration must be an object.\");\n }\n const environment = parsePolyesterEnvironment(config.environment);\n if (\n config.wireFormat !== undefined &&\n config.wireFormat !== \"binary\" &&\n config.wireFormat !== \"json\"\n ) {\n throw new ConfigurationError('wireFormat must be either \"binary\" or \"json\".');\n }\n if (config.catalog && config.catalogSnapshot) {\n throw new ConfigurationError(\"Provide either catalog or catalogSnapshot, not both.\");\n }\n if (config.catalog && config.catalogCell) {\n throw new ConfigurationError(\"Provide either catalog or catalogCell, not both.\");\n }\n\n return Object.assign({}, config, { environment });\n}\n\n/**\n * Base SDK client that wires transports, realtime, catalogs, and all public service clients for a Polyester environment.\n *\n * Services are constructed lazily on first property access (and memoized) so\n * that creating a client — which happens for every SSR request in server\n * hooks — only pays for the services the caller actually touches.\n */\nexport class PolyesterClient {\n protected readonly transports: Transports;\n\n readonly #environment: PolyesterEnvironment;\n readonly #authProvider: JwtAuthProvider | ApiKeyEd25519AuthProvider | undefined;\n readonly #realtimeConfig: PolyesterRealtimeAuthConfig | undefined;\n readonly #configRealtimeClient: PolyesterRealtime | undefined;\n readonly #configCatalog: ClientCatalog | undefined;\n readonly #configCatalogSnapshot: CatalogSnapshot | undefined;\n readonly #configCatalogCell: CatalogSnapshotCell | undefined;\n readonly #createAuth: PolyesterClientRuntimeConfig[\"createAuth\"];\n\n #realtime: PolyesterRealtime | undefined;\n #catalog: ClientCatalog | undefined;\n #scales: SdkScales | undefined;\n #resolver: SubaccountResolver | undefined;\n #resolverInitialized = false;\n\n #auth: AuthService | undefined;\n #accounts: AccountsService | undefined;\n #apiKeys: ApiKeysService | undefined;\n #subaccounts: SubaccountsService | undefined;\n #candles: CandlesService | undefined;\n #chainAnalytics: ChainAnalyticsService | undefined;\n #marketData: MarketDataService | undefined;\n #marketOverview: MarketOverviewService | undefined;\n #orderbook: OrderbookService | undefined;\n #heatmap: HeatmapService | undefined;\n #lifecycle: LifecycleService | undefined;\n #trades: TradesService | undefined;\n #orders: OrdersService | undefined;\n #triggers: TriggersService | undefined;\n #balances: BalancesService | undefined;\n #transfers: TransfersService | undefined;\n #internalTransfers: InternalTransfersService | undefined;\n #tradingWithdraws: TradingWithdrawsService | undefined;\n #deposit: DepositService | undefined;\n #addressBook: AddressBookService | undefined;\n #guardSigner: GuardSignerService | undefined;\n #socialVerification: SocialVerificationService | undefined;\n #whiteboard: WhiteboardService | undefined;\n #zipper: ZipperService | undefined;\n #mfa: MfaService | undefined;\n #vip: VipService | undefined;\n #fees: FeesService | undefined;\n #tradingRateLimits: RateLimitService | undefined;\n\n constructor(config: PolyesterClientConfig, runtime: PolyesterClientRuntimeConfig = {}) {\n const parsedConfig = parsePolyesterClientConfig(config);\n config = parsedConfig;\n const interceptors = config.interceptors ?? [];\n const { environment } = config;\n\n this.transports =\n config.transports ??\n createTransports({\n apiUrl: environment.apiUrl,\n interceptors,\n auth: config.auth,\n wireFormat: config.wireFormat,\n });\n\n this.#environment = environment;\n this.#authProvider = config.auth;\n this.#realtimeConfig = config.realtime;\n this.#configRealtimeClient = config.realtimeClient;\n this.#configCatalog = config.catalog;\n this.#configCatalogSnapshot = config.catalogSnapshot;\n this.#configCatalogCell = config.catalogCell;\n this.#createAuth = runtime.createAuth;\n }\n\n get realtime(): PolyesterRealtime {\n if (!this.#realtime) {\n if (this.#configRealtimeClient) {\n this.#realtime = this.#configRealtimeClient;\n } else {\n const environment = this.#environment;\n const realtimeAuth = realtimeAuthFromProvider(this.#authProvider);\n this.#realtime = new RealtimeClient({\n wsUrl: environment.websocketUrl,\n tokenEndpoint: `${environment.apiUrl}/v1/rt/token`,\n subscribeEndpoint: `${environment.apiUrl}/v1/rt/subscribe`,\n getAuthHeaders:\n this.#realtimeConfig?.getAuthHeaders ?? realtimeAuth.getAuthHeaders,\n hasAuth: this.#realtimeConfig?.hasAuth ?? realtimeAuth.hasAuth,\n });\n }\n }\n return this.#realtime;\n }\n\n get catalog(): ClientCatalog {\n if (!this.#catalog) {\n if (this.#configCatalog) {\n this.#catalog = this.#configCatalog;\n } else {\n const catalogRefreshMarketData = new MarketDataService(\n this.transports,\n this.realtime,\n this.#getScales(),\n );\n const catalogRefreshZipper = new ZipperService(this.transports);\n this.#catalog = createPolyesterCatalog({\n snapshot: this.#configCatalogSnapshot,\n cell: this.#configCatalogCell,\n refresh: {\n market: () => catalogRefreshMarketData.getSpotConfig(),\n zipper: () => catalogRefreshZipper.getDepositWithdrawConfig(),\n },\n });\n }\n }\n return this.#catalog;\n }\n\n #getScales(): SdkScales {\n // Lazy catalog binding: the resolver only dereferences `this.catalog` at\n // call time. getSpotConfig() (the catalog's own refresh source) never\n // awaits scale readiness.\n this.#scales ??= createCatalogSdkScales(() => this.catalog);\n return this.#scales;\n }\n\n #getResolver(): SubaccountResolver | undefined {\n if (!this.#resolverInitialized) {\n this.#resolverInitialized = true;\n this.#resolver = this.createSubaccountResolver();\n }\n return this.#resolver;\n }\n\n get auth(): AuthService {\n if (!this.#auth) {\n this.#auth =\n this.#createAuth?.({\n transports: this.transports,\n realtime: this.realtime,\n subaccounts: this.subaccounts,\n environment: this.#environment,\n }) ?? new AuthService(this.transports, this.realtime);\n }\n return this.#auth;\n }\n\n get accounts(): AccountsService {\n return (this.#accounts ??= new AccountsService(this.transports));\n }\n\n get apiKeys(): ApiKeysService {\n return (this.#apiKeys ??= new ApiKeysService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n ));\n }\n\n get subaccounts(): SubaccountsService {\n return (this.#subaccounts ??= new SubaccountsService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n ));\n }\n\n get candles(): CandlesService {\n return (this.#candles ??= new CandlesService(\n this.transports,\n this.realtime,\n this.#getScales(),\n ));\n }\n\n get chainAnalytics(): ChainAnalyticsService {\n return (this.#chainAnalytics ??= new ChainAnalyticsService(\n this.transports,\n this.#getScales(),\n ));\n }\n\n get marketData(): MarketDataService {\n return (this.#marketData ??= new MarketDataService(\n this.transports,\n this.realtime,\n this.#getScales(),\n ));\n }\n\n get marketOverview(): MarketOverviewService {\n return (this.#marketOverview ??= new MarketOverviewService(\n this.transports,\n this.realtime,\n this.#getScales(),\n ));\n }\n\n get orderbook(): OrderbookService {\n return (this.#orderbook ??= new OrderbookService(\n this.transports,\n this.realtime,\n this.#getScales(),\n ));\n }\n\n get heatmap(): HeatmapService {\n return (this.#heatmap ??= new HeatmapService(\n this.transports,\n this.realtime,\n this.#getScales(),\n ));\n }\n\n get lifecycle(): LifecycleService {\n return (this.#lifecycle ??= new LifecycleService(this.transports, this.realtime));\n }\n\n get trades(): TradesService {\n return (this.#trades ??= new TradesService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n this.#getScales(),\n ));\n }\n\n get orders(): OrdersService {\n return (this.#orders ??= new OrdersService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n this.#getScales(),\n ));\n }\n\n get triggers(): TriggersService {\n return (this.#triggers ??= new TriggersService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n this.#getScales(),\n ));\n }\n\n get balances(): BalancesService {\n return (this.#balances ??= new BalancesService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n this.#getScales(),\n ));\n }\n\n get transfers(): TransfersService {\n return (this.#transfers ??= new TransfersService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n ));\n }\n\n get internalTransfers(): InternalTransfersService {\n return (this.#internalTransfers ??= new InternalTransfersService(\n this.transports,\n this.#getResolver(),\n this.#getScales(),\n ));\n }\n\n get tradingWithdraws(): TradingWithdrawsService {\n return (this.#tradingWithdraws ??= new TradingWithdrawsService(\n this.transports,\n this.#getResolver(),\n {\n chainId: this.#environment.chain.id,\n tradingGatewayAddress: this.#environment.contracts.tradingGatewayAddress,\n },\n this.#getScales(),\n this.catalog,\n ));\n }\n\n get deposit(): DepositService {\n return (this.#deposit ??= new DepositService(this.transports, this.#getResolver()));\n }\n\n get addressBook(): AddressBookService {\n return (this.#addressBook ??= new AddressBookService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n ));\n }\n\n get guardSigner(): GuardSignerService {\n return (this.#guardSigner ??= new GuardSignerService(this.transports, this.#getResolver()));\n }\n\n get socialVerification(): SocialVerificationService {\n return (this.#socialVerification ??= new SocialVerificationService(this.transports));\n }\n\n get whiteboard(): WhiteboardService {\n return (this.#whiteboard ??= new WhiteboardService(this.transports));\n }\n\n get zipper(): ZipperService {\n return (this.#zipper ??= new ZipperService(\n this.transports,\n this.realtime,\n this.#getScales(),\n ));\n }\n\n get mfa(): MfaService {\n return (this.#mfa ??= new MfaService(this.transports));\n }\n\n get vip(): VipService {\n return (this.#vip ??= new VipService(this.transports));\n }\n\n get fees(): FeesService {\n return (this.#fees ??= new FeesService(this.transports, this.#getResolver()));\n }\n\n get tradingRateLimits(): RateLimitService {\n return (this.#tradingRateLimits ??= new RateLimitService(\n this.transports,\n this.#getResolver(),\n ));\n }\n\n /**\n * Override in subclasses to provide a subaccount resolver.\n * The resolver is called lazily when service methods are invoked.\n */\n protected createSubaccountResolver(): SubaccountResolver | undefined {\n return undefined;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,SAAS,yBACL,MACkD;CAClD,IAAI,CAAC,MAAM,OAAO,CAAC;CACnB,IAAI,KAAK,SAAS,OACd,OAAO;EACH,gBAAgB,YAAY;GACxB,MAAM,QAAQ,MAAM,gBAAgB,IAAI;GACxC,MAAM,UAAkC,CAAC;GACzC,IAAI,OAAO,QAAQ,gBAAgB,UAAU;GAC7C,OAAO;EACX;EACA,eAAe;GACX,IAAI;IACA,MAAM,QAAQ,KAAK,SAAS;IAC5B,IAAI,UAAU,QAAQ,OAAO,UAAU,UAAU;KAE7C,MAAW,YAAY,CAAC,CAAC;KACzB,OAAO;IACX;IACA,OAAO,UAAU,QAAQ,MAAM,SAAS;GAC5C,QAAQ;IAEJ,OAAO;GACX;EACJ;CACJ;CAEJ,OAAO;EACH,iBAAiB,YACb,+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CAC7F;CAEA,IAAI,qBAAgD;EAChD,OAAQ,KAAKmB,wBAAwB,IAAI,0BAA0B,KAAK,UAAU;CACtF;CAEA,IAAI,aAAgC;EAChC,OAAQ,KAAKC,gBAAgB,IAAI,kBAAkB,KAAK,UAAU;CACtE;CAEA,IAAI,SAAwB;EACxB,OAAQ,KAAKC,YAAY,IAAI,cACzB,KAAK,YACL,KAAK,UACL,KAAK5B,WAAW,CACpB;CACJ;CAEA,IAAI,MAAkB;EAClB,OAAQ,KAAK6B,SAAS,IAAI,WAAW,KAAK,UAAU;CACxD;CAEA,IAAI,MAAkB;EAClB,OAAQ,KAAKC,SAAS,IAAI,WAAW,KAAK,UAAU;CACxD;CAEA,IAAI,OAAoB;EACpB,OAAQ,KAAKC,UAAU,IAAI,YAAY,KAAK,YAAY,KAAKxB,aAAa,CAAC;CAC/E;CAEA,IAAI,oBAAsC;EACtC,OAAQ,KAAKyB,uBAAuB,IAAI,iBACpC,KAAK,YACL,KAAKzB,aAAa,CACtB;CACJ;;;;;CAMA,2BAAqE,CAErE;AACJ"}
1
+ {"version":3,"file":"core-client.js","names":["#environment","#authProvider","#realtimeConfig","#configRealtimeClient","#configCatalog","#configCatalogSnapshot","#configCatalogCell","#createAuth","#realtime","#catalog","#getScales","#scales","#resolverInitialized","#resolver","#auth","#accounts","#apiKeys","#getResolver","#subaccounts","#candles","#chainAnalytics","#marketData","#marketOverview","#orderbook","#heatmap","#lifecycle","#trades","#orders","#triggers","#balances","#transfers","#internalTransfers","#tradingWithdraws","#deposit","#addressBook","#guardSigner","#socialVerification","#whiteboard","#zipper","#mfa","#claims","#vip","#fees","#tradingRateLimits"],"sources":["../src/core-client.ts"],"sourcesContent":["import type { Interceptor } from \"@connectrpc/connect\";\nimport { ConfigurationError } from \"./shared/errors.js\";\nimport {\n createApiKeyEd25519AuthHeaders,\n createTransports,\n resolveJwtToken,\n type AuthAndPublicApiTransports,\n type Transports,\n type JwtAuthProvider,\n type ApiKeyEd25519AuthProvider,\n} from \"./shared/transports.js\";\nimport { parsePolyesterEnvironment, type PolyesterEnvironment } from \"./environment.js\";\nimport { AccountsService } from \"./services/accounts/index.js\";\nimport { ApiKeysService } from \"./services/api-keys/index.js\";\nimport { AuthService } from \"./services/auth/auth.js\";\nimport { SubaccountsService } from \"./services/subaccounts/index.js\";\nimport { CandlesService } from \"./services/candles/index.js\";\nimport { ChainAnalyticsService } from \"./services/chain-analytics/index.js\";\nimport { MarketDataService } from \"./services/market-data/index.js\";\nimport { MarketOverviewService } from \"./services/market-overview/index.js\";\nimport { OrderbookService } from \"./services/orderbook/index.js\";\nimport { HeatmapService } from \"./services/heatmap/index.js\";\nimport { LifecycleService } from \"./services/lifecycle/index.js\";\nimport { TradesService } from \"./services/trades/index.js\";\nimport { OrdersService } from \"./services/orders/index.js\";\nimport { TriggersService } from \"./services/triggers/index.js\";\nimport { BalancesService } from \"./services/balances/index.js\";\nimport { TransfersService } from \"./services/transfers/index.js\";\nimport { InternalTransfersService } from \"./services/internal-transfers/index.js\";\nimport { TradingWithdrawsService } from \"./services/trading-withdraws/index.js\";\nimport { DepositService } from \"./services/deposit/index.js\";\nimport { AddressBookService } from \"./services/address-book/index.js\";\nimport { GuardSignerService } from \"./services/guard-signer/index.js\";\nimport { SocialVerificationService } from \"./services/social-verification/index.js\";\nimport { WhiteboardService } from \"./services/whiteboard/index.js\";\nimport { ZipperService } from \"./services/zipper/index.js\";\nimport { MfaService } from \"./services/mfa/index.js\";\nimport { ClaimsService } from \"./services/claims/index.js\";\nimport { VipService } from \"./services/vip/index.js\";\nimport { FeesService } from \"./services/fees/index.js\";\nimport { RateLimitService } from \"./services/rate-limits/index.js\";\nimport type { SubaccountResolver } from \"./services/subaccount-resolver.js\";\nimport {\n createPolyesterCatalog,\n type CatalogSnapshot,\n type CatalogSnapshotCell,\n type ClientCatalog,\n} from \"./catalogs/index.js\";\nimport { createCatalogSdkScales, type SdkScales } from \"./shared/decimal-surface.js\";\nimport { RealtimeClient, type PolyesterRealtime, type RealtimeConfig } from \"./realtime/index.js\";\n\nfunction realtimeAuthFromProvider(\n auth: JwtAuthProvider | ApiKeyEd25519AuthProvider | undefined,\n): Pick<RealtimeConfig, \"getAuthHeaders\" | \"hasAuth\"> {\n if (!auth) return {};\n if (auth.kind === \"jwt\") {\n return {\n getAuthHeaders: async () => {\n const token = await resolveJwtToken(auth);\n const headers: Record<string, string> = {};\n if (token) headers.authorization = `Bearer ${token}`;\n return headers;\n },\n hasAuth: () => {\n try {\n const token = auth.getToken();\n if (token !== null && typeof token !== \"string\") {\n // Async credentials are validated by the token request.\n void token.catch(() => {});\n return true;\n }\n return token !== null && token.length > 0;\n } catch {\n // Let the token request report provider failures as AuthenticationError.\n return true;\n }\n },\n };\n }\n return {\n getAuthHeaders: (request) =>\n createApiKeyEd25519AuthHeaders(auth, {\n url: request.url,\n method: request.method,\n }),\n hasAuth: () => true,\n };\n}\n\nexport type PolyesterRealtimeAuthConfig = Pick<RealtimeConfig, \"getAuthHeaders\" | \"hasAuth\">;\n\ninterface PolyesterClientCommonConfig {\n environment: PolyesterEnvironment;\n interceptors?: Interceptor[];\n auth?: JwtAuthProvider | ApiKeyEd25519AuthProvider;\n realtime?: PolyesterRealtimeAuthConfig;\n /**\n * Connect wire format. Defaults to binary for production performance.\n * Use `json` for human-readable debugging.\n */\n wireFormat?: \"binary\" | \"json\";\n /**\n * Advanced: inject pre-built Connect transports (in-memory mocks, custom\n * stacks). When provided, the SDK does not build its own transports and the\n * built-in auth/error-mapping interceptors are NOT applied — the injected\n * transports own their full interceptor chain.\n */\n transports?: Transports;\n /**\n * Advanced: inject a realtime implementation (in-memory mocks, custom\n * stacks). When provided, the SDK skips constructing its Centrifuge-backed\n * realtime client and the `realtime` auth config is ignored.\n */\n realtimeClient?: PolyesterRealtime;\n}\n\ntype PolyesterCatalogConfig =\n | {\n /** Client-owned catalog store. */\n catalog: ClientCatalog;\n catalogSnapshot?: never;\n catalogCell?: never;\n }\n | {\n catalog?: never;\n /**\n * Explicit initial catalog snapshot, commonly hydrated from server-rendered data.\n * Combines with `catalogCell` as the cell's initial value without clobbering a\n * pre-populated cell.\n */\n catalogSnapshot?: CatalogSnapshot;\n /**\n * External snapshot storage for the client-built catalog. A cell backed by a\n * reactive source makes every catalog read reactive.\n */\n catalogCell?: CatalogSnapshotCell;\n };\n\n/** Configuration shared by every Polyester client. */\nexport type PolyesterClientBaseConfig = PolyesterClientCommonConfig & PolyesterCatalogConfig;\n\n/** Configuration for the base Polyester client. */\nexport type PolyesterClientConfig = PolyesterClientBaseConfig;\n\n/** Preserves the exclusive catalog configuration while projecting client config fields. */\nexport function pickPolyesterCatalogConfig(\n config: PolyesterClientBaseConfig,\n): PolyesterCatalogConfig {\n return config.catalog === undefined\n ? {\n catalogSnapshot: config.catalogSnapshot,\n catalogCell: config.catalogCell,\n }\n : { catalog: config.catalog };\n}\n\ninterface AuthServiceFactoryContext {\n transports: AuthAndPublicApiTransports;\n realtime: PolyesterRealtime;\n subaccounts: SubaccountsService;\n environment: PolyesterEnvironment;\n}\n\ninterface PolyesterClientRuntimeConfig {\n createAuth?: (context: AuthServiceFactoryContext) => AuthService;\n}\n\n/**\n * Parses the configuration shared by every public client constructor.\n */\nexport function parsePolyesterClientConfig<TConfig extends PolyesterClientBaseConfig>(\n config: TConfig,\n): TConfig {\n if (typeof config !== \"object\" || config === null || Array.isArray(config)) {\n throw new ConfigurationError(\"Client configuration must be an object.\");\n }\n const environment = parsePolyesterEnvironment(config.environment);\n if (\n config.wireFormat !== undefined &&\n config.wireFormat !== \"binary\" &&\n config.wireFormat !== \"json\"\n ) {\n throw new ConfigurationError('wireFormat must be either \"binary\" or \"json\".');\n }\n if (config.catalog && config.catalogSnapshot) {\n throw new ConfigurationError(\"Provide either catalog or catalogSnapshot, not both.\");\n }\n if (config.catalog && config.catalogCell) {\n throw new ConfigurationError(\"Provide either catalog or catalogCell, not both.\");\n }\n\n return Object.assign({}, config, { environment });\n}\n\n/**\n * Base SDK client that wires transports, realtime, catalogs, and all public service clients for a Polyester environment.\n *\n * Services are constructed lazily on first property access (and memoized) so\n * that creating a client — which happens for every SSR request in server\n * hooks — only pays for the services the caller actually touches.\n */\nexport class PolyesterClient {\n protected readonly transports: Transports;\n\n readonly #environment: PolyesterEnvironment;\n readonly #authProvider: JwtAuthProvider | ApiKeyEd25519AuthProvider | undefined;\n readonly #realtimeConfig: PolyesterRealtimeAuthConfig | undefined;\n readonly #configRealtimeClient: PolyesterRealtime | undefined;\n readonly #configCatalog: ClientCatalog | undefined;\n readonly #configCatalogSnapshot: CatalogSnapshot | undefined;\n readonly #configCatalogCell: CatalogSnapshotCell | undefined;\n readonly #createAuth: PolyesterClientRuntimeConfig[\"createAuth\"];\n\n #realtime: PolyesterRealtime | undefined;\n #catalog: ClientCatalog | undefined;\n #scales: SdkScales | undefined;\n #resolver: SubaccountResolver | undefined;\n #resolverInitialized = false;\n\n #auth: AuthService | undefined;\n #accounts: AccountsService | undefined;\n #apiKeys: ApiKeysService | undefined;\n #subaccounts: SubaccountsService | undefined;\n #candles: CandlesService | undefined;\n #chainAnalytics: ChainAnalyticsService | undefined;\n #marketData: MarketDataService | undefined;\n #marketOverview: MarketOverviewService | undefined;\n #orderbook: OrderbookService | undefined;\n #heatmap: HeatmapService | undefined;\n #lifecycle: LifecycleService | undefined;\n #trades: TradesService | undefined;\n #orders: OrdersService | undefined;\n #triggers: TriggersService | undefined;\n #balances: BalancesService | undefined;\n #transfers: TransfersService | undefined;\n #internalTransfers: InternalTransfersService | undefined;\n #tradingWithdraws: TradingWithdrawsService | undefined;\n #deposit: DepositService | undefined;\n #addressBook: AddressBookService | undefined;\n #guardSigner: GuardSignerService | undefined;\n #socialVerification: SocialVerificationService | undefined;\n #whiteboard: WhiteboardService | undefined;\n #zipper: ZipperService | undefined;\n #mfa: MfaService | undefined;\n #claims: ClaimsService | undefined;\n #vip: VipService | undefined;\n #fees: FeesService | undefined;\n #tradingRateLimits: RateLimitService | undefined;\n\n constructor(config: PolyesterClientConfig, runtime: PolyesterClientRuntimeConfig = {}) {\n const parsedConfig = parsePolyesterClientConfig(config);\n config = parsedConfig;\n const interceptors = config.interceptors ?? [];\n const { environment } = config;\n\n this.transports =\n config.transports ??\n createTransports({\n apiUrl: environment.apiUrl,\n interceptors,\n auth: config.auth,\n wireFormat: config.wireFormat,\n });\n\n this.#environment = environment;\n this.#authProvider = config.auth;\n this.#realtimeConfig = config.realtime;\n this.#configRealtimeClient = config.realtimeClient;\n this.#configCatalog = config.catalog;\n this.#configCatalogSnapshot = config.catalogSnapshot;\n this.#configCatalogCell = config.catalogCell;\n this.#createAuth = runtime.createAuth;\n }\n\n get realtime(): PolyesterRealtime {\n if (!this.#realtime) {\n if (this.#configRealtimeClient) {\n this.#realtime = this.#configRealtimeClient;\n } else {\n const environment = this.#environment;\n const realtimeAuth = realtimeAuthFromProvider(this.#authProvider);\n this.#realtime = new RealtimeClient({\n wsUrl: environment.websocketUrl,\n tokenEndpoint: `${environment.apiUrl}/v1/rt/token`,\n subscribeEndpoint: `${environment.apiUrl}/v1/rt/subscribe`,\n getAuthHeaders:\n this.#realtimeConfig?.getAuthHeaders ?? realtimeAuth.getAuthHeaders,\n hasAuth: this.#realtimeConfig?.hasAuth ?? realtimeAuth.hasAuth,\n });\n }\n }\n return this.#realtime;\n }\n\n get catalog(): ClientCatalog {\n if (!this.#catalog) {\n if (this.#configCatalog) {\n this.#catalog = this.#configCatalog;\n } else {\n const catalogRefreshMarketData = new MarketDataService(\n this.transports,\n this.realtime,\n this.#getScales(),\n );\n const catalogRefreshZipper = new ZipperService(this.transports);\n this.#catalog = createPolyesterCatalog({\n snapshot: this.#configCatalogSnapshot,\n cell: this.#configCatalogCell,\n refresh: {\n market: () => catalogRefreshMarketData.getSpotConfig(),\n zipper: () => catalogRefreshZipper.getDepositWithdrawConfig(),\n },\n });\n }\n }\n return this.#catalog;\n }\n\n #getScales(): SdkScales {\n // Lazy catalog binding: the resolver only dereferences `this.catalog` at\n // call time. getSpotConfig() (the catalog's own refresh source) never\n // awaits scale readiness.\n this.#scales ??= createCatalogSdkScales(() => this.catalog);\n return this.#scales;\n }\n\n #getResolver(): SubaccountResolver | undefined {\n if (!this.#resolverInitialized) {\n this.#resolverInitialized = true;\n this.#resolver = this.createSubaccountResolver();\n }\n return this.#resolver;\n }\n\n get auth(): AuthService {\n if (!this.#auth) {\n this.#auth =\n this.#createAuth?.({\n transports: this.transports,\n realtime: this.realtime,\n subaccounts: this.subaccounts,\n environment: this.#environment,\n }) ?? new AuthService(this.transports, this.realtime);\n }\n return this.#auth;\n }\n\n get accounts(): AccountsService {\n return (this.#accounts ??= new AccountsService(this.transports));\n }\n\n get apiKeys(): ApiKeysService {\n return (this.#apiKeys ??= new ApiKeysService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n ));\n }\n\n get subaccounts(): SubaccountsService {\n return (this.#subaccounts ??= new SubaccountsService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n ));\n }\n\n get candles(): CandlesService {\n return (this.#candles ??= new CandlesService(\n this.transports,\n this.realtime,\n this.#getScales(),\n ));\n }\n\n get chainAnalytics(): ChainAnalyticsService {\n return (this.#chainAnalytics ??= new ChainAnalyticsService(\n this.transports,\n this.#getScales(),\n ));\n }\n\n get marketData(): MarketDataService {\n return (this.#marketData ??= new MarketDataService(\n this.transports,\n this.realtime,\n this.#getScales(),\n ));\n }\n\n get marketOverview(): MarketOverviewService {\n return (this.#marketOverview ??= new MarketOverviewService(\n this.transports,\n this.realtime,\n this.#getScales(),\n ));\n }\n\n get orderbook(): OrderbookService {\n return (this.#orderbook ??= new OrderbookService(\n this.transports,\n this.realtime,\n this.#getScales(),\n ));\n }\n\n get heatmap(): HeatmapService {\n return (this.#heatmap ??= new HeatmapService(\n this.transports,\n this.realtime,\n this.#getScales(),\n ));\n }\n\n get lifecycle(): LifecycleService {\n return (this.#lifecycle ??= new LifecycleService(this.transports, this.realtime));\n }\n\n get trades(): TradesService {\n return (this.#trades ??= new TradesService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n this.#getScales(),\n ));\n }\n\n get orders(): OrdersService {\n return (this.#orders ??= new OrdersService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n this.#getScales(),\n ));\n }\n\n get triggers(): TriggersService {\n return (this.#triggers ??= new TriggersService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n this.#getScales(),\n ));\n }\n\n get balances(): BalancesService {\n return (this.#balances ??= new BalancesService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n this.#getScales(),\n ));\n }\n\n get transfers(): TransfersService {\n return (this.#transfers ??= new TransfersService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n ));\n }\n\n get internalTransfers(): InternalTransfersService {\n return (this.#internalTransfers ??= new InternalTransfersService(\n this.transports,\n this.#getResolver(),\n this.#getScales(),\n ));\n }\n\n get tradingWithdraws(): TradingWithdrawsService {\n return (this.#tradingWithdraws ??= new TradingWithdrawsService(\n this.transports,\n this.#getResolver(),\n {\n chainId: this.#environment.chain.id,\n tradingGatewayAddress: this.#environment.contracts.tradingGatewayAddress,\n },\n this.#getScales(),\n this.catalog,\n ));\n }\n\n get deposit(): DepositService {\n return (this.#deposit ??= new DepositService(this.transports, this.#getResolver()));\n }\n\n get addressBook(): AddressBookService {\n return (this.#addressBook ??= new AddressBookService(\n this.transports,\n this.realtime,\n this.#getResolver(),\n ));\n }\n\n get guardSigner(): GuardSignerService {\n return (this.#guardSigner ??= new GuardSignerService(this.transports, this.#getResolver()));\n }\n\n get socialVerification(): SocialVerificationService {\n return (this.#socialVerification ??= new SocialVerificationService(this.transports));\n }\n\n get whiteboard(): WhiteboardService {\n return (this.#whiteboard ??= new WhiteboardService(this.transports));\n }\n\n get zipper(): ZipperService {\n return (this.#zipper ??= new ZipperService(\n this.transports,\n this.realtime,\n this.#getScales(),\n ));\n }\n\n get mfa(): MfaService {\n return (this.#mfa ??= new MfaService(this.transports));\n }\n\n get claims(): ClaimsService {\n return (this.#claims ??= new ClaimsService(this.transports));\n }\n\n get vip(): VipService {\n return (this.#vip ??= new VipService(this.transports));\n }\n\n get fees(): FeesService {\n return (this.#fees ??= new FeesService(this.transports, this.#getResolver()));\n }\n\n get tradingRateLimits(): RateLimitService {\n return (this.#tradingRateLimits ??= new RateLimitService(\n this.transports,\n this.#getResolver(),\n ));\n }\n\n /**\n * Override in subclasses to provide a subaccount resolver.\n * The resolver is called lazily when service methods are invoked.\n */\n protected createSubaccountResolver(): SubaccountResolver | undefined {\n return undefined;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDA,SAAS,yBACL,MACkD;CAClD,IAAI,CAAC,MAAM,OAAO,CAAC;CACnB,IAAI,KAAK,SAAS,OACd,OAAO;EACH,gBAAgB,YAAY;GACxB,MAAM,QAAQ,MAAM,gBAAgB,IAAI;GACxC,MAAM,UAAkC,CAAC;GACzC,IAAI,OAAO,QAAQ,gBAAgB,UAAU;GAC7C,OAAO;EACX;EACA,eAAe;GACX,IAAI;IACA,MAAM,QAAQ,KAAK,SAAS;IAC5B,IAAI,UAAU,QAAQ,OAAO,UAAU,UAAU;KAE7C,MAAW,YAAY,CAAC,CAAC;KACzB,OAAO;IACX;IACA,OAAO,UAAU,QAAQ,MAAM,SAAS;GAC5C,QAAQ;IAEJ,OAAO;GACX;EACJ;CACJ;CAEJ,OAAO;EACH,iBAAiB,YACb,+BAA+B,MAAM;GACjC,KAAK,QAAQ;GACb,QAAQ,QAAQ;EACpB,CAAC;EACL,eAAe;CACnB;AACJ;;AA0DA,SAAgB,2BACZ,QACsB;CACtB,OAAO,OAAO,YAAY,KAAA,IACpB;EACI,iBAAiB,OAAO;EACxB,aAAa,OAAO;CACxB,IACA,EAAE,SAAS,OAAO,QAAQ;AACpC;;;;AAgBA,SAAgB,2BACZ,QACO;CACP,IAAI,OAAO,WAAW,YAAY,WAAW,QAAQ,MAAM,QAAQ,MAAM,GACrE,MAAM,IAAI,mBAAmB,yCAAyC;CAE1E,MAAM,cAAc,0BAA0B,OAAO,WAA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KC,YAAY,IAAI,cAAc,KAAK,UAAU;CAC9D;CAEA,IAAI,MAAkB;EAClB,OAAQ,KAAKC,SAAS,IAAI,WAAW,KAAK,UAAU;CACxD;CAEA,IAAI,OAAoB;EACpB,OAAQ,KAAKC,UAAU,IAAI,YAAY,KAAK,YAAY,KAAKzB,aAAa,CAAC;CAC/E;CAEA,IAAI,oBAAsC;EACtC,OAAQ,KAAK0B,uBAAuB,IAAI,iBACpC,KAAK,YACL,KAAK1B,aAAa,CACtB;CACJ;;;;;CAMA,2BAAqE,CAErE;AACJ"}
@@ -23,8 +23,10 @@ type CreateWalletChallengeRequest = Message<"auth.v1.CreateWalletChallengeReques
23
23
  */
24
24
  smartAccountAddress: string;
25
25
  /**
26
- * EVM address selected in the wallet and written into the EIP-4361 message.
27
- * For CREATE_SUBACCOUNT, this must equal smart_account_address.
26
+ * Address whose signature authorizes the challenge and that is written into
27
+ * the EIP-4361 message. For LOGIN, this must be an EOA that controls the
28
+ * target smart account. For CREATE_SUBACCOUNT, this must equal
29
+ * smart_account_address.
28
30
  *
29
31
  * @generated from field: string signer_address = 2;
30
32
  */
@@ -88,8 +90,9 @@ type LoginWithWalletRequest = Message<"auth.v1.LoginWithWalletRequest"> & {
88
90
  */
89
91
  smartAccountAddress: string;
90
92
  /**
91
- * Signature over message using EIP-191 personal_sign semantics. Maximum
92
- * length is 8192 characters to support universal wallet signatures.
93
+ * EOA signature over message using EIP-191 personal_sign semantics. A valid
94
+ * value is 65 bytes of hexadecimal with an optional 0x prefix. Requests are
95
+ * limited to 8192 characters.
93
96
  *
94
97
  * @generated from field: string signature = 3;
95
98
  */
@@ -1 +1 @@
1
- {"version":3,"file":"auth_pb.d.ts","names":[],"sources":["../../../../src/gen/auth/v1/auth_pb.ts"],"mappings":";;;;;;;;;;cAea,mBAAmB;;;;;;;KASpB,+BAA+B;;;;;;EAMzC;;;;;;;EAQA;;;;;;;EAQA;;;;;;EAOA,SAAS;;;;;;cAOE,oCAAoC,WAAW;;;;;;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EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;;EAOA;;;;;cAMW,qBAAqB,QAAQ;;;;;;cAQ7B,aAAa;;;;;;EAMxB;IACE;IACA,cAAc;IACd,eAAe;;;;;;;;EAQjB;IACE;IACA,cAAc;IACd,eAAe;;;;;;;;;;;EAWjB;IACE;IACA,cAAc;IACd,eAAe;;;;;;;EAOjB;IACE;IACA,cAAc;IACd,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"auth_pb.js","names":[],"sources":["../../../../src/gen/auth/v1/auth_pb.ts"],"sourcesContent":["// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file auth/v1/auth.proto (package auth.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { SessionInfo } from \"./mfa_pb.js\";\nimport { file_auth_v1_mfa } from \"./mfa_pb.js\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file auth/v1/auth.proto.\n */\nexport const file_auth_v1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lc3QaJi5hdXRoLnYxLkNyZWF0ZVdhbGxldENoYWxsZW5nZVJlc3BvbnNlIgASVgoPTG9naW5XaXRoV2FsbGV0Eh8uYXV0aC52MS5Mb2dpbldpdGhXYWxsZXRSZXF1ZXN0GiAuYXV0aC52MS5Mb2dpbldpdGhXYWxsZXRSZXNwb25zZSIAEk0KC0FjY2VwdFRlcm1zEhsuYXV0aC52MS5BY2NlcHRUZXJtc1JlcXVlc3QaHC5hdXRoLnYxLkFjY2VwdFRlcm1zUmVzcG9uc2UiA5ACAhIvCgJNZRISLmF1dGgudjEuTWVSZXF1ZXN0GhMuYXV0aC52MS5NZVJlc3BvbnNlIgBCPFo6Z2l0aHViLmNvbS9GYWJyaWMtTGFicy9wb2x5ZXN0ZXItc2RrLWdvL2dlbi9hdXRoL3YxO2F1dGh2MWIGcHJvdG8z\", [file_auth_v1_mfa, file_google_protobuf_timestamp]);\n\n/**\n * CreateWalletChallengeRequest requests a short-lived EIP-4361 message whose\n * exact UTF-8 bytes must be signed by the wallet.\n *\n * @generated from message auth.v1.CreateWalletChallengeRequest\n */\nexport type CreateWalletChallengeRequest = Message<\"auth.v1.CreateWalletChallengeRequest\"> & {\n /**\n * Smart-account EVM address being authenticated, formatted as 0x plus 40 hex characters.\n *\n * @generated from field: string smart_account_address = 1;\n */\n smartAccountAddress: string;\n\n /**\n * EVM address selected in the wallet and written into the EIP-4361 message.\n * For CREATE_SUBACCOUNT, this must equal smart_account_address.\n *\n * @generated from field: string signer_address = 2;\n */\n signerAddress: string;\n\n /**\n * Browser origin URI requesting the signature, including scheme and optional\n * port but no path, query, fragment, or user information.\n *\n * @generated from field: string uri = 3;\n */\n uri: string;\n\n /**\n * Operation for which the challenge may be consumed.\n *\n * @generated from field: auth.v1.WalletChallengePurpose purpose = 4;\n */\n purpose: WalletChallengePurpose;\n};\n\n/**\n * Describes the message auth.v1.CreateWalletChallengeRequest.\n * Use `create(CreateWalletChallengeRequestSchema)` to create a new message.\n */\nexport const CreateWalletChallengeRequestSchema: GenMessage<CreateWalletChallengeRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 0);\n\n/**\n * CreateWalletChallengeResponse contains the canonical EIP-4361 message.\n *\n * @generated from message auth.v1.CreateWalletChallengeResponse\n */\nexport type CreateWalletChallengeResponse = Message<\"auth.v1.CreateWalletChallengeResponse\"> & {\n /**\n * Canonical EIP-4361 message. Sign these UTF-8 bytes exactly once with\n * personal_sign; do not hash, alter, or reconstruct the message.\n *\n * @generated from field: string message = 1;\n */\n message: string;\n\n /**\n * Time in UTC when the challenge expires. Wallet challenges expire after 5 minutes.\n *\n * @generated from field: google.protobuf.Timestamp expires_at = 2;\n */\n expiresAt?: Timestamp | undefined;\n};\n\n/**\n * Describes the message auth.v1.CreateWalletChallengeResponse.\n * Use `create(CreateWalletChallengeResponseSchema)` to create a new message.\n */\nexport const CreateWalletChallengeResponseSchema: GenMessage<CreateWalletChallengeResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 1);\n\n/**\n * LoginWithWalletRequest completes smart-account wallet login using the exact\n * server-issued EIP-4361 message and its signature.\n *\n * @generated from message auth.v1.LoginWithWalletRequest\n */\nexport type LoginWithWalletRequest = Message<\"auth.v1.LoginWithWalletRequest\"> & {\n /**\n * Smart-account EVM address bound into the challenge resource, formatted as\n * 0x plus 40 hex characters.\n *\n * @generated from field: string smart_account_address = 1;\n */\n smartAccountAddress: string;\n\n /**\n * Signature over message using EIP-191 personal_sign semantics. Maximum\n * length is 8192 characters to support universal wallet signatures.\n *\n * @generated from field: string signature = 3;\n */\n signature: string;\n\n /**\n * Optional user-agent string for account security and audit displays. Maximum\n * length is 512 characters.\n *\n * @generated from field: string user_agent = 4;\n */\n userAgent: string;\n\n /**\n * Optional caller IP address for account security and audit displays. Maximum\n * length is 64 characters.\n *\n * @generated from field: string ip = 5;\n */\n ip: string;\n\n /**\n * Optional provider hint for the signing wallet. Maximum length is 32 characters.\n *\n * @generated from field: string wallet_provider = 7;\n */\n walletProvider: string;\n\n /**\n * Exact EIP-4361 message returned by CreateWalletChallenge. Maximum length is\n * 4096 UTF-8 bytes.\n *\n * @generated from field: string message = 8;\n */\n message: string;\n};\n\n/**\n * Describes the message auth.v1.LoginWithWalletRequest.\n * Use `create(LoginWithWalletRequestSchema)` to create a new message.\n */\nexport const LoginWithWalletRequestSchema: GenMessage<LoginWithWalletRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 2);\n\n/**\n * LoginWithWalletResponse returns a session token for the authenticated root\n * account.\n *\n * @generated from message auth.v1.LoginWithWalletResponse\n */\nexport type LoginWithWalletResponse = Message<\"auth.v1.LoginWithWalletResponse\"> & {\n /**\n * Bearer access token for authenticated API calls.\n *\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * Time in UTC when access_token expires.\n *\n * @generated from field: google.protobuf.Timestamp expires_at = 2;\n */\n expiresAt?: Timestamp | undefined;\n\n /**\n * Root account the token is bound to (opaque ID).\n *\n * @generated from field: fixed64 account_id = 10;\n */\n accountId: bigint;\n\n /**\n * Optional current username for the root account (empty if not set).\n *\n * @generated from field: string username = 13;\n */\n username: string;\n\n /**\n * Session assurance details for the issued access token.\n *\n * @generated from field: auth.v1.SessionInfo session = 20;\n */\n session?: SessionInfo | undefined;\n};\n\n/**\n * Describes the message auth.v1.LoginWithWalletResponse.\n * Use `create(LoginWithWalletResponseSchema)` to create a new message.\n */\nexport const LoginWithWalletResponseSchema: GenMessage<LoginWithWalletResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 3);\n\n/**\n * MeRequest introspects the authenticated caller from the presented access\n * token or API key.\n *\n * @generated from message auth.v1.MeRequest\n */\nexport type MeRequest = Message<\"auth.v1.MeRequest\"> & {\n};\n\n/**\n * Describes the message auth.v1.MeRequest.\n * Use `create(MeRequestSchema)` to create a new message.\n */\nexport const MeRequestSchema: GenMessage<MeRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 4);\n\n/**\n * MeResponse describes the authenticated caller and current session context.\n *\n * @generated from message auth.v1.MeResponse\n */\nexport type MeResponse = Message<\"auth.v1.MeResponse\"> & {\n /**\n * Root account identifier (opaque ID).\n *\n * @generated from field: fixed64 account_id = 1;\n */\n accountId: bigint;\n\n /**\n * Stable public identifier of the API key that authenticated this request,\n * formatted as \"ak_\" followed by 32 lowercase hexadecimal characters.\n * Absent when the request was not authenticated with an API key.\n *\n * @generated from field: optional string api_key_id = 10;\n */\n apiKeyId?: string | undefined;\n\n /**\n * Optional current username for the root account (empty if not set).\n *\n * @generated from field: string username = 11;\n */\n username: string;\n\n /**\n * Root smart-account EVM address, formatted as 0x plus 40 hex characters.\n * Empty if not set.\n *\n * @generated from field: string root_smart_account_address = 12;\n */\n rootSmartAccountAddress: string;\n\n /**\n * Session assurance details for the presented access token, if any.\n *\n * @generated from field: auth.v1.SessionInfo session = 20;\n */\n session?: SessionInfo | undefined;\n};\n\n/**\n * Describes the message auth.v1.MeResponse.\n * Use `create(MeResponseSchema)` to create a new message.\n */\nexport const MeResponseSchema: GenMessage<MeResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 5);\n\n/**\n * AuthErrorDetail describes an authentication or account-domain failure.\n *\n * @generated from message auth.v1.AuthErrorDetail\n */\nexport type AuthErrorDetail = Message<\"auth.v1.AuthErrorDetail\"> & {\n /**\n * Stable machine-readable auth error code.\n *\n * @generated from field: auth.v1.AuthErrorCode code = 1;\n */\n code: AuthErrorCode;\n\n /**\n * Human-readable error message.\n *\n * @generated from field: string message = 2;\n */\n message: string;\n};\n\n/**\n * Describes the message auth.v1.AuthErrorDetail.\n * Use `create(AuthErrorDetailSchema)` to create a new message.\n */\nexport const AuthErrorDetailSchema: GenMessage<AuthErrorDetail> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 6);\n\n/**\n * AcceptTermsRequest records explicit consent to the currently required terms.\n *\n * @generated from message auth.v1.AcceptTermsRequest\n */\nexport type AcceptTermsRequest = Message<\"auth.v1.AcceptTermsRequest\"> & {\n};\n\n/**\n * Describes the message auth.v1.AcceptTermsRequest.\n * Use `create(AcceptTermsRequestSchema)` to create a new message.\n */\nexport const AcceptTermsRequestSchema: GenMessage<AcceptTermsRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 7);\n\n/**\n * AcceptTermsResponse confirms acceptance. Repeated acceptance of the current\n * version succeeds and preserves the first acceptance time.\n *\n * @generated from message auth.v1.AcceptTermsResponse\n */\nexport type AcceptTermsResponse = Message<\"auth.v1.AcceptTermsResponse\"> & {\n};\n\n/**\n * Describes the message auth.v1.AcceptTermsResponse.\n * Use `create(AcceptTermsResponseSchema)` to create a new message.\n */\nexport const AcceptTermsResponseSchema: GenMessage<AcceptTermsResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 8);\n\n/**\n * Purpose for a server-issued wallet challenge.\n *\n * @generated from enum auth.v1.WalletChallengePurpose\n */\nexport enum WalletChallengePurpose {\n /**\n * No wallet challenge purpose was specified.\n *\n * @generated from enum value: WALLET_PROOF_UNSPECIFIED = 0;\n */\n WALLET_PROOF_UNSPECIFIED = 0,\n\n /**\n * Authenticate the wallet and create a Polyester session.\n *\n * @generated from enum value: LOGIN = 1;\n */\n LOGIN = 1,\n\n /**\n * Prove control of a new smart account before creating a sub-account.\n *\n * @generated from enum value: CREATE_SUBACCOUNT = 2;\n */\n CREATE_SUBACCOUNT = 2,\n}\n\n/**\n * Describes the enum auth.v1.WalletChallengePurpose.\n */\nexport const WalletChallengePurposeSchema: GenEnum<WalletChallengePurpose> = /*@__PURE__*/\n enumDesc(file_auth_v1_auth, 0);\n\n/**\n * High-level error codes for authentication and account-domain failures.\n *\n * @generated from enum auth.v1.AuthErrorCode\n */\nexport enum AuthErrorCode {\n /**\n * No auth error code specified.\n *\n * @generated from enum value: AUTH_UNSPECIFIED = 0;\n */\n AUTH_UNSPECIFIED = 0,\n\n /**\n * Username format or characters are invalid.\n *\n * @generated from enum value: AUTH_USERNAME_INVALID = 1;\n */\n AUTH_USERNAME_INVALID = 1,\n\n /**\n * Username is already used by another account.\n *\n * @generated from enum value: AUTH_USERNAME_TAKEN = 2;\n */\n AUTH_USERNAME_TAKEN = 2,\n\n /**\n * Username was changed too recently.\n *\n * @generated from enum value: AUTH_USERNAME_COOLDOWN = 3;\n */\n AUTH_USERNAME_COOLDOWN = 3,\n\n /**\n * Account is not currently eligible to claim or change a username.\n *\n * @generated from enum value: AUTH_USERNAME_FEATURE_LOCKED = 4;\n */\n AUTH_USERNAME_FEATURE_LOCKED = 4,\n\n /**\n * Username is reserved and cannot be claimed by this account.\n *\n * @generated from enum value: AUTH_USERNAME_RESERVED = 5;\n */\n AUTH_USERNAME_RESERVED = 5,\n\n /**\n * Request is malformed or missing required input.\n *\n * @generated from enum value: AUTH_INVALID_REQUEST = 6;\n */\n AUTH_INVALID_REQUEST = 6,\n\n /**\n * Authentication is required for this operation.\n *\n * @generated from enum value: AUTH_AUTHENTICATION_REQUIRED = 7;\n */\n AUTH_AUTHENTICATION_REQUIRED = 7,\n\n /**\n * Presented session type is not allowed for this operation.\n *\n * @generated from enum value: AUTH_SESSION_KIND_NOT_ALLOWED = 8;\n */\n AUTH_SESSION_KIND_NOT_ALLOWED = 8,\n\n /**\n * Wallet login failed because the nonce or signature could not be verified.\n *\n * @generated from enum value: AUTH_WALLET_LOGIN_FAILED = 9;\n */\n AUTH_WALLET_LOGIN_FAILED = 9,\n\n /**\n * Requested resource was not found.\n *\n * @generated from enum value: AUTH_RESOURCE_NOT_FOUND = 10;\n */\n AUTH_RESOURCE_NOT_FOUND = 10,\n\n /**\n * Caller does not have access to the requested sub-account.\n *\n * @generated from enum value: AUTH_SUBACCOUNT_ACCESS_DENIED = 11;\n */\n AUTH_SUBACCOUNT_ACCESS_DENIED = 11,\n\n /**\n * Caller does not have access to the requested API key.\n *\n * @generated from enum value: AUTH_API_KEY_ACCESS_DENIED = 12;\n */\n AUTH_API_KEY_ACCESS_DENIED = 12,\n\n /**\n * Requested API key status transition is not allowed.\n *\n * @generated from enum value: AUTH_API_KEY_INVALID_STATUS_TRANSITION = 14;\n */\n AUTH_API_KEY_INVALID_STATUS_TRANSITION = 14,\n\n /**\n * Policy definition or binding is invalid.\n *\n * @generated from enum value: AUTH_POLICY_INVALID = 15;\n */\n AUTH_POLICY_INVALID = 15,\n\n /**\n * Smart-account address is already linked to another account.\n *\n * @generated from enum value: AUTH_SMART_ACCOUNT_ALREADY_LINKED = 16;\n */\n AUTH_SMART_ACCOUNT_ALREADY_LINKED = 16,\n\n /**\n * Caller does not have access to the requested invite.\n *\n * @generated from enum value: AUTH_INVITE_ACCESS_DENIED = 17;\n */\n AUTH_INVITE_ACCESS_DENIED = 17,\n\n /**\n * Invite cannot be used in its current state.\n *\n * @generated from enum value: AUTH_INVITE_INVALID_STATE = 18;\n */\n AUTH_INVITE_INVALID_STATE = 18,\n\n /**\n * MFA is not available for this account.\n *\n * @generated from enum value: AUTH_MFA_DISABLED = 19;\n */\n AUTH_MFA_DISABLED = 19,\n\n /**\n * Required MFA factor is not enrolled.\n *\n * @generated from enum value: AUTH_MFA_NOT_ENROLLED = 20;\n */\n AUTH_MFA_NOT_ENROLLED = 20,\n\n /**\n * MFA session is missing, expired, or invalid.\n *\n * @generated from enum value: AUTH_MFA_SESSION_INVALID = 21;\n */\n AUTH_MFA_SESSION_INVALID = 21,\n\n /**\n * MFA challenge was not found.\n *\n * @generated from enum value: AUTH_MFA_CHALLENGE_NOT_FOUND = 22;\n */\n AUTH_MFA_CHALLENGE_NOT_FOUND = 22,\n\n /**\n * MFA challenge payload is invalid.\n *\n * @generated from enum value: AUTH_MFA_CHALLENGE_INVALID = 23;\n */\n AUTH_MFA_CHALLENGE_INVALID = 23,\n\n /**\n * MFA challenge is locked after too many failed attempts.\n *\n * @generated from enum value: AUTH_MFA_CHALLENGE_LOCKED = 24;\n */\n AUTH_MFA_CHALLENGE_LOCKED = 24,\n\n /**\n * One-time password is invalid.\n *\n * @generated from enum value: AUTH_MFA_OTP_INVALID = 25;\n */\n AUTH_MFA_OTP_INVALID = 25,\n\n /**\n * Recovery code is invalid.\n *\n * @generated from enum value: AUTH_MFA_RECOVERY_INVALID = 26;\n */\n AUTH_MFA_RECOVERY_INVALID = 26,\n\n /**\n * Passkey verification is not available for this challenge.\n *\n * @generated from enum value: AUTH_MFA_PASSKEY_NOT_AVAILABLE = 27;\n */\n AUTH_MFA_PASSKEY_NOT_AVAILABLE = 27,\n\n /**\n * Passkey credential is invalid for this account or challenge.\n *\n * @generated from enum value: AUTH_MFA_PASSKEY_CREDENTIAL_INVALID = 28;\n */\n AUTH_MFA_PASSKEY_CREDENTIAL_INVALID = 28,\n\n /**\n * Passkey verification failed.\n *\n * @generated from enum value: AUTH_MFA_PASSKEY_VERIFY_FAILED = 29;\n */\n AUTH_MFA_PASSKEY_VERIFY_FAILED = 29,\n\n /**\n * MFA enrollment binding is invalid or expired.\n *\n * @generated from enum value: AUTH_MFA_ENROLLMENT_BINDING_INVALID = 30;\n */\n AUTH_MFA_ENROLLMENT_BINDING_INVALID = 30,\n\n /**\n * A fresh step-up proof is required for this protected operation.\n *\n * @generated from enum value: AUTH_STEP_UP_REQUIRED = 31;\n */\n AUTH_STEP_UP_REQUIRED = 31,\n\n /**\n * A requested step-up proof is unavailable.\n *\n * @generated from enum value: AUTH_STEP_UP_PROOF_UNAVAILABLE = 32;\n */\n AUTH_STEP_UP_PROOF_UNAVAILABLE = 32,\n\n /**\n * The step-up proof has already been claimed.\n *\n * @generated from enum value: AUTH_STEP_UP_ALREADY_CLAIMED = 33;\n */\n AUTH_STEP_UP_ALREADY_CLAIMED = 33,\n\n /**\n * The requested policy cannot be removed because it is still in use.\n *\n * @generated from enum value: AUTH_POLICY_IN_USE = 34;\n */\n AUTH_POLICY_IN_USE = 34,\n\n /**\n * The requested policy is locked against this mutation.\n *\n * @generated from enum value: AUTH_POLICY_LOCKED = 35;\n */\n AUTH_POLICY_LOCKED = 35,\n\n /**\n * The requested policy does not belong to the target account scope.\n *\n * @generated from enum value: AUTH_POLICY_SCOPE_MISMATCH = 36;\n */\n AUTH_POLICY_SCOPE_MISMATCH = 36,\n\n /**\n * The resource changed after the caller read it.\n *\n * @generated from enum value: AUTH_REVISION_CONFLICT = 37;\n */\n AUTH_REVISION_CONFLICT = 37,\n\n /**\n * A recently MFA-elevated interactive session is required.\n *\n * @generated from enum value: AUTH_MFA_ELEVATION_REQUIRED = 38;\n */\n AUTH_MFA_ELEVATION_REQUIRED = 38,\n\n /**\n * At least one active MFA factor must remain enrolled.\n *\n * @generated from enum value: AUTH_MFA_LAST_FACTOR_REQUIRED = 39;\n */\n AUTH_MFA_LAST_FACTOR_REQUIRED = 39,\n\n /**\n * An unexpected internal failure prevented the auth mutation from completing.\n *\n * @generated from enum value: AUTH_INTERNAL_ERROR = 40;\n */\n AUTH_INTERNAL_ERROR = 40,\n\n /**\n * The caller has not explicitly accepted the currently required terms.\n *\n * @generated from enum value: AUTH_TERMS_NOT_ACCEPTED = 41;\n */\n AUTH_TERMS_NOT_ACCEPTED = 41,\n}\n\n/**\n * Describes the enum auth.v1.AuthErrorCode.\n */\nexport const AuthErrorCodeSchema: GenEnum<AuthErrorCode> = /*@__PURE__*/\n enumDesc(file_auth_v1_auth, 1);\n\n/**\n * AuthService manages wallet login, explicit terms consent, and caller authentication context.\n *\n * @generated from service auth.v1.AuthService\n */\nexport const AuthService: GenService<{\n /**\n * Create a short-lived EIP-4361 wallet challenge.\n *\n * @generated from rpc auth.v1.AuthService.CreateWalletChallenge\n */\n createWalletChallenge: {\n methodKind: \"unary\";\n input: typeof CreateWalletChallengeRequestSchema;\n output: typeof CreateWalletChallengeResponseSchema;\n },\n /**\n * Verify a signed EIP-4361 message and issue an access token. Login and account creation\n * do not accept terms; explicit consent is recorded only by AcceptTerms.\n *\n * @generated from rpc auth.v1.AuthService.LoginWithWallet\n */\n loginWithWallet: {\n methodKind: \"unary\";\n input: typeof LoginWithWalletRequestSchema;\n output: typeof LoginWithWalletResponseSchema;\n },\n /**\n * Explicitly accept the currently required terms for the caller's root account.\n * Requires an interactive JWT session; API keys are not allowed. No MFA is\n * required. Login, trading, reads, and use of existing resources remain available\n * without acceptance. Only CreateSubaccount, CreateApiKey, and\n * CreateDepositAddress require acceptance of the current version.\n *\n * @generated from rpc auth.v1.AuthService.AcceptTerms\n */\n acceptTerms: {\n methodKind: \"unary\";\n input: typeof AcceptTermsRequestSchema;\n output: typeof AcceptTermsResponseSchema;\n },\n /**\n * Return the caller's current auth context.\n *\n * @generated from rpc auth.v1.AuthService.Me\n */\n me: {\n methodKind: \"unary\";\n input: typeof MeRequestSchema;\n output: typeof MeResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_auth_v1_auth, 0);\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAeA,MAAa,oBACX,uBAAS,oiHAAoiH,CAAC,kBAAkB,8BAA8B,CAAC;;;;;AA4CjmH,MAAa,qCACX,0BAAY,mBAAmB,CAAC;;;;;AA4BlC,MAAa,sCACX,0BAAY,mBAAmB,CAAC;;;;;AA6DlC,MAAa,+BACX,0BAAY,mBAAmB,CAAC;;;;;AAiDlC,MAAa,gCACX,0BAAY,mBAAmB,CAAC;;;;;AAelC,MAAa,kBACX,0BAAY,mBAAmB,CAAC;;;;;AAmDlC,MAAa,mBACX,0BAAY,mBAAmB,CAAC;;;;;AA2BlC,MAAa,wBACX,0BAAY,mBAAmB,CAAC;;;;;AAclC,MAAa,2BACX,0BAAY,mBAAmB,CAAC;;;;;AAelC,MAAa,4BACX,0BAAY,mBAAmB,CAAC;;;;;;AAOlC,IAAY,yBAAL,yBAAA,wBAAA;;;;;;CAML,uBAAA,uBAAA,8BAAA,KAAA;;;;;;CAOA,uBAAA,uBAAA,WAAA,KAAA;;;;;;CAOA,uBAAA,uBAAA,uBAAA,KAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,MAAa,+BACX,uBAAS,mBAAmB,CAAC;;;;;;AAO/B,IAAY,gBAAL,yBAAA,eAAA;;;;;;CAML,cAAA,cAAA,s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AAA,MAAA;;;;;;CAOA,cAAA,cAAA,wBAAA,MAAA;;;;;;CAOA,cAAA,cAAA,gCAAA,MAAA;;;;;;CAOA,cAAA,cAAA,4BAAA,MAAA;;;;;;CAOA,cAAA,cAAA,iCAAA,MAAA;;;;;;CAOA,cAAA,cAAA,mCAAA,MAAA;;;;;;CAOA,cAAA,cAAA,yBAAA,MAAA;;;;;;CAOA,cAAA,cAAA,6BAAA,MAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,MAAa,sBACX,uBAAS,mBAAmB,CAAC;;;;;;AAO/B,MAAa,cA+CX,0BAAY,mBAAmB,CAAC"}
1
+ {"version":3,"file":"auth_pb.js","names":[],"sources":["../../../../src/gen/auth/v1/auth_pb.ts"],"sourcesContent":["// @generated by protoc-gen-es v2.13.0 with parameter \"target=ts,import_extension=js\"\n// @generated from file auth/v1/auth.proto (package auth.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenEnum, GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { enumDesc, fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { SessionInfo } from \"./mfa_pb.js\";\nimport { file_auth_v1_mfa } from \"./mfa_pb.js\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file auth/v1/auth.proto.\n */\nexport const file_auth_v1_auth: GenFile = /*@__PURE__*/\n fileDesc(\"ChJhdXRoL3YxL2F1dGgucHJvdG8SB2F1dGgudjEinAEKHENyZWF0ZVdhbGxldENoYWxsZW5nZVJlcXVlc3QSHwoVc21hcnRfYWNjb3VudF9hZGRyZXNzGAEgASgJQgASGAoOc2lnbmVyX2FkZHJlc3MYAiABKAlCABINCgN1cmkYAyABKAlCABIyCgdwdXJwb3NlGAQgASgOMh8uYXV0aC52MS5XYWxsZXRDaGFsbGVuZ2V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FRlcm1zUmVzcG9uc2UiA5ACAhIvCgJNZRISLmF1dGgudjEuTWVSZXF1ZXN0GhMuYXV0aC52MS5NZVJlc3BvbnNlIgBCPFo6Z2l0aHViLmNvbS9GYWJyaWMtTGFicy9wb2x5ZXN0ZXItc2RrLWdvL2dlbi9hdXRoL3YxO2F1dGh2MWIGcHJvdG8z\", [file_auth_v1_mfa, file_google_protobuf_timestamp]);\n\n/**\n * CreateWalletChallengeRequest requests a short-lived EIP-4361 message whose\n * exact UTF-8 bytes must be signed by the wallet.\n *\n * @generated from message auth.v1.CreateWalletChallengeRequest\n */\nexport type CreateWalletChallengeRequest = Message<\"auth.v1.CreateWalletChallengeRequest\"> & {\n /**\n * Smart-account EVM address being authenticated, formatted as 0x plus 40 hex characters.\n *\n * @generated from field: string smart_account_address = 1;\n */\n smartAccountAddress: string;\n\n /**\n * Address whose signature authorizes the challenge and that is written into\n * the EIP-4361 message. For LOGIN, this must be an EOA that controls the\n * target smart account. For CREATE_SUBACCOUNT, this must equal\n * smart_account_address.\n *\n * @generated from field: string signer_address = 2;\n */\n signerAddress: string;\n\n /**\n * Browser origin URI requesting the signature, including scheme and optional\n * port but no path, query, fragment, or user information.\n *\n * @generated from field: string uri = 3;\n */\n uri: string;\n\n /**\n * Operation for which the challenge may be consumed.\n *\n * @generated from field: auth.v1.WalletChallengePurpose purpose = 4;\n */\n purpose: WalletChallengePurpose;\n};\n\n/**\n * Describes the message auth.v1.CreateWalletChallengeRequest.\n * Use `create(CreateWalletChallengeRequestSchema)` to create a new message.\n */\nexport const CreateWalletChallengeRequestSchema: GenMessage<CreateWalletChallengeRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 0);\n\n/**\n * CreateWalletChallengeResponse contains the canonical EIP-4361 message.\n *\n * @generated from message auth.v1.CreateWalletChallengeResponse\n */\nexport type CreateWalletChallengeResponse = Message<\"auth.v1.CreateWalletChallengeResponse\"> & {\n /**\n * Canonical EIP-4361 message. Sign these UTF-8 bytes exactly once with\n * personal_sign; do not hash, alter, or reconstruct the message.\n *\n * @generated from field: string message = 1;\n */\n message: string;\n\n /**\n * Time in UTC when the challenge expires. Wallet challenges expire after 5 minutes.\n *\n * @generated from field: google.protobuf.Timestamp expires_at = 2;\n */\n expiresAt?: Timestamp | undefined;\n};\n\n/**\n * Describes the message auth.v1.CreateWalletChallengeResponse.\n * Use `create(CreateWalletChallengeResponseSchema)` to create a new message.\n */\nexport const CreateWalletChallengeResponseSchema: GenMessage<CreateWalletChallengeResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 1);\n\n/**\n * LoginWithWalletRequest completes smart-account wallet login using the exact\n * server-issued EIP-4361 message and its signature.\n *\n * @generated from message auth.v1.LoginWithWalletRequest\n */\nexport type LoginWithWalletRequest = Message<\"auth.v1.LoginWithWalletRequest\"> & {\n /**\n * Smart-account EVM address bound into the challenge resource, formatted as\n * 0x plus 40 hex characters.\n *\n * @generated from field: string smart_account_address = 1;\n */\n smartAccountAddress: string;\n\n /**\n * EOA signature over message using EIP-191 personal_sign semantics. A valid\n * value is 65 bytes of hexadecimal with an optional 0x prefix. Requests are\n * limited to 8192 characters.\n *\n * @generated from field: string signature = 3;\n */\n signature: string;\n\n /**\n * Optional user-agent string for account security and audit displays. Maximum\n * length is 512 characters.\n *\n * @generated from field: string user_agent = 4;\n */\n userAgent: string;\n\n /**\n * Optional caller IP address for account security and audit displays. Maximum\n * length is 64 characters.\n *\n * @generated from field: string ip = 5;\n */\n ip: string;\n\n /**\n * Optional provider hint for the signing wallet. Maximum length is 32 characters.\n *\n * @generated from field: string wallet_provider = 7;\n */\n walletProvider: string;\n\n /**\n * Exact EIP-4361 message returned by CreateWalletChallenge. Maximum length is\n * 4096 UTF-8 bytes.\n *\n * @generated from field: string message = 8;\n */\n message: string;\n};\n\n/**\n * Describes the message auth.v1.LoginWithWalletRequest.\n * Use `create(LoginWithWalletRequestSchema)` to create a new message.\n */\nexport const LoginWithWalletRequestSchema: GenMessage<LoginWithWalletRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 2);\n\n/**\n * LoginWithWalletResponse returns a session token for the authenticated root\n * account.\n *\n * @generated from message auth.v1.LoginWithWalletResponse\n */\nexport type LoginWithWalletResponse = Message<\"auth.v1.LoginWithWalletResponse\"> & {\n /**\n * Bearer access token for authenticated API calls.\n *\n * @generated from field: string access_token = 1;\n */\n accessToken: string;\n\n /**\n * Time in UTC when access_token expires.\n *\n * @generated from field: google.protobuf.Timestamp expires_at = 2;\n */\n expiresAt?: Timestamp | undefined;\n\n /**\n * Root account the token is bound to (opaque ID).\n *\n * @generated from field: fixed64 account_id = 10;\n */\n accountId: bigint;\n\n /**\n * Optional current username for the root account (empty if not set).\n *\n * @generated from field: string username = 13;\n */\n username: string;\n\n /**\n * Session assurance details for the issued access token.\n *\n * @generated from field: auth.v1.SessionInfo session = 20;\n */\n session?: SessionInfo | undefined;\n};\n\n/**\n * Describes the message auth.v1.LoginWithWalletResponse.\n * Use `create(LoginWithWalletResponseSchema)` to create a new message.\n */\nexport const LoginWithWalletResponseSchema: GenMessage<LoginWithWalletResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 3);\n\n/**\n * MeRequest introspects the authenticated caller from the presented access\n * token or API key.\n *\n * @generated from message auth.v1.MeRequest\n */\nexport type MeRequest = Message<\"auth.v1.MeRequest\"> & {\n};\n\n/**\n * Describes the message auth.v1.MeRequest.\n * Use `create(MeRequestSchema)` to create a new message.\n */\nexport const MeRequestSchema: GenMessage<MeRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 4);\n\n/**\n * MeResponse describes the authenticated caller and current session context.\n *\n * @generated from message auth.v1.MeResponse\n */\nexport type MeResponse = Message<\"auth.v1.MeResponse\"> & {\n /**\n * Root account identifier (opaque ID).\n *\n * @generated from field: fixed64 account_id = 1;\n */\n accountId: bigint;\n\n /**\n * Stable public identifier of the API key that authenticated this request,\n * formatted as \"ak_\" followed by 32 lowercase hexadecimal characters.\n * Absent when the request was not authenticated with an API key.\n *\n * @generated from field: optional string api_key_id = 10;\n */\n apiKeyId?: string | undefined;\n\n /**\n * Optional current username for the root account (empty if not set).\n *\n * @generated from field: string username = 11;\n */\n username: string;\n\n /**\n * Root smart-account EVM address, formatted as 0x plus 40 hex characters.\n * Empty if not set.\n *\n * @generated from field: string root_smart_account_address = 12;\n */\n rootSmartAccountAddress: string;\n\n /**\n * Session assurance details for the presented access token, if any.\n *\n * @generated from field: auth.v1.SessionInfo session = 20;\n */\n session?: SessionInfo | undefined;\n};\n\n/**\n * Describes the message auth.v1.MeResponse.\n * Use `create(MeResponseSchema)` to create a new message.\n */\nexport const MeResponseSchema: GenMessage<MeResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 5);\n\n/**\n * AuthErrorDetail describes an authentication or account-domain failure.\n *\n * @generated from message auth.v1.AuthErrorDetail\n */\nexport type AuthErrorDetail = Message<\"auth.v1.AuthErrorDetail\"> & {\n /**\n * Stable machine-readable auth error code.\n *\n * @generated from field: auth.v1.AuthErrorCode code = 1;\n */\n code: AuthErrorCode;\n\n /**\n * Human-readable error message.\n *\n * @generated from field: string message = 2;\n */\n message: string;\n};\n\n/**\n * Describes the message auth.v1.AuthErrorDetail.\n * Use `create(AuthErrorDetailSchema)` to create a new message.\n */\nexport const AuthErrorDetailSchema: GenMessage<AuthErrorDetail> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 6);\n\n/**\n * AcceptTermsRequest records explicit consent to the currently required terms.\n *\n * @generated from message auth.v1.AcceptTermsRequest\n */\nexport type AcceptTermsRequest = Message<\"auth.v1.AcceptTermsRequest\"> & {\n};\n\n/**\n * Describes the message auth.v1.AcceptTermsRequest.\n * Use `create(AcceptTermsRequestSchema)` to create a new message.\n */\nexport const AcceptTermsRequestSchema: GenMessage<AcceptTermsRequest> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 7);\n\n/**\n * AcceptTermsResponse confirms acceptance. Repeated acceptance of the current\n * version succeeds and preserves the first acceptance time.\n *\n * @generated from message auth.v1.AcceptTermsResponse\n */\nexport type AcceptTermsResponse = Message<\"auth.v1.AcceptTermsResponse\"> & {\n};\n\n/**\n * Describes the message auth.v1.AcceptTermsResponse.\n * Use `create(AcceptTermsResponseSchema)` to create a new message.\n */\nexport const AcceptTermsResponseSchema: GenMessage<AcceptTermsResponse> = /*@__PURE__*/\n messageDesc(file_auth_v1_auth, 8);\n\n/**\n * Purpose for a server-issued wallet challenge.\n *\n * @generated from enum auth.v1.WalletChallengePurpose\n */\nexport enum WalletChallengePurpose {\n /**\n * No wallet challenge purpose was specified.\n *\n * @generated from enum value: WALLET_PROOF_UNSPECIFIED = 0;\n */\n WALLET_PROOF_UNSPECIFIED = 0,\n\n /**\n * Authenticate the wallet and create a Polyester session.\n *\n * @generated from enum value: LOGIN = 1;\n */\n LOGIN = 1,\n\n /**\n * Prove control of a new smart account before creating a sub-account.\n *\n * @generated from enum value: CREATE_SUBACCOUNT = 2;\n */\n CREATE_SUBACCOUNT = 2,\n}\n\n/**\n * Describes the enum auth.v1.WalletChallengePurpose.\n */\nexport const WalletChallengePurposeSchema: GenEnum<WalletChallengePurpose> = /*@__PURE__*/\n enumDesc(file_auth_v1_auth, 0);\n\n/**\n * High-level error codes for authentication and account-domain failures.\n *\n * @generated from enum auth.v1.AuthErrorCode\n */\nexport enum AuthErrorCode {\n /**\n * No auth error code specified.\n *\n * @generated from enum value: AUTH_UNSPECIFIED = 0;\n */\n AUTH_UNSPECIFIED = 0,\n\n /**\n * Username format or characters are invalid.\n *\n * @generated from enum value: AUTH_USERNAME_INVALID = 1;\n */\n AUTH_USERNAME_INVALID = 1,\n\n /**\n * Username is already used by another account.\n *\n * @generated from enum value: AUTH_USERNAME_TAKEN = 2;\n */\n AUTH_USERNAME_TAKEN = 2,\n\n /**\n * Username was changed too recently.\n *\n * @generated from enum value: AUTH_USERNAME_COOLDOWN = 3;\n */\n AUTH_USERNAME_COOLDOWN = 3,\n\n /**\n * Account is not currently eligible to claim or change a username.\n *\n * @generated from enum value: AUTH_USERNAME_FEATURE_LOCKED = 4;\n */\n AUTH_USERNAME_FEATURE_LOCKED = 4,\n\n /**\n * Username is reserved and cannot be claimed by this account.\n *\n * @generated from enum value: AUTH_USERNAME_RESERVED = 5;\n */\n AUTH_USERNAME_RESERVED = 5,\n\n /**\n * Request is malformed or missing required input.\n *\n * @generated from enum value: AUTH_INVALID_REQUEST = 6;\n */\n AUTH_INVALID_REQUEST = 6,\n\n /**\n * Authentication is required for this operation.\n *\n * @generated from enum value: AUTH_AUTHENTICATION_REQUIRED = 7;\n */\n AUTH_AUTHENTICATION_REQUIRED = 7,\n\n /**\n * Presented session type is not allowed for this operation.\n *\n * @generated from enum value: AUTH_SESSION_KIND_NOT_ALLOWED = 8;\n */\n AUTH_SESSION_KIND_NOT_ALLOWED = 8,\n\n /**\n * Wallet login failed because the nonce or signature could not be verified.\n *\n * @generated from enum value: AUTH_WALLET_LOGIN_FAILED = 9;\n */\n AUTH_WALLET_LOGIN_FAILED = 9,\n\n /**\n * Requested resource was not found.\n *\n * @generated from enum value: AUTH_RESOURCE_NOT_FOUND = 10;\n */\n AUTH_RESOURCE_NOT_FOUND = 10,\n\n /**\n * Caller does not have access to the requested sub-account.\n *\n * @generated from enum value: AUTH_SUBACCOUNT_ACCESS_DENIED = 11;\n */\n AUTH_SUBACCOUNT_ACCESS_DENIED = 11,\n\n /**\n * Caller does not have access to the requested API key.\n *\n * @generated from enum value: AUTH_API_KEY_ACCESS_DENIED = 12;\n */\n AUTH_API_KEY_ACCESS_DENIED = 12,\n\n /**\n * Requested API key status transition is not allowed.\n *\n * @generated from enum value: AUTH_API_KEY_INVALID_STATUS_TRANSITION = 14;\n */\n AUTH_API_KEY_INVALID_STATUS_TRANSITION = 14,\n\n /**\n * Policy definition or binding is invalid.\n *\n * @generated from enum value: AUTH_POLICY_INVALID = 15;\n */\n AUTH_POLICY_INVALID = 15,\n\n /**\n * Smart-account address is already linked to another account.\n *\n * @generated from enum value: AUTH_SMART_ACCOUNT_ALREADY_LINKED = 16;\n */\n AUTH_SMART_ACCOUNT_ALREADY_LINKED = 16,\n\n /**\n * Caller does not have access to the requested invite.\n *\n * @generated from enum value: AUTH_INVITE_ACCESS_DENIED = 17;\n */\n AUTH_INVITE_ACCESS_DENIED = 17,\n\n /**\n * Invite cannot be used in its current state.\n *\n * @generated from enum value: AUTH_INVITE_INVALID_STATE = 18;\n */\n AUTH_INVITE_INVALID_STATE = 18,\n\n /**\n * MFA is not available for this account.\n *\n * @generated from enum value: AUTH_MFA_DISABLED = 19;\n */\n AUTH_MFA_DISABLED = 19,\n\n /**\n * Required MFA factor is not enrolled.\n *\n * @generated from enum value: AUTH_MFA_NOT_ENROLLED = 20;\n */\n AUTH_MFA_NOT_ENROLLED = 20,\n\n /**\n * MFA session is missing, expired, or invalid.\n *\n * @generated from enum value: AUTH_MFA_SESSION_INVALID = 21;\n */\n AUTH_MFA_SESSION_INVALID = 21,\n\n /**\n * MFA challenge was not found.\n *\n * @generated from enum value: AUTH_MFA_CHALLENGE_NOT_FOUND = 22;\n */\n AUTH_MFA_CHALLENGE_NOT_FOUND = 22,\n\n /**\n * MFA challenge payload is invalid.\n *\n * @generated from enum value: AUTH_MFA_CHALLENGE_INVALID = 23;\n */\n AUTH_MFA_CHALLENGE_INVALID = 23,\n\n /**\n * MFA challenge is locked after too many failed attempts.\n *\n * @generated from enum value: AUTH_MFA_CHALLENGE_LOCKED = 24;\n */\n AUTH_MFA_CHALLENGE_LOCKED = 24,\n\n /**\n * One-time password is invalid.\n *\n * @generated from enum value: AUTH_MFA_OTP_INVALID = 25;\n */\n AUTH_MFA_OTP_INVALID = 25,\n\n /**\n * Recovery code is invalid.\n *\n * @generated from enum value: AUTH_MFA_RECOVERY_INVALID = 26;\n */\n AUTH_MFA_RECOVERY_INVALID = 26,\n\n /**\n * Passkey verification is not available for this challenge.\n *\n * @generated from enum value: AUTH_MFA_PASSKEY_NOT_AVAILABLE = 27;\n */\n AUTH_MFA_PASSKEY_NOT_AVAILABLE = 27,\n\n /**\n * Passkey credential is invalid for this account or challenge.\n *\n * @generated from enum value: AUTH_MFA_PASSKEY_CREDENTIAL_INVALID = 28;\n */\n AUTH_MFA_PASSKEY_CREDENTIAL_INVALID = 28,\n\n /**\n * Passkey verification failed.\n *\n * @generated from enum value: AUTH_MFA_PASSKEY_VERIFY_FAILED = 29;\n */\n AUTH_MFA_PASSKEY_VERIFY_FAILED = 29,\n\n /**\n * MFA enrollment binding is invalid or expired.\n *\n * @generated from enum value: AUTH_MFA_ENROLLMENT_BINDING_INVALID = 30;\n */\n AUTH_MFA_ENROLLMENT_BINDING_INVALID = 30,\n\n /**\n * A fresh step-up proof is required for this protected operation.\n *\n * @generated from enum value: AUTH_STEP_UP_REQUIRED = 31;\n */\n AUTH_STEP_UP_REQUIRED = 31,\n\n /**\n * A requested step-up proof is unavailable.\n *\n * @generated from enum value: AUTH_STEP_UP_PROOF_UNAVAILABLE = 32;\n */\n AUTH_STEP_UP_PROOF_UNAVAILABLE = 32,\n\n /**\n * The step-up proof has already been claimed.\n *\n * @generated from enum value: AUTH_STEP_UP_ALREADY_CLAIMED = 33;\n */\n AUTH_STEP_UP_ALREADY_CLAIMED = 33,\n\n /**\n * The requested policy cannot be removed because it is still in use.\n *\n * @generated from enum value: AUTH_POLICY_IN_USE = 34;\n */\n AUTH_POLICY_IN_USE = 34,\n\n /**\n * The requested policy is locked against this mutation.\n *\n * @generated from enum value: AUTH_POLICY_LOCKED = 35;\n */\n AUTH_POLICY_LOCKED = 35,\n\n /**\n * The requested policy does not belong to the target account scope.\n *\n * @generated from enum value: AUTH_POLICY_SCOPE_MISMATCH = 36;\n */\n AUTH_POLICY_SCOPE_MISMATCH = 36,\n\n /**\n * The resource changed after the caller read it.\n *\n * @generated from enum value: AUTH_REVISION_CONFLICT = 37;\n */\n AUTH_REVISION_CONFLICT = 37,\n\n /**\n * A recently MFA-elevated interactive session is required.\n *\n * @generated from enum value: AUTH_MFA_ELEVATION_REQUIRED = 38;\n */\n AUTH_MFA_ELEVATION_REQUIRED = 38,\n\n /**\n * At least one active MFA factor must remain enrolled.\n *\n * @generated from enum value: AUTH_MFA_LAST_FACTOR_REQUIRED = 39;\n */\n AUTH_MFA_LAST_FACTOR_REQUIRED = 39,\n\n /**\n * An unexpected internal failure prevented the auth mutation from completing.\n *\n * @generated from enum value: AUTH_INTERNAL_ERROR = 40;\n */\n AUTH_INTERNAL_ERROR = 40,\n\n /**\n * The caller has not explicitly accepted the currently required terms.\n *\n * @generated from enum value: AUTH_TERMS_NOT_ACCEPTED = 41;\n */\n AUTH_TERMS_NOT_ACCEPTED = 41,\n}\n\n/**\n * Describes the enum auth.v1.AuthErrorCode.\n */\nexport const AuthErrorCodeSchema: GenEnum<AuthErrorCode> = /*@__PURE__*/\n enumDesc(file_auth_v1_auth, 1);\n\n/**\n * AuthService manages wallet login, explicit terms consent, and caller authentication context.\n *\n * @generated from service auth.v1.AuthService\n */\nexport const AuthService: GenService<{\n /**\n * Create a short-lived EIP-4361 wallet challenge.\n *\n * @generated from rpc auth.v1.AuthService.CreateWalletChallenge\n */\n createWalletChallenge: {\n methodKind: \"unary\";\n input: typeof CreateWalletChallengeRequestSchema;\n output: typeof CreateWalletChallengeResponseSchema;\n },\n /**\n * Verify a signed EIP-4361 message and issue an access token. Login and account creation\n * do not accept terms; explicit consent is recorded only by AcceptTerms.\n *\n * @generated from rpc auth.v1.AuthService.LoginWithWallet\n */\n loginWithWallet: {\n methodKind: \"unary\";\n input: typeof LoginWithWalletRequestSchema;\n output: typeof LoginWithWalletResponseSchema;\n },\n /**\n * Explicitly accept the currently required terms for the caller's root account.\n * Requires an interactive JWT session; API keys are not allowed. No MFA is\n * required. Login, trading, reads, and use of existing resources remain available\n * without acceptance. Only CreateSubaccount, CreateApiKey, and\n * CreateDepositAddress require acceptance of the current version.\n *\n * @generated from rpc auth.v1.AuthService.AcceptTerms\n */\n acceptTerms: {\n methodKind: \"unary\";\n input: typeof AcceptTermsRequestSchema;\n output: typeof AcceptTermsResponseSchema;\n },\n /**\n * Return the caller's current auth context.\n *\n * @generated from rpc auth.v1.AuthService.Me\n */\n me: {\n methodKind: \"unary\";\n input: typeof MeRequestSchema;\n output: typeof MeResponseSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_auth_v1_auth, 0);\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAeA,MAAa,oBACX,uBAAS,oiHAAoiH,CAAC,kBAAkB,8BAA8B,CAAC;;;;;AA8CjmH,MAAa,qCACX,0BAAY,mBAAmB,CAAC;;;;;AA4BlC,MAAa,sCACX,0BAAY,mBAAmB,CAAC;;;;;AA8DlC,MAAa,+BACX,0BAAY,mBAAmB,CAAC;;;;;AAiDlC,MAAa,gCACX,0BAAY,mBAAmB,CAAC;;;;;AAelC,MAAa,kBACX,0BAAY,mBAAmB,CAAC;;;;;AAmDlC,MAAa,mBACX,0BAAY,mBAAmB,CAAC;;;;;AA2BlC,MAAa,wBACX,0BAAY,mBAAmB,CAAC;;;;;AAclC,MAAa,2BACX,0BAAY,mBAAmB,CAAC;;;;;AAelC,MAAa,4BACX,0BAAY,mBAAmB,CAAC;;;;;;AAOlC,IAAY,yBAAL,yBAAA,wBAAA;;;;;;CAML,uBAAA,uBAAA,8BAAA,KAAA;;;;;;CAOA,uBAAA,uBAAA,WAAA,KAAA;;;;;;CAOA,uBAAA,uBAAA,uBAAA,KAAA;;AACF,EAAA,CAAA,CAAA;;;;AAKA,MAAa,+BACX,uBAAS,mBAAmB,CAAC;;;;;;AAO/B,IAAY,gBAAL,yBAAA,eAAA;;;;;;CAML,cAAA,cAAA,sBAAA,KAAA;;;;;;CAOA,cAAA,cAAA,2BAAA,KAAA;;;;;;CAOA,cAAA,cAAA,yBAAA,KAAA;;;;;;CAOA,cAAA,cAAA,4BAAA,KAAA;;;;;;CAOA,cAAA,cAAA,kCAAA,KAAA;;;;;;CAOA,cAAA,cAAA,4BAAA,KAAA;;;;;;CAOA,cAAA,cAAA,0BAAA,KAA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