@typus/typus-sdk 1.4.84-ts → 1.4.85

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 (573) hide show
  1. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/ascii/structs.d.ts +6 -16
  2. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/ascii/structs.js +45 -161
  3. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/bit-vector/structs.d.ts +4 -10
  4. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/bit-vector/structs.js +25 -90
  5. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/fixed-point32/structs.d.ts +3 -8
  6. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/fixed-point32/structs.js +23 -84
  7. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/index.d.ts +0 -1
  8. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/index.js +1 -2
  9. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/init.js +0 -4
  10. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/option/structs.d.ts +4 -10
  11. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/option/structs.js +25 -94
  12. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/string/structs.d.ts +4 -10
  13. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/string/structs.js +23 -84
  14. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/type-name/structs.d.ts +3 -8
  15. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/type-name/structs.js +23 -84
  16. package/dist/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.d.ts +2 -0
  17. package/dist/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.js +5 -0
  18. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/init.js +0 -1
  19. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.d.ts +13 -86
  20. package/dist/src/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.js +377 -0
  21. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/pyth-parser/structs.d.ts +5 -14
  22. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/pyth-parser/structs.js +10 -52
  23. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/supra/structs.d.ts +3 -8
  24. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/supra/structs.js +28 -105
  25. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/switchboard-feed-parser/structs.d.ts +3 -8
  26. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/switchboard-feed-parser/structs.js +28 -108
  27. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/authenticator-state/structs.d.ts +12 -34
  28. package/dist/src/_dependencies/source/0x2/authenticator-state/structs.js +565 -0
  29. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/bag/structs.d.ts +3 -8
  30. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/bag/structs.js +25 -90
  31. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/balance/structs.d.ts +5 -14
  32. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/balance/structs.js +45 -183
  33. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/bcs/structs.d.ts +4 -10
  34. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/bcs/structs.js +23 -84
  35. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/bls12381/structs.d.ts +9 -68
  36. package/dist/src/_dependencies/source/0x2/bls12381/structs.js +434 -0
  37. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/borrow/structs.d.ts +4 -13
  38. package/dist/src/_dependencies/source/0x2/borrow/structs.js +267 -0
  39. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/clock/structs.d.ts +3 -8
  40. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/clock/structs.js +25 -90
  41. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/coin/structs.d.ts +13 -94
  42. package/dist/src/_dependencies/source/0x2/coin/structs.js +648 -0
  43. package/dist/src/_dependencies/source/0x2/deny-list/structs.d.ts +178 -0
  44. package/dist/src/_dependencies/source/0x2/deny-list/structs.js +290 -0
  45. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/display/structs.d.ts +7 -20
  46. package/dist/src/_dependencies/source/0x2/display/structs.js +362 -0
  47. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/dynamic-field/structs.d.ts +7 -12
  48. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/dynamic-field/structs.js +28 -110
  49. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/dynamic-object-field/structs.d.ts +5 -10
  50. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/dynamic-object-field/structs.js +24 -94
  51. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/groth16/structs.d.ts +10 -28
  52. package/dist/src/_dependencies/source/0x2/groth16/structs.js +464 -0
  53. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/group-ops/structs.d.ts +4 -10
  54. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/group-ops/structs.js +23 -93
  55. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/index.d.ts +0 -1
  56. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/index.js +1 -2
  57. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/init.js +5 -16
  58. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/kiosk/structs.d.ts +21 -62
  59. package/dist/src/_dependencies/source/0x2/kiosk/structs.js +1033 -0
  60. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/kiosk-extension/structs.d.ts +5 -14
  61. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/kiosk-extension/structs.js +48 -185
  62. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/linked-table/structs.d.ts +6 -15
  63. package/dist/src/_dependencies/source/0x2/linked-table/structs.js +272 -0
  64. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/object/structs.d.ts +5 -14
  65. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/object/structs.js +45 -166
  66. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/object-bag/structs.d.ts +3 -8
  67. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/object-bag/structs.js +25 -90
  68. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/object-table/structs.d.ts +3 -8
  69. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/object-table/structs.js +25 -101
  70. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/package/structs.d.ts +10 -28
  71. package/dist/src/_dependencies/source/0x2/package/structs.js +478 -0
  72. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/priority-queue/structs.d.ts +9 -19
  73. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/priority-queue/structs.js +50 -192
  74. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/random/structs.d.ts +8 -22
  75. package/dist/src/_dependencies/source/0x2/random/structs.js +383 -0
  76. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/sui/structs.d.ts +3 -8
  77. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/sui/structs.js +23 -84
  78. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/table/structs.d.ts +3 -8
  79. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/table/structs.js +25 -101
  80. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/table-vec/structs.d.ts +3 -8
  81. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/table-vec/structs.js +23 -93
  82. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/token/structs.d.ts +13 -38
  83. package/dist/src/_dependencies/source/0x2/token/structs.js +651 -0
  84. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/transfer/structs.d.ts +3 -8
  85. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/transfer/structs.js +25 -99
  86. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/transfer-policy/structs.d.ts +13 -38
  87. package/dist/src/_dependencies/source/0x2/transfer-policy/structs.js +665 -0
  88. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/tx-context/structs.d.ts +4 -10
  89. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/tx-context/structs.js +28 -108
  90. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/url/structs.d.ts +3 -8
  91. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/url/structs.js +23 -84
  92. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/vec-map/structs.d.ts +13 -23
  93. package/dist/src/_dependencies/source/0x2/vec-map/structs.js +286 -0
  94. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/vec-set/structs.d.ts +4 -10
  95. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/vec-set/structs.js +24 -94
  96. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/versioned/structs.d.ts +5 -14
  97. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/versioned/structs.js +49 -177
  98. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/zklogin-verified-id/structs.d.ts +3 -8
  99. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/zklogin-verified-id/structs.js +29 -113
  100. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/zklogin-verified-issuer/structs.d.ts +3 -8
  101. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/zklogin-verified-issuer/structs.js +26 -98
  102. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.d.ts +0 -1
  103. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.js +1 -2
  104. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.d.ts +3 -8
  105. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.js +23 -84
  106. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.d.ts +0 -2
  107. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.js +1 -3
  108. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.d.ts +3 -8
  109. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.js +23 -84
  110. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.d.ts +5 -14
  111. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.js +50 -186
  112. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.d.ts +14 -40
  113. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.js +669 -0
  114. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/big-vector/structs.d.ts +5 -15
  115. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/big-vector/structs.js +7 -52
  116. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.d.ts +7 -20
  117. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.js +402 -0
  118. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.d.ts +12 -34
  119. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.js +566 -0
  120. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.d.ts +2 -0
  121. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.js +5 -0
  122. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/init.js +1 -20
  123. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.d.ts +16 -124
  124. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.js +774 -0
  125. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.d.ts +4 -13
  126. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.js +272 -0
  127. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.d.ts +4 -13
  128. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.js +276 -0
  129. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.d.ts +50 -68
  130. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.js +471 -0
  131. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.d.ts +12 -34
  132. package/dist/src/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.js +563 -0
  133. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.d.ts +16 -46
  134. package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.js +789 -0
  135. package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.d.ts +2 -0
  136. package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.js +5 -0
  137. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/init.js +3 -4
  138. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/royalty-rule/structs.d.ts +41 -50
  139. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/royalty-rule/structs.js +103 -227
  140. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.d.ts +55 -76
  141. package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.js +562 -0
  142. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/table-vec/structs.d.ts +3 -8
  143. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/table-vec/structs.js +23 -93
  144. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.d.ts +136 -247
  145. package/dist/src/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.js +1331 -0
  146. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.d.ts +34 -100
  147. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.js +1706 -0
  148. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.d.ts +2 -0
  149. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.js +5 -0
  150. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/init.js +17 -23
  151. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.d.ts +147 -213
  152. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.js +1643 -0
  153. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.d.ts +20 -58
  154. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.js +971 -0
  155. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.d.ts +16 -46
  156. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.js +750 -0
  157. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.d.ts +82 -244
  158. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.js +933 -0
  159. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-view-function/structs.d.ts +3 -8
  160. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-view-function/structs.js +30 -115
  161. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.d.ts +74 -534
  162. package/dist/src/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.js +3796 -0
  163. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.d.ts +0 -1
  164. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.js +1 -2
  165. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.d.ts +3 -8
  166. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.js +23 -87
  167. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.d.ts +8 -22
  168. package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.js +382 -0
  169. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.d.ts +3 -8
  170. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.js +27 -109
  171. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.d.ts +17 -50
  172. package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.js +959 -0
  173. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.d.ts +3 -8
  174. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.js +23 -80
  175. package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.d.ts +2 -0
  176. package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.js +5 -0
  177. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.d.ts +6 -15
  178. package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.js +274 -0
  179. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.d.ts +58 -172
  180. package/dist/src/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.js +2830 -0
  181. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.d.ts +14 -40
  182. package/dist/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.js +711 -0
  183. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.d.ts +0 -1
  184. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.js +1 -2
  185. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.d.ts +4 -10
  186. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.js +28 -105
  187. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.d.ts +3 -8
  188. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.js +26 -95
  189. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.d.ts +4 -10
  190. package/dist/src/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.js +212 -0
  191. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.d.ts +3 -8
  192. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.js +23 -84
  193. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.d.ts +0 -1
  194. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.js +1 -2
  195. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.d.ts +39 -48
  196. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.js +97 -217
  197. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/royalty-rule/structs.d.ts +41 -50
  198. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/royalty-rule/structs.js +103 -227
  199. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.d.ts +3 -8
  200. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.js +23 -93
  201. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/bytes20/structs.d.ts +7 -13
  202. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/bytes20/structs.js +23 -84
  203. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/bytes32/structs.d.ts +7 -13
  204. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/bytes32/structs.js +23 -84
  205. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/consumed-vaas/structs.d.ts +6 -11
  206. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/consumed-vaas/structs.js +23 -84
  207. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/cursor/structs.d.ts +6 -12
  208. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/cursor/structs.js +24 -94
  209. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/emitter/structs.d.ts +16 -29
  210. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/emitter/structs.js +348 -0
  211. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/external-address/structs.d.ts +6 -11
  212. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/external-address/structs.js +23 -84
  213. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/fee-collector/structs.d.ts +6 -11
  214. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/fee-collector/structs.js +25 -90
  215. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/governance-message/structs.d.ts +10 -20
  216. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/governance-message/structs.js +298 -0
  217. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/guardian/structs.d.ts +6 -11
  218. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/guardian/structs.js +23 -84
  219. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/guardian-set/structs.d.ts +7 -13
  220. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/guardian-set/structs.js +26 -95
  221. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/guardian-signature/structs.d.ts +6 -11
  222. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/guardian-signature/structs.js +27 -100
  223. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/index.d.ts +2 -0
  224. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/index.js +5 -0
  225. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/migrate/structs.d.ts +6 -11
  226. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/migrate/structs.js +23 -84
  227. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/package-utils/structs.d.ts +21 -38
  228. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/package-utils/structs.js +438 -0
  229. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/publish-message/structs.d.ts +12 -22
  230. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/publish-message/structs.js +297 -0
  231. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/set/structs.d.ts +43 -52
  232. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/set/structs.js +103 -232
  233. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/set-fee/structs.d.ts +11 -20
  234. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/set-fee/structs.js +45 -165
  235. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/setup/structs.d.ts +6 -11
  236. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/setup/structs.js +23 -84
  237. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/state/structs.d.ts +11 -20
  238. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/state/structs.js +303 -0
  239. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/transfer-fee/structs.d.ts +11 -20
  240. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/transfer-fee/structs.js +47 -174
  241. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/update-guardian-set/structs.d.ts +17 -31
  242. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/update-guardian-set/structs.js +69 -252
  243. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/upgrade-contract/structs.d.ts +49 -62
  244. package/dist/src/_dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e/upgrade-contract/structs.js +349 -0
  245. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/vaa/structs.d.ts +7 -13
  246. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/vaa/structs.js +32 -125
  247. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/version-control/structs.d.ts +11 -20
  248. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/version-control/structs.js +45 -165
  249. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/batch-price-attestation/structs.d.ts +12 -22
  250. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/batch-price-attestation/structs.js +54 -202
  251. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/contract-upgrade/structs.d.ts +12 -21
  252. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/contract-upgrade/structs.js +48 -172
  253. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/data-source/structs.d.ts +7 -12
  254. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/data-source/structs.js +26 -91
  255. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/event/structs.d.ts +11 -20
  256. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/event/structs.js +47 -171
  257. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/governance/structs.d.ts +8 -14
  258. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/governance/structs.js +27 -96
  259. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/governance-action/structs.d.ts +6 -11
  260. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/governance-action/structs.js +23 -84
  261. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/governance-instruction/structs.d.ts +7 -13
  262. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/governance-instruction/structs.js +27 -100
  263. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/hot-potato-vector/structs.d.ts +6 -12
  264. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/hot-potato-vector/structs.js +24 -94
  265. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/i64/structs.d.ts +6 -11
  266. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/i64/structs.js +25 -90
  267. package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/index.d.ts +2 -0
  268. package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/index.js +5 -0
  269. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/init.js +0 -1
  270. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/migrate/structs.d.ts +6 -11
  271. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/migrate/structs.js +23 -84
  272. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/price/structs.d.ts +6 -11
  273. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/price/structs.js +27 -100
  274. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/price-feed/structs.d.ts +6 -11
  275. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/price-feed/structs.js +26 -95
  276. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/price-identifier/structs.d.ts +7 -13
  277. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/price-identifier/structs.js +23 -84
  278. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/price-info/structs.d.ts +11 -20
  279. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/price-info/structs.js +50 -182
  280. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/price-status/structs.d.ts +6 -11
  281. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/price-status/structs.js +23 -84
  282. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/set/structs.d.ts +10 -20
  283. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/set/structs.js +48 -181
  284. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/set-data-sources/structs.d.ts +7 -13
  285. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/set-data-sources/structs.js +24 -85
  286. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/set-fee-recipient/structs.d.ts +6 -11
  287. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/set-fee-recipient/structs.js +23 -87
  288. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/set-governance-data-source/structs.d.ts +7 -12
  289. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/set-governance-data-source/structs.js +27 -96
  290. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/set-stale-price-threshold/structs.d.ts +6 -11
  291. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/set-stale-price-threshold/structs.js +23 -84
  292. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/set-update-fee/structs.d.ts +6 -11
  293. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/set-update-fee/structs.js +25 -90
  294. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/setup/structs.d.ts +6 -11
  295. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/setup/structs.js +23 -84
  296. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/state/structs.d.ts +17 -30
  297. package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/state/structs.js +363 -0
  298. package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/version-control/structs.d.ts +79 -0
  299. package/dist/src/_dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3/version-control/structs.js +256 -0
  300. package/dist/src/_framework/init-source.d.ts +1 -0
  301. package/dist/src/_framework/init-source.js +64 -0
  302. package/dist/src/{typus-perp/_framework → _framework}/loader.d.ts +3 -3
  303. package/dist/src/{typus-perp/_framework → _framework}/loader.js +5 -14
  304. package/dist/src/{typus-perp/_framework → _framework}/reified.d.ts +20 -28
  305. package/dist/src/{typus-perp/_framework → _framework}/reified.js +37 -11
  306. package/dist/src/_framework/util.d.ts +53 -0
  307. package/dist/src/_framework/util.js +251 -0
  308. package/dist/src/auto-bid/token-user-entry.d.ts +9 -9
  309. package/dist/src/auto-bid/token-user-entry.js +24 -24
  310. package/dist/src/auto-bid/user-entry.d.ts +9 -9
  311. package/dist/src/auto-bid/user-entry.js +46 -46
  312. package/dist/src/auto-bid/view-function.js +14 -14
  313. package/dist/src/constants/constant.d.ts +1 -1
  314. package/dist/src/constants/constant.js +1 -1
  315. package/dist/src/constants/token.d.ts +1 -4
  316. package/dist/src/constants/token.js +4 -4
  317. package/dist/src/dice/fetch.js +1 -1
  318. package/dist/src/dice/user-entry.d.ts +11 -11
  319. package/dist/src/dice/user-entry.js +34 -34
  320. package/dist/src/typus/airdrop/authority-entry.d.ts +5 -5
  321. package/dist/src/typus/airdrop/authority-entry.js +10 -10
  322. package/dist/src/typus/airdrop/user-entry.d.ts +3 -3
  323. package/dist/src/typus/airdrop/user-entry.js +2 -2
  324. package/dist/src/typus/airdrop/view-function.js +10 -10
  325. package/dist/src/typus/leaderboard/authority-entry.d.ts +5 -5
  326. package/dist/src/typus/leaderboard/authority-entry.js +4 -9
  327. package/dist/src/typus/leaderboard/view-function.js +13 -13
  328. package/dist/src/typus/tails-staking/authority-entry.d.ts +29 -27
  329. package/dist/src/typus/tails-staking/authority-entry.js +22 -20
  330. package/dist/src/typus/tails-staking/user-entry.d.ts +23 -23
  331. package/dist/src/typus/tails-staking/user-entry.js +30 -30
  332. package/dist/src/typus/tails-staking/view-function.js +14 -14
  333. package/dist/src/typus/user/view-function.js +9 -9
  334. package/dist/src/typus-dov-single-v2/authority-entry.d.ts +4 -4
  335. package/dist/src/typus-dov-single-v2/authority-entry.js +21 -21
  336. package/dist/src/typus-dov-single-v2/function/bidding.d.ts +83 -1
  337. package/dist/src/typus-dov-single-v2/function/bidding.js +182 -9
  338. package/dist/src/typus-dov-single-v2/function/index.d.ts +1 -0
  339. package/dist/src/typus-dov-single-v2/function/index.js +1 -1
  340. package/dist/src/typus-dov-single-v2/function/token.js +1 -3
  341. package/dist/src/typus-dov-single-v2/history/user-history.d.ts +1 -1
  342. package/dist/src/typus-dov-single-v2/history/vault-history.d.ts +1 -1
  343. package/dist/src/typus-dov-single-v2/history/vault-history.js +1 -1
  344. package/dist/src/typus-dov-single-v2/token-user-entry.d.ts +13 -13
  345. package/dist/src/typus-dov-single-v2/token-user-entry.js +29 -29
  346. package/dist/src/typus-dov-single-v2/user-entry.d.ts +20 -20
  347. package/dist/src/typus-dov-single-v2/user-entry.js +59 -61
  348. package/dist/src/typus-dov-single-v2/view-function.js +55 -55
  349. package/dist/src/typus-launch/airdrop/authority-entry.d.ts +3 -3
  350. package/dist/src/typus-launch/airdrop/authority-entry.js +7 -7
  351. package/dist/src/typus-launch/airdrop/user-entry.d.ts +2 -2
  352. package/dist/src/typus-launch/airdrop/user-entry.js +2 -2
  353. package/dist/src/typus-launch/airdrop/view-function.d.ts +1 -0
  354. package/dist/src/typus-launch/airdrop/view-function.js +10 -9
  355. package/dist/src/typus-launch/auction/entry.d.ts +5 -5
  356. package/dist/src/typus-launch/auction/entry.js +4 -4
  357. package/dist/src/typus-launch/auction/view-function.js +17 -17
  358. package/dist/src/typus-launch/funding-vault/authority-entry.d.ts +11 -11
  359. package/dist/src/typus-launch/funding-vault/authority-entry.js +24 -32
  360. package/dist/src/typus-launch/funding-vault/user-entry.d.ts +3 -3
  361. package/dist/src/typus-launch/funding-vault/user-entry.js +6 -6
  362. package/dist/src/typus-launch/funding-vault/view-function.js +29 -29
  363. package/dist/src/typus-launch/improvement-proposal/authority-entry.d.ts +11 -9
  364. package/dist/src/typus-launch/improvement-proposal/authority-entry.js +23 -21
  365. package/dist/src/typus-launch/improvement-proposal/user-entry.d.ts +3 -3
  366. package/dist/src/typus-launch/improvement-proposal/user-entry.js +2 -2
  367. package/dist/src/typus-launch/improvement-proposal/view-function.d.ts +16 -1
  368. package/dist/src/typus-launch/improvement-proposal/view-function.js +82 -35
  369. package/dist/src/typus-launch/option-airdrop/authority-entry.d.ts +5 -5
  370. package/dist/src/typus-launch/option-airdrop/authority-entry.js +6 -6
  371. package/dist/src/typus-launch/ve-typus/authority-entry.d.ts +5 -5
  372. package/dist/src/typus-launch/ve-typus/authority-entry.js +10 -10
  373. package/dist/src/typus-launch/ve-typus/user-entry.d.ts +4 -4
  374. package/dist/src/typus-launch/ve-typus/user-entry.js +9 -6
  375. package/dist/src/typus-launch/ve-typus/view-function.js +18 -18
  376. package/dist/src/typus-nft/fetch.d.ts +2 -2
  377. package/dist/src/typus-nft/user-entry.d.ts +11 -11
  378. package/dist/src/typus-nft/user-entry.js +3 -3
  379. package/dist/src/typus-perp/admin/functions.d.ts +51 -0
  380. package/dist/src/typus-perp/admin/functions.js +100 -0
  381. package/dist/src/typus-perp/{typus_stake_pool/admin → admin}/structs.d.ts +27 -49
  382. package/dist/src/typus-perp/{typus_stake_pool/admin → admin}/structs.js +21 -117
  383. package/dist/src/typus-perp/fetch.d.ts +5 -5
  384. package/dist/src/typus-perp/fetch.js +13 -13
  385. package/dist/src/typus-perp/index.d.ts +18 -2
  386. package/dist/src/typus-perp/index.js +83 -5
  387. package/dist/src/typus-perp/{typus_perp/init.js → init.js} +26 -13
  388. package/dist/src/typus-perp/lp-pool/functions.d.ts +283 -0
  389. package/dist/src/typus-perp/lp-pool/functions.js +418 -0
  390. package/dist/src/typus-perp/{typus_perp/lp-pool → lp-pool}/structs.d.ts +148 -698
  391. package/dist/src/typus-perp/{typus_perp/lp-pool → lp-pool}/structs.js +172 -1457
  392. package/dist/src/typus-perp/math/functions.d.ts +18 -0
  393. package/dist/src/typus-perp/math/functions.js +40 -0
  394. package/dist/src/typus-perp/oracle/functions.d.ts +14 -0
  395. package/dist/src/typus-perp/oracle/functions.js +22 -0
  396. package/dist/src/typus-perp/{typus_perp/oracle → oracle}/structs.d.ts +11 -20
  397. package/dist/src/typus-perp/{typus_perp/oracle → oracle}/structs.js +10 -52
  398. package/dist/src/typus-perp/position/functions.d.ts +339 -0
  399. package/dist/src/typus-perp/position/functions.js +564 -0
  400. package/dist/src/typus-perp/{typus_perp/position → position}/structs.d.ts +43 -73
  401. package/dist/src/typus-perp/{typus_perp/position → position}/structs.js +38 -177
  402. package/dist/src/typus-perp/readVec.js +9 -9
  403. package/dist/src/typus-perp/stake-pool/functions.d.ts +169 -0
  404. package/dist/src/typus-perp/stake-pool/functions.js +258 -0
  405. package/dist/src/typus-perp/{typus_stake_pool/stake-pool → stake-pool}/structs.d.ts +185 -293
  406. package/dist/src/typus-perp/{typus_stake_pool/stake-pool → stake-pool}/structs.js +235 -659
  407. package/dist/src/typus-perp/symbol/functions.d.ts +10 -0
  408. package/dist/src/typus-perp/symbol/functions.js +20 -0
  409. package/dist/src/typus-perp/{typus_perp/symbol → symbol}/structs.d.ts +6 -11
  410. package/dist/src/typus-perp/{typus_perp/symbol → symbol}/structs.js +4 -23
  411. package/dist/src/typus-perp/tlp/functions.d.ts +20 -0
  412. package/dist/src/typus-perp/tlp/functions.js +35 -0
  413. package/dist/src/typus-perp/{typus_perp/tlp → tlp}/structs.d.ts +11 -20
  414. package/dist/src/typus-perp/{typus_perp/tlp → tlp}/structs.js +13 -61
  415. package/dist/src/typus-perp/token-interface/functions.d.ts +12 -0
  416. package/dist/src/typus-perp/{typus_perp/token-interface → token-interface}/functions.js +6 -6
  417. package/dist/src/typus-perp/trading/functions.d.ts +427 -0
  418. package/dist/src/typus-perp/trading/functions.js +612 -0
  419. package/dist/src/typus-perp/{typus_perp/trading → trading}/structs.d.ts +161 -523
  420. package/dist/src/typus-perp/{typus_perp/trading → trading}/structs.js +107 -1042
  421. package/dist/src/typus-perp/treasury-caps/functions.d.ts +10 -0
  422. package/dist/src/typus-perp/{typus_perp/treasury-caps → treasury-caps}/functions.js +11 -14
  423. package/dist/src/typus-perp/{typus_perp/treasury-caps → treasury-caps}/structs.d.ts +6 -11
  424. package/dist/src/typus-perp/{typus_perp/treasury-caps → treasury-caps}/structs.js +7 -32
  425. package/dist/src/typus-perp/user/order.d.ts +10 -10
  426. package/dist/src/typus-perp/user/order.js +1 -2
  427. package/dist/src/typus-perp/user/orderWithBidReceipt.d.ts +5 -5
  428. package/dist/src/typus-perp/user/orderWithBidReceipt.js +1 -1
  429. package/dist/src/typus-perp/user/tlp.d.ts +12 -12
  430. package/dist/src/typus-perp/user/tlp.js +6 -8
  431. package/dist/src/typus-safu/user-entry.d.ts +9 -9
  432. package/dist/src/typus-safu/user-entry.js +18 -18
  433. package/dist/src/typus-safu/user-history.d.ts +1 -1
  434. package/dist/src/typus-safu/user-history.js +1 -1
  435. package/dist/src/typus-safu/view-function.js +17 -17
  436. package/dist/src/utils/api/price.js +2 -18
  437. package/dist/src/utils/api/sentio/reward-generated.d.ts +1 -1
  438. package/dist/src/utils/mint.d.ts +2 -2
  439. package/dist/src/utils/mint.js +3 -3
  440. package/dist/src/utils/pyth/constant.d.ts +0 -2
  441. package/dist/src/utils/pyth/constant.js +0 -2
  442. package/dist/src/utils/pyth/pythClient.d.ts +3 -3
  443. package/package.json +5 -4
  444. package/dist/src/typus-perp/_dependencies/source/0x1/uq32-32/structs.d.ts +0 -46
  445. package/dist/src/typus-perp/_dependencies/source/0x1/uq32-32/structs.js +0 -228
  446. package/dist/src/typus-perp/_dependencies/source/0x1/uq64-64/structs.d.ts +0 -46
  447. package/dist/src/typus-perp/_dependencies/source/0x1/uq64-64/structs.js +0 -228
  448. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.d.ts +0 -5
  449. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.js +0 -8
  450. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.js +0 -793
  451. package/dist/src/typus-perp/_dependencies/source/0x2/authenticator-state/structs.js +0 -894
  452. package/dist/src/typus-perp/_dependencies/source/0x2/bls12381/structs.js +0 -820
  453. package/dist/src/typus-perp/_dependencies/source/0x2/borrow/structs.js +0 -410
  454. package/dist/src/typus-perp/_dependencies/source/0x2/coin/structs.js +0 -1259
  455. package/dist/src/typus-perp/_dependencies/source/0x2/config/structs.d.ts +0 -179
  456. package/dist/src/typus-perp/_dependencies/source/0x2/config/structs.js +0 -577
  457. package/dist/src/typus-perp/_dependencies/source/0x2/deny-list/structs.d.ts +0 -430
  458. package/dist/src/typus-perp/_dependencies/source/0x2/deny-list/structs.js +0 -1177
  459. package/dist/src/typus-perp/_dependencies/source/0x2/display/structs.js +0 -584
  460. package/dist/src/typus-perp/_dependencies/source/0x2/groth16/structs.js +0 -710
  461. package/dist/src/typus-perp/_dependencies/source/0x2/kiosk/structs.js +0 -1724
  462. package/dist/src/typus-perp/_dependencies/source/0x2/linked-table/structs.js +0 -438
  463. package/dist/src/typus-perp/_dependencies/source/0x2/package/structs.js +0 -752
  464. package/dist/src/typus-perp/_dependencies/source/0x2/random/structs.js +0 -586
  465. package/dist/src/typus-perp/_dependencies/source/0x2/token/structs.js +0 -1107
  466. package/dist/src/typus-perp/_dependencies/source/0x2/transfer-policy/structs.js +0 -1099
  467. package/dist/src/typus-perp/_dependencies/source/0x2/vec-map/structs.js +0 -436
  468. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.js +0 -1092
  469. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.js +0 -643
  470. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.js +0 -898
  471. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.d.ts +0 -8
  472. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.js +0 -11
  473. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/keyed-big-vector/structs.d.ts +0 -227
  474. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/keyed-big-vector/structs.js +0 -622
  475. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.js +0 -1476
  476. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.js +0 -438
  477. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.js +0 -430
  478. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tails-staking/structs.d.ts +0 -1071
  479. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tails-staking/structs.js +0 -2275
  480. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.js +0 -732
  481. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.js +0 -900
  482. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.js +0 -1335
  483. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.d.ts +0 -9
  484. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.js +0 -12
  485. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.js +0 -886
  486. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.js +0 -2407
  487. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.js +0 -3052
  488. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.d.ts +0 -10
  489. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.js +0 -13
  490. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.js +0 -2846
  491. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.js +0 -1669
  492. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.js +0 -1249
  493. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.js +0 -1869
  494. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.js +0 -7680
  495. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.js +0 -581
  496. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.js +0 -1735
  497. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.d.ts +0 -3
  498. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.js +0 -6
  499. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.js +0 -444
  500. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.js +0 -5014
  501. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.js +0 -1229
  502. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.js +0 -322
  503. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/index.d.ts +0 -3
  504. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/index.js +0 -6
  505. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/state/structs.js +0 -573
  506. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/version-control/structs.d.ts +0 -130
  507. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/version-control/structs.js +0 -524
  508. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/emitter/structs.js +0 -531
  509. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/governance-message/structs.js +0 -460
  510. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/index.d.ts +0 -3
  511. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/index.js +0 -6
  512. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/package-utils/structs.js +0 -680
  513. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/publish-message/structs.js +0 -449
  514. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/state/structs.js +0 -455
  515. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/upgrade-contract/structs.js +0 -532
  516. package/dist/src/typus-perp/_framework/init-loader.d.ts +0 -2
  517. package/dist/src/typus-perp/_framework/init-loader.js +0 -63
  518. package/dist/src/typus-perp/_framework/util.d.ts +0 -35
  519. package/dist/src/typus-perp/_framework/util.js +0 -396
  520. package/dist/src/typus-perp/_framework/vector.d.ts +0 -35
  521. package/dist/src/typus-perp/_framework/vector.js +0 -112
  522. package/dist/src/typus-perp/typus_perp/admin/functions.d.ts +0 -50
  523. package/dist/src/typus-perp/typus_perp/admin/functions.js +0 -116
  524. package/dist/src/typus-perp/typus_perp/admin/structs.d.ts +0 -447
  525. package/dist/src/typus-perp/typus_perp/admin/structs.js +0 -898
  526. package/dist/src/typus-perp/typus_perp/index.d.ts +0 -3
  527. package/dist/src/typus-perp/typus_perp/index.js +0 -6
  528. package/dist/src/typus-perp/typus_perp/lp-pool/functions.d.ts +0 -342
  529. package/dist/src/typus-perp/typus_perp/lp-pool/functions.js +0 -517
  530. package/dist/src/typus-perp/typus_perp/math/functions.d.ts +0 -18
  531. package/dist/src/typus-perp/typus_perp/math/functions.js +0 -49
  532. package/dist/src/typus-perp/typus_perp/oracle/functions.d.ts +0 -13
  533. package/dist/src/typus-perp/typus_perp/oracle/functions.js +0 -25
  534. package/dist/src/typus-perp/typus_perp/position/functions.d.ts +0 -343
  535. package/dist/src/typus-perp/typus_perp/position/functions.js +0 -659
  536. package/dist/src/typus-perp/typus_perp/symbol/functions.d.ts +0 -9
  537. package/dist/src/typus-perp/typus_perp/symbol/functions.js +0 -33
  538. package/dist/src/typus-perp/typus_perp/tlp/functions.d.ts +0 -19
  539. package/dist/src/typus-perp/typus_perp/tlp/functions.js +0 -41
  540. package/dist/src/typus-perp/typus_perp/token-interface/functions.d.ts +0 -11
  541. package/dist/src/typus-perp/typus_perp/trading/functions.d.ts +0 -493
  542. package/dist/src/typus-perp/typus_perp/trading/functions.js +0 -711
  543. package/dist/src/typus-perp/typus_perp/treasury-caps/functions.d.ts +0 -9
  544. package/dist/src/typus-perp/typus_stake_pool/admin/functions.d.ts +0 -50
  545. package/dist/src/typus-perp/typus_stake_pool/admin/functions.js +0 -116
  546. package/dist/src/typus-perp/typus_stake_pool/index.d.ts +0 -3
  547. package/dist/src/typus-perp/typus_stake_pool/index.js +0 -6
  548. package/dist/src/typus-perp/typus_stake_pool/init.d.ts +0 -2
  549. package/dist/src/typus-perp/typus_stake_pool/init.js +0 -57
  550. package/dist/src/typus-perp/typus_stake_pool/stake-pool/functions.d.ts +0 -175
  551. package/dist/src/typus-perp/typus_stake_pool/stake-pool/functions.js +0 -275
  552. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1/init.d.ts +0 -0
  553. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/init.d.ts +0 -0
  554. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2/init.d.ts +0 -0
  555. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.d.ts +0 -0
  556. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.js +0 -0
  557. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.d.ts +0 -0
  558. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.js +0 -0
  559. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/init.d.ts +0 -0
  560. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/init.d.ts +0 -0
  561. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/init.d.ts +0 -0
  562. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.d.ts +0 -0
  563. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.js +0 -0
  564. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.d.ts +0 -0
  565. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.js +0 -0
  566. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.d.ts +0 -0
  567. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.js +0 -0
  568. package/dist/src/{typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837 → _dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585}/init.d.ts +0 -0
  569. package/dist/src/{typus-perp/_dependencies → _dependencies}/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/init.js +2 -2
  570. package/dist/src/{typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/init.d.ts +0 -0
  571. package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e}/init.js +4 -4
  572. /package/dist/src/{typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94 → _dependencies/source/0xe76d8a37d4132278a7a752183e90e04890b9e7d0f6657eadb68821609a2a56a3}/init.d.ts +0 -0
  573. /package/dist/src/typus-perp/{typus_perp/init.d.ts → init.d.ts} +0 -0
