@polyester/sdk 0.35.0-devnet-20261111025029 → 0.35.0-devnet-20261111140253

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 (261) hide show
  1. package/CHANGELOG.md +43 -1
  2. package/dist/catalogs/index.d.ts +2 -2
  3. package/dist/catalogs/snapshot-validation.js +7 -3
  4. package/dist/catalogs/snapshot-validation.js.map +1 -1
  5. package/dist/gen/ai/v1/assistant_pb.d.ts +4164 -0
  6. package/dist/gen/ai/v1/assistant_pb.d.ts.map +1 -0
  7. package/dist/gen/ai/v1/assistant_pb.js +1174 -0
  8. package/dist/gen/ai/v1/assistant_pb.js.map +1 -0
  9. package/dist/gen/alerts/v1/price_alerts_pb.d.ts +776 -0
  10. package/dist/gen/alerts/v1/price_alerts_pb.d.ts.map +1 -0
  11. package/dist/gen/alerts/v1/price_alerts_pb.js +378 -0
  12. package/dist/gen/alerts/v1/price_alerts_pb.js.map +1 -0
  13. package/dist/gen/auth/v1/address_book_pb.d.ts +6 -0
  14. package/dist/gen/auth/v1/address_book_pb.d.ts.map +1 -1
  15. package/dist/gen/auth/v1/address_book_pb.js +6 -0
  16. package/dist/gen/auth/v1/address_book_pb.js.map +1 -1
  17. package/dist/gen/auth/v1/api_keys_pb.d.ts +247 -3
  18. package/dist/gen/auth/v1/api_keys_pb.d.ts.map +1 -1
  19. package/dist/gen/auth/v1/api_keys_pb.js +81 -2
  20. package/dist/gen/auth/v1/api_keys_pb.js.map +1 -1
  21. package/dist/gen/auth/v1/auth_pb.d.ts +55 -6
  22. package/dist/gen/auth/v1/auth_pb.d.ts.map +1 -1
  23. package/dist/gen/auth/v1/auth_pb.js +55 -6
  24. package/dist/gen/auth/v1/auth_pb.js.map +1 -1
  25. package/dist/gen/auth/v1/policies_pb.d.ts +186 -14
  26. package/dist/gen/auth/v1/policies_pb.d.ts.map +1 -1
  27. package/dist/gen/auth/v1/policies_pb.js +163 -6
  28. package/dist/gen/auth/v1/policies_pb.js.map +1 -1
  29. package/dist/gen/auth/v1/profile_pb.d.ts +4 -2
  30. package/dist/gen/auth/v1/profile_pb.d.ts.map +1 -1
  31. package/dist/gen/auth/v1/profile_pb.js.map +1 -1
  32. package/dist/gen/auth/v1/resolve_pb.d.ts +1 -0
  33. package/dist/gen/auth/v1/resolve_pb.d.ts.map +1 -1
  34. package/dist/gen/auth/v1/resolve_pb.js.map +1 -1
  35. package/dist/gen/auth/v1/social_verification_pb.d.ts +170 -11
  36. package/dist/gen/auth/v1/social_verification_pb.d.ts.map +1 -1
  37. package/dist/gen/auth/v1/social_verification_pb.js +41 -3
  38. package/dist/gen/auth/v1/social_verification_pb.js.map +1 -1
  39. package/dist/gen/auth/v1/subaccounts_pb.d.ts +25 -9
  40. package/dist/gen/auth/v1/subaccounts_pb.d.ts.map +1 -1
  41. package/dist/gen/auth/v1/subaccounts_pb.js.map +1 -1
  42. package/dist/gen/chain/deposit/v1/deposit_pb.d.ts +4 -2
  43. package/dist/gen/chain/deposit/v1/deposit_pb.d.ts.map +1 -1
  44. package/dist/gen/chain/deposit/v1/deposit_pb.js.map +1 -1
  45. package/dist/gen/chain/guard/v1/guard_signer_pb.d.ts +5 -0
  46. package/dist/gen/chain/guard/v1/guard_signer_pb.d.ts.map +1 -1
  47. package/dist/gen/chain/guard/v1/guard_signer_pb.js.map +1 -1
  48. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts +10 -0
  49. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.d.ts.map +1 -1
  50. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js +1 -1
  51. package/dist/gen/chain/lifecycle/v1/lifecycle_read_pb.js.map +1 -1
  52. package/dist/gen/chain/lifecycle/v1/types_pb.d.ts +32 -4
  53. package/dist/gen/chain/lifecycle/v1/types_pb.d.ts.map +1 -1
  54. package/dist/gen/chain/lifecycle/v1/types_pb.js +32 -4
  55. package/dist/gen/chain/lifecycle/v1/types_pb.js.map +1 -1
  56. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts +391 -42
  57. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.d.ts.map +1 -1
  58. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.js +103 -17
  59. package/dist/gen/chain/withdraw/v1/auto_withdraw_pb.js.map +1 -1
  60. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts +172 -4
  61. package/dist/gen/chain/withdraw/v1/withdraw_pb.d.ts.map +1 -1
  62. package/dist/gen/chain/withdraw/v1/withdraw_pb.js +63 -2
  63. package/dist/gen/chain/withdraw/v1/withdraw_pb.js.map +1 -1
  64. package/dist/gen/chain/zipper/v1/zipper_pb.d.ts +57 -3
  65. package/dist/gen/chain/zipper/v1/zipper_pb.d.ts.map +1 -1
  66. package/dist/gen/chain/zipper/v1/zipper_pb.js +41 -3
  67. package/dist/gen/chain/zipper/v1/zipper_pb.js.map +1 -1
  68. package/dist/gen/checkpoints/v1/checkpoints_pb.d.ts +2 -1
  69. package/dist/gen/checkpoints/v1/checkpoints_pb.d.ts.map +1 -1
  70. package/dist/gen/checkpoints/v1/checkpoints_pb.js.map +1 -1
  71. package/dist/gen/claims/v1/claims_pb.d.ts +20 -3
  72. package/dist/gen/claims/v1/claims_pb.d.ts.map +1 -1
  73. package/dist/gen/claims/v1/claims_pb.js +12 -3
  74. package/dist/gen/claims/v1/claims_pb.js.map +1 -1
  75. package/dist/gen/index.d.ts +9 -5
  76. package/dist/gen/index.js +5 -1
  77. package/dist/gen/ledger/v1/catalog_pb.d.ts +52 -1
  78. package/dist/gen/ledger/v1/catalog_pb.d.ts.map +1 -1
  79. package/dist/gen/ledger/v1/catalog_pb.js +52 -1
  80. package/dist/gen/ledger/v1/catalog_pb.js.map +1 -1
  81. package/dist/gen/marketdata/v1/heatmap_pb.d.ts +6 -0
  82. package/dist/gen/marketdata/v1/heatmap_pb.d.ts.map +1 -1
  83. package/dist/gen/marketdata/v1/heatmap_pb.js.map +1 -1
  84. package/dist/gen/marketdata/v1/marketdata_pb.d.ts +8 -0
  85. package/dist/gen/marketdata/v1/marketdata_pb.d.ts.map +1 -1
  86. package/dist/gen/marketdata/v1/marketdata_pb.js +1 -1
  87. package/dist/gen/marketdata/v1/marketdata_pb.js.map +1 -1
  88. package/dist/gen/orders/v1/orders_pb.d.ts +29 -8
  89. package/dist/gen/orders/v1/orders_pb.d.ts.map +1 -1
  90. package/dist/gen/orders/v1/orders_pb.js +18 -5
  91. package/dist/gen/orders/v1/orders_pb.js.map +1 -1
  92. package/dist/gen/polyester/ratelimit/v1/types_pb.d.ts +20 -1
  93. package/dist/gen/polyester/ratelimit/v1/types_pb.d.ts.map +1 -1
  94. package/dist/gen/polyester/ratelimit/v1/types_pb.js +20 -1
  95. package/dist/gen/polyester/ratelimit/v1/types_pb.js.map +1 -1
  96. package/dist/gen/rewards/v1/rewards_pb.d.ts +74 -3
  97. package/dist/gen/rewards/v1/rewards_pb.d.ts.map +1 -1
  98. package/dist/gen/rewards/v1/rewards_pb.js +16 -4
  99. package/dist/gen/rewards/v1/rewards_pb.js.map +1 -1
  100. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts +1268 -67
  101. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.d.ts.map +1 -1
  102. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js +306 -5
  103. package/dist/gen/swap/quickswap/v1/quickswap_broker_pb.js.map +1 -1
  104. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts +298 -54
  105. package/dist/gen/swap/quickswap/v1/quickswap_pb.d.ts.map +1 -1
  106. package/dist/gen/swap/quickswap/v1/quickswap_pb.js +183 -37
  107. package/dist/gen/swap/quickswap/v1/quickswap_pb.js.map +1 -1
  108. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts +933 -0
  109. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.d.ts.map +1 -0
  110. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.js +292 -0
  111. package/dist/gen/swap/quickswap/v1/quickswap_referral_pb.js.map +1 -0
  112. package/dist/gen/system/v1/system_pb.d.ts +77 -0
  113. package/dist/gen/system/v1/system_pb.d.ts.map +1 -0
  114. package/dist/gen/system/v1/system_pb.js +34 -0
  115. package/dist/gen/system/v1/system_pb.js.map +1 -0
  116. package/dist/gen/tradews/v1/trade_ws_pb.d.ts +2 -2
  117. package/dist/gen/tradews/v1/trade_ws_pb.js.map +1 -1
  118. package/dist/gen/transfer/v1/internal_transfer_pb.d.ts +101 -2
  119. package/dist/gen/transfer/v1/internal_transfer_pb.d.ts.map +1 -1
  120. package/dist/gen/transfer/v1/internal_transfer_pb.js +14 -2
  121. package/dist/gen/transfer/v1/internal_transfer_pb.js.map +1 -1
  122. package/dist/gen/vip/v1/vip_pb.d.ts +1 -0
  123. package/dist/gen/vip/v1/vip_pb.d.ts.map +1 -1
  124. package/dist/gen/vip/v1/vip_pb.js.map +1 -1
  125. package/dist/index.d.ts +9 -9
  126. package/dist/index.js +2 -2
  127. package/dist/services/address-book/address-book.schemas.d.ts +2 -2
  128. package/dist/services/api-keys/api-keys.codecs.js +10 -1
  129. package/dist/services/api-keys/api-keys.codecs.js.map +1 -1
  130. package/dist/services/api-keys/api-keys.schemas.d.ts +4 -0
  131. package/dist/services/api-keys/api-keys.schemas.d.ts.map +1 -1
  132. package/dist/services/api-keys/api-keys.schemas.js +3 -1
  133. package/dist/services/api-keys/api-keys.schemas.js.map +1 -1
  134. package/dist/services/auto-withdraw/auto-withdraw.codecs.d.ts +9 -2
  135. package/dist/services/auto-withdraw/auto-withdraw.codecs.d.ts.map +1 -1
  136. package/dist/services/auto-withdraw/auto-withdraw.codecs.js +9 -1
  137. package/dist/services/auto-withdraw/auto-withdraw.codecs.js.map +1 -1
  138. package/dist/services/auto-withdraw/auto-withdraw.d.ts +15 -4
  139. package/dist/services/auto-withdraw/auto-withdraw.d.ts.map +1 -1
  140. package/dist/services/auto-withdraw/auto-withdraw.js +24 -8
  141. package/dist/services/auto-withdraw/auto-withdraw.js.map +1 -1
  142. package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts +375 -7
  143. package/dist/services/auto-withdraw/auto-withdraw.schemas.d.ts.map +1 -1
  144. package/dist/services/auto-withdraw/auto-withdraw.schemas.js +66 -11
  145. package/dist/services/auto-withdraw/auto-withdraw.schemas.js.map +1 -1
  146. package/dist/services/auto-withdraw/auto-withdraw.types.d.ts +3 -3
  147. package/dist/services/changelog/changelog.schemas.d.ts +17 -17
  148. package/dist/services/checkpoints/checkpoints.schemas.d.ts +2 -2
  149. package/dist/services/claims/claims.d.ts +5 -2
  150. package/dist/services/claims/claims.d.ts.map +1 -1
  151. package/dist/services/claims/claims.js +5 -2
  152. package/dist/services/claims/claims.js.map +1 -1
  153. package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
  154. package/dist/services/internal-transfers/internal-transfers.d.ts +13 -4
  155. package/dist/services/internal-transfers/internal-transfers.d.ts.map +1 -1
  156. package/dist/services/internal-transfers/internal-transfers.js +17 -3
  157. package/dist/services/internal-transfers/internal-transfers.js.map +1 -1
  158. package/dist/services/internal-transfers/internal-transfers.schemas.d.ts +59 -4
  159. package/dist/services/internal-transfers/internal-transfers.schemas.d.ts.map +1 -1
  160. package/dist/services/internal-transfers/internal-transfers.schemas.js +32 -2
  161. package/dist/services/internal-transfers/internal-transfers.schemas.js.map +1 -1
  162. package/dist/services/internal-transfers/internal-transfers.types.d.ts +2 -2
  163. package/dist/services/lifecycle/lifecycle.codecs.d.ts +2 -2
  164. package/dist/services/lifecycle/lifecycle.codecs.d.ts.map +1 -1
  165. package/dist/services/lifecycle/lifecycle.codecs.js +3 -1
  166. package/dist/services/lifecycle/lifecycle.codecs.js.map +1 -1
  167. package/dist/services/lifecycle/lifecycle.schemas.d.ts +114 -90
  168. package/dist/services/lifecycle/lifecycle.schemas.d.ts.map +1 -1
  169. package/dist/services/lifecycle/lifecycle.schemas.js +7 -1
  170. package/dist/services/lifecycle/lifecycle.schemas.js.map +1 -1
  171. package/dist/services/market-data/market-data.schemas.js +7 -2
  172. package/dist/services/market-data/market-data.schemas.js.map +1 -1
  173. package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
  174. package/dist/services/orders/order-errors.schemas.d.ts +2 -2
  175. package/dist/services/orders/orders-batch.schemas.d.ts +54 -54
  176. package/dist/services/orders/orders-input.schemas.d.ts +7 -7
  177. package/dist/services/orders/orders-output.schemas.d.ts +19 -19
  178. package/dist/services/orders/orders.d.ts +2 -0
  179. package/dist/services/orders/orders.d.ts.map +1 -1
  180. package/dist/services/orders/orders.js +2 -0
  181. package/dist/services/orders/orders.js.map +1 -1
  182. package/dist/services/policies/api-key-policies/api-key-policies.schemas.d.ts +15 -15
  183. package/dist/services/policies/api-key-policies/api-key-policies.schemas.js +1 -1
  184. package/dist/services/policies/shared.codecs.js +85 -3
  185. package/dist/services/policies/shared.codecs.js.map +1 -1
  186. package/dist/services/policies/shared.d.ts +1 -1
  187. package/dist/services/policies/shared.d.ts.map +1 -1
  188. package/dist/services/policies/shared.js +5 -14
  189. package/dist/services/policies/shared.js.map +1 -1
  190. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.d.ts +3 -3
  191. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.js +3 -3
  192. package/dist/services/policies/subaccount-policies/subaccount-policies.schemas.js.map +1 -1
  193. package/dist/services/rewards/rewards.d.ts +13 -3
  194. package/dist/services/rewards/rewards.d.ts.map +1 -1
  195. package/dist/services/rewards/rewards.js +17 -3
  196. package/dist/services/rewards/rewards.js.map +1 -1
  197. package/dist/services/rewards/rewards.schemas.d.ts +101 -4
  198. package/dist/services/rewards/rewards.schemas.d.ts.map +1 -1
  199. package/dist/services/rewards/rewards.schemas.js +12 -2
  200. package/dist/services/rewards/rewards.schemas.js.map +1 -1
  201. package/dist/services/rewards/rewards.types.d.ts +2 -2
  202. package/dist/services/social-verification/social-verification.codecs.js +13 -5
  203. package/dist/services/social-verification/social-verification.codecs.js.map +1 -1
  204. package/dist/services/social-verification/social-verification.d.ts +18 -3
  205. package/dist/services/social-verification/social-verification.d.ts.map +1 -1
  206. package/dist/services/social-verification/social-verification.js +26 -3
  207. package/dist/services/social-verification/social-verification.js.map +1 -1
  208. package/dist/services/social-verification/social-verification.schemas.d.ts +33 -7
  209. package/dist/services/social-verification/social-verification.schemas.d.ts.map +1 -1
  210. package/dist/services/social-verification/social-verification.schemas.js +35 -10
  211. package/dist/services/social-verification/social-verification.schemas.js.map +1 -1
  212. package/dist/services/social-verification/social-verification.types.d.ts +2 -2
  213. package/dist/services/subaccounts/subaccounts.schemas.d.ts +17 -17
  214. package/dist/services/trades/trades.schemas.d.ts +2 -2
  215. package/dist/services/trading-withdraws/trading-withdraws.d.ts +7 -1
  216. package/dist/services/trading-withdraws/trading-withdraws.d.ts.map +1 -1
  217. package/dist/services/trading-withdraws/trading-withdraws.js +11 -1
  218. package/dist/services/trading-withdraws/trading-withdraws.js.map +1 -1
  219. package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts +42 -1
  220. package/dist/services/trading-withdraws/trading-withdraws.schemas.d.ts.map +1 -1
  221. package/dist/services/trading-withdraws/trading-withdraws.schemas.js +19 -3
  222. package/dist/services/trading-withdraws/trading-withdraws.schemas.js.map +1 -1
  223. package/dist/services/trading-withdraws/trading-withdraws.types.d.ts +2 -2
  224. package/dist/services/transfers/transfers.schemas.d.ts +4 -4
  225. package/dist/services/triggers/trigger-input.schemas.d.ts +2 -2
  226. package/dist/services/triggers/triggers-output.schemas.d.ts +30 -30
  227. package/dist/services/zipper/zipper.schemas.d.ts +2 -2
  228. package/dist/services/zipper/zipper.schemas.d.ts.map +1 -1
  229. package/dist/services/zipper/zipper.schemas.js +13 -2
  230. package/dist/services/zipper/zipper.schemas.js.map +1 -1
  231. package/dist/services/zipper/zipper.types.d.ts +2 -2
  232. package/dist/shared/catalog-config.d.ts +18 -1
  233. package/dist/shared/catalog-config.d.ts.map +1 -1
  234. package/dist/shared/catalog-config.js +7 -1
  235. package/dist/shared/catalog-config.js.map +1 -1
  236. package/dist/shared/connect-error-mapping.d.ts.map +1 -1
  237. package/dist/shared/connect-error-mapping.js +5 -1
  238. package/dist/shared/connect-error-mapping.js.map +1 -1
  239. package/dist/shared/error-detail.d.ts +8 -0
  240. package/dist/shared/error-detail.d.ts.map +1 -1
  241. package/dist/shared/error-detail.js.map +1 -1
  242. package/dist/shared/error-details/claims.js +7 -2
  243. package/dist/shared/error-details/claims.js.map +1 -1
  244. package/dist/shared/error-details/withdraw.js +11 -2
  245. package/dist/shared/error-details/withdraw.js.map +1 -1
  246. package/dist/shared/errors.d.ts +20 -3
  247. package/dist/shared/errors.d.ts.map +1 -1
  248. package/dist/shared/errors.js +17 -1
  249. package/dist/shared/errors.js.map +1 -1
  250. package/dist/shared/ledger-codes.d.ts +7 -1
  251. package/dist/shared/ledger-codes.d.ts.map +1 -1
  252. package/dist/shared/ledger-codes.js +27 -3
  253. package/dist/shared/ledger-codes.js.map +1 -1
  254. package/dist/shared/rate-limit.schemas.d.ts +2 -2
  255. package/dist/shared/rate-limit.schemas.d.ts.map +1 -1
  256. package/dist/shared/rate-limit.schemas.js +4 -1
  257. package/dist/shared/rate-limit.schemas.js.map +1 -1
  258. package/dist/shared/transports.d.ts +2 -1
  259. package/dist/shared/transports.d.ts.map +1 -1
  260. package/dist/shared/transports.js.map +1 -1
  261. package/package.json +1 -1
