@waterx/sdk 2.1.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 (245) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +204 -0
  3. package/dist/src/client.d.ts +109 -0
  4. package/dist/src/client.js +197 -0
  5. package/dist/src/config.d.ts +229 -0
  6. package/dist/src/config.js +107 -0
  7. package/dist/src/constants.d.ts +64 -0
  8. package/dist/src/constants.js +71 -0
  9. package/dist/src/fetch.d.ts +144 -0
  10. package/dist/src/fetch.js +419 -0
  11. package/dist/src/generated/bucket_v2_framework/account.d.ts +107 -0
  12. package/dist/src/generated/bucket_v2_framework/account.js +129 -0
  13. package/dist/src/generated/bucket_v2_framework/deps/std/type_name.d.ts +17 -0
  14. package/dist/src/generated/bucket_v2_framework/deps/std/type_name.js +19 -0
  15. package/dist/src/generated/bucket_v2_framework/deps/sui/balance.d.ts +12 -0
  16. package/dist/src/generated/bucket_v2_framework/deps/sui/balance.js +14 -0
  17. package/dist/src/generated/bucket_v2_framework/deps/sui/vec_map.d.ts +36 -0
  18. package/dist/src/generated/bucket_v2_framework/deps/sui/vec_map.js +27 -0
  19. package/dist/src/generated/bucket_v2_framework/deps/sui/vec_set.d.ts +16 -0
  20. package/dist/src/generated/bucket_v2_framework/deps/sui/vec_set.js +19 -0
  21. package/dist/src/generated/bucket_v2_framework/double.d.ts +384 -0
  22. package/dist/src/generated/bucket_v2_framework/double.js +466 -0
  23. package/dist/src/generated/bucket_v2_framework/float.d.ts +364 -0
  24. package/dist/src/generated/bucket_v2_framework/float.js +440 -0
  25. package/dist/src/generated/bucket_v2_framework/liability.d.ts +197 -0
  26. package/dist/src/generated/bucket_v2_framework/liability.js +205 -0
  27. package/dist/src/generated/bucket_v2_framework/linked_table.d.ts +384 -0
  28. package/dist/src/generated/bucket_v2_framework/linked_table.js +382 -0
  29. package/dist/src/generated/bucket_v2_framework/sheet.d.ts +424 -0
  30. package/dist/src/generated/bucket_v2_framework/sheet.js +344 -0
  31. package/dist/src/generated/native_custody/custody_vault.d.ts +572 -0
  32. package/dist/src/generated/native_custody/custody_vault.js +483 -0
  33. package/dist/src/generated/native_custody/deps/bucket_v2_framework/float.d.ts +8 -0
  34. package/dist/src/generated/native_custody/deps/bucket_v2_framework/float.js +10 -0
  35. package/dist/src/generated/native_custody/deps/bucket_v2_framework/liability.d.ts +11 -0
  36. package/dist/src/generated/native_custody/deps/bucket_v2_framework/liability.js +13 -0
  37. package/dist/src/generated/native_custody/deps/bucket_v2_framework/sheet.d.ts +49 -0
  38. package/dist/src/generated/native_custody/deps/bucket_v2_framework/sheet.js +18 -0
  39. package/dist/src/generated/native_custody/deps/std/type_name.d.ts +17 -0
  40. package/dist/src/generated/native_custody/deps/std/type_name.js +19 -0
  41. package/dist/src/generated/native_custody/deps/sui/balance.d.ts +12 -0
  42. package/dist/src/generated/native_custody/deps/sui/balance.js +14 -0
  43. package/dist/src/generated/native_custody/deps/sui/vec_map.d.ts +36 -0
  44. package/dist/src/generated/native_custody/deps/sui/vec_map.js +27 -0
  45. package/dist/src/generated/native_custody/deps/sui/vec_set.d.ts +16 -0
  46. package/dist/src/generated/native_custody/deps/sui/vec_set.js +19 -0
  47. package/dist/src/generated/native_custody/events.d.ts +36 -0
  48. package/dist/src/generated/native_custody/events.js +36 -0
  49. package/dist/src/generated/pyth_sponsor_rule/deps/sui/balance.d.ts +12 -0
  50. package/dist/src/generated/pyth_sponsor_rule/deps/sui/balance.js +14 -0
  51. package/dist/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.d.ts +68 -0
  52. package/dist/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.js +74 -0
  53. package/dist/src/generated/utils/index.d.ts +30 -0
  54. package/dist/src/generated/utils/index.js +157 -0
  55. package/dist/src/generated/waterx_account/account.d.ts +1818 -0
  56. package/dist/src/generated/waterx_account/account.js +1723 -0
  57. package/dist/src/generated/waterx_account/deps/bucket_v2_framework/liability.d.ts +11 -0
  58. package/dist/src/generated/waterx_account/deps/bucket_v2_framework/liability.js +13 -0
  59. package/dist/src/generated/waterx_account/deps/bucket_v2_framework/sheet.d.ts +49 -0
  60. package/dist/src/generated/waterx_account/deps/bucket_v2_framework/sheet.js +18 -0
  61. package/dist/src/generated/waterx_account/deps/std/type_name.d.ts +17 -0
  62. package/dist/src/generated/waterx_account/deps/std/type_name.js +19 -0
  63. package/dist/src/generated/waterx_account/deps/sui/balance.d.ts +12 -0
  64. package/dist/src/generated/waterx_account/deps/sui/balance.js +14 -0
  65. package/dist/src/generated/waterx_account/deps/sui/object_table.d.ts +17 -0
  66. package/dist/src/generated/waterx_account/deps/sui/object_table.js +19 -0
  67. package/dist/src/generated/waterx_account/deps/sui/table.d.ts +29 -0
  68. package/dist/src/generated/waterx_account/deps/sui/table.js +31 -0
  69. package/dist/src/generated/waterx_account/deps/sui/vec_map.d.ts +36 -0
  70. package/dist/src/generated/waterx_account/deps/sui/vec_map.js +27 -0
  71. package/dist/src/generated/waterx_account/deps/sui/vec_set.d.ts +16 -0
  72. package/dist/src/generated/waterx_account/deps/sui/vec_set.js +19 -0
  73. package/dist/src/generated/waterx_account/direct_rule.d.ts +77 -0
  74. package/dist/src/generated/waterx_account/direct_rule.js +78 -0
  75. package/dist/src/generated/waterx_account/events.d.ts +180 -0
  76. package/dist/src/generated/waterx_account/events.js +156 -0
  77. package/dist/src/generated/waterx_account/version.d.ts +10 -0
  78. package/dist/src/generated/waterx_account/version.js +8 -0
  79. package/dist/src/generated/waterx_credit/credit_registry.d.ts +708 -0
  80. package/dist/src/generated/waterx_credit/credit_registry.js +658 -0
  81. package/dist/src/generated/waterx_credit/deps/std/type_name.d.ts +17 -0
  82. package/dist/src/generated/waterx_credit/deps/std/type_name.js +19 -0
  83. package/dist/src/generated/waterx_credit/deps/sui/table.d.ts +29 -0
  84. package/dist/src/generated/waterx_credit/deps/sui/table.js +31 -0
  85. package/dist/src/generated/waterx_credit/deps/sui/vec_map.d.ts +36 -0
  86. package/dist/src/generated/waterx_credit/deps/sui/vec_map.js +27 -0
  87. package/dist/src/generated/waterx_credit/deps/sui/vec_set.d.ts +16 -0
  88. package/dist/src/generated/waterx_credit/deps/sui/vec_set.js +19 -0
  89. package/dist/src/generated/waterx_credit/limited_supply.d.ts +107 -0
  90. package/dist/src/generated/waterx_credit/limited_supply.js +131 -0
  91. package/dist/src/generated/waterx_oracle/aggregator.d.ts +211 -0
  92. package/dist/src/generated/waterx_oracle/aggregator.js +213 -0
  93. package/dist/src/generated/waterx_oracle/collector.d.ts +119 -0
  94. package/dist/src/generated/waterx_oracle/collector.js +105 -0
  95. package/dist/src/generated/waterx_oracle/deps/bucket_v2_framework/float.d.ts +8 -0
  96. package/dist/src/generated/waterx_oracle/deps/bucket_v2_framework/float.js +10 -0
  97. package/dist/src/generated/waterx_oracle/deps/std/type_name.d.ts +17 -0
  98. package/dist/src/generated/waterx_oracle/deps/std/type_name.js +19 -0
  99. package/dist/src/generated/waterx_oracle/deps/sui/vec_map.d.ts +36 -0
  100. package/dist/src/generated/waterx_oracle/deps/sui/vec_map.js +27 -0
  101. package/dist/src/generated/waterx_oracle/deps/sui/vec_set.d.ts +16 -0
  102. package/dist/src/generated/waterx_oracle/deps/sui/vec_set.js +19 -0
  103. package/dist/src/generated/waterx_oracle/oracle.d.ts +298 -0
  104. package/dist/src/generated/waterx_oracle/oracle.js +323 -0
  105. package/dist/src/generated/waterx_oracle/version.d.ts +10 -0
  106. package/dist/src/generated/waterx_oracle/version.js +8 -0
  107. package/dist/src/generated/waterx_perp/account_data.d.ts +269 -0
  108. package/dist/src/generated/waterx_perp/account_data.js +284 -0
  109. package/dist/src/generated/waterx_perp/admin.d.ts +19 -0
  110. package/dist/src/generated/waterx_perp/admin.js +22 -0
  111. package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/double.d.ts +8 -0
  112. package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/double.js +10 -0
  113. package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/float.d.ts +8 -0
  114. package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/float.js +10 -0
  115. package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/liability.d.ts +11 -0
  116. package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/liability.js +13 -0
  117. package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/linked_table.d.ts +8 -0
  118. package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/linked_table.js +18 -0
  119. package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.d.ts +49 -0
  120. package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.js +18 -0
  121. package/dist/src/generated/waterx_perp/deps/std/type_name.d.ts +17 -0
  122. package/dist/src/generated/waterx_perp/deps/std/type_name.js +19 -0
  123. package/dist/src/generated/waterx_perp/deps/sui/balance.d.ts +15 -0
  124. package/dist/src/generated/waterx_perp/deps/sui/balance.js +17 -0
  125. package/dist/src/generated/waterx_perp/deps/sui/coin.d.ts +14 -0
  126. package/dist/src/generated/waterx_perp/deps/sui/coin.js +15 -0
  127. package/dist/src/generated/waterx_perp/deps/sui/vec_map.d.ts +36 -0
  128. package/dist/src/generated/waterx_perp/deps/sui/vec_map.js +27 -0
  129. package/dist/src/generated/waterx_perp/deps/sui/vec_set.d.ts +16 -0
  130. package/dist/src/generated/waterx_perp/deps/sui/vec_set.js +19 -0
  131. package/dist/src/generated/waterx_perp/events.d.ts +1283 -0
  132. package/dist/src/generated/waterx_perp/events.js +1018 -0
  133. package/dist/src/generated/waterx_perp/global_config.d.ts +775 -0
  134. package/dist/src/generated/waterx_perp/global_config.js +836 -0
  135. package/dist/src/generated/waterx_perp/keyed_big_vector.d.ts +553 -0
  136. package/dist/src/generated/waterx_perp/keyed_big_vector.js +554 -0
  137. package/dist/src/generated/waterx_perp/lp_pool.d.ts +1648 -0
  138. package/dist/src/generated/waterx_perp/lp_pool.js +1521 -0
  139. package/dist/src/generated/waterx_perp/market_config.d.ts +715 -0
  140. package/dist/src/generated/waterx_perp/market_config.js +780 -0
  141. package/dist/src/generated/waterx_perp/math.d.ts +63 -0
  142. package/dist/src/generated/waterx_perp/math.js +64 -0
  143. package/dist/src/generated/waterx_perp/memo.d.ts +251 -0
  144. package/dist/src/generated/waterx_perp/memo.js +323 -0
  145. package/dist/src/generated/waterx_perp/order_book.d.ts +290 -0
  146. package/dist/src/generated/waterx_perp/order_book.js +329 -0
  147. package/dist/src/generated/waterx_perp/position.d.ts +1005 -0
  148. package/dist/src/generated/waterx_perp/position.js +1103 -0
  149. package/dist/src/generated/waterx_perp/request.d.ts +544 -0
  150. package/dist/src/generated/waterx_perp/request.js +541 -0
  151. package/dist/src/generated/waterx_perp/response.d.ts +247 -0
  152. package/dist/src/generated/waterx_perp/response.js +280 -0
  153. package/dist/src/generated/waterx_perp/trading.d.ts +2821 -0
  154. package/dist/src/generated/waterx_perp/trading.js +2372 -0
  155. package/dist/src/generated/waterx_perp/version.d.ts +10 -0
  156. package/dist/src/generated/waterx_perp/version.js +8 -0
  157. package/dist/src/generated/waterx_perp/witness.d.ts +18 -0
  158. package/dist/src/generated/waterx_perp/witness.js +21 -0
  159. package/dist/src/generated/waterx_perp_view/deps/std/type_name.d.ts +17 -0
  160. package/dist/src/generated/waterx_perp_view/deps/std/type_name.js +19 -0
  161. package/dist/src/generated/waterx_perp_view/view.d.ts +447 -0
  162. package/dist/src/generated/waterx_perp_view/view.js +414 -0
  163. package/dist/src/generated/waterx_pyth_rule/deps/sui/vec_map.d.ts +36 -0
  164. package/dist/src/generated/waterx_pyth_rule/deps/sui/vec_map.js +27 -0
  165. package/dist/src/generated/waterx_pyth_rule/pyth_rule.d.ts +90 -0
  166. package/dist/src/generated/waterx_pyth_rule/pyth_rule.js +72 -0
  167. package/dist/src/generated/waterx_referral/deps/sui/table.d.ts +29 -0
  168. package/dist/src/generated/waterx_referral/deps/sui/table.js +31 -0
  169. package/dist/src/generated/waterx_referral/deps/sui/vec_set.d.ts +16 -0
  170. package/dist/src/generated/waterx_referral/deps/sui/vec_set.js +19 -0
  171. package/dist/src/generated/waterx_referral/referral_table.d.ts +171 -0
  172. package/dist/src/generated/waterx_referral/referral_table.js +192 -0
  173. package/dist/src/generated/waterx_staking/deps/bucket_v2_framework/double.d.ts +8 -0
  174. package/dist/src/generated/waterx_staking/deps/bucket_v2_framework/double.js +10 -0
  175. package/dist/src/generated/waterx_staking/deps/sui/balance.d.ts +12 -0
  176. package/dist/src/generated/waterx_staking/deps/sui/balance.js +14 -0
  177. package/dist/src/generated/waterx_staking/deps/sui/table.d.ts +29 -0
  178. package/dist/src/generated/waterx_staking/deps/sui/table.js +31 -0
  179. package/dist/src/generated/waterx_staking/deps/sui/vec_set.d.ts +16 -0
  180. package/dist/src/generated/waterx_staking/deps/sui/vec_set.js +19 -0
  181. package/dist/src/generated/waterx_staking/waterx_staking.d.ts +746 -0
  182. package/dist/src/generated/waterx_staking/waterx_staking.js +731 -0
  183. package/dist/src/generated/waterx_staking/witness.d.ts +16 -0
  184. package/dist/src/generated/waterx_staking/witness.js +18 -0
  185. package/dist/src/generated/withdrawal_queue/deps/bucket_v2_framework/linked_table.d.ts +8 -0
  186. package/dist/src/generated/withdrawal_queue/deps/bucket_v2_framework/linked_table.js +18 -0
  187. package/dist/src/generated/withdrawal_queue/deps/std/type_name.d.ts +17 -0
  188. package/dist/src/generated/withdrawal_queue/deps/std/type_name.js +19 -0
  189. package/dist/src/generated/withdrawal_queue/deps/sui/balance.d.ts +12 -0
  190. package/dist/src/generated/withdrawal_queue/deps/sui/balance.js +14 -0
  191. package/dist/src/generated/withdrawal_queue/deps/sui/vec_set.d.ts +16 -0
  192. package/dist/src/generated/withdrawal_queue/deps/sui/vec_set.js +19 -0
  193. package/dist/src/generated/withdrawal_queue/withdrawal_queue.d.ts +483 -0
  194. package/dist/src/generated/withdrawal_queue/withdrawal_queue.js +480 -0
  195. package/dist/src/generated/wlp/wlp.d.ts +28 -0
  196. package/dist/src/generated/wlp/wlp.js +32 -0
  197. package/dist/src/generated/wormhole_bridge/deps/sui/table.d.ts +29 -0
  198. package/dist/src/generated/wormhole_bridge/deps/sui/table.js +31 -0
  199. package/dist/src/generated/wormhole_bridge/deps/sui/vec_map.d.ts +36 -0
  200. package/dist/src/generated/wormhole_bridge/deps/sui/vec_map.js +27 -0
  201. package/dist/src/generated/wormhole_bridge/deps/sui/vec_set.d.ts +16 -0
  202. package/dist/src/generated/wormhole_bridge/deps/sui/vec_set.js +19 -0
  203. package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/consumed_vaas.d.ts +12 -0
  204. package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/consumed_vaas.js +9 -0
  205. package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/emitter.d.ts +14 -0
  206. package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/emitter.js +16 -0
  207. package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/set.d.ts +16 -0
  208. package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/set.js +15 -0
  209. package/dist/src/generated/wormhole_bridge/events.d.ts +32 -0
  210. package/dist/src/generated/wormhole_bridge/events.js +28 -0
  211. package/dist/src/generated/wormhole_bridge/wormhole_bridge.d.ts +498 -0
  212. package/dist/src/generated/wormhole_bridge/wormhole_bridge.js +494 -0
  213. package/dist/src/index.d.ts +28 -0
  214. package/dist/src/index.js +34 -0
  215. package/dist/src/tx-builders.d.ts +242 -0
  216. package/dist/src/tx-builders.js +320 -0
  217. package/dist/src/user/account.d.ts +129 -0
  218. package/dist/src/user/account.js +166 -0
  219. package/dist/src/user/credit.d.ts +135 -0
  220. package/dist/src/user/credit.js +255 -0
  221. package/dist/src/user/custody.d.ts +71 -0
  222. package/dist/src/user/custody.js +112 -0
  223. package/dist/src/user/index.d.ts +8 -0
  224. package/dist/src/user/index.js +8 -0
  225. package/dist/src/user/order.d.ts +89 -0
  226. package/dist/src/user/order.js +134 -0
  227. package/dist/src/user/referral.d.ts +21 -0
  228. package/dist/src/user/referral.js +41 -0
  229. package/dist/src/user/staking.d.ts +54 -0
  230. package/dist/src/user/staking.js +109 -0
  231. package/dist/src/user/trading.d.ts +119 -0
  232. package/dist/src/user/trading.js +262 -0
  233. package/dist/src/user/wlp.d.ts +58 -0
  234. package/dist/src/user/wlp.js +99 -0
  235. package/dist/src/utils/account-request.d.ts +9 -0
  236. package/dist/src/utils/account-request.js +17 -0
  237. package/dist/src/utils/config.d.ts +11 -0
  238. package/dist/src/utils/config.js +15 -0
  239. package/dist/src/utils/math.d.ts +201 -0
  240. package/dist/src/utils/math.js +343 -0
  241. package/dist/src/utils/pyth.d.ts +89 -0
  242. package/dist/src/utils/pyth.js +316 -0
  243. package/dist/src/utils/wormhole.d.ts +86 -0
  244. package/dist/src/utils/wormhole.js +154 -0
  245. package/package.json +66 -0
