@typus/typus-sdk 1.5.4 → 1.5.5-a

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 (411) hide show
  1. package/dist/src/constants/token.d.ts +5 -53
  2. package/dist/src/constants/token.js +174 -104
  3. package/dist/src/typus-dov-single-v2/history/user-history.d.ts +2 -1
  4. package/dist/src/typus-launch/airdrop/authority-entry.js +2 -2
  5. package/package.json +2 -1
  6. package/dist/src/typus-perp/_dependencies/source/0x1/ascii/structs.d.ts +0 -92
  7. package/dist/src/typus-perp/_dependencies/source/0x1/ascii/structs.js +0 -406
  8. package/dist/src/typus-perp/_dependencies/source/0x1/bit-vector/structs.d.ts +0 -56
  9. package/dist/src/typus-perp/_dependencies/source/0x1/bit-vector/structs.js +0 -268
  10. package/dist/src/typus-perp/_dependencies/source/0x1/fixed-point32/structs.d.ts +0 -46
  11. package/dist/src/typus-perp/_dependencies/source/0x1/fixed-point32/structs.js +0 -228
  12. package/dist/src/typus-perp/_dependencies/source/0x1/index.d.ts +0 -3
  13. package/dist/src/typus-perp/_dependencies/source/0x1/index.js +0 -6
  14. package/dist/src/typus-perp/_dependencies/source/0x1/init.d.ts +0 -2
  15. package/dist/src/typus-perp/_dependencies/source/0x1/init.js +0 -55
  16. package/dist/src/typus-perp/_dependencies/source/0x1/option/structs.d.ts +0 -52
  17. package/dist/src/typus-perp/_dependencies/source/0x1/option/structs.js +0 -277
  18. package/dist/src/typus-perp/_dependencies/source/0x1/string/structs.d.ts +0 -50
  19. package/dist/src/typus-perp/_dependencies/source/0x1/string/structs.js +0 -262
  20. package/dist/src/typus-perp/_dependencies/source/0x1/type-name/structs.d.ts +0 -53
  21. package/dist/src/typus-perp/_dependencies/source/0x1/type-name/structs.js +0 -229
  22. package/dist/src/typus-perp/_dependencies/source/0x1/uq32-32/structs.d.ts +0 -46
  23. package/dist/src/typus-perp/_dependencies/source/0x1/uq32-32/structs.js +0 -228
  24. package/dist/src/typus-perp/_dependencies/source/0x1/uq64-64/structs.d.ts +0 -46
  25. package/dist/src/typus-perp/_dependencies/source/0x1/uq64-64/structs.js +0 -228
  26. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.d.ts +0 -5
  27. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/index.js +0 -8
  28. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/init.d.ts +0 -2
  29. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/init.js +0 -50
  30. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.d.ts +0 -350
  31. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/oracle/structs.js +0 -803
  32. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/pyth-parser/structs.d.ts +0 -111
  33. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/pyth-parser/structs.js +0 -395
  34. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/supra/structs.d.ts +0 -70
  35. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/supra/structs.js +0 -252
  36. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/switchboard-feed-parser/structs.d.ts +0 -70
  37. package/dist/src/typus-perp/_dependencies/source/0x1d17058789bd1e1e79f1a92424519a88146f191f58a06cc4d9ab23d17d46ab73/switchboard-feed-parser/structs.js +0 -255
  38. package/dist/src/typus-perp/_dependencies/source/0x2/authenticator-state/structs.d.ts +0 -464
  39. package/dist/src/typus-perp/_dependencies/source/0x2/authenticator-state/structs.js +0 -904
  40. package/dist/src/typus-perp/_dependencies/source/0x2/bag/structs.d.ts +0 -61
  41. package/dist/src/typus-perp/_dependencies/source/0x2/bag/structs.js +0 -235
  42. package/dist/src/typus-perp/_dependencies/source/0x2/balance/structs.d.ts +0 -88
  43. package/dist/src/typus-perp/_dependencies/source/0x2/balance/structs.js +0 -398
  44. package/dist/src/typus-perp/_dependencies/source/0x2/bcs/structs.d.ts +0 -50
  45. package/dist/src/typus-perp/_dependencies/source/0x2/bcs/structs.js +0 -262
  46. package/dist/src/typus-perp/_dependencies/source/0x2/bls12381/structs.d.ts +0 -214
  47. package/dist/src/typus-perp/_dependencies/source/0x2/bls12381/structs.js +0 -820
  48. package/dist/src/typus-perp/_dependencies/source/0x2/borrow/structs.d.ts +0 -113
  49. package/dist/src/typus-perp/_dependencies/source/0x2/borrow/structs.js +0 -410
  50. package/dist/src/typus-perp/_dependencies/source/0x2/clock/structs.d.ts +0 -61
  51. package/dist/src/typus-perp/_dependencies/source/0x2/clock/structs.js +0 -235
  52. package/dist/src/typus-perp/_dependencies/source/0x2/coin/structs.d.ts +0 -460
  53. package/dist/src/typus-perp/_dependencies/source/0x2/coin/structs.js +0 -1259
  54. package/dist/src/typus-perp/_dependencies/source/0x2/config/structs.d.ts +0 -179
  55. package/dist/src/typus-perp/_dependencies/source/0x2/config/structs.js +0 -577
  56. package/dist/src/typus-perp/_dependencies/source/0x2/deny-list/structs.d.ts +0 -430
  57. package/dist/src/typus-perp/_dependencies/source/0x2/deny-list/structs.js +0 -1187
  58. package/dist/src/typus-perp/_dependencies/source/0x2/display/structs.d.ts +0 -241
  59. package/dist/src/typus-perp/_dependencies/source/0x2/display/structs.js +0 -584
  60. package/dist/src/typus-perp/_dependencies/source/0x2/dynamic-field/structs.d.ts +0 -68
  61. package/dist/src/typus-perp/_dependencies/source/0x2/dynamic-field/structs.js +0 -256
  62. package/dist/src/typus-perp/_dependencies/source/0x2/dynamic-object-field/structs.d.ts +0 -47
  63. package/dist/src/typus-perp/_dependencies/source/0x2/dynamic-object-field/structs.js +0 -242
  64. package/dist/src/typus-perp/_dependencies/source/0x2/groth16/structs.d.ts +0 -204
  65. package/dist/src/typus-perp/_dependencies/source/0x2/groth16/structs.js +0 -720
  66. package/dist/src/typus-perp/_dependencies/source/0x2/group-ops/structs.d.ts +0 -50
  67. package/dist/src/typus-perp/_dependencies/source/0x2/group-ops/structs.js +0 -273
  68. package/dist/src/typus-perp/_dependencies/source/0x2/index.d.ts +0 -3
  69. package/dist/src/typus-perp/_dependencies/source/0x2/index.js +0 -6
  70. package/dist/src/typus-perp/_dependencies/source/0x2/init.d.ts +0 -2
  71. package/dist/src/typus-perp/_dependencies/source/0x2/init.js +0 -171
  72. package/dist/src/typus-perp/_dependencies/source/0x2/kiosk/structs.d.ts +0 -606
  73. package/dist/src/typus-perp/_dependencies/source/0x2/kiosk/structs.js +0 -1734
  74. package/dist/src/typus-perp/_dependencies/source/0x2/kiosk-extension/structs.d.ts +0 -121
  75. package/dist/src/typus-perp/_dependencies/source/0x2/kiosk-extension/structs.js +0 -400
  76. package/dist/src/typus-perp/_dependencies/source/0x2/linked-table/structs.d.ts +0 -153
  77. package/dist/src/typus-perp/_dependencies/source/0x2/linked-table/structs.js +0 -438
  78. package/dist/src/typus-perp/_dependencies/source/0x2/object/structs.d.ts +0 -92
  79. package/dist/src/typus-perp/_dependencies/source/0x2/object/structs.js +0 -377
  80. package/dist/src/typus-perp/_dependencies/source/0x2/object-bag/structs.d.ts +0 -61
  81. package/dist/src/typus-perp/_dependencies/source/0x2/object-bag/structs.js +0 -235
  82. package/dist/src/typus-perp/_dependencies/source/0x2/object-table/structs.d.ts +0 -61
  83. package/dist/src/typus-perp/_dependencies/source/0x2/object-table/structs.js +0 -248
  84. package/dist/src/typus-perp/_dependencies/source/0x2/package/structs.d.ts +0 -280
  85. package/dist/src/typus-perp/_dependencies/source/0x2/package/structs.js +0 -762
  86. package/dist/src/typus-perp/_dependencies/source/0x2/priority-queue/structs.d.ts +0 -111
  87. package/dist/src/typus-perp/_dependencies/source/0x2/priority-queue/structs.js +0 -444
  88. package/dist/src/typus-perp/_dependencies/source/0x2/random/structs.d.ts +0 -204
  89. package/dist/src/typus-perp/_dependencies/source/0x2/random/structs.js +0 -596
  90. package/dist/src/typus-perp/_dependencies/source/0x2/sui/structs.d.ts +0 -46
  91. package/dist/src/typus-perp/_dependencies/source/0x2/sui/structs.js +0 -228
  92. package/dist/src/typus-perp/_dependencies/source/0x2/table/structs.d.ts +0 -61
  93. package/dist/src/typus-perp/_dependencies/source/0x2/table/structs.js +0 -248
  94. package/dist/src/typus-perp/_dependencies/source/0x2/table-vec/structs.d.ts +0 -68
  95. package/dist/src/typus-perp/_dependencies/source/0x2/table-vec/structs.js +0 -274
  96. package/dist/src/typus-perp/_dependencies/source/0x2/token/structs.d.ts +0 -449
  97. package/dist/src/typus-perp/_dependencies/source/0x2/token/structs.js +0 -1107
  98. package/dist/src/typus-perp/_dependencies/source/0x2/transfer/structs.d.ts +0 -57
  99. package/dist/src/typus-perp/_dependencies/source/0x2/transfer/structs.js +0 -246
  100. package/dist/src/typus-perp/_dependencies/source/0x2/transfer-policy/structs.d.ts +0 -370
  101. package/dist/src/typus-perp/_dependencies/source/0x2/transfer-policy/structs.js +0 -1109
  102. package/dist/src/typus-perp/_dependencies/source/0x2/tx-context/structs.d.ts +0 -74
  103. package/dist/src/typus-perp/_dependencies/source/0x2/tx-context/structs.js +0 -289
  104. package/dist/src/typus-perp/_dependencies/source/0x2/url/structs.d.ts +0 -53
  105. package/dist/src/typus-perp/_dependencies/source/0x2/url/structs.js +0 -229
  106. package/dist/src/typus-perp/_dependencies/source/0x2/vec-map/structs.d.ts +0 -111
  107. package/dist/src/typus-perp/_dependencies/source/0x2/vec-map/structs.js +0 -446
  108. package/dist/src/typus-perp/_dependencies/source/0x2/vec-set/structs.d.ts +0 -51
  109. package/dist/src/typus-perp/_dependencies/source/0x2/vec-set/structs.js +0 -276
  110. package/dist/src/typus-perp/_dependencies/source/0x2/versioned/structs.d.ts +0 -113
  111. package/dist/src/typus-perp/_dependencies/source/0x2/versioned/structs.js +0 -389
  112. package/dist/src/typus-perp/_dependencies/source/0x2/zklogin-verified-id/structs.d.ts +0 -110
  113. package/dist/src/typus-perp/_dependencies/source/0x2/zklogin-verified-id/structs.js +0 -263
  114. package/dist/src/typus-perp/_dependencies/source/0x2/zklogin-verified-issuer/structs.d.ts +0 -74
  115. package/dist/src/typus-perp/_dependencies/source/0x2/zklogin-verified-issuer/structs.js +0 -245
  116. package/dist/src/typus-perp/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.d.ts +0 -3
  117. package/dist/src/typus-perp/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/index.js +0 -6
  118. package/dist/src/typus-perp/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.d.ts +0 -2
  119. package/dist/src/typus-perp/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/init.js +0 -40
  120. package/dist/src/typus-perp/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.d.ts +0 -55
  121. package/dist/src/typus-perp/_dependencies/source/0x277f90d256d1015a78cad646db091bec451c5bbab834b9fb70bace7885b5c698/validator/structs.js +0 -229
  122. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.d.ts +0 -4
  123. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/index.js +0 -7
  124. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.d.ts +0 -2
  125. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/init.js +0 -43
  126. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.d.ts +0 -46
  127. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/price-data-pull/structs.js +0 -228
  128. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.d.ts +0 -121
  129. package/dist/src/typus-perp/_dependencies/source/0x2fdff17b86e34ab722c8ba5e63f0da070d9a4163705b3fdc6a95802cab40a72a/suprasvaluefeed/structs.js +0 -401
  130. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.d.ts +0 -489
  131. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/airdrop/structs.js +0 -1102
  132. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/big-vector/structs.d.ts +0 -147
  133. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/big-vector/structs.js +0 -456
  134. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.d.ts +0 -239
  135. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/critbit/structs.js +0 -653
  136. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.d.ts +0 -405
  137. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/ecosystem/structs.js +0 -908
  138. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.d.ts +0 -8
  139. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/index.js +0 -11
  140. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/init.d.ts +0 -2
  141. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/init.js +0 -102
  142. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/keyed-big-vector/structs.d.ts +0 -227
  143. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/keyed-big-vector/structs.js +0 -632
  144. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.d.ts +0 -699
  145. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/leaderboard/structs.js +0 -1486
  146. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.d.ts +0 -161
  147. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-object-table/structs.js +0 -438
  148. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.d.ts +0 -147
  149. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/linked-set/structs.js +0 -430
  150. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tails-staking/structs.d.ts +0 -1071
  151. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tails-staking/structs.js +0 -2285
  152. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.d.ts +0 -279
  153. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/tgld/structs.js +0 -742
  154. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.d.ts +0 -328
  155. package/dist/src/typus-perp/_dependencies/source/0x4213e12a2220f15f1837a76897110d2260786558169bd8d0847f21e9b551f277/user/structs.js +0 -910
  156. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.d.ts +0 -628
  157. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/discount-mint/structs.js +0 -1345
  158. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.d.ts +0 -9
  159. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/index.js +0 -12
  160. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/init.d.ts +0 -2
  161. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/init.js +0 -72
  162. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/royalty-rule/structs.d.ts +0 -94
  163. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/royalty-rule/structs.js +0 -382
  164. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.d.ts +0 -454
  165. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/staking/structs.js +0 -896
  166. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/table-vec/structs.d.ts +0 -68
  167. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/table-vec/structs.js +0 -274
  168. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.d.ts +0 -1117
  169. package/dist/src/typus-perp/_dependencies/source/0x5cfd0819411be98034cba544cbffab192c2c35674a05ff57f4f1c5042875b828/typus-nft/structs.js +0 -2417
  170. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.d.ts +0 -1524
  171. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/auto-bid/structs.js +0 -3062
  172. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.d.ts +0 -10
  173. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/index.js +0 -13
  174. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/init.d.ts +0 -2
  175. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/init.js +0 -145
  176. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.d.ts +0 -1267
  177. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tails-staking/structs.js +0 -2856
  178. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.d.ts +0 -1412
  179. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-authorized-entry/structs.js +0 -1679
  180. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.d.ts +0 -425
  181. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-fee-pool-entry/structs.js +0 -1259
  182. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.d.ts +0 -1156
  183. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-registry-authorized-entry/structs.js +0 -1879
  184. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-view-function/structs.d.ts +0 -82
  185. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/tds-view-function/structs.js +0 -264
  186. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.d.ts +0 -5022
  187. package/dist/src/typus-perp/_dependencies/source/0x6c9a394a43844fc09d9617bc8a8e775a4521f0e28e83de1da780d043a498671f/typus-dov-single/structs.js +0 -7690
  188. package/dist/src/typus-perp/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.d.ts +0 -3
  189. package/dist/src/typus-perp/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/index.js +0 -6
  190. package/dist/src/typus-perp/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.d.ts +0 -2
  191. package/dist/src/typus-perp/_dependencies/source/0x7237ec8436ef7e927c45470db6db3a834dd84cf903aedee3844e847fe4805399/init.js +0 -4
  192. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.d.ts +0 -88
  193. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/authority/structs.js +0 -266
  194. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.d.ts +0 -347
  195. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/balance-pool/structs.js +0 -591
  196. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.d.ts +0 -73
  197. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/big-vector/structs.js +0 -258
  198. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.d.ts +0 -876
  199. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/dutch/structs.js +0 -1745
  200. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.d.ts +0 -46
  201. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/i64/structs.js +0 -224
  202. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.d.ts +0 -3
  203. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/index.js +0 -6
  204. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.d.ts +0 -2
  205. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/init.js +0 -89
  206. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.d.ts +0 -155
  207. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/linked-list/structs.js +0 -444
  208. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.d.ts +0 -2386
  209. package/dist/src/typus-perp/_dependencies/source/0x908a10789a1a6953e0b73a997c10e3552f7ce4e2907afd00a334ed74bd973ded/vault/structs.js +0 -5024
  210. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.d.ts +0 -745
  211. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/aggregator/structs.js +0 -1239
  212. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.d.ts +0 -3
  213. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/index.js +0 -6
  214. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.d.ts +0 -2
  215. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/init.js +0 -53
  216. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.d.ts +0 -87
  217. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/job/structs.js +0 -287
  218. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.d.ts +0 -58
  219. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/math/structs.js +0 -240
  220. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.d.ts +0 -121
  221. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/quote/structs.js +0 -332
  222. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.d.ts +0 -55
  223. package/dist/src/typus-perp/_dependencies/source/0x98670585b87e06628ef2d7f7cb1e7bee8ada65b43b82997935225a7e6e21d18e/switchboard/structs.js +0 -229
  224. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/batch-price-attestation/structs.d.ts +0 -289
  225. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/batch-price-attestation/structs.js +0 -453
  226. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/contract-upgrade/structs.d.ts +0 -114
  227. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/contract-upgrade/structs.js +0 -384
  228. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/data-source/structs.d.ts +0 -71
  229. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/data-source/structs.js +0 -235
  230. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/event/structs.d.ts +0 -209
  231. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/event/structs.js +0 -383
  232. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/governance/structs.d.ts +0 -73
  233. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/governance/structs.js +0 -275
  234. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/governance-action/structs.d.ts +0 -46
  235. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/governance-action/structs.js +0 -228
  236. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/governance-instruction/structs.d.ts +0 -77
  237. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/governance-instruction/structs.js +0 -281
  238. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/hot-potato-vector/structs.d.ts +0 -51
  239. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/hot-potato-vector/structs.js +0 -276
  240. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/i64/structs.d.ts +0 -52
  241. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/i64/structs.js +0 -234
  242. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/index.d.ts +0 -3
  243. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/index.js +0 -6
  244. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/init.d.ts +0 -2
  245. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/init.js +0 -95
  246. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/migrate/structs.d.ts +0 -51
  247. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/migrate/structs.js +0 -229
  248. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price/structs.d.ts +0 -89
  249. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price/structs.js +0 -247
  250. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-feed/structs.d.ts +0 -158
  251. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-feed/structs.js +0 -242
  252. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-identifier/structs.d.ts +0 -50
  253. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-identifier/structs.js +0 -262
  254. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-info/structs.d.ts +0 -360
  255. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-info/structs.js +0 -396
  256. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-status/structs.d.ts +0 -46
  257. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/price-status/structs.js +0 -228
  258. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set/structs.d.ts +0 -120
  259. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set/structs.js +0 -431
  260. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-data-sources/structs.d.ts +0 -81
  261. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-data-sources/structs.js +0 -263
  262. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-fee-recipient/structs.d.ts +0 -46
  263. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-fee-recipient/structs.js +0 -231
  264. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-governance-data-source/structs.d.ts +0 -77
  265. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-governance-data-source/structs.js +0 -241
  266. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-stale-price-threshold/structs.d.ts +0 -46
  267. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-stale-price-threshold/structs.js +0 -228
  268. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-update-fee/structs.d.ts +0 -52
  269. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/set-update-fee/structs.js +0 -234
  270. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/setup/structs.d.ts +0 -55
  271. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/setup/structs.js +0 -229
  272. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/state/structs.d.ts +0 -282
  273. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/state/structs.js +0 -573
  274. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/version-control/structs.d.ts +0 -130
  275. package/dist/src/typus-perp/_dependencies/source/0xabf837e98c26087cba0883c0a7a28326b1fa3c5e1e2c5abdb486f9e8f594c837/version-control/structs.js +0 -524
  276. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.d.ts +0 -3
  277. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/index.js +0 -6
  278. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/init.d.ts +0 -2
  279. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/init.js +0 -46
  280. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.d.ts +0 -88
  281. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/kiosk-lock-rule/structs.js +0 -376
  282. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/royalty-rule/structs.d.ts +0 -94
  283. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/royalty-rule/structs.js +0 -382
  284. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.d.ts +0 -46
  285. package/dist/src/typus-perp/_dependencies/source/0xbd8fc1947cf119350184107a3087e2dc27efefa0dd82e25a1f699069fe81a585/witness-rule/structs.js +0 -239
  286. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/bytes20/structs.d.ts +0 -50
  287. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/bytes20/structs.js +0 -262
  288. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/bytes32/structs.d.ts +0 -50
  289. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/bytes32/structs.js +0 -262
  290. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/consumed-vaas/structs.d.ts +0 -77
  291. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/consumed-vaas/structs.js +0 -264
  292. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/cursor/structs.d.ts +0 -51
  293. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/cursor/structs.js +0 -276
  294. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/emitter/structs.d.ts +0 -153
  295. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/emitter/structs.js +0 -531
  296. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/external-address/structs.d.ts +0 -57
  297. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/external-address/structs.js +0 -229
  298. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/fee-collector/structs.d.ts +0 -63
  299. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/fee-collector/structs.js +0 -270
  300. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/governance-message/structs.d.ts +0 -168
  301. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/governance-message/structs.js +0 -470
  302. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/guardian/structs.d.ts +0 -57
  303. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/guardian/structs.js +0 -229
  304. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/guardian-set/structs.d.ts +0 -81
  305. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/guardian-set/structs.js +0 -275
  306. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/guardian-signature/structs.d.ts +0 -85
  307. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/guardian-signature/structs.js +0 -247
  308. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/index.d.ts +0 -3
  309. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/index.js +0 -6
  310. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/init.d.ts +0 -2
  311. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/init.js +0 -100
  312. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/migrate/structs.d.ts +0 -51
  313. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/migrate/structs.js +0 -229
  314. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/package-utils/structs.d.ts +0 -194
  315. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/package-utils/structs.js +0 -680
  316. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/publish-message/structs.d.ts +0 -151
  317. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/publish-message/structs.js +0 -459
  318. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/set/structs.d.ts +0 -110
  319. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/set/structs.js +0 -422
  320. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/set-fee/structs.d.ts +0 -88
  321. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/set-fee/structs.js +0 -376
  322. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/setup/structs.d.ts +0 -55
  323. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/setup/structs.js +0 -229
  324. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/state/structs.d.ts +0 -278
  325. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/state/structs.js +0 -465
  326. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/transfer-fee/structs.d.ts +0 -94
  327. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/transfer-fee/structs.js +0 -385
  328. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/update-guardian-set/structs.d.ts +0 -159
  329. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/update-guardian-set/structs.js +0 -565
  330. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/upgrade-contract/structs.d.ts +0 -156
  331. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/upgrade-contract/structs.js +0 -532
  332. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/vaa/structs.d.ts +0 -128
  333. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/vaa/structs.js +0 -312
  334. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/version-control/structs.d.ts +0 -88
  335. package/dist/src/typus-perp/_dependencies/source/0xf47329f4344f3bf0f8e436e2f7b485466cff300f12a166563995d3888c296a94/version-control/structs.js +0 -376
  336. package/dist/src/typus-perp/_framework/init-loader.d.ts +0 -2
  337. package/dist/src/typus-perp/_framework/init-loader.js +0 -73
  338. package/dist/src/typus-perp/_framework/loader.d.ts +0 -17
  339. package/dist/src/typus-perp/_framework/loader.js +0 -108
  340. package/dist/src/typus-perp/_framework/reified.d.ts +0 -108
  341. package/dist/src/typus-perp/_framework/reified.js +0 -237
  342. package/dist/src/typus-perp/_framework/util.d.ts +0 -35
  343. package/dist/src/typus-perp/_framework/util.js +0 -396
  344. package/dist/src/typus-perp/_framework/vector.d.ts +0 -35
  345. package/dist/src/typus-perp/_framework/vector.js +0 -112
  346. package/dist/src/typus-perp/fetch.d.ts +0 -17
  347. package/dist/src/typus-perp/fetch.js +0 -410
  348. package/dist/src/typus-perp/index.d.ts +0 -5
  349. package/dist/src/typus-perp/index.js +0 -29
  350. package/dist/src/typus-perp/readVec.d.ts +0 -3
  351. package/dist/src/typus-perp/readVec.js +0 -117
  352. package/dist/src/typus-perp/typus_perp/admin/functions.d.ts +0 -50
  353. package/dist/src/typus-perp/typus_perp/admin/functions.js +0 -116
  354. package/dist/src/typus-perp/typus_perp/admin/structs.d.ts +0 -447
  355. package/dist/src/typus-perp/typus_perp/admin/structs.js +0 -908
  356. package/dist/src/typus-perp/typus_perp/index.d.ts +0 -3
  357. package/dist/src/typus-perp/typus_perp/index.js +0 -6
  358. package/dist/src/typus-perp/typus_perp/init.d.ts +0 -2
  359. package/dist/src/typus-perp/typus_perp/init.js +0 -117
  360. package/dist/src/typus-perp/typus_perp/lp-pool/functions.d.ts +0 -342
  361. package/dist/src/typus-perp/typus_perp/lp-pool/functions.js +0 -517
  362. package/dist/src/typus-perp/typus_perp/lp-pool/structs.d.ts +0 -3088
  363. package/dist/src/typus-perp/typus_perp/lp-pool/structs.js +0 -4810
  364. package/dist/src/typus-perp/typus_perp/math/functions.d.ts +0 -18
  365. package/dist/src/typus-perp/typus_perp/math/functions.js +0 -49
  366. package/dist/src/typus-perp/typus_perp/oracle/functions.d.ts +0 -13
  367. package/dist/src/typus-perp/typus_perp/oracle/functions.js +0 -25
  368. package/dist/src/typus-perp/typus_perp/oracle/structs.d.ts +0 -111
  369. package/dist/src/typus-perp/typus_perp/oracle/structs.js +0 -395
  370. package/dist/src/typus-perp/typus_perp/position/functions.d.ts +0 -343
  371. package/dist/src/typus-perp/typus_perp/position/functions.js +0 -659
  372. package/dist/src/typus-perp/typus_perp/position/structs.d.ts +0 -1174
  373. package/dist/src/typus-perp/typus_perp/position/structs.js +0 -1634
  374. package/dist/src/typus-perp/typus_perp/symbol/functions.d.ts +0 -9
  375. package/dist/src/typus-perp/typus_perp/symbol/functions.js +0 -33
  376. package/dist/src/typus-perp/typus_perp/symbol/structs.d.ts +0 -81
  377. package/dist/src/typus-perp/typus_perp/symbol/structs.js +0 -235
  378. package/dist/src/typus-perp/typus_perp/tlp/functions.d.ts +0 -19
  379. package/dist/src/typus-perp/typus_perp/tlp/functions.js +0 -41
  380. package/dist/src/typus-perp/typus_perp/tlp/structs.d.ts +0 -97
  381. package/dist/src/typus-perp/typus_perp/tlp/structs.js +0 -377
  382. package/dist/src/typus-perp/typus_perp/token-interface/functions.d.ts +0 -11
  383. package/dist/src/typus-perp/typus_perp/token-interface/functions.js +0 -20
  384. package/dist/src/typus-perp/typus_perp/trading/functions.d.ts +0 -493
  385. package/dist/src/typus-perp/typus_perp/trading/functions.js +0 -711
  386. package/dist/src/typus-perp/typus_perp/trading/structs.d.ts +0 -2993
  387. package/dist/src/typus-perp/typus_perp/trading/structs.js +0 -5012
  388. package/dist/src/typus-perp/typus_perp/treasury-caps/functions.d.ts +0 -9
  389. package/dist/src/typus-perp/typus_perp/treasury-caps/functions.js +0 -35
  390. package/dist/src/typus-perp/typus_perp/treasury-caps/structs.d.ts +0 -55
  391. package/dist/src/typus-perp/typus_perp/treasury-caps/structs.js +0 -229
  392. package/dist/src/typus-perp/typus_stake_pool/admin/functions.d.ts +0 -50
  393. package/dist/src/typus-perp/typus_stake_pool/admin/functions.js +0 -116
  394. package/dist/src/typus-perp/typus_stake_pool/admin/structs.d.ts +0 -447
  395. package/dist/src/typus-perp/typus_stake_pool/admin/structs.js +0 -908
  396. package/dist/src/typus-perp/typus_stake_pool/index.d.ts +0 -3
  397. package/dist/src/typus-perp/typus_stake_pool/index.js +0 -6
  398. package/dist/src/typus-perp/typus_stake_pool/init.d.ts +0 -2
  399. package/dist/src/typus-perp/typus_stake_pool/init.js +0 -67
  400. package/dist/src/typus-perp/typus_stake_pool/stake-pool/functions.d.ts +0 -175
  401. package/dist/src/typus-perp/typus_stake_pool/stake-pool/functions.js +0 -275
  402. package/dist/src/typus-perp/typus_stake_pool/stake-pool/structs.d.ts +0 -2179
  403. package/dist/src/typus-perp/typus_stake_pool/stake-pool/structs.js +0 -3949
  404. package/dist/src/typus-perp/user/index.d.ts +0 -3
  405. package/dist/src/typus-perp/user/index.js +0 -19
  406. package/dist/src/typus-perp/user/order.d.ts +0 -29
  407. package/dist/src/typus-perp/user/order.js +0 -206
  408. package/dist/src/typus-perp/user/orderWithBidReceipt.d.ts +0 -22
  409. package/dist/src/typus-perp/user/orderWithBidReceipt.js +0 -144
  410. package/dist/src/typus-perp/user/tlp.d.ts +0 -32
  411. package/dist/src/typus-perp/user/tlp.js +0 -267