@@ -123,6 +123,47 @@ declare const ValidateWithdrawDestinationResultSchema: v.UnionSchema<[v.SchemaWi
123
123
  canonicalDestinationAddress: string;
124
124
  }>]>], undefined>;
125
125
  type ValidateWithdrawDestinationResult = v.InferOutput<typeof ValidateWithdrawDestinationResultSchema>;
126
+ declare const WalletBalancesInputObjectSchema: v.StrictObjectSchema<{
127
+ readonly account: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["active", "main"], undefined>, v.StrictObjectSchema<{
128
+ readonly subaccountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
129
+ }, undefined>], undefined>, undefined>;
130
+ }, undefined>;
131
+ type GetWalletBalancesInput = v.InferInput<typeof WalletBalancesInputObjectSchema>;
132
+ declare const GetWalletBalancesResultSchema: v.ObjectSchema<{
133
+ readonly smartAccountAddress: v.StringSchema<undefined>;
134
+ readonly balances: v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
135
+ readonly zippedAssetId: v.NumberSchema<undefined>;
136
+ readonly unifiedAssetId: v.NumberSchema<undefined>;
137
+ readonly chainId: v.NumberSchema<undefined>;
138
+ readonly ztokenAddress: v.StringSchema<undefined>;
139
+ readonly amountE18: v.OptionalSchema<v.ObjectSchema<{
140
+ readonly hi: v.BigintSchema<undefined>;
141
+ readonly lo: v.BigintSchema<undefined>;
142
+ }, undefined>, undefined>;
143
+ }, undefined>, v.TransformAction<{
144
+ zippedAssetId: number;
145
+ unifiedAssetId: number;
146
+ chainId: number;
147
+ ztokenAddress: string;
148
+ amountE18?: {
149
+ hi: bigint;
150
+ lo: bigint;
151
+ } | undefined;
152
+ }, {
153
+ amount: string;
154
+ zippedAssetId: number;
155
+ unifiedAssetId: number;
156
+ chainId: number;
157
+ ztokenAddress: string;
158
+ }>]>, undefined>;
159
+ }, undefined>;
160
+ /**
161
+ * zTokens the account's smart account wallet holds on Polyester Chain, read live from the
162
+ * chain: for example a rejected withdrawal's refund, which stays there until moved. `amount`
163
+ * is a decimal string (zTokens have 18 decimals); `chainId` is a `GetDepositWithdrawConfig`
164
+ * chain. `balances` lists nonzero balances by `zippedAssetId` and is empty when there are none.
165
+ */
166
+ type GetWalletBalancesResult = v.InferOutput<typeof GetWalletBalancesResultSchema>;
126
167
  //#endregion
