@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,658 @@
1
+ /**************************************************************
2
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
3
+ **************************************************************/
4
+ import { MoveTuple, MoveStruct, normalizeMoveArguments } from "../utils/index.js";
5
+ import { bcs } from '@mysten/sui/bcs';
6
+ import * as vec_set from "./deps/sui/vec_set.js";
7
+ import * as limited_supply from "./limited_supply.js";
8
+ import * as table from "./deps/sui/table.js";
9
+ import * as vec_map from "./deps/sui/vec_map.js";
10
+ import * as type_name from "./deps/std/type_name.js";
11
+ import * as vec_set_1 from "./deps/sui/vec_set.js";
12
+ const $moduleName = '@waterx/credit::credit_registry';
13
+ export const CapKey = new MoveTuple({ name: `${$moduleName}::CapKey`, fields: [bcs.bool()] });
14
+ export const Mint = new MoveStruct({ name: `${$moduleName}::Mint<phantom CREDIT, phantom M>`, fields: {
15
+ amount: bcs.u64(),
16
+ module_supply: bcs.u64(),
17
+ total_supply: bcs.u64()
18
+ } });
19
+ export const Burn = new MoveStruct({ name: `${$moduleName}::Burn<phantom CREDIT, phantom M>`, fields: {
20
+ amount: bcs.u64(),
21
+ module_supply: bcs.u64(),
22
+ total_supply: bcs.u64()
23
+ } });
24
+ export const ProtocolCapBasisRefreshed = new MoveStruct({ name: `${$moduleName}::ProtocolCapBasisRefreshed<phantom CREDIT>`, fields: {
25
+ cap_basis_supply: bcs.u64(),
26
+ last_refresh_ms: bcs.u64()
27
+ } });
28
+ export const CollectFee = new MoveStruct({ name: `${$moduleName}::CollectFee<phantom CREDIT, phantom M>`, fields: {
29
+ memo: bcs.string(),
30
+ coin_type: bcs.string(),
31
+ amount: bcs.u64()
32
+ } });
33
+ export const ClaimFee = new MoveStruct({ name: `${$moduleName}::ClaimFee<phantom CREDIT, phantom M>`, fields: {
34
+ coin_type: bcs.string(),
35
+ amount: bcs.u64()
36
+ } });
37
+ export const ModuleConfig = new MoveStruct({ name: `${$moduleName}::ModuleConfig`, fields: {
38
+ valid_versions: vec_set.VecSet(bcs.u16()),
39
+ limited_supply: limited_supply.LimitedSupply
40
+ } });
41
+ export const BurnWindow = new MoveStruct({ name: `${$moduleName}::BurnWindow`, fields: {
42
+ burned: bcs.u64(),
43
+ window_start_ms: bcs.u64()
44
+ } });
45
+ export const PersonalBurnCap = new MoveStruct({ name: `${$moduleName}::PersonalBurnCap`, fields: {
46
+ cap_amount: bcs.u64(),
47
+ window_ms: bcs.u64(),
48
+ user_burns: table.Table
49
+ } });
50
+ export const ProtocolBurnCap = new MoveStruct({ name: `${$moduleName}::ProtocolBurnCap`, fields: {
51
+ cap_basis_supply: bcs.u64(),
52
+ cap_bps: bcs.u64(),
53
+ refresh_interval_ms: bcs.u64(),
54
+ last_refresh_ms: bcs.u64(),
55
+ burned_in_window: bcs.u64()
56
+ } });
57
+ export const CreditRegistry = new MoveStruct({ name: `${$moduleName}::CreditRegistry<phantom CREDIT>`, fields: {
58
+ id: bcs.Address,
59
+ module_config_map: vec_map.VecMap(type_name.TypeName, ModuleConfig),
60
+ beneficiary_address: bcs.Address,
61
+ offset_supply: bcs.u64(),
62
+ personal_burn_cap: PersonalBurnCap,
63
+ protocol_burn_cap: ProtocolBurnCap,
64
+ /**
65
+ * Admin-managed package-version allowlist for the registry's own upgrade
66
+ * lifecycle. Distinct from `ModuleConfig.valid_versions` which tracks per-module
67
+ * witness versions. Every mutating public entry asserts
68
+ * `PACKAGE_VERSION ∈ allowed_versions`; admin uses `add_package_version` /
69
+ * `remove_package_version` to kill-switch a deprecated package after upgrade.
70
+ */
71
+ allowed_versions: vec_set_1.VecSet(bcs.u16())
72
+ } });
73
+ export function packageVersion(options = {}) {
74
+ const packageAddress = options.package ?? '@waterx/credit';
75
+ return (tx) => tx.moveCall({
76
+ package: packageAddress,
77
+ module: 'credit_registry',
78
+ function: 'package_version',
79
+ });
80
+ }
81
+ /**
82
+ * Wrap an existing `TreasuryCap<CREDIT>` into a shared `CreditRegistry<CREDIT>`.
83
+ * Caps default to disabled (cap_amount = 0, cap_bps = 0); admin opts in via
84
+ * `set_personal_burn_cap` / `set_protocol_burn_cap`.
85
+ */
86
+ export function createCreditRegistry(options) {
87
+ const packageAddress = options.package ?? '@waterx/credit';
88
+ const argumentsTypes = [
89
+ null,
90
+ null
91
+ ];
92
+ const parameterNames = ["_", "treasuryCap"];
93
+ return (tx) => tx.moveCall({
94
+ package: packageAddress,
95
+ module: 'credit_registry',
96
+ function: 'create_credit_registry',
97
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
98
+ typeArguments: options.typeArguments
99
+ });
100
+ }
101
+ /** === Admin === */
102
+ export function setBeneficiaryAddress(options) {
103
+ const packageAddress = options.package ?? '@waterx/credit';
104
+ const argumentsTypes = [
105
+ null,
106
+ null,
107
+ 'address'
108
+ ];
109
+ const parameterNames = ["registry", "_", "addr"];
110
+ return (tx) => tx.moveCall({
111
+ package: packageAddress,
112
+ module: 'credit_registry',
113
+ function: 'set_beneficiary_address',
114
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
115
+ typeArguments: options.typeArguments
116
+ });
117
+ }
118
+ /**
119
+ * Admin: whitelist a package version on this registry. Skips the version check
120
+ * itself so admin can recover from a stuck state.
121
+ */
122
+ export function addPackageVersion(options) {
123
+ const packageAddress = options.package ?? '@waterx/credit';
124
+ const argumentsTypes = [
125
+ null,
126
+ null,
127
+ 'u16'
128
+ ];
129
+ const parameterNames = ["registry", "_", "version"];
130
+ return (tx) => tx.moveCall({
131
+ package: packageAddress,
132
+ module: 'credit_registry',
133
+ function: 'add_package_version',
134
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
135
+ typeArguments: options.typeArguments
136
+ });
137
+ }
138
+ /**
139
+ * Admin: remove a package version from this registry's allowlist. Skips the
140
+ * version check itself.
141
+ */
142
+ export function removePackageVersion(options) {
143
+ const packageAddress = options.package ?? '@waterx/credit';
144
+ const argumentsTypes = [
145
+ null,
146
+ null,
147
+ 'u16'
148
+ ];
149
+ const parameterNames = ["registry", "_", "version"];
150
+ return (tx) => tx.moveCall({
151
+ package: packageAddress,
152
+ module: 'credit_registry',
153
+ function: 'remove_package_version',
154
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
155
+ typeArguments: options.typeArguments
156
+ });
157
+ }
158
+ /**
159
+ * Personal cap = max amount of `CREDIT` a single sender can burn within
160
+ * `window_ms`. `cap_amount = 0` disables (default). `window_ms` must be > 0 even
161
+ * when disabled — `window_ms = 0` would reset the accumulator every burn and
162
+ * silently degrade the cap to per-tx only.
163
+ */
164
+ export function setPersonalBurnCap(options) {
165
+ const packageAddress = options.package ?? '@waterx/credit';
166
+ const argumentsTypes = [
167
+ null,
168
+ null,
169
+ 'u64',
170
+ 'u64'
171
+ ];
172
+ const parameterNames = ["registry", "_", "capAmount", "windowMs"];
173
+ return (tx) => tx.moveCall({
174
+ package: packageAddress,
175
+ module: 'credit_registry',
176
+ function: 'set_personal_burn_cap',
177
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
178
+ typeArguments: options.typeArguments
179
+ });
180
+ }
181
+ /**
182
+ * Protocol cap = `cap_basis_supply * cap_bps / 10_000`. `cap_basis_supply` is
183
+ * refreshed lazily on burn after `refresh_interval_ms` has elapsed, so a sudden
184
+ * supply spike does not immediately raise the gate. `cap_bps = 0` disables
185
+ * (default).
186
+ *
187
+ * `cap_bps` must be ≤ `BPS_DENOMINATOR` (≤100%); larger values would make the gate
188
+ * computation wrap silently on the final `as u64` cast. `refresh_interval_ms` must
189
+ * be > 0; otherwise the burned-in-window accumulator resets on every burn and the
190
+ * rolling cap collapses to a per-tx ceiling.
191
+ */
192
+ export function setProtocolBurnCap(options) {
193
+ const packageAddress = options.package ?? '@waterx/credit';
194
+ const argumentsTypes = [
195
+ null,
196
+ null,
197
+ 'u64',
198
+ 'u64',
199
+ '0x2::clock::Clock'
200
+ ];
201
+ const parameterNames = ["registry", "_", "capBps", "refreshIntervalMs"];
202
+ return (tx) => tx.moveCall({
203
+ package: packageAddress,
204
+ module: 'credit_registry',
205
+ function: 'set_protocol_burn_cap',
206
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
207
+ typeArguments: options.typeArguments
208
+ });
209
+ }
210
+ /**
211
+ * Force-reset the protocol cap basis to current supply. Use sparingly (e.g. after
212
+ * legitimate large mint / burn events).
213
+ */
214
+ export function refreshProtocolCapBasis(options) {
215
+ const packageAddress = options.package ?? '@waterx/credit';
216
+ const argumentsTypes = [
217
+ null,
218
+ null,
219
+ '0x2::clock::Clock'
220
+ ];
221
+ const parameterNames = ["registry", "_"];
222
+ return (tx) => tx.moveCall({
223
+ package: packageAddress,
224
+ module: 'credit_registry',
225
+ function: 'refresh_protocol_cap_basis',
226
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
227
+ typeArguments: options.typeArguments
228
+ });
229
+ }
230
+ /**
231
+ * Clear a single user's burn window (e.g. after manual review approves extra
232
+ * withdrawal).
233
+ */
234
+ export function resetPersonalBurnWindow(options) {
235
+ const packageAddress = options.package ?? '@waterx/credit';
236
+ const argumentsTypes = [
237
+ null,
238
+ null,
239
+ 'address'
240
+ ];
241
+ const parameterNames = ["registry", "_", "user"];
242
+ return (tx) => tx.moveCall({
243
+ package: packageAddress,
244
+ module: 'credit_registry',
245
+ function: 'reset_personal_burn_window',
246
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
247
+ typeArguments: options.typeArguments
248
+ });
249
+ }
250
+ export function setSupplyLimit(options) {
251
+ const packageAddress = options.package ?? '@waterx/credit';
252
+ const argumentsTypes = [
253
+ null,
254
+ null,
255
+ 'u64'
256
+ ];
257
+ const parameterNames = ["registry", "_", "supplyLimit"];
258
+ return (tx) => tx.moveCall({
259
+ package: packageAddress,
260
+ module: 'credit_registry',
261
+ function: 'set_supply_limit',
262
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
263
+ typeArguments: options.typeArguments
264
+ });
265
+ }
266
+ export function addVersion(options) {
267
+ const packageAddress = options.package ?? '@waterx/credit';
268
+ const argumentsTypes = [
269
+ null,
270
+ null,
271
+ 'u16'
272
+ ];
273
+ const parameterNames = ["registry", "_", "version"];
274
+ return (tx) => tx.moveCall({
275
+ package: packageAddress,
276
+ module: 'credit_registry',
277
+ function: 'add_version',
278
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
279
+ typeArguments: options.typeArguments
280
+ });
281
+ }
282
+ export function removeVersion(options) {
283
+ const packageAddress = options.package ?? '@waterx/credit';
284
+ const argumentsTypes = [
285
+ null,
286
+ null,
287
+ 'u16'
288
+ ];
289
+ const parameterNames = ["registry", "_", "version"];
290
+ return (tx) => tx.moveCall({
291
+ package: packageAddress,
292
+ module: 'credit_registry',
293
+ function: 'remove_version',
294
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
295
+ typeArguments: options.typeArguments
296
+ });
297
+ }
298
+ export function removeModule(options) {
299
+ const packageAddress = options.package ?? '@waterx/credit';
300
+ const argumentsTypes = [
301
+ null,
302
+ null
303
+ ];
304
+ const parameterNames = ["registry", "_"];
305
+ return (tx) => tx.moveCall({
306
+ package: packageAddress,
307
+ module: 'credit_registry',
308
+ function: 'remove_module',
309
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
310
+ typeArguments: options.typeArguments
311
+ });
312
+ }
313
+ /**
314
+ * === Mint / Burn === Mint `amount` of `CREDIT` on behalf of module `M`. `M` must
315
+ * be a registered owned module of this registry (via `add_version`) and `version`
316
+ * must be a whitelisted version of `M`. The `M: drop` witness proves the call site
317
+ * is inside `M`.
318
+ */
319
+ export function mint(options) {
320
+ const packageAddress = options.package ?? '@waterx/credit';
321
+ const argumentsTypes = [
322
+ null,
323
+ `${options.typeArguments[1]}`,
324
+ 'u16',
325
+ 'u64'
326
+ ];
327
+ const parameterNames = ["registry", "Witness", "version", "amount"];
328
+ return (tx) => tx.moveCall({
329
+ package: packageAddress,
330
+ module: 'credit_registry',
331
+ function: 'mint',
332
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
333
+ typeArguments: options.typeArguments
334
+ });
335
+ }
336
+ /**
337
+ * Burn `coin` against module `M`'s supply limit. The personal burn cap is keyed by
338
+ * `account_id.to_address()` — the wxa Account whose stored `Balance<CREDIT>`
339
+ * produced this coin via the withdraw-policy flow. The deposit-before-withdraw
340
+ * property of the wxa custody layer means an attacker can't sidestep the
341
+ * per-account cap by minting fresh bucket-framework accounts at burn time (audit
342
+ * finding #2): to spread CREDIT across N accounts they'd need to deposit into
343
+ * each, and CREDIT can only enter an account through a mint that targets a
344
+ * specific `account_id` or a (capped) account-to-account withdraw + deposit round
345
+ * trip.
346
+ */
347
+ export function burn(options) {
348
+ const packageAddress = options.package ?? '@waterx/credit';
349
+ const argumentsTypes = [
350
+ null,
351
+ '0x2::object::ID',
352
+ `${options.typeArguments[1]}`,
353
+ 'u16',
354
+ null,
355
+ '0x2::clock::Clock'
356
+ ];
357
+ const parameterNames = ["registry", "accountId", "witness", "version", "coin"];
358
+ return (tx) => tx.moveCall({
359
+ package: packageAddress,
360
+ module: 'credit_registry',
361
+ function: 'burn',
362
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
363
+ typeArguments: options.typeArguments
364
+ });
365
+ }
366
+ /** === Fee collect / claim === */
367
+ export function collect(options) {
368
+ const packageAddress = options.package ?? '@waterx/credit';
369
+ const argumentsTypes = [
370
+ null,
371
+ `${options.typeArguments[2]}`,
372
+ 'u16',
373
+ '0x1::string::String',
374
+ null
375
+ ];
376
+ const parameterNames = ["registry", "Witness", "version", "memo", "balance"];
377
+ return (tx) => tx.moveCall({
378
+ package: packageAddress,
379
+ module: 'credit_registry',
380
+ function: 'collect',
381
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
382
+ typeArguments: options.typeArguments
383
+ });
384
+ }
385
+ /**
386
+ * Drain the per-module `M` fee bucket for `T`. Gated by an `AccountRequest` whose
387
+ * address matches `registry.beneficiary_address` — so the beneficiary can claim
388
+ * their own fees without holding an `AdminCap`. Admin rotates the beneficiary via
389
+ * `set_beneficiary_address`.
390
+ */
391
+ export function claim(options) {
392
+ const packageAddress = options.package ?? '@waterx/credit';
393
+ const argumentsTypes = [
394
+ null,
395
+ null
396
+ ];
397
+ const parameterNames = ["registry", "request"];
398
+ return (tx) => tx.moveCall({
399
+ package: packageAddress,
400
+ module: 'credit_registry',
401
+ function: 'claim',
402
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
403
+ typeArguments: options.typeArguments
404
+ });
405
+ }
406
+ /** === Views === */
407
+ export function totalSupply(options) {
408
+ const packageAddress = options.package ?? '@waterx/credit';
409
+ const argumentsTypes = [
410
+ null
411
+ ];
412
+ const parameterNames = ["registry"];
413
+ return (tx) => tx.moveCall({
414
+ package: packageAddress,
415
+ module: 'credit_registry',
416
+ function: 'total_supply',
417
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
418
+ typeArguments: options.typeArguments
419
+ });
420
+ }
421
+ export function moduleConfigMap(options) {
422
+ const packageAddress = options.package ?? '@waterx/credit';
423
+ const argumentsTypes = [
424
+ null
425
+ ];
426
+ const parameterNames = ["registry"];
427
+ return (tx) => tx.moveCall({
428
+ package: packageAddress,
429
+ module: 'credit_registry',
430
+ function: 'module_config_map',
431
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
432
+ typeArguments: options.typeArguments
433
+ });
434
+ }
435
+ export function limitedSupply(options) {
436
+ const packageAddress = options.package ?? '@waterx/credit';
437
+ const argumentsTypes = [
438
+ null
439
+ ];
440
+ const parameterNames = ["config"];
441
+ return (tx) => tx.moveCall({
442
+ package: packageAddress,
443
+ module: 'credit_registry',
444
+ function: 'limited_supply',
445
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
446
+ });
447
+ }
448
+ export function validVersions(options) {
449
+ const packageAddress = options.package ?? '@waterx/credit';
450
+ const argumentsTypes = [
451
+ null
452
+ ];
453
+ const parameterNames = ["config"];
454
+ return (tx) => tx.moveCall({
455
+ package: packageAddress,
456
+ module: 'credit_registry',
457
+ function: 'valid_versions',
458
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
459
+ });
460
+ }
461
+ export function beneficiaryAddress(options) {
462
+ const packageAddress = options.package ?? '@waterx/credit';
463
+ const argumentsTypes = [
464
+ null
465
+ ];
466
+ const parameterNames = ["registry"];
467
+ return (tx) => tx.moveCall({
468
+ package: packageAddress,
469
+ module: 'credit_registry',
470
+ function: 'beneficiary_address',
471
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
472
+ typeArguments: options.typeArguments
473
+ });
474
+ }
475
+ export function offsetSupply(options) {
476
+ const packageAddress = options.package ?? '@waterx/credit';
477
+ const argumentsTypes = [
478
+ null
479
+ ];
480
+ const parameterNames = ["registry"];
481
+ return (tx) => tx.moveCall({
482
+ package: packageAddress,
483
+ module: 'credit_registry',
484
+ function: 'offset_supply',
485
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
486
+ typeArguments: options.typeArguments
487
+ });
488
+ }
489
+ export function personalBurnCapAmount(options) {
490
+ const packageAddress = options.package ?? '@waterx/credit';
491
+ const argumentsTypes = [
492
+ null
493
+ ];
494
+ const parameterNames = ["registry"];
495
+ return (tx) => tx.moveCall({
496
+ package: packageAddress,
497
+ module: 'credit_registry',
498
+ function: 'personal_burn_cap_amount',
499
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
500
+ typeArguments: options.typeArguments
501
+ });
502
+ }
503
+ export function personalBurnCapWindowMs(options) {
504
+ const packageAddress = options.package ?? '@waterx/credit';
505
+ const argumentsTypes = [
506
+ null
507
+ ];
508
+ const parameterNames = ["registry"];
509
+ return (tx) => tx.moveCall({
510
+ package: packageAddress,
511
+ module: 'credit_registry',
512
+ function: 'personal_burn_cap_window_ms',
513
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
514
+ typeArguments: options.typeArguments
515
+ });
516
+ }
517
+ export function personalBurned(options) {
518
+ const packageAddress = options.package ?? '@waterx/credit';
519
+ const argumentsTypes = [
520
+ null,
521
+ 'address'
522
+ ];
523
+ const parameterNames = ["registry", "user"];
524
+ return (tx) => tx.moveCall({
525
+ package: packageAddress,
526
+ module: 'credit_registry',
527
+ function: 'personal_burned',
528
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
529
+ typeArguments: options.typeArguments
530
+ });
531
+ }
532
+ export function personalBurnWindowCount(options) {
533
+ const packageAddress = options.package ?? '@waterx/credit';
534
+ const argumentsTypes = [
535
+ null
536
+ ];
537
+ const parameterNames = ["registry"];
538
+ return (tx) => tx.moveCall({
539
+ package: packageAddress,
540
+ module: 'credit_registry',
541
+ function: 'personal_burn_window_count',
542
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
543
+ typeArguments: options.typeArguments
544
+ });
545
+ }
546
+ export function protocolCapBasisSupply(options) {
547
+ const packageAddress = options.package ?? '@waterx/credit';
548
+ const argumentsTypes = [
549
+ null
550
+ ];
551
+ const parameterNames = ["registry"];
552
+ return (tx) => tx.moveCall({
553
+ package: packageAddress,
554
+ module: 'credit_registry',
555
+ function: 'protocol_cap_basis_supply',
556
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
557
+ typeArguments: options.typeArguments
558
+ });
559
+ }
560
+ export function protocolCapBps(options) {
561
+ const packageAddress = options.package ?? '@waterx/credit';
562
+ const argumentsTypes = [
563
+ null
564
+ ];
565
+ const parameterNames = ["registry"];
566
+ return (tx) => tx.moveCall({
567
+ package: packageAddress,
568
+ module: 'credit_registry',
569
+ function: 'protocol_cap_bps',
570
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
571
+ typeArguments: options.typeArguments
572
+ });
573
+ }
574
+ export function protocolCapRefreshIntervalMs(options) {
575
+ const packageAddress = options.package ?? '@waterx/credit';
576
+ const argumentsTypes = [
577
+ null
578
+ ];
579
+ const parameterNames = ["registry"];
580
+ return (tx) => tx.moveCall({
581
+ package: packageAddress,
582
+ module: 'credit_registry',
583
+ function: 'protocol_cap_refresh_interval_ms',
584
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
585
+ typeArguments: options.typeArguments
586
+ });
587
+ }
588
+ export function protocolCapLastRefreshMs(options) {
589
+ const packageAddress = options.package ?? '@waterx/credit';
590
+ const argumentsTypes = [
591
+ null
592
+ ];
593
+ const parameterNames = ["registry"];
594
+ return (tx) => tx.moveCall({
595
+ package: packageAddress,
596
+ module: 'credit_registry',
597
+ function: 'protocol_cap_last_refresh_ms',
598
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
599
+ typeArguments: options.typeArguments
600
+ });
601
+ }
602
+ export function protocolCapBurnedInWindow(options) {
603
+ const packageAddress = options.package ?? '@waterx/credit';
604
+ const argumentsTypes = [
605
+ null
606
+ ];
607
+ const parameterNames = ["registry"];
608
+ return (tx) => tx.moveCall({
609
+ package: packageAddress,
610
+ module: 'credit_registry',
611
+ function: 'protocol_cap_burned_in_window',
612
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
613
+ typeArguments: options.typeArguments
614
+ });
615
+ }
616
+ export function isClaimableMapExistsType(options) {
617
+ const packageAddress = options.package ?? '@waterx/credit';
618
+ const argumentsTypes = [
619
+ null
620
+ ];
621
+ const parameterNames = ["registry"];
622
+ return (tx) => tx.moveCall({
623
+ package: packageAddress,
624
+ module: 'credit_registry',
625
+ function: 'is_claimable_map_exists_type',
626
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
627
+ typeArguments: options.typeArguments
628
+ });
629
+ }
630
+ export function claimableMap(options) {
631
+ const packageAddress = options.package ?? '@waterx/credit';
632
+ const argumentsTypes = [
633
+ null
634
+ ];
635
+ const parameterNames = ["registry"];
636
+ return (tx) => tx.moveCall({
637
+ package: packageAddress,
638
+ module: 'credit_registry',
639
+ function: 'claimable_map',
640
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
641
+ typeArguments: options.typeArguments
642
+ });
643
+ }
644
+ export function assertValidModuleVersion(options) {
645
+ const packageAddress = options.package ?? '@waterx/credit';
646
+ const argumentsTypes = [
647
+ null,
648
+ 'u16'
649
+ ];
650
+ const parameterNames = ["registry", "version"];
651
+ return (tx) => tx.moveCall({
652
+ package: packageAddress,
653
+ module: 'credit_registry',
654
+ function: 'assert_valid_module_version',
655
+ arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
656
+ typeArguments: options.typeArguments
657
+ });
658
+ }
@@ -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
+ } });