@@ -0,0 +1,483 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { MoveStruct, MoveTuple, normalizeMoveArguments } from "../utils/index.js";
5
+ import { bcs } from '@mysten/sui/bcs';
6
+ import * as float from "./deps/bucket_v2_framework/float.js";
7
+ import * as float_1 from "./deps/bucket_v2_framework/float.js";
8
+ import * as vec_map from "./deps/sui/vec_map.js";
9
+ import * as balance_1 from "./deps/sui/balance.js";
10
+ import * as sheet_1 from "./deps/bucket_v2_framework/sheet.js";
11
+ import * as vec_set from "./deps/sui/vec_set.js";
12
+ const $moduleName = '@waterx/native-custody::custody_vault';
13
+ export const NativeCustody = new MoveStruct({ name: `${$moduleName}::NativeCustody`, fields: {
14
+ dummy_field: bcs.bool()
15
+ } });
16
+ export const FeeConfig = new MoveStruct({ name: `${$moduleName}::FeeConfig`, fields: {
17
+ mint_fee_rate: float.Float,
18
+ burn_fee_rate: float_1.Float
19
+ } });
20
+ export const SingleVault = new MoveStruct({ name: `${$moduleName}::SingleVault<phantom T>`, fields: {
21
+ id: bcs.Address,
22
+ decimal: bcs.u8(),
23
+ default_fee_config: FeeConfig,
24
+ partner_fee_configs: vec_map.VecMap(bcs.Address, FeeConfig),
25
+ min_burn_amount: bcs.u64(),
26
+ balance: balance_1.Balance,
27
+ balance_amount: bcs.u64(),
28
+ credit_backing: bcs.u64(),
29
+ sheet: sheet_1.Sheet,
30
+ deprecated: bcs.bool()
31
+ } });
32
+ export const CustodyVault = new MoveStruct({ name: `${$moduleName}::CustodyVault<phantom CREDIT>`, fields: {
33
+ id: bcs.Address,
34
+ credit_supply: bcs.u64(),
35
+ /**
36
+ * Admin-managed package-version allowlist used by admin paths that don't already
37
+ * thread `&CreditRegistry`. mint/burn paths keep the CreditRegistry-based
38
+ * `assert_valid_package` check; this set covers `add_asset` /
39
+ * `set_min_burn_amount` / `set_asset_deprecated` / `set_fee_config` so admin can
40
+ * kill-switch the package without touching `CreditRegistry.module_config_map`.
41
+ */
42
+ allowed_versions: vec_set.VecSet(bcs.u16())
43
+ } });
44
+ export const VaultKey = new MoveTuple({ name: `${$moduleName}::VaultKey<phantom T>`, fields: [bcs.bool()] });
45
+ export function packageVersion(options = {}) {
46
+ const packageAddress = options.package ?? '@waterx/native-custody';
47
+ return (tx) => tx.moveCall({
48
+ package: packageAddress,
49
+ module: 'custody_vault',
50
+ function: 'package_version',
51
+ });
52
+ }
53
+ export function memoMint(options = {}) {
54
+ const packageAddress = options.package ?? '@waterx/native-custody';
55
+ return (tx) => tx.moveCall({
56
+ package: packageAddress,
57
+ module: 'custody_vault',
58
+ function: 'memo_mint',
59
+ });
60
+ }
61
+ export function memoBurn(options = {}) {
62
+ const packageAddress = options.package ?? '@waterx/native-custody';
63
+ return (tx) => tx.moveCall({
64
+ package: packageAddress,
65
+ module: 'custody_vault',
66
+ function: 'memo_burn',
67
+ });
68
+ }
69
+ /** Create + share an empty `CustodyVault<CREDIT>`. Add assets via `add_asset`. */
70
+ export function createVault(options) {
71
+ const packageAddress = options.package ?? '@waterx/native-custody';
72
+ const argumentsTypes = [
73
+ null,
74
+ null
75
+ ];
76
+ const parameterNames = ["registry", "_"];
77
+ return (tx) => tx.moveCall({
78
+ package: packageAddress,
79
+ module: 'custody_vault',
80
+ function: 'create_vault',
81
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
82
+ typeArguments: options.typeArguments
83
+ });
84
+ }
85
+ /**
86
+ * Admin: whitelist a package version on this vault. Skips the version check itself
87
+ * so admin can recover from a stuck state.
88
+ */
89
+ export function addVersion(options) {
90
+ const packageAddress = options.package ?? '@waterx/native-custody';
91
+ const argumentsTypes = [
92
+ null,
93
+ null,
94
+ 'u16'
95
+ ];
96
+ const parameterNames = ["vault", "_", "version"];
97
+ return (tx) => tx.moveCall({
98
+ package: packageAddress,
99
+ module: 'custody_vault',
100
+ function: 'add_version',
101
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
102
+ typeArguments: options.typeArguments
103
+ });
104
+ }
105
+ /**
106
+ * Admin: remove a package version from this vault's allowlist. Skips the version
107
+ * check itself.
108
+ */
109
+ export function removeVersion(options) {
110
+ const packageAddress = options.package ?? '@waterx/native-custody';
111
+ const argumentsTypes = [
112
+ null,
113
+ null,
114
+ 'u16'
115
+ ];
116
+ const parameterNames = ["vault", "_", "version"];
117
+ return (tx) => tx.moveCall({
118
+ package: packageAddress,
119
+ module: 'custody_vault',
120
+ function: 'remove_version',
121
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
122
+ typeArguments: options.typeArguments
123
+ });
124
+ }
125
+ /**
126
+ * Register backing asset `T` on `CustodyVault<CREDIT>`. Fee-rate inputs are raw
127
+ * 1e9-scaled `Float` values (u128). e.g. 1% = `10_000_000`, 100% =
128
+ * `1_000_000_000`. Anything above 1.0 aborts.
129
+ */
130
+ export function addAsset(options) {
131
+ const packageAddress = options.package ?? '@waterx/native-custody';
132
+ const argumentsTypes = [
133
+ null,
134
+ null,
135
+ 'u8',
136
+ 'u128',
137
+ 'u128',
138
+ 'u64'
139
+ ];
140
+ const parameterNames = ["vault", "_", "decimal", "mintFeeRate", "burnFeeRate", "minBurnAmount"];
141
+ return (tx) => tx.moveCall({
142
+ package: packageAddress,
143
+ module: 'custody_vault',
144
+ function: 'add_asset',
145
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
146
+ typeArguments: options.typeArguments
147
+ });
148
+ }
149
+ export function setMinBurnAmount(options) {
150
+ const packageAddress = options.package ?? '@waterx/native-custody';
151
+ const argumentsTypes = [
152
+ null,
153
+ null,
154
+ 'u64'
155
+ ];
156
+ const parameterNames = ["vault", "_", "minBurnAmount"];
157
+ return (tx) => tx.moveCall({
158
+ package: packageAddress,
159
+ module: 'custody_vault',
160
+ function: 'set_min_burn_amount',
161
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
162
+ typeArguments: options.typeArguments
163
+ });
164
+ }
165
+ /**
166
+ * Toggle the `deprecated` flag on a backing asset. When deprecated, `mint` aborts
167
+ * with `EAssetDeprecated`; `burn` still works so existing credit holders can
168
+ * redeem.
169
+ */
170
+ export function setAssetDeprecated(options) {
171
+ const packageAddress = options.package ?? '@waterx/native-custody';
172
+ const argumentsTypes = [
173
+ null,
174
+ null,
175
+ 'bool'
176
+ ];
177
+ const parameterNames = ["vault", "_", "deprecated"];
178
+ return (tx) => tx.moveCall({
179
+ package: packageAddress,
180
+ module: 'custody_vault',
181
+ function: 'set_asset_deprecated',
182
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
183
+ typeArguments: options.typeArguments
184
+ });
185
+ }
186
+ export function setFeeConfig(options) {
187
+ const packageAddress = options.package ?? '@waterx/native-custody';
188
+ const argumentsTypes = [
189
+ null,
190
+ null,
191
+ '0x1::option::Option<address>',
192
+ 'u128',
193
+ 'u128'
194
+ ];
195
+ const parameterNames = ["vault", "_", "partner", "mintFeeRate", "burnFeeRate"];
196
+ return (tx) => tx.moveCall({
197
+ package: packageAddress,
198
+ module: 'custody_vault',
199
+ function: 'set_fee_config',
200
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
201
+ typeArguments: options.typeArguments
202
+ });
203
+ }
204
+ export function depositLiquidity(options) {
205
+ const packageAddress = options.package ?? '@waterx/native-custody';
206
+ const argumentsTypes = [
207
+ null,
208
+ null,
209
+ null,
210
+ null
211
+ ];
212
+ const parameterNames = ["vault", "registry", "_", "assetCoin"];
213
+ return (tx) => tx.moveCall({
214
+ package: packageAddress,
215
+ module: 'custody_vault',
216
+ function: 'deposit_liquidity',
217
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
218
+ typeArguments: options.typeArguments
219
+ });
220
+ }
221
+ export function withdrawLiquidity(options) {
222
+ const packageAddress = options.package ?? '@waterx/native-custody';
223
+ const argumentsTypes = [
224
+ null,
225
+ null,
226
+ null,
227
+ 'u64'
228
+ ];
229
+ const parameterNames = ["vault", "registry", "_", "amount"];
230
+ return (tx) => tx.moveCall({
231
+ package: packageAddress,
232
+ module: 'custody_vault',
233
+ function: 'withdraw_liquidity',
234
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
235
+ typeArguments: options.typeArguments
236
+ });
237
+ }
238
+ /**
239
+ * Mint credit backed by asset `T` and wrap the resulting `Coin<CREDIT>` into a
240
+ * `DepositRequest<CREDIT>` targeting `account_id`. The hot-potato request keeps
241
+ * the credit inside the waterx_account system — it must be consumed in the same
242
+ * PTB by the deposit policy registered for `CREDIT`. Fee tier is looked up by
243
+ * `account_id.to_address()` — partner discounts follow the destination wxa
244
+ * account, symmetric with `burn`.
245
+ */
246
+ export function mint(options) {
247
+ const packageAddress = options.package ?? '@waterx/native-custody';
248
+ const argumentsTypes = [
249
+ null,
250
+ null,
251
+ null,
252
+ '0x2::object::ID',
253
+ null,
254
+ 'vector<u8>'
255
+ ];
256
+ const parameterNames = ["vault", "registry", "accountRegistry", "accountId", "assetCoin", "extraData"];
257
+ return (tx) => tx.moveCall({
258
+ package: packageAddress,
259
+ module: 'custody_vault',
260
+ function: 'mint',
261
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
262
+ typeArguments: options.typeArguments
263
+ });
264
+ }
265
+ /**
266
+ * Variant of `mint` that accepts a `DepositRequest<T>` instead of raw `Coin<T>`.
267
+ * Requires `T` to have `NativeCustody` registered as its deposit policy on the wxa
268
+ * `AccountRegistry`. Unwraps the request, then funnels through `mint` so the
269
+ * returned `DepositRequest<CREDIT>` carries the same `account_id` and `extra_data`
270
+ * as the input request.
271
+ */
272
+ export function mintFromRequest(options) {
273
+ const packageAddress = options.package ?? '@waterx/native-custody';
274
+ const argumentsTypes = [
275
+ null,
276
+ null,
277
+ null,
278
+ null
279
+ ];
280
+ const parameterNames = ["vault", "registry", "accountRegistry", "depositRequest"];
281
+ return (tx) => tx.moveCall({
282
+ package: packageAddress,
283
+ module: 'custody_vault',
284
+ function: 'mint_from_request',
285
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
286
+ typeArguments: options.typeArguments
287
+ });
288
+ }
289
+ /**
290
+ * `account_id` identifies the wxa Account that the burned CREDIT belongs to. Used
291
+ * (a) as the personal-burn-cap key on the credit registry and (b) as the
292
+ * partner-fee lookup key — so partner discounts follow the source account, not the
293
+ * executor that calls this function (fixes audit finding #3's partner-fee-evasion
294
+ * vector when invoked via `withdrawal_queue::execute_native`).
295
+ */
296
+ export function burn(options) {
297
+ const packageAddress = options.package ?? '@waterx/native-custody';
298
+ const argumentsTypes = [
299
+ null,
300
+ null,
301
+ '0x2::object::ID',
302
+ null,
303
+ '0x2::clock::Clock'
304
+ ];
305
+ const parameterNames = ["vault", "registry", "accountId", "creditCoin"];
306
+ return (tx) => tx.moveCall({
307
+ package: packageAddress,
308
+ module: 'custody_vault',
309
+ function: 'burn',
310
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
311
+ typeArguments: options.typeArguments
312
+ });
313
+ }
314
+ export function creditSupply(options) {
315
+ const packageAddress = options.package ?? '@waterx/native-custody';
316
+ const argumentsTypes = [
317
+ null
318
+ ];
319
+ const parameterNames = ["vault"];
320
+ return (tx) => tx.moveCall({
321
+ package: packageAddress,
322
+ module: 'custody_vault',
323
+ function: 'credit_supply',
324
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
325
+ typeArguments: options.typeArguments
326
+ });
327
+ }
328
+ export function hasAsset(options) {
329
+ const packageAddress = options.package ?? '@waterx/native-custody';
330
+ const argumentsTypes = [
331
+ null
332
+ ];
333
+ const parameterNames = ["vault"];
334
+ return (tx) => tx.moveCall({
335
+ package: packageAddress,
336
+ module: 'custody_vault',
337
+ function: 'has_asset',
338
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
339
+ typeArguments: options.typeArguments
340
+ });
341
+ }
342
+ export function singleVault(options) {
343
+ const packageAddress = options.package ?? '@waterx/native-custody';
344
+ const argumentsTypes = [
345
+ null
346
+ ];
347
+ const parameterNames = ["vault"];
348
+ return (tx) => tx.moveCall({
349
+ package: packageAddress,
350
+ module: 'custody_vault',
351
+ function: 'single_vault',
352
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
353
+ typeArguments: options.typeArguments
354
+ });
355
+ }
356
+ export function decimal(options) {
357
+ const packageAddress = options.package ?? '@waterx/native-custody';
358
+ const argumentsTypes = [
359
+ null
360
+ ];
361
+ const parameterNames = ["single"];
362
+ return (tx) => tx.moveCall({
363
+ package: packageAddress,
364
+ module: 'custody_vault',
365
+ function: 'decimal',
366
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
367
+ typeArguments: options.typeArguments
368
+ });
369
+ }
370
+ export function balance(options) {
371
+ const packageAddress = options.package ?? '@waterx/native-custody';
372
+ const argumentsTypes = [
373
+ null
374
+ ];
375
+ const parameterNames = ["single"];
376
+ return (tx) => tx.moveCall({
377
+ package: packageAddress,
378
+ module: 'custody_vault',
379
+ function: 'balance',
380
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
381
+ typeArguments: options.typeArguments
382
+ });
383
+ }
384
+ export function balanceAmount(options) {
385
+ const packageAddress = options.package ?? '@waterx/native-custody';
386
+ const argumentsTypes = [
387
+ null
388
+ ];
389
+ const parameterNames = ["single"];
390
+ return (tx) => tx.moveCall({
391
+ package: packageAddress,
392
+ module: 'custody_vault',
393
+ function: 'balance_amount',
394
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
395
+ typeArguments: options.typeArguments
396
+ });
397
+ }
398
+ export function creditBacking(options) {
399
+ const packageAddress = options.package ?? '@waterx/native-custody';
400
+ const argumentsTypes = [
401
+ null
402
+ ];
403
+ const parameterNames = ["single"];
404
+ return (tx) => tx.moveCall({
405
+ package: packageAddress,
406
+ module: 'custody_vault',
407
+ function: 'credit_backing',
408
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
409
+ typeArguments: options.typeArguments
410
+ });
411
+ }
412
+ export function minBurnAmount(options) {
413
+ const packageAddress = options.package ?? '@waterx/native-custody';
414
+ const argumentsTypes = [
415
+ null
416
+ ];
417
+ const parameterNames = ["single"];
418
+ return (tx) => tx.moveCall({
419
+ package: packageAddress,
420
+ module: 'custody_vault',
421
+ function: 'min_burn_amount',
422
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
423
+ typeArguments: options.typeArguments
424
+ });
425
+ }
426
+ export function sheet(options) {
427
+ const packageAddress = options.package ?? '@waterx/native-custody';
428
+ const argumentsTypes = [
429
+ null
430
+ ];
431
+ const parameterNames = ["single"];
432
+ return (tx) => tx.moveCall({
433
+ package: packageAddress,
434
+ module: 'custody_vault',
435
+ function: 'sheet',
436
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
437
+ typeArguments: options.typeArguments
438
+ });
439
+ }
440
+ export function deprecated(options) {
441
+ const packageAddress = options.package ?? '@waterx/native-custody';
442
+ const argumentsTypes = [
443
+ null
444
+ ];
445
+ const parameterNames = ["single"];
446
+ return (tx) => tx.moveCall({
447
+ package: packageAddress,
448
+ module: 'custody_vault',
449
+ function: 'deprecated',
450
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
451
+ typeArguments: options.typeArguments
452
+ });
453
+ }
454
+ export function mintFeeRate(options) {
455
+ const packageAddress = options.package ?? '@waterx/native-custody';
456
+ const argumentsTypes = [
457
+ null,
458
+ 'address'
459
+ ];
460
+ const parameterNames = ["vault", "caller"];
461
+ return (tx) => tx.moveCall({
462
+ package: packageAddress,
463
+ module: 'custody_vault',
464
+ function: 'mint_fee_rate',
465
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
466
+ typeArguments: options.typeArguments
467
+ });
468
+ }
469
+ export function burnFeeRate(options) {
470
+ const packageAddress = options.package ?? '@waterx/native-custody';
471
+ const argumentsTypes = [
472
+ null,
473
+ 'address'
474
+ ];
475
+ const parameterNames = ["vault", "caller"];
476
+ return (tx) => tx.moveCall({
477
+ package: packageAddress,
478
+ module: 'custody_vault',
479
+ function: 'burn_fee_rate',
480
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
481
+ typeArguments: options.typeArguments
482
+ });
483
+ }
@@ -0,0 +1,8 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /** Module for floating points */
5
+ import { MoveStruct } from '../../../utils/index.ts';
6
+ export declare const Float: MoveStruct<{
7
+ value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u128">;
8
+ }, "bucket_v2_framework::float::Float">;
@@ -0,0 +1,10 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /** Module for floating points */
5
+ import { MoveStruct } from "../../../utils/index.js";
6
+ import { bcs } from '@mysten/sui/bcs';
7
+ const $moduleName = 'bucket_v2_framework::float';
8
+ export const Float = new MoveStruct({ name: `${$moduleName}::Float`, fields: {
9
+ value: bcs.u128()
10
+ } });
@@ -0,0 +1,11 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /** Module for managing Credit and Debt for DeFi protocol usage */
5
+ import { MoveStruct } from '../../../utils/index.ts';
6
+ export declare const Credit: MoveStruct<{
7
+ value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
8
+ }, "bucket_v2_framework::liability::Credit<phantom T>">;
9
+ export declare const Debt: MoveStruct<{
10
+ value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
11
+ }, "bucket_v2_framework::liability::Debt<phantom T>">;
@@ -0,0 +1,13 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /** Module for managing Credit and Debt for DeFi protocol usage */
5
+ import { MoveStruct } from "../../../utils/index.js";
6
+ import { bcs } from '@mysten/sui/bcs';
7
+ const $moduleName = 'bucket_v2_framework::liability';
8
+ export const Credit = new MoveStruct({ name: `${$moduleName}::Credit<phantom T>`, fields: {
9
+ value: bcs.u64()
10
+ } });
11
+ export const Debt = new MoveStruct({ name: `${$moduleName}::Debt<phantom T>`, fields: {
12
+ value: bcs.u64()
13
+ } });
@@ -0,0 +1,49 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /** Module for the record of Credit and Debt of certain entity */
5
+ import { MoveTuple, MoveStruct } from '../../../utils/index.ts';
6
+ export declare const Entity: MoveTuple<readonly [MoveStruct<{
7
+ name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
8
+ }, "std::type_name::TypeName">], "bucket_v2_framework::sheet::Entity">;
9
+ export declare const Sheet: MoveStruct<{
10
+ credits: MoveStruct<{
11
+ contents: import("@mysten/sui/bcs").BcsType<{
12
+ key: [{
13
+ name: string;
14
+ }];
15
+ value: {
16
+ value: string;
17
+ };
18
+ }[], Iterable<{
19
+ key: readonly [{
20
+ name: string;
21
+ }];
22
+ value: {
23
+ value: string | number | bigint;
24
+ };
25
+ }> & {
26
+ length: number;
27
+ }, string>;
28
+ }, "0x2::vec_map::VecMap<bucket_v2_framework::sheet::Entity, bucket_v2_framework::liability::Credit<phantom T>>">;
29
+ debts: MoveStruct<{
30
+ contents: import("@mysten/sui/bcs").BcsType<{
31
+ key: [{
32
+ name: string;
33
+ }];
34
+ value: {
35
+ value: string;
36
+ };
37
+ }[], Iterable<{
38
+ key: readonly [{
39
+ name: string;
40
+ }];
41
+ value: {
42
+ value: string | number | bigint;
43
+ };
44
+ }> & {
45
+ length: number;
46
+ }, string>;
47
+ }, "0x2::vec_map::VecMap<bucket_v2_framework::sheet::Entity, bucket_v2_framework::liability::Debt<phantom T>>">;
48
+ blacklist: MoveStruct<any, any>;
49
+ }, "bucket_v2_framework::sheet::Sheet<phantom CoinType, phantom SelfEntity>">;
@@ -0,0 +1,18 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /** Module for the record of Credit and Debt of certain entity */
5
+ import { MoveTuple, MoveStruct } from "../../../utils/index.js";
6
+ import * as type_name from "../std/type_name.js";
7
+ import * as vec_map from "../sui/vec_map.js";
8
+ import * as liability from "./liability.js";
9
+ import * as vec_map_1 from "../sui/vec_map.js";
10
+ import * as liability_1 from "./liability.js";
11
+ import * as vec_set from "../sui/vec_set.js";
12
+ const $moduleName = 'bucket_v2_framework::sheet';
13
+ export const Entity = new MoveTuple({ name: `${$moduleName}::Entity`, fields: [type_name.TypeName] });
14
+ export const Sheet = new MoveStruct({ name: `${$moduleName}::Sheet<phantom CoinType, phantom SelfEntity>`, fields: {
15
+ credits: vec_map.VecMap(Entity, liability.Credit),
16
+ debts: vec_map_1.VecMap(Entity, liability_1.Debt),
17
+ blacklist: vec_set.VecSet(Entity)
18
+ } });
@@ -0,0 +1,17 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /** Functionality for converting Move types into values. Use with care! */
5
+ import { MoveStruct } from '../../../utils/index.ts';
6
+ export declare const TypeName: MoveStruct<{
7
+ /**
8
+ * String representation of the type. All types are represented using their source
9
+ * syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
10
+ * Struct types are represented as fully qualified type names; e.g.
11
+ * `00000000000000000000000000000001::string::String` or
12
+ * `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
13
+ * Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
14
+ * 32 depending on the Move platform)
15
+ */
16
+ name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
17
+ }, "std::type_name::TypeName">;
@@ -0,0 +1,19 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /** Functionality for converting Move types into values. Use with care! */
5
+ import { MoveStruct } from "../../../utils/index.js";
6
+ import { bcs } from '@mysten/sui/bcs';
7
+ const $moduleName = 'std::type_name';
8
+ export const TypeName = new MoveStruct({ name: `${$moduleName}::TypeName`, fields: {
9
+ /**
10
+ * String representation of the type. All types are represented using their source
11
+ * syntax: "u8", "u64", "bool", "address", "vector", and so on for primitive types.
12
+ * Struct types are represented as fully qualified type names; e.g.
13
+ * `00000000000000000000000000000001::string::String` or
14
+ * `0000000000000000000000000000000a::module_name1::type_name1<0000000000000000000000000000000a::module_name2::type_name2<u64>>`
15
+ * Addresses are hex-encoded lowercase values of length ADDRESS_LENGTH (16, 20, or
16
+ * 32 depending on the Move platform)
17
+ */
18
+ name: bcs.string()
19
+ } });
@@ -0,0 +1,12 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * A storable handler for Balances in general. Is used in the `Coin` module to
6
+ * allow balance operations and can be used to implement custom coins with `Supply`
7
+ * and `Balance`s.
8
+ */
9
+ import { MoveStruct } from '../../../utils/index.ts';
10
+ export declare const Balance: MoveStruct<{
11
+ value: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
12
+ }, "0x2::balance::Balance<phantom T>">;
@@ -0,0 +1,14 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ /**
5
+ * A storable handler for Balances in general. Is used in the `Coin` module to
6
+ * allow balance operations and can be used to implement custom coins with `Supply`
7
+ * and `Balance`s.
8
+ */
9
+ import { MoveStruct } from "../../../utils/index.js";
10
+ import { bcs } from '@mysten/sui/bcs';
11
+ const $moduleName = '0x2::balance';
12
+ export const Balance = new MoveStruct({ name: `${$moduleName}::Balance<phantom T>`, fields: {
13
+ value: bcs.u64()
14
+ } });