127
- export { CreateTradingWithdrawResult, CreateTradingWithdrawResultSchema, CreateTradingWithdrawToExternalChainInput, CreateTradingWithdrawToFundingInput, TradingWithdrawIntentPayloadRequest, ValidateWithdrawDestinationInput, ValidateWithdrawDestinationInputSchema, ValidateWithdrawDestinationResult, ValidateWithdrawDestinationResultSchema, createCreateTradingWithdrawToExternalChainInputSchema, createCreateTradingWithdrawToFundingInputSchema };
168
+ export { CreateTradingWithdrawResult, CreateTradingWithdrawResultSchema, CreateTradingWithdrawToExternalChainInput, CreateTradingWithdrawToFundingInput, GetWalletBalancesInput, GetWalletBalancesResult, GetWalletBalancesResultSchema, TradingWithdrawIntentPayloadRequest, ValidateWithdrawDestinationInput, ValidateWithdrawDestinationInputSchema, ValidateWithdrawDestinationResult, ValidateWithdrawDestinationResultSchema, createCreateTradingWithdrawToExternalChainInputSchema, createCreateTradingWithdrawToFundingInputSchema };
128
169
  //# sourceMappingURL=trading-withdraws.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"trading-withdraws.schemas.d.ts","names":[],"sources":["../../../src/services/trading-withdraws/trading-withdraws.schemas.ts"],"mappings":";;;;;KAkBY;EACR,QAAQ;EACR;EACA;EACA,WAAW;EACX;EACA,OAAO;EACP;EACA;;KAGC;EACD;EACA,SAAS;EACT,mBAAmB;;iBAmDP,gDAAgD,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GAqChF;iBAEe,sDAAsD,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CtF;KAEW,sCAAsC,EAAE,WAChD,kBAAkB;KAOV,4CAA4C,EAAE,WACtD,kBAAkB;cAOT,mCAAiC,EAAA;;;KAIlC,8BAA8B,EAAE,mBAAmB;cAOlD,wCAAsC,EAAA,yBAAA,EAAA;;;;;;;;;;KAgBvC,mCAAmC,EAAE,kBACtC;cA4CE,yCAAuC,EAAA,aAAA,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAKxC,oCAAoC,EAAE,mBACvC"}
1
+ {"version":3,"file":"trading-withdraws.schemas.d.ts","names":[],"sources":["../../../src/services/trading-withdraws/trading-withdraws.schemas.ts"],"mappings":";;;;;KAwBY;EACR,QAAQ;EACR;EACA;EACA,WAAW;EACX;EACA,OAAO;EACP;EACA;;KAGC;EACD;EACA,SAAS;EACT,mBAAmB;;iBAmDP,gDAAgD,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GAqChF;iBAEe,sDAAsD,QAAQ,YAAS,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CtF;KAEW,sCAAsC,EAAE,WAChD,kBAAkB;KAOV,4CAA4C,EAAE,WACtD,kBAAkB;cAOT,mCAAiC,EAAA;;;KAIlC,8BAA8B,EAAE,mBAAmB;cAOlD,wCAAsC,EAAA,yBAAA,EAAA;;;;;;;;;;KAgBvC,mCAAmC,EAAE,kBACtC;cA4CE,yCAAuC,EAAA,aAAA,EAAA,yBAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAKxC,oCAAoC,EAAE,mBACvC;cAGL,iCAA+B,EAAA;;;;;KAOzB,yBAAyB,EAAE,kBAAkB;cAE5C,+BAA6B,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyB9B,0BAA0B,EAAE,mBAAmB"}
@@ -1,8 +1,9 @@
1
1
  import { ConfigurationError } from "../../shared/errors.js";
2
- import { quantityInputToE18 } from "../../shared/decimal-surface.js";
2
+ import { U128Schema } from "../../shared/schemas.js";
3
+ import { quantityInputToE18, scaledToDecimalOutput } from "../../shared/decimal-surface.js";
3
4
  import { PositiveUint32InputSchema } from "../shared.js";
4
5
  import { AccountScopeInputEntries, accountScopeToSubaccountId } from "../../shared/account-scope.js";
5
- import { toU128 } from "../../utils/u128.js";
6
+ import { fromU128, toU128 } from "../../utils/u128.js";
6
7
  import "../../gen/chain/withdraw/v1/withdraw_pb.js";
7
8
  import { TradingWithdrawActionCodec, WithdrawDestinationValidationCodeCodec } from "./trading-withdraws.codecs.js";
8
9
  import * as v from "valibot";
@@ -143,7 +144,22 @@ const InvalidWithdrawDestinationResultSchema = v.pipe(v.object({
143
144
  code: InvalidWithdrawDestinationCodeCodec[result.code]
144
145
  })));
145
146
  const ValidateWithdrawDestinationResultSchema = v.union([ValidWithdrawDestinationResultSchema, InvalidWithdrawDestinationResultSchema]);
147
+ const WalletBalancesInputObjectSchema = v.strictObject({ ...AccountScopeInputEntries });
148
+ const GetWalletBalancesInputSchema = v.pipe(WalletBalancesInputObjectSchema, v.transform(({ account }) => ({ subaccountId: accountScopeToSubaccountId(account) })));
149
+ const GetWalletBalancesResultSchema = v.object({
150
+ smartAccountAddress: v.string(),
151
+ balances: v.array(v.pipe(v.object({
152
+ zippedAssetId: v.number(),
153
+ unifiedAssetId: v.number(),
154
+ chainId: v.number(),
155
+ ztokenAddress: v.string(),
156
+ amountE18: v.optional(U128Schema)
157
+ }), v.transform(({ amountE18, ...balance }) => ({
158
+ ...balance,
159
+ amount: scaledToDecimalOutput(fromU128(amountE18), 18)
160
+ }))))
161
+ });
146
162
  //#endregion
147
- export { CreateTradingWithdrawResultSchema, CreateWalletTradingWithdrawResultSchema, ValidateWithdrawDestinationInputSchema, ValidateWithdrawDestinationResultSchema, createCreateTradingWithdrawToExternalChainInputSchema, createCreateTradingWithdrawToFundingInputSchema, renewTradingWithdrawPayload };
163
+ export { CreateTradingWithdrawResultSchema, CreateWalletTradingWithdrawResultSchema, GetWalletBalancesInputSchema, GetWalletBalancesResultSchema, ValidateWithdrawDestinationInputSchema, ValidateWithdrawDestinationResultSchema, createCreateTradingWithdrawToExternalChainInputSchema, createCreateTradingWithdrawToFundingInputSchema, renewTradingWithdrawPayload };
148
164
 