@@ -1,2846 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
- return new (P || (P = Promise))(function (resolve, reject) {
39
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
- step((generator = generator.apply(thisArg, _arguments || [])).next());
43
- });
44
- };
45
- var __generator = (this && this.__generator) || function (thisArg, body) {
46
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
47
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
48
- function verb(n) { return function (v) { return step([n, v]); }; }
49
- function step(op) {
50
- if (f) throw new TypeError("Generator is already executing.");
51
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
52
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
53
- if (y = 0, t) op = [op[0] & 2, t.value];
54
- switch (op[0]) {
55
- case 0: case 1: t = op; break;
56
- case 4: _.label++; return { value: op[1], done: false };
57
- case 5: _.label++; y = op[1]; op = [0]; continue;
58
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
59
- default:
60
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
61
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
62
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
63
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
64
- if (t[2]) _.ops.pop();
65
- _.trys.pop(); continue;
66
- }
67
- op = body.call(thisArg, _);
68
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
69
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
70
- }
71
- };
72
- var __read = (this && this.__read) || function (o, n) {
73
- var m = typeof Symbol === "function" && o[Symbol.iterator];
74
- if (!m) return o;
75
- var i = m.call(o), r, ar = [], e;
76
- try {
77
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
78
- }
79
- catch (error) { e = { error: error }; }
80
- finally {
81
- try {
82
- if (r && !r.done && (m = i["return"])) m.call(i);
83
- }
84
- finally { if (e) throw e.error; }
85
- }
86
- return ar;
87
- };
88
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
89
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
90
- if (ar || !(i in from)) {
91
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
92
- ar[i] = from[i];
93
- }
94
- }
95
- return to.concat(ar || Array.prototype.slice.call(from));
96
- };
97
- Object.defineProperty(exports, "__esModule", { value: true });
98
- exports.UpdateUrlEvent = exports.UpdateDepositEvent = exports.UnstakeNftEvent = exports.TransferNftEvent = exports.StakeNftEvent = exports.SnapshotNftEvent = exports.ProfitSharingEvent = exports.ProfitSharing = exports.PartnerKey = exports.Partner = exports.DailyAttendEvent = exports.ClaimProfitSharingEventV2 = exports.WithdrawEvent = exports.NftExtension = exports.ClaimProfitSharingEvent = exports.LevelUpEvent = void 0;
99
- exports.isLevelUpEvent = isLevelUpEvent;
100
- exports.isClaimProfitSharingEvent = isClaimProfitSharingEvent;
101
- exports.isNftExtension = isNftExtension;
102
- exports.isWithdrawEvent = isWithdrawEvent;
103
- exports.isClaimProfitSharingEventV2 = isClaimProfitSharingEventV2;
104
- exports.isDailyAttendEvent = isDailyAttendEvent;
105
- exports.isPartner = isPartner;
106
- exports.isPartnerKey = isPartnerKey;
107
- exports.isProfitSharing = isProfitSharing;
108
- exports.isProfitSharingEvent = isProfitSharingEvent;
109
- exports.isSnapshotNftEvent = isSnapshotNftEvent;
110
- exports.isStakeNftEvent = isStakeNftEvent;
111
- exports.isTransferNftEvent = isTransferNftEvent;
112
- exports.isUnstakeNftEvent = isUnstakeNftEvent;
113
- exports.isUpdateDepositEvent = isUpdateDepositEvent;
114
- exports.isUpdateUrlEvent = isUpdateUrlEvent;
115
- var reified = __importStar(require("../../../../_framework/reified"));
116
- var reified_1 = require("../../../../_framework/reified");
117
- var util_1 = require("../../../../_framework/util");
118
- var structs_1 = require("../../0x1/string/structs");
119
- var structs_2 = require("../../0x1/type-name/structs");
120
- var structs_3 = require("../../0x2/balance/structs");
121
- var structs_4 = require("../../0x2/object-table/structs");
122
- var structs_5 = require("../../0x2/object/structs");
123
- var structs_6 = require("../../0x2/sui/structs");
124
- var structs_7 = require("../../0x2/transfer-policy/structs");
125
- var structs_8 = require("../../0x2/vec-map/structs");
126
- var structs_9 = require("../../0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs");
127
- var index_1 = require("../index");
128
- var bcs_1 = require("@mysten/sui/bcs");
129
- var utils_1 = require("@mysten/sui/utils");
130
- /* ============================== LevelUpEvent =============================== */
131
- function isLevelUpEvent(type) {
132
- type = (0, util_1.compressSuiType)(type);
133
- return type === "".concat(index_1.PKG_V1, "::tails_staking::LevelUpEvent");
134
- }
135
- var LevelUpEvent = /** @class */ (function () {
136
- function LevelUpEvent(typeArgs, fields) {
137
- this.__StructClass = true;
138
- this.$typeName = LevelUpEvent.$typeName;
139
- this.$isPhantom = LevelUpEvent.$isPhantom;
140
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([LevelUpEvent.$typeName], __read(typeArgs), false));
141
- this.$typeArgs = typeArgs;
142
- this.nftId = fields.nftId;
143
- this.number = fields.number;
144
- this.sender = fields.sender;
145
- this.level = fields.level;
146
- }
147
- LevelUpEvent.reified = function () {
148
- var _this = this;
149
- return {
150
- typeName: LevelUpEvent.$typeName,
151
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([LevelUpEvent.$typeName], [], false)),
152
- typeArgs: [],
153
- isPhantom: LevelUpEvent.$isPhantom,
154
- reifiedTypeArgs: [],
155
- fromFields: function (fields) { return LevelUpEvent.fromFields(fields); },
156
- fromFieldsWithTypes: function (item) { return LevelUpEvent.fromFieldsWithTypes(item); },
157
- fromBcs: function (data) { return LevelUpEvent.fromBcs(data); },
158
- bcs: LevelUpEvent.bcs,
159
- fromJSONField: function (field) { return LevelUpEvent.fromJSONField(field); },
160
- fromJSON: function (json) { return LevelUpEvent.fromJSON(json); },
161
- fromSuiParsedData: function (content) { return LevelUpEvent.fromSuiParsedData(content); },
162
- fromSuiObjectData: function (content) { return LevelUpEvent.fromSuiObjectData(content); },
163
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
164
- return [2 /*return*/, LevelUpEvent.fetch(client, id)];
165
- }); }); },
166
- new: function (fields) {
167
- return new LevelUpEvent([], fields);
168
- },
169
- kind: "StructClassReified",
170
- };
171
- };
172
- Object.defineProperty(LevelUpEvent, "r", {
173
- get: function () {
174
- return LevelUpEvent.reified();
175
- },
176
- enumerable: false,
177
- configurable: true
178
- });
179
- LevelUpEvent.phantom = function () {
180
- return (0, reified_1.phantom)(LevelUpEvent.reified());
181
- };
182
- Object.defineProperty(LevelUpEvent, "p", {
183
- get: function () {
184
- return LevelUpEvent.phantom();
185
- },
186
- enumerable: false,
187
- configurable: true
188
- });
189
- Object.defineProperty(LevelUpEvent, "bcs", {
190
- get: function () {
191
- return bcs_1.bcs.struct("LevelUpEvent", {
192
- nft_id: structs_5.ID.bcs,
193
- number: bcs_1.bcs.u64(),
194
- sender: bcs_1.bcs.bytes(32).transform({
195
- input: function (val) { return (0, utils_1.fromHEX)(val); },
196
- output: function (val) { return (0, utils_1.toHEX)(val); },
197
- }),
198
- level: bcs_1.bcs.u64(),
199
- });
200
- },
201
- enumerable: false,
202
- configurable: true
203
- });
204
- LevelUpEvent.fromFields = function (fields) {
205
- return LevelUpEvent.reified().new({
206
- nftId: (0, reified_1.decodeFromFields)(structs_5.ID.reified(), fields.nft_id),
207
- number: (0, reified_1.decodeFromFields)("u64", fields.number),
208
- sender: (0, reified_1.decodeFromFields)("address", fields.sender),
209
- level: (0, reified_1.decodeFromFields)("u64", fields.level),
210
- });
211
- };
212
- LevelUpEvent.fromFieldsWithTypes = function (item) {
213
- if (!isLevelUpEvent(item.type)) {
214
- throw new Error("not a LevelUpEvent type");
215
- }
216
- return LevelUpEvent.reified().new({
217
- nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.ID.reified(), item.fields.nft_id),
218
- number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
219
- sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
220
- level: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.level),
221
- });
222
- };
223
- LevelUpEvent.fromBcs = function (data) {
224
- return LevelUpEvent.fromFields(LevelUpEvent.bcs.parse(data));
225
- };
226
- LevelUpEvent.prototype.toJSONField = function () {
227
- return {
228
- nftId: this.nftId,
229
- number: this.number.toString(),
230
- sender: this.sender,
231
- level: this.level.toString(),
232
- };
233
- };
234
- LevelUpEvent.prototype.toJSON = function () {
235
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
236
- };
237
- LevelUpEvent.fromJSONField = function (field) {
238
- return LevelUpEvent.reified().new({
239
- nftId: (0, reified_1.decodeFromJSONField)(structs_5.ID.reified(), field.nftId),
240
- number: (0, reified_1.decodeFromJSONField)("u64", field.number),
241
- sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
242
- level: (0, reified_1.decodeFromJSONField)("u64", field.level),
243
- });
244
- };
245
- LevelUpEvent.fromJSON = function (json) {
246
- if (json.$typeName !== LevelUpEvent.$typeName) {
247
- throw new Error("not a WithTwoGenerics json object");
248
- }
249
- return LevelUpEvent.fromJSONField(json);
250
- };
251
- LevelUpEvent.fromSuiParsedData = function (content) {
252
- if (content.dataType !== "moveObject") {
253
- throw new Error("not an object");
254
- }
255
- if (!isLevelUpEvent(content.type)) {
256
- throw new Error("object at ".concat(content.fields.id, " is not a LevelUpEvent object"));
257
- }
258
- return LevelUpEvent.fromFieldsWithTypes(content);
259
- };
260
- LevelUpEvent.fromSuiObjectData = function (data) {
261
- if (data.bcs) {
262
- if (data.bcs.dataType !== "moveObject" || !isLevelUpEvent(data.bcs.type)) {
263
- throw new Error("object at is not a LevelUpEvent object");
264
- }
265
- return LevelUpEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
266
- }
267
- if (data.content) {
268
- return LevelUpEvent.fromSuiParsedData(data.content);
269
- }
270
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
271
- };
272
- LevelUpEvent.fetch = function (client, id) {
273
- return __awaiter(this, void 0, void 0, function () {
274
- var res;
275
- var _a, _b;
276
- return __generator(this, function (_c) {
277
- switch (_c.label) {
278
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
279
- case 1:
280
- res = _c.sent();
281
- if (res.error) {
282
- throw new Error("error fetching LevelUpEvent object at id ".concat(id, ": ").concat(res.error.code));
283
- }
284
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isLevelUpEvent(res.data.bcs.type)) {
285
- throw new Error("object at id ".concat(id, " is not a LevelUpEvent object"));
286
- }
287
- return [2 /*return*/, LevelUpEvent.fromSuiObjectData(res.data)];
288
- }
289
- });
290
- });
291
- };
292
- LevelUpEvent.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::LevelUpEvent");
293
- LevelUpEvent.$numTypeParams = 0;
294
- LevelUpEvent.$isPhantom = [];
295
- return LevelUpEvent;
296
- }());
297
- exports.LevelUpEvent = LevelUpEvent;
298
- /* ============================== ClaimProfitSharingEvent =============================== */
299
- function isClaimProfitSharingEvent(type) {
300
- type = (0, util_1.compressSuiType)(type);
301
- return type === "".concat(index_1.PKG_V1, "::tails_staking::ClaimProfitSharingEvent");
302
- }
303
- var ClaimProfitSharingEvent = /** @class */ (function () {
304
- function ClaimProfitSharingEvent(typeArgs, fields) {
305
- this.__StructClass = true;
306
- this.$typeName = ClaimProfitSharingEvent.$typeName;
307
- this.$isPhantom = ClaimProfitSharingEvent.$isPhantom;
308
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ClaimProfitSharingEvent.$typeName], __read(typeArgs), false));
309
- this.$typeArgs = typeArgs;
310
- this.value = fields.value;
311
- this.token = fields.token;
312
- this.sender = fields.sender;
313
- this.nftId = fields.nftId;
314
- this.number = fields.number;
315
- this.level = fields.level;
316
- }
317
- ClaimProfitSharingEvent.reified = function () {
318
- var _this = this;
319
- return {
320
- typeName: ClaimProfitSharingEvent.$typeName,
321
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ClaimProfitSharingEvent.$typeName], [], false)),
322
- typeArgs: [],
323
- isPhantom: ClaimProfitSharingEvent.$isPhantom,
324
- reifiedTypeArgs: [],
325
- fromFields: function (fields) { return ClaimProfitSharingEvent.fromFields(fields); },
326
- fromFieldsWithTypes: function (item) { return ClaimProfitSharingEvent.fromFieldsWithTypes(item); },
327
- fromBcs: function (data) { return ClaimProfitSharingEvent.fromBcs(data); },
328
- bcs: ClaimProfitSharingEvent.bcs,
329
- fromJSONField: function (field) { return ClaimProfitSharingEvent.fromJSONField(field); },
330
- fromJSON: function (json) { return ClaimProfitSharingEvent.fromJSON(json); },
331
- fromSuiParsedData: function (content) { return ClaimProfitSharingEvent.fromSuiParsedData(content); },
332
- fromSuiObjectData: function (content) { return ClaimProfitSharingEvent.fromSuiObjectData(content); },
333
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
334
- return [2 /*return*/, ClaimProfitSharingEvent.fetch(client, id)];
335
- }); }); },
336
- new: function (fields) {
337
- return new ClaimProfitSharingEvent([], fields);
338
- },
339
- kind: "StructClassReified",
340
- };
341
- };
342
- Object.defineProperty(ClaimProfitSharingEvent, "r", {
343
- get: function () {
344
- return ClaimProfitSharingEvent.reified();
345
- },
346
- enumerable: false,
347
- configurable: true
348
- });
349
- ClaimProfitSharingEvent.phantom = function () {
350
- return (0, reified_1.phantom)(ClaimProfitSharingEvent.reified());
351
- };
352
- Object.defineProperty(ClaimProfitSharingEvent, "p", {
353
- get: function () {
354
- return ClaimProfitSharingEvent.phantom();
355
- },
356
- enumerable: false,
357
- configurable: true
358
- });
359
- Object.defineProperty(ClaimProfitSharingEvent, "bcs", {
360
- get: function () {
361
- return bcs_1.bcs.struct("ClaimProfitSharingEvent", {
362
- value: bcs_1.bcs.u64(),
363
- token: structs_2.TypeName.bcs,
364
- sender: bcs_1.bcs.bytes(32).transform({
365
- input: function (val) { return (0, utils_1.fromHEX)(val); },
366
- output: function (val) { return (0, utils_1.toHEX)(val); },
367
- }),
368
- nft_id: structs_5.ID.bcs,
369
- number: bcs_1.bcs.u64(),
370
- level: bcs_1.bcs.u64(),
371
- });
372
- },
373
- enumerable: false,
374
- configurable: true
375
- });
376
- ClaimProfitSharingEvent.fromFields = function (fields) {
377
- return ClaimProfitSharingEvent.reified().new({
378
- value: (0, reified_1.decodeFromFields)("u64", fields.value),
379
- token: (0, reified_1.decodeFromFields)(structs_2.TypeName.reified(), fields.token),
380
- sender: (0, reified_1.decodeFromFields)("address", fields.sender),
381
- nftId: (0, reified_1.decodeFromFields)(structs_5.ID.reified(), fields.nft_id),
382
- number: (0, reified_1.decodeFromFields)("u64", fields.number),
383
- level: (0, reified_1.decodeFromFields)("u64", fields.level),
384
- });
385
- };
386
- ClaimProfitSharingEvent.fromFieldsWithTypes = function (item) {
387
- if (!isClaimProfitSharingEvent(item.type)) {
388
- throw new Error("not a ClaimProfitSharingEvent type");
389
- }
390
- return ClaimProfitSharingEvent.reified().new({
391
- value: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.value),
392
- token: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.TypeName.reified(), item.fields.token),
393
- sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
394
- nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.ID.reified(), item.fields.nft_id),
395
- number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
396
- level: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.level),
397
- });
398
- };
399
- ClaimProfitSharingEvent.fromBcs = function (data) {
400
- return ClaimProfitSharingEvent.fromFields(ClaimProfitSharingEvent.bcs.parse(data));
401
- };
402
- ClaimProfitSharingEvent.prototype.toJSONField = function () {
403
- return {
404
- value: this.value.toString(),
405
- token: this.token.toJSONField(),
406
- sender: this.sender,
407
- nftId: this.nftId,
408
- number: this.number.toString(),
409
- level: this.level.toString(),
410
- };
411
- };
412
- ClaimProfitSharingEvent.prototype.toJSON = function () {
413
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
414
- };
415
- ClaimProfitSharingEvent.fromJSONField = function (field) {
416
- return ClaimProfitSharingEvent.reified().new({
417
- value: (0, reified_1.decodeFromJSONField)("u64", field.value),
418
- token: (0, reified_1.decodeFromJSONField)(structs_2.TypeName.reified(), field.token),
419
- sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
420
- nftId: (0, reified_1.decodeFromJSONField)(structs_5.ID.reified(), field.nftId),
421
- number: (0, reified_1.decodeFromJSONField)("u64", field.number),
422
- level: (0, reified_1.decodeFromJSONField)("u64", field.level),
423
- });
424
- };
425
- ClaimProfitSharingEvent.fromJSON = function (json) {
426
- if (json.$typeName !== ClaimProfitSharingEvent.$typeName) {
427
- throw new Error("not a WithTwoGenerics json object");
428
- }
429
- return ClaimProfitSharingEvent.fromJSONField(json);
430
- };
431
- ClaimProfitSharingEvent.fromSuiParsedData = function (content) {
432
- if (content.dataType !== "moveObject") {
433
- throw new Error("not an object");
434
- }
435
- if (!isClaimProfitSharingEvent(content.type)) {
436
- throw new Error("object at ".concat(content.fields.id, " is not a ClaimProfitSharingEvent object"));
437
- }
438
- return ClaimProfitSharingEvent.fromFieldsWithTypes(content);
439
- };
440
- ClaimProfitSharingEvent.fromSuiObjectData = function (data) {
441
- if (data.bcs) {
442
- if (data.bcs.dataType !== "moveObject" || !isClaimProfitSharingEvent(data.bcs.type)) {
443
- throw new Error("object at is not a ClaimProfitSharingEvent object");
444
- }
445
- return ClaimProfitSharingEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
446
- }
447
- if (data.content) {
448
- return ClaimProfitSharingEvent.fromSuiParsedData(data.content);
449
- }
450
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
451
- };
452
- ClaimProfitSharingEvent.fetch = function (client, id) {
453
- return __awaiter(this, void 0, void 0, function () {
454
- var res;
455
- var _a, _b;
456
- return __generator(this, function (_c) {
457
- switch (_c.label) {
458
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
459
- case 1:
460
- res = _c.sent();
461
- if (res.error) {
462
- throw new Error("error fetching ClaimProfitSharingEvent object at id ".concat(id, ": ").concat(res.error.code));
463
- }
464
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isClaimProfitSharingEvent(res.data.bcs.type)) {
465
- throw new Error("object at id ".concat(id, " is not a ClaimProfitSharingEvent object"));
466
- }
467
- return [2 /*return*/, ClaimProfitSharingEvent.fromSuiObjectData(res.data)];
468
- }
469
- });
470
- });
471
- };
472
- ClaimProfitSharingEvent.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::ClaimProfitSharingEvent");
473
- ClaimProfitSharingEvent.$numTypeParams = 0;
474
- ClaimProfitSharingEvent.$isPhantom = [];
475
- return ClaimProfitSharingEvent;
476
- }());
477
- exports.ClaimProfitSharingEvent = ClaimProfitSharingEvent;
478
- /* ============================== NftExtension =============================== */
479
- function isNftExtension(type) {
480
- type = (0, util_1.compressSuiType)(type);
481
- return type === "".concat(index_1.PKG_V1, "::tails_staking::NftExtension");
482
- }
483
- var NftExtension = /** @class */ (function () {
484
- function NftExtension(typeArgs, fields) {
485
- this.__StructClass = true;
486
- this.$typeName = NftExtension.$typeName;
487
- this.$isPhantom = NftExtension.$isPhantom;
488
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([NftExtension.$typeName], __read(typeArgs), false));
489
- this.$typeArgs = typeArgs;
490
- this.id = fields.id;
491
- this.nftTable = fields.nftTable;
492
- this.nftManagerCap = fields.nftManagerCap;
493
- this.policy = fields.policy;
494
- this.fee = fields.fee;
495
- }
496
- NftExtension.reified = function () {
497
- var _this = this;
498
- return {
499
- typeName: NftExtension.$typeName,
500
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([NftExtension.$typeName], [], false)),
501
- typeArgs: [],
502
- isPhantom: NftExtension.$isPhantom,
503
- reifiedTypeArgs: [],
504
- fromFields: function (fields) { return NftExtension.fromFields(fields); },
505
- fromFieldsWithTypes: function (item) { return NftExtension.fromFieldsWithTypes(item); },
506
- fromBcs: function (data) { return NftExtension.fromBcs(data); },
507
- bcs: NftExtension.bcs,
508
- fromJSONField: function (field) { return NftExtension.fromJSONField(field); },
509
- fromJSON: function (json) { return NftExtension.fromJSON(json); },
510
- fromSuiParsedData: function (content) { return NftExtension.fromSuiParsedData(content); },
511
- fromSuiObjectData: function (content) { return NftExtension.fromSuiObjectData(content); },
512
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
513
- return [2 /*return*/, NftExtension.fetch(client, id)];
514
- }); }); },
515
- new: function (fields) {
516
- return new NftExtension([], fields);
517
- },
518
- kind: "StructClassReified",
519
- };
520
- };
521
- Object.defineProperty(NftExtension, "r", {
522
- get: function () {
523
- return NftExtension.reified();
524
- },
525
- enumerable: false,
526
- configurable: true
527
- });
528
- NftExtension.phantom = function () {
529
- return (0, reified_1.phantom)(NftExtension.reified());
530
- };
531
- Object.defineProperty(NftExtension, "p", {
532
- get: function () {
533
- return NftExtension.phantom();
534
- },
535
- enumerable: false,
536
- configurable: true
537
- });
538
- Object.defineProperty(NftExtension, "bcs", {
539
- get: function () {
540
- return bcs_1.bcs.struct("NftExtension", {
541
- id: structs_5.UID.bcs,
542
- nft_table: structs_4.ObjectTable.bcs,
543
- nft_manager_cap: structs_9.ManagerCap.bcs,
544
- policy: structs_7.TransferPolicy.bcs,
545
- fee: structs_3.Balance.bcs,
546
- });
547
- },
548
- enumerable: false,
549
- configurable: true
550
- });
551
- NftExtension.fromFields = function (fields) {
552
- return NftExtension.reified().new({
553
- id: (0, reified_1.decodeFromFields)(structs_5.UID.reified(), fields.id),
554
- nftTable: (0, reified_1.decodeFromFields)(structs_4.ObjectTable.reified(reified.phantom("address"), reified.phantom(structs_9.Tails.reified())), fields.nft_table),
555
- nftManagerCap: (0, reified_1.decodeFromFields)(structs_9.ManagerCap.reified(), fields.nft_manager_cap),
556
- policy: (0, reified_1.decodeFromFields)(structs_7.TransferPolicy.reified(reified.phantom(structs_9.Tails.reified())), fields.policy),
557
- fee: (0, reified_1.decodeFromFields)(structs_3.Balance.reified(reified.phantom(structs_6.SUI.reified())), fields.fee),
558
- });
559
- };
560
- NftExtension.fromFieldsWithTypes = function (item) {
561
- if (!isNftExtension(item.type)) {
562
- throw new Error("not a NftExtension type");
563
- }
564
- return NftExtension.reified().new({
565
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.UID.reified(), item.fields.id),
566
- nftTable: (0, reified_1.decodeFromFieldsWithTypes)(structs_4.ObjectTable.reified(reified.phantom("address"), reified.phantom(structs_9.Tails.reified())), item.fields.nft_table),
567
- nftManagerCap: (0, reified_1.decodeFromFieldsWithTypes)(structs_9.ManagerCap.reified(), item.fields.nft_manager_cap),
568
- policy: (0, reified_1.decodeFromFieldsWithTypes)(structs_7.TransferPolicy.reified(reified.phantom(structs_9.Tails.reified())), item.fields.policy),
569
- fee: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.Balance.reified(reified.phantom(structs_6.SUI.reified())), item.fields.fee),
570
- });
571
- };
572
- NftExtension.fromBcs = function (data) {
573
- return NftExtension.fromFields(NftExtension.bcs.parse(data));
574
- };
575
- NftExtension.prototype.toJSONField = function () {
576
- return {
577
- id: this.id,
578
- nftTable: this.nftTable.toJSONField(),
579
- nftManagerCap: this.nftManagerCap.toJSONField(),
580
- policy: this.policy.toJSONField(),
581
- fee: this.fee.toJSONField(),
582
- };
583
- };
584
- NftExtension.prototype.toJSON = function () {
585
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
586
- };
587
- NftExtension.fromJSONField = function (field) {
588
- return NftExtension.reified().new({
589
- id: (0, reified_1.decodeFromJSONField)(structs_5.UID.reified(), field.id),
590
- nftTable: (0, reified_1.decodeFromJSONField)(structs_4.ObjectTable.reified(reified.phantom("address"), reified.phantom(structs_9.Tails.reified())), field.nftTable),
591
- nftManagerCap: (0, reified_1.decodeFromJSONField)(structs_9.ManagerCap.reified(), field.nftManagerCap),
592
- policy: (0, reified_1.decodeFromJSONField)(structs_7.TransferPolicy.reified(reified.phantom(structs_9.Tails.reified())), field.policy),
593
- fee: (0, reified_1.decodeFromJSONField)(structs_3.Balance.reified(reified.phantom(structs_6.SUI.reified())), field.fee),
594
- });
595
- };
596
- NftExtension.fromJSON = function (json) {
597
- if (json.$typeName !== NftExtension.$typeName) {
598
- throw new Error("not a WithTwoGenerics json object");
599
- }
600
- return NftExtension.fromJSONField(json);
601
- };
602
- NftExtension.fromSuiParsedData = function (content) {
603
- if (content.dataType !== "moveObject") {
604
- throw new Error("not an object");
605
- }
606
- if (!isNftExtension(content.type)) {
607
- throw new Error("object at ".concat(content.fields.id, " is not a NftExtension object"));
608
- }
609
- return NftExtension.fromFieldsWithTypes(content);
610
- };
611
- NftExtension.fromSuiObjectData = function (data) {
612
- if (data.bcs) {
613
- if (data.bcs.dataType !== "moveObject" || !isNftExtension(data.bcs.type)) {
614
- throw new Error("object at is not a NftExtension object");
615
- }
616
- return NftExtension.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
617
- }
618
- if (data.content) {
619
- return NftExtension.fromSuiParsedData(data.content);
620
- }
621
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
622
- };
623
- NftExtension.fetch = function (client, id) {
624
- return __awaiter(this, void 0, void 0, function () {
625
- var res;
626
- var _a, _b;
627
- return __generator(this, function (_c) {
628
- switch (_c.label) {
629
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
630
- case 1:
631
- res = _c.sent();
632
- if (res.error) {
633
- throw new Error("error fetching NftExtension object at id ".concat(id, ": ").concat(res.error.code));
634
- }
635
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isNftExtension(res.data.bcs.type)) {
636
- throw new Error("object at id ".concat(id, " is not a NftExtension object"));
637
- }
638
- return [2 /*return*/, NftExtension.fromSuiObjectData(res.data)];
639
- }
640
- });
641
- });
642
- };
643
- NftExtension.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::NftExtension");
644
- NftExtension.$numTypeParams = 0;
645
- NftExtension.$isPhantom = [];
646
- return NftExtension;
647
- }());
648
- exports.NftExtension = NftExtension;
649
- /* ============================== WithdrawEvent =============================== */
650
- function isWithdrawEvent(type) {
651
- type = (0, util_1.compressSuiType)(type);
652
- return type === "".concat(index_1.PKG_V1, "::tails_staking::WithdrawEvent");
653
- }
654
- var WithdrawEvent = /** @class */ (function () {
655
- function WithdrawEvent(typeArgs, fields) {
656
- this.__StructClass = true;
657
- this.$typeName = WithdrawEvent.$typeName;
658
- this.$isPhantom = WithdrawEvent.$isPhantom;
659
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([WithdrawEvent.$typeName], __read(typeArgs), false));
660
- this.$typeArgs = typeArgs;
661
- this.sender = fields.sender;
662
- this.receiver = fields.receiver;
663
- this.amount = fields.amount;
664
- }
665
- WithdrawEvent.reified = function () {
666
- var _this = this;
667
- return {
668
- typeName: WithdrawEvent.$typeName,
669
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([WithdrawEvent.$typeName], [], false)),
670
- typeArgs: [],
671
- isPhantom: WithdrawEvent.$isPhantom,
672
- reifiedTypeArgs: [],
673
- fromFields: function (fields) { return WithdrawEvent.fromFields(fields); },
674
- fromFieldsWithTypes: function (item) { return WithdrawEvent.fromFieldsWithTypes(item); },
675
- fromBcs: function (data) { return WithdrawEvent.fromBcs(data); },
676
- bcs: WithdrawEvent.bcs,
677
- fromJSONField: function (field) { return WithdrawEvent.fromJSONField(field); },
678
- fromJSON: function (json) { return WithdrawEvent.fromJSON(json); },
679
- fromSuiParsedData: function (content) { return WithdrawEvent.fromSuiParsedData(content); },
680
- fromSuiObjectData: function (content) { return WithdrawEvent.fromSuiObjectData(content); },
681
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
682
- return [2 /*return*/, WithdrawEvent.fetch(client, id)];
683
- }); }); },
684
- new: function (fields) {
685
- return new WithdrawEvent([], fields);
686
- },
687
- kind: "StructClassReified",
688
- };
689
- };
690
- Object.defineProperty(WithdrawEvent, "r", {
691
- get: function () {
692
- return WithdrawEvent.reified();
693
- },
694
- enumerable: false,
695
- configurable: true
696
- });
697
- WithdrawEvent.phantom = function () {
698
- return (0, reified_1.phantom)(WithdrawEvent.reified());
699
- };
700
- Object.defineProperty(WithdrawEvent, "p", {
701
- get: function () {
702
- return WithdrawEvent.phantom();
703
- },
704
- enumerable: false,
705
- configurable: true
706
- });
707
- Object.defineProperty(WithdrawEvent, "bcs", {
708
- get: function () {
709
- return bcs_1.bcs.struct("WithdrawEvent", {
710
- sender: bcs_1.bcs.bytes(32).transform({
711
- input: function (val) { return (0, utils_1.fromHEX)(val); },
712
- output: function (val) { return (0, utils_1.toHEX)(val); },
713
- }),
714
- receiver: bcs_1.bcs.bytes(32).transform({
715
- input: function (val) { return (0, utils_1.fromHEX)(val); },
716
- output: function (val) { return (0, utils_1.toHEX)(val); },
717
- }),
718
- amount: bcs_1.bcs.u64(),
719
- });
720
- },
721
- enumerable: false,
722
- configurable: true
723
- });
724
- WithdrawEvent.fromFields = function (fields) {
725
- return WithdrawEvent.reified().new({
726
- sender: (0, reified_1.decodeFromFields)("address", fields.sender),
727
- receiver: (0, reified_1.decodeFromFields)("address", fields.receiver),
728
- amount: (0, reified_1.decodeFromFields)("u64", fields.amount),
729
- });
730
- };
731
- WithdrawEvent.fromFieldsWithTypes = function (item) {
732
- if (!isWithdrawEvent(item.type)) {
733
- throw new Error("not a WithdrawEvent type");
734
- }
735
- return WithdrawEvent.reified().new({
736
- sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
737
- receiver: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.receiver),
738
- amount: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.amount),
739
- });
740
- };
741
- WithdrawEvent.fromBcs = function (data) {
742
- return WithdrawEvent.fromFields(WithdrawEvent.bcs.parse(data));
743
- };
744
- WithdrawEvent.prototype.toJSONField = function () {
745
- return {
746
- sender: this.sender,
747
- receiver: this.receiver,
748
- amount: this.amount.toString(),
749
- };
750
- };
751
- WithdrawEvent.prototype.toJSON = function () {
752
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
753
- };
754
- WithdrawEvent.fromJSONField = function (field) {
755
- return WithdrawEvent.reified().new({
756
- sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
757
- receiver: (0, reified_1.decodeFromJSONField)("address", field.receiver),
758
- amount: (0, reified_1.decodeFromJSONField)("u64", field.amount),
759
- });
760
- };
761
- WithdrawEvent.fromJSON = function (json) {
762
- if (json.$typeName !== WithdrawEvent.$typeName) {
763
- throw new Error("not a WithTwoGenerics json object");
764
- }
765
- return WithdrawEvent.fromJSONField(json);
766
- };
767
- WithdrawEvent.fromSuiParsedData = function (content) {
768
- if (content.dataType !== "moveObject") {
769
- throw new Error("not an object");
770
- }
771
- if (!isWithdrawEvent(content.type)) {
772
- throw new Error("object at ".concat(content.fields.id, " is not a WithdrawEvent object"));
773
- }
774
- return WithdrawEvent.fromFieldsWithTypes(content);
775
- };
776
- WithdrawEvent.fromSuiObjectData = function (data) {
777
- if (data.bcs) {
778
- if (data.bcs.dataType !== "moveObject" || !isWithdrawEvent(data.bcs.type)) {
779
- throw new Error("object at is not a WithdrawEvent object");
780
- }
781
- return WithdrawEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
782
- }
783
- if (data.content) {
784
- return WithdrawEvent.fromSuiParsedData(data.content);
785
- }
786
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
787
- };
788
- WithdrawEvent.fetch = function (client, id) {
789
- return __awaiter(this, void 0, void 0, function () {
790
- var res;
791
- var _a, _b;
792
- return __generator(this, function (_c) {
793
- switch (_c.label) {
794
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
795
- case 1:
796
- res = _c.sent();
797
- if (res.error) {
798
- throw new Error("error fetching WithdrawEvent object at id ".concat(id, ": ").concat(res.error.code));
799
- }
800
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isWithdrawEvent(res.data.bcs.type)) {
801
- throw new Error("object at id ".concat(id, " is not a WithdrawEvent object"));
802
- }
803
- return [2 /*return*/, WithdrawEvent.fromSuiObjectData(res.data)];
804
- }
805
- });
806
- });
807
- };
808
- WithdrawEvent.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::WithdrawEvent");
809
- WithdrawEvent.$numTypeParams = 0;
810
- WithdrawEvent.$isPhantom = [];
811
- return WithdrawEvent;
812
- }());
813
- exports.WithdrawEvent = WithdrawEvent;
814
- /* ============================== ClaimProfitSharingEventV2 =============================== */
815
- function isClaimProfitSharingEventV2(type) {
816
- type = (0, util_1.compressSuiType)(type);
817
- return type === "".concat(index_1.PKG_V6, "::tails_staking::ClaimProfitSharingEventV2");
818
- }
819
- var ClaimProfitSharingEventV2 = /** @class */ (function () {
820
- function ClaimProfitSharingEventV2(typeArgs, fields) {
821
- this.__StructClass = true;
822
- this.$typeName = ClaimProfitSharingEventV2.$typeName;
823
- this.$isPhantom = ClaimProfitSharingEventV2.$isPhantom;
824
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ClaimProfitSharingEventV2.$typeName], __read(typeArgs), false));
825
- this.$typeArgs = typeArgs;
826
- this.value = fields.value;
827
- this.token = fields.token;
828
- this.sender = fields.sender;
829
- this.nftId = fields.nftId;
830
- this.number = fields.number;
831
- this.level = fields.level;
832
- this.name = fields.name;
833
- }
834
- ClaimProfitSharingEventV2.reified = function () {
835
- var _this = this;
836
- return {
837
- typeName: ClaimProfitSharingEventV2.$typeName,
838
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ClaimProfitSharingEventV2.$typeName], [], false)),
839
- typeArgs: [],
840
- isPhantom: ClaimProfitSharingEventV2.$isPhantom,
841
- reifiedTypeArgs: [],
842
- fromFields: function (fields) { return ClaimProfitSharingEventV2.fromFields(fields); },
843
- fromFieldsWithTypes: function (item) { return ClaimProfitSharingEventV2.fromFieldsWithTypes(item); },
844
- fromBcs: function (data) { return ClaimProfitSharingEventV2.fromBcs(data); },
845
- bcs: ClaimProfitSharingEventV2.bcs,
846
- fromJSONField: function (field) { return ClaimProfitSharingEventV2.fromJSONField(field); },
847
- fromJSON: function (json) { return ClaimProfitSharingEventV2.fromJSON(json); },
848
- fromSuiParsedData: function (content) { return ClaimProfitSharingEventV2.fromSuiParsedData(content); },
849
- fromSuiObjectData: function (content) { return ClaimProfitSharingEventV2.fromSuiObjectData(content); },
850
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
851
- return [2 /*return*/, ClaimProfitSharingEventV2.fetch(client, id)];
852
- }); }); },
853
- new: function (fields) {
854
- return new ClaimProfitSharingEventV2([], fields);
855
- },
856
- kind: "StructClassReified",
857
- };
858
- };
859
- Object.defineProperty(ClaimProfitSharingEventV2, "r", {
860
- get: function () {
861
- return ClaimProfitSharingEventV2.reified();
862
- },
863
- enumerable: false,
864
- configurable: true
865
- });
866
- ClaimProfitSharingEventV2.phantom = function () {
867
- return (0, reified_1.phantom)(ClaimProfitSharingEventV2.reified());
868
- };
869
- Object.defineProperty(ClaimProfitSharingEventV2, "p", {
870
- get: function () {
871
- return ClaimProfitSharingEventV2.phantom();
872
- },
873
- enumerable: false,
874
- configurable: true
875
- });
876
- Object.defineProperty(ClaimProfitSharingEventV2, "bcs", {
877
- get: function () {
878
- return bcs_1.bcs.struct("ClaimProfitSharingEventV2", {
879
- value: bcs_1.bcs.u64(),
880
- token: structs_2.TypeName.bcs,
881
- sender: bcs_1.bcs.bytes(32).transform({
882
- input: function (val) { return (0, utils_1.fromHEX)(val); },
883
- output: function (val) { return (0, utils_1.toHEX)(val); },
884
- }),
885
- nft_id: structs_5.ID.bcs,
886
- number: bcs_1.bcs.u64(),
887
- level: bcs_1.bcs.u64(),
888
- name: structs_1.String.bcs,
889
- });
890
- },
891
- enumerable: false,
892
- configurable: true
893
- });
894
- ClaimProfitSharingEventV2.fromFields = function (fields) {
895
- return ClaimProfitSharingEventV2.reified().new({
896
- value: (0, reified_1.decodeFromFields)("u64", fields.value),
897
- token: (0, reified_1.decodeFromFields)(structs_2.TypeName.reified(), fields.token),
898
- sender: (0, reified_1.decodeFromFields)("address", fields.sender),
899
- nftId: (0, reified_1.decodeFromFields)(structs_5.ID.reified(), fields.nft_id),
900
- number: (0, reified_1.decodeFromFields)("u64", fields.number),
901
- level: (0, reified_1.decodeFromFields)("u64", fields.level),
902
- name: (0, reified_1.decodeFromFields)(structs_1.String.reified(), fields.name),
903
- });
904
- };
905
- ClaimProfitSharingEventV2.fromFieldsWithTypes = function (item) {
906
- if (!isClaimProfitSharingEventV2(item.type)) {
907
- throw new Error("not a ClaimProfitSharingEventV2 type");
908
- }
909
- return ClaimProfitSharingEventV2.reified().new({
910
- value: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.value),
911
- token: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.TypeName.reified(), item.fields.token),
912
- sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
913
- nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.ID.reified(), item.fields.nft_id),
914
- number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
915
- level: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.level),
916
- name: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.String.reified(), item.fields.name),
917
- });
918
- };
919
- ClaimProfitSharingEventV2.fromBcs = function (data) {
920
- return ClaimProfitSharingEventV2.fromFields(ClaimProfitSharingEventV2.bcs.parse(data));
921
- };
922
- ClaimProfitSharingEventV2.prototype.toJSONField = function () {
923
- return {
924
- value: this.value.toString(),
925
- token: this.token.toJSONField(),
926
- sender: this.sender,
927
- nftId: this.nftId,
928
- number: this.number.toString(),
929
- level: this.level.toString(),
930
- name: this.name,
931
- };
932
- };
933
- ClaimProfitSharingEventV2.prototype.toJSON = function () {
934
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
935
- };
936
- ClaimProfitSharingEventV2.fromJSONField = function (field) {
937
- return ClaimProfitSharingEventV2.reified().new({
938
- value: (0, reified_1.decodeFromJSONField)("u64", field.value),
939
- token: (0, reified_1.decodeFromJSONField)(structs_2.TypeName.reified(), field.token),
940
- sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
941
- nftId: (0, reified_1.decodeFromJSONField)(structs_5.ID.reified(), field.nftId),
942
- number: (0, reified_1.decodeFromJSONField)("u64", field.number),
943
- level: (0, reified_1.decodeFromJSONField)("u64", field.level),
944
- name: (0, reified_1.decodeFromJSONField)(structs_1.String.reified(), field.name),
945
- });
946
- };
947
- ClaimProfitSharingEventV2.fromJSON = function (json) {
948
- if (json.$typeName !== ClaimProfitSharingEventV2.$typeName) {
949
- throw new Error("not a WithTwoGenerics json object");
950
- }
951
- return ClaimProfitSharingEventV2.fromJSONField(json);
952
- };
953
- ClaimProfitSharingEventV2.fromSuiParsedData = function (content) {
954
- if (content.dataType !== "moveObject") {
955
- throw new Error("not an object");
956
- }
957
- if (!isClaimProfitSharingEventV2(content.type)) {
958
- throw new Error("object at ".concat(content.fields.id, " is not a ClaimProfitSharingEventV2 object"));
959
- }
960
- return ClaimProfitSharingEventV2.fromFieldsWithTypes(content);
961
- };
962
- ClaimProfitSharingEventV2.fromSuiObjectData = function (data) {
963
- if (data.bcs) {
964
- if (data.bcs.dataType !== "moveObject" || !isClaimProfitSharingEventV2(data.bcs.type)) {
965
- throw new Error("object at is not a ClaimProfitSharingEventV2 object");
966
- }
967
- return ClaimProfitSharingEventV2.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
968
- }
969
- if (data.content) {
970
- return ClaimProfitSharingEventV2.fromSuiParsedData(data.content);
971
- }
972
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
973
- };
974
- ClaimProfitSharingEventV2.fetch = function (client, id) {
975
- return __awaiter(this, void 0, void 0, function () {
976
- var res;
977
- var _a, _b;
978
- return __generator(this, function (_c) {
979
- switch (_c.label) {
980
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
981
- case 1:
982
- res = _c.sent();
983
- if (res.error) {
984
- throw new Error("error fetching ClaimProfitSharingEventV2 object at id ".concat(id, ": ").concat(res.error.code));
985
- }
986
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isClaimProfitSharingEventV2(res.data.bcs.type)) {
987
- throw new Error("object at id ".concat(id, " is not a ClaimProfitSharingEventV2 object"));
988
- }
989
- return [2 /*return*/, ClaimProfitSharingEventV2.fromSuiObjectData(res.data)];
990
- }
991
- });
992
- });
993
- };
994
- ClaimProfitSharingEventV2.$typeName = "".concat(index_1.PKG_V6, "::tails_staking::ClaimProfitSharingEventV2");
995
- ClaimProfitSharingEventV2.$numTypeParams = 0;
996
- ClaimProfitSharingEventV2.$isPhantom = [];
997
- return ClaimProfitSharingEventV2;
998
- }());
999
- exports.ClaimProfitSharingEventV2 = ClaimProfitSharingEventV2;
1000
- /* ============================== DailyAttendEvent =============================== */
1001
- function isDailyAttendEvent(type) {
1002
- type = (0, util_1.compressSuiType)(type);
1003
- return type === "".concat(index_1.PKG_V1, "::tails_staking::DailyAttendEvent");
1004
- }
1005
- var DailyAttendEvent = /** @class */ (function () {
1006
- function DailyAttendEvent(typeArgs, fields) {
1007
- this.__StructClass = true;
1008
- this.$typeName = DailyAttendEvent.$typeName;
1009
- this.$isPhantom = DailyAttendEvent.$isPhantom;
1010
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([DailyAttendEvent.$typeName], __read(typeArgs), false));
1011
- this.$typeArgs = typeArgs;
1012
- this.sender = fields.sender;
1013
- this.nftId = fields.nftId;
1014
- this.number = fields.number;
1015
- this.tsMs = fields.tsMs;
1016
- this.expEarn = fields.expEarn;
1017
- }
1018
- DailyAttendEvent.reified = function () {
1019
- var _this = this;
1020
- return {
1021
- typeName: DailyAttendEvent.$typeName,
1022
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([DailyAttendEvent.$typeName], [], false)),
1023
- typeArgs: [],
1024
- isPhantom: DailyAttendEvent.$isPhantom,
1025
- reifiedTypeArgs: [],
1026
- fromFields: function (fields) { return DailyAttendEvent.fromFields(fields); },
1027
- fromFieldsWithTypes: function (item) { return DailyAttendEvent.fromFieldsWithTypes(item); },
1028
- fromBcs: function (data) { return DailyAttendEvent.fromBcs(data); },
1029
- bcs: DailyAttendEvent.bcs,
1030
- fromJSONField: function (field) { return DailyAttendEvent.fromJSONField(field); },
1031
- fromJSON: function (json) { return DailyAttendEvent.fromJSON(json); },
1032
- fromSuiParsedData: function (content) { return DailyAttendEvent.fromSuiParsedData(content); },
1033
- fromSuiObjectData: function (content) { return DailyAttendEvent.fromSuiObjectData(content); },
1034
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1035
- return [2 /*return*/, DailyAttendEvent.fetch(client, id)];
1036
- }); }); },
1037
- new: function (fields) {
1038
- return new DailyAttendEvent([], fields);
1039
- },
1040
- kind: "StructClassReified",
1041
- };
1042
- };
1043
- Object.defineProperty(DailyAttendEvent, "r", {
1044
- get: function () {
1045
- return DailyAttendEvent.reified();
1046
- },
1047
- enumerable: false,
1048
- configurable: true
1049
- });
1050
- DailyAttendEvent.phantom = function () {
1051
- return (0, reified_1.phantom)(DailyAttendEvent.reified());
1052
- };
1053
- Object.defineProperty(DailyAttendEvent, "p", {
1054
- get: function () {
1055
- return DailyAttendEvent.phantom();
1056
- },
1057
- enumerable: false,
1058
- configurable: true
1059
- });
1060
- Object.defineProperty(DailyAttendEvent, "bcs", {
1061
- get: function () {
1062
- return bcs_1.bcs.struct("DailyAttendEvent", {
1063
- sender: bcs_1.bcs.bytes(32).transform({
1064
- input: function (val) { return (0, utils_1.fromHEX)(val); },
1065
- output: function (val) { return (0, utils_1.toHEX)(val); },
1066
- }),
1067
- nft_id: structs_5.ID.bcs,
1068
- number: bcs_1.bcs.u64(),
1069
- ts_ms: bcs_1.bcs.u64(),
1070
- exp_earn: bcs_1.bcs.u64(),
1071
- });
1072
- },
1073
- enumerable: false,
1074
- configurable: true
1075
- });
1076
- DailyAttendEvent.fromFields = function (fields) {
1077
- return DailyAttendEvent.reified().new({
1078
- sender: (0, reified_1.decodeFromFields)("address", fields.sender),
1079
- nftId: (0, reified_1.decodeFromFields)(structs_5.ID.reified(), fields.nft_id),
1080
- number: (0, reified_1.decodeFromFields)("u64", fields.number),
1081
- tsMs: (0, reified_1.decodeFromFields)("u64", fields.ts_ms),
1082
- expEarn: (0, reified_1.decodeFromFields)("u64", fields.exp_earn),
1083
- });
1084
- };
1085
- DailyAttendEvent.fromFieldsWithTypes = function (item) {
1086
- if (!isDailyAttendEvent(item.type)) {
1087
- throw new Error("not a DailyAttendEvent type");
1088
- }
1089
- return DailyAttendEvent.reified().new({
1090
- sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
1091
- nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.ID.reified(), item.fields.nft_id),
1092
- number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
1093
- tsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.ts_ms),
1094
- expEarn: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.exp_earn),
1095
- });
1096
- };
1097
- DailyAttendEvent.fromBcs = function (data) {
1098
- return DailyAttendEvent.fromFields(DailyAttendEvent.bcs.parse(data));
1099
- };
1100
- DailyAttendEvent.prototype.toJSONField = function () {
1101
- return {
1102
- sender: this.sender,
1103
- nftId: this.nftId,
1104
- number: this.number.toString(),
1105
- tsMs: this.tsMs.toString(),
1106
- expEarn: this.expEarn.toString(),
1107
- };
1108
- };
1109
- DailyAttendEvent.prototype.toJSON = function () {
1110
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1111
- };
1112
- DailyAttendEvent.fromJSONField = function (field) {
1113
- return DailyAttendEvent.reified().new({
1114
- sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
1115
- nftId: (0, reified_1.decodeFromJSONField)(structs_5.ID.reified(), field.nftId),
1116
- number: (0, reified_1.decodeFromJSONField)("u64", field.number),
1117
- tsMs: (0, reified_1.decodeFromJSONField)("u64", field.tsMs),
1118
- expEarn: (0, reified_1.decodeFromJSONField)("u64", field.expEarn),
1119
- });
1120
- };
1121
- DailyAttendEvent.fromJSON = function (json) {
1122
- if (json.$typeName !== DailyAttendEvent.$typeName) {
1123
- throw new Error("not a WithTwoGenerics json object");
1124
- }
1125
- return DailyAttendEvent.fromJSONField(json);
1126
- };
1127
- DailyAttendEvent.fromSuiParsedData = function (content) {
1128
- if (content.dataType !== "moveObject") {
1129
- throw new Error("not an object");
1130
- }
1131
- if (!isDailyAttendEvent(content.type)) {
1132
- throw new Error("object at ".concat(content.fields.id, " is not a DailyAttendEvent object"));
1133
- }
1134
- return DailyAttendEvent.fromFieldsWithTypes(content);
1135
- };
1136
- DailyAttendEvent.fromSuiObjectData = function (data) {
1137
- if (data.bcs) {
1138
- if (data.bcs.dataType !== "moveObject" || !isDailyAttendEvent(data.bcs.type)) {
1139
- throw new Error("object at is not a DailyAttendEvent object");
1140
- }
1141
- return DailyAttendEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1142
- }
1143
- if (data.content) {
1144
- return DailyAttendEvent.fromSuiParsedData(data.content);
1145
- }
1146
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1147
- };
1148
- DailyAttendEvent.fetch = function (client, id) {
1149
- return __awaiter(this, void 0, void 0, function () {
1150
- var res;
1151
- var _a, _b;
1152
- return __generator(this, function (_c) {
1153
- switch (_c.label) {
1154
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1155
- case 1:
1156
- res = _c.sent();
1157
- if (res.error) {
1158
- throw new Error("error fetching DailyAttendEvent object at id ".concat(id, ": ").concat(res.error.code));
1159
- }
1160
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isDailyAttendEvent(res.data.bcs.type)) {
1161
- throw new Error("object at id ".concat(id, " is not a DailyAttendEvent object"));
1162
- }
1163
- return [2 /*return*/, DailyAttendEvent.fromSuiObjectData(res.data)];
1164
- }
1165
- });
1166
- });
1167
- };
1168
- DailyAttendEvent.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::DailyAttendEvent");
1169
- DailyAttendEvent.$numTypeParams = 0;
1170
- DailyAttendEvent.$isPhantom = [];
1171
- return DailyAttendEvent;
1172
- }());
1173
- exports.DailyAttendEvent = DailyAttendEvent;
1174
- /* ============================== Partner =============================== */
1175
- function isPartner(type) {
1176
- type = (0, util_1.compressSuiType)(type);
1177
- return type === "".concat(index_1.PKG_V1, "::tails_staking::Partner");
1178
- }
1179
- var Partner = /** @class */ (function () {
1180
- function Partner(typeArgs, fields) {
1181
- this.__StructClass = true;
1182
- this.$typeName = Partner.$typeName;
1183
- this.$isPhantom = Partner.$isPhantom;
1184
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Partner.$typeName], __read(typeArgs), false));
1185
- this.$typeArgs = typeArgs;
1186
- this.id = fields.id;
1187
- this.expAllocation = fields.expAllocation;
1188
- this.partnerTraits = fields.partnerTraits;
1189
- }
1190
- Partner.reified = function () {
1191
- var _this = this;
1192
- return {
1193
- typeName: Partner.$typeName,
1194
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Partner.$typeName], [], false)),
1195
- typeArgs: [],
1196
- isPhantom: Partner.$isPhantom,
1197
- reifiedTypeArgs: [],
1198
- fromFields: function (fields) { return Partner.fromFields(fields); },
1199
- fromFieldsWithTypes: function (item) { return Partner.fromFieldsWithTypes(item); },
1200
- fromBcs: function (data) { return Partner.fromBcs(data); },
1201
- bcs: Partner.bcs,
1202
- fromJSONField: function (field) { return Partner.fromJSONField(field); },
1203
- fromJSON: function (json) { return Partner.fromJSON(json); },
1204
- fromSuiParsedData: function (content) { return Partner.fromSuiParsedData(content); },
1205
- fromSuiObjectData: function (content) { return Partner.fromSuiObjectData(content); },
1206
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1207
- return [2 /*return*/, Partner.fetch(client, id)];
1208
- }); }); },
1209
- new: function (fields) {
1210
- return new Partner([], fields);
1211
- },
1212
- kind: "StructClassReified",
1213
- };
1214
- };
1215
- Object.defineProperty(Partner, "r", {
1216
- get: function () {
1217
- return Partner.reified();
1218
- },
1219
- enumerable: false,
1220
- configurable: true
1221
- });
1222
- Partner.phantom = function () {
1223
- return (0, reified_1.phantom)(Partner.reified());
1224
- };
1225
- Object.defineProperty(Partner, "p", {
1226
- get: function () {
1227
- return Partner.phantom();
1228
- },
1229
- enumerable: false,
1230
- configurable: true
1231
- });
1232
- Object.defineProperty(Partner, "bcs", {
1233
- get: function () {
1234
- return bcs_1.bcs.struct("Partner", {
1235
- id: structs_5.UID.bcs,
1236
- exp_allocation: bcs_1.bcs.u64(),
1237
- partner_traits: structs_8.VecMap.bcs(structs_1.String.bcs, structs_1.String.bcs),
1238
- });
1239
- },
1240
- enumerable: false,
1241
- configurable: true
1242
- });
1243
- Partner.fromFields = function (fields) {
1244
- return Partner.reified().new({
1245
- id: (0, reified_1.decodeFromFields)(structs_5.UID.reified(), fields.id),
1246
- expAllocation: (0, reified_1.decodeFromFields)("u64", fields.exp_allocation),
1247
- partnerTraits: (0, reified_1.decodeFromFields)(structs_8.VecMap.reified(structs_1.String.reified(), structs_1.String.reified()), fields.partner_traits),
1248
- });
1249
- };
1250
- Partner.fromFieldsWithTypes = function (item) {
1251
- if (!isPartner(item.type)) {
1252
- throw new Error("not a Partner type");
1253
- }
1254
- return Partner.reified().new({
1255
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.UID.reified(), item.fields.id),
1256
- expAllocation: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.exp_allocation),
1257
- partnerTraits: (0, reified_1.decodeFromFieldsWithTypes)(structs_8.VecMap.reified(structs_1.String.reified(), structs_1.String.reified()), item.fields.partner_traits),
1258
- });
1259
- };
1260
- Partner.fromBcs = function (data) {
1261
- return Partner.fromFields(Partner.bcs.parse(data));
1262
- };
1263
- Partner.prototype.toJSONField = function () {
1264
- return {
1265
- id: this.id,
1266
- expAllocation: this.expAllocation.toString(),
1267
- partnerTraits: this.partnerTraits.toJSONField(),
1268
- };
1269
- };
1270
- Partner.prototype.toJSON = function () {
1271
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1272
- };
1273
- Partner.fromJSONField = function (field) {
1274
- return Partner.reified().new({
1275
- id: (0, reified_1.decodeFromJSONField)(structs_5.UID.reified(), field.id),
1276
- expAllocation: (0, reified_1.decodeFromJSONField)("u64", field.expAllocation),
1277
- partnerTraits: (0, reified_1.decodeFromJSONField)(structs_8.VecMap.reified(structs_1.String.reified(), structs_1.String.reified()), field.partnerTraits),
1278
- });
1279
- };
1280
- Partner.fromJSON = function (json) {
1281
- if (json.$typeName !== Partner.$typeName) {
1282
- throw new Error("not a WithTwoGenerics json object");
1283
- }
1284
- return Partner.fromJSONField(json);
1285
- };
1286
- Partner.fromSuiParsedData = function (content) {
1287
- if (content.dataType !== "moveObject") {
1288
- throw new Error("not an object");
1289
- }
1290
- if (!isPartner(content.type)) {
1291
- throw new Error("object at ".concat(content.fields.id, " is not a Partner object"));
1292
- }
1293
- return Partner.fromFieldsWithTypes(content);
1294
- };
1295
- Partner.fromSuiObjectData = function (data) {
1296
- if (data.bcs) {
1297
- if (data.bcs.dataType !== "moveObject" || !isPartner(data.bcs.type)) {
1298
- throw new Error("object at is not a Partner object");
1299
- }
1300
- return Partner.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1301
- }
1302
- if (data.content) {
1303
- return Partner.fromSuiParsedData(data.content);
1304
- }
1305
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1306
- };
1307
- Partner.fetch = function (client, id) {
1308
- return __awaiter(this, void 0, void 0, function () {
1309
- var res;
1310
- var _a, _b;
1311
- return __generator(this, function (_c) {
1312
- switch (_c.label) {
1313
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1314
- case 1:
1315
- res = _c.sent();
1316
- if (res.error) {
1317
- throw new Error("error fetching Partner object at id ".concat(id, ": ").concat(res.error.code));
1318
- }
1319
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isPartner(res.data.bcs.type)) {
1320
- throw new Error("object at id ".concat(id, " is not a Partner object"));
1321
- }
1322
- return [2 /*return*/, Partner.fromSuiObjectData(res.data)];
1323
- }
1324
- });
1325
- });
1326
- };
1327
- Partner.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::Partner");
1328
- Partner.$numTypeParams = 0;
1329
- Partner.$isPhantom = [];
1330
- return Partner;
1331
- }());
1332
- exports.Partner = Partner;
1333
- /* ============================== PartnerKey =============================== */
1334
- function isPartnerKey(type) {
1335
- type = (0, util_1.compressSuiType)(type);
1336
- return type === "".concat(index_1.PKG_V1, "::tails_staking::PartnerKey");
1337
- }
1338
- var PartnerKey = /** @class */ (function () {
1339
- function PartnerKey(typeArgs, fields) {
1340
- this.__StructClass = true;
1341
- this.$typeName = PartnerKey.$typeName;
1342
- this.$isPhantom = PartnerKey.$isPhantom;
1343
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([PartnerKey.$typeName], __read(typeArgs), false));
1344
- this.$typeArgs = typeArgs;
1345
- this.id = fields.id;
1346
- this.for = fields.for;
1347
- this.partner = fields.partner;
1348
- }
1349
- PartnerKey.reified = function () {
1350
- var _this = this;
1351
- return {
1352
- typeName: PartnerKey.$typeName,
1353
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([PartnerKey.$typeName], [], false)),
1354
- typeArgs: [],
1355
- isPhantom: PartnerKey.$isPhantom,
1356
- reifiedTypeArgs: [],
1357
- fromFields: function (fields) { return PartnerKey.fromFields(fields); },
1358
- fromFieldsWithTypes: function (item) { return PartnerKey.fromFieldsWithTypes(item); },
1359
- fromBcs: function (data) { return PartnerKey.fromBcs(data); },
1360
- bcs: PartnerKey.bcs,
1361
- fromJSONField: function (field) { return PartnerKey.fromJSONField(field); },
1362
- fromJSON: function (json) { return PartnerKey.fromJSON(json); },
1363
- fromSuiParsedData: function (content) { return PartnerKey.fromSuiParsedData(content); },
1364
- fromSuiObjectData: function (content) { return PartnerKey.fromSuiObjectData(content); },
1365
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1366
- return [2 /*return*/, PartnerKey.fetch(client, id)];
1367
- }); }); },
1368
- new: function (fields) {
1369
- return new PartnerKey([], fields);
1370
- },
1371
- kind: "StructClassReified",
1372
- };
1373
- };
1374
- Object.defineProperty(PartnerKey, "r", {
1375
- get: function () {
1376
- return PartnerKey.reified();
1377
- },
1378
- enumerable: false,
1379
- configurable: true
1380
- });
1381
- PartnerKey.phantom = function () {
1382
- return (0, reified_1.phantom)(PartnerKey.reified());
1383
- };
1384
- Object.defineProperty(PartnerKey, "p", {
1385
- get: function () {
1386
- return PartnerKey.phantom();
1387
- },
1388
- enumerable: false,
1389
- configurable: true
1390
- });
1391
- Object.defineProperty(PartnerKey, "bcs", {
1392
- get: function () {
1393
- return bcs_1.bcs.struct("PartnerKey", {
1394
- id: structs_5.UID.bcs,
1395
- for: structs_5.ID.bcs,
1396
- partner: structs_1.String.bcs,
1397
- });
1398
- },
1399
- enumerable: false,
1400
- configurable: true
1401
- });
1402
- PartnerKey.fromFields = function (fields) {
1403
- return PartnerKey.reified().new({
1404
- id: (0, reified_1.decodeFromFields)(structs_5.UID.reified(), fields.id),
1405
- for: (0, reified_1.decodeFromFields)(structs_5.ID.reified(), fields.for),
1406
- partner: (0, reified_1.decodeFromFields)(structs_1.String.reified(), fields.partner),
1407
- });
1408
- };
1409
- PartnerKey.fromFieldsWithTypes = function (item) {
1410
- if (!isPartnerKey(item.type)) {
1411
- throw new Error("not a PartnerKey type");
1412
- }
1413
- return PartnerKey.reified().new({
1414
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.UID.reified(), item.fields.id),
1415
- for: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.ID.reified(), item.fields.for),
1416
- partner: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.String.reified(), item.fields.partner),
1417
- });
1418
- };
1419
- PartnerKey.fromBcs = function (data) {
1420
- return PartnerKey.fromFields(PartnerKey.bcs.parse(data));
1421
- };
1422
- PartnerKey.prototype.toJSONField = function () {
1423
- return {
1424
- id: this.id,
1425
- for: this.for,
1426
- partner: this.partner,
1427
- };
1428
- };
1429
- PartnerKey.prototype.toJSON = function () {
1430
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1431
- };
1432
- PartnerKey.fromJSONField = function (field) {
1433
- return PartnerKey.reified().new({
1434
- id: (0, reified_1.decodeFromJSONField)(structs_5.UID.reified(), field.id),
1435
- for: (0, reified_1.decodeFromJSONField)(structs_5.ID.reified(), field.for),
1436
- partner: (0, reified_1.decodeFromJSONField)(structs_1.String.reified(), field.partner),
1437
- });
1438
- };
1439
- PartnerKey.fromJSON = function (json) {
1440
- if (json.$typeName !== PartnerKey.$typeName) {
1441
- throw new Error("not a WithTwoGenerics json object");
1442
- }
1443
- return PartnerKey.fromJSONField(json);
1444
- };
1445
- PartnerKey.fromSuiParsedData = function (content) {
1446
- if (content.dataType !== "moveObject") {
1447
- throw new Error("not an object");
1448
- }
1449
- if (!isPartnerKey(content.type)) {
1450
- throw new Error("object at ".concat(content.fields.id, " is not a PartnerKey object"));
1451
- }
1452
- return PartnerKey.fromFieldsWithTypes(content);
1453
- };
1454
- PartnerKey.fromSuiObjectData = function (data) {
1455
- if (data.bcs) {
1456
- if (data.bcs.dataType !== "moveObject" || !isPartnerKey(data.bcs.type)) {
1457
- throw new Error("object at is not a PartnerKey object");
1458
- }
1459
- return PartnerKey.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1460
- }
1461
- if (data.content) {
1462
- return PartnerKey.fromSuiParsedData(data.content);
1463
- }
1464
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1465
- };
1466
- PartnerKey.fetch = function (client, id) {
1467
- return __awaiter(this, void 0, void 0, function () {
1468
- var res;
1469
- var _a, _b;
1470
- return __generator(this, function (_c) {
1471
- switch (_c.label) {
1472
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1473
- case 1:
1474
- res = _c.sent();
1475
- if (res.error) {
1476
- throw new Error("error fetching PartnerKey object at id ".concat(id, ": ").concat(res.error.code));
1477
- }
1478
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isPartnerKey(res.data.bcs.type)) {
1479
- throw new Error("object at id ".concat(id, " is not a PartnerKey object"));
1480
- }
1481
- return [2 /*return*/, PartnerKey.fromSuiObjectData(res.data)];
1482
- }
1483
- });
1484
- });
1485
- };
1486
- PartnerKey.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::PartnerKey");
1487
- PartnerKey.$numTypeParams = 0;
1488
- PartnerKey.$isPhantom = [];
1489
- return PartnerKey;
1490
- }());
1491
- exports.PartnerKey = PartnerKey;
1492
- /* ============================== ProfitSharing =============================== */
1493
- function isProfitSharing(type) {
1494
- type = (0, util_1.compressSuiType)(type);
1495
- return type.startsWith("".concat(index_1.PKG_V1, "::tails_staking::ProfitSharing") + "<");
1496
- }
1497
- var ProfitSharing = /** @class */ (function () {
1498
- function ProfitSharing(typeArgs, fields) {
1499
- this.__StructClass = true;
1500
- this.$typeName = ProfitSharing.$typeName;
1501
- this.$isPhantom = ProfitSharing.$isPhantom;
1502
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ProfitSharing.$typeName], __read(typeArgs), false));
1503
- this.$typeArgs = typeArgs;
1504
- this.levelProfits = fields.levelProfits;
1505
- this.levelUsers = fields.levelUsers;
1506
- this.total = fields.total;
1507
- this.remaining = fields.remaining;
1508
- this.pool = fields.pool;
1509
- }
1510
- ProfitSharing.reified = function (TOKEN) {
1511
- var _this = this;
1512
- return {
1513
- typeName: ProfitSharing.$typeName,
1514
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ProfitSharing.$typeName], [(0, reified_1.extractType)(TOKEN)], false)),
1515
- typeArgs: [(0, reified_1.extractType)(TOKEN)],
1516
- isPhantom: ProfitSharing.$isPhantom,
1517
- reifiedTypeArgs: [TOKEN],
1518
- fromFields: function (fields) { return ProfitSharing.fromFields(TOKEN, fields); },
1519
- fromFieldsWithTypes: function (item) { return ProfitSharing.fromFieldsWithTypes(TOKEN, item); },
1520
- fromBcs: function (data) { return ProfitSharing.fromBcs(TOKEN, data); },
1521
- bcs: ProfitSharing.bcs,
1522
- fromJSONField: function (field) { return ProfitSharing.fromJSONField(TOKEN, field); },
1523
- fromJSON: function (json) { return ProfitSharing.fromJSON(TOKEN, json); },
1524
- fromSuiParsedData: function (content) { return ProfitSharing.fromSuiParsedData(TOKEN, content); },
1525
- fromSuiObjectData: function (content) { return ProfitSharing.fromSuiObjectData(TOKEN, content); },
1526
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1527
- return [2 /*return*/, ProfitSharing.fetch(client, TOKEN, id)];
1528
- }); }); },
1529
- new: function (fields) {
1530
- return new ProfitSharing([(0, reified_1.extractType)(TOKEN)], fields);
1531
- },
1532
- kind: "StructClassReified",
1533
- };
1534
- };
1535
- Object.defineProperty(ProfitSharing, "r", {
1536
- get: function () {
1537
- return ProfitSharing.reified;
1538
- },
1539
- enumerable: false,
1540
- configurable: true
1541
- });
1542
- ProfitSharing.phantom = function (TOKEN) {
1543
- return (0, reified_1.phantom)(ProfitSharing.reified(TOKEN));
1544
- };
1545
- Object.defineProperty(ProfitSharing, "p", {
1546
- get: function () {
1547
- return ProfitSharing.phantom;
1548
- },
1549
- enumerable: false,
1550
- configurable: true
1551
- });
1552
- Object.defineProperty(ProfitSharing, "bcs", {
1553
- get: function () {
1554
- return bcs_1.bcs.struct("ProfitSharing", {
1555
- level_profits: bcs_1.bcs.vector(bcs_1.bcs.u64()),
1556
- level_users: bcs_1.bcs.vector(bcs_1.bcs.u64()),
1557
- total: bcs_1.bcs.u64(),
1558
- remaining: bcs_1.bcs.u64(),
1559
- pool: structs_3.Balance.bcs,
1560
- });
1561
- },
1562
- enumerable: false,
1563
- configurable: true
1564
- });
1565
- ProfitSharing.fromFields = function (typeArg, fields) {
1566
- return ProfitSharing.reified(typeArg).new({
1567
- levelProfits: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.level_profits),
1568
- levelUsers: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.level_users),
1569
- total: (0, reified_1.decodeFromFields)("u64", fields.total),
1570
- remaining: (0, reified_1.decodeFromFields)("u64", fields.remaining),
1571
- pool: (0, reified_1.decodeFromFields)(structs_3.Balance.reified(typeArg), fields.pool),
1572
- });
1573
- };
1574
- ProfitSharing.fromFieldsWithTypes = function (typeArg, item) {
1575
- if (!isProfitSharing(item.type)) {
1576
- throw new Error("not a ProfitSharing type");
1577
- }
1578
- (0, reified_1.assertFieldsWithTypesArgsMatch)(item, [typeArg]);
1579
- return ProfitSharing.reified(typeArg).new({
1580
- levelProfits: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.level_profits),
1581
- levelUsers: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.level_users),
1582
- total: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.total),
1583
- remaining: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.remaining),
1584
- pool: (0, reified_1.decodeFromFieldsWithTypes)(structs_3.Balance.reified(typeArg), item.fields.pool),
1585
- });
1586
- };
1587
- ProfitSharing.fromBcs = function (typeArg, data) {
1588
- return ProfitSharing.fromFields(typeArg, ProfitSharing.bcs.parse(data));
1589
- };
1590
- ProfitSharing.prototype.toJSONField = function () {
1591
- return {
1592
- levelProfits: (0, reified_1.fieldToJSON)("vector<u64>", this.levelProfits),
1593
- levelUsers: (0, reified_1.fieldToJSON)("vector<u64>", this.levelUsers),
1594
- total: this.total.toString(),
1595
- remaining: this.remaining.toString(),
1596
- pool: this.pool.toJSONField(),
1597
- };
1598
- };
1599
- ProfitSharing.prototype.toJSON = function () {
1600
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1601
- };
1602
- ProfitSharing.fromJSONField = function (typeArg, field) {
1603
- return ProfitSharing.reified(typeArg).new({
1604
- levelProfits: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.levelProfits),
1605
- levelUsers: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.levelUsers),
1606
- total: (0, reified_1.decodeFromJSONField)("u64", field.total),
1607
- remaining: (0, reified_1.decodeFromJSONField)("u64", field.remaining),
1608
- pool: (0, reified_1.decodeFromJSONField)(structs_3.Balance.reified(typeArg), field.pool),
1609
- });
1610
- };
1611
- ProfitSharing.fromJSON = function (typeArg, json) {
1612
- if (json.$typeName !== ProfitSharing.$typeName) {
1613
- throw new Error("not a WithTwoGenerics json object");
1614
- }
1615
- (0, reified_1.assertReifiedTypeArgsMatch)((0, util_1.composeSuiType)(ProfitSharing.$typeName, (0, reified_1.extractType)(typeArg)), json.$typeArgs, [typeArg]);
1616
- return ProfitSharing.fromJSONField(typeArg, json);
1617
- };
1618
- ProfitSharing.fromSuiParsedData = function (typeArg, content) {
1619
- if (content.dataType !== "moveObject") {
1620
- throw new Error("not an object");
1621
- }
1622
- if (!isProfitSharing(content.type)) {
1623
- throw new Error("object at ".concat(content.fields.id, " is not a ProfitSharing object"));
1624
- }
1625
- return ProfitSharing.fromFieldsWithTypes(typeArg, content);
1626
- };
1627
- ProfitSharing.fromSuiObjectData = function (typeArg, data) {
1628
- if (data.bcs) {
1629
- if (data.bcs.dataType !== "moveObject" || !isProfitSharing(data.bcs.type)) {
1630
- throw new Error("object at is not a ProfitSharing object");
1631
- }
1632
- var gotTypeArgs = (0, util_1.parseTypeName)(data.bcs.type).typeArgs;
1633
- if (gotTypeArgs.length !== 1) {
1634
- throw new Error("type argument mismatch: expected 1 type argument but got '".concat(gotTypeArgs.length, "'"));
1635
- }
1636
- var gotTypeArg = (0, util_1.compressSuiType)(gotTypeArgs[0]);
1637
- var expectedTypeArg = (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg));
1638
- if (gotTypeArg !== (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg))) {
1639
- throw new Error("type argument mismatch: expected '".concat(expectedTypeArg, "' but got '").concat(gotTypeArg, "'"));
1640
- }
1641
- return ProfitSharing.fromBcs(typeArg, (0, utils_1.fromB64)(data.bcs.bcsBytes));
1642
- }
1643
- if (data.content) {
1644
- return ProfitSharing.fromSuiParsedData(typeArg, data.content);
1645
- }
1646
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1647
- };
1648
- ProfitSharing.fetch = function (client, typeArg, id) {
1649
- return __awaiter(this, void 0, void 0, function () {
1650
- var res;
1651
- var _a, _b;
1652
- return __generator(this, function (_c) {
1653
- switch (_c.label) {
1654
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1655
- case 1:
1656
- res = _c.sent();
1657
- if (res.error) {
1658
- throw new Error("error fetching ProfitSharing object at id ".concat(id, ": ").concat(res.error.code));
1659
- }
1660
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isProfitSharing(res.data.bcs.type)) {
1661
- throw new Error("object at id ".concat(id, " is not a ProfitSharing object"));
1662
- }
1663
- return [2 /*return*/, ProfitSharing.fromSuiObjectData(typeArg, res.data)];
1664
- }
1665
- });
1666
- });
1667
- };
1668
- ProfitSharing.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::ProfitSharing");
1669
- ProfitSharing.$numTypeParams = 1;
1670
- ProfitSharing.$isPhantom = [true];
1671
- return ProfitSharing;
1672
- }());
1673
- exports.ProfitSharing = ProfitSharing;
1674
- /* ============================== ProfitSharingEvent =============================== */
1675
- function isProfitSharingEvent(type) {
1676
- type = (0, util_1.compressSuiType)(type);
1677
- return type === "".concat(index_1.PKG_V1, "::tails_staking::ProfitSharingEvent");
1678
- }
1679
- var ProfitSharingEvent = /** @class */ (function () {
1680
- function ProfitSharingEvent(typeArgs, fields) {
1681
- this.__StructClass = true;
1682
- this.$typeName = ProfitSharingEvent.$typeName;
1683
- this.$isPhantom = ProfitSharingEvent.$isPhantom;
1684
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ProfitSharingEvent.$typeName], __read(typeArgs), false));
1685
- this.$typeArgs = typeArgs;
1686
- this.levelProfits = fields.levelProfits;
1687
- this.value = fields.value;
1688
- this.token = fields.token;
1689
- }
1690
- ProfitSharingEvent.reified = function () {
1691
- var _this = this;
1692
- return {
1693
- typeName: ProfitSharingEvent.$typeName,
1694
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ProfitSharingEvent.$typeName], [], false)),
1695
- typeArgs: [],
1696
- isPhantom: ProfitSharingEvent.$isPhantom,
1697
- reifiedTypeArgs: [],
1698
- fromFields: function (fields) { return ProfitSharingEvent.fromFields(fields); },
1699
- fromFieldsWithTypes: function (item) { return ProfitSharingEvent.fromFieldsWithTypes(item); },
1700
- fromBcs: function (data) { return ProfitSharingEvent.fromBcs(data); },
1701
- bcs: ProfitSharingEvent.bcs,
1702
- fromJSONField: function (field) { return ProfitSharingEvent.fromJSONField(field); },
1703
- fromJSON: function (json) { return ProfitSharingEvent.fromJSON(json); },
1704
- fromSuiParsedData: function (content) { return ProfitSharingEvent.fromSuiParsedData(content); },
1705
- fromSuiObjectData: function (content) { return ProfitSharingEvent.fromSuiObjectData(content); },
1706
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1707
- return [2 /*return*/, ProfitSharingEvent.fetch(client, id)];
1708
- }); }); },
1709
- new: function (fields) {
1710
- return new ProfitSharingEvent([], fields);
1711
- },
1712
- kind: "StructClassReified",
1713
- };
1714
- };
1715
- Object.defineProperty(ProfitSharingEvent, "r", {
1716
- get: function () {
1717
- return ProfitSharingEvent.reified();
1718
- },
1719
- enumerable: false,
1720
- configurable: true
1721
- });
1722
- ProfitSharingEvent.phantom = function () {
1723
- return (0, reified_1.phantom)(ProfitSharingEvent.reified());
1724
- };
1725
- Object.defineProperty(ProfitSharingEvent, "p", {
1726
- get: function () {
1727
- return ProfitSharingEvent.phantom();
1728
- },
1729
- enumerable: false,
1730
- configurable: true
1731
- });
1732
- Object.defineProperty(ProfitSharingEvent, "bcs", {
1733
- get: function () {
1734
- return bcs_1.bcs.struct("ProfitSharingEvent", {
1735
- level_profits: bcs_1.bcs.vector(bcs_1.bcs.u64()),
1736
- value: bcs_1.bcs.u64(),
1737
- token: structs_2.TypeName.bcs,
1738
- });
1739
- },
1740
- enumerable: false,
1741
- configurable: true
1742
- });
1743
- ProfitSharingEvent.fromFields = function (fields) {
1744
- return ProfitSharingEvent.reified().new({
1745
- levelProfits: (0, reified_1.decodeFromFields)(reified.vector("u64"), fields.level_profits),
1746
- value: (0, reified_1.decodeFromFields)("u64", fields.value),
1747
- token: (0, reified_1.decodeFromFields)(structs_2.TypeName.reified(), fields.token),
1748
- });
1749
- };
1750
- ProfitSharingEvent.fromFieldsWithTypes = function (item) {
1751
- if (!isProfitSharingEvent(item.type)) {
1752
- throw new Error("not a ProfitSharingEvent type");
1753
- }
1754
- return ProfitSharingEvent.reified().new({
1755
- levelProfits: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u64"), item.fields.level_profits),
1756
- value: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.value),
1757
- token: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.TypeName.reified(), item.fields.token),
1758
- });
1759
- };
1760
- ProfitSharingEvent.fromBcs = function (data) {
1761
- return ProfitSharingEvent.fromFields(ProfitSharingEvent.bcs.parse(data));
1762
- };
1763
- ProfitSharingEvent.prototype.toJSONField = function () {
1764
- return {
1765
- levelProfits: (0, reified_1.fieldToJSON)("vector<u64>", this.levelProfits),
1766
- value: this.value.toString(),
1767
- token: this.token.toJSONField(),
1768
- };
1769
- };
1770
- ProfitSharingEvent.prototype.toJSON = function () {
1771
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1772
- };
1773
- ProfitSharingEvent.fromJSONField = function (field) {
1774
- return ProfitSharingEvent.reified().new({
1775
- levelProfits: (0, reified_1.decodeFromJSONField)(reified.vector("u64"), field.levelProfits),
1776
- value: (0, reified_1.decodeFromJSONField)("u64", field.value),
1777
- token: (0, reified_1.decodeFromJSONField)(structs_2.TypeName.reified(), field.token),
1778
- });
1779
- };
1780
- ProfitSharingEvent.fromJSON = function (json) {
1781
- if (json.$typeName !== ProfitSharingEvent.$typeName) {
1782
- throw new Error("not a WithTwoGenerics json object");
1783
- }
1784
- return ProfitSharingEvent.fromJSONField(json);
1785
- };
1786
- ProfitSharingEvent.fromSuiParsedData = function (content) {
1787
- if (content.dataType !== "moveObject") {
1788
- throw new Error("not an object");
1789
- }
1790
- if (!isProfitSharingEvent(content.type)) {
1791
- throw new Error("object at ".concat(content.fields.id, " is not a ProfitSharingEvent object"));
1792
- }
1793
- return ProfitSharingEvent.fromFieldsWithTypes(content);
1794
- };
1795
- ProfitSharingEvent.fromSuiObjectData = function (data) {
1796
- if (data.bcs) {
1797
- if (data.bcs.dataType !== "moveObject" || !isProfitSharingEvent(data.bcs.type)) {
1798
- throw new Error("object at is not a ProfitSharingEvent object");
1799
- }
1800
- return ProfitSharingEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1801
- }
1802
- if (data.content) {
1803
- return ProfitSharingEvent.fromSuiParsedData(data.content);
1804
- }
1805
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1806
- };
1807
- ProfitSharingEvent.fetch = function (client, id) {
1808
- return __awaiter(this, void 0, void 0, function () {
1809
- var res;
1810
- var _a, _b;
1811
- return __generator(this, function (_c) {
1812
- switch (_c.label) {
1813
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1814
- case 1:
1815
- res = _c.sent();
1816
- if (res.error) {
1817
- throw new Error("error fetching ProfitSharingEvent object at id ".concat(id, ": ").concat(res.error.code));
1818
- }
1819
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isProfitSharingEvent(res.data.bcs.type)) {
1820
- throw new Error("object at id ".concat(id, " is not a ProfitSharingEvent object"));
1821
- }
1822
- return [2 /*return*/, ProfitSharingEvent.fromSuiObjectData(res.data)];
1823
- }
1824
- });
1825
- });
1826
- };
1827
- ProfitSharingEvent.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::ProfitSharingEvent");
1828
- ProfitSharingEvent.$numTypeParams = 0;
1829
- ProfitSharingEvent.$isPhantom = [];
1830
- return ProfitSharingEvent;
1831
- }());
1832
- exports.ProfitSharingEvent = ProfitSharingEvent;
1833
- /* ============================== SnapshotNftEvent =============================== */
1834
- function isSnapshotNftEvent(type) {
1835
- type = (0, util_1.compressSuiType)(type);
1836
- return type === "".concat(index_1.PKG_V1, "::tails_staking::SnapshotNftEvent");
1837
- }
1838
- var SnapshotNftEvent = /** @class */ (function () {
1839
- function SnapshotNftEvent(typeArgs, fields) {
1840
- this.__StructClass = true;
1841
- this.$typeName = SnapshotNftEvent.$typeName;
1842
- this.$isPhantom = SnapshotNftEvent.$isPhantom;
1843
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([SnapshotNftEvent.$typeName], __read(typeArgs), false));
1844
- this.$typeArgs = typeArgs;
1845
- this.sender = fields.sender;
1846
- this.nftId = fields.nftId;
1847
- this.number = fields.number;
1848
- this.tsMs = fields.tsMs;
1849
- this.expEarn = fields.expEarn;
1850
- }
1851
- SnapshotNftEvent.reified = function () {
1852
- var _this = this;
1853
- return {
1854
- typeName: SnapshotNftEvent.$typeName,
1855
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([SnapshotNftEvent.$typeName], [], false)),
1856
- typeArgs: [],
1857
- isPhantom: SnapshotNftEvent.$isPhantom,
1858
- reifiedTypeArgs: [],
1859
- fromFields: function (fields) { return SnapshotNftEvent.fromFields(fields); },
1860
- fromFieldsWithTypes: function (item) { return SnapshotNftEvent.fromFieldsWithTypes(item); },
1861
- fromBcs: function (data) { return SnapshotNftEvent.fromBcs(data); },
1862
- bcs: SnapshotNftEvent.bcs,
1863
- fromJSONField: function (field) { return SnapshotNftEvent.fromJSONField(field); },
1864
- fromJSON: function (json) { return SnapshotNftEvent.fromJSON(json); },
1865
- fromSuiParsedData: function (content) { return SnapshotNftEvent.fromSuiParsedData(content); },
1866
- fromSuiObjectData: function (content) { return SnapshotNftEvent.fromSuiObjectData(content); },
1867
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1868
- return [2 /*return*/, SnapshotNftEvent.fetch(client, id)];
1869
- }); }); },
1870
- new: function (fields) {
1871
- return new SnapshotNftEvent([], fields);
1872
- },
1873
- kind: "StructClassReified",
1874
- };
1875
- };
1876
- Object.defineProperty(SnapshotNftEvent, "r", {
1877
- get: function () {
1878
- return SnapshotNftEvent.reified();
1879
- },
1880
- enumerable: false,
1881
- configurable: true
1882
- });
1883
- SnapshotNftEvent.phantom = function () {
1884
- return (0, reified_1.phantom)(SnapshotNftEvent.reified());
1885
- };
1886
- Object.defineProperty(SnapshotNftEvent, "p", {
1887
- get: function () {
1888
- return SnapshotNftEvent.phantom();
1889
- },
1890
- enumerable: false,
1891
- configurable: true
1892
- });
1893
- Object.defineProperty(SnapshotNftEvent, "bcs", {
1894
- get: function () {
1895
- return bcs_1.bcs.struct("SnapshotNftEvent", {
1896
- sender: bcs_1.bcs.bytes(32).transform({
1897
- input: function (val) { return (0, utils_1.fromHEX)(val); },
1898
- output: function (val) { return (0, utils_1.toHEX)(val); },
1899
- }),
1900
- nft_id: structs_5.ID.bcs,
1901
- number: bcs_1.bcs.u64(),
1902
- ts_ms: bcs_1.bcs.u64(),
1903
- exp_earn: bcs_1.bcs.u64(),
1904
- });
1905
- },
1906
- enumerable: false,
1907
- configurable: true
1908
- });
1909
- SnapshotNftEvent.fromFields = function (fields) {
1910
- return SnapshotNftEvent.reified().new({
1911
- sender: (0, reified_1.decodeFromFields)("address", fields.sender),
1912
- nftId: (0, reified_1.decodeFromFields)(structs_5.ID.reified(), fields.nft_id),
1913
- number: (0, reified_1.decodeFromFields)("u64", fields.number),
1914
- tsMs: (0, reified_1.decodeFromFields)("u64", fields.ts_ms),
1915
- expEarn: (0, reified_1.decodeFromFields)("u64", fields.exp_earn),
1916
- });
1917
- };
1918
- SnapshotNftEvent.fromFieldsWithTypes = function (item) {
1919
- if (!isSnapshotNftEvent(item.type)) {
1920
- throw new Error("not a SnapshotNftEvent type");
1921
- }
1922
- return SnapshotNftEvent.reified().new({
1923
- sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
1924
- nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.ID.reified(), item.fields.nft_id),
1925
- number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
1926
- tsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.ts_ms),
1927
- expEarn: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.exp_earn),
1928
- });
1929
- };
1930
- SnapshotNftEvent.fromBcs = function (data) {
1931
- return SnapshotNftEvent.fromFields(SnapshotNftEvent.bcs.parse(data));
1932
- };
1933
- SnapshotNftEvent.prototype.toJSONField = function () {
1934
- return {
1935
- sender: this.sender,
1936
- nftId: this.nftId,
1937
- number: this.number.toString(),
1938
- tsMs: this.tsMs.toString(),
1939
- expEarn: this.expEarn.toString(),
1940
- };
1941
- };
1942
- SnapshotNftEvent.prototype.toJSON = function () {
1943
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1944
- };
1945
- SnapshotNftEvent.fromJSONField = function (field) {
1946
- return SnapshotNftEvent.reified().new({
1947
- sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
1948
- nftId: (0, reified_1.decodeFromJSONField)(structs_5.ID.reified(), field.nftId),
1949
- number: (0, reified_1.decodeFromJSONField)("u64", field.number),
1950
- tsMs: (0, reified_1.decodeFromJSONField)("u64", field.tsMs),
1951
- expEarn: (0, reified_1.decodeFromJSONField)("u64", field.expEarn),
1952
- });
1953
- };
1954
- SnapshotNftEvent.fromJSON = function (json) {
1955
- if (json.$typeName !== SnapshotNftEvent.$typeName) {
1956
- throw new Error("not a WithTwoGenerics json object");
1957
- }
1958
- return SnapshotNftEvent.fromJSONField(json);
1959
- };
1960
- SnapshotNftEvent.fromSuiParsedData = function (content) {
1961
- if (content.dataType !== "moveObject") {
1962
- throw new Error("not an object");
1963
- }
1964
- if (!isSnapshotNftEvent(content.type)) {
1965
- throw new Error("object at ".concat(content.fields.id, " is not a SnapshotNftEvent object"));
1966
- }
1967
- return SnapshotNftEvent.fromFieldsWithTypes(content);
1968
- };
1969
- SnapshotNftEvent.fromSuiObjectData = function (data) {
1970
- if (data.bcs) {
1971
- if (data.bcs.dataType !== "moveObject" || !isSnapshotNftEvent(data.bcs.type)) {
1972
- throw new Error("object at is not a SnapshotNftEvent object");
1973
- }
1974
- return SnapshotNftEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1975
- }
1976
- if (data.content) {
1977
- return SnapshotNftEvent.fromSuiParsedData(data.content);
1978
- }
1979
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1980
- };
1981
- SnapshotNftEvent.fetch = function (client, id) {
1982
- return __awaiter(this, void 0, void 0, function () {
1983
- var res;
1984
- var _a, _b;
1985
- return __generator(this, function (_c) {
1986
- switch (_c.label) {
1987
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1988
- case 1:
1989
- res = _c.sent();
1990
- if (res.error) {
1991
- throw new Error("error fetching SnapshotNftEvent object at id ".concat(id, ": ").concat(res.error.code));
1992
- }
1993
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isSnapshotNftEvent(res.data.bcs.type)) {
1994
- throw new Error("object at id ".concat(id, " is not a SnapshotNftEvent object"));
1995
- }
1996
- return [2 /*return*/, SnapshotNftEvent.fromSuiObjectData(res.data)];
1997
- }
1998
- });
1999
- });
2000
- };
2001
- SnapshotNftEvent.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::SnapshotNftEvent");
2002
- SnapshotNftEvent.$numTypeParams = 0;
2003
- SnapshotNftEvent.$isPhantom = [];
2004
- return SnapshotNftEvent;
2005
- }());
2006
- exports.SnapshotNftEvent = SnapshotNftEvent;
2007
- /* ============================== StakeNftEvent =============================== */
2008
- function isStakeNftEvent(type) {
2009
- type = (0, util_1.compressSuiType)(type);
2010
- return type === "".concat(index_1.PKG_V1, "::tails_staking::StakeNftEvent");
2011
- }
2012
- var StakeNftEvent = /** @class */ (function () {
2013
- function StakeNftEvent(typeArgs, fields) {
2014
- this.__StructClass = true;
2015
- this.$typeName = StakeNftEvent.$typeName;
2016
- this.$isPhantom = StakeNftEvent.$isPhantom;
2017
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([StakeNftEvent.$typeName], __read(typeArgs), false));
2018
- this.$typeArgs = typeArgs;
2019
- this.sender = fields.sender;
2020
- this.nftId = fields.nftId;
2021
- this.number = fields.number;
2022
- this.tsMs = fields.tsMs;
2023
- }
2024
- StakeNftEvent.reified = function () {
2025
- var _this = this;
2026
- return {
2027
- typeName: StakeNftEvent.$typeName,
2028
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([StakeNftEvent.$typeName], [], false)),
2029
- typeArgs: [],
2030
- isPhantom: StakeNftEvent.$isPhantom,
2031
- reifiedTypeArgs: [],
2032
- fromFields: function (fields) { return StakeNftEvent.fromFields(fields); },
2033
- fromFieldsWithTypes: function (item) { return StakeNftEvent.fromFieldsWithTypes(item); },
2034
- fromBcs: function (data) { return StakeNftEvent.fromBcs(data); },
2035
- bcs: StakeNftEvent.bcs,
2036
- fromJSONField: function (field) { return StakeNftEvent.fromJSONField(field); },
2037
- fromJSON: function (json) { return StakeNftEvent.fromJSON(json); },
2038
- fromSuiParsedData: function (content) { return StakeNftEvent.fromSuiParsedData(content); },
2039
- fromSuiObjectData: function (content) { return StakeNftEvent.fromSuiObjectData(content); },
2040
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
2041
- return [2 /*return*/, StakeNftEvent.fetch(client, id)];
2042
- }); }); },
2043
- new: function (fields) {
2044
- return new StakeNftEvent([], fields);
2045
- },
2046
- kind: "StructClassReified",
2047
- };
2048
- };
2049
- Object.defineProperty(StakeNftEvent, "r", {
2050
- get: function () {
2051
- return StakeNftEvent.reified();
2052
- },
2053
- enumerable: false,
2054
- configurable: true
2055
- });
2056
- StakeNftEvent.phantom = function () {
2057
- return (0, reified_1.phantom)(StakeNftEvent.reified());
2058
- };
2059
- Object.defineProperty(StakeNftEvent, "p", {
2060
- get: function () {
2061
- return StakeNftEvent.phantom();
2062
- },
2063
- enumerable: false,
2064
- configurable: true
2065
- });
2066
- Object.defineProperty(StakeNftEvent, "bcs", {
2067
- get: function () {
2068
- return bcs_1.bcs.struct("StakeNftEvent", {
2069
- sender: bcs_1.bcs.bytes(32).transform({
2070
- input: function (val) { return (0, utils_1.fromHEX)(val); },
2071
- output: function (val) { return (0, utils_1.toHEX)(val); },
2072
- }),
2073
- nft_id: structs_5.ID.bcs,
2074
- number: bcs_1.bcs.u64(),
2075
- ts_ms: bcs_1.bcs.u64(),
2076
- });
2077
- },
2078
- enumerable: false,
2079
- configurable: true
2080
- });
2081
- StakeNftEvent.fromFields = function (fields) {
2082
- return StakeNftEvent.reified().new({
2083
- sender: (0, reified_1.decodeFromFields)("address", fields.sender),
2084
- nftId: (0, reified_1.decodeFromFields)(structs_5.ID.reified(), fields.nft_id),
2085
- number: (0, reified_1.decodeFromFields)("u64", fields.number),
2086
- tsMs: (0, reified_1.decodeFromFields)("u64", fields.ts_ms),
2087
- });
2088
- };
2089
- StakeNftEvent.fromFieldsWithTypes = function (item) {
2090
- if (!isStakeNftEvent(item.type)) {
2091
- throw new Error("not a StakeNftEvent type");
2092
- }
2093
- return StakeNftEvent.reified().new({
2094
- sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
2095
- nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.ID.reified(), item.fields.nft_id),
2096
- number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
2097
- tsMs: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.ts_ms),
2098
- });
2099
- };
2100
- StakeNftEvent.fromBcs = function (data) {
2101
- return StakeNftEvent.fromFields(StakeNftEvent.bcs.parse(data));
2102
- };
2103
- StakeNftEvent.prototype.toJSONField = function () {
2104
- return {
2105
- sender: this.sender,
2106
- nftId: this.nftId,
2107
- number: this.number.toString(),
2108
- tsMs: this.tsMs.toString(),
2109
- };
2110
- };
2111
- StakeNftEvent.prototype.toJSON = function () {
2112
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
2113
- };
2114
- StakeNftEvent.fromJSONField = function (field) {
2115
- return StakeNftEvent.reified().new({
2116
- sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
2117
- nftId: (0, reified_1.decodeFromJSONField)(structs_5.ID.reified(), field.nftId),
2118
- number: (0, reified_1.decodeFromJSONField)("u64", field.number),
2119
- tsMs: (0, reified_1.decodeFromJSONField)("u64", field.tsMs),
2120
- });
2121
- };
2122
- StakeNftEvent.fromJSON = function (json) {
2123
- if (json.$typeName !== StakeNftEvent.$typeName) {
2124
- throw new Error("not a WithTwoGenerics json object");
2125
- }
2126
- return StakeNftEvent.fromJSONField(json);
2127
- };
2128
- StakeNftEvent.fromSuiParsedData = function (content) {
2129
- if (content.dataType !== "moveObject") {
2130
- throw new Error("not an object");
2131
- }
2132
- if (!isStakeNftEvent(content.type)) {
2133
- throw new Error("object at ".concat(content.fields.id, " is not a StakeNftEvent object"));
2134
- }
2135
- return StakeNftEvent.fromFieldsWithTypes(content);
2136
- };
2137
- StakeNftEvent.fromSuiObjectData = function (data) {
2138
- if (data.bcs) {
2139
- if (data.bcs.dataType !== "moveObject" || !isStakeNftEvent(data.bcs.type)) {
2140
- throw new Error("object at is not a StakeNftEvent object");
2141
- }
2142
- return StakeNftEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
2143
- }
2144
- if (data.content) {
2145
- return StakeNftEvent.fromSuiParsedData(data.content);
2146
- }
2147
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
2148
- };
2149
- StakeNftEvent.fetch = function (client, id) {
2150
- return __awaiter(this, void 0, void 0, function () {
2151
- var res;
2152
- var _a, _b;
2153
- return __generator(this, function (_c) {
2154
- switch (_c.label) {
2155
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2156
- case 1:
2157
- res = _c.sent();
2158
- if (res.error) {
2159
- throw new Error("error fetching StakeNftEvent object at id ".concat(id, ": ").concat(res.error.code));
2160
- }
2161
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isStakeNftEvent(res.data.bcs.type)) {
2162
- throw new Error("object at id ".concat(id, " is not a StakeNftEvent object"));
2163
- }
2164
- return [2 /*return*/, StakeNftEvent.fromSuiObjectData(res.data)];
2165
- }
2166
- });
2167
- });
2168
- };
2169
- StakeNftEvent.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::StakeNftEvent");
2170
- StakeNftEvent.$numTypeParams = 0;
2171
- StakeNftEvent.$isPhantom = [];
2172
- return StakeNftEvent;
2173
- }());
2174
- exports.StakeNftEvent = StakeNftEvent;
2175
- /* ============================== TransferNftEvent =============================== */
2176
- function isTransferNftEvent(type) {
2177
- type = (0, util_1.compressSuiType)(type);
2178
- return type === "".concat(index_1.PKG_V1, "::tails_staking::TransferNftEvent");
2179
- }
2180
- var TransferNftEvent = /** @class */ (function () {
2181
- function TransferNftEvent(typeArgs, fields) {
2182
- this.__StructClass = true;
2183
- this.$typeName = TransferNftEvent.$typeName;
2184
- this.$isPhantom = TransferNftEvent.$isPhantom;
2185
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([TransferNftEvent.$typeName], __read(typeArgs), false));
2186
- this.$typeArgs = typeArgs;
2187
- this.sender = fields.sender;
2188
- this.receiver = fields.receiver;
2189
- this.nftId = fields.nftId;
2190
- this.number = fields.number;
2191
- }
2192
- TransferNftEvent.reified = function () {
2193
- var _this = this;
2194
- return {
2195
- typeName: TransferNftEvent.$typeName,
2196
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([TransferNftEvent.$typeName], [], false)),
2197
- typeArgs: [],
2198
- isPhantom: TransferNftEvent.$isPhantom,
2199
- reifiedTypeArgs: [],
2200
- fromFields: function (fields) { return TransferNftEvent.fromFields(fields); },
2201
- fromFieldsWithTypes: function (item) { return TransferNftEvent.fromFieldsWithTypes(item); },
2202
- fromBcs: function (data) { return TransferNftEvent.fromBcs(data); },
2203
- bcs: TransferNftEvent.bcs,
2204
- fromJSONField: function (field) { return TransferNftEvent.fromJSONField(field); },
2205
- fromJSON: function (json) { return TransferNftEvent.fromJSON(json); },
2206
- fromSuiParsedData: function (content) { return TransferNftEvent.fromSuiParsedData(content); },
2207
- fromSuiObjectData: function (content) { return TransferNftEvent.fromSuiObjectData(content); },
2208
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
2209
- return [2 /*return*/, TransferNftEvent.fetch(client, id)];
2210
- }); }); },
2211
- new: function (fields) {
2212
- return new TransferNftEvent([], fields);
2213
- },
2214
- kind: "StructClassReified",
2215
- };
2216
- };
2217
- Object.defineProperty(TransferNftEvent, "r", {
2218
- get: function () {
2219
- return TransferNftEvent.reified();
2220
- },
2221
- enumerable: false,
2222
- configurable: true
2223
- });
2224
- TransferNftEvent.phantom = function () {
2225
- return (0, reified_1.phantom)(TransferNftEvent.reified());
2226
- };
2227
- Object.defineProperty(TransferNftEvent, "p", {
2228
- get: function () {
2229
- return TransferNftEvent.phantom();
2230
- },
2231
- enumerable: false,
2232
- configurable: true
2233
- });
2234
- Object.defineProperty(TransferNftEvent, "bcs", {
2235
- get: function () {
2236
- return bcs_1.bcs.struct("TransferNftEvent", {
2237
- sender: bcs_1.bcs.bytes(32).transform({
2238
- input: function (val) { return (0, utils_1.fromHEX)(val); },
2239
- output: function (val) { return (0, utils_1.toHEX)(val); },
2240
- }),
2241
- receiver: bcs_1.bcs.bytes(32).transform({
2242
- input: function (val) { return (0, utils_1.fromHEX)(val); },
2243
- output: function (val) { return (0, utils_1.toHEX)(val); },
2244
- }),
2245
- nft_id: structs_5.ID.bcs,
2246
- number: bcs_1.bcs.u64(),
2247
- });
2248
- },
2249
- enumerable: false,
2250
- configurable: true
2251
- });
2252
- TransferNftEvent.fromFields = function (fields) {
2253
- return TransferNftEvent.reified().new({
2254
- sender: (0, reified_1.decodeFromFields)("address", fields.sender),
2255
- receiver: (0, reified_1.decodeFromFields)("address", fields.receiver),
2256
- nftId: (0, reified_1.decodeFromFields)(structs_5.ID.reified(), fields.nft_id),
2257
- number: (0, reified_1.decodeFromFields)("u64", fields.number),
2258
- });
2259
- };
2260
- TransferNftEvent.fromFieldsWithTypes = function (item) {
2261
- if (!isTransferNftEvent(item.type)) {
2262
- throw new Error("not a TransferNftEvent type");
2263
- }
2264
- return TransferNftEvent.reified().new({
2265
- sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
2266
- receiver: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.receiver),
2267
- nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.ID.reified(), item.fields.nft_id),
2268
- number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
2269
- });
2270
- };
2271
- TransferNftEvent.fromBcs = function (data) {
2272
- return TransferNftEvent.fromFields(TransferNftEvent.bcs.parse(data));
2273
- };
2274
- TransferNftEvent.prototype.toJSONField = function () {
2275
- return {
2276
- sender: this.sender,
2277
- receiver: this.receiver,
2278
- nftId: this.nftId,
2279
- number: this.number.toString(),
2280
- };
2281
- };
2282
- TransferNftEvent.prototype.toJSON = function () {
2283
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
2284
- };
2285
- TransferNftEvent.fromJSONField = function (field) {
2286
- return TransferNftEvent.reified().new({
2287
- sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
2288
- receiver: (0, reified_1.decodeFromJSONField)("address", field.receiver),
2289
- nftId: (0, reified_1.decodeFromJSONField)(structs_5.ID.reified(), field.nftId),
2290
- number: (0, reified_1.decodeFromJSONField)("u64", field.number),
2291
- });
2292
- };
2293
- TransferNftEvent.fromJSON = function (json) {
2294
- if (json.$typeName !== TransferNftEvent.$typeName) {
2295
- throw new Error("not a WithTwoGenerics json object");
2296
- }
2297
- return TransferNftEvent.fromJSONField(json);
2298
- };
2299
- TransferNftEvent.fromSuiParsedData = function (content) {
2300
- if (content.dataType !== "moveObject") {
2301
- throw new Error("not an object");
2302
- }
2303
- if (!isTransferNftEvent(content.type)) {
2304
- throw new Error("object at ".concat(content.fields.id, " is not a TransferNftEvent object"));
2305
- }
2306
- return TransferNftEvent.fromFieldsWithTypes(content);
2307
- };
2308
- TransferNftEvent.fromSuiObjectData = function (data) {
2309
- if (data.bcs) {
2310
- if (data.bcs.dataType !== "moveObject" || !isTransferNftEvent(data.bcs.type)) {
2311
- throw new Error("object at is not a TransferNftEvent object");
2312
- }
2313
- return TransferNftEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
2314
- }
2315
- if (data.content) {
2316
- return TransferNftEvent.fromSuiParsedData(data.content);
2317
- }
2318
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
2319
- };
2320
- TransferNftEvent.fetch = function (client, id) {
2321
- return __awaiter(this, void 0, void 0, function () {
2322
- var res;
2323
- var _a, _b;
2324
- return __generator(this, function (_c) {
2325
- switch (_c.label) {
2326
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2327
- case 1:
2328
- res = _c.sent();
2329
- if (res.error) {
2330
- throw new Error("error fetching TransferNftEvent object at id ".concat(id, ": ").concat(res.error.code));
2331
- }
2332
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isTransferNftEvent(res.data.bcs.type)) {
2333
- throw new Error("object at id ".concat(id, " is not a TransferNftEvent object"));
2334
- }
2335
- return [2 /*return*/, TransferNftEvent.fromSuiObjectData(res.data)];
2336
- }
2337
- });
2338
- });
2339
- };
2340
- TransferNftEvent.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::TransferNftEvent");
2341
- TransferNftEvent.$numTypeParams = 0;
2342
- TransferNftEvent.$isPhantom = [];
2343
- return TransferNftEvent;
2344
- }());
2345
- exports.TransferNftEvent = TransferNftEvent;
2346
- /* ============================== UnstakeNftEvent =============================== */
2347
- function isUnstakeNftEvent(type) {
2348
- type = (0, util_1.compressSuiType)(type);
2349
- return type === "".concat(index_1.PKG_V1, "::tails_staking::UnstakeNftEvent");
2350
- }
2351
- var UnstakeNftEvent = /** @class */ (function () {
2352
- function UnstakeNftEvent(typeArgs, fields) {
2353
- this.__StructClass = true;
2354
- this.$typeName = UnstakeNftEvent.$typeName;
2355
- this.$isPhantom = UnstakeNftEvent.$isPhantom;
2356
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([UnstakeNftEvent.$typeName], __read(typeArgs), false));
2357
- this.$typeArgs = typeArgs;
2358
- this.sender = fields.sender;
2359
- this.nftId = fields.nftId;
2360
- this.number = fields.number;
2361
- }
2362
- UnstakeNftEvent.reified = function () {
2363
- var _this = this;
2364
- return {
2365
- typeName: UnstakeNftEvent.$typeName,
2366
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([UnstakeNftEvent.$typeName], [], false)),
2367
- typeArgs: [],
2368
- isPhantom: UnstakeNftEvent.$isPhantom,
2369
- reifiedTypeArgs: [],
2370
- fromFields: function (fields) { return UnstakeNftEvent.fromFields(fields); },
2371
- fromFieldsWithTypes: function (item) { return UnstakeNftEvent.fromFieldsWithTypes(item); },
2372
- fromBcs: function (data) { return UnstakeNftEvent.fromBcs(data); },
2373
- bcs: UnstakeNftEvent.bcs,
2374
- fromJSONField: function (field) { return UnstakeNftEvent.fromJSONField(field); },
2375
- fromJSON: function (json) { return UnstakeNftEvent.fromJSON(json); },
2376
- fromSuiParsedData: function (content) { return UnstakeNftEvent.fromSuiParsedData(content); },
2377
- fromSuiObjectData: function (content) { return UnstakeNftEvent.fromSuiObjectData(content); },
2378
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
2379
- return [2 /*return*/, UnstakeNftEvent.fetch(client, id)];
2380
- }); }); },
2381
- new: function (fields) {
2382
- return new UnstakeNftEvent([], fields);
2383
- },
2384
- kind: "StructClassReified",
2385
- };
2386
- };
2387
- Object.defineProperty(UnstakeNftEvent, "r", {
2388
- get: function () {
2389
- return UnstakeNftEvent.reified();
2390
- },
2391
- enumerable: false,
2392
- configurable: true
2393
- });
2394
- UnstakeNftEvent.phantom = function () {
2395
- return (0, reified_1.phantom)(UnstakeNftEvent.reified());
2396
- };
2397
- Object.defineProperty(UnstakeNftEvent, "p", {
2398
- get: function () {
2399
- return UnstakeNftEvent.phantom();
2400
- },
2401
- enumerable: false,
2402
- configurable: true
2403
- });
2404
- Object.defineProperty(UnstakeNftEvent, "bcs", {
2405
- get: function () {
2406
- return bcs_1.bcs.struct("UnstakeNftEvent", {
2407
- sender: bcs_1.bcs.bytes(32).transform({
2408
- input: function (val) { return (0, utils_1.fromHEX)(val); },
2409
- output: function (val) { return (0, utils_1.toHEX)(val); },
2410
- }),
2411
- nft_id: structs_5.ID.bcs,
2412
- number: bcs_1.bcs.u64(),
2413
- });
2414
- },
2415
- enumerable: false,
2416
- configurable: true
2417
- });
2418
- UnstakeNftEvent.fromFields = function (fields) {
2419
- return UnstakeNftEvent.reified().new({
2420
- sender: (0, reified_1.decodeFromFields)("address", fields.sender),
2421
- nftId: (0, reified_1.decodeFromFields)(structs_5.ID.reified(), fields.nft_id),
2422
- number: (0, reified_1.decodeFromFields)("u64", fields.number),
2423
- });
2424
- };
2425
- UnstakeNftEvent.fromFieldsWithTypes = function (item) {
2426
- if (!isUnstakeNftEvent(item.type)) {
2427
- throw new Error("not a UnstakeNftEvent type");
2428
- }
2429
- return UnstakeNftEvent.reified().new({
2430
- sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
2431
- nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.ID.reified(), item.fields.nft_id),
2432
- number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
2433
- });
2434
- };
2435
- UnstakeNftEvent.fromBcs = function (data) {
2436
- return UnstakeNftEvent.fromFields(UnstakeNftEvent.bcs.parse(data));
2437
- };
2438
- UnstakeNftEvent.prototype.toJSONField = function () {
2439
- return {
2440
- sender: this.sender,
2441
- nftId: this.nftId,
2442
- number: this.number.toString(),
2443
- };
2444
- };
2445
- UnstakeNftEvent.prototype.toJSON = function () {
2446
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
2447
- };
2448
- UnstakeNftEvent.fromJSONField = function (field) {
2449
- return UnstakeNftEvent.reified().new({
2450
- sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
2451
- nftId: (0, reified_1.decodeFromJSONField)(structs_5.ID.reified(), field.nftId),
2452
- number: (0, reified_1.decodeFromJSONField)("u64", field.number),
2453
- });
2454
- };
2455
- UnstakeNftEvent.fromJSON = function (json) {
2456
- if (json.$typeName !== UnstakeNftEvent.$typeName) {
2457
- throw new Error("not a WithTwoGenerics json object");
2458
- }
2459
- return UnstakeNftEvent.fromJSONField(json);
2460
- };
2461
- UnstakeNftEvent.fromSuiParsedData = function (content) {
2462
- if (content.dataType !== "moveObject") {
2463
- throw new Error("not an object");
2464
- }
2465
- if (!isUnstakeNftEvent(content.type)) {
2466
- throw new Error("object at ".concat(content.fields.id, " is not a UnstakeNftEvent object"));
2467
- }
2468
- return UnstakeNftEvent.fromFieldsWithTypes(content);
2469
- };
2470
- UnstakeNftEvent.fromSuiObjectData = function (data) {
2471
- if (data.bcs) {
2472
- if (data.bcs.dataType !== "moveObject" || !isUnstakeNftEvent(data.bcs.type)) {
2473
- throw new Error("object at is not a UnstakeNftEvent object");
2474
- }
2475
- return UnstakeNftEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
2476
- }
2477
- if (data.content) {
2478
- return UnstakeNftEvent.fromSuiParsedData(data.content);
2479
- }
2480
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
2481
- };
2482
- UnstakeNftEvent.fetch = function (client, id) {
2483
- return __awaiter(this, void 0, void 0, function () {
2484
- var res;
2485
- var _a, _b;
2486
- return __generator(this, function (_c) {
2487
- switch (_c.label) {
2488
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2489
- case 1:
2490
- res = _c.sent();
2491
- if (res.error) {
2492
- throw new Error("error fetching UnstakeNftEvent object at id ".concat(id, ": ").concat(res.error.code));
2493
- }
2494
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUnstakeNftEvent(res.data.bcs.type)) {
2495
- throw new Error("object at id ".concat(id, " is not a UnstakeNftEvent object"));
2496
- }
2497
- return [2 /*return*/, UnstakeNftEvent.fromSuiObjectData(res.data)];
2498
- }
2499
- });
2500
- });
2501
- };
2502
- UnstakeNftEvent.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::UnstakeNftEvent");
2503
- UnstakeNftEvent.$numTypeParams = 0;
2504
- UnstakeNftEvent.$isPhantom = [];
2505
- return UnstakeNftEvent;
2506
- }());
2507
- exports.UnstakeNftEvent = UnstakeNftEvent;
2508
- /* ============================== UpdateDepositEvent =============================== */
2509
- function isUpdateDepositEvent(type) {
2510
- type = (0, util_1.compressSuiType)(type);
2511
- return type === "".concat(index_1.PKG_V1, "::tails_staking::UpdateDepositEvent");
2512
- }
2513
- var UpdateDepositEvent = /** @class */ (function () {
2514
- function UpdateDepositEvent(typeArgs, fields) {
2515
- this.__StructClass = true;
2516
- this.$typeName = UpdateDepositEvent.$typeName;
2517
- this.$isPhantom = UpdateDepositEvent.$isPhantom;
2518
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([UpdateDepositEvent.$typeName], __read(typeArgs), false));
2519
- this.$typeArgs = typeArgs;
2520
- this.sender = fields.sender;
2521
- this.nftId = fields.nftId;
2522
- this.number = fields.number;
2523
- this.before = fields.before;
2524
- this.after = fields.after;
2525
- }
2526
- UpdateDepositEvent.reified = function () {
2527
- var _this = this;
2528
- return {
2529
- typeName: UpdateDepositEvent.$typeName,
2530
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([UpdateDepositEvent.$typeName], [], false)),
2531
- typeArgs: [],
2532
- isPhantom: UpdateDepositEvent.$isPhantom,
2533
- reifiedTypeArgs: [],
2534
- fromFields: function (fields) { return UpdateDepositEvent.fromFields(fields); },
2535
- fromFieldsWithTypes: function (item) { return UpdateDepositEvent.fromFieldsWithTypes(item); },
2536
- fromBcs: function (data) { return UpdateDepositEvent.fromBcs(data); },
2537
- bcs: UpdateDepositEvent.bcs,
2538
- fromJSONField: function (field) { return UpdateDepositEvent.fromJSONField(field); },
2539
- fromJSON: function (json) { return UpdateDepositEvent.fromJSON(json); },
2540
- fromSuiParsedData: function (content) { return UpdateDepositEvent.fromSuiParsedData(content); },
2541
- fromSuiObjectData: function (content) { return UpdateDepositEvent.fromSuiObjectData(content); },
2542
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
2543
- return [2 /*return*/, UpdateDepositEvent.fetch(client, id)];
2544
- }); }); },
2545
- new: function (fields) {
2546
- return new UpdateDepositEvent([], fields);
2547
- },
2548
- kind: "StructClassReified",
2549
- };
2550
- };
2551
- Object.defineProperty(UpdateDepositEvent, "r", {
2552
- get: function () {
2553
- return UpdateDepositEvent.reified();
2554
- },
2555
- enumerable: false,
2556
- configurable: true
2557
- });
2558
- UpdateDepositEvent.phantom = function () {
2559
- return (0, reified_1.phantom)(UpdateDepositEvent.reified());
2560
- };
2561
- Object.defineProperty(UpdateDepositEvent, "p", {
2562
- get: function () {
2563
- return UpdateDepositEvent.phantom();
2564
- },
2565
- enumerable: false,
2566
- configurable: true
2567
- });
2568
- Object.defineProperty(UpdateDepositEvent, "bcs", {
2569
- get: function () {
2570
- return bcs_1.bcs.struct("UpdateDepositEvent", {
2571
- sender: bcs_1.bcs.bytes(32).transform({
2572
- input: function (val) { return (0, utils_1.fromHEX)(val); },
2573
- output: function (val) { return (0, utils_1.toHEX)(val); },
2574
- }),
2575
- nft_id: structs_5.ID.bcs,
2576
- number: bcs_1.bcs.u64(),
2577
- before: bcs_1.bcs.u64(),
2578
- after: bcs_1.bcs.u64(),
2579
- });
2580
- },
2581
- enumerable: false,
2582
- configurable: true
2583
- });
2584
- UpdateDepositEvent.fromFields = function (fields) {
2585
- return UpdateDepositEvent.reified().new({
2586
- sender: (0, reified_1.decodeFromFields)("address", fields.sender),
2587
- nftId: (0, reified_1.decodeFromFields)(structs_5.ID.reified(), fields.nft_id),
2588
- number: (0, reified_1.decodeFromFields)("u64", fields.number),
2589
- before: (0, reified_1.decodeFromFields)("u64", fields.before),
2590
- after: (0, reified_1.decodeFromFields)("u64", fields.after),
2591
- });
2592
- };
2593
- UpdateDepositEvent.fromFieldsWithTypes = function (item) {
2594
- if (!isUpdateDepositEvent(item.type)) {
2595
- throw new Error("not a UpdateDepositEvent type");
2596
- }
2597
- return UpdateDepositEvent.reified().new({
2598
- sender: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.sender),
2599
- nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.ID.reified(), item.fields.nft_id),
2600
- number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
2601
- before: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.before),
2602
- after: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.after),
2603
- });
2604
- };
2605
- UpdateDepositEvent.fromBcs = function (data) {
2606
- return UpdateDepositEvent.fromFields(UpdateDepositEvent.bcs.parse(data));
2607
- };
2608
- UpdateDepositEvent.prototype.toJSONField = function () {
2609
- return {
2610
- sender: this.sender,
2611
- nftId: this.nftId,
2612
- number: this.number.toString(),
2613
- before: this.before.toString(),
2614
- after: this.after.toString(),
2615
- };
2616
- };
2617
- UpdateDepositEvent.prototype.toJSON = function () {
2618
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
2619
- };
2620
- UpdateDepositEvent.fromJSONField = function (field) {
2621
- return UpdateDepositEvent.reified().new({
2622
- sender: (0, reified_1.decodeFromJSONField)("address", field.sender),
2623
- nftId: (0, reified_1.decodeFromJSONField)(structs_5.ID.reified(), field.nftId),
2624
- number: (0, reified_1.decodeFromJSONField)("u64", field.number),
2625
- before: (0, reified_1.decodeFromJSONField)("u64", field.before),
2626
- after: (0, reified_1.decodeFromJSONField)("u64", field.after),
2627
- });
2628
- };
2629
- UpdateDepositEvent.fromJSON = function (json) {
2630
- if (json.$typeName !== UpdateDepositEvent.$typeName) {
2631
- throw new Error("not a WithTwoGenerics json object");
2632
- }
2633
- return UpdateDepositEvent.fromJSONField(json);
2634
- };
2635
- UpdateDepositEvent.fromSuiParsedData = function (content) {
2636
- if (content.dataType !== "moveObject") {
2637
- throw new Error("not an object");
2638
- }
2639
- if (!isUpdateDepositEvent(content.type)) {
2640
- throw new Error("object at ".concat(content.fields.id, " is not a UpdateDepositEvent object"));
2641
- }
2642
- return UpdateDepositEvent.fromFieldsWithTypes(content);
2643
- };
2644
- UpdateDepositEvent.fromSuiObjectData = function (data) {
2645
- if (data.bcs) {
2646
- if (data.bcs.dataType !== "moveObject" || !isUpdateDepositEvent(data.bcs.type)) {
2647
- throw new Error("object at is not a UpdateDepositEvent object");
2648
- }
2649
- return UpdateDepositEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
2650
- }
2651
- if (data.content) {
2652
- return UpdateDepositEvent.fromSuiParsedData(data.content);
2653
- }
2654
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
2655
- };
2656
- UpdateDepositEvent.fetch = function (client, id) {
2657
- return __awaiter(this, void 0, void 0, function () {
2658
- var res;
2659
- var _a, _b;
2660
- return __generator(this, function (_c) {
2661
- switch (_c.label) {
2662
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2663
- case 1:
2664
- res = _c.sent();
2665
- if (res.error) {
2666
- throw new Error("error fetching UpdateDepositEvent object at id ".concat(id, ": ").concat(res.error.code));
2667
- }
2668
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUpdateDepositEvent(res.data.bcs.type)) {
2669
- throw new Error("object at id ".concat(id, " is not a UpdateDepositEvent object"));
2670
- }
2671
- return [2 /*return*/, UpdateDepositEvent.fromSuiObjectData(res.data)];
2672
- }
2673
- });
2674
- });
2675
- };
2676
- UpdateDepositEvent.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::UpdateDepositEvent");
2677
- UpdateDepositEvent.$numTypeParams = 0;
2678
- UpdateDepositEvent.$isPhantom = [];
2679
- return UpdateDepositEvent;
2680
- }());
2681
- exports.UpdateDepositEvent = UpdateDepositEvent;
2682
- /* ============================== UpdateUrlEvent =============================== */
2683
- function isUpdateUrlEvent(type) {
2684
- type = (0, util_1.compressSuiType)(type);
2685
- return type === "".concat(index_1.PKG_V1, "::tails_staking::UpdateUrlEvent");
2686
- }
2687
- var UpdateUrlEvent = /** @class */ (function () {
2688
- function UpdateUrlEvent(typeArgs, fields) {
2689
- this.__StructClass = true;
2690
- this.$typeName = UpdateUrlEvent.$typeName;
2691
- this.$isPhantom = UpdateUrlEvent.$isPhantom;
2692
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([UpdateUrlEvent.$typeName], __read(typeArgs), false));
2693
- this.$typeArgs = typeArgs;
2694
- this.nftId = fields.nftId;
2695
- this.number = fields.number;
2696
- this.level = fields.level;
2697
- this.url = fields.url;
2698
- }
2699
- UpdateUrlEvent.reified = function () {
2700
- var _this = this;
2701
- return {
2702
- typeName: UpdateUrlEvent.$typeName,
2703
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([UpdateUrlEvent.$typeName], [], false)),
2704
- typeArgs: [],
2705
- isPhantom: UpdateUrlEvent.$isPhantom,
2706
- reifiedTypeArgs: [],
2707
- fromFields: function (fields) { return UpdateUrlEvent.fromFields(fields); },
2708
- fromFieldsWithTypes: function (item) { return UpdateUrlEvent.fromFieldsWithTypes(item); },
2709
- fromBcs: function (data) { return UpdateUrlEvent.fromBcs(data); },
2710
- bcs: UpdateUrlEvent.bcs,
2711
- fromJSONField: function (field) { return UpdateUrlEvent.fromJSONField(field); },
2712
- fromJSON: function (json) { return UpdateUrlEvent.fromJSON(json); },
2713
- fromSuiParsedData: function (content) { return UpdateUrlEvent.fromSuiParsedData(content); },
2714
- fromSuiObjectData: function (content) { return UpdateUrlEvent.fromSuiObjectData(content); },
2715
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
2716
- return [2 /*return*/, UpdateUrlEvent.fetch(client, id)];
2717
- }); }); },
2718
- new: function (fields) {
2719
- return new UpdateUrlEvent([], fields);
2720
- },
2721
- kind: "StructClassReified",
2722
- };
2723
- };
2724
- Object.defineProperty(UpdateUrlEvent, "r", {
2725
- get: function () {
2726
- return UpdateUrlEvent.reified();
2727
- },
2728
- enumerable: false,
2729
- configurable: true
2730
- });
2731
- UpdateUrlEvent.phantom = function () {
2732
- return (0, reified_1.phantom)(UpdateUrlEvent.reified());
2733
- };
2734
- Object.defineProperty(UpdateUrlEvent, "p", {
2735
- get: function () {
2736
- return UpdateUrlEvent.phantom();
2737
- },
2738
- enumerable: false,
2739
- configurable: true
2740
- });
2741
- Object.defineProperty(UpdateUrlEvent, "bcs", {
2742
- get: function () {
2743
- return bcs_1.bcs.struct("UpdateUrlEvent", {
2744
- nft_id: structs_5.ID.bcs,
2745
- number: bcs_1.bcs.u64(),
2746
- level: bcs_1.bcs.u64(),
2747
- url: bcs_1.bcs.vector(bcs_1.bcs.u8()),
2748
- });
2749
- },
2750
- enumerable: false,
2751
- configurable: true
2752
- });
2753
- UpdateUrlEvent.fromFields = function (fields) {
2754
- return UpdateUrlEvent.reified().new({
2755
- nftId: (0, reified_1.decodeFromFields)(structs_5.ID.reified(), fields.nft_id),
2756
- number: (0, reified_1.decodeFromFields)("u64", fields.number),
2757
- level: (0, reified_1.decodeFromFields)("u64", fields.level),
2758
- url: (0, reified_1.decodeFromFields)(reified.vector("u8"), fields.url),
2759
- });
2760
- };
2761
- UpdateUrlEvent.fromFieldsWithTypes = function (item) {
2762
- if (!isUpdateUrlEvent(item.type)) {
2763
- throw new Error("not a UpdateUrlEvent type");
2764
- }
2765
- return UpdateUrlEvent.reified().new({
2766
- nftId: (0, reified_1.decodeFromFieldsWithTypes)(structs_5.ID.reified(), item.fields.nft_id),
2767
- number: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.number),
2768
- level: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.level),
2769
- url: (0, reified_1.decodeFromFieldsWithTypes)(reified.vector("u8"), item.fields.url),
2770
- });
2771
- };
2772
- UpdateUrlEvent.fromBcs = function (data) {
2773
- return UpdateUrlEvent.fromFields(UpdateUrlEvent.bcs.parse(data));
2774
- };
2775
- UpdateUrlEvent.prototype.toJSONField = function () {
2776
- return {
2777
- nftId: this.nftId,
2778
- number: this.number.toString(),
2779
- level: this.level.toString(),
2780
- url: (0, reified_1.fieldToJSON)("vector<u8>", this.url),
2781
- };
2782
- };
2783
- UpdateUrlEvent.prototype.toJSON = function () {
2784
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
2785
- };
2786
- UpdateUrlEvent.fromJSONField = function (field) {
2787
- return UpdateUrlEvent.reified().new({
2788
- nftId: (0, reified_1.decodeFromJSONField)(structs_5.ID.reified(), field.nftId),
2789
- number: (0, reified_1.decodeFromJSONField)("u64", field.number),
2790
- level: (0, reified_1.decodeFromJSONField)("u64", field.level),
2791
- url: (0, reified_1.decodeFromJSONField)(reified.vector("u8"), field.url),
2792
- });
2793
- };
2794
- UpdateUrlEvent.fromJSON = function (json) {
2795
- if (json.$typeName !== UpdateUrlEvent.$typeName) {
2796
- throw new Error("not a WithTwoGenerics json object");
2797
- }
2798
- return UpdateUrlEvent.fromJSONField(json);
2799
- };
2800
- UpdateUrlEvent.fromSuiParsedData = function (content) {
2801
- if (content.dataType !== "moveObject") {
2802
- throw new Error("not an object");
2803
- }
2804
- if (!isUpdateUrlEvent(content.type)) {
2805
- throw new Error("object at ".concat(content.fields.id, " is not a UpdateUrlEvent object"));
2806
- }
2807
- return UpdateUrlEvent.fromFieldsWithTypes(content);
2808
- };
2809
- UpdateUrlEvent.fromSuiObjectData = function (data) {
2810
- if (data.bcs) {
2811
- if (data.bcs.dataType !== "moveObject" || !isUpdateUrlEvent(data.bcs.type)) {
2812
- throw new Error("object at is not a UpdateUrlEvent object");
2813
- }
2814
- return UpdateUrlEvent.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
2815
- }
2816
- if (data.content) {
2817
- return UpdateUrlEvent.fromSuiParsedData(data.content);
2818
- }
2819
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
2820
- };
2821
- UpdateUrlEvent.fetch = function (client, id) {
2822
- return __awaiter(this, void 0, void 0, function () {
2823
- var res;
2824
- var _a, _b;
2825
- return __generator(this, function (_c) {
2826
- switch (_c.label) {
2827
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
2828
- case 1:
2829
- res = _c.sent();
2830
- if (res.error) {
2831
- throw new Error("error fetching UpdateUrlEvent object at id ".concat(id, ": ").concat(res.error.code));
2832
- }
2833
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isUpdateUrlEvent(res.data.bcs.type)) {
2834
- throw new Error("object at id ".concat(id, " is not a UpdateUrlEvent object"));
2835
- }
2836
- return [2 /*return*/, UpdateUrlEvent.fromSuiObjectData(res.data)];
2837
- }
2838
- });
2839
- });
2840
- };
2841
- UpdateUrlEvent.$typeName = "".concat(index_1.PKG_V1, "::tails_staking::UpdateUrlEvent");
2842
- UpdateUrlEvent.$numTypeParams = 0;
2843
- UpdateUrlEvent.$isPhantom = [];
2844
- return UpdateUrlEvent;
2845
- }());
2846
- exports.UpdateUrlEvent = UpdateUrlEvent;