@@ -1,1734 +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 () {
30
- var ownKeys = function(o) {
31
- ownKeys = Object.getOwnPropertyNames || function (o) {
32
- var ar = [];
33
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
- return ar;
35
- };
36
- return ownKeys(o);
37
- };
38
- return function (mod) {
39
- if (mod && mod.__esModule) return mod;
40
- var result = {};
41
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
- __setModuleDefault(result, mod);
43
- return result;
44
- };
45
- })();
46
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
47
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
48
- return new (P || (P = Promise))(function (resolve, reject) {
49
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
50
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
51
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
52
- step((generator = generator.apply(thisArg, _arguments || [])).next());
53
- });
54
- };
55
- var __generator = (this && this.__generator) || function (thisArg, body) {
56
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
57
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
58
- function verb(n) { return function (v) { return step([n, v]); }; }
59
- function step(op) {
60
- if (f) throw new TypeError("Generator is already executing.");
61
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
62
- 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;
63
- if (y = 0, t) op = [op[0] & 2, t.value];
64
- switch (op[0]) {
65
- case 0: case 1: t = op; break;
66
- case 4: _.label++; return { value: op[1], done: false };
67
- case 5: _.label++; y = op[1]; op = [0]; continue;
68
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
69
- default:
70
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
71
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
72
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
73
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
74
- if (t[2]) _.ops.pop();
75
- _.trys.pop(); continue;
76
- }
77
- op = body.call(thisArg, _);
78
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
79
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
80
- }
81
- };
82
- var __read = (this && this.__read) || function (o, n) {
83
- var m = typeof Symbol === "function" && o[Symbol.iterator];
84
- if (!m) return o;
85
- var i = m.call(o), r, ar = [], e;
86
- try {
87
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
88
- }
89
- catch (error) { e = { error: error }; }
90
- finally {
91
- try {
92
- if (r && !r.done && (m = i["return"])) m.call(i);
93
- }
94
- finally { if (e) throw e.error; }
95
- }
96
- return ar;
97
- };
98
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
99
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
100
- if (ar || !(i in from)) {
101
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
102
- ar[i] = from[i];
103
- }
104
- }
105
- return to.concat(ar || Array.prototype.slice.call(from));
106
- };
107
- Object.defineProperty(exports, "__esModule", { value: true });
108
- exports.PurchaseCap = exports.Lock = exports.Listing = exports.KioskOwnerCap = exports.Kiosk = exports.ItemPurchased = exports.ItemListed = exports.ItemDelisted = exports.Item = exports.Borrow = void 0;
109
- exports.isBorrow = isBorrow;
110
- exports.isItem = isItem;
111
- exports.isItemDelisted = isItemDelisted;
112
- exports.isItemListed = isItemListed;
113
- exports.isItemPurchased = isItemPurchased;
114
- exports.isKiosk = isKiosk;
115
- exports.isKioskOwnerCap = isKioskOwnerCap;
116
- exports.isListing = isListing;
117
- exports.isLock = isLock;
118
- exports.isPurchaseCap = isPurchaseCap;
119
- var reified = __importStar(require("../../../../_framework/reified"));
120
- var reified_1 = require("../../../../_framework/reified");
121
- var util_1 = require("../../../../_framework/util");
122
- var structs_1 = require("../balance/structs");
123
- var index_1 = require("../index");
124
- var structs_2 = require("../object/structs");
125
- var structs_3 = require("../sui/structs");
126
- var bcs_1 = require("@mysten/sui/bcs");
127
- var utils_1 = require("@mysten/sui/utils");
128
- /* ============================== Borrow =============================== */
129
- function isBorrow(type) {
130
- type = (0, util_1.compressSuiType)(type);
131
- return type === "".concat(index_1.PKG_V26, "::kiosk::Borrow");
132
- }
133
- var Borrow = /** @class */ (function () {
134
- function Borrow(typeArgs, fields) {
135
- this.__StructClass = true;
136
- this.$typeName = Borrow.$typeName;
137
- this.$isPhantom = Borrow.$isPhantom;
138
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Borrow.$typeName], __read(typeArgs), false));
139
- this.$typeArgs = typeArgs;
140
- this.kioskId = fields.kioskId;
141
- this.itemId = fields.itemId;
142
- }
143
- Borrow.reified = function () {
144
- var _this = this;
145
- return {
146
- typeName: Borrow.$typeName,
147
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Borrow.$typeName], [], false)),
148
- typeArgs: [],
149
- isPhantom: Borrow.$isPhantom,
150
- reifiedTypeArgs: [],
151
- fromFields: function (fields) { return Borrow.fromFields(fields); },
152
- fromFieldsWithTypes: function (item) { return Borrow.fromFieldsWithTypes(item); },
153
- fromBcs: function (data) { return Borrow.fromBcs(data); },
154
- bcs: Borrow.bcs,
155
- fromJSONField: function (field) { return Borrow.fromJSONField(field); },
156
- fromJSON: function (json) { return Borrow.fromJSON(json); },
157
- fromSuiParsedData: function (content) { return Borrow.fromSuiParsedData(content); },
158
- fromSuiObjectData: function (content) { return Borrow.fromSuiObjectData(content); },
159
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
160
- return [2 /*return*/, Borrow.fetch(client, id)];
161
- }); }); },
162
- new: function (fields) {
163
- return new Borrow([], fields);
164
- },
165
- kind: "StructClassReified",
166
- };
167
- };
168
- Object.defineProperty(Borrow, "r", {
169
- get: function () {
170
- return Borrow.reified();
171
- },
172
- enumerable: false,
173
- configurable: true
174
- });
175
- Borrow.phantom = function () {
176
- return (0, reified_1.phantom)(Borrow.reified());
177
- };
178
- Object.defineProperty(Borrow, "p", {
179
- get: function () {
180
- return Borrow.phantom();
181
- },
182
- enumerable: false,
183
- configurable: true
184
- });
185
- Object.defineProperty(Borrow, "bcs", {
186
- get: function () {
187
- return bcs_1.bcs.struct("Borrow", {
188
- kiosk_id: structs_2.ID.bcs,
189
- item_id: structs_2.ID.bcs,
190
- });
191
- },
192
- enumerable: false,
193
- configurable: true
194
- });
195
- Borrow.fromFields = function (fields) {
196
- return Borrow.reified().new({
197
- kioskId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.kiosk_id),
198
- itemId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.item_id),
199
- });
200
- };
201
- Borrow.fromFieldsWithTypes = function (item) {
202
- if (!isBorrow(item.type)) {
203
- throw new Error("not a Borrow type");
204
- }
205
- return Borrow.reified().new({
206
- kioskId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.kiosk_id),
207
- itemId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.item_id),
208
- });
209
- };
210
- Borrow.fromBcs = function (data) {
211
- return Borrow.fromFields(Borrow.bcs.parse(data));
212
- };
213
- Borrow.prototype.toJSONField = function () {
214
- return {
215
- kioskId: this.kioskId,
216
- itemId: this.itemId,
217
- };
218
- };
219
- Borrow.prototype.toJSON = function () {
220
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
221
- };
222
- Borrow.fromJSONField = function (field) {
223
- return Borrow.reified().new({
224
- kioskId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.kioskId),
225
- itemId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.itemId),
226
- });
227
- };
228
- Borrow.fromJSON = function (json) {
229
- if (json.$typeName !== Borrow.$typeName) {
230
- throw new Error("not a WithTwoGenerics json object");
231
- }
232
- return Borrow.fromJSONField(json);
233
- };
234
- Borrow.fromSuiParsedData = function (content) {
235
- if (content.dataType !== "moveObject") {
236
- throw new Error("not an object");
237
- }
238
- if (!isBorrow(content.type)) {
239
- throw new Error("object at ".concat(content.fields.id, " is not a Borrow object"));
240
- }
241
- return Borrow.fromFieldsWithTypes(content);
242
- };
243
- Borrow.fromSuiObjectData = function (data) {
244
- if (data.bcs) {
245
- if (data.bcs.dataType !== "moveObject" || !isBorrow(data.bcs.type)) {
246
- throw new Error("object at is not a Borrow object");
247
- }
248
- return Borrow.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
249
- }
250
- if (data.content) {
251
- return Borrow.fromSuiParsedData(data.content);
252
- }
253
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
254
- };
255
- Borrow.fetch = function (client, id) {
256
- return __awaiter(this, void 0, void 0, function () {
257
- var res;
258
- var _a, _b;
259
- return __generator(this, function (_c) {
260
- switch (_c.label) {
261
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
262
- case 1:
263
- res = _c.sent();
264
- if (res.error) {
265
- throw new Error("error fetching Borrow object at id ".concat(id, ": ").concat(res.error.code));
266
- }
267
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isBorrow(res.data.bcs.type)) {
268
- throw new Error("object at id ".concat(id, " is not a Borrow object"));
269
- }
270
- return [2 /*return*/, Borrow.fromSuiObjectData(res.data)];
271
- }
272
- });
273
- });
274
- };
275
- Borrow.$typeName = "".concat(index_1.PKG_V26, "::kiosk::Borrow");
276
- Borrow.$numTypeParams = 0;
277
- Borrow.$isPhantom = [];
278
- return Borrow;
279
- }());
280
- exports.Borrow = Borrow;
281
- /* ============================== Item =============================== */
282
- function isItem(type) {
283
- type = (0, util_1.compressSuiType)(type);
284
- return type === "".concat(index_1.PKG_V26, "::kiosk::Item");
285
- }
286
- var Item = /** @class */ (function () {
287
- function Item(typeArgs, fields) {
288
- this.__StructClass = true;
289
- this.$typeName = Item.$typeName;
290
- this.$isPhantom = Item.$isPhantom;
291
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Item.$typeName], __read(typeArgs), false));
292
- this.$typeArgs = typeArgs;
293
- this.id = fields.id;
294
- }
295
- Item.reified = function () {
296
- var _this = this;
297
- return {
298
- typeName: Item.$typeName,
299
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Item.$typeName], [], false)),
300
- typeArgs: [],
301
- isPhantom: Item.$isPhantom,
302
- reifiedTypeArgs: [],
303
- fromFields: function (fields) { return Item.fromFields(fields); },
304
- fromFieldsWithTypes: function (item) { return Item.fromFieldsWithTypes(item); },
305
- fromBcs: function (data) { return Item.fromBcs(data); },
306
- bcs: Item.bcs,
307
- fromJSONField: function (field) { return Item.fromJSONField(field); },
308
- fromJSON: function (json) { return Item.fromJSON(json); },
309
- fromSuiParsedData: function (content) { return Item.fromSuiParsedData(content); },
310
- fromSuiObjectData: function (content) { return Item.fromSuiObjectData(content); },
311
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
312
- return [2 /*return*/, Item.fetch(client, id)];
313
- }); }); },
314
- new: function (fields) {
315
- return new Item([], fields);
316
- },
317
- kind: "StructClassReified",
318
- };
319
- };
320
- Object.defineProperty(Item, "r", {
321
- get: function () {
322
- return Item.reified();
323
- },
324
- enumerable: false,
325
- configurable: true
326
- });
327
- Item.phantom = function () {
328
- return (0, reified_1.phantom)(Item.reified());
329
- };
330
- Object.defineProperty(Item, "p", {
331
- get: function () {
332
- return Item.phantom();
333
- },
334
- enumerable: false,
335
- configurable: true
336
- });
337
- Object.defineProperty(Item, "bcs", {
338
- get: function () {
339
- return bcs_1.bcs.struct("Item", {
340
- id: structs_2.ID.bcs,
341
- });
342
- },
343
- enumerable: false,
344
- configurable: true
345
- });
346
- Item.fromFields = function (fields) {
347
- return Item.reified().new({
348
- id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
349
- });
350
- };
351
- Item.fromFieldsWithTypes = function (item) {
352
- if (!isItem(item.type)) {
353
- throw new Error("not a Item type");
354
- }
355
- return Item.reified().new({
356
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
357
- });
358
- };
359
- Item.fromBcs = function (data) {
360
- return Item.fromFields(Item.bcs.parse(data));
361
- };
362
- Item.prototype.toJSONField = function () {
363
- return {
364
- id: this.id,
365
- };
366
- };
367
- Item.prototype.toJSON = function () {
368
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
369
- };
370
- Item.fromJSONField = function (field) {
371
- return Item.reified().new({
372
- id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
373
- });
374
- };
375
- Item.fromJSON = function (json) {
376
- if (json.$typeName !== Item.$typeName) {
377
- throw new Error("not a WithTwoGenerics json object");
378
- }
379
- return Item.fromJSONField(json);
380
- };
381
- Item.fromSuiParsedData = function (content) {
382
- if (content.dataType !== "moveObject") {
383
- throw new Error("not an object");
384
- }
385
- if (!isItem(content.type)) {
386
- throw new Error("object at ".concat(content.fields.id, " is not a Item object"));
387
- }
388
- return Item.fromFieldsWithTypes(content);
389
- };
390
- Item.fromSuiObjectData = function (data) {
391
- if (data.bcs) {
392
- if (data.bcs.dataType !== "moveObject" || !isItem(data.bcs.type)) {
393
- throw new Error("object at is not a Item object");
394
- }
395
- return Item.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
396
- }
397
- if (data.content) {
398
- return Item.fromSuiParsedData(data.content);
399
- }
400
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
401
- };
402
- Item.fetch = function (client, id) {
403
- return __awaiter(this, void 0, void 0, function () {
404
- var res;
405
- var _a, _b;
406
- return __generator(this, function (_c) {
407
- switch (_c.label) {
408
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
409
- case 1:
410
- res = _c.sent();
411
- if (res.error) {
412
- throw new Error("error fetching Item object at id ".concat(id, ": ").concat(res.error.code));
413
- }
414
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isItem(res.data.bcs.type)) {
415
- throw new Error("object at id ".concat(id, " is not a Item object"));
416
- }
417
- return [2 /*return*/, Item.fromSuiObjectData(res.data)];
418
- }
419
- });
420
- });
421
- };
422
- Item.$typeName = "".concat(index_1.PKG_V26, "::kiosk::Item");
423
- Item.$numTypeParams = 0;
424
- Item.$isPhantom = [];
425
- return Item;
426
- }());
427
- exports.Item = Item;
428
- /* ============================== ItemDelisted =============================== */
429
- function isItemDelisted(type) {
430
- type = (0, util_1.compressSuiType)(type);
431
- return type.startsWith("".concat(index_1.PKG_V26, "::kiosk::ItemDelisted") + "<");
432
- }
433
- var ItemDelisted = /** @class */ (function () {
434
- function ItemDelisted(typeArgs, fields) {
435
- this.__StructClass = true;
436
- this.$typeName = ItemDelisted.$typeName;
437
- this.$isPhantom = ItemDelisted.$isPhantom;
438
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ItemDelisted.$typeName], __read(typeArgs), false));
439
- this.$typeArgs = typeArgs;
440
- this.kiosk = fields.kiosk;
441
- this.id = fields.id;
442
- }
443
- ItemDelisted.reified = function (T) {
444
- var _this = this;
445
- return {
446
- typeName: ItemDelisted.$typeName,
447
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ItemDelisted.$typeName], [(0, reified_1.extractType)(T)], false)),
448
- typeArgs: [(0, reified_1.extractType)(T)],
449
- isPhantom: ItemDelisted.$isPhantom,
450
- reifiedTypeArgs: [T],
451
- fromFields: function (fields) { return ItemDelisted.fromFields(T, fields); },
452
- fromFieldsWithTypes: function (item) { return ItemDelisted.fromFieldsWithTypes(T, item); },
453
- fromBcs: function (data) { return ItemDelisted.fromBcs(T, data); },
454
- bcs: ItemDelisted.bcs,
455
- fromJSONField: function (field) { return ItemDelisted.fromJSONField(T, field); },
456
- fromJSON: function (json) { return ItemDelisted.fromJSON(T, json); },
457
- fromSuiParsedData: function (content) { return ItemDelisted.fromSuiParsedData(T, content); },
458
- fromSuiObjectData: function (content) { return ItemDelisted.fromSuiObjectData(T, content); },
459
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
460
- return [2 /*return*/, ItemDelisted.fetch(client, T, id)];
461
- }); }); },
462
- new: function (fields) {
463
- return new ItemDelisted([(0, reified_1.extractType)(T)], fields);
464
- },
465
- kind: "StructClassReified",
466
- };
467
- };
468
- Object.defineProperty(ItemDelisted, "r", {
469
- get: function () {
470
- return ItemDelisted.reified;
471
- },
472
- enumerable: false,
473
- configurable: true
474
- });
475
- ItemDelisted.phantom = function (T) {
476
- return (0, reified_1.phantom)(ItemDelisted.reified(T));
477
- };
478
- Object.defineProperty(ItemDelisted, "p", {
479
- get: function () {
480
- return ItemDelisted.phantom;
481
- },
482
- enumerable: false,
483
- configurable: true
484
- });
485
- Object.defineProperty(ItemDelisted, "bcs", {
486
- get: function () {
487
- return bcs_1.bcs.struct("ItemDelisted", {
488
- kiosk: structs_2.ID.bcs,
489
- id: structs_2.ID.bcs,
490
- });
491
- },
492
- enumerable: false,
493
- configurable: true
494
- });
495
- ItemDelisted.fromFields = function (typeArg, fields) {
496
- return ItemDelisted.reified(typeArg).new({
497
- kiosk: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.kiosk),
498
- id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
499
- });
500
- };
501
- ItemDelisted.fromFieldsWithTypes = function (typeArg, item) {
502
- if (!isItemDelisted(item.type)) {
503
- throw new Error("not a ItemDelisted type");
504
- }
505
- (0, reified_1.assertFieldsWithTypesArgsMatch)(item, [typeArg]);
506
- return ItemDelisted.reified(typeArg).new({
507
- kiosk: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.kiosk),
508
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
509
- });
510
- };
511
- ItemDelisted.fromBcs = function (typeArg, data) {
512
- return ItemDelisted.fromFields(typeArg, ItemDelisted.bcs.parse(data));
513
- };
514
- ItemDelisted.prototype.toJSONField = function () {
515
- return {
516
- kiosk: this.kiosk,
517
- id: this.id,
518
- };
519
- };
520
- ItemDelisted.prototype.toJSON = function () {
521
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
522
- };
523
- ItemDelisted.fromJSONField = function (typeArg, field) {
524
- return ItemDelisted.reified(typeArg).new({
525
- kiosk: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.kiosk),
526
- id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
527
- });
528
- };
529
- ItemDelisted.fromJSON = function (typeArg, json) {
530
- if (json.$typeName !== ItemDelisted.$typeName) {
531
- throw new Error("not a WithTwoGenerics json object");
532
- }
533
- (0, reified_1.assertReifiedTypeArgsMatch)((0, util_1.composeSuiType)(ItemDelisted.$typeName, (0, reified_1.extractType)(typeArg)), json.$typeArgs, [typeArg]);
534
- return ItemDelisted.fromJSONField(typeArg, json);
535
- };
536
- ItemDelisted.fromSuiParsedData = function (typeArg, content) {
537
- if (content.dataType !== "moveObject") {
538
- throw new Error("not an object");
539
- }
540
- if (!isItemDelisted(content.type)) {
541
- throw new Error("object at ".concat(content.fields.id, " is not a ItemDelisted object"));
542
- }
543
- return ItemDelisted.fromFieldsWithTypes(typeArg, content);
544
- };
545
- ItemDelisted.fromSuiObjectData = function (typeArg, data) {
546
- if (data.bcs) {
547
- if (data.bcs.dataType !== "moveObject" || !isItemDelisted(data.bcs.type)) {
548
- throw new Error("object at is not a ItemDelisted object");
549
- }
550
- var gotTypeArgs = (0, util_1.parseTypeName)(data.bcs.type).typeArgs;
551
- if (gotTypeArgs.length !== 1) {
552
- throw new Error("type argument mismatch: expected 1 type argument but got '".concat(gotTypeArgs.length, "'"));
553
- }
554
- var gotTypeArg = (0, util_1.compressSuiType)(gotTypeArgs[0]);
555
- var expectedTypeArg = (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg));
556
- if (gotTypeArg !== (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg))) {
557
- throw new Error("type argument mismatch: expected '".concat(expectedTypeArg, "' but got '").concat(gotTypeArg, "'"));
558
- }
559
- return ItemDelisted.fromBcs(typeArg, (0, utils_1.fromB64)(data.bcs.bcsBytes));
560
- }
561
- if (data.content) {
562
- return ItemDelisted.fromSuiParsedData(typeArg, data.content);
563
- }
564
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
565
- };
566
- ItemDelisted.fetch = function (client, typeArg, id) {
567
- return __awaiter(this, void 0, void 0, function () {
568
- var res;
569
- var _a, _b;
570
- return __generator(this, function (_c) {
571
- switch (_c.label) {
572
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
573
- case 1:
574
- res = _c.sent();
575
- if (res.error) {
576
- throw new Error("error fetching ItemDelisted object at id ".concat(id, ": ").concat(res.error.code));
577
- }
578
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isItemDelisted(res.data.bcs.type)) {
579
- throw new Error("object at id ".concat(id, " is not a ItemDelisted object"));
580
- }
581
- return [2 /*return*/, ItemDelisted.fromSuiObjectData(typeArg, res.data)];
582
- }
583
- });
584
- });
585
- };
586
- ItemDelisted.$typeName = "".concat(index_1.PKG_V26, "::kiosk::ItemDelisted");
587
- ItemDelisted.$numTypeParams = 1;
588
- ItemDelisted.$isPhantom = [true];
589
- return ItemDelisted;
590
- }());
591
- exports.ItemDelisted = ItemDelisted;
592
- /* ============================== ItemListed =============================== */
593
- function isItemListed(type) {
594
- type = (0, util_1.compressSuiType)(type);
595
- return type.startsWith("".concat(index_1.PKG_V26, "::kiosk::ItemListed") + "<");
596
- }
597
- var ItemListed = /** @class */ (function () {
598
- function ItemListed(typeArgs, fields) {
599
- this.__StructClass = true;
600
- this.$typeName = ItemListed.$typeName;
601
- this.$isPhantom = ItemListed.$isPhantom;
602
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ItemListed.$typeName], __read(typeArgs), false));
603
- this.$typeArgs = typeArgs;
604
- this.kiosk = fields.kiosk;
605
- this.id = fields.id;
606
- this.price = fields.price;
607
- }
608
- ItemListed.reified = function (T) {
609
- var _this = this;
610
- return {
611
- typeName: ItemListed.$typeName,
612
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ItemListed.$typeName], [(0, reified_1.extractType)(T)], false)),
613
- typeArgs: [(0, reified_1.extractType)(T)],
614
- isPhantom: ItemListed.$isPhantom,
615
- reifiedTypeArgs: [T],
616
- fromFields: function (fields) { return ItemListed.fromFields(T, fields); },
617
- fromFieldsWithTypes: function (item) { return ItemListed.fromFieldsWithTypes(T, item); },
618
- fromBcs: function (data) { return ItemListed.fromBcs(T, data); },
619
- bcs: ItemListed.bcs,
620
- fromJSONField: function (field) { return ItemListed.fromJSONField(T, field); },
621
- fromJSON: function (json) { return ItemListed.fromJSON(T, json); },
622
- fromSuiParsedData: function (content) { return ItemListed.fromSuiParsedData(T, content); },
623
- fromSuiObjectData: function (content) { return ItemListed.fromSuiObjectData(T, content); },
624
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
625
- return [2 /*return*/, ItemListed.fetch(client, T, id)];
626
- }); }); },
627
- new: function (fields) {
628
- return new ItemListed([(0, reified_1.extractType)(T)], fields);
629
- },
630
- kind: "StructClassReified",
631
- };
632
- };
633
- Object.defineProperty(ItemListed, "r", {
634
- get: function () {
635
- return ItemListed.reified;
636
- },
637
- enumerable: false,
638
- configurable: true
639
- });
640
- ItemListed.phantom = function (T) {
641
- return (0, reified_1.phantom)(ItemListed.reified(T));
642
- };
643
- Object.defineProperty(ItemListed, "p", {
644
- get: function () {
645
- return ItemListed.phantom;
646
- },
647
- enumerable: false,
648
- configurable: true
649
- });
650
- Object.defineProperty(ItemListed, "bcs", {
651
- get: function () {
652
- return bcs_1.bcs.struct("ItemListed", {
653
- kiosk: structs_2.ID.bcs,
654
- id: structs_2.ID.bcs,
655
- price: bcs_1.bcs.u64(),
656
- });
657
- },
658
- enumerable: false,
659
- configurable: true
660
- });
661
- ItemListed.fromFields = function (typeArg, fields) {
662
- return ItemListed.reified(typeArg).new({
663
- kiosk: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.kiosk),
664
- id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
665
- price: (0, reified_1.decodeFromFields)("u64", fields.price),
666
- });
667
- };
668
- ItemListed.fromFieldsWithTypes = function (typeArg, item) {
669
- if (!isItemListed(item.type)) {
670
- throw new Error("not a ItemListed type");
671
- }
672
- (0, reified_1.assertFieldsWithTypesArgsMatch)(item, [typeArg]);
673
- return ItemListed.reified(typeArg).new({
674
- kiosk: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.kiosk),
675
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
676
- price: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.price),
677
- });
678
- };
679
- ItemListed.fromBcs = function (typeArg, data) {
680
- return ItemListed.fromFields(typeArg, ItemListed.bcs.parse(data));
681
- };
682
- ItemListed.prototype.toJSONField = function () {
683
- return {
684
- kiosk: this.kiosk,
685
- id: this.id,
686
- price: this.price.toString(),
687
- };
688
- };
689
- ItemListed.prototype.toJSON = function () {
690
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
691
- };
692
- ItemListed.fromJSONField = function (typeArg, field) {
693
- return ItemListed.reified(typeArg).new({
694
- kiosk: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.kiosk),
695
- id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
696
- price: (0, reified_1.decodeFromJSONField)("u64", field.price),
697
- });
698
- };
699
- ItemListed.fromJSON = function (typeArg, json) {
700
- if (json.$typeName !== ItemListed.$typeName) {
701
- throw new Error("not a WithTwoGenerics json object");
702
- }
703
- (0, reified_1.assertReifiedTypeArgsMatch)((0, util_1.composeSuiType)(ItemListed.$typeName, (0, reified_1.extractType)(typeArg)), json.$typeArgs, [typeArg]);
704
- return ItemListed.fromJSONField(typeArg, json);
705
- };
706
- ItemListed.fromSuiParsedData = function (typeArg, content) {
707
- if (content.dataType !== "moveObject") {
708
- throw new Error("not an object");
709
- }
710
- if (!isItemListed(content.type)) {
711
- throw new Error("object at ".concat(content.fields.id, " is not a ItemListed object"));
712
- }
713
- return ItemListed.fromFieldsWithTypes(typeArg, content);
714
- };
715
- ItemListed.fromSuiObjectData = function (typeArg, data) {
716
- if (data.bcs) {
717
- if (data.bcs.dataType !== "moveObject" || !isItemListed(data.bcs.type)) {
718
- throw new Error("object at is not a ItemListed object");
719
- }
720
- var gotTypeArgs = (0, util_1.parseTypeName)(data.bcs.type).typeArgs;
721
- if (gotTypeArgs.length !== 1) {
722
- throw new Error("type argument mismatch: expected 1 type argument but got '".concat(gotTypeArgs.length, "'"));
723
- }
724
- var gotTypeArg = (0, util_1.compressSuiType)(gotTypeArgs[0]);
725
- var expectedTypeArg = (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg));
726
- if (gotTypeArg !== (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg))) {
727
- throw new Error("type argument mismatch: expected '".concat(expectedTypeArg, "' but got '").concat(gotTypeArg, "'"));
728
- }
729
- return ItemListed.fromBcs(typeArg, (0, utils_1.fromB64)(data.bcs.bcsBytes));
730
- }
731
- if (data.content) {
732
- return ItemListed.fromSuiParsedData(typeArg, data.content);
733
- }
734
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
735
- };
736
- ItemListed.fetch = function (client, typeArg, id) {
737
- return __awaiter(this, void 0, void 0, function () {
738
- var res;
739
- var _a, _b;
740
- return __generator(this, function (_c) {
741
- switch (_c.label) {
742
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
743
- case 1:
744
- res = _c.sent();
745
- if (res.error) {
746
- throw new Error("error fetching ItemListed object at id ".concat(id, ": ").concat(res.error.code));
747
- }
748
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isItemListed(res.data.bcs.type)) {
749
- throw new Error("object at id ".concat(id, " is not a ItemListed object"));
750
- }
751
- return [2 /*return*/, ItemListed.fromSuiObjectData(typeArg, res.data)];
752
- }
753
- });
754
- });
755
- };
756
- ItemListed.$typeName = "".concat(index_1.PKG_V26, "::kiosk::ItemListed");
757
- ItemListed.$numTypeParams = 1;
758
- ItemListed.$isPhantom = [true];
759
- return ItemListed;
760
- }());
761
- exports.ItemListed = ItemListed;
762
- /* ============================== ItemPurchased =============================== */
763
- function isItemPurchased(type) {
764
- type = (0, util_1.compressSuiType)(type);
765
- return type.startsWith("".concat(index_1.PKG_V26, "::kiosk::ItemPurchased") + "<");
766
- }
767
- var ItemPurchased = /** @class */ (function () {
768
- function ItemPurchased(typeArgs, fields) {
769
- this.__StructClass = true;
770
- this.$typeName = ItemPurchased.$typeName;
771
- this.$isPhantom = ItemPurchased.$isPhantom;
772
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([ItemPurchased.$typeName], __read(typeArgs), false));
773
- this.$typeArgs = typeArgs;
774
- this.kiosk = fields.kiosk;
775
- this.id = fields.id;
776
- this.price = fields.price;
777
- }
778
- ItemPurchased.reified = function (T) {
779
- var _this = this;
780
- return {
781
- typeName: ItemPurchased.$typeName,
782
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([ItemPurchased.$typeName], [(0, reified_1.extractType)(T)], false)),
783
- typeArgs: [(0, reified_1.extractType)(T)],
784
- isPhantom: ItemPurchased.$isPhantom,
785
- reifiedTypeArgs: [T],
786
- fromFields: function (fields) { return ItemPurchased.fromFields(T, fields); },
787
- fromFieldsWithTypes: function (item) { return ItemPurchased.fromFieldsWithTypes(T, item); },
788
- fromBcs: function (data) { return ItemPurchased.fromBcs(T, data); },
789
- bcs: ItemPurchased.bcs,
790
- fromJSONField: function (field) { return ItemPurchased.fromJSONField(T, field); },
791
- fromJSON: function (json) { return ItemPurchased.fromJSON(T, json); },
792
- fromSuiParsedData: function (content) { return ItemPurchased.fromSuiParsedData(T, content); },
793
- fromSuiObjectData: function (content) { return ItemPurchased.fromSuiObjectData(T, content); },
794
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
795
- return [2 /*return*/, ItemPurchased.fetch(client, T, id)];
796
- }); }); },
797
- new: function (fields) {
798
- return new ItemPurchased([(0, reified_1.extractType)(T)], fields);
799
- },
800
- kind: "StructClassReified",
801
- };
802
- };
803
- Object.defineProperty(ItemPurchased, "r", {
804
- get: function () {
805
- return ItemPurchased.reified;
806
- },
807
- enumerable: false,
808
- configurable: true
809
- });
810
- ItemPurchased.phantom = function (T) {
811
- return (0, reified_1.phantom)(ItemPurchased.reified(T));
812
- };
813
- Object.defineProperty(ItemPurchased, "p", {
814
- get: function () {
815
- return ItemPurchased.phantom;
816
- },
817
- enumerable: false,
818
- configurable: true
819
- });
820
- Object.defineProperty(ItemPurchased, "bcs", {
821
- get: function () {
822
- return bcs_1.bcs.struct("ItemPurchased", {
823
- kiosk: structs_2.ID.bcs,
824
- id: structs_2.ID.bcs,
825
- price: bcs_1.bcs.u64(),
826
- });
827
- },
828
- enumerable: false,
829
- configurable: true
830
- });
831
- ItemPurchased.fromFields = function (typeArg, fields) {
832
- return ItemPurchased.reified(typeArg).new({
833
- kiosk: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.kiosk),
834
- id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
835
- price: (0, reified_1.decodeFromFields)("u64", fields.price),
836
- });
837
- };
838
- ItemPurchased.fromFieldsWithTypes = function (typeArg, item) {
839
- if (!isItemPurchased(item.type)) {
840
- throw new Error("not a ItemPurchased type");
841
- }
842
- (0, reified_1.assertFieldsWithTypesArgsMatch)(item, [typeArg]);
843
- return ItemPurchased.reified(typeArg).new({
844
- kiosk: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.kiosk),
845
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
846
- price: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.price),
847
- });
848
- };
849
- ItemPurchased.fromBcs = function (typeArg, data) {
850
- return ItemPurchased.fromFields(typeArg, ItemPurchased.bcs.parse(data));
851
- };
852
- ItemPurchased.prototype.toJSONField = function () {
853
- return {
854
- kiosk: this.kiosk,
855
- id: this.id,
856
- price: this.price.toString(),
857
- };
858
- };
859
- ItemPurchased.prototype.toJSON = function () {
860
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
861
- };
862
- ItemPurchased.fromJSONField = function (typeArg, field) {
863
- return ItemPurchased.reified(typeArg).new({
864
- kiosk: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.kiosk),
865
- id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
866
- price: (0, reified_1.decodeFromJSONField)("u64", field.price),
867
- });
868
- };
869
- ItemPurchased.fromJSON = function (typeArg, json) {
870
- if (json.$typeName !== ItemPurchased.$typeName) {
871
- throw new Error("not a WithTwoGenerics json object");
872
- }
873
- (0, reified_1.assertReifiedTypeArgsMatch)((0, util_1.composeSuiType)(ItemPurchased.$typeName, (0, reified_1.extractType)(typeArg)), json.$typeArgs, [typeArg]);
874
- return ItemPurchased.fromJSONField(typeArg, json);
875
- };
876
- ItemPurchased.fromSuiParsedData = function (typeArg, content) {
877
- if (content.dataType !== "moveObject") {
878
- throw new Error("not an object");
879
- }
880
- if (!isItemPurchased(content.type)) {
881
- throw new Error("object at ".concat(content.fields.id, " is not a ItemPurchased object"));
882
- }
883
- return ItemPurchased.fromFieldsWithTypes(typeArg, content);
884
- };
885
- ItemPurchased.fromSuiObjectData = function (typeArg, data) {
886
- if (data.bcs) {
887
- if (data.bcs.dataType !== "moveObject" || !isItemPurchased(data.bcs.type)) {
888
- throw new Error("object at is not a ItemPurchased object");
889
- }
890
- var gotTypeArgs = (0, util_1.parseTypeName)(data.bcs.type).typeArgs;
891
- if (gotTypeArgs.length !== 1) {
892
- throw new Error("type argument mismatch: expected 1 type argument but got '".concat(gotTypeArgs.length, "'"));
893
- }
894
- var gotTypeArg = (0, util_1.compressSuiType)(gotTypeArgs[0]);
895
- var expectedTypeArg = (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg));
896
- if (gotTypeArg !== (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg))) {
897
- throw new Error("type argument mismatch: expected '".concat(expectedTypeArg, "' but got '").concat(gotTypeArg, "'"));
898
- }
899
- return ItemPurchased.fromBcs(typeArg, (0, utils_1.fromB64)(data.bcs.bcsBytes));
900
- }
901
- if (data.content) {
902
- return ItemPurchased.fromSuiParsedData(typeArg, data.content);
903
- }
904
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
905
- };
906
- ItemPurchased.fetch = function (client, typeArg, id) {
907
- return __awaiter(this, void 0, void 0, function () {
908
- var res;
909
- var _a, _b;
910
- return __generator(this, function (_c) {
911
- switch (_c.label) {
912
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
913
- case 1:
914
- res = _c.sent();
915
- if (res.error) {
916
- throw new Error("error fetching ItemPurchased object at id ".concat(id, ": ").concat(res.error.code));
917
- }
918
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isItemPurchased(res.data.bcs.type)) {
919
- throw new Error("object at id ".concat(id, " is not a ItemPurchased object"));
920
- }
921
- return [2 /*return*/, ItemPurchased.fromSuiObjectData(typeArg, res.data)];
922
- }
923
- });
924
- });
925
- };
926
- ItemPurchased.$typeName = "".concat(index_1.PKG_V26, "::kiosk::ItemPurchased");
927
- ItemPurchased.$numTypeParams = 1;
928
- ItemPurchased.$isPhantom = [true];
929
- return ItemPurchased;
930
- }());
931
- exports.ItemPurchased = ItemPurchased;
932
- /* ============================== Kiosk =============================== */
933
- function isKiosk(type) {
934
- type = (0, util_1.compressSuiType)(type);
935
- return type === "".concat(index_1.PKG_V26, "::kiosk::Kiosk");
936
- }
937
- var Kiosk = /** @class */ (function () {
938
- function Kiosk(typeArgs, fields) {
939
- this.__StructClass = true;
940
- this.$typeName = Kiosk.$typeName;
941
- this.$isPhantom = Kiosk.$isPhantom;
942
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Kiosk.$typeName], __read(typeArgs), false));
943
- this.$typeArgs = typeArgs;
944
- this.id = fields.id;
945
- this.profits = fields.profits;
946
- this.owner = fields.owner;
947
- this.itemCount = fields.itemCount;
948
- this.allowExtensions = fields.allowExtensions;
949
- }
950
- Kiosk.reified = function () {
951
- var _this = this;
952
- return {
953
- typeName: Kiosk.$typeName,
954
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Kiosk.$typeName], [], false)),
955
- typeArgs: [],
956
- isPhantom: Kiosk.$isPhantom,
957
- reifiedTypeArgs: [],
958
- fromFields: function (fields) { return Kiosk.fromFields(fields); },
959
- fromFieldsWithTypes: function (item) { return Kiosk.fromFieldsWithTypes(item); },
960
- fromBcs: function (data) { return Kiosk.fromBcs(data); },
961
- bcs: Kiosk.bcs,
962
- fromJSONField: function (field) { return Kiosk.fromJSONField(field); },
963
- fromJSON: function (json) { return Kiosk.fromJSON(json); },
964
- fromSuiParsedData: function (content) { return Kiosk.fromSuiParsedData(content); },
965
- fromSuiObjectData: function (content) { return Kiosk.fromSuiObjectData(content); },
966
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
967
- return [2 /*return*/, Kiosk.fetch(client, id)];
968
- }); }); },
969
- new: function (fields) {
970
- return new Kiosk([], fields);
971
- },
972
- kind: "StructClassReified",
973
- };
974
- };
975
- Object.defineProperty(Kiosk, "r", {
976
- get: function () {
977
- return Kiosk.reified();
978
- },
979
- enumerable: false,
980
- configurable: true
981
- });
982
- Kiosk.phantom = function () {
983
- return (0, reified_1.phantom)(Kiosk.reified());
984
- };
985
- Object.defineProperty(Kiosk, "p", {
986
- get: function () {
987
- return Kiosk.phantom();
988
- },
989
- enumerable: false,
990
- configurable: true
991
- });
992
- Object.defineProperty(Kiosk, "bcs", {
993
- get: function () {
994
- return bcs_1.bcs.struct("Kiosk", {
995
- id: structs_2.UID.bcs,
996
- profits: structs_1.Balance.bcs,
997
- owner: bcs_1.bcs.bytes(32).transform({
998
- input: function (val) { return (0, utils_1.fromHEX)(val); },
999
- output: function (val) { return (0, utils_1.toHEX)(val); },
1000
- }),
1001
- item_count: bcs_1.bcs.u32(),
1002
- allow_extensions: bcs_1.bcs.bool(),
1003
- });
1004
- },
1005
- enumerable: false,
1006
- configurable: true
1007
- });
1008
- Kiosk.fromFields = function (fields) {
1009
- return Kiosk.reified().new({
1010
- id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
1011
- profits: (0, reified_1.decodeFromFields)(structs_1.Balance.reified(reified.phantom(structs_3.SUI.reified())), fields.profits),
1012
- owner: (0, reified_1.decodeFromFields)("address", fields.owner),
1013
- itemCount: (0, reified_1.decodeFromFields)("u32", fields.item_count),
1014
- allowExtensions: (0, reified_1.decodeFromFields)("bool", fields.allow_extensions),
1015
- });
1016
- };
1017
- Kiosk.fromFieldsWithTypes = function (item) {
1018
- if (!isKiosk(item.type)) {
1019
- throw new Error("not a Kiosk type");
1020
- }
1021
- return Kiosk.reified().new({
1022
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
1023
- profits: (0, reified_1.decodeFromFieldsWithTypes)(structs_1.Balance.reified(reified.phantom(structs_3.SUI.reified())), item.fields.profits),
1024
- owner: (0, reified_1.decodeFromFieldsWithTypes)("address", item.fields.owner),
1025
- itemCount: (0, reified_1.decodeFromFieldsWithTypes)("u32", item.fields.item_count),
1026
- allowExtensions: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.allow_extensions),
1027
- });
1028
- };
1029
- Kiosk.fromBcs = function (data) {
1030
- return Kiosk.fromFields(Kiosk.bcs.parse(data));
1031
- };
1032
- Kiosk.prototype.toJSONField = function () {
1033
- return {
1034
- id: this.id,
1035
- profits: this.profits.toJSONField(),
1036
- owner: this.owner,
1037
- itemCount: this.itemCount,
1038
- allowExtensions: this.allowExtensions,
1039
- };
1040
- };
1041
- Kiosk.prototype.toJSON = function () {
1042
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1043
- };
1044
- Kiosk.fromJSONField = function (field) {
1045
- return Kiosk.reified().new({
1046
- id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
1047
- profits: (0, reified_1.decodeFromJSONField)(structs_1.Balance.reified(reified.phantom(structs_3.SUI.reified())), field.profits),
1048
- owner: (0, reified_1.decodeFromJSONField)("address", field.owner),
1049
- itemCount: (0, reified_1.decodeFromJSONField)("u32", field.itemCount),
1050
- allowExtensions: (0, reified_1.decodeFromJSONField)("bool", field.allowExtensions),
1051
- });
1052
- };
1053
- Kiosk.fromJSON = function (json) {
1054
- if (json.$typeName !== Kiosk.$typeName) {
1055
- throw new Error("not a WithTwoGenerics json object");
1056
- }
1057
- return Kiosk.fromJSONField(json);
1058
- };
1059
- Kiosk.fromSuiParsedData = function (content) {
1060
- if (content.dataType !== "moveObject") {
1061
- throw new Error("not an object");
1062
- }
1063
- if (!isKiosk(content.type)) {
1064
- throw new Error("object at ".concat(content.fields.id, " is not a Kiosk object"));
1065
- }
1066
- return Kiosk.fromFieldsWithTypes(content);
1067
- };
1068
- Kiosk.fromSuiObjectData = function (data) {
1069
- if (data.bcs) {
1070
- if (data.bcs.dataType !== "moveObject" || !isKiosk(data.bcs.type)) {
1071
- throw new Error("object at is not a Kiosk object");
1072
- }
1073
- return Kiosk.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1074
- }
1075
- if (data.content) {
1076
- return Kiosk.fromSuiParsedData(data.content);
1077
- }
1078
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1079
- };
1080
- Kiosk.fetch = function (client, id) {
1081
- return __awaiter(this, void 0, void 0, function () {
1082
- var res;
1083
- var _a, _b;
1084
- return __generator(this, function (_c) {
1085
- switch (_c.label) {
1086
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1087
- case 1:
1088
- res = _c.sent();
1089
- if (res.error) {
1090
- throw new Error("error fetching Kiosk object at id ".concat(id, ": ").concat(res.error.code));
1091
- }
1092
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isKiosk(res.data.bcs.type)) {
1093
- throw new Error("object at id ".concat(id, " is not a Kiosk object"));
1094
- }
1095
- return [2 /*return*/, Kiosk.fromSuiObjectData(res.data)];
1096
- }
1097
- });
1098
- });
1099
- };
1100
- Kiosk.$typeName = "".concat(index_1.PKG_V26, "::kiosk::Kiosk");
1101
- Kiosk.$numTypeParams = 0;
1102
- Kiosk.$isPhantom = [];
1103
- return Kiosk;
1104
- }());
1105
- exports.Kiosk = Kiosk;
1106
- /* ============================== KioskOwnerCap =============================== */
1107
- function isKioskOwnerCap(type) {
1108
- type = (0, util_1.compressSuiType)(type);
1109
- return type === "".concat(index_1.PKG_V26, "::kiosk::KioskOwnerCap");
1110
- }
1111
- var KioskOwnerCap = /** @class */ (function () {
1112
- function KioskOwnerCap(typeArgs, fields) {
1113
- this.__StructClass = true;
1114
- this.$typeName = KioskOwnerCap.$typeName;
1115
- this.$isPhantom = KioskOwnerCap.$isPhantom;
1116
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([KioskOwnerCap.$typeName], __read(typeArgs), false));
1117
- this.$typeArgs = typeArgs;
1118
- this.id = fields.id;
1119
- this.for = fields.for;
1120
- }
1121
- KioskOwnerCap.reified = function () {
1122
- var _this = this;
1123
- return {
1124
- typeName: KioskOwnerCap.$typeName,
1125
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([KioskOwnerCap.$typeName], [], false)),
1126
- typeArgs: [],
1127
- isPhantom: KioskOwnerCap.$isPhantom,
1128
- reifiedTypeArgs: [],
1129
- fromFields: function (fields) { return KioskOwnerCap.fromFields(fields); },
1130
- fromFieldsWithTypes: function (item) { return KioskOwnerCap.fromFieldsWithTypes(item); },
1131
- fromBcs: function (data) { return KioskOwnerCap.fromBcs(data); },
1132
- bcs: KioskOwnerCap.bcs,
1133
- fromJSONField: function (field) { return KioskOwnerCap.fromJSONField(field); },
1134
- fromJSON: function (json) { return KioskOwnerCap.fromJSON(json); },
1135
- fromSuiParsedData: function (content) { return KioskOwnerCap.fromSuiParsedData(content); },
1136
- fromSuiObjectData: function (content) { return KioskOwnerCap.fromSuiObjectData(content); },
1137
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1138
- return [2 /*return*/, KioskOwnerCap.fetch(client, id)];
1139
- }); }); },
1140
- new: function (fields) {
1141
- return new KioskOwnerCap([], fields);
1142
- },
1143
- kind: "StructClassReified",
1144
- };
1145
- };
1146
- Object.defineProperty(KioskOwnerCap, "r", {
1147
- get: function () {
1148
- return KioskOwnerCap.reified();
1149
- },
1150
- enumerable: false,
1151
- configurable: true
1152
- });
1153
- KioskOwnerCap.phantom = function () {
1154
- return (0, reified_1.phantom)(KioskOwnerCap.reified());
1155
- };
1156
- Object.defineProperty(KioskOwnerCap, "p", {
1157
- get: function () {
1158
- return KioskOwnerCap.phantom();
1159
- },
1160
- enumerable: false,
1161
- configurable: true
1162
- });
1163
- Object.defineProperty(KioskOwnerCap, "bcs", {
1164
- get: function () {
1165
- return bcs_1.bcs.struct("KioskOwnerCap", {
1166
- id: structs_2.UID.bcs,
1167
- for: structs_2.ID.bcs,
1168
- });
1169
- },
1170
- enumerable: false,
1171
- configurable: true
1172
- });
1173
- KioskOwnerCap.fromFields = function (fields) {
1174
- return KioskOwnerCap.reified().new({
1175
- id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
1176
- for: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.for),
1177
- });
1178
- };
1179
- KioskOwnerCap.fromFieldsWithTypes = function (item) {
1180
- if (!isKioskOwnerCap(item.type)) {
1181
- throw new Error("not a KioskOwnerCap type");
1182
- }
1183
- return KioskOwnerCap.reified().new({
1184
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
1185
- for: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.for),
1186
- });
1187
- };
1188
- KioskOwnerCap.fromBcs = function (data) {
1189
- return KioskOwnerCap.fromFields(KioskOwnerCap.bcs.parse(data));
1190
- };
1191
- KioskOwnerCap.prototype.toJSONField = function () {
1192
- return {
1193
- id: this.id,
1194
- for: this.for,
1195
- };
1196
- };
1197
- KioskOwnerCap.prototype.toJSON = function () {
1198
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1199
- };
1200
- KioskOwnerCap.fromJSONField = function (field) {
1201
- return KioskOwnerCap.reified().new({
1202
- id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
1203
- for: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.for),
1204
- });
1205
- };
1206
- KioskOwnerCap.fromJSON = function (json) {
1207
- if (json.$typeName !== KioskOwnerCap.$typeName) {
1208
- throw new Error("not a WithTwoGenerics json object");
1209
- }
1210
- return KioskOwnerCap.fromJSONField(json);
1211
- };
1212
- KioskOwnerCap.fromSuiParsedData = function (content) {
1213
- if (content.dataType !== "moveObject") {
1214
- throw new Error("not an object");
1215
- }
1216
- if (!isKioskOwnerCap(content.type)) {
1217
- throw new Error("object at ".concat(content.fields.id, " is not a KioskOwnerCap object"));
1218
- }
1219
- return KioskOwnerCap.fromFieldsWithTypes(content);
1220
- };
1221
- KioskOwnerCap.fromSuiObjectData = function (data) {
1222
- if (data.bcs) {
1223
- if (data.bcs.dataType !== "moveObject" || !isKioskOwnerCap(data.bcs.type)) {
1224
- throw new Error("object at is not a KioskOwnerCap object");
1225
- }
1226
- return KioskOwnerCap.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1227
- }
1228
- if (data.content) {
1229
- return KioskOwnerCap.fromSuiParsedData(data.content);
1230
- }
1231
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1232
- };
1233
- KioskOwnerCap.fetch = function (client, id) {
1234
- return __awaiter(this, void 0, void 0, function () {
1235
- var res;
1236
- var _a, _b;
1237
- return __generator(this, function (_c) {
1238
- switch (_c.label) {
1239
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1240
- case 1:
1241
- res = _c.sent();
1242
- if (res.error) {
1243
- throw new Error("error fetching KioskOwnerCap object at id ".concat(id, ": ").concat(res.error.code));
1244
- }
1245
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isKioskOwnerCap(res.data.bcs.type)) {
1246
- throw new Error("object at id ".concat(id, " is not a KioskOwnerCap object"));
1247
- }
1248
- return [2 /*return*/, KioskOwnerCap.fromSuiObjectData(res.data)];
1249
- }
1250
- });
1251
- });
1252
- };
1253
- KioskOwnerCap.$typeName = "".concat(index_1.PKG_V26, "::kiosk::KioskOwnerCap");
1254
- KioskOwnerCap.$numTypeParams = 0;
1255
- KioskOwnerCap.$isPhantom = [];
1256
- return KioskOwnerCap;
1257
- }());
1258
- exports.KioskOwnerCap = KioskOwnerCap;
1259
- /* ============================== Listing =============================== */
1260
- function isListing(type) {
1261
- type = (0, util_1.compressSuiType)(type);
1262
- return type === "".concat(index_1.PKG_V26, "::kiosk::Listing");
1263
- }
1264
- var Listing = /** @class */ (function () {
1265
- function Listing(typeArgs, fields) {
1266
- this.__StructClass = true;
1267
- this.$typeName = Listing.$typeName;
1268
- this.$isPhantom = Listing.$isPhantom;
1269
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Listing.$typeName], __read(typeArgs), false));
1270
- this.$typeArgs = typeArgs;
1271
- this.id = fields.id;
1272
- this.isExclusive = fields.isExclusive;
1273
- }
1274
- Listing.reified = function () {
1275
- var _this = this;
1276
- return {
1277
- typeName: Listing.$typeName,
1278
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Listing.$typeName], [], false)),
1279
- typeArgs: [],
1280
- isPhantom: Listing.$isPhantom,
1281
- reifiedTypeArgs: [],
1282
- fromFields: function (fields) { return Listing.fromFields(fields); },
1283
- fromFieldsWithTypes: function (item) { return Listing.fromFieldsWithTypes(item); },
1284
- fromBcs: function (data) { return Listing.fromBcs(data); },
1285
- bcs: Listing.bcs,
1286
- fromJSONField: function (field) { return Listing.fromJSONField(field); },
1287
- fromJSON: function (json) { return Listing.fromJSON(json); },
1288
- fromSuiParsedData: function (content) { return Listing.fromSuiParsedData(content); },
1289
- fromSuiObjectData: function (content) { return Listing.fromSuiObjectData(content); },
1290
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1291
- return [2 /*return*/, Listing.fetch(client, id)];
1292
- }); }); },
1293
- new: function (fields) {
1294
- return new Listing([], fields);
1295
- },
1296
- kind: "StructClassReified",
1297
- };
1298
- };
1299
- Object.defineProperty(Listing, "r", {
1300
- get: function () {
1301
- return Listing.reified();
1302
- },
1303
- enumerable: false,
1304
- configurable: true
1305
- });
1306
- Listing.phantom = function () {
1307
- return (0, reified_1.phantom)(Listing.reified());
1308
- };
1309
- Object.defineProperty(Listing, "p", {
1310
- get: function () {
1311
- return Listing.phantom();
1312
- },
1313
- enumerable: false,
1314
- configurable: true
1315
- });
1316
- Object.defineProperty(Listing, "bcs", {
1317
- get: function () {
1318
- return bcs_1.bcs.struct("Listing", {
1319
- id: structs_2.ID.bcs,
1320
- is_exclusive: bcs_1.bcs.bool(),
1321
- });
1322
- },
1323
- enumerable: false,
1324
- configurable: true
1325
- });
1326
- Listing.fromFields = function (fields) {
1327
- return Listing.reified().new({
1328
- id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
1329
- isExclusive: (0, reified_1.decodeFromFields)("bool", fields.is_exclusive),
1330
- });
1331
- };
1332
- Listing.fromFieldsWithTypes = function (item) {
1333
- if (!isListing(item.type)) {
1334
- throw new Error("not a Listing type");
1335
- }
1336
- return Listing.reified().new({
1337
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
1338
- isExclusive: (0, reified_1.decodeFromFieldsWithTypes)("bool", item.fields.is_exclusive),
1339
- });
1340
- };
1341
- Listing.fromBcs = function (data) {
1342
- return Listing.fromFields(Listing.bcs.parse(data));
1343
- };
1344
- Listing.prototype.toJSONField = function () {
1345
- return {
1346
- id: this.id,
1347
- isExclusive: this.isExclusive,
1348
- };
1349
- };
1350
- Listing.prototype.toJSON = function () {
1351
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1352
- };
1353
- Listing.fromJSONField = function (field) {
1354
- return Listing.reified().new({
1355
- id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
1356
- isExclusive: (0, reified_1.decodeFromJSONField)("bool", field.isExclusive),
1357
- });
1358
- };
1359
- Listing.fromJSON = function (json) {
1360
- if (json.$typeName !== Listing.$typeName) {
1361
- throw new Error("not a WithTwoGenerics json object");
1362
- }
1363
- return Listing.fromJSONField(json);
1364
- };
1365
- Listing.fromSuiParsedData = function (content) {
1366
- if (content.dataType !== "moveObject") {
1367
- throw new Error("not an object");
1368
- }
1369
- if (!isListing(content.type)) {
1370
- throw new Error("object at ".concat(content.fields.id, " is not a Listing object"));
1371
- }
1372
- return Listing.fromFieldsWithTypes(content);
1373
- };
1374
- Listing.fromSuiObjectData = function (data) {
1375
- if (data.bcs) {
1376
- if (data.bcs.dataType !== "moveObject" || !isListing(data.bcs.type)) {
1377
- throw new Error("object at is not a Listing object");
1378
- }
1379
- return Listing.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1380
- }
1381
- if (data.content) {
1382
- return Listing.fromSuiParsedData(data.content);
1383
- }
1384
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1385
- };
1386
- Listing.fetch = function (client, id) {
1387
- return __awaiter(this, void 0, void 0, function () {
1388
- var res;
1389
- var _a, _b;
1390
- return __generator(this, function (_c) {
1391
- switch (_c.label) {
1392
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1393
- case 1:
1394
- res = _c.sent();
1395
- if (res.error) {
1396
- throw new Error("error fetching Listing object at id ".concat(id, ": ").concat(res.error.code));
1397
- }
1398
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isListing(res.data.bcs.type)) {
1399
- throw new Error("object at id ".concat(id, " is not a Listing object"));
1400
- }
1401
- return [2 /*return*/, Listing.fromSuiObjectData(res.data)];
1402
- }
1403
- });
1404
- });
1405
- };
1406
- Listing.$typeName = "".concat(index_1.PKG_V26, "::kiosk::Listing");
1407
- Listing.$numTypeParams = 0;
1408
- Listing.$isPhantom = [];
1409
- return Listing;
1410
- }());
1411
- exports.Listing = Listing;
1412
- /* ============================== Lock =============================== */
1413
- function isLock(type) {
1414
- type = (0, util_1.compressSuiType)(type);
1415
- return type === "".concat(index_1.PKG_V26, "::kiosk::Lock");
1416
- }
1417
- var Lock = /** @class */ (function () {
1418
- function Lock(typeArgs, fields) {
1419
- this.__StructClass = true;
1420
- this.$typeName = Lock.$typeName;
1421
- this.$isPhantom = Lock.$isPhantom;
1422
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([Lock.$typeName], __read(typeArgs), false));
1423
- this.$typeArgs = typeArgs;
1424
- this.id = fields.id;
1425
- }
1426
- Lock.reified = function () {
1427
- var _this = this;
1428
- return {
1429
- typeName: Lock.$typeName,
1430
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([Lock.$typeName], [], false)),
1431
- typeArgs: [],
1432
- isPhantom: Lock.$isPhantom,
1433
- reifiedTypeArgs: [],
1434
- fromFields: function (fields) { return Lock.fromFields(fields); },
1435
- fromFieldsWithTypes: function (item) { return Lock.fromFieldsWithTypes(item); },
1436
- fromBcs: function (data) { return Lock.fromBcs(data); },
1437
- bcs: Lock.bcs,
1438
- fromJSONField: function (field) { return Lock.fromJSONField(field); },
1439
- fromJSON: function (json) { return Lock.fromJSON(json); },
1440
- fromSuiParsedData: function (content) { return Lock.fromSuiParsedData(content); },
1441
- fromSuiObjectData: function (content) { return Lock.fromSuiObjectData(content); },
1442
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1443
- return [2 /*return*/, Lock.fetch(client, id)];
1444
- }); }); },
1445
- new: function (fields) {
1446
- return new Lock([], fields);
1447
- },
1448
- kind: "StructClassReified",
1449
- };
1450
- };
1451
- Object.defineProperty(Lock, "r", {
1452
- get: function () {
1453
- return Lock.reified();
1454
- },
1455
- enumerable: false,
1456
- configurable: true
1457
- });
1458
- Lock.phantom = function () {
1459
- return (0, reified_1.phantom)(Lock.reified());
1460
- };
1461
- Object.defineProperty(Lock, "p", {
1462
- get: function () {
1463
- return Lock.phantom();
1464
- },
1465
- enumerable: false,
1466
- configurable: true
1467
- });
1468
- Object.defineProperty(Lock, "bcs", {
1469
- get: function () {
1470
- return bcs_1.bcs.struct("Lock", {
1471
- id: structs_2.ID.bcs,
1472
- });
1473
- },
1474
- enumerable: false,
1475
- configurable: true
1476
- });
1477
- Lock.fromFields = function (fields) {
1478
- return Lock.reified().new({
1479
- id: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.id),
1480
- });
1481
- };
1482
- Lock.fromFieldsWithTypes = function (item) {
1483
- if (!isLock(item.type)) {
1484
- throw new Error("not a Lock type");
1485
- }
1486
- return Lock.reified().new({
1487
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.id),
1488
- });
1489
- };
1490
- Lock.fromBcs = function (data) {
1491
- return Lock.fromFields(Lock.bcs.parse(data));
1492
- };
1493
- Lock.prototype.toJSONField = function () {
1494
- return {
1495
- id: this.id,
1496
- };
1497
- };
1498
- Lock.prototype.toJSON = function () {
1499
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1500
- };
1501
- Lock.fromJSONField = function (field) {
1502
- return Lock.reified().new({
1503
- id: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.id),
1504
- });
1505
- };
1506
- Lock.fromJSON = function (json) {
1507
- if (json.$typeName !== Lock.$typeName) {
1508
- throw new Error("not a WithTwoGenerics json object");
1509
- }
1510
- return Lock.fromJSONField(json);
1511
- };
1512
- Lock.fromSuiParsedData = function (content) {
1513
- if (content.dataType !== "moveObject") {
1514
- throw new Error("not an object");
1515
- }
1516
- if (!isLock(content.type)) {
1517
- throw new Error("object at ".concat(content.fields.id, " is not a Lock object"));
1518
- }
1519
- return Lock.fromFieldsWithTypes(content);
1520
- };
1521
- Lock.fromSuiObjectData = function (data) {
1522
- if (data.bcs) {
1523
- if (data.bcs.dataType !== "moveObject" || !isLock(data.bcs.type)) {
1524
- throw new Error("object at is not a Lock object");
1525
- }
1526
- return Lock.fromBcs((0, utils_1.fromB64)(data.bcs.bcsBytes));
1527
- }
1528
- if (data.content) {
1529
- return Lock.fromSuiParsedData(data.content);
1530
- }
1531
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1532
- };
1533
- Lock.fetch = function (client, id) {
1534
- return __awaiter(this, void 0, void 0, function () {
1535
- var res;
1536
- var _a, _b;
1537
- return __generator(this, function (_c) {
1538
- switch (_c.label) {
1539
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1540
- case 1:
1541
- res = _c.sent();
1542
- if (res.error) {
1543
- throw new Error("error fetching Lock object at id ".concat(id, ": ").concat(res.error.code));
1544
- }
1545
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isLock(res.data.bcs.type)) {
1546
- throw new Error("object at id ".concat(id, " is not a Lock object"));
1547
- }
1548
- return [2 /*return*/, Lock.fromSuiObjectData(res.data)];
1549
- }
1550
- });
1551
- });
1552
- };
1553
- Lock.$typeName = "".concat(index_1.PKG_V26, "::kiosk::Lock");
1554
- Lock.$numTypeParams = 0;
1555
- Lock.$isPhantom = [];
1556
- return Lock;
1557
- }());
1558
- exports.Lock = Lock;
1559
- /* ============================== PurchaseCap =============================== */
1560
- function isPurchaseCap(type) {
1561
- type = (0, util_1.compressSuiType)(type);
1562
- return type.startsWith("".concat(index_1.PKG_V26, "::kiosk::PurchaseCap") + "<");
1563
- }
1564
- var PurchaseCap = /** @class */ (function () {
1565
- function PurchaseCap(typeArgs, fields) {
1566
- this.__StructClass = true;
1567
- this.$typeName = PurchaseCap.$typeName;
1568
- this.$isPhantom = PurchaseCap.$isPhantom;
1569
- this.$fullTypeName = util_1.composeSuiType.apply(void 0, __spreadArray([PurchaseCap.$typeName], __read(typeArgs), false));
1570
- this.$typeArgs = typeArgs;
1571
- this.id = fields.id;
1572
- this.kioskId = fields.kioskId;
1573
- this.itemId = fields.itemId;
1574
- this.minPrice = fields.minPrice;
1575
- }
1576
- PurchaseCap.reified = function (T) {
1577
- var _this = this;
1578
- return {
1579
- typeName: PurchaseCap.$typeName,
1580
- fullTypeName: util_1.composeSuiType.apply(void 0, __spreadArray([PurchaseCap.$typeName], [(0, reified_1.extractType)(T)], false)),
1581
- typeArgs: [(0, reified_1.extractType)(T)],
1582
- isPhantom: PurchaseCap.$isPhantom,
1583
- reifiedTypeArgs: [T],
1584
- fromFields: function (fields) { return PurchaseCap.fromFields(T, fields); },
1585
- fromFieldsWithTypes: function (item) { return PurchaseCap.fromFieldsWithTypes(T, item); },
1586
- fromBcs: function (data) { return PurchaseCap.fromBcs(T, data); },
1587
- bcs: PurchaseCap.bcs,
1588
- fromJSONField: function (field) { return PurchaseCap.fromJSONField(T, field); },
1589
- fromJSON: function (json) { return PurchaseCap.fromJSON(T, json); },
1590
- fromSuiParsedData: function (content) { return PurchaseCap.fromSuiParsedData(T, content); },
1591
- fromSuiObjectData: function (content) { return PurchaseCap.fromSuiObjectData(T, content); },
1592
- fetch: function (client, id) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
1593
- return [2 /*return*/, PurchaseCap.fetch(client, T, id)];
1594
- }); }); },
1595
- new: function (fields) {
1596
- return new PurchaseCap([(0, reified_1.extractType)(T)], fields);
1597
- },
1598
- kind: "StructClassReified",
1599
- };
1600
- };
1601
- Object.defineProperty(PurchaseCap, "r", {
1602
- get: function () {
1603
- return PurchaseCap.reified;
1604
- },
1605
- enumerable: false,
1606
- configurable: true
1607
- });
1608
- PurchaseCap.phantom = function (T) {
1609
- return (0, reified_1.phantom)(PurchaseCap.reified(T));
1610
- };
1611
- Object.defineProperty(PurchaseCap, "p", {
1612
- get: function () {
1613
- return PurchaseCap.phantom;
1614
- },
1615
- enumerable: false,
1616
- configurable: true
1617
- });
1618
- Object.defineProperty(PurchaseCap, "bcs", {
1619
- get: function () {
1620
- return bcs_1.bcs.struct("PurchaseCap", {
1621
- id: structs_2.UID.bcs,
1622
- kiosk_id: structs_2.ID.bcs,
1623
- item_id: structs_2.ID.bcs,
1624
- min_price: bcs_1.bcs.u64(),
1625
- });
1626
- },
1627
- enumerable: false,
1628
- configurable: true
1629
- });
1630
- PurchaseCap.fromFields = function (typeArg, fields) {
1631
- return PurchaseCap.reified(typeArg).new({
1632
- id: (0, reified_1.decodeFromFields)(structs_2.UID.reified(), fields.id),
1633
- kioskId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.kiosk_id),
1634
- itemId: (0, reified_1.decodeFromFields)(structs_2.ID.reified(), fields.item_id),
1635
- minPrice: (0, reified_1.decodeFromFields)("u64", fields.min_price),
1636
- });
1637
- };
1638
- PurchaseCap.fromFieldsWithTypes = function (typeArg, item) {
1639
- if (!isPurchaseCap(item.type)) {
1640
- throw new Error("not a PurchaseCap type");
1641
- }
1642
- (0, reified_1.assertFieldsWithTypesArgsMatch)(item, [typeArg]);
1643
- return PurchaseCap.reified(typeArg).new({
1644
- id: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.UID.reified(), item.fields.id),
1645
- kioskId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.kiosk_id),
1646
- itemId: (0, reified_1.decodeFromFieldsWithTypes)(structs_2.ID.reified(), item.fields.item_id),
1647
- minPrice: (0, reified_1.decodeFromFieldsWithTypes)("u64", item.fields.min_price),
1648
- });
1649
- };
1650
- PurchaseCap.fromBcs = function (typeArg, data) {
1651
- return PurchaseCap.fromFields(typeArg, PurchaseCap.bcs.parse(data));
1652
- };
1653
- PurchaseCap.prototype.toJSONField = function () {
1654
- return {
1655
- id: this.id,
1656
- kioskId: this.kioskId,
1657
- itemId: this.itemId,
1658
- minPrice: this.minPrice.toString(),
1659
- };
1660
- };
1661
- PurchaseCap.prototype.toJSON = function () {
1662
- return __assign({ $typeName: this.$typeName, $typeArgs: this.$typeArgs }, this.toJSONField());
1663
- };
1664
- PurchaseCap.fromJSONField = function (typeArg, field) {
1665
- return PurchaseCap.reified(typeArg).new({
1666
- id: (0, reified_1.decodeFromJSONField)(structs_2.UID.reified(), field.id),
1667
- kioskId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.kioskId),
1668
- itemId: (0, reified_1.decodeFromJSONField)(structs_2.ID.reified(), field.itemId),
1669
- minPrice: (0, reified_1.decodeFromJSONField)("u64", field.minPrice),
1670
- });
1671
- };
1672
- PurchaseCap.fromJSON = function (typeArg, json) {
1673
- if (json.$typeName !== PurchaseCap.$typeName) {
1674
- throw new Error("not a WithTwoGenerics json object");
1675
- }
1676
- (0, reified_1.assertReifiedTypeArgsMatch)((0, util_1.composeSuiType)(PurchaseCap.$typeName, (0, reified_1.extractType)(typeArg)), json.$typeArgs, [typeArg]);
1677
- return PurchaseCap.fromJSONField(typeArg, json);
1678
- };
1679
- PurchaseCap.fromSuiParsedData = function (typeArg, content) {
1680
- if (content.dataType !== "moveObject") {
1681
- throw new Error("not an object");
1682
- }
1683
- if (!isPurchaseCap(content.type)) {
1684
- throw new Error("object at ".concat(content.fields.id, " is not a PurchaseCap object"));
1685
- }
1686
- return PurchaseCap.fromFieldsWithTypes(typeArg, content);
1687
- };
1688
- PurchaseCap.fromSuiObjectData = function (typeArg, data) {
1689
- if (data.bcs) {
1690
- if (data.bcs.dataType !== "moveObject" || !isPurchaseCap(data.bcs.type)) {
1691
- throw new Error("object at is not a PurchaseCap object");
1692
- }
1693
- var gotTypeArgs = (0, util_1.parseTypeName)(data.bcs.type).typeArgs;
1694
- if (gotTypeArgs.length !== 1) {
1695
- throw new Error("type argument mismatch: expected 1 type argument but got '".concat(gotTypeArgs.length, "'"));
1696
- }
1697
- var gotTypeArg = (0, util_1.compressSuiType)(gotTypeArgs[0]);
1698
- var expectedTypeArg = (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg));
1699
- if (gotTypeArg !== (0, util_1.compressSuiType)((0, reified_1.extractType)(typeArg))) {
1700
- throw new Error("type argument mismatch: expected '".concat(expectedTypeArg, "' but got '").concat(gotTypeArg, "'"));
1701
- }
1702
- return PurchaseCap.fromBcs(typeArg, (0, utils_1.fromB64)(data.bcs.bcsBytes));
1703
- }
1704
- if (data.content) {
1705
- return PurchaseCap.fromSuiParsedData(typeArg, data.content);
1706
- }
1707
- throw new Error("Both `bcs` and `content` fields are missing from the data. Include `showBcs` or `showContent` in the request.");
1708
- };
1709
- PurchaseCap.fetch = function (client, typeArg, id) {
1710
- return __awaiter(this, void 0, void 0, function () {
1711
- var res;
1712
- var _a, _b;
1713
- return __generator(this, function (_c) {
1714
- switch (_c.label) {
1715
- case 0: return [4 /*yield*/, client.getObject({ id: id, options: { showBcs: true } })];
1716
- case 1:
1717
- res = _c.sent();
1718
- if (res.error) {
1719
- throw new Error("error fetching PurchaseCap object at id ".concat(id, ": ").concat(res.error.code));
1720
- }
1721
- if (((_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.bcs) === null || _b === void 0 ? void 0 : _b.dataType) !== "moveObject" || !isPurchaseCap(res.data.bcs.type)) {
1722
- throw new Error("object at id ".concat(id, " is not a PurchaseCap object"));
1723
- }
1724
- return [2 /*return*/, PurchaseCap.fromSuiObjectData(typeArg, res.data)];
1725
- }
1726
- });
1727
- });
1728
- };
1729
- PurchaseCap.$typeName = "".concat(index_1.PKG_V26, "::kiosk::PurchaseCap");
1730
- PurchaseCap.$numTypeParams = 1;
1731
- PurchaseCap.$isPhantom = [true];
1732
- return PurchaseCap;
1733
- }());
1734
- exports.PurchaseCap = PurchaseCap;