149
165
  //# sourceMappingURL=trading-withdraws.schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"trading-withdraws.schemas.js","names":[],"sources":["../../../src/services/trading-withdraws/trading-withdraws.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { PositiveUint32InputSchema } from \"../shared.js\";\nimport { quantityInputToE18, type SdkScales } from \"../../shared/decimal-surface.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport type * as Proto from \"../../gen/chain/withdraw/v1/withdraw_pb.js\";\nimport { WithdrawDestinationValidationCode } from \"../../gen/chain/withdraw/v1/withdraw_pb.js\";\nimport { toU128, type U128Value } from \"../../utils/u128.js\";\nimport { ConfigurationError } from \"../../shared/errors.js\";\nimport {\n TradingWithdrawActionCodec,\n WithdrawDestinationValidationCodeCodec,\n} from \"./trading-withdraws.codecs.js\";\n\nconst DEFAULT_DEADLINE_SECONDS = 5 * 60;\n\nexport type TradingWithdrawIntentPayloadRequest = {\n action: Proto.TradingWithdrawAction;\n assetId: number;\n destinationChainId: bigint;\n amountE18: U128Value;\n deadlineTsSec: bigint;\n nonce: U128Value;\n destinationAddress: string;\n idempotencyKey: string;\n};\n\ntype CreateTradingWithdrawRequestBase = {\n subaccountId: bigint | undefined;\n payload: TradingWithdrawIntentPayloadRequest;\n payloadSignature?: Uint8Array;\n};\n\nfunction createNonce(): bigint {\n const random = globalThis.crypto?.getRandomValues?.bind(globalThis.crypto);\n if (!random) {\n throw new ConfigurationError(\"Secure nonce generation requires crypto.getRandomValues.\");\n }\n\n const bytes = new BigUint64Array(1);\n random(bytes);\n const nonce = bytes[0]!;\n return nonce === 0n ? 1n : nonce;\n}\n\nfunction createTradingWithdrawPayload(input: {\n action: Proto.TradingWithdrawAction;\n assetId: number;\n destinationChainId: bigint;\n quantityScaled: bigint;\n destinationAddress: string;\n idempotencyKey: string;\n deadline: Date | undefined;\n}): TradingWithdrawIntentPayloadRequest {\n return {\n action: input.action,\n assetId: input.assetId,\n destinationChainId: input.destinationChainId,\n amountE18: toU128(input.quantityScaled),\n deadlineTsSec: BigInt(\n input.deadline\n ? Math.floor(input.deadline.getTime() / 1000)\n : Math.floor(Date.now() / 1000) + DEFAULT_DEADLINE_SECONDS,\n ),\n nonce: toU128(createNonce()),\n destinationAddress: input.destinationAddress,\n idempotencyKey: input.idempotencyKey,\n };\n}\n\n/** The same withdraw with a fresh default deadline and nonce, for signing again. */\nexport function renewTradingWithdrawPayload(\n payload: TradingWithdrawIntentPayloadRequest,\n): TradingWithdrawIntentPayloadRequest {\n return {\n ...payload,\n deadlineTsSec: BigInt(Math.floor(Date.now() / 1000) + DEFAULT_DEADLINE_SECONDS),\n nonce: toU128(createNonce()),\n };\n}\n\nexport function createCreateTradingWithdrawToFundingInputSchema(scales: SdkScales) {\n return v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n assetId: PositiveUint32InputSchema,\n quantity: v.string(),\n idempotencyKey: v.pipe(v.string(), v.trim(), v.minLength(1)),\n destinationAddress: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n signerWallet: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n payloadSignature: v.optional(v.instance(Uint8Array)),\n /**\n * When the signed authorization lapses. Defaults to five minutes from now\n * on the device clock.\n */\n deadline: v.optional(v.date()),\n }),\n v.transform((input): CreateTradingWithdrawRequestBase => {\n const quantityScaled = quantityInputToE18({\n scales,\n assetId: input.assetId,\n quantity: input.quantity,\n });\n return {\n subaccountId: accountScopeToSubaccountId(input.account),\n payloadSignature: input.payloadSignature,\n payload: createTradingWithdrawPayload({\n action: TradingWithdrawActionCodec.inputToProto.to_funding,\n assetId: input.assetId,\n destinationChainId: 0n,\n quantityScaled,\n destinationAddress: input.destinationAddress,\n idempotencyKey: input.idempotencyKey,\n deadline: input.deadline,\n }),\n };\n }),\n );\n}\n\nexport function createCreateTradingWithdrawToExternalChainInputSchema(scales: SdkScales) {\n return v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n assetId: PositiveUint32InputSchema,\n quantity: v.string(),\n destinationChainId: v.pipe(\n v.number(),\n v.integer(),\n v.gtValue(0),\n v.maxValue(Number.MAX_SAFE_INTEGER),\n ),\n destinationAddress: v.pipe(v.string(), v.trim(), v.minLength(1)),\n idempotencyKey: v.pipe(v.string(), v.trim(), v.minLength(1)),\n signerWallet: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n payloadSignature: v.optional(v.instance(Uint8Array)),\n /**\n * When the signed authorization lapses. Defaults to five minutes from now\n * on the device clock.\n */\n deadline: v.optional(v.date()),\n }),\n v.transform((input): CreateTradingWithdrawRequestBase => {\n const quantityScaled = quantityInputToE18({\n scales,\n assetId: input.assetId,\n quantity: input.quantity,\n });\n return {\n subaccountId: accountScopeToSubaccountId(input.account),\n payloadSignature: input.payloadSignature,\n payload: createTradingWithdrawPayload({\n action: TradingWithdrawActionCodec.inputToProto.to_external_chain,\n assetId: input.assetId,\n destinationChainId: BigInt(input.destinationChainId),\n quantityScaled,\n destinationAddress: input.destinationAddress,\n idempotencyKey: input.idempotencyKey,\n deadline: input.deadline,\n }),\n };\n }),\n );\n}\n\nexport type CreateTradingWithdrawToFundingInput = v.InferInput<\n ReturnType<typeof createCreateTradingWithdrawToFundingInputSchema>\n>;\n\nexport type CreateTradingWithdrawToFundingRequest = v.InferOutput<\n ReturnType<typeof createCreateTradingWithdrawToFundingInputSchema>\n>;\n\nexport type CreateTradingWithdrawToExternalChainInput = v.InferInput<\n ReturnType<typeof createCreateTradingWithdrawToExternalChainInputSchema>\n>;\n\nexport type CreateTradingWithdrawToExternalChainRequest = v.InferOutput<\n ReturnType<typeof createCreateTradingWithdrawToExternalChainInputSchema>\n>;\n\nexport const CreateTradingWithdrawResultSchema = v.object({\n intentId: v.pipe(v.string(), v.trim(), v.minLength(1)),\n});\n\nexport type CreateTradingWithdrawResult = v.InferOutput<typeof CreateTradingWithdrawResultSchema>;\n\nexport const CreateWalletTradingWithdrawResultSchema = CreateTradingWithdrawResultSchema;\nexport type CreateWalletTradingWithdrawResult = v.InferOutput<\n typeof CreateWalletTradingWithdrawResultSchema\n>;\n\nexport const ValidateWithdrawDestinationInputSchema = v.pipe(\n v.strictObject({\n destinationChainId: v.pipe(\n v.number(),\n v.integer(),\n v.gtValue(0),\n v.maxValue(Number.MAX_SAFE_INTEGER),\n ),\n destinationAddress: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n v.transform((input) => ({\n destinationChainId: BigInt(input.destinationChainId),\n destinationAddress: input.destinationAddress,\n })),\n);\n\nexport type ValidateWithdrawDestinationInput = v.InferInput<\n typeof ValidateWithdrawDestinationInputSchema\n>;\nexport type ValidateWithdrawDestinationRequest = v.InferOutput<\n typeof ValidateWithdrawDestinationInputSchema\n>;\n\nconst ValidWithdrawDestinationResultSchema = v.pipe(\n v.object({\n valid: v.literal(true),\n code: v.literal(WithdrawDestinationValidationCode.VALID),\n message: v.string(),\n canonicalDestinationAddress: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n v.transform((result) => ({\n ...result,\n code: WithdrawDestinationValidationCodeCodec.protoToOutput[result.code],\n })),\n);\n\nconst {\n [WithdrawDestinationValidationCode.VALID]: _validWithdrawDestinationCode,\n ...InvalidWithdrawDestinationCodeCodec\n} = WithdrawDestinationValidationCodeCodec.protoToOutput;\n\nconst InvalidWithdrawDestinationResultSchema = v.pipe(\n v.object({\n valid: v.literal(false),\n code: v.picklist([\n WithdrawDestinationValidationCode.RESULT_UNSPECIFIED,\n WithdrawDestinationValidationCode.INVALID_ADDRESS,\n WithdrawDestinationValidationCode.UNSUPPORTED_CHAIN,\n WithdrawDestinationValidationCode.POLYESTER_SMART_ACCOUNT,\n WithdrawDestinationValidationCode.TOKEN_CONTRACT,\n WithdrawDestinationValidationCode.DENYLISTED_ADDRESS,\n ]),\n message: v.string(),\n canonicalDestinationAddress: v.string(),\n }),\n v.transform((result) => ({\n ...result,\n code: InvalidWithdrawDestinationCodeCodec[result.code],\n })),\n);\n\nexport const ValidateWithdrawDestinationResultSchema = v.union([\n ValidWithdrawDestinationResultSchema,\n InvalidWithdrawDestinationResultSchema,\n]);\n\nexport type ValidateWithdrawDestinationResult = v.InferOutput<\n typeof ValidateWithdrawDestinationResultSchema\n>;\n"],"mappings":";;;;;;;;;AAgBA,MAAM,2BAA2B;AAmBjC,SAAS,cAAsB;CAC3B,MAAM,SAAS,WAAW,QAAQ,iBAAiB,KAAK,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-withdraws.schemas.js","names":[],"sources":["../../../src/services/trading-withdraws/trading-withdraws.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { PositiveUint32InputSchema } from \"../shared.js\";\nimport {\n E18_SCALE,\n quantityInputToE18,\n scaledToDecimalOutput,\n type SdkScales,\n} from \"../../shared/decimal-surface.js\";\nimport {\n AccountScopeInputEntries,\n accountScopeToSubaccountId,\n} from \"../../shared/account-scope.js\";\nimport type * as Proto from \"../../gen/chain/withdraw/v1/withdraw_pb.js\";\nimport { WithdrawDestinationValidationCode } from \"../../gen/chain/withdraw/v1/withdraw_pb.js\";\nimport { fromU128, toU128, type U128Value } from \"../../utils/u128.js\";\nimport { U128Schema } from \"../../shared/schemas.js\";\nimport { ConfigurationError } from \"../../shared/errors.js\";\nimport {\n TradingWithdrawActionCodec,\n WithdrawDestinationValidationCodeCodec,\n} from \"./trading-withdraws.codecs.js\";\n\nconst DEFAULT_DEADLINE_SECONDS = 5 * 60;\n\nexport type TradingWithdrawIntentPayloadRequest = {\n action: Proto.TradingWithdrawAction;\n assetId: number;\n destinationChainId: bigint;\n amountE18: U128Value;\n deadlineTsSec: bigint;\n nonce: U128Value;\n destinationAddress: string;\n idempotencyKey: string;\n};\n\ntype CreateTradingWithdrawRequestBase = {\n subaccountId: bigint | undefined;\n payload: TradingWithdrawIntentPayloadRequest;\n payloadSignature?: Uint8Array;\n};\n\nfunction createNonce(): bigint {\n const random = globalThis.crypto?.getRandomValues?.bind(globalThis.crypto);\n if (!random) {\n throw new ConfigurationError(\"Secure nonce generation requires crypto.getRandomValues.\");\n }\n\n const bytes = new BigUint64Array(1);\n random(bytes);\n const nonce = bytes[0]!;\n return nonce === 0n ? 1n : nonce;\n}\n\nfunction createTradingWithdrawPayload(input: {\n action: Proto.TradingWithdrawAction;\n assetId: number;\n destinationChainId: bigint;\n quantityScaled: bigint;\n destinationAddress: string;\n idempotencyKey: string;\n deadline: Date | undefined;\n}): TradingWithdrawIntentPayloadRequest {\n return {\n action: input.action,\n assetId: input.assetId,\n destinationChainId: input.destinationChainId,\n amountE18: toU128(input.quantityScaled),\n deadlineTsSec: BigInt(\n input.deadline\n ? Math.floor(input.deadline.getTime() / 1000)\n : Math.floor(Date.now() / 1000) + DEFAULT_DEADLINE_SECONDS,\n ),\n nonce: toU128(createNonce()),\n destinationAddress: input.destinationAddress,\n idempotencyKey: input.idempotencyKey,\n };\n}\n\n/** The same withdraw with a fresh default deadline and nonce, for signing again. */\nexport function renewTradingWithdrawPayload(\n payload: TradingWithdrawIntentPayloadRequest,\n): TradingWithdrawIntentPayloadRequest {\n return {\n ...payload,\n deadlineTsSec: BigInt(Math.floor(Date.now() / 1000) + DEFAULT_DEADLINE_SECONDS),\n nonce: toU128(createNonce()),\n };\n}\n\nexport function createCreateTradingWithdrawToFundingInputSchema(scales: SdkScales) {\n return v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n assetId: PositiveUint32InputSchema,\n quantity: v.string(),\n idempotencyKey: v.pipe(v.string(), v.trim(), v.minLength(1)),\n destinationAddress: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n signerWallet: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n payloadSignature: v.optional(v.instance(Uint8Array)),\n /**\n * When the signed authorization lapses. Defaults to five minutes from now\n * on the device clock.\n */\n deadline: v.optional(v.date()),\n }),\n v.transform((input): CreateTradingWithdrawRequestBase => {\n const quantityScaled = quantityInputToE18({\n scales,\n assetId: input.assetId,\n quantity: input.quantity,\n });\n return {\n subaccountId: accountScopeToSubaccountId(input.account),\n payloadSignature: input.payloadSignature,\n payload: createTradingWithdrawPayload({\n action: TradingWithdrawActionCodec.inputToProto.to_funding,\n assetId: input.assetId,\n destinationChainId: 0n,\n quantityScaled,\n destinationAddress: input.destinationAddress,\n idempotencyKey: input.idempotencyKey,\n deadline: input.deadline,\n }),\n };\n }),\n );\n}\n\nexport function createCreateTradingWithdrawToExternalChainInputSchema(scales: SdkScales) {\n return v.pipe(\n v.strictObject({\n ...AccountScopeInputEntries,\n assetId: PositiveUint32InputSchema,\n quantity: v.string(),\n destinationChainId: v.pipe(\n v.number(),\n v.integer(),\n v.gtValue(0),\n v.maxValue(Number.MAX_SAFE_INTEGER),\n ),\n destinationAddress: v.pipe(v.string(), v.trim(), v.minLength(1)),\n idempotencyKey: v.pipe(v.string(), v.trim(), v.minLength(1)),\n signerWallet: v.optional(v.pipe(v.string(), v.trim()), \"\"),\n payloadSignature: v.optional(v.instance(Uint8Array)),\n /**\n * When the signed authorization lapses. Defaults to five minutes from now\n * on the device clock.\n */\n deadline: v.optional(v.date()),\n }),\n v.transform((input): CreateTradingWithdrawRequestBase => {\n const quantityScaled = quantityInputToE18({\n scales,\n assetId: input.assetId,\n quantity: input.quantity,\n });\n return {\n subaccountId: accountScopeToSubaccountId(input.account),\n payloadSignature: input.payloadSignature,\n payload: createTradingWithdrawPayload({\n action: TradingWithdrawActionCodec.inputToProto.to_external_chain,\n assetId: input.assetId,\n destinationChainId: BigInt(input.destinationChainId),\n quantityScaled,\n destinationAddress: input.destinationAddress,\n idempotencyKey: input.idempotencyKey,\n deadline: input.deadline,\n }),\n };\n }),\n );\n}\n\nexport type CreateTradingWithdrawToFundingInput = v.InferInput<\n ReturnType<typeof createCreateTradingWithdrawToFundingInputSchema>\n>;\n\nexport type CreateTradingWithdrawToFundingRequest = v.InferOutput<\n ReturnType<typeof createCreateTradingWithdrawToFundingInputSchema>\n>;\n\nexport type CreateTradingWithdrawToExternalChainInput = v.InferInput<\n ReturnType<typeof createCreateTradingWithdrawToExternalChainInputSchema>\n>;\n\nexport type CreateTradingWithdrawToExternalChainRequest = v.InferOutput<\n ReturnType<typeof createCreateTradingWithdrawToExternalChainInputSchema>\n>;\n\nexport const CreateTradingWithdrawResultSchema = v.object({\n intentId: v.pipe(v.string(), v.trim(), v.minLength(1)),\n});\n\nexport type CreateTradingWithdrawResult = v.InferOutput<typeof CreateTradingWithdrawResultSchema>;\n\nexport const CreateWalletTradingWithdrawResultSchema = CreateTradingWithdrawResultSchema;\nexport type CreateWalletTradingWithdrawResult = v.InferOutput<\n typeof CreateWalletTradingWithdrawResultSchema\n>;\n\nexport const ValidateWithdrawDestinationInputSchema = v.pipe(\n v.strictObject({\n destinationChainId: v.pipe(\n v.number(),\n v.integer(),\n v.gtValue(0),\n v.maxValue(Number.MAX_SAFE_INTEGER),\n ),\n destinationAddress: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n v.transform((input) => ({\n destinationChainId: BigInt(input.destinationChainId),\n destinationAddress: input.destinationAddress,\n })),\n);\n\nexport type ValidateWithdrawDestinationInput = v.InferInput<\n typeof ValidateWithdrawDestinationInputSchema\n>;\nexport type ValidateWithdrawDestinationRequest = v.InferOutput<\n typeof ValidateWithdrawDestinationInputSchema\n>;\n\nconst ValidWithdrawDestinationResultSchema = v.pipe(\n v.object({\n valid: v.literal(true),\n code: v.literal(WithdrawDestinationValidationCode.VALID),\n message: v.string(),\n canonicalDestinationAddress: v.pipe(v.string(), v.trim(), v.minLength(1)),\n }),\n v.transform((result) => ({\n ...result,\n code: WithdrawDestinationValidationCodeCodec.protoToOutput[result.code],\n })),\n);\n\nconst {\n [WithdrawDestinationValidationCode.VALID]: _validWithdrawDestinationCode,\n ...InvalidWithdrawDestinationCodeCodec\n} = WithdrawDestinationValidationCodeCodec.protoToOutput;\n\nconst InvalidWithdrawDestinationResultSchema = v.pipe(\n v.object({\n valid: v.literal(false),\n code: v.picklist([\n WithdrawDestinationValidationCode.RESULT_UNSPECIFIED,\n WithdrawDestinationValidationCode.INVALID_ADDRESS,\n WithdrawDestinationValidationCode.UNSUPPORTED_CHAIN,\n WithdrawDestinationValidationCode.POLYESTER_SMART_ACCOUNT,\n WithdrawDestinationValidationCode.TOKEN_CONTRACT,\n WithdrawDestinationValidationCode.DENYLISTED_ADDRESS,\n ]),\n message: v.string(),\n canonicalDestinationAddress: v.string(),\n }),\n v.transform((result) => ({\n ...result,\n code: InvalidWithdrawDestinationCodeCodec[result.code],\n })),\n);\n\nexport const ValidateWithdrawDestinationResultSchema = v.union([\n ValidWithdrawDestinationResultSchema,\n InvalidWithdrawDestinationResultSchema,\n]);\n\nexport type ValidateWithdrawDestinationResult = v.InferOutput<\n typeof ValidateWithdrawDestinationResultSchema\n>;\n\nconst WalletBalancesInputObjectSchema = v.strictObject({ ...AccountScopeInputEntries });\n\nexport const GetWalletBalancesInputSchema = v.pipe(\n WalletBalancesInputObjectSchema,\n v.transform(({ account }) => ({ subaccountId: accountScopeToSubaccountId(account) })),\n);\n\nexport type GetWalletBalancesInput = v.InferInput<typeof WalletBalancesInputObjectSchema>;\n\nexport const GetWalletBalancesResultSchema = v.object({\n smartAccountAddress: v.string(),\n balances: v.array(\n v.pipe(\n v.object({\n zippedAssetId: v.number(),\n unifiedAssetId: v.number(),\n chainId: v.number(),\n ztokenAddress: v.string(),\n amountE18: v.optional(U128Schema),\n }),\n v.transform(({ amountE18, ...balance }) => ({\n ...balance,\n amount: scaledToDecimalOutput(fromU128(amountE18), E18_SCALE),\n })),\n ),\n ),\n});\n\n/**\n * zTokens the account's smart account wallet holds on Polyester Chain, read live from the\n * chain: for example a rejected withdrawal's refund, which stays there until moved. `amount`\n * is a decimal string (zTokens have 18 decimals); `chainId` is a `GetDepositWithdrawConfig`\n * chain. `balances` lists nonzero balances by `zippedAssetId` and is empty when there are none.\n */\nexport type GetWalletBalancesResult = v.InferOutput<typeof GetWalletBalancesResultSchema>;\n"],"mappings":";;;;;;;;;;AAsBA,MAAM,2BAA2B;AAmBjC,SAAS,cAAsB;CAC3B,MAAM,SAAS,WAAW,QAAQ,iBAAiB,KAAK,WAAW,MAAM;CACzE,IAAI,CAAC,QACD,MAAM,IAAI,mBAAmB,0DAA0D;CAG3F,MAAM,wBAAQ,IAAI,eAAe,CAAC;CAClC,OAAO,KAAK;CACZ,MAAM,QAAQ,MAAM;CACpB,OAAO,UAAU,KAAK,KAAK;AAC/B;AAEA,SAAS,6BAA6B,OAQE;CACpC,OAAO;EACH,QAAQ,MAAM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,EAAE,OAAO;EACL,eAAe,EAAE,OAAO;EACxB,gBAAgB,EAAE,OAAO;EACzB,SAAS,EAAE,OAAO;EAClB,eAAe,EAAE,OAAO;EACxB,WAAW,EAAE,SAAS,UAAU;CACpC,CAAC,GACD,EAAE,WAAW,EAAE,WAAW,GAAG,eAAe;EACxC,GAAG;EACH,QAAQ,sBAAsB,SAAS,SAAS,GAAA,EAAY;CAChE,EAAE,CACN,CACJ;AACJ,CAAC"}
@@ -1,3 +1,3 @@
1
- import { CreateTradingWithdrawResult, CreateTradingWithdrawToExternalChainInput, CreateTradingWithdrawToFundingInput, ValidateWithdrawDestinationInput, ValidateWithdrawDestinationResult } from "./trading-withdraws.schemas.js";
1
+ import { CreateTradingWithdrawResult, CreateTradingWithdrawToExternalChainInput, CreateTradingWithdrawToFundingInput, GetWalletBalancesInput, GetWalletBalancesResult, ValidateWithdrawDestinationInput, ValidateWithdrawDestinationResult } from "./trading-withdraws.schemas.js";
2
2
  import { CreateTradingWithdrawToExternalChainServiceInput, CreateTradingWithdrawToFundingServiceInput, PreparedTradingWithdraw, TradingWithdrawSigningConfig, TradingWithdrawWalletSigner } from "./trading-withdraws.js";
3
- export type { CreateTradingWithdrawResult, CreateTradingWithdrawToExternalChainInput, CreateTradingWithdrawToExternalChainServiceInput, CreateTradingWithdrawToFundingInput, CreateTradingWithdrawToFundingServiceInput, PreparedTradingWithdraw, TradingWithdrawSigningConfig, TradingWithdrawWalletSigner, ValidateWithdrawDestinationInput, ValidateWithdrawDestinationResult };
3
+ export type { CreateTradingWithdrawResult, CreateTradingWithdrawToExternalChainInput, CreateTradingWithdrawToExternalChainServiceInput, CreateTradingWithdrawToFundingInput, CreateTradingWithdrawToFundingServiceInput, GetWalletBalancesInput, GetWalletBalancesResult, PreparedTradingWithdraw, TradingWithdrawSigningConfig, TradingWithdrawWalletSigner, ValidateWithdrawDestinationInput, ValidateWithdrawDestinationResult };
@@ -84,7 +84,7 @@ declare const LedgerTransferSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
84
84
  assetId: number;
85
85
  amount: string;
86
86
  balanceAfter: string | undefined;
87
- type: "unspecified" | "internal_transfer" | "deposit" | "withdraw" | "maker_fee" | "taker_fee" | "trade_base" | "trade_quote" | "rebate" | "funding_to_trading" | "trading_to_funding" | "trading_withdraw_reserve" | "funding_user_transfer" | "trading_withdraw_request_fee";
87
+ type: "unspecified" | "internal_transfer" | "deposit" | "withdraw" | "maker_fee" | "taker_fee" | "trade_base" | "trade_quote" | "rebate" | "funding_to_trading" | "trading_to_funding" | "trading_withdraw_reserve" | "funding_user_transfer" | "trading_withdraw_request_fee" | "trading_withdraw_fee_leg" | "quickswap_polyester_fee" | "quickswap_broker_fee" | "quickswap_affiliate_fee" | "fee_sweep" | "fee_refill" | "system_adjustment" | "withdraw_failed";
88
88
  accountCode: "unspecified" | "trading" | "funding";
89
89
  timestamp: number;
90
90
  isDebit: boolean;
@@ -98,7 +98,7 @@ declare const ListTransfersInputSchema: v.SchemaWithPipe<readonly [v.StrictObjec
98
98
  readonly reversed: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
99
99
  readonly timestampMin: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>, v.TransformAction<number, bigint>]>, undefined>;
100
100
  readonly timestampMax: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, number, undefined>, v.TransformAction<number, bigint>]>, undefined>;
101
- readonly transferCode: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["deposit", "withdraw", "maker_fee", "taker_fee", "internal_transfer", "trade_base", "trade_quote", "rebate", "funding_to_trading", "trading_to_funding", "trading_withdraw_reserve", "funding_user_transfer", "trading_withdraw_request_fee"], undefined>, v.TransformAction<"internal_transfer" | "deposit" | "withdraw" | "maker_fee" | "taker_fee" | "trade_base" | "trade_quote" | "rebate" | "funding_to_trading" | "trading_to_funding" | "trading_withdraw_reserve" | "funding_user_transfer" | "trading_withdraw_request_fee", TransferCode.DEPOSIT | TransferCode.WITHDRAW | TransferCode.MAKER_FEE | TransferCode.TAKER_FEE | TransferCode.INTERNAL_TRANSFER | TransferCode.TRADE_BASE | TransferCode.TRADE_QUOTE | TransferCode.REBATE | TransferCode.FUNDING_TO_TRADING | TransferCode.TRADING_TO_FUNDING | TransferCode.TRADING_WITHDRAW_RESERVE | TransferCode.FUNDING_USER_TRANSFER | TransferCode.TRADING_WITHDRAW_REQUEST_FEE>]>, undefined>;
101
+ readonly transferCode: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<readonly ["deposit", "withdraw", "maker_fee", "taker_fee", "internal_transfer", "trade_base", "trade_quote", "rebate", "funding_to_trading", "trading_to_funding", "trading_withdraw_reserve", "funding_user_transfer", "trading_withdraw_request_fee", "trading_withdraw_fee_leg", "quickswap_polyester_fee", "quickswap_broker_fee", "quickswap_affiliate_fee", "fee_sweep", "fee_refill", "system_adjustment", "withdraw_failed"], undefined>, v.TransformAction<"internal_transfer" | "deposit" | "withdraw" | "maker_fee" | "taker_fee" | "trade_base" | "trade_quote" | "rebate" | "funding_to_trading" | "trading_to_funding" | "trading_withdraw_reserve" | "funding_user_transfer" | "trading_withdraw_request_fee" | "trading_withdraw_fee_leg" | "quickswap_polyester_fee" | "quickswap_broker_fee" | "quickswap_affiliate_fee" | "fee_sweep" | "fee_refill" | "system_adjustment" | "withdraw_failed", TransferCode.DEPOSIT | TransferCode.WITHDRAW | TransferCode.MAKER_FEE | TransferCode.TAKER_FEE | TransferCode.INTERNAL_TRANSFER | TransferCode.TRADE_BASE | TransferCode.TRADE_QUOTE | TransferCode.REBATE | TransferCode.FUNDING_TO_TRADING | TransferCode.TRADING_TO_FUNDING | TransferCode.TRADING_WITHDRAW_RESERVE | TransferCode.FUNDING_USER_TRANSFER | TransferCode.TRADING_WITHDRAW_REQUEST_FEE | TransferCode.TRADING_WITHDRAW_FEE_LEG | TransferCode.QUICKSWAP_POLYESTER_FEE | TransferCode.QUICKSWAP_BROKER_FEE | TransferCode.QUICKSWAP_AFFILIATE_FEE | TransferCode.FEE_SWEEP | TransferCode.FEE_REFILL | TransferCode.SYSTEM_ADJUSTMENT | TransferCode.WITHDRAW_FAILED>]>, undefined>;
102
102
  readonly pageToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
103
103
  readonly account: v.OptionalSchema<v.UnionSchema<[v.PicklistSchema<["active", "main"], undefined>, v.StrictObjectSchema<{
104
104
  readonly subaccountId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
@@ -109,7 +109,7 @@ declare const ListTransfersInputSchema: v.SchemaWithPipe<readonly [v.StrictObjec
109
109
  reversed: boolean;
110
110
  timestampMin?: bigint | undefined;
111
111
  timestampMax?: bigint | undefined;
112
- transferCode?: TransferCode.DEPOSIT | TransferCode.WITHDRAW | TransferCode.MAKER_FEE | TransferCode.TAKER_FEE | TransferCode.INTERNAL_TRANSFER | TransferCode.TRADE_BASE | TransferCode.TRADE_QUOTE | TransferCode.REBATE | TransferCode.FUNDING_TO_TRADING | TransferCode.TRADING_TO_FUNDING | TransferCode.TRADING_WITHDRAW_RESERVE | TransferCode.FUNDING_USER_TRANSFER | TransferCode.TRADING_WITHDRAW_REQUEST_FEE | undefined;
112
+ transferCode?: TransferCode.DEPOSIT | TransferCode.WITHDRAW | TransferCode.MAKER_FEE | TransferCode.TAKER_FEE | TransferCode.INTERNAL_TRANSFER | TransferCode.TRADE_BASE | TransferCode.TRADE_QUOTE | TransferCode.REBATE | TransferCode.FUNDING_TO_TRADING | TransferCode.TRADING_TO_FUNDING | TransferCode.TRADING_WITHDRAW_RESERVE | TransferCode.FUNDING_USER_TRANSFER | TransferCode.TRADING_WITHDRAW_REQUEST_FEE | TransferCode.TRADING_WITHDRAW_FEE_LEG | TransferCode.QUICKSWAP_POLYESTER_FEE | TransferCode.QUICKSWAP_BROKER_FEE | TransferCode.QUICKSWAP_AFFILIATE_FEE | TransferCode.FEE_SWEEP | TransferCode.FEE_REFILL | TransferCode.SYSTEM_ADJUSTMENT | TransferCode.WITHDRAW_FAILED | undefined;
113
113
  pageToken: string;
114
114
  account?: "active" | "main" | {
115
115
  subaccountId: string;
@@ -121,7 +121,7 @@ declare const ListTransfersInputSchema: v.SchemaWithPipe<readonly [v.StrictObjec
121
121
  ledger: number;
122
122
  limit?: number | undefined;
123
123
  reversed: boolean;
124
- transferCode?: TransferCode.DEPOSIT | TransferCode.WITHDRAW | TransferCode.MAKER_FEE | TransferCode.TAKER_FEE | TransferCode.INTERNAL_TRANSFER | TransferCode.TRADE_BASE | TransferCode.TRADE_QUOTE | TransferCode.REBATE | TransferCode.FUNDING_TO_TRADING | TransferCode.TRADING_TO_FUNDING | TransferCode.TRADING_WITHDRAW_RESERVE | TransferCode.FUNDING_USER_TRANSFER | TransferCode.TRADING_WITHDRAW_REQUEST_FEE | undefined;
124
+ transferCode?: TransferCode.DEPOSIT | TransferCode.WITHDRAW | TransferCode.MAKER_FEE | TransferCode.TAKER_FEE | TransferCode.INTERNAL_TRANSFER | TransferCode.TRADE_BASE | TransferCode.TRADE_QUOTE | TransferCode.REBATE | TransferCode.FUNDING_TO_TRADING | TransferCode.TRADING_TO_FUNDING | TransferCode.TRADING_WITHDRAW_RESERVE | TransferCode.FUNDING_USER_TRANSFER | TransferCode.TRADING_WITHDRAW_REQUEST_FEE | TransferCode.TRADING_WITHDRAW_FEE_LEG | TransferCode.QUICKSWAP_POLYESTER_FEE | TransferCode.QUICKSWAP_BROKER_FEE | TransferCode.QUICKSWAP_AFFILIATE_FEE | TransferCode.FEE_SWEEP | TransferCode.FEE_REFILL | TransferCode.SYSTEM_ADJUSTMENT | TransferCode.WITHDRAW_FAILED | undefined;
125
125
  pageToken: string;
126
126
  }>]>;
127
127
  type ListTransfersInput = v.InferInput<typeof ListTransfersInputSchema>;
@@ -1113,7 +1113,7 @@ type CreateTriggerInput = v.InferInput<ReturnType<typeof createCreateTriggerInpu
1113
1113
  declare const ListTriggersInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1114
1114
  readonly parentOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, bigint | undefined>]>;
1115
1115
  readonly symbolId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>, undefined>;
1116
- readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "canceled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>;
1116
+ readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "canceled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>;
1117
1117
  readonly triggerType: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["stop_loss", "take_profit", "trailing_stop", "twap", "ladder"], undefined>, undefined>, v.TransformAction<"twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop" | undefined, TriggerType>]>;
1118
1118
  readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 1000, undefined>]>, 50>;
1119
1119
  readonly pageToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
@@ -1334,7 +1334,7 @@ declare const ListTriggerEventsInputSchema: v.SchemaWithPipe<readonly [v.StrictO
1334
1334
  readonly triggerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.TransformAction<string, bigint>]>;
1335
1335
  }, undefined>, v.TransformAction<{
1336
1336
  limit?: number | undefined;
1337
- eventType?: "failed" | "canceled" | "updated" | "armed" | "fired" | "activated" | "fire_refused" | undefined;
1337
+ eventType?: "failed" | "canceled" | "armed" | "updated" | "fired" | "activated" | "fire_refused" | undefined;
1338
1338
  pageToken: string;
1339
1339
  account?: "active" | "main" | {
1340
1340
  subaccountId: string;
@@ -29,62 +29,62 @@ declare const CreateTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSche
29
29
  type CreateTriggerResult = v.InferOutput<typeof CreateTriggerResultSchema>;
30
30
  declare const CancelTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
31
31
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
32
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused">]>;
32
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running">]>;
33
33
  readonly tsNs: v.BigintSchema<undefined>;
34
34
  }, undefined>, v.TransformAction<{
35
35
  triggerId: string;
36
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused";
36
+ status: "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running";
37
37
  tsNs: bigint;
38
38
  }, {
39
39
  ts: number;
40
40
  tsNs: string;
41
41
  triggerId: string;
42
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused";
42
+ status: "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running";
43
43
  }>]>;
44
44
  type CancelTriggerResult = v.InferOutput<typeof CancelTriggerResultSchema>;
45
45
  declare const ModifyTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
46
46
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
47
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused">]>;
47
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running">]>;
48
48
  readonly tsNs: v.BigintSchema<undefined>;
49
49
  }, undefined>, v.TransformAction<{
50
50
  triggerId: string;
51
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused";
51
+ status: "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running";
52
52
  tsNs: bigint;
53
53
  }, {
54
54
  ts: number;
55
55
  tsNs: string;
56
56
  triggerId: string;
57
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused";
57
+ status: "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running";
58
58
  }>]>;
59
59
  type ModifyTriggerResult = v.InferOutput<typeof ModifyTriggerResultSchema>;
60
60
  declare const PauseTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
61
61
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
62
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused">]>;
62
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running">]>;
63
63
  readonly tsNs: v.BigintSchema<undefined>;
64
64
  }, undefined>, v.TransformAction<{
65
65
  triggerId: string;
66
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused";
66
+ status: "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running";
67
67
  tsNs: bigint;
68
68
  }, {
69
69
  ts: number;
70
70
  tsNs: string;
71
71
  triggerId: string;
72
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused";
72
+ status: "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running";
73
73
  }>]>;
74
74
  type PauseTriggerResult = v.InferOutput<typeof PauseTriggerResultSchema>;
75
75
  declare const ResumeTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
76
76
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
77
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused">]>;
77
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running">]>;
78
78
  readonly tsNs: v.BigintSchema<undefined>;
79
79
  }, undefined>, v.TransformAction<{
80
80
  triggerId: string;
81
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused";
81
+ status: "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running";
82
82
  tsNs: bigint;
83
83
  }, {
84
84
  ts: number;
85
85
  tsNs: string;
86
86
  triggerId: string;
87
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused";
87
+ status: "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running";
88
88
  }>]>;
89
89
  type ResumeTriggerResult = v.InferOutput<typeof ResumeTriggerResultSchema>;
90
90
  type StopDetailsOutput = {
@@ -619,14 +619,14 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
619
619
  triggerId: string;
620
620
  subaccountId: string;
621
621
  symbolId: number;
622
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused";
622
+ status: "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running";
623
623
  parentOrderId: string | undefined;
624
624
  qty: string;
625
625
  feeAsset: "unspecified" | "quote" | "base";
626
626
  selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
627
627
  configuration: {
628
628
  type: "stop_loss" | "take_profit";
629
- side: "unspecified" | "buy" | "sell";
629
+ side: "buy" | "sell" | "unspecified";
630
630
  triggerPrice: string;
631
631
  triggerPriceSource: "unspecified" | "last" | "index" | "mark";
632
632
  execution: {
@@ -679,7 +679,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
679
679
  readonly postOnly?: undefined;
680
680
  } | {
681
681
  type: "trailing_stop";
682
- side: "unspecified" | "buy" | "sell";
682
+ side: "buy" | "sell" | "unspecified";
683
683
  trailingDistance: {
684
684
  kind: "distance";
685
685
  distance: string;
@@ -719,7 +719,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
719
719
  readonly postOnly?: undefined;
720
720
  } | {
721
721
  type: "twap";
722
- side: "unspecified" | "buy" | "sell";
722
+ side: "buy" | "sell" | "unspecified";
723
723
  durationMs: number;
724
724
  sliceIntervalMs: number;
725
725
  execution: {
@@ -759,7 +759,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
759
759
  readonly postOnly?: undefined;
760
760
  } | {
761
761
  type: "ladder";
762
- side: "unspecified" | "buy" | "sell";
762
+ side: "buy" | "sell" | "unspecified";
763
763
  priceMin: string;
764
764
  priceMax: string;
765
765
  levels: number;
@@ -803,14 +803,14 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
803
803
  triggerId: string;
804
804
  subaccountId: string;
805
805
  symbolId: number;
806
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused";
806
+ status: "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running";
807
807
  parentOrderId: string | undefined;
808
808
  qty: string;
809
809
  feeAsset: "unspecified" | "quote" | "base";
810
810
  selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
811
811
  configuration: {
812
812
  type: "stop_loss" | "take_profit";
813
- side: "unspecified" | "buy" | "sell";
813
+ side: "buy" | "sell" | "unspecified";
814
814
  triggerPrice: string;
815
815
  triggerPriceSource: "unspecified" | "last" | "index" | "mark";
816
816
  execution: {
@@ -863,7 +863,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
863
863
  readonly postOnly?: undefined;
864
864
  } | {
865
865
  type: "trailing_stop";
866
- side: "unspecified" | "buy" | "sell";
866
+ side: "buy" | "sell" | "unspecified";
867
867
  trailingDistance: {
868
868
  kind: "distance";
869
869
  distance: string;
@@ -903,7 +903,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
903
903
  readonly postOnly?: undefined;
904
904
  } | {
905
905
  type: "twap";
906
- side: "unspecified" | "buy" | "sell";
906
+ side: "buy" | "sell" | "unspecified";
907
907
  durationMs: number;
908
908
  sliceIntervalMs: number;
909
909
  execution: {
@@ -943,7 +943,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
943
943
  readonly postOnly?: undefined;
944
944
  } | {
945
945
  type: "ladder";
946
- side: "unspecified" | "buy" | "sell";
946
+ side: "buy" | "sell" | "unspecified";
947
947
  priceMin: string;
948
948
  priceMax: string;
949
949
  levels: number;
@@ -987,14 +987,14 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
987
987
  triggerId: string;
988
988
  subaccountId: string;
989
989
  symbolId: number;
990
- status: "unspecified" | "failed" | "canceled" | "completed" | "created" | "armed" | "running" | "paused";
990
+ status: "unspecified" | "failed" | "canceled" | "completed" | "paused" | "created" | "armed" | "running";
991
991
  parentOrderId: string | undefined;
992
992
  qty: string;
993
993
  feeAsset: "unspecified" | "quote" | "base";
994
994
  selfTradePreventionMode: "unspecified" | "expire_taker" | "expire_maker" | "expire_both";
995
995
  configuration: {
996
996
  type: "stop_loss" | "take_profit";
997
- side: "unspecified" | "buy" | "sell";
997
+ side: "buy" | "sell" | "unspecified";
998
998
  triggerPrice: string;
999
999
  triggerPriceSource: "unspecified" | "last" | "index" | "mark";
1000
1000
  execution: {
@@ -1047,7 +1047,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
1047
1047
  readonly postOnly?: undefined;
1048
1048
  } | {
1049
1049
  type: "trailing_stop";
1050
- side: "unspecified" | "buy" | "sell";
1050
+ side: "buy" | "sell" | "unspecified";
1051
1051
  trailingDistance: {
1052
1052
  kind: "distance";
1053
1053
  distance: string;
@@ -1087,7 +1087,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
1087
1087
  readonly postOnly?: undefined;
1088
1088
  } | {
1089
1089
  type: "twap";
1090
- side: "unspecified" | "buy" | "sell";
1090
+ side: "buy" | "sell" | "unspecified";
1091
1091
  durationMs: number;
1092
1092
  sliceIntervalMs: number;
1093
1093
  execution: {
@@ -1127,7 +1127,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
1127
1127
  readonly postOnly?: undefined;
1128
1128
  } | {
1129
1129
  type: "ladder";
1130
- side: "unspecified" | "buy" | "sell";
1130
+ side: "buy" | "sell" | "unspecified";
1131
1131
  priceMin: string;
1132
1132
  priceMax: string;
1133
1133
  levels: number;
@@ -1217,7 +1217,7 @@ declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe<r
1217
1217
  subaccountId: string;
1218
1218
  symbolId: number;
1219
1219
  triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
1220
- eventType: "unspecified" | "failed" | "canceled" | "updated" | "armed" | "fired" | "activated" | "fire_refused";
1220
+ eventType: "unspecified" | "failed" | "canceled" | "armed" | "updated" | "fired" | "activated" | "fire_refused";
1221
1221
  ts: number;
1222
1222
  tsNs: string;
1223
1223
  childSeq: number;
@@ -1232,7 +1232,7 @@ declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe<r
1232
1232
  subaccountId: string;
1233
1233
  symbolId: number;
1234
1234
  triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
1235
- eventType: "unspecified" | "failed" | "canceled" | "updated" | "armed" | "fired" | "activated" | "fire_refused";
1235
+ eventType: "unspecified" | "failed" | "canceled" | "armed" | "updated" | "fired" | "activated" | "fire_refused";
1236
1236
  ts: number;
1237
1237
  tsNs: string;
1238
1238
  childSeq: number;
@@ -1247,7 +1247,7 @@ declare function createTriggerEventSchema(scales: SdkScales): v.SchemaWithPipe<r
1247
1247
  subaccountId: string;
1248
1248
  symbolId: number;
1249
1249
  triggerType: "unspecified" | "twap" | "ladder" | "stop_loss" | "take_profit" | "trailing_stop";
1250
- eventType: "unspecified" | "failed" | "canceled" | "updated" | "armed" | "fired" | "activated" | "fire_refused";
1250
+ eventType: "unspecified" | "failed" | "canceled" | "armed" | "updated" | "fired" | "activated" | "fire_refused";
1251
1251
  ts: number;
1252
1252
  tsNs: string;
1253
1253
  childSeq: number;
@@ -1,4 +1,4 @@
1
- import { DepositWithdrawConfig, ZipperAssetChainVariant, ZipperAssetConfig, ZipperChainConfig, ZipperChainContractConfig } from "../../shared/catalog-config.js";
1
+ import { DepositWithdrawConfig, ZipperAssetChainVariant, ZipperAssetConfig, ZipperChainConfig, ZipperChainContractConfig, ZipperMemoRequirement } from "../../shared/catalog-config.js";
2
2
  import "../../shared/decimal-surface.js";
3
3
  import "valibot";
4
4
  //#region src/services/zipper/zipper.schemas.d.ts
@@ -10,5 +10,5 @@ type ZippedAssetSupplyBatch = {
10
10
  updates: ZippedAssetSupplyUpdate[];
11
11
  };
12
12
  //#endregion
13
- export { type DepositWithdrawConfig, ZippedAssetSupplyBatch, ZippedAssetSupplyUpdate, type ZipperAssetChainVariant, type ZipperAssetConfig, type ZipperChainConfig, type ZipperChainContractConfig };
13
+ export { type DepositWithdrawConfig, ZippedAssetSupplyBatch, ZippedAssetSupplyUpdate, type ZipperAssetChainVariant, type ZipperAssetConfig, type ZipperChainConfig, type ZipperChainContractConfig, type ZipperMemoRequirement };
14
14
  //# sourceMappingURL=zipper.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"zipper.schemas.d.ts","names":[],"sources":["../../../src/services/zipper/zipper.schemas.ts"],"mappings":";;;;KAsHY;EACR;EACA;;KAGQ;EACR,SAAS"}
1
+ {"version":3,"file":"zipper.schemas.d.ts","names":[],"sources":["../../../src/services/zipper/zipper.schemas.ts"],"mappings":";;;;KAuIY;EACR;EACA;;KAGQ;EACR,SAAS"}
@@ -1,6 +1,14 @@
1
+ import { enumLabelSchema } from "../../shared/proto-enum-codec.js";
1
2
  import { scaledToDecimalOutput } from "../../shared/decimal-surface.js";
3
+ import "../../gen/chain/zipper/v1/zipper_pb.js";
2
4
  import * as v from "valibot";
3
5
  //#region src/services/zipper/zipper.schemas.ts
6
+ const ZipperMemoRequirementCodec = { protoToOutput: {
7
+ [0]: "unspecified",
8
+ [1]: "required",
9
+ [2]: "optional",
10
+ [3]: "not_supported"
11
+ } };
4
12
  const ZipperChainConfigSchema = v.object({
5
13
  chainId: v.number(),
6
14
  code: v.string(),
@@ -13,7 +21,10 @@ const ZipperChainConfigSchema = v.object({
13
21
  confirmationTimeSeconds: v.number(),
14
22
  isCaseSensitive: v.optional(v.boolean(), false),
15
23
  minAddressLength: v.number(),
16
- maxAddressLength: v.number()
24
+ maxAddressLength: v.number(),
25
+ memoRequirement: v.optional(enumLabelSchema(ZipperMemoRequirementCodec.protoToOutput), 0),
26
+ memoLabel: v.optional(v.string(), ""),
27
+ memoFormatHint: v.optional(v.string(), "")
17
28
  });
18
29
  const ZipperAssetChainVariantWireSchema = v.object({
19
30
  zippedAssetId: v.number(),
@@ -83,6 +94,6 @@ function createZippedAssetSupplyBatchSchema(scales) {
83
94
  })) })));
84
95
  }
85
96
  //#endregion
86
- export { DepositWithdrawConfigSchema, ZipperAssetConfigSchema, ZipperChainConfigSchema, ZipperChainContractConfigSchema, createZippedAssetSupplyBatchSchema };
97
+ export { DepositWithdrawConfigSchema, ZipperAssetConfigSchema, ZipperChainConfigSchema, ZipperChainContractConfigSchema, ZipperMemoRequirementCodec, createZippedAssetSupplyBatchSchema };
87
98
 
88
99
  //# sourceMappingURL=zipper.schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"zipper.schemas.js","names":[],"sources":["../../../src/services/zipper/zipper.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport type {\n DepositWithdrawConfig,\n ZipperAssetChainVariant,\n ZipperAssetConfig,\n ZipperChainConfig,\n ZipperChainContractConfig,\n} from \"../../shared/catalog-config.js\";\nimport { scaledToDecimalOutput, type SdkScales } from \"../../shared/decimal-surface.js\";\n\nexport type {\n DepositWithdrawConfig,\n ZipperAssetChainVariant,\n ZipperAssetConfig,\n ZipperChainConfig,\n ZipperChainContractConfig,\n};\n\nexport const ZipperChainConfigSchema = v.object({\n chainId: v.number(),\n code: v.string(),\n name: v.string(),\n nativeChainId: v.optional(v.string(), \"\"),\n nativeCurrencySymbol: v.string(),\n explorerUrl: v.string(),\n icon: v.string(),\n requiredConfirmations: v.number(),\n confirmationTimeSeconds: v.number(),\n isCaseSensitive: v.optional(v.boolean(), false),\n minAddressLength: v.number(),\n maxAddressLength: v.number(),\n});\n\nconst ZipperAssetChainVariantWireSchema = v.object({\n zippedAssetId: v.number(),\n chainId: v.number(),\n isNativeAsset: v.optional(v.boolean(), false),\n networkFee: v.optional(v.string(), \"0\"),\n networkFeeTsSec: v.pipe(v.optional(v.bigint(), 0n), v.transform(Number)),\n ztokenAddress: v.optional(v.string(), \"\"),\n sourceAddress: v.optional(v.string(), \"\"),\n sourceDecimals: v.optional(v.number(), 18),\n ztokenDecimals: v.optional(v.number(), 18),\n depositMinAmount: v.optional(v.string(), \"\"),\n withdrawMinAmount: v.optional(v.string(), \"\"),\n supplyQ: v.optional(v.bigint(), 0n),\n});\n\nfunction normalizeZipperAssetChainVariant(\n quantityScale: number,\n {\n sourceAddress,\n sourceDecimals,\n supplyQ,\n ztokenAddress,\n ztokenDecimals,\n ...variant\n }: v.InferOutput<typeof ZipperAssetChainVariantWireSchema>,\n): ZipperAssetChainVariant {\n return {\n ...variant,\n supply: scaledToDecimalOutput(supplyQ, quantityScale),\n sourceToken: {\n address: sourceAddress,\n decimals: sourceDecimals,\n },\n zToken: {\n address: ztokenAddress,\n decimals: ztokenDecimals,\n },\n };\n}\n\nexport const ZipperAssetConfigSchema = v.pipe(\n v.object({\n asset: v.string(),\n ledgerId: v.number(),\n name: v.string(),\n icon: v.string(),\n quantityScale: v.number(),\n quantityDisplayDecimals: v.number(),\n variants: v.array(ZipperAssetChainVariantWireSchema),\n uAssetId: v.optional(v.string(), \"\"),\n }),\n v.transform(({ variants, ...asset }) => ({\n ...asset,\n variants: variants.map((variant) =>\n normalizeZipperAssetChainVariant(asset.quantityScale, variant),\n ),\n })),\n);\n\nexport const ZipperChainContractConfigSchema = v.object({\n name: v.string(),\n address: v.string(),\n type: v.optional(v.string(), \"\"),\n description: v.optional(v.string(), \"\"),\n version: v.optional(v.number(), 0),\n});\n\nexport const DepositWithdrawConfigSchema = v.pipe(\n v.object({\n chains: v.array(ZipperChainConfigSchema),\n assets: v.array(ZipperAssetConfigSchema),\n tsSec: v.bigint(),\n contracts: v.optional(v.array(ZipperChainContractConfigSchema), []),\n }),\n v.transform(({ tsSec, ...config }) => ({\n ...config,\n tsMs: Number(tsSec) * 1000,\n })),\n);\n\nconst ZippedAssetSupplyUpdateWireSchema = v.object({\n zippedAssetId: v.number(),\n supplyQ: v.bigint(),\n});\n\nexport type ZippedAssetSupplyUpdate = {\n zippedAssetId: number;\n supply: string;\n};\n\nexport type ZippedAssetSupplyBatch = {\n updates: ZippedAssetSupplyUpdate[];\n};\n\nexport function createZippedAssetSupplyBatchSchema(scales: SdkScales) {\n return v.pipe(\n v.object({\n updates: v.array(ZippedAssetSupplyUpdateWireSchema),\n }),\n v.transform(\n (batch): ZippedAssetSupplyBatch => ({\n updates: batch.updates.map((update) => ({\n zippedAssetId: update.zippedAssetId,\n supply: scaledToDecimalOutput(\n update.supplyQ,\n scales.zippedAssetAmount(update.zippedAssetId),\n ),\n })),\n }),\n ),\n );\n}\n"],"mappings":";;;AAkBA,MAAa,0BAA0B,EAAE,OAAO;CAC5C,SAAS,EAAE,OAAO;CAClB,MAAM,EAAE,OAAO;CACf,MAAM,EAAE,OAAO;CACf,eAAe,EAAE,SAAS,EAAE,OAAO,GAAG,EAAE;CACxC,sBAAsB,EAAE,OAAO;CAC/B,aAAa,EAAE,OAAO;CACtB,MAAM,EAAE,OAAO;CACf,uBAAuB,EAAE,OAAO;CAChC,yBAAyB,EAAE,OAAO;CAClC,iBAAiB,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK;CAC9C,kBAAkB,EAAE,OAAO;CAC3B,kBAAkB,EAAE,OAAO;AAC/B,CAAC;AAED,MAAM,oCAAoC,EAAE,OAAO;CAC/C,eAAe,EAAE,OAAO;CACxB,SAAS,EAAE,OAAO;C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ACf,SAAS,EAAE,OAAO;CAClB,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,EAAE;CAC/B,aAAa,EAAE,SAAS,EAAE,OAAO,GAAG,EAAE;CACtC,SAAS,EAAE,SAAS,EAAE,OAAO,GAAG,CAAC;AACrC,CAAC;AAED,MAAa,8BAA8B,EAAE,KACzC,EAAE,OAAO;CACL,QAAQ,EAAE,MAAM,uBAAuB;CACvC,QAAQ,EAAE,MAAM,uBAAuB;CACvC,OAAO,EAAE,OAAO;CAChB,WAAW,EAAE,SAAS,EAAE,MAAM,+BAA+B,GAAG,CAAC,CAAC;AACtE,CAAC,GACD,EAAE,WAAW,EAAE,OAAO,GAAG,cAAc;CACnC,GAAG;CACH,MAAM,OAAO,KAAK,IAAI;AAC1B,EAAE,CACN;AAEA,MAAM,oCAAoC,EAAE,OAAO;CAC/C,eAAe,EAAE,OAAO;CACxB,SAAS,EAAE,OAAO;AACtB,CAAC;AAWD,SAAgB,mCAAmC,QAAmB;CAClE,OAAO,EAAE,KACL,EAAE,OAAO,EACL,SAAS,EAAE,MAAM,iCAAiC,EACtD,CAAC,GACD,EAAE,WACG,WAAmC,EAChC,SAAS,MAAM,QAAQ,KAAK,YAAY;EACpC,eAAe,OAAO;EACtB,QAAQ,sBACJ,OAAO,SACP,OAAO,kBAAkB,OAAO,aAAa,CACjD;CACJ,EAAE,EACN,EACJ,CACJ;AACJ"}
1
+ {"version":3,"file":"zipper.schemas.js","names":[],"sources":["../../../src/services/zipper/zipper.schemas.ts"],"sourcesContent":["import * as v from \"valibot\";\nimport { MemoRequirement } from \"../../gen/chain/zipper/v1/zipper_pb.js\";\nimport { enumLabelSchema } from \"../../shared/proto-enum-codec.js\";\nimport type { ProtoToOutput } from \"../../utils/types.js\";\nimport type {\n DepositWithdrawConfig,\n ZipperAssetChainVariant,\n ZipperAssetConfig,\n ZipperChainConfig,\n ZipperChainContractConfig,\n ZipperMemoRequirement,\n} from \"../../shared/catalog-config.js\";\nimport { scaledToDecimalOutput, type SdkScales } from \"../../shared/decimal-surface.js\";\n\nexport type {\n DepositWithdrawConfig,\n ZipperAssetChainVariant,\n ZipperAssetConfig,\n ZipperChainConfig,\n ZipperChainContractConfig,\n ZipperMemoRequirement,\n};\n\nexport const ZipperMemoRequirementCodec = {\n protoToOutput: {\n [MemoRequirement.MEMO_UNSPECIFIED]: \"unspecified\",\n [MemoRequirement.REQUIRED]: \"required\",\n [MemoRequirement.OPTIONAL]: \"optional\",\n [MemoRequirement.NOT_SUPPORTED]: \"not_supported\",\n } satisfies ProtoToOutput<MemoRequirement, ZipperMemoRequirement>,\n} as const;\n\nexport const ZipperChainConfigSchema = v.object({\n chainId: v.number(),\n code: v.string(),\n name: v.string(),\n nativeChainId: v.optional(v.string(), \"\"),\n nativeCurrencySymbol: v.string(),\n explorerUrl: v.string(),\n icon: v.string(),\n requiredConfirmations: v.number(),\n confirmationTimeSeconds: v.number(),\n isCaseSensitive: v.optional(v.boolean(), false),\n minAddressLength: v.number(),\n maxAddressLength: v.number(),\n memoRequirement: v.optional(enumLabelSchema(ZipperMemoRequirementCodec.protoToOutput), 0),\n memoLabel: v.optional(v.string(), \"\"),\n memoFormatHint: v.optional(v.string(), \"\"),\n});\n\nconst ZipperAssetChainVariantWireSchema = v.object({\n zippedAssetId: v.number(),\n chainId: v.number(),\n isNativeAsset: v.optional(v.boolean(), false),\n networkFee: v.optional(v.string(), \"0\"),\n networkFeeTsSec: v.pipe(v.optional(v.bigint(), 0n), v.transform(Number)),\n ztokenAddress: v.optional(v.string(), \"\"),\n sourceAddress: v.optional(v.string(), \"\"),\n sourceDecimals: v.optional(v.number(), 18),\n ztokenDecimals: v.optional(v.number(), 18),\n depositMinAmount: v.optional(v.string(), \"\"),\n withdrawMinAmount: v.optional(v.string(), \"\"),\n supplyQ: v.optional(v.bigint(), 0n),\n});\n\nfunction normalizeZipperAssetChainVariant(\n quantityScale: number,\n {\n sourceAddress,\n sourceDecimals,\n supplyQ,\n ztokenAddress,\n ztokenDecimals,\n ...variant\n }: v.InferOutput<typeof ZipperAssetChainVariantWireSchema>,\n): ZipperAssetChainVariant {\n return {\n ...variant,\n supply: scaledToDecimalOutput(supplyQ, quantityScale),\n sourceToken: {\n address: sourceAddress,\n decimals: sourceDecimals,\n },\n zToken: {\n address: ztokenAddress,\n decimals: ztokenDecimals,\n },\n };\n}\n\nexport const ZipperAssetConfigSchema = v.pipe(\n v.object({\n asset: v.string(),\n ledgerId: v.number(),\n name: v.string(),\n icon: v.string(),\n quantityScale: v.number(),\n quantityDisplayDecimals: v.number(),\n variants: v.array(ZipperAssetChainVariantWireSchema),\n uAssetId: v.optional(v.string(), \"\"),\n }),\n v.transform(({ variants, ...asset }) => ({\n ...asset,\n variants: variants.map((variant) =>\n normalizeZipperAssetChainVariant(asset.quantityScale, variant),\n ),\n })),\n);\n\nexport const ZipperChainContractConfigSchema = v.object({\n name: v.string(),\n address: v.string(),\n type: v.optional(v.string(), \"\"),\n description: v.optional(v.string(), \"\"),\n version: v.optional(v.number(), 0),\n});\n\nexport const DepositWithdrawConfigSchema = v.pipe(\n v.object({\n chains: v.array(ZipperChainConfigSchema),\n assets: v.array(ZipperAssetConfigSchema),\n tsSec: v.bigint(),\n contracts: v.optional(v.array(ZipperChainContractConfigSchema), []),\n }),\n v.transform(({ tsSec, ...config }) => ({\n ...config,\n tsMs: Number(tsSec) * 1000,\n })),\n);\n\nconst ZippedAssetSupplyUpdateWireSchema = v.object({\n zippedAssetId: v.number(),\n supplyQ: v.bigint(),\n});\n\nexport type ZippedAssetSupplyUpdate = {\n zippedAssetId: number;\n supply: string;\n};\n\nexport type ZippedAssetSupplyBatch = {\n updates: ZippedAssetSupplyUpdate[];\n};\n\nexport function createZippedAssetSupplyBatchSchema(scales: SdkScales) {\n return v.pipe(\n v.object({\n updates: v.array(ZippedAssetSupplyUpdateWireSchema),\n }),\n v.transform(\n (batch): ZippedAssetSupplyBatch => ({\n updates: batch.updates.map((update) => ({\n zippedAssetId: update.zippedAssetId,\n supply: sca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W,EAAE,OAAO,GAAG,cAAc;CACnC,GAAG;CACH,MAAM,OAAO,KAAK,IAAI;AAC1B,EAAE,CACN;AAEA,MAAM,oCAAoC,EAAE,OAAO;CAC/C,eAAe,EAAE,OAAO;CACxB,SAAS,EAAE,OAAO;AACtB,CAAC;AAWD,SAAgB,mCAAmC,QAAmB;CAClE,OAAO,EAAE,KACL,EAAE,OAAO,EACL,SAAS,EAAE,MAAM,iCAAiC,EACtD,CAAC,GACD,EAAE,WACG,WAAmC,EAChC,SAAS,MAAM,QAAQ,KAAK,YAAY;EACpC,eAAe,OAAO;EACtB,QAAQ,sBACJ,OAAO,SACP,OAAO,kBAAkB,OAAO,aAAa,CACjD;CACJ,EAAE,EACN,EACJ,CACJ;AACJ"}
@@ -1,4 +1,4 @@
1
- import { DepositWithdrawConfig, ZipperAssetChainVariant, ZipperAssetConfig, ZipperChainConfig, ZipperChainContractConfig } from "../../shared/catalog-config.js";
1
+ import { DepositWithdrawConfig, ZipperAssetChainVariant, ZipperAssetConfig, ZipperChainConfig, ZipperChainContractConfig, ZipperMemoRequirement } from "../../shared/catalog-config.js";
2
2
  import { ZippedAssetSupplyBatch, ZippedAssetSupplyUpdate } from "./zipper.schemas.js";
3
3
  import { SubscribeZippedAssetSupplyInput } from "./zipper.js";
4
- export type { DepositWithdrawConfig, SubscribeZippedAssetSupplyInput, ZippedAssetSupplyBatch, ZippedAssetSupplyUpdate, ZipperAssetChainVariant, ZipperAssetConfig, ZipperChainConfig, ZipperChainContractConfig };
4
+ export type { DepositWithdrawConfig, SubscribeZippedAssetSupplyInput, ZippedAssetSupplyBatch, ZippedAssetSupplyUpdate, ZipperAssetChainVariant, ZipperAssetConfig, ZipperChainConfig, ZipperChainContractConfig, ZipperMemoRequirement };