@typus/typus-sdk 1.4.3-c → 1.4.3-e

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 (248) hide show
  1. package/package.json +10 -2
  2. package/src/_dependencies/source/0x1/ascii/structs.ts +135 -0
  3. package/src/_dependencies/source/0x1/bit-vector/structs.ts +70 -0
  4. package/src/_dependencies/source/0x1/fixed-point32/structs.ts +69 -0
  5. package/src/_dependencies/source/0x1/index.ts +1 -0
  6. package/src/_dependencies/source/0x1/init.ts +16 -0
  7. package/src/_dependencies/source/0x1/option/structs.ts +74 -0
  8. package/src/_dependencies/source/0x1/string/structs.ts +70 -0
  9. package/src/_dependencies/source/0x1/type-name/structs.ts +70 -0
  10. package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.ts +1 -0
  11. package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/init.ts +14 -0
  12. package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.ts +203 -0
  13. package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/pyth-parser/structs.ts +317 -0
  14. package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/supra/structs.ts +69 -0
  15. package/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/switchboard-feed-parser/structs.ts +69 -0
  16. package/src/_dependencies/source/0x2/authenticator-state/structs.ts +332 -0
  17. package/src/_dependencies/source/0x2/bag/structs.ts +70 -0
  18. package/src/_dependencies/source/0x2/balance/structs.ts +134 -0
  19. package/src/_dependencies/source/0x2/bcs/structs.ts +70 -0
  20. package/src/_dependencies/source/0x2/bls12381/structs.ts +264 -0
  21. package/src/_dependencies/source/0x2/borrow/structs.ts +138 -0
  22. package/src/_dependencies/source/0x2/clock/structs.ts +70 -0
  23. package/src/_dependencies/source/0x2/coin/structs.ts +400 -0
  24. package/src/_dependencies/source/0x2/deny-list/structs.ts +139 -0
  25. package/src/_dependencies/source/0x2/display/structs.ts +202 -0
  26. package/src/_dependencies/source/0x2/dynamic-field/structs.ts +70 -0
  27. package/src/_dependencies/source/0x2/dynamic-object-field/structs.ts +71 -0
  28. package/src/_dependencies/source/0x2/groth16/structs.ts +265 -0
  29. package/src/_dependencies/source/0x2/group-ops/structs.ts +70 -0
  30. package/src/_dependencies/source/0x2/index.ts +1 -0
  31. package/src/_dependencies/source/0x2/init.ts +125 -0
  32. package/src/_dependencies/source/0x2/kiosk/structs.ts +658 -0
  33. package/src/_dependencies/source/0x2/kiosk-extension/structs.ts +135 -0
  34. package/src/_dependencies/source/0x2/linked-table/structs.ts +136 -0
  35. package/src/_dependencies/source/0x2/object/structs.ts +134 -0
  36. package/src/_dependencies/source/0x2/object-bag/structs.ts +70 -0
  37. package/src/_dependencies/source/0x2/object-table/structs.ts +70 -0
  38. package/src/_dependencies/source/0x2/package/structs.ts +267 -0
  39. package/src/_dependencies/source/0x2/priority-queue/structs.ts +139 -0
  40. package/src/_dependencies/source/0x2/random/structs.ts +202 -0
  41. package/src/_dependencies/source/0x2/sui/structs.ts +69 -0
  42. package/src/_dependencies/source/0x2/table/structs.ts +70 -0
  43. package/src/_dependencies/source/0x2/table-vec/structs.ts +71 -0
  44. package/src/_dependencies/source/0x2/token/structs.ts +401 -0
  45. package/src/_dependencies/source/0x2/transfer/structs.ts +70 -0
  46. package/src/_dependencies/source/0x2/transfer-policy/structs.ts +400 -0
  47. package/src/_dependencies/source/0x2/tx-context/structs.ts +70 -0
  48. package/src/_dependencies/source/0x2/url/structs.ts +70 -0
  49. package/src/_dependencies/source/0x2/vec-map/structs.ts +135 -0
  50. package/src/_dependencies/source/0x2/vec-set/structs.ts +72 -0
  51. package/src/_dependencies/source/0x2/versioned/structs.ts +135 -0
  52. package/src/_dependencies/source/0x2/zklogin-verified-id/structs.ts +71 -0
  53. package/src/_dependencies/source/0x2/zklogin-verified-issuer/structs.ts +71 -0
  54. package/src/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.ts +1 -0
  55. package/src/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.ts +5 -0
  56. package/src/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.ts +70 -0
  57. package/src/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.ts +1 -0
  58. package/src/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.ts +8 -0
  59. package/src/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.ts +69 -0
  60. package/src/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.ts +135 -0
  61. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.ts +400 -0
  62. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/big-vector/structs.ts +372 -0
  63. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.ts +205 -0
  64. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.ts +333 -0
  65. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.ts +1 -0
  66. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/init.ts +48 -0
  67. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.ts +465 -0
  68. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.ts +136 -0
  69. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.ts +140 -0
  70. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.ts +268 -0
  71. package/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.ts +332 -0
  72. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.ts +466 -0
  73. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.ts +1 -0
  74. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/init.ts +36 -0
  75. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/royalty-rule/structs.ts +134 -0
  76. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.ts +333 -0
  77. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/table-vec/structs.ts +71 -0
  78. package/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.ts +856 -0
  79. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.ts +1049 -0
  80. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.ts +1 -0
  81. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/init.ts +104 -0
  82. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.ts +1054 -0
  83. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.ts +592 -0
  84. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.ts +461 -0
  85. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.ts +592 -0
  86. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-view-function/structs.ts +69 -0
  87. package/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.ts +2351 -0
  88. package/src/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.ts +1 -0
  89. package/src/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.ts +3 -0
  90. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.ts +71 -0
  91. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.ts +203 -0
  92. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.ts +70 -0
  93. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.ts +528 -0
  94. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.ts +69 -0
  95. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.ts +1 -0
  96. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.ts +54 -0
  97. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.ts +136 -0
  98. package/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.ts +1829 -0
  99. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.ts +398 -0
  100. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.ts +1 -0
  101. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.ts +18 -0
  102. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.ts +71 -0
  103. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.ts +69 -0
  104. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.ts +71 -0
  105. package/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.ts +70 -0
  106. package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.ts +1 -0
  107. package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/init.ts +11 -0
  108. package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.ts +134 -0
  109. package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/royalty-rule/structs.ts +134 -0
  110. package/src/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.ts +69 -0
  111. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/bytes20/structs.ts +70 -0
  112. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/bytes32/structs.ts +70 -0
  113. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/consumed-vaas/structs.ts +72 -0
  114. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/cursor/structs.ts +72 -0
  115. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/emitter/structs.ts +200 -0
  116. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/external-address/structs.ts +70 -0
  117. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/fee-collector/structs.ts +72 -0
  118. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/governance-message/structs.ts +137 -0
  119. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian/structs.ts +70 -0
  120. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian-set/structs.ts +71 -0
  121. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/guardian-signature/structs.ts +70 -0
  122. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/index.ts +1 -0
  123. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/init.ts +65 -0
  124. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/migrate/structs.ts +70 -0
  125. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/package-utils/structs.ts +266 -0
  126. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/publish-message/structs.ts +136 -0
  127. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/set/structs.ts +136 -0
  128. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/set-fee/structs.ts +134 -0
  129. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/setup/structs.ts +70 -0
  130. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/state/structs.ts +142 -0
  131. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/transfer-fee/structs.ts +134 -0
  132. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/update-guardian-set/structs.ts +201 -0
  133. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/upgrade-contract/structs.ts +201 -0
  134. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/vaa/structs.ts +72 -0
  135. package/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/version-control/structs.ts +134 -0
  136. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/batch-price-attestation/structs.ts +136 -0
  137. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/contract-upgrade/structs.ts +136 -0
  138. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/data-source/structs.ts +70 -0
  139. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/event/structs.ts +135 -0
  140. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance/structs.ts +71 -0
  141. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance-action/structs.ts +69 -0
  142. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/governance-instruction/structs.ts +71 -0
  143. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/hot-potato-vector/structs.ts +72 -0
  144. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/i64/structs.ts +69 -0
  145. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/index.ts +1 -0
  146. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/init.ts +59 -0
  147. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/migrate/structs.ts +70 -0
  148. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price/structs.ts +70 -0
  149. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-feed/structs.ts +71 -0
  150. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-identifier/structs.ts +70 -0
  151. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-info/structs.ts +136 -0
  152. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/price-status/structs.ts +69 -0
  153. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set/structs.ts +138 -0
  154. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-data-sources/structs.ts +71 -0
  155. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-fee-recipient/structs.ts +69 -0
  156. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-governance-data-source/structs.ts +70 -0
  157. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-stale-price-threshold/structs.ts +69 -0
  158. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/set-update-fee/structs.ts +69 -0
  159. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/setup/structs.ts +70 -0
  160. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/state/structs.ts +203 -0
  161. package/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/version-control/structs.ts +134 -0
  162. package/src/_framework/init-source.ts +39 -0
  163. package/src/_framework/loader.ts +69 -0
  164. package/src/_framework/reified.ts +442 -0
  165. package/src/_framework/util.ts +265 -0
  166. package/src/airdrop/authority-entry.ts +101 -0
  167. package/src/airdrop/index.ts +3 -0
  168. package/src/airdrop/user-entry.ts +24 -0
  169. package/src/airdrop/view-function.ts +36 -0
  170. package/src/auto-bid/index.ts +2 -0
  171. package/src/auto-bid/user-entry.ts +256 -0
  172. package/src/auto-bid/view-function.ts +285 -0
  173. package/src/constants/constant.ts +32 -0
  174. package/src/constants/index.ts +2 -0
  175. package/src/constants/token.ts +194 -0
  176. package/src/index.ts +11 -0
  177. package/src/leaderboard/authority-entry.ts +63 -0
  178. package/src/leaderboard/index.ts +2 -0
  179. package/src/leaderboard/view-function.ts +66 -0
  180. package/src/tails-exp-dice/api.ts +46 -0
  181. package/src/tails-exp-dice/fetch.ts +347 -0
  182. package/src/tails-exp-dice/index.ts +4 -0
  183. package/src/tails-exp-dice/user-entry.ts +241 -0
  184. package/src/tails-exp-dice/view-function.ts +111 -0
  185. package/src/tails-staking/authority-entry.ts +333 -0
  186. package/src/tails-staking/index.ts +3 -0
  187. package/src/tails-staking/user-entry.ts +401 -0
  188. package/src/tails-staking/view-function.ts +86 -0
  189. package/src/typus-dov-single-v2/entry/authority-entry.ts +171 -0
  190. package/src/typus-dov-single-v2/entry/index.ts +3 -0
  191. package/src/typus-dov-single-v2/entry/mfud-user-entry.ts +591 -0
  192. package/src/typus-dov-single-v2/entry/user-entry.ts +573 -0
  193. package/src/typus-dov-single-v2/function/bidding.ts +823 -0
  194. package/src/typus-dov-single-v2/function/index.ts +3 -0
  195. package/src/typus-dov-single-v2/function/token.ts +38 -0
  196. package/src/typus-dov-single-v2/function/vault.ts +24 -0
  197. package/src/typus-dov-single-v2/history/index.ts +2 -0
  198. package/src/typus-dov-single-v2/history/user-history.ts +929 -0
  199. package/src/typus-dov-single-v2/history/vault-history.ts +452 -0
  200. package/src/typus-dov-single-v2/index.ts +4 -0
  201. package/src/typus-dov-single-v2/view-function.ts +705 -0
  202. package/src/typus-nft/fetch.ts +428 -0
  203. package/src/typus-nft/index.ts +2 -0
  204. package/src/typus-nft/user-entry.ts +113 -0
  205. package/src/typus-perp/admin/functions.ts +141 -0
  206. package/src/typus-perp/admin/structs.ts +793 -0
  207. package/src/typus-perp/fetch.ts +253 -0
  208. package/src/typus-perp/index.ts +9 -0
  209. package/src/typus-perp/init.ts +96 -0
  210. package/src/typus-perp/lp-pool/functions.ts +694 -0
  211. package/src/typus-perp/lp-pool/structs.ts +3884 -0
  212. package/src/typus-perp/math/functions.ts +53 -0
  213. package/src/typus-perp/oracle/functions.ts +32 -0
  214. package/src/typus-perp/oracle/structs.ts +317 -0
  215. package/src/typus-perp/position/functions.ts +887 -0
  216. package/src/typus-perp/position/structs.ts +1637 -0
  217. package/src/typus-perp/readVec.ts +118 -0
  218. package/src/typus-perp/stake-pool/functions.ts +421 -0
  219. package/src/typus-perp/stake-pool/structs.ts +3873 -0
  220. package/src/typus-perp/symbol/functions.ts +24 -0
  221. package/src/typus-perp/symbol/structs.ts +165 -0
  222. package/src/typus-perp/tlp/functions.ts +50 -0
  223. package/src/typus-perp/tlp/structs.ts +287 -0
  224. package/src/typus-perp/token-interface/functions.ts +29 -0
  225. package/src/typus-perp/trading/functions.ts +1046 -0
  226. package/src/typus-perp/trading/structs.ts +4541 -0
  227. package/src/typus-perp/treasury-caps/functions.ts +36 -0
  228. package/src/typus-perp/treasury-caps/structs.ts +151 -0
  229. package/src/typus-perp/user/order.ts +221 -0
  230. package/src/typus-perp/user/orderWithBidReceipt.ts +176 -0
  231. package/src/typus-perp/user/tlp.ts +234 -0
  232. package/src/user/index.ts +1 -0
  233. package/src/user/view-function.ts +33 -0
  234. package/src/utils/.DS_Store +0 -0
  235. package/src/utils/api/defillama/index.ts +1 -0
  236. package/src/utils/api/defillama/tvl.ts +11 -0
  237. package/src/utils/api/index.ts +3 -0
  238. package/src/utils/api/price.ts +101 -0
  239. package/src/utils/api/sentio/index.ts +2 -0
  240. package/src/utils/api/sentio/leader-board.ts +259 -0
  241. package/src/utils/api/sentio/reward-generated.ts +392 -0
  242. package/src/utils/index.ts +5 -0
  243. package/src/utils/load_env.ts +5 -0
  244. package/src/utils/mint.ts +16 -0
  245. package/src/utils/pyth/constant.ts +71 -0
  246. package/src/utils/pyth/index.ts +2 -0
  247. package/src/utils/pyth/pythClient.ts +52 -0
  248. package/src/utils/tools.ts +38 -0
@@ -0,0 +1,134 @@
1
+ import {PhantomReified, Reified, StructClass, ToField, ToTypeStr, decodeFromFields, decodeFromFieldsWithTypes, decodeFromJSONField, phantom} from "../../../../_framework/reified";
2
+ import {FieldsWithTypes, composeSuiType, compressSuiType} from "../../../../_framework/util";
3
+ import {bcs, fromB64} from "@mysten/bcs";
4
+ import {SuiClient, SuiParsedData} from "@mysten/sui.js/client";
5
+
6
+ /* ============================== GovernanceWitness =============================== */
7
+
8
+ export function isGovernanceWitness(type: string): boolean { type = compressSuiType(type); return type === "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::set_fee::GovernanceWitness"; }
9
+
10
+ export interface GovernanceWitnessFields { dummyField: ToField<"bool"> }
11
+
12
+ export type GovernanceWitnessReified = Reified< GovernanceWitness, GovernanceWitnessFields >;
13
+
14
+ export class GovernanceWitness implements StructClass { static readonly $typeName = "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::set_fee::GovernanceWitness"; static readonly $numTypeParams = 0;
15
+
16
+ readonly $typeName = GovernanceWitness.$typeName;
17
+
18
+ readonly $fullTypeName: "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::set_fee::GovernanceWitness";
19
+
20
+ readonly $typeArgs: [];
21
+
22
+ readonly dummyField: ToField<"bool">
23
+
24
+ private constructor(typeArgs: [], fields: GovernanceWitnessFields, ) { this.$fullTypeName = composeSuiType( GovernanceWitness.$typeName, ...typeArgs ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::set_fee::GovernanceWitness"; this.$typeArgs = typeArgs;
25
+
26
+ this.dummyField = fields.dummyField; }
27
+
28
+ static reified( ): GovernanceWitnessReified { return { typeName: GovernanceWitness.$typeName, fullTypeName: composeSuiType( GovernanceWitness.$typeName, ...[] ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::set_fee::GovernanceWitness", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => GovernanceWitness.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => GovernanceWitness.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => GovernanceWitness.fromBcs( data, ), bcs: GovernanceWitness.bcs, fromJSONField: (field: any) => GovernanceWitness.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => GovernanceWitness.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => GovernanceWitness.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => GovernanceWitness.fetch( client, id, ), new: ( fields: GovernanceWitnessFields, ) => { return new GovernanceWitness( [], fields ) }, kind: "StructClassReified", } }
29
+
30
+ static get r() { return GovernanceWitness.reified() }
31
+
32
+ static phantom( ): PhantomReified<ToTypeStr<GovernanceWitness>> { return phantom(GovernanceWitness.reified( )); } static get p() { return GovernanceWitness.phantom() }
33
+
34
+ static get bcs() { return bcs.struct("GovernanceWitness", {
35
+
36
+ dummy_field: bcs.bool()
37
+
38
+ }) };
39
+
40
+ static fromFields( fields: Record<string, any> ): GovernanceWitness { return GovernanceWitness.reified( ).new( { dummyField: decodeFromFields("bool", fields.dummy_field) } ) }
41
+
42
+ static fromFieldsWithTypes( item: FieldsWithTypes ): GovernanceWitness { if (!isGovernanceWitness(item.type)) { throw new Error("not a GovernanceWitness type");
43
+
44
+ }
45
+
46
+ return GovernanceWitness.reified( ).new( { dummyField: decodeFromFieldsWithTypes("bool", item.fields.dummy_field) } ) }
47
+
48
+ static fromBcs( data: Uint8Array ): GovernanceWitness { return GovernanceWitness.fromFields( GovernanceWitness.bcs.parse(data) ) }
49
+
50
+ toJSONField() { return {
51
+
52
+ dummyField: this.dummyField,
53
+
54
+ } }
55
+
56
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
57
+
58
+ static fromJSONField( field: any ): GovernanceWitness { return GovernanceWitness.reified( ).new( { dummyField: decodeFromJSONField("bool", field.dummyField) } ) }
59
+
60
+ static fromJSON( json: Record<string, any> ): GovernanceWitness { if (json.$typeName !== GovernanceWitness.$typeName) { throw new Error("not a WithTwoGenerics json object") };
61
+
62
+ return GovernanceWitness.fromJSONField( json, ) }
63
+
64
+ static fromSuiParsedData( content: SuiParsedData ): GovernanceWitness { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isGovernanceWitness(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a GovernanceWitness object`); } return GovernanceWitness.fromFieldsWithTypes( content ); }
65
+
66
+ static async fetch( client: SuiClient, id: string ): Promise<GovernanceWitness> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching GovernanceWitness object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isGovernanceWitness(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a GovernanceWitness object`); }
67
+ return GovernanceWitness.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
68
+
69
+ }
70
+
71
+ /* ============================== SetFee =============================== */
72
+
73
+ export function isSetFee(type: string): boolean { type = compressSuiType(type); return type === "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::set_fee::SetFee"; }
74
+
75
+ export interface SetFeeFields { amount: ToField<"u64"> }
76
+
77
+ export type SetFeeReified = Reified< SetFee, SetFeeFields >;
78
+
79
+ export class SetFee implements StructClass { static readonly $typeName = "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::set_fee::SetFee"; static readonly $numTypeParams = 0;
80
+
81
+ readonly $typeName = SetFee.$typeName;
82
+
83
+ readonly $fullTypeName: "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::set_fee::SetFee";
84
+
85
+ readonly $typeArgs: [];
86
+
87
+ readonly amount: ToField<"u64">
88
+
89
+ private constructor(typeArgs: [], fields: SetFeeFields, ) { this.$fullTypeName = composeSuiType( SetFee.$typeName, ...typeArgs ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::set_fee::SetFee"; this.$typeArgs = typeArgs;
90
+
91
+ this.amount = fields.amount; }
92
+
93
+ static reified( ): SetFeeReified { return { typeName: SetFee.$typeName, fullTypeName: composeSuiType( SetFee.$typeName, ...[] ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::set_fee::SetFee", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => SetFee.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => SetFee.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => SetFee.fromBcs( data, ), bcs: SetFee.bcs, fromJSONField: (field: any) => SetFee.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => SetFee.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => SetFee.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => SetFee.fetch( client, id, ), new: ( fields: SetFeeFields, ) => { return new SetFee( [], fields ) }, kind: "StructClassReified", } }
94
+
95
+ static get r() { return SetFee.reified() }
96
+
97
+ static phantom( ): PhantomReified<ToTypeStr<SetFee>> { return phantom(SetFee.reified( )); } static get p() { return SetFee.phantom() }
98
+
99
+ static get bcs() { return bcs.struct("SetFee", {
100
+
101
+ amount: bcs.u64()
102
+
103
+ }) };
104
+
105
+ static fromFields( fields: Record<string, any> ): SetFee { return SetFee.reified( ).new( { amount: decodeFromFields("u64", fields.amount) } ) }
106
+
107
+ static fromFieldsWithTypes( item: FieldsWithTypes ): SetFee { if (!isSetFee(item.type)) { throw new Error("not a SetFee type");
108
+
109
+ }
110
+
111
+ return SetFee.reified( ).new( { amount: decodeFromFieldsWithTypes("u64", item.fields.amount) } ) }
112
+
113
+ static fromBcs( data: Uint8Array ): SetFee { return SetFee.fromFields( SetFee.bcs.parse(data) ) }
114
+
115
+ toJSONField() { return {
116
+
117
+ amount: this.amount.toString(),
118
+
119
+ } }
120
+
121
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
122
+
123
+ static fromJSONField( field: any ): SetFee { return SetFee.reified( ).new( { amount: decodeFromJSONField("u64", field.amount) } ) }
124
+
125
+ static fromJSON( json: Record<string, any> ): SetFee { if (json.$typeName !== SetFee.$typeName) { throw new Error("not a WithTwoGenerics json object") };
126
+
127
+ return SetFee.fromJSONField( json, ) }
128
+
129
+ static fromSuiParsedData( content: SuiParsedData ): SetFee { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isSetFee(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a SetFee object`); } return SetFee.fromFieldsWithTypes( content ); }
130
+
131
+ static async fetch( client: SuiClient, id: string ): Promise<SetFee> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching SetFee object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isSetFee(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a SetFee object`); }
132
+ return SetFee.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
133
+
134
+ }
@@ -0,0 +1,70 @@
1
+ import {PhantomReified, Reified, StructClass, ToField, ToTypeStr, decodeFromFields, decodeFromFieldsWithTypes, decodeFromJSONField, phantom} from "../../../../_framework/reified";
2
+ import {FieldsWithTypes, composeSuiType, compressSuiType} from "../../../../_framework/util";
3
+ import {UID} from "../../0x2/object/structs";
4
+ import {bcs, fromB64} from "@mysten/bcs";
5
+ import {SuiClient, SuiParsedData} from "@mysten/sui.js/client";
6
+
7
+ /* ============================== DeployerCap =============================== */
8
+
9
+ export function isDeployerCap(type: string): boolean { type = compressSuiType(type); return type === "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::setup::DeployerCap"; }
10
+
11
+ export interface DeployerCapFields { id: ToField<UID> }
12
+
13
+ export type DeployerCapReified = Reified< DeployerCap, DeployerCapFields >;
14
+
15
+ export class DeployerCap implements StructClass { static readonly $typeName = "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::setup::DeployerCap"; static readonly $numTypeParams = 0;
16
+
17
+ readonly $typeName = DeployerCap.$typeName;
18
+
19
+ readonly $fullTypeName: "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::setup::DeployerCap";
20
+
21
+ readonly $typeArgs: [];
22
+
23
+ readonly id: ToField<UID>
24
+
25
+ private constructor(typeArgs: [], fields: DeployerCapFields, ) { this.$fullTypeName = composeSuiType( DeployerCap.$typeName, ...typeArgs ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::setup::DeployerCap"; this.$typeArgs = typeArgs;
26
+
27
+ this.id = fields.id; }
28
+
29
+ static reified( ): DeployerCapReified { return { typeName: DeployerCap.$typeName, fullTypeName: composeSuiType( DeployerCap.$typeName, ...[] ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::setup::DeployerCap", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => DeployerCap.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => DeployerCap.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => DeployerCap.fromBcs( data, ), bcs: DeployerCap.bcs, fromJSONField: (field: any) => DeployerCap.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => DeployerCap.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => DeployerCap.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => DeployerCap.fetch( client, id, ), new: ( fields: DeployerCapFields, ) => { return new DeployerCap( [], fields ) }, kind: "StructClassReified", } }
30
+
31
+ static get r() { return DeployerCap.reified() }
32
+
33
+ static phantom( ): PhantomReified<ToTypeStr<DeployerCap>> { return phantom(DeployerCap.reified( )); } static get p() { return DeployerCap.phantom() }
34
+
35
+ static get bcs() { return bcs.struct("DeployerCap", {
36
+
37
+ id: UID.bcs
38
+
39
+ }) };
40
+
41
+ static fromFields( fields: Record<string, any> ): DeployerCap { return DeployerCap.reified( ).new( { id: decodeFromFields(UID.reified(), fields.id) } ) }
42
+
43
+ static fromFieldsWithTypes( item: FieldsWithTypes ): DeployerCap { if (!isDeployerCap(item.type)) { throw new Error("not a DeployerCap type");
44
+
45
+ }
46
+
47
+ return DeployerCap.reified( ).new( { id: decodeFromFieldsWithTypes(UID.reified(), item.fields.id) } ) }
48
+
49
+ static fromBcs( data: Uint8Array ): DeployerCap { return DeployerCap.fromFields( DeployerCap.bcs.parse(data) ) }
50
+
51
+ toJSONField() { return {
52
+
53
+ id: this.id,
54
+
55
+ } }
56
+
57
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
58
+
59
+ static fromJSONField( field: any ): DeployerCap { return DeployerCap.reified( ).new( { id: decodeFromJSONField(UID.reified(), field.id) } ) }
60
+
61
+ static fromJSON( json: Record<string, any> ): DeployerCap { if (json.$typeName !== DeployerCap.$typeName) { throw new Error("not a WithTwoGenerics json object") };
62
+
63
+ return DeployerCap.fromJSONField( json, ) }
64
+
65
+ static fromSuiParsedData( content: SuiParsedData ): DeployerCap { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isDeployerCap(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a DeployerCap object`); } return DeployerCap.fromFieldsWithTypes( content ); }
66
+
67
+ static async fetch( client: SuiClient, id: string ): Promise<DeployerCap> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching DeployerCap object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isDeployerCap(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a DeployerCap object`); }
68
+ return DeployerCap.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
69
+
70
+ }
@@ -0,0 +1,142 @@
1
+ import * as reified from "../../../../_framework/reified";
2
+ import {PhantomReified, Reified, StructClass, ToField, ToTypeStr, decodeFromFields, decodeFromFieldsWithTypes, decodeFromJSONField, phantom, ToTypeStr as ToPhantom} from "../../../../_framework/reified";
3
+ import {FieldsWithTypes, composeSuiType, compressSuiType} from "../../../../_framework/util";
4
+ import {UID} from "../../0x2/object/structs";
5
+ import {UpgradeCap} from "../../0x2/package/structs";
6
+ import {Table} from "../../0x2/table/structs";
7
+ import {ConsumedVAAs} from "../consumed-vaas/structs";
8
+ import {ExternalAddress} from "../external-address/structs";
9
+ import {FeeCollector} from "../fee-collector/structs";
10
+ import {GuardianSet} from "../guardian-set/structs";
11
+ import {bcs, fromB64} from "@mysten/bcs";
12
+ import {SuiClient, SuiParsedData} from "@mysten/sui.js/client";
13
+
14
+ /* ============================== LatestOnly =============================== */
15
+
16
+ export function isLatestOnly(type: string): boolean { type = compressSuiType(type); return type === "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::state::LatestOnly"; }
17
+
18
+ export interface LatestOnlyFields { dummyField: ToField<"bool"> }
19
+
20
+ export type LatestOnlyReified = Reified< LatestOnly, LatestOnlyFields >;
21
+
22
+ export class LatestOnly implements StructClass { static readonly $typeName = "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::state::LatestOnly"; static readonly $numTypeParams = 0;
23
+
24
+ readonly $typeName = LatestOnly.$typeName;
25
+
26
+ readonly $fullTypeName: "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::state::LatestOnly";
27
+
28
+ readonly $typeArgs: [];
29
+
30
+ readonly dummyField: ToField<"bool">
31
+
32
+ private constructor(typeArgs: [], fields: LatestOnlyFields, ) { this.$fullTypeName = composeSuiType( LatestOnly.$typeName, ...typeArgs ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::state::LatestOnly"; this.$typeArgs = typeArgs;
33
+
34
+ this.dummyField = fields.dummyField; }
35
+
36
+ static reified( ): LatestOnlyReified { return { typeName: LatestOnly.$typeName, fullTypeName: composeSuiType( LatestOnly.$typeName, ...[] ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::state::LatestOnly", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => LatestOnly.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => LatestOnly.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => LatestOnly.fromBcs( data, ), bcs: LatestOnly.bcs, fromJSONField: (field: any) => LatestOnly.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => LatestOnly.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => LatestOnly.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => LatestOnly.fetch( client, id, ), new: ( fields: LatestOnlyFields, ) => { return new LatestOnly( [], fields ) }, kind: "StructClassReified", } }
37
+
38
+ static get r() { return LatestOnly.reified() }
39
+
40
+ static phantom( ): PhantomReified<ToTypeStr<LatestOnly>> { return phantom(LatestOnly.reified( )); } static get p() { return LatestOnly.phantom() }
41
+
42
+ static get bcs() { return bcs.struct("LatestOnly", {
43
+
44
+ dummy_field: bcs.bool()
45
+
46
+ }) };
47
+
48
+ static fromFields( fields: Record<string, any> ): LatestOnly { return LatestOnly.reified( ).new( { dummyField: decodeFromFields("bool", fields.dummy_field) } ) }
49
+
50
+ static fromFieldsWithTypes( item: FieldsWithTypes ): LatestOnly { if (!isLatestOnly(item.type)) { throw new Error("not a LatestOnly type");
51
+
52
+ }
53
+
54
+ return LatestOnly.reified( ).new( { dummyField: decodeFromFieldsWithTypes("bool", item.fields.dummy_field) } ) }
55
+
56
+ static fromBcs( data: Uint8Array ): LatestOnly { return LatestOnly.fromFields( LatestOnly.bcs.parse(data) ) }
57
+
58
+ toJSONField() { return {
59
+
60
+ dummyField: this.dummyField,
61
+
62
+ } }
63
+
64
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
65
+
66
+ static fromJSONField( field: any ): LatestOnly { return LatestOnly.reified( ).new( { dummyField: decodeFromJSONField("bool", field.dummyField) } ) }
67
+
68
+ static fromJSON( json: Record<string, any> ): LatestOnly { if (json.$typeName !== LatestOnly.$typeName) { throw new Error("not a WithTwoGenerics json object") };
69
+
70
+ return LatestOnly.fromJSONField( json, ) }
71
+
72
+ static fromSuiParsedData( content: SuiParsedData ): LatestOnly { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isLatestOnly(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a LatestOnly object`); } return LatestOnly.fromFieldsWithTypes( content ); }
73
+
74
+ static async fetch( client: SuiClient, id: string ): Promise<LatestOnly> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching LatestOnly object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isLatestOnly(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a LatestOnly object`); }
75
+ return LatestOnly.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
76
+
77
+ }
78
+
79
+ /* ============================== State =============================== */
80
+
81
+ export function isState(type: string): boolean { type = compressSuiType(type); return type === "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::state::State"; }
82
+
83
+ export interface StateFields { id: ToField<UID>; governanceChain: ToField<"u16">; governanceContract: ToField<ExternalAddress>; guardianSetIndex: ToField<"u32">; guardianSets: ToField<Table<"u32", ToPhantom<GuardianSet>>>; guardianSetSecondsToLive: ToField<"u32">; consumedVaas: ToField<ConsumedVAAs>; feeCollector: ToField<FeeCollector>; upgradeCap: ToField<UpgradeCap> }
84
+
85
+ export type StateReified = Reified< State, StateFields >;
86
+
87
+ export class State implements StructClass { static readonly $typeName = "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::state::State"; static readonly $numTypeParams = 0;
88
+
89
+ readonly $typeName = State.$typeName;
90
+
91
+ readonly $fullTypeName: "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::state::State";
92
+
93
+ readonly $typeArgs: [];
94
+
95
+ readonly id: ToField<UID>; readonly governanceChain: ToField<"u16">; readonly governanceContract: ToField<ExternalAddress>; readonly guardianSetIndex: ToField<"u32">; readonly guardianSets: ToField<Table<"u32", ToPhantom<GuardianSet>>>; readonly guardianSetSecondsToLive: ToField<"u32">; readonly consumedVaas: ToField<ConsumedVAAs>; readonly feeCollector: ToField<FeeCollector>; readonly upgradeCap: ToField<UpgradeCap>
96
+
97
+ private constructor(typeArgs: [], fields: StateFields, ) { this.$fullTypeName = composeSuiType( State.$typeName, ...typeArgs ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::state::State"; this.$typeArgs = typeArgs;
98
+
99
+ this.id = fields.id;; this.governanceChain = fields.governanceChain;; this.governanceContract = fields.governanceContract;; this.guardianSetIndex = fields.guardianSetIndex;; this.guardianSets = fields.guardianSets;; this.guardianSetSecondsToLive = fields.guardianSetSecondsToLive;; this.consumedVaas = fields.consumedVaas;; this.feeCollector = fields.feeCollector;; this.upgradeCap = fields.upgradeCap; }
100
+
101
+ static reified( ): StateReified { return { typeName: State.$typeName, fullTypeName: composeSuiType( State.$typeName, ...[] ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::state::State", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => State.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => State.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => State.fromBcs( data, ), bcs: State.bcs, fromJSONField: (field: any) => State.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => State.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => State.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => State.fetch( client, id, ), new: ( fields: StateFields, ) => { return new State( [], fields ) }, kind: "StructClassReified", } }
102
+
103
+ static get r() { return State.reified() }
104
+
105
+ static phantom( ): PhantomReified<ToTypeStr<State>> { return phantom(State.reified( )); } static get p() { return State.phantom() }
106
+
107
+ static get bcs() { return bcs.struct("State", {
108
+
109
+ id: UID.bcs, governance_chain: bcs.u16(), governance_contract: ExternalAddress.bcs, guardian_set_index: bcs.u32(), guardian_sets: Table.bcs, guardian_set_seconds_to_live: bcs.u32(), consumed_vaas: ConsumedVAAs.bcs, fee_collector: FeeCollector.bcs, upgrade_cap: UpgradeCap.bcs
110
+
111
+ }) };
112
+
113
+ static fromFields( fields: Record<string, any> ): State { return State.reified( ).new( { id: decodeFromFields(UID.reified(), fields.id), governanceChain: decodeFromFields("u16", fields.governance_chain), governanceContract: decodeFromFields(ExternalAddress.reified(), fields.governance_contract), guardianSetIndex: decodeFromFields("u32", fields.guardian_set_index), guardianSets: decodeFromFields(Table.reified(reified.phantom("u32"), reified.phantom(GuardianSet.reified())), fields.guardian_sets), guardianSetSecondsToLive: decodeFromFields("u32", fields.guardian_set_seconds_to_live), consumedVaas: decodeFromFields(ConsumedVAAs.reified(), fields.consumed_vaas), feeCollector: decodeFromFields(FeeCollector.reified(), fields.fee_collector), upgradeCap: decodeFromFields(UpgradeCap.reified(), fields.upgrade_cap) } ) }
114
+
115
+ static fromFieldsWithTypes( item: FieldsWithTypes ): State { if (!isState(item.type)) { throw new Error("not a State type");
116
+
117
+ }
118
+
119
+ return State.reified( ).new( { id: decodeFromFieldsWithTypes(UID.reified(), item.fields.id), governanceChain: decodeFromFieldsWithTypes("u16", item.fields.governance_chain), governanceContract: decodeFromFieldsWithTypes(ExternalAddress.reified(), item.fields.governance_contract), guardianSetIndex: decodeFromFieldsWithTypes("u32", item.fields.guardian_set_index), guardianSets: decodeFromFieldsWithTypes(Table.reified(reified.phantom("u32"), reified.phantom(GuardianSet.reified())), item.fields.guardian_sets), guardianSetSecondsToLive: decodeFromFieldsWithTypes("u32", item.fields.guardian_set_seconds_to_live), consumedVaas: decodeFromFieldsWithTypes(ConsumedVAAs.reified(), item.fields.consumed_vaas), feeCollector: decodeFromFieldsWithTypes(FeeCollector.reified(), item.fields.fee_collector), upgradeCap: decodeFromFieldsWithTypes(UpgradeCap.reified(), item.fields.upgrade_cap) } ) }
120
+
121
+ static fromBcs( data: Uint8Array ): State { return State.fromFields( State.bcs.parse(data) ) }
122
+
123
+ toJSONField() { return {
124
+
125
+ id: this.id,governanceChain: this.governanceChain,governanceContract: this.governanceContract.toJSONField(),guardianSetIndex: this.guardianSetIndex,guardianSets: this.guardianSets.toJSONField(),guardianSetSecondsToLive: this.guardianSetSecondsToLive,consumedVaas: this.consumedVaas.toJSONField(),feeCollector: this.feeCollector.toJSONField(),upgradeCap: this.upgradeCap.toJSONField(),
126
+
127
+ } }
128
+
129
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
130
+
131
+ static fromJSONField( field: any ): State { return State.reified( ).new( { id: decodeFromJSONField(UID.reified(), field.id), governanceChain: decodeFromJSONField("u16", field.governanceChain), governanceContract: decodeFromJSONField(ExternalAddress.reified(), field.governanceContract), guardianSetIndex: decodeFromJSONField("u32", field.guardianSetIndex), guardianSets: decodeFromJSONField(Table.reified(reified.phantom("u32"), reified.phantom(GuardianSet.reified())), field.guardianSets), guardianSetSecondsToLive: decodeFromJSONField("u32", field.guardianSetSecondsToLive), consumedVaas: decodeFromJSONField(ConsumedVAAs.reified(), field.consumedVaas), feeCollector: decodeFromJSONField(FeeCollector.reified(), field.feeCollector), upgradeCap: decodeFromJSONField(UpgradeCap.reified(), field.upgradeCap) } ) }
132
+
133
+ static fromJSON( json: Record<string, any> ): State { if (json.$typeName !== State.$typeName) { throw new Error("not a WithTwoGenerics json object") };
134
+
135
+ return State.fromJSONField( json, ) }
136
+
137
+ static fromSuiParsedData( content: SuiParsedData ): State { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isState(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a State object`); } return State.fromFieldsWithTypes( content ); }
138
+
139
+ static async fetch( client: SuiClient, id: string ): Promise<State> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching State object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isState(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a State object`); }
140
+ return State.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
141
+
142
+ }
@@ -0,0 +1,134 @@
1
+ import {PhantomReified, Reified, StructClass, ToField, ToTypeStr, decodeFromFields, decodeFromFieldsWithTypes, decodeFromJSONField, phantom} from "../../../../_framework/reified";
2
+ import {FieldsWithTypes, composeSuiType, compressSuiType} from "../../../../_framework/util";
3
+ import {bcs, fromB64, fromHEX, toHEX} from "@mysten/bcs";
4
+ import {SuiClient, SuiParsedData} from "@mysten/sui.js/client";
5
+
6
+ /* ============================== GovernanceWitness =============================== */
7
+
8
+ export function isGovernanceWitness(type: string): boolean { type = compressSuiType(type); return type === "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::transfer_fee::GovernanceWitness"; }
9
+
10
+ export interface GovernanceWitnessFields { dummyField: ToField<"bool"> }
11
+
12
+ export type GovernanceWitnessReified = Reified< GovernanceWitness, GovernanceWitnessFields >;
13
+
14
+ export class GovernanceWitness implements StructClass { static readonly $typeName = "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::transfer_fee::GovernanceWitness"; static readonly $numTypeParams = 0;
15
+
16
+ readonly $typeName = GovernanceWitness.$typeName;
17
+
18
+ readonly $fullTypeName: "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::transfer_fee::GovernanceWitness";
19
+
20
+ readonly $typeArgs: [];
21
+
22
+ readonly dummyField: ToField<"bool">
23
+
24
+ private constructor(typeArgs: [], fields: GovernanceWitnessFields, ) { this.$fullTypeName = composeSuiType( GovernanceWitness.$typeName, ...typeArgs ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::transfer_fee::GovernanceWitness"; this.$typeArgs = typeArgs;
25
+
26
+ this.dummyField = fields.dummyField; }
27
+
28
+ static reified( ): GovernanceWitnessReified { return { typeName: GovernanceWitness.$typeName, fullTypeName: composeSuiType( GovernanceWitness.$typeName, ...[] ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::transfer_fee::GovernanceWitness", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => GovernanceWitness.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => GovernanceWitness.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => GovernanceWitness.fromBcs( data, ), bcs: GovernanceWitness.bcs, fromJSONField: (field: any) => GovernanceWitness.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => GovernanceWitness.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => GovernanceWitness.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => GovernanceWitness.fetch( client, id, ), new: ( fields: GovernanceWitnessFields, ) => { return new GovernanceWitness( [], fields ) }, kind: "StructClassReified", } }
29
+
30
+ static get r() { return GovernanceWitness.reified() }
31
+
32
+ static phantom( ): PhantomReified<ToTypeStr<GovernanceWitness>> { return phantom(GovernanceWitness.reified( )); } static get p() { return GovernanceWitness.phantom() }
33
+
34
+ static get bcs() { return bcs.struct("GovernanceWitness", {
35
+
36
+ dummy_field: bcs.bool()
37
+
38
+ }) };
39
+
40
+ static fromFields( fields: Record<string, any> ): GovernanceWitness { return GovernanceWitness.reified( ).new( { dummyField: decodeFromFields("bool", fields.dummy_field) } ) }
41
+
42
+ static fromFieldsWithTypes( item: FieldsWithTypes ): GovernanceWitness { if (!isGovernanceWitness(item.type)) { throw new Error("not a GovernanceWitness type");
43
+
44
+ }
45
+
46
+ return GovernanceWitness.reified( ).new( { dummyField: decodeFromFieldsWithTypes("bool", item.fields.dummy_field) } ) }
47
+
48
+ static fromBcs( data: Uint8Array ): GovernanceWitness { return GovernanceWitness.fromFields( GovernanceWitness.bcs.parse(data) ) }
49
+
50
+ toJSONField() { return {
51
+
52
+ dummyField: this.dummyField,
53
+
54
+ } }
55
+
56
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
57
+
58
+ static fromJSONField( field: any ): GovernanceWitness { return GovernanceWitness.reified( ).new( { dummyField: decodeFromJSONField("bool", field.dummyField) } ) }
59
+
60
+ static fromJSON( json: Record<string, any> ): GovernanceWitness { if (json.$typeName !== GovernanceWitness.$typeName) { throw new Error("not a WithTwoGenerics json object") };
61
+
62
+ return GovernanceWitness.fromJSONField( json, ) }
63
+
64
+ static fromSuiParsedData( content: SuiParsedData ): GovernanceWitness { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isGovernanceWitness(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a GovernanceWitness object`); } return GovernanceWitness.fromFieldsWithTypes( content ); }
65
+
66
+ static async fetch( client: SuiClient, id: string ): Promise<GovernanceWitness> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching GovernanceWitness object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isGovernanceWitness(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a GovernanceWitness object`); }
67
+ return GovernanceWitness.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
68
+
69
+ }
70
+
71
+ /* ============================== TransferFee =============================== */
72
+
73
+ export function isTransferFee(type: string): boolean { type = compressSuiType(type); return type === "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::transfer_fee::TransferFee"; }
74
+
75
+ export interface TransferFeeFields { amount: ToField<"u64">; recipient: ToField<"address"> }
76
+
77
+ export type TransferFeeReified = Reified< TransferFee, TransferFeeFields >;
78
+
79
+ export class TransferFee implements StructClass { static readonly $typeName = "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::transfer_fee::TransferFee"; static readonly $numTypeParams = 0;
80
+
81
+ readonly $typeName = TransferFee.$typeName;
82
+
83
+ readonly $fullTypeName: "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::transfer_fee::TransferFee";
84
+
85
+ readonly $typeArgs: [];
86
+
87
+ readonly amount: ToField<"u64">; readonly recipient: ToField<"address">
88
+
89
+ private constructor(typeArgs: [], fields: TransferFeeFields, ) { this.$fullTypeName = composeSuiType( TransferFee.$typeName, ...typeArgs ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::transfer_fee::TransferFee"; this.$typeArgs = typeArgs;
90
+
91
+ this.amount = fields.amount;; this.recipient = fields.recipient; }
92
+
93
+ static reified( ): TransferFeeReified { return { typeName: TransferFee.$typeName, fullTypeName: composeSuiType( TransferFee.$typeName, ...[] ) as "0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e::transfer_fee::TransferFee", typeArgs: [ ] as [], reifiedTypeArgs: [], fromFields: (fields: Record<string, any>) => TransferFee.fromFields( fields, ), fromFieldsWithTypes: (item: FieldsWithTypes) => TransferFee.fromFieldsWithTypes( item, ), fromBcs: (data: Uint8Array) => TransferFee.fromBcs( data, ), bcs: TransferFee.bcs, fromJSONField: (field: any) => TransferFee.fromJSONField( field, ), fromJSON: (json: Record<string, any>) => TransferFee.fromJSON( json, ), fromSuiParsedData: (content: SuiParsedData) => TransferFee.fromSuiParsedData( content, ), fetch: async (client: SuiClient, id: string) => TransferFee.fetch( client, id, ), new: ( fields: TransferFeeFields, ) => { return new TransferFee( [], fields ) }, kind: "StructClassReified", } }
94
+
95
+ static get r() { return TransferFee.reified() }
96
+
97
+ static phantom( ): PhantomReified<ToTypeStr<TransferFee>> { return phantom(TransferFee.reified( )); } static get p() { return TransferFee.phantom() }
98
+
99
+ static get bcs() { return bcs.struct("TransferFee", {
100
+
101
+ amount: bcs.u64(), recipient: bcs.bytes(32).transform({ input: (val: string) => fromHEX(val), output: (val: Uint8Array) => toHEX(val), })
102
+
103
+ }) };
104
+
105
+ static fromFields( fields: Record<string, any> ): TransferFee { return TransferFee.reified( ).new( { amount: decodeFromFields("u64", fields.amount), recipient: decodeFromFields("address", fields.recipient) } ) }
106
+
107
+ static fromFieldsWithTypes( item: FieldsWithTypes ): TransferFee { if (!isTransferFee(item.type)) { throw new Error("not a TransferFee type");
108
+
109
+ }
110
+
111
+ return TransferFee.reified( ).new( { amount: decodeFromFieldsWithTypes("u64", item.fields.amount), recipient: decodeFromFieldsWithTypes("address", item.fields.recipient) } ) }
112
+
113
+ static fromBcs( data: Uint8Array ): TransferFee { return TransferFee.fromFields( TransferFee.bcs.parse(data) ) }
114
+
115
+ toJSONField() { return {
116
+
117
+ amount: this.amount.toString(),recipient: this.recipient,
118
+
119
+ } }
120
+
121
+ toJSON() { return { $typeName: this.$typeName, $typeArgs: this.$typeArgs, ...this.toJSONField() } }
122
+
123
+ static fromJSONField( field: any ): TransferFee { return TransferFee.reified( ).new( { amount: decodeFromJSONField("u64", field.amount), recipient: decodeFromJSONField("address", field.recipient) } ) }
124
+
125
+ static fromJSON( json: Record<string, any> ): TransferFee { if (json.$typeName !== TransferFee.$typeName) { throw new Error("not a WithTwoGenerics json object") };
126
+
127
+ return TransferFee.fromJSONField( json, ) }
128
+
129
+ static fromSuiParsedData( content: SuiParsedData ): TransferFee { if (content.dataType !== "moveObject") { throw new Error("not an object"); } if (!isTransferFee(content.type)) { throw new Error(`object at ${(content.fields as any).id} is not a TransferFee object`); } return TransferFee.fromFieldsWithTypes( content ); }
130
+
131
+ static async fetch( client: SuiClient, id: string ): Promise<TransferFee> { const res = await client.getObject({ id, options: { showBcs: true, }, }); if (res.error) { throw new Error(`error fetching TransferFee object at id ${id}: ${res.error.code}`); } if (res.data?.bcs?.dataType !== "moveObject" || !isTransferFee(res.data.bcs.type)) { throw new Error(`object at id ${id} is not a TransferFee object`); }
132
+ return TransferFee.fromBcs( fromB64(res.data.bcs.bcsBytes) ); }
133
+
134
+ }