@mysten/sui 1.41.0 → 1.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (475) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/grpc/client.d.ts +7 -7
  3. package/dist/cjs/grpc/client.js +7 -7
  4. package/dist/cjs/grpc/client.js.map +2 -2
  5. package/dist/cjs/grpc/core.d.ts +1 -1
  6. package/dist/cjs/grpc/core.js +14 -19
  7. package/dist/cjs/grpc/core.js.map +2 -2
  8. package/dist/cjs/grpc/proto/google/protobuf/any.d.ts +6 -6
  9. package/dist/cjs/grpc/proto/google/protobuf/any.js +20 -20
  10. package/dist/cjs/grpc/proto/google/protobuf/any.js.map +2 -2
  11. package/dist/cjs/grpc/proto/google/protobuf/duration.d.ts +4 -4
  12. package/dist/cjs/grpc/proto/google/protobuf/duration.js +12 -8
  13. package/dist/cjs/grpc/proto/google/protobuf/duration.js.map +2 -2
  14. package/dist/cjs/grpc/proto/google/protobuf/empty.d.ts +1 -1
  15. package/dist/cjs/grpc/proto/google/protobuf/empty.js.map +2 -2
  16. package/dist/cjs/grpc/proto/google/protobuf/field_mask.d.ts +4 -4
  17. package/dist/cjs/grpc/proto/google/protobuf/field_mask.js +7 -8
  18. package/dist/cjs/grpc/proto/google/protobuf/field_mask.js.map +2 -2
  19. package/dist/cjs/grpc/proto/google/protobuf/struct.d.ts +10 -10
  20. package/dist/cjs/grpc/proto/google/protobuf/struct.js +17 -29
  21. package/dist/cjs/grpc/proto/google/protobuf/struct.js.map +2 -2
  22. package/dist/cjs/grpc/proto/google/protobuf/timestamp.d.ts +4 -4
  23. package/dist/cjs/grpc/proto/google/protobuf/timestamp.js +18 -21
  24. package/dist/cjs/grpc/proto/google/protobuf/timestamp.js.map +2 -2
  25. package/dist/cjs/grpc/proto/google/rpc/error_details.d.ts +2 -2
  26. package/dist/cjs/grpc/proto/google/rpc/error_details.js +11 -40
  27. package/dist/cjs/grpc/proto/google/rpc/error_details.js.map +2 -2
  28. package/dist/cjs/grpc/proto/google/rpc/status.d.ts +2 -2
  29. package/dist/cjs/grpc/proto/google/rpc/status.js +1 -1
  30. package/dist/cjs/grpc/proto/google/rpc/status.js.map +2 -2
  31. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/argument.d.ts +5 -5
  32. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/argument.js +2 -8
  33. package/dist/cjs/grpc/proto/sui/rpc/v2/argument.js.map +7 -0
  34. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/balance_change.d.ts +3 -3
  35. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/balance_change.js +1 -1
  36. package/dist/cjs/grpc/proto/sui/rpc/v2/balance_change.js.map +7 -0
  37. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/bcs.d.ts +3 -3
  38. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/bcs.js +1 -1
  39. package/dist/cjs/grpc/proto/sui/rpc/v2/bcs.js.map +7 -0
  40. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.d.ts +68 -0
  41. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/checkpoint.js +9 -12
  42. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.js.map +7 -0
  43. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/checkpoint_contents.d.ts +10 -10
  44. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/checkpoint_contents.js +6 -18
  45. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_contents.js.map +7 -0
  46. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/checkpoint_summary.d.ts +19 -19
  47. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/checkpoint_summary.js +16 -38
  48. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_summary.js.map +7 -0
  49. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/effects.d.ts +33 -28
  50. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/effects.js +23 -61
  51. package/dist/cjs/grpc/proto/sui/rpc/v2/effects.js.map +7 -0
  52. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/epoch.d.ts +10 -10
  53. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/epoch.js +9 -5
  54. package/dist/cjs/grpc/proto/sui/rpc/v2/epoch.js.map +7 -0
  55. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/error_reason.d.ts +1 -1
  56. package/dist/cjs/grpc/proto/sui/rpc/v2/error_reason.js.map +7 -0
  57. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/event.d.ts +10 -10
  58. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/event.js +4 -4
  59. package/dist/cjs/grpc/proto/sui/rpc/v2/event.js.map +7 -0
  60. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/executed_transaction.d.ts +19 -24
  61. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/executed_transaction.js +12 -36
  62. package/dist/cjs/grpc/proto/sui/rpc/v2/executed_transaction.js.map +7 -0
  63. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/execution_status.d.ts +56 -56
  64. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/execution_status.js +29 -87
  65. package/dist/cjs/grpc/proto/sui/rpc/v2/execution_status.js.map +7 -0
  66. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/gas_cost_summary.d.ts +3 -3
  67. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/gas_cost_summary.js +5 -1
  68. package/dist/cjs/grpc/proto/sui/rpc/v2/gas_cost_summary.js.map +7 -0
  69. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/input.d.ts +6 -6
  70. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/input.js +4 -9
  71. package/dist/cjs/grpc/proto/sui/rpc/v2/input.js.map +7 -0
  72. package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.d.ts +70 -0
  73. package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.js +88 -0
  74. package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.js.map +7 -0
  75. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.client.d.ts +95 -0
  76. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/ledger_service.client.js +15 -57
  77. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.client.js.map +7 -0
  78. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/ledger_service.d.ts +58 -58
  79. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/ledger_service.js +37 -58
  80. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.js.map +7 -0
  81. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/move_package.d.ts +49 -49
  82. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package.js +31 -140
  83. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package.js.map +7 -0
  84. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.client.d.ts +61 -0
  85. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package_service.client.js +9 -33
  86. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.client.js.map +7 -0
  87. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package_service.d.ts +28 -28
  88. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package_service.js +16 -26
  89. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.js.map +7 -0
  90. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.client.d.ts +14 -14
  91. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.client.js +5 -17
  92. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.client.js.map +7 -0
  93. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.d.ts +17 -17
  94. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.js +13 -24
  95. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.js.map +7 -0
  96. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/object.d.ts +31 -11
  97. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/object.js +19 -6
  98. package/dist/cjs/grpc/proto/sui/rpc/v2/object.js.map +7 -0
  99. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/object_reference.d.ts +3 -3
  100. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/object_reference.js +2 -1
  101. package/dist/cjs/grpc/proto/sui/rpc/v2/object_reference.js.map +7 -0
  102. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/owner.d.ts +5 -5
  103. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/owner.js +3 -8
  104. package/dist/cjs/grpc/proto/sui/rpc/v2/owner.js.map +7 -0
  105. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/protocol_config.d.ts +3 -3
  106. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/protocol_config.js +12 -23
  107. package/dist/cjs/grpc/proto/sui/rpc/v2/protocol_config.js.map +7 -0
  108. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/signature.d.ts +85 -72
  109. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/signature.js +44 -95
  110. package/dist/cjs/grpc/proto/sui/rpc/v2/signature.js.map +7 -0
  111. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/signature_scheme.d.ts +1 -1
  112. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_scheme.js.map +7 -0
  113. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_verification_service.client.d.ts +10 -10
  114. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_verification_service.client.js +3 -9
  115. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.client.js.map +7 -0
  116. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/signature_verification_service.d.ts +14 -14
  117. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_verification_service.js +8 -9
  118. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.js.map +7 -0
  119. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.d.ts +71 -0
  120. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.js +69 -0
  121. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.js.map +7 -0
  122. package/dist/{esm/grpc/proto/sui/rpc/v2beta2/live_data_service.d.ts → cjs/grpc/proto/sui/rpc/v2/state_service.d.ts} +70 -188
  123. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2/live_data_service.js → v2/state_service.js} +43 -195
  124. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.js.map +7 -0
  125. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/subscription_service.client.d.ts +12 -12
  126. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/subscription_service.client.js +4 -10
  127. package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.client.js.map +7 -0
  128. package/dist/{esm/grpc/proto/sui/rpc/v2beta2 → cjs/grpc/proto/sui/rpc/v2}/subscription_service.d.ts +11 -11
  129. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/subscription_service.js +7 -12
  130. package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.js.map +7 -0
  131. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/system_state.d.ts +39 -39
  132. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/system_state.js +68 -35
  133. package/dist/cjs/grpc/proto/sui/rpc/v2/system_state.js.map +7 -0
  134. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/transaction.d.ts +308 -288
  135. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/transaction.js +144 -339
  136. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction.js.map +7 -0
  137. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.ts +41 -0
  138. package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/transaction_execution_service.client.js +10 -12
  139. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js.map +7 -0
  140. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.d.ts +184 -0
  141. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.js +113 -0
  142. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.js.map +7 -0
  143. package/dist/cjs/version.d.ts +1 -1
  144. package/dist/cjs/version.js +1 -1
  145. package/dist/cjs/version.js.map +1 -1
  146. package/dist/esm/grpc/client.d.ts +7 -7
  147. package/dist/esm/grpc/client.js +7 -7
  148. package/dist/esm/grpc/client.js.map +2 -2
  149. package/dist/esm/grpc/core.d.ts +1 -1
  150. package/dist/esm/grpc/core.js +14 -19
  151. package/dist/esm/grpc/core.js.map +2 -2
  152. package/dist/esm/grpc/proto/google/protobuf/any.d.ts +6 -6
  153. package/dist/esm/grpc/proto/google/protobuf/any.js +20 -20
  154. package/dist/esm/grpc/proto/google/protobuf/any.js.map +2 -2
  155. package/dist/esm/grpc/proto/google/protobuf/duration.d.ts +4 -4
  156. package/dist/esm/grpc/proto/google/protobuf/duration.js +12 -8
  157. package/dist/esm/grpc/proto/google/protobuf/duration.js.map +2 -2
  158. package/dist/esm/grpc/proto/google/protobuf/empty.d.ts +1 -1
  159. package/dist/esm/grpc/proto/google/protobuf/empty.js.map +2 -2
  160. package/dist/esm/grpc/proto/google/protobuf/field_mask.d.ts +4 -4
  161. package/dist/esm/grpc/proto/google/protobuf/field_mask.js +7 -8
  162. package/dist/esm/grpc/proto/google/protobuf/field_mask.js.map +2 -2
  163. package/dist/esm/grpc/proto/google/protobuf/struct.d.ts +10 -10
  164. package/dist/esm/grpc/proto/google/protobuf/struct.js +17 -29
  165. package/dist/esm/grpc/proto/google/protobuf/struct.js.map +2 -2
  166. package/dist/esm/grpc/proto/google/protobuf/timestamp.d.ts +4 -4
  167. package/dist/esm/grpc/proto/google/protobuf/timestamp.js +18 -21
  168. package/dist/esm/grpc/proto/google/protobuf/timestamp.js.map +2 -2
  169. package/dist/esm/grpc/proto/google/rpc/error_details.d.ts +2 -2
  170. package/dist/esm/grpc/proto/google/rpc/error_details.js +11 -40
  171. package/dist/esm/grpc/proto/google/rpc/error_details.js.map +2 -2
  172. package/dist/esm/grpc/proto/google/rpc/status.d.ts +2 -2
  173. package/dist/esm/grpc/proto/google/rpc/status.js +1 -1
  174. package/dist/esm/grpc/proto/google/rpc/status.js.map +2 -2
  175. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/argument.d.ts +5 -5
  176. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/argument.js +2 -8
  177. package/dist/esm/grpc/proto/sui/rpc/v2/argument.js.map +7 -0
  178. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/balance_change.d.ts +3 -3
  179. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/balance_change.js +1 -1
  180. package/dist/esm/grpc/proto/sui/rpc/v2/balance_change.js.map +7 -0
  181. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/bcs.d.ts +3 -3
  182. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/bcs.js +1 -1
  183. package/dist/esm/grpc/proto/sui/rpc/v2/bcs.js.map +7 -0
  184. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.d.ts +68 -0
  185. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/checkpoint.js +9 -12
  186. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.js.map +7 -0
  187. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/checkpoint_contents.d.ts +10 -10
  188. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/checkpoint_contents.js +6 -18
  189. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_contents.js.map +7 -0
  190. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/checkpoint_summary.d.ts +19 -19
  191. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/checkpoint_summary.js +16 -38
  192. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_summary.js.map +7 -0
  193. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/effects.d.ts +33 -28
  194. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/effects.js +23 -61
  195. package/dist/esm/grpc/proto/sui/rpc/v2/effects.js.map +7 -0
  196. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/epoch.d.ts +10 -10
  197. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/epoch.js +9 -5
  198. package/dist/esm/grpc/proto/sui/rpc/v2/epoch.js.map +7 -0
  199. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/error_reason.d.ts +1 -1
  200. package/dist/esm/grpc/proto/sui/rpc/v2/error_reason.js.map +7 -0
  201. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/event.d.ts +10 -10
  202. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/event.js +4 -4
  203. package/dist/esm/grpc/proto/sui/rpc/v2/event.js.map +7 -0
  204. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/executed_transaction.d.ts +19 -24
  205. package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.js +43 -0
  206. package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.js.map +7 -0
  207. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/execution_status.d.ts +56 -56
  208. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/execution_status.js +29 -87
  209. package/dist/esm/grpc/proto/sui/rpc/v2/execution_status.js.map +7 -0
  210. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/gas_cost_summary.d.ts +3 -3
  211. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/gas_cost_summary.js +5 -1
  212. package/dist/esm/grpc/proto/sui/rpc/v2/gas_cost_summary.js.map +7 -0
  213. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/input.d.ts +6 -6
  214. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/input.js +4 -9
  215. package/dist/esm/grpc/proto/sui/rpc/v2/input.js.map +7 -0
  216. package/dist/esm/grpc/proto/sui/rpc/v2/jwk.d.ts +70 -0
  217. package/dist/esm/grpc/proto/sui/rpc/v2/jwk.js +68 -0
  218. package/dist/esm/grpc/proto/sui/rpc/v2/jwk.js.map +7 -0
  219. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.d.ts +95 -0
  220. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.js +65 -0
  221. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.js.map +7 -0
  222. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/ledger_service.d.ts +58 -58
  223. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/ledger_service.js +37 -58
  224. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.js.map +7 -0
  225. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/move_package.d.ts +49 -49
  226. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package.js +31 -140
  227. package/dist/esm/grpc/proto/sui/rpc/v2/move_package.js.map +7 -0
  228. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.client.d.ts +61 -0
  229. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package_service.client.js +9 -33
  230. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.client.js.map +7 -0
  231. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package_service.d.ts +28 -28
  232. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/move_package_service.js +16 -26
  233. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.js.map +7 -0
  234. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.client.d.ts +14 -14
  235. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.client.js +5 -17
  236. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.client.js.map +7 -0
  237. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.d.ts +17 -17
  238. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/name_service.js +13 -24
  239. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.js.map +7 -0
  240. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/object.d.ts +31 -11
  241. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/object.js +19 -6
  242. package/dist/esm/grpc/proto/sui/rpc/v2/object.js.map +7 -0
  243. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/object_reference.d.ts +3 -3
  244. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/object_reference.js +2 -1
  245. package/dist/esm/grpc/proto/sui/rpc/v2/object_reference.js.map +7 -0
  246. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/owner.d.ts +5 -5
  247. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/owner.js +3 -8
  248. package/dist/esm/grpc/proto/sui/rpc/v2/owner.js.map +7 -0
  249. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/protocol_config.d.ts +3 -3
  250. package/dist/esm/grpc/proto/sui/rpc/v2/protocol_config.js +31 -0
  251. package/dist/esm/grpc/proto/sui/rpc/v2/protocol_config.js.map +7 -0
  252. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/signature.d.ts +85 -72
  253. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/signature.js +44 -95
  254. package/dist/esm/grpc/proto/sui/rpc/v2/signature.js.map +7 -0
  255. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/signature_scheme.d.ts +1 -1
  256. package/dist/esm/grpc/proto/sui/rpc/v2/signature_scheme.js.map +7 -0
  257. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_verification_service.client.d.ts +10 -10
  258. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_verification_service.client.js +3 -9
  259. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.client.js.map +7 -0
  260. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/signature_verification_service.d.ts +14 -14
  261. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_verification_service.js +8 -9
  262. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.js.map +7 -0
  263. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.d.ts +71 -0
  264. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.js +49 -0
  265. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.js.map +7 -0
  266. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2/live_data_service.d.ts → esm/grpc/proto/sui/rpc/v2/state_service.d.ts} +70 -188
  267. package/dist/esm/grpc/proto/sui/rpc/{v2beta2/live_data_service.js → v2/state_service.js} +40 -192
  268. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.js.map +7 -0
  269. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/subscription_service.client.d.ts +12 -12
  270. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/subscription_service.client.js +4 -10
  271. package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.client.js.map +7 -0
  272. package/dist/{cjs/grpc/proto/sui/rpc/v2beta2 → esm/grpc/proto/sui/rpc/v2}/subscription_service.d.ts +11 -11
  273. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/subscription_service.js +7 -12
  274. package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.js.map +7 -0
  275. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/system_state.d.ts +39 -39
  276. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/system_state.js +68 -35
  277. package/dist/esm/grpc/proto/sui/rpc/v2/system_state.js.map +7 -0
  278. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/transaction.d.ts +308 -288
  279. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/transaction.js +142 -337
  280. package/dist/esm/grpc/proto/sui/rpc/v2/transaction.js.map +7 -0
  281. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.ts +41 -0
  282. package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/transaction_execution_service.client.js +10 -12
  283. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js.map +7 -0
  284. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.d.ts +184 -0
  285. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.js +93 -0
  286. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.js.map +7 -0
  287. package/dist/esm/version.d.ts +1 -1
  288. package/dist/esm/version.js +1 -1
  289. package/dist/esm/version.js.map +1 -1
  290. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  291. package/dist/tsconfig.tsbuildinfo +1 -1
  292. package/package.json +2 -2
  293. package/src/grpc/client.ts +8 -8
  294. package/src/grpc/core.ts +20 -26
  295. package/src/grpc/proto/google/protobuf/any.ts +144 -159
  296. package/src/grpc/proto/google/protobuf/duration.ts +74 -77
  297. package/src/grpc/proto/google/protobuf/empty.ts +6 -5
  298. package/src/grpc/proto/google/protobuf/field_mask.ts +47 -59
  299. package/src/grpc/proto/google/protobuf/struct.ts +201 -223
  300. package/src/grpc/proto/google/protobuf/timestamp.ts +100 -121
  301. package/src/grpc/proto/google/rpc/error_details.ts +352 -388
  302. package/src/grpc/proto/google/rpc/status.ts +32 -32
  303. package/src/grpc/proto/sui/rpc/v2/argument.ts +84 -0
  304. package/src/grpc/proto/sui/rpc/v2/balance_change.ts +51 -0
  305. package/src/grpc/proto/sui/rpc/v2/bcs.ts +46 -0
  306. package/src/grpc/proto/sui/rpc/v2/checkpoint.ts +89 -0
  307. package/src/grpc/proto/sui/rpc/v2/checkpoint_contents.ts +99 -0
  308. package/src/grpc/proto/sui/rpc/v2/checkpoint_summary.ts +234 -0
  309. package/src/grpc/proto/sui/rpc/v2/effects.ts +391 -0
  310. package/src/grpc/proto/sui/rpc/v2/epoch.ts +85 -0
  311. package/src/grpc/proto/sui/rpc/v2/error_reason.ts +28 -0
  312. package/src/grpc/proto/sui/rpc/v2/event.ts +115 -0
  313. package/src/grpc/proto/sui/rpc/v2/executed_transaction.ts +103 -0
  314. package/src/grpc/proto/sui/rpc/v2/execution_status.ts +946 -0
  315. package/src/grpc/proto/sui/rpc/v2/gas_cost_summary.ts +59 -0
  316. package/src/grpc/proto/sui/rpc/v2/input.ts +119 -0
  317. package/src/grpc/proto/sui/rpc/v2/jwk.ts +94 -0
  318. package/src/grpc/proto/sui/rpc/v2/ledger_service.client.ts +127 -0
  319. package/src/grpc/proto/sui/rpc/v2/ledger_service.ts +533 -0
  320. package/src/grpc/proto/sui/rpc/v2/move_package.ts +678 -0
  321. package/src/grpc/proto/sui/rpc/v2/move_package_service.client.ts +84 -0
  322. package/src/grpc/proto/sui/rpc/v2/move_package_service.ts +297 -0
  323. package/src/grpc/proto/sui/rpc/v2/name_service.client.ts +58 -0
  324. package/src/grpc/proto/sui/rpc/v2/name_service.ts +187 -0
  325. package/src/grpc/proto/sui/rpc/v2/object.ts +159 -0
  326. package/src/grpc/proto/sui/rpc/v2/object_reference.ts +51 -0
  327. package/src/grpc/proto/sui/rpc/v2/owner.ts +78 -0
  328. package/src/grpc/proto/sui/rpc/v2/protocol_config.ts +47 -0
  329. package/src/grpc/proto/sui/rpc/v2/signature.ts +771 -0
  330. package/src/grpc/proto/sui/rpc/v2/signature_scheme.ts +51 -0
  331. package/src/grpc/proto/sui/rpc/v2/signature_verification_service.client.ts +49 -0
  332. package/src/grpc/proto/sui/rpc/v2/signature_verification_service.ts +105 -0
  333. package/src/grpc/proto/sui/rpc/v2/state_service.client.ts +97 -0
  334. package/src/grpc/proto/sui/rpc/v2/state_service.ts +820 -0
  335. package/src/grpc/proto/sui/rpc/v2/subscription_service.client.ts +69 -0
  336. package/src/grpc/proto/sui/rpc/v2/subscription_service.ts +80 -0
  337. package/src/grpc/proto/sui/rpc/v2/system_state.ts +818 -0
  338. package/src/grpc/proto/sui/rpc/v2/transaction.ts +1549 -0
  339. package/src/grpc/proto/sui/rpc/v2/transaction_execution_service.client.ts +58 -0
  340. package/src/grpc/proto/sui/rpc/v2/transaction_execution_service.ts +236 -0
  341. package/src/version.ts +1 -1
  342. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/argument.js.map +0 -7
  343. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/balance_change.js.map +0 -7
  344. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/bcs.js.map +0 -7
  345. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/checkpoint.d.ts +0 -55
  346. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/checkpoint.js.map +0 -7
  347. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/checkpoint_contents.js.map +0 -7
  348. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/checkpoint_summary.js.map +0 -7
  349. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/effects.js.map +0 -7
  350. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/epoch.js.map +0 -7
  351. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/error_reason.js.map +0 -7
  352. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/event.js.map +0 -7
  353. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/executed_transaction.js.map +0 -7
  354. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/execution_status.js.map +0 -7
  355. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/gas_cost_summary.js.map +0 -7
  356. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/input.js.map +0 -7
  357. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/ledger_service.client.d.ts +0 -95
  358. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/ledger_service.client.js.map +0 -7
  359. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/ledger_service.js.map +0 -7
  360. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/live_data_service.client.d.ts +0 -81
  361. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/live_data_service.client.js +0 -0
  362. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/live_data_service.client.js.map +0 -7
  363. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/live_data_service.js.map +0 -7
  364. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/move_package.js.map +0 -7
  365. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/move_package_service.client.d.ts +0 -61
  366. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/move_package_service.client.js.map +0 -7
  367. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/move_package_service.js.map +0 -7
  368. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/name_service.client.js.map +0 -7
  369. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/name_service.js.map +0 -7
  370. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/object.js.map +0 -7
  371. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/object_reference.js.map +0 -7
  372. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/owner.js.map +0 -7
  373. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/protocol_config.js.map +0 -7
  374. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/signature.js.map +0 -7
  375. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/signature_scheme.js.map +0 -7
  376. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/signature_verification_service.client.js.map +0 -7
  377. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/signature_verification_service.js.map +0 -7
  378. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/subscription_service.client.js.map +0 -7
  379. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/subscription_service.js.map +0 -7
  380. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/system_state.js.map +0 -7
  381. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/transaction.js.map +0 -7
  382. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.client.d.ts +0 -37
  383. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.client.js.map +0 -7
  384. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.d.ts +0 -115
  385. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.js +0 -94
  386. package/dist/cjs/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.js.map +0 -7
  387. package/dist/esm/grpc/proto/sui/rpc/v2beta2/argument.js.map +0 -7
  388. package/dist/esm/grpc/proto/sui/rpc/v2beta2/balance_change.js.map +0 -7
  389. package/dist/esm/grpc/proto/sui/rpc/v2beta2/bcs.js.map +0 -7
  390. package/dist/esm/grpc/proto/sui/rpc/v2beta2/checkpoint.d.ts +0 -55
  391. package/dist/esm/grpc/proto/sui/rpc/v2beta2/checkpoint.js.map +0 -7
  392. package/dist/esm/grpc/proto/sui/rpc/v2beta2/checkpoint_contents.js.map +0 -7
  393. package/dist/esm/grpc/proto/sui/rpc/v2beta2/checkpoint_summary.js.map +0 -7
  394. package/dist/esm/grpc/proto/sui/rpc/v2beta2/effects.js.map +0 -7
  395. package/dist/esm/grpc/proto/sui/rpc/v2beta2/epoch.js.map +0 -7
  396. package/dist/esm/grpc/proto/sui/rpc/v2beta2/error_reason.js.map +0 -7
  397. package/dist/esm/grpc/proto/sui/rpc/v2beta2/event.js.map +0 -7
  398. package/dist/esm/grpc/proto/sui/rpc/v2beta2/executed_transaction.js +0 -67
  399. package/dist/esm/grpc/proto/sui/rpc/v2beta2/executed_transaction.js.map +0 -7
  400. package/dist/esm/grpc/proto/sui/rpc/v2beta2/execution_status.js.map +0 -7
  401. package/dist/esm/grpc/proto/sui/rpc/v2beta2/gas_cost_summary.js.map +0 -7
  402. package/dist/esm/grpc/proto/sui/rpc/v2beta2/input.js.map +0 -7
  403. package/dist/esm/grpc/proto/sui/rpc/v2beta2/ledger_service.client.d.ts +0 -95
  404. package/dist/esm/grpc/proto/sui/rpc/v2beta2/ledger_service.client.js +0 -107
  405. package/dist/esm/grpc/proto/sui/rpc/v2beta2/ledger_service.client.js.map +0 -7
  406. package/dist/esm/grpc/proto/sui/rpc/v2beta2/ledger_service.js.map +0 -7
  407. package/dist/esm/grpc/proto/sui/rpc/v2beta2/live_data_service.client.d.ts +0 -81
  408. package/dist/esm/grpc/proto/sui/rpc/v2beta2/live_data_service.client.js +0 -92
  409. package/dist/esm/grpc/proto/sui/rpc/v2beta2/live_data_service.client.js.map +0 -7
  410. package/dist/esm/grpc/proto/sui/rpc/v2beta2/live_data_service.js.map +0 -7
  411. package/dist/esm/grpc/proto/sui/rpc/v2beta2/move_package.js.map +0 -7
  412. package/dist/esm/grpc/proto/sui/rpc/v2beta2/move_package_service.client.d.ts +0 -61
  413. package/dist/esm/grpc/proto/sui/rpc/v2beta2/move_package_service.client.js.map +0 -7
  414. package/dist/esm/grpc/proto/sui/rpc/v2beta2/move_package_service.js.map +0 -7
  415. package/dist/esm/grpc/proto/sui/rpc/v2beta2/name_service.client.js.map +0 -7
  416. package/dist/esm/grpc/proto/sui/rpc/v2beta2/name_service.js.map +0 -7
  417. package/dist/esm/grpc/proto/sui/rpc/v2beta2/object.js.map +0 -7
  418. package/dist/esm/grpc/proto/sui/rpc/v2beta2/object_reference.js.map +0 -7
  419. package/dist/esm/grpc/proto/sui/rpc/v2beta2/owner.js.map +0 -7
  420. package/dist/esm/grpc/proto/sui/rpc/v2beta2/protocol_config.js +0 -42
  421. package/dist/esm/grpc/proto/sui/rpc/v2beta2/protocol_config.js.map +0 -7
  422. package/dist/esm/grpc/proto/sui/rpc/v2beta2/signature.js.map +0 -7
  423. package/dist/esm/grpc/proto/sui/rpc/v2beta2/signature_scheme.js.map +0 -7
  424. package/dist/esm/grpc/proto/sui/rpc/v2beta2/signature_verification_service.client.js.map +0 -7
  425. package/dist/esm/grpc/proto/sui/rpc/v2beta2/signature_verification_service.js.map +0 -7
  426. package/dist/esm/grpc/proto/sui/rpc/v2beta2/subscription_service.client.js.map +0 -7
  427. package/dist/esm/grpc/proto/sui/rpc/v2beta2/subscription_service.js.map +0 -7
  428. package/dist/esm/grpc/proto/sui/rpc/v2beta2/system_state.js.map +0 -7
  429. package/dist/esm/grpc/proto/sui/rpc/v2beta2/transaction.js.map +0 -7
  430. package/dist/esm/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.client.d.ts +0 -37
  431. package/dist/esm/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.client.js.map +0 -7
  432. package/dist/esm/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.d.ts +0 -115
  433. package/dist/esm/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.js +0 -74
  434. package/dist/esm/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.js.map +0 -7
  435. package/src/grpc/proto/sui/rpc/v2beta2/argument.ts +0 -90
  436. package/src/grpc/proto/sui/rpc/v2beta2/balance_change.ts +0 -51
  437. package/src/grpc/proto/sui/rpc/v2beta2/bcs.ts +0 -46
  438. package/src/grpc/proto/sui/rpc/v2beta2/checkpoint.ts +0 -88
  439. package/src/grpc/proto/sui/rpc/v2beta2/checkpoint_contents.ts +0 -111
  440. package/src/grpc/proto/sui/rpc/v2beta2/checkpoint_summary.ts +0 -295
  441. package/src/grpc/proto/sui/rpc/v2beta2/effects.ts +0 -479
  442. package/src/grpc/proto/sui/rpc/v2beta2/epoch.ts +0 -113
  443. package/src/grpc/proto/sui/rpc/v2beta2/error_reason.ts +0 -28
  444. package/src/grpc/proto/sui/rpc/v2beta2/event.ts +0 -115
  445. package/src/grpc/proto/sui/rpc/v2beta2/executed_transaction.ts +0 -140
  446. package/src/grpc/proto/sui/rpc/v2beta2/execution_status.ts +0 -1079
  447. package/src/grpc/proto/sui/rpc/v2beta2/gas_cost_summary.ts +0 -87
  448. package/src/grpc/proto/sui/rpc/v2beta2/input.ts +0 -132
  449. package/src/grpc/proto/sui/rpc/v2beta2/ledger_service.client.ts +0 -217
  450. package/src/grpc/proto/sui/rpc/v2beta2/ledger_service.ts +0 -625
  451. package/src/grpc/proto/sui/rpc/v2beta2/live_data_service.client.ts +0 -187
  452. package/src/grpc/proto/sui/rpc/v2beta2/live_data_service.ts +0 -1066
  453. package/src/grpc/proto/sui/rpc/v2beta2/move_package.ts +0 -803
  454. package/src/grpc/proto/sui/rpc/v2beta2/move_package_service.client.ts +0 -135
  455. package/src/grpc/proto/sui/rpc/v2beta2/move_package_service.ts +0 -315
  456. package/src/grpc/proto/sui/rpc/v2beta2/name_service.client.ts +0 -83
  457. package/src/grpc/proto/sui/rpc/v2beta2/name_service.ts +0 -198
  458. package/src/grpc/proto/sui/rpc/v2beta2/object.ts +0 -161
  459. package/src/grpc/proto/sui/rpc/v2beta2/object_reference.ts +0 -58
  460. package/src/grpc/proto/sui/rpc/v2beta2/owner.ts +0 -91
  461. package/src/grpc/proto/sui/rpc/v2beta2/protocol_config.ts +0 -66
  462. package/src/grpc/proto/sui/rpc/v2beta2/signature.ts +0 -861
  463. package/src/grpc/proto/sui/rpc/v2beta2/signature_scheme.ts +0 -51
  464. package/src/grpc/proto/sui/rpc/v2beta2/signature_verification_service.client.ts +0 -63
  465. package/src/grpc/proto/sui/rpc/v2beta2/signature_verification_service.ts +0 -106
  466. package/src/grpc/proto/sui/rpc/v2beta2/subscription_service.client.ts +0 -81
  467. package/src/grpc/proto/sui/rpc/v2beta2/subscription_service.ts +0 -93
  468. package/src/grpc/proto/sui/rpc/v2beta2/system_state.ts +0 -1184
  469. package/src/grpc/proto/sui/rpc/v2beta2/transaction.ts +0 -2012
  470. package/src/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.client.ts +0 -65
  471. package/src/grpc/proto/sui/rpc/v2beta2/transaction_execution_service.ts +0 -178
  472. /package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/error_reason.js +0 -0
  473. /package/dist/cjs/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_scheme.js +0 -0
  474. /package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/error_reason.js +0 -0
  475. /package/dist/esm/grpc/proto/sui/rpc/{v2beta2 → v2}/signature_scheme.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @mysten/sui.js
2
2
 
3
+ ## 1.42.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 98c8a27: Update grpc to rc
8
+
3
9
  ## 1.41.0
4
10
 
5
11
  ### Minor Changes
@@ -1,11 +1,11 @@
1
1
  import type { GrpcWebOptions } from '@protobuf-ts/grpcweb-transport';
2
- import { TransactionExecutionServiceClient } from './proto/sui/rpc/v2beta2/transaction_execution_service.client.js';
3
- import { LedgerServiceClient } from './proto/sui/rpc/v2beta2/ledger_service.client.js';
4
- import { MovePackageServiceClient } from './proto/sui/rpc/v2beta2/move_package_service.client.js';
5
- import { SignatureVerificationServiceClient } from './proto/sui/rpc/v2beta2/signature_verification_service.client.js';
2
+ import { TransactionExecutionServiceClient } from './proto/sui/rpc/v2/transaction_execution_service.client.js';
3
+ import { LedgerServiceClient } from './proto/sui/rpc/v2/ledger_service.client.js';
4
+ import { MovePackageServiceClient } from './proto/sui/rpc/v2/move_package_service.client.js';
5
+ import { SignatureVerificationServiceClient } from './proto/sui/rpc/v2/signature_verification_service.client.js';
6
6
  import type { RpcTransport } from '@protobuf-ts/runtime-rpc';
7
- import { LiveDataServiceClient } from './proto/sui/rpc/v2beta2/live_data_service.client.js';
8
- import { SubscriptionServiceClient } from './proto/sui/rpc/v2beta2/subscription_service.client.js';
7
+ import { StateServiceClient } from './proto/sui/rpc/v2/state_service.client.js';
8
+ import { SubscriptionServiceClient } from './proto/sui/rpc/v2/subscription_service.client.js';
9
9
  import { GrpcCoreClient } from './core.js';
10
10
  import type { Experimental_SuiClientTypes } from '../experimental/index.js';
11
11
  import { Experimental_BaseClient } from '../experimental/index.js';
@@ -22,7 +22,7 @@ export declare class SuiGrpcClient extends Experimental_BaseClient {
22
22
  core: GrpcCoreClient;
23
23
  transactionExecutionService: TransactionExecutionServiceClient;
24
24
  ledgerService: LedgerServiceClient;
25
- liveDataService: LiveDataServiceClient;
25
+ stateService: StateServiceClient;
26
26
  subscriptionService: SubscriptionServiceClient;
27
27
  movePackageService: MovePackageServiceClient;
28
28
  signatureVerificationService: SignatureVerificationServiceClient;
@@ -22,12 +22,12 @@ __export(client_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(client_exports);
24
24
  var import_grpcweb_transport = require("@protobuf-ts/grpcweb-transport");
25
- var import_transaction_execution_service_client = require("./proto/sui/rpc/v2beta2/transaction_execution_service.client.js");
26
- var import_ledger_service_client = require("./proto/sui/rpc/v2beta2/ledger_service.client.js");
27
- var import_move_package_service_client = require("./proto/sui/rpc/v2beta2/move_package_service.client.js");
28
- var import_signature_verification_service_client = require("./proto/sui/rpc/v2beta2/signature_verification_service.client.js");
29
- var import_live_data_service_client = require("./proto/sui/rpc/v2beta2/live_data_service.client.js");
30
- var import_subscription_service_client = require("./proto/sui/rpc/v2beta2/subscription_service.client.js");
25
+ var import_transaction_execution_service_client = require("./proto/sui/rpc/v2/transaction_execution_service.client.js");
26
+ var import_ledger_service_client = require("./proto/sui/rpc/v2/ledger_service.client.js");
27
+ var import_move_package_service_client = require("./proto/sui/rpc/v2/move_package_service.client.js");
28
+ var import_signature_verification_service_client = require("./proto/sui/rpc/v2/signature_verification_service.client.js");
29
+ var import_state_service_client = require("./proto/sui/rpc/v2/state_service.client.js");
30
+ var import_subscription_service_client = require("./proto/sui/rpc/v2/subscription_service.client.js");
31
31
  var import_core = require("./core.js");
32
32
  var import_experimental = require("../experimental/index.js");
33
33
  class SuiGrpcClient extends import_experimental.Experimental_BaseClient {
@@ -36,7 +36,7 @@ class SuiGrpcClient extends import_experimental.Experimental_BaseClient {
36
36
  const transport = options.transport ?? new import_grpcweb_transport.GrpcWebFetchTransport({ baseUrl: options.baseUrl, fetchInit: options.fetchInit });
37
37
  this.transactionExecutionService = new import_transaction_execution_service_client.TransactionExecutionServiceClient(transport);
38
38
  this.ledgerService = new import_ledger_service_client.LedgerServiceClient(transport);
39
- this.liveDataService = new import_live_data_service_client.LiveDataServiceClient(transport);
39
+ this.stateService = new import_state_service_client.StateServiceClient(transport);
40
40
  this.subscriptionService = new import_subscription_service_client.SubscriptionServiceClient(transport);
41
41
  this.movePackageService = new import_move_package_service_client.MovePackageServiceClient(transport);
42
42
  this.signatureVerificationService = new import_signature_verification_service_client.SignatureVerificationServiceClient(transport);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/grpc/client.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { GrpcWebOptions } from '@protobuf-ts/grpcweb-transport';\nimport { GrpcWebFetchTransport } from '@protobuf-ts/grpcweb-transport';\nimport { TransactionExecutionServiceClient } from './proto/sui/rpc/v2beta2/transaction_execution_service.client.js';\nimport { LedgerServiceClient } from './proto/sui/rpc/v2beta2/ledger_service.client.js';\nimport { MovePackageServiceClient } from './proto/sui/rpc/v2beta2/move_package_service.client.js';\nimport { SignatureVerificationServiceClient } from './proto/sui/rpc/v2beta2/signature_verification_service.client.js';\nimport type { RpcTransport } from '@protobuf-ts/runtime-rpc';\nimport { LiveDataServiceClient } from './proto/sui/rpc/v2beta2/live_data_service.client.js';\nimport { SubscriptionServiceClient } from './proto/sui/rpc/v2beta2/subscription_service.client.js';\nimport { GrpcCoreClient } from './core.js';\nimport type { Experimental_SuiClientTypes } from '../experimental/index.js';\nimport { Experimental_BaseClient } from '../experimental/index.js';\n\ninterface SuiGrpcTransportOptions extends GrpcWebOptions {\n\ttransport?: never;\n}\n\nexport type SuiGrpcClientOptions = {\n\tnetwork: Experimental_SuiClientTypes.Network;\n\tmvr?: Experimental_SuiClientTypes.MvrOptions;\n} & (\n\t| {\n\t\t\ttransport: RpcTransport;\n\t }\n\t| SuiGrpcTransportOptions\n);\n\nexport class SuiGrpcClient extends Experimental_BaseClient {\n\tcore: GrpcCoreClient;\n\ttransactionExecutionService: TransactionExecutionServiceClient;\n\tledgerService: LedgerServiceClient;\n\tliveDataService: LiveDataServiceClient;\n\tsubscriptionService: SubscriptionServiceClient;\n\tmovePackageService: MovePackageServiceClient;\n\tsignatureVerificationService: SignatureVerificationServiceClient;\n\n\tconstructor(options: SuiGrpcClientOptions) {\n\t\tsuper({ network: options.network });\n\t\tconst transport =\n\t\t\toptions.transport ??\n\t\t\tnew GrpcWebFetchTransport({ baseUrl: options.baseUrl, fetchInit: options.fetchInit });\n\t\tthis.transactionExecutionService = new TransactionExecutionServiceClient(transport);\n\t\tthis.ledgerService = new LedgerServiceClient(transport);\n\t\tthis.liveDataService = new LiveDataServiceClient(transport);\n\t\tthis.subscriptionService = new SubscriptionServiceClient(transport);\n\t\tthis.movePackageService = new MovePackageServiceClient(transport);\n\t\tthis.signatureVerificationService = new SignatureVerificationServiceClient(transport);\n\n\t\tthis.core = new GrpcCoreClient({\n\t\t\tclient: this,\n\t\t\tbase: this,\n\t\t\tnetwork: options.network,\n\t\t\tmvr: options.mvr,\n\t\t});\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,+BAAsC;AACtC,kDAAkD;AAClD,mCAAoC;AACpC,yCAAyC;AACzC,mDAAmD;AAEnD,sCAAsC;AACtC,yCAA0C;AAC1C,kBAA+B;AAE/B,0BAAwC;AAgBjC,MAAM,sBAAsB,4CAAwB;AAAA,EAS1D,YAAY,SAA+B;AAC1C,UAAM,EAAE,SAAS,QAAQ,QAAQ,CAAC;AAClC,UAAM,YACL,QAAQ,aACR,IAAI,+CAAsB,EAAE,SAAS,QAAQ,SAAS,WAAW,QAAQ,UAAU,CAAC;AACrF,SAAK,8BAA8B,IAAI,8EAAkC,SAAS;AAClF,SAAK,gBAAgB,IAAI,iDAAoB,SAAS;AACtD,SAAK,kBAAkB,IAAI,sDAAsB,SAAS;AAC1D,SAAK,sBAAsB,IAAI,6DAA0B,SAAS;AAClE,SAAK,qBAAqB,IAAI,4DAAyB,SAAS;AAChE,SAAK,+BAA+B,IAAI,gFAAmC,SAAS;AAEpF,SAAK,OAAO,IAAI,2BAAe;AAAA,MAC9B,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,SAAS,QAAQ;AAAA,MACjB,KAAK,QAAQ;AAAA,IACd,CAAC;AAAA,EACF;AACD;",
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { GrpcWebOptions } from '@protobuf-ts/grpcweb-transport';\nimport { GrpcWebFetchTransport } from '@protobuf-ts/grpcweb-transport';\nimport { TransactionExecutionServiceClient } from './proto/sui/rpc/v2/transaction_execution_service.client.js';\nimport { LedgerServiceClient } from './proto/sui/rpc/v2/ledger_service.client.js';\nimport { MovePackageServiceClient } from './proto/sui/rpc/v2/move_package_service.client.js';\nimport { SignatureVerificationServiceClient } from './proto/sui/rpc/v2/signature_verification_service.client.js';\nimport type { RpcTransport } from '@protobuf-ts/runtime-rpc';\nimport { StateServiceClient } from './proto/sui/rpc/v2/state_service.client.js';\nimport { SubscriptionServiceClient } from './proto/sui/rpc/v2/subscription_service.client.js';\nimport { GrpcCoreClient } from './core.js';\nimport type { Experimental_SuiClientTypes } from '../experimental/index.js';\nimport { Experimental_BaseClient } from '../experimental/index.js';\n\ninterface SuiGrpcTransportOptions extends GrpcWebOptions {\n\ttransport?: never;\n}\n\nexport type SuiGrpcClientOptions = {\n\tnetwork: Experimental_SuiClientTypes.Network;\n\tmvr?: Experimental_SuiClientTypes.MvrOptions;\n} & (\n\t| {\n\t\t\ttransport: RpcTransport;\n\t }\n\t| SuiGrpcTransportOptions\n);\n\nexport class SuiGrpcClient extends Experimental_BaseClient {\n\tcore: GrpcCoreClient;\n\ttransactionExecutionService: TransactionExecutionServiceClient;\n\tledgerService: LedgerServiceClient;\n\tstateService: StateServiceClient;\n\tsubscriptionService: SubscriptionServiceClient;\n\tmovePackageService: MovePackageServiceClient;\n\tsignatureVerificationService: SignatureVerificationServiceClient;\n\n\tconstructor(options: SuiGrpcClientOptions) {\n\t\tsuper({ network: options.network });\n\t\tconst transport =\n\t\t\toptions.transport ??\n\t\t\tnew GrpcWebFetchTransport({ baseUrl: options.baseUrl, fetchInit: options.fetchInit });\n\t\tthis.transactionExecutionService = new TransactionExecutionServiceClient(transport);\n\t\tthis.ledgerService = new LedgerServiceClient(transport);\n\t\tthis.stateService = new StateServiceClient(transport);\n\t\tthis.subscriptionService = new SubscriptionServiceClient(transport);\n\t\tthis.movePackageService = new MovePackageServiceClient(transport);\n\t\tthis.signatureVerificationService = new SignatureVerificationServiceClient(transport);\n\n\t\tthis.core = new GrpcCoreClient({\n\t\t\tclient: this,\n\t\t\tbase: this,\n\t\t\tnetwork: options.network,\n\t\t\tmvr: options.mvr,\n\t\t});\n\t}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,+BAAsC;AACtC,kDAAkD;AAClD,mCAAoC;AACpC,yCAAyC;AACzC,mDAAmD;AAEnD,kCAAmC;AACnC,yCAA0C;AAC1C,kBAA+B;AAE/B,0BAAwC;AAgBjC,MAAM,sBAAsB,4CAAwB;AAAA,EAS1D,YAAY,SAA+B;AAC1C,UAAM,EAAE,SAAS,QAAQ,QAAQ,CAAC;AAClC,UAAM,YACL,QAAQ,aACR,IAAI,+CAAsB,EAAE,SAAS,QAAQ,SAAS,WAAW,QAAQ,UAAU,CAAC;AACrF,SAAK,8BAA8B,IAAI,8EAAkC,SAAS;AAClF,SAAK,gBAAgB,IAAI,iDAAoB,SAAS;AACtD,SAAK,eAAe,IAAI,+CAAmB,SAAS;AACpD,SAAK,sBAAsB,IAAI,6DAA0B,SAAS;AAClE,SAAK,qBAAqB,IAAI,4DAAyB,SAAS;AAChE,SAAK,+BAA+B,IAAI,gFAAmC,SAAS;AAEpF,SAAK,OAAO,IAAI,2BAAe;AAAA,MAC9B,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,SAAS,QAAQ;AAAA,MACjB,KAAK,QAAQ;AAAA,IACd,CAAC;AAAA,EACF;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import type { Experimental_CoreClientOptions, Experimental_SuiClientTypes } from '../experimental/index.js';
2
2
  import { Experimental_CoreClient } from '../experimental/index.js';
3
3
  import type { SuiGrpcClient } from './client.js';
4
- import type { TransactionEffects } from './proto/sui/rpc/v2beta2/effects.js';
4
+ import type { TransactionEffects } from './proto/sui/rpc/v2/effects.js';
5
5
  export interface GrpcCoreClientOptions extends Experimental_CoreClientOptions {
6
6
  client: SuiGrpcClient;
7
7
  }
@@ -30,13 +30,13 @@ __export(core_exports, {
30
30
  });
31
31
  module.exports = __toCommonJS(core_exports);
32
32
  var import_experimental = require("../experimental/index.js");
33
- var import_owner = require("./proto/sui/rpc/v2beta2/owner.js");
33
+ var import_owner = require("./proto/sui/rpc/v2/owner.js");
34
34
  var import_utils = require("@mysten/utils");
35
- var import_effects = require("./proto/sui/rpc/v2beta2/effects.js");
36
- var import_effects2 = require("./proto/sui/rpc/v2beta2/effects.js");
35
+ var import_effects = require("./proto/sui/rpc/v2/effects.js");
36
+ var import_effects2 = require("./proto/sui/rpc/v2/effects.js");
37
37
  var import_transactions = require("../transactions/index.js");
38
38
  var import_bcs = require("../bcs/index.js");
39
- var import_move_package = require("./proto/sui/rpc/v2beta2/move_package.js");
39
+ var import_move_package = require("./proto/sui/rpc/v2/move_package.js");
40
40
  var _client;
41
41
  class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
42
42
  constructor({ client, ...options }) {
@@ -90,7 +90,7 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
90
90
  };
91
91
  }
92
92
  async getOwnedObjects(options) {
93
- const response = await __privateGet(this, _client).liveDataService.listOwnedObjects({
93
+ const response = await __privateGet(this, _client).stateService.listOwnedObjects({
94
94
  owner: options.address,
95
95
  objectType: options.type ? (await this.mvr.resolveType({ type: options.type })).type : void 0,
96
96
  pageToken: options.cursor ? (0, import_utils.fromBase64)(options.cursor) : void 0,
@@ -129,7 +129,7 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
129
129
  };
130
130
  }
131
131
  async getCoins(options) {
132
- const response = await __privateGet(this, _client).liveDataService.listOwnedObjects({
132
+ const response = await __privateGet(this, _client).stateService.listOwnedObjects({
133
133
  owner: options.address,
134
134
  objectType: `0x2::coin::Coin<${(await this.mvr.resolveType({ type: options.coinType })).type}>`,
135
135
  pageToken: options.cursor ? (0, import_utils.fromBase64)(options.cursor) : void 0,
@@ -169,7 +169,7 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
169
169
  };
170
170
  }
171
171
  async getBalance(options) {
172
- const result = await __privateGet(this, _client).liveDataService.getBalance({
172
+ const result = await __privateGet(this, _client).stateService.getBalance({
173
173
  owner: options.address,
174
174
  coinType: (await this.mvr.resolveType({ type: options.coinType })).type
175
175
  });
@@ -181,7 +181,7 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
181
181
  };
182
182
  }
183
183
  async getAllBalances(options) {
184
- const result = await __privateGet(this, _client).liveDataService.listBalances({
184
+ const result = await __privateGet(this, _client).stateService.listBalances({
185
185
  owner: options.address,
186
186
  pageToken: options.cursor ? (0, import_utils.fromBase64)(options.cursor) : void 0,
187
187
  pageSize: options.limit
@@ -236,7 +236,7 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
236
236
  };
237
237
  }
238
238
  async dryRunTransaction(options) {
239
- const { response } = await __privateGet(this, _client).liveDataService.simulateTransaction({
239
+ const { response } = await __privateGet(this, _client).transactionExecutionService.simulateTransaction({
240
240
  transaction: {
241
241
  bcs: {
242
242
  value: options.transaction
@@ -263,7 +263,7 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
263
263
  };
264
264
  }
265
265
  async getDynamicFields(options) {
266
- const response = await __privateGet(this, _client).liveDataService.listDynamicFields({
266
+ const response = await __privateGet(this, _client).stateService.listDynamicFields({
267
267
  parent: options.parentId,
268
268
  pageToken: options.cursor ? (0, import_utils.fromBase64)(options.cursor) : void 0
269
269
  });
@@ -271,10 +271,10 @@ class GrpcCoreClient extends import_experimental.Experimental_CoreClient {
271
271
  dynamicFields: response.response.dynamicFields.map((field) => ({
272
272
  id: field.fieldId,
273
273
  name: {
274
- type: field.nameType,
275
- bcs: field.nameValue
274
+ type: field.name?.name,
275
+ bcs: field.name?.value
276
276
  },
277
- type: field.dynamicObjectId ? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${field.nameType}>,0x2::object::ID>` : `0x2::dynamic_field::Field<${field.nameType},${field.valueType}>`
277
+ type: field.fieldObject ? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${field.name?.name}>,0x2::object::ID>` : `0x2::dynamic_field::Field<${field.name?.value},${field.valueType}>`
278
278
  })),
279
279
  cursor: response.response.nextPageToken ? (0, import_utils.toBase64)(response.response.nextPageToken) : null,
280
280
  hasNextPage: response.response.nextPageToken !== void 0
@@ -550,12 +550,7 @@ function parseTransaction(transaction) {
550
550
  commands: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction.commands
551
551
  });
552
552
  const objectTypes = {};
553
- transaction.inputObjects.forEach((object) => {
554
- if (object.objectId && object.objectType) {
555
- objectTypes[object.objectId] = object.objectType;
556
- }
557
- });
558
- transaction.outputObjects.forEach((object) => {
553
+ transaction.objects?.objects.forEach((object) => {
559
554
  if (object.objectId && object.objectType) {
560
555
  objectTypes[object.objectId] = object.objectType;
561
556
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/grpc/core.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tExperimental_CoreClientOptions,\n\tExperimental_SuiClientTypes,\n} from '../experimental/index.js';\nimport { Experimental_CoreClient } from '../experimental/index.js';\nimport type { SuiGrpcClient } from './client.js';\nimport type { Owner } from './proto/sui/rpc/v2beta2/owner.js';\nimport { Owner_OwnerKind } from './proto/sui/rpc/v2beta2/owner.js';\nimport { chunk, fromBase64, toBase64 } from '@mysten/utils';\nimport type { ExecutedTransaction } from './proto/sui/rpc/v2beta2/executed_transaction.js';\nimport type { TransactionEffects } from './proto/sui/rpc/v2beta2/effects.js';\nimport { UnchangedConsensusObject_UnchangedConsensusObjectKind } from './proto/sui/rpc/v2beta2/effects.js';\nimport {\n\tChangedObject_IdOperation,\n\tChangedObject_InputObjectState,\n\tChangedObject_OutputObjectState,\n} from './proto/sui/rpc/v2beta2/effects.js';\nimport { TransactionDataBuilder } from '../transactions/index.js';\nimport { bcs } from '../bcs/index.js';\nimport type { OpenSignature, OpenSignatureBody } from './proto/sui/rpc/v2beta2/move_package.js';\nimport {\n\tAbility,\n\tFunctionDescriptor_Visibility,\n\tOpenSignature_Reference,\n\tOpenSignatureBody_Type,\n} from './proto/sui/rpc/v2beta2/move_package.js';\nexport interface GrpcCoreClientOptions extends Experimental_CoreClientOptions {\n\tclient: SuiGrpcClient;\n}\nexport class GrpcCoreClient extends Experimental_CoreClient {\n\t#client: SuiGrpcClient;\n\tconstructor({ client, ...options }: GrpcCoreClientOptions) {\n\t\tsuper(options);\n\t\tthis.#client = client;\n\t}\n\n\tasync getObjects(\n\t\toptions: Experimental_SuiClientTypes.GetObjectsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetObjectsResponse> {\n\t\tconst batches = chunk(options.objectIds, 50);\n\t\tconst results: Experimental_SuiClientTypes.GetObjectsResponse['objects'] = [];\n\n\t\tfor (const batch of batches) {\n\t\t\tconst response = await this.#client.ledgerService.batchGetObjects({\n\t\t\t\trequests: batch.map((id) => ({ objectId: id })),\n\t\t\t\treadMask: {\n\t\t\t\t\tpaths: [\n\t\t\t\t\t\t'owner',\n\t\t\t\t\t\t'object_type',\n\t\t\t\t\t\t'bcs',\n\t\t\t\t\t\t'digest',\n\t\t\t\t\t\t'version',\n\t\t\t\t\t\t'object_id',\n\t\t\t\t\t\t'previous_transaction',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tresults.push(\n\t\t\t\t...response.response.objects.map(\n\t\t\t\t\t(object): Experimental_SuiClientTypes.ObjectResponse | Error => {\n\t\t\t\t\t\tif (object.result.oneofKind === 'error') {\n\t\t\t\t\t\t\t// TODO: improve error handling\n\t\t\t\t\t\t\treturn new Error(object.result.error.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (object.result.oneofKind !== 'object') {\n\t\t\t\t\t\t\treturn new Error('Unexpected result type');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid: object.result.object.objectId!,\n\t\t\t\t\t\t\tversion: object.result.object.version?.toString()!,\n\t\t\t\t\t\t\tdigest: object.result.object.digest!,\n\t\t\t\t\t\t\t// TODO: bcs content is not returned in all cases\n\t\t\t\t\t\t\tcontent: Promise.resolve(object.result.object.bcs?.value!),\n\t\t\t\t\t\t\towner: mapOwner(object.result.object.owner)!,\n\t\t\t\t\t\t\ttype: object.result.object.objectType!,\n\t\t\t\t\t\t\tpreviousTransaction: object.result.object.previousTransaction ?? null,\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\treturn {\n\t\t\tobjects: results,\n\t\t};\n\t}\n\tasync getOwnedObjects(\n\t\toptions: Experimental_SuiClientTypes.GetOwnedObjectsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetOwnedObjectsResponse> {\n\t\tconst response = await this.#client.liveDataService.listOwnedObjects({\n\t\t\towner: options.address,\n\t\t\tobjectType: options.type\n\t\t\t\t? (await this.mvr.resolveType({ type: options.type })).type\n\t\t\t\t: undefined,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'owner',\n\t\t\t\t\t'object_type',\n\t\t\t\t\t'bcs',\n\t\t\t\t\t'digest',\n\t\t\t\t\t'version',\n\t\t\t\t\t'object_id',\n\t\t\t\t\t'previous_transaction',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\n\t\tconst objects = response.response.objects.map(\n\t\t\t(object): Experimental_SuiClientTypes.ObjectResponse => ({\n\t\t\t\tid: object.objectId!,\n\t\t\t\tversion: object.version?.toString()!,\n\t\t\t\tdigest: object.digest!,\n\t\t\t\t// TODO: List owned objects doesn't return content right now\n\t\t\t\tget content() {\n\t\t\t\t\treturn Promise.reject(\n\t\t\t\t\t\tnew Error('GRPC does not return object contents when listing owned objects'),\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\towner: mapOwner(object.owner)!,\n\t\t\t\ttype: object.objectType!,\n\t\t\t\tpreviousTransaction: object.previousTransaction ?? null,\n\t\t\t}),\n\t\t);\n\n\t\treturn {\n\t\t\tobjects,\n\t\t\tcursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,\n\t\t\thasNextPage: response.response.nextPageToken !== undefined,\n\t\t};\n\t}\n\tasync getCoins(\n\t\toptions: Experimental_SuiClientTypes.GetCoinsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetCoinsResponse> {\n\t\tconst response = await this.#client.liveDataService.listOwnedObjects({\n\t\t\towner: options.address,\n\t\t\tobjectType: `0x2::coin::Coin<${(await this.mvr.resolveType({ type: options.coinType })).type}>`,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'owner',\n\t\t\t\t\t'object_type',\n\t\t\t\t\t'bcs',\n\t\t\t\t\t'digest',\n\t\t\t\t\t'version',\n\t\t\t\t\t'object_id',\n\t\t\t\t\t'balance',\n\t\t\t\t\t'previous_transaction',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\tobjects: response.response.objects.map(\n\t\t\t\t(object): Experimental_SuiClientTypes.CoinResponse => ({\n\t\t\t\t\tid: object.objectId!,\n\t\t\t\t\tversion: object.version?.toString()!,\n\t\t\t\t\tdigest: object.digest!,\n\t\t\t\t\t// TODO: List owned objects doesn't return content right now\n\t\t\t\t\tget content() {\n\t\t\t\t\t\treturn Promise.reject(\n\t\t\t\t\t\t\tnew Error('GRPC does not return object contents when listing owned objects'),\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\towner: mapOwner(object.owner)!,\n\t\t\t\t\ttype: object.objectType!,\n\t\t\t\t\tbalance: object.balance?.toString()!,\n\t\t\t\t\tpreviousTransaction: object.previousTransaction ?? null,\n\t\t\t\t}),\n\t\t\t),\n\t\t\tcursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,\n\t\t\thasNextPage: response.response.nextPageToken !== undefined,\n\t\t};\n\t}\n\n\tasync getBalance(\n\t\toptions: Experimental_SuiClientTypes.GetBalanceOptions,\n\t): Promise<Experimental_SuiClientTypes.GetBalanceResponse> {\n\t\tconst result = await this.#client.liveDataService.getBalance({\n\t\t\towner: options.address,\n\t\t\tcoinType: (await this.mvr.resolveType({ type: options.coinType })).type,\n\t\t});\n\n\t\treturn {\n\t\t\tbalance: {\n\t\t\t\tbalance: result.response.balance?.balance?.toString() ?? '0',\n\t\t\t\tcoinType: result.response.balance?.coinType ?? options.coinType,\n\t\t\t},\n\t\t};\n\t}\n\n\tasync getAllBalances(\n\t\toptions: Experimental_SuiClientTypes.GetAllBalancesOptions,\n\t): Promise<Experimental_SuiClientTypes.GetAllBalancesResponse> {\n\t\tconst result = await this.#client.liveDataService.listBalances({\n\t\t\towner: options.address,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t\tpageSize: options.limit,\n\t\t});\n\n\t\treturn {\n\t\t\thasNextPage: !!result.response.nextPageToken,\n\t\t\tcursor: result.response.nextPageToken ? toBase64(result.response.nextPageToken) : null,\n\t\t\tbalances: result.response.balances.map((balance) => ({\n\t\t\t\tbalance: balance.balance?.toString() ?? '0',\n\t\t\t\tcoinType: balance.coinType!,\n\t\t\t})),\n\t\t};\n\t}\n\tasync getTransaction(\n\t\toptions: Experimental_SuiClientTypes.GetTransactionOptions,\n\t): Promise<Experimental_SuiClientTypes.GetTransactionResponse> {\n\t\tconst { response } = await this.#client.ledgerService.getTransaction({\n\t\t\tdigest: options.digest,\n\t\t\treadMask: {\n\t\t\t\tpaths: ['digest', 'transaction', 'effects', 'signatures', 'balance_changes'],\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\ttransaction: parseTransaction(response.transaction!),\n\t\t};\n\t}\n\tasync executeTransaction(\n\t\toptions: Experimental_SuiClientTypes.ExecuteTransactionOptions,\n\t): Promise<Experimental_SuiClientTypes.ExecuteTransactionResponse> {\n\t\tconst { response } = await this.#client.transactionExecutionService.executeTransaction({\n\t\t\ttransaction: {\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: options.transaction,\n\t\t\t\t},\n\t\t\t},\n\t\t\tsignatures: options.signatures.map((signature) => ({\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: fromBase64(signature),\n\t\t\t\t},\n\t\t\t\tsignature: {\n\t\t\t\t\toneofKind: undefined,\n\t\t\t\t},\n\t\t\t})),\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'transaction.digest',\n\t\t\t\t\t'transaction.transaction',\n\t\t\t\t\t'transaction.effects',\n\t\t\t\t\t'transaction.signatures',\n\t\t\t\t\t'transaction.balance_changes',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\t\treturn {\n\t\t\ttransaction: parseTransaction(response.transaction!),\n\t\t};\n\t}\n\tasync dryRunTransaction(\n\t\toptions: Experimental_SuiClientTypes.DryRunTransactionOptions,\n\t): Promise<Experimental_SuiClientTypes.DryRunTransactionResponse> {\n\t\tconst { response } = await this.#client.liveDataService.simulateTransaction({\n\t\t\ttransaction: {\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: options.transaction,\n\t\t\t\t},\n\t\t\t},\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'transaction.digest',\n\t\t\t\t\t'transaction.transaction',\n\t\t\t\t\t'transaction.effects',\n\t\t\t\t\t'transaction.signatures',\n\t\t\t\t\t'transaction.balance_changes',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\ttransaction: parseTransaction(response.transaction!),\n\t\t};\n\t}\n\tasync getReferenceGasPrice(): Promise<Experimental_SuiClientTypes.GetReferenceGasPriceResponse> {\n\t\tconst response = await this.#client.ledgerService.getEpoch({});\n\n\t\treturn {\n\t\t\treferenceGasPrice: response.response.epoch?.referenceGasPrice?.toString()!,\n\t\t};\n\t}\n\n\tasync getDynamicFields(\n\t\toptions: Experimental_SuiClientTypes.GetDynamicFieldsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetDynamicFieldsResponse> {\n\t\tconst response = await this.#client.liveDataService.listDynamicFields({\n\t\t\tparent: options.parentId,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t});\n\n\t\treturn {\n\t\t\tdynamicFields: response.response.dynamicFields.map((field) => ({\n\t\t\t\tid: field.fieldId!,\n\t\t\t\tname: {\n\t\t\t\t\ttype: field.nameType!,\n\t\t\t\t\tbcs: field.nameValue!,\n\t\t\t\t},\n\t\t\t\ttype: field.dynamicObjectId\n\t\t\t\t\t? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${field.nameType!}>,0x2::object::ID>`\n\t\t\t\t\t: `0x2::dynamic_field::Field<${field.nameType!},${field.valueType!}>`,\n\t\t\t})),\n\t\t\tcursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,\n\t\t\thasNextPage: response.response.nextPageToken !== undefined,\n\t\t};\n\t}\n\n\tasync verifyZkLoginSignature(\n\t\toptions: Experimental_SuiClientTypes.VerifyZkLoginSignatureOptions,\n\t): Promise<Experimental_SuiClientTypes.ZkLoginVerifyResponse> {\n\t\tconst { response } = await this.#client.signatureVerificationService.verifySignature({\n\t\t\tmessage: {\n\t\t\t\tname: options.intentScope,\n\t\t\t\tvalue: fromBase64(options.bytes),\n\t\t\t},\n\t\t\tsignature: {\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: fromBase64(options.signature),\n\t\t\t\t},\n\t\t\t\tsignature: {\n\t\t\t\t\toneofKind: undefined,\n\t\t\t\t},\n\t\t\t},\n\t\t\tjwks: [],\n\t\t});\n\n\t\treturn {\n\t\t\tsuccess: response.isValid ?? false,\n\t\t\terrors: response.reason ? [response.reason] : [],\n\t\t};\n\t}\n\n\tasync getMoveFunction(\n\t\toptions: Experimental_SuiClientTypes.GetMoveFunctionOptions,\n\t): Promise<Experimental_SuiClientTypes.GetMoveFunctionResponse> {\n\t\tconst { response } = await this.#client.movePackageService.getFunction({\n\t\t\tpackageId: (await this.mvr.resolvePackage({ package: options.packageId })).package,\n\t\t\tmoduleName: options.moduleName,\n\t\t\tname: options.name,\n\t\t});\n\n\t\tlet visibility: 'public' | 'private' | 'friend' | 'unknown' = 'unknown';\n\n\t\tswitch (response.function?.visibility) {\n\t\t\tcase FunctionDescriptor_Visibility.PUBLIC:\n\t\t\t\tvisibility = 'public';\n\t\t\t\tbreak;\n\t\t\tcase FunctionDescriptor_Visibility.PRIVATE:\n\t\t\t\tvisibility = 'private';\n\t\t\t\tbreak;\n\t\t\tcase FunctionDescriptor_Visibility.FRIEND:\n\t\t\t\tvisibility = 'friend';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn {\n\t\t\tfunction: {\n\t\t\t\tpackageId: options.packageId,\n\t\t\t\tmoduleName: options.moduleName,\n\t\t\t\tname: response.function?.name!,\n\t\t\t\tvisibility,\n\t\t\t\tisEntry: response.function?.isEntry ?? false,\n\t\t\t\ttypeParameters:\n\t\t\t\t\tresponse.function?.typeParameters?.map(({ constraints }) => ({\n\t\t\t\t\t\tisPhantom: false,\n\t\t\t\t\t\tconstraints:\n\t\t\t\t\t\t\tconstraints.map((constraint) => {\n\t\t\t\t\t\t\t\tswitch (constraint) {\n\t\t\t\t\t\t\t\t\tcase Ability.COPY:\n\t\t\t\t\t\t\t\t\t\treturn 'copy';\n\t\t\t\t\t\t\t\t\tcase Ability.DROP:\n\t\t\t\t\t\t\t\t\t\treturn 'drop';\n\t\t\t\t\t\t\t\t\tcase Ability.STORE:\n\t\t\t\t\t\t\t\t\t\treturn 'store';\n\t\t\t\t\t\t\t\t\tcase Ability.KEY:\n\t\t\t\t\t\t\t\t\t\treturn 'key';\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\treturn 'unknown';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}) ?? [],\n\t\t\t\t\t})) ?? [],\n\t\t\t\tparameters:\n\t\t\t\t\tresponse.function?.parameters?.map((param) => parseNormalizedSuiMoveType(param)) ?? [],\n\t\t\t\treturns: response.function?.returns?.map((ret) => parseNormalizedSuiMoveType(ret)) ?? [],\n\t\t\t},\n\t\t};\n\t}\n\n\tresolveTransactionPlugin(): never {\n\t\tthrow new Error('GRPC client does not support transaction resolution yet');\n\t}\n}\n\nfunction mapOwner(owner: Owner | null | undefined): Experimental_SuiClientTypes.ObjectOwner | null {\n\tif (!owner) {\n\t\treturn null;\n\t}\n\tif (owner.kind === Owner_OwnerKind.IMMUTABLE) {\n\t\treturn {\n\t\t\t$kind: 'Immutable',\n\t\t\tImmutable: true,\n\t\t};\n\t}\n\tif (owner.kind === Owner_OwnerKind.ADDRESS) {\n\t\treturn {\n\t\t\tAddressOwner: owner.address!,\n\t\t\t$kind: 'AddressOwner',\n\t\t};\n\t}\n\tif (owner.kind === Owner_OwnerKind.OBJECT) {\n\t\treturn {\n\t\t\t$kind: 'ObjectOwner',\n\t\t\tObjectOwner: owner.address!,\n\t\t};\n\t}\n\n\tif (owner.kind === Owner_OwnerKind.SHARED) {\n\t\tif (owner.address) {\n\t\t\treturn {\n\t\t\t\t$kind: 'ConsensusAddressOwner',\n\t\t\t\tConsensusAddressOwner: {\n\t\t\t\t\towner: owner.address,\n\t\t\t\t\tstartVersion: owner.version?.toString()!,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t$kind: 'Shared',\n\t\t\tShared: {\n\t\t\t\tinitialSharedVersion: owner.version?.toString()!,\n\t\t\t},\n\t\t};\n\t}\n\n\tthrow new Error('Unknown owner kind');\n}\n\nfunction mapIdOperation(\n\toperation: ChangedObject_IdOperation | undefined,\n): null | 'Created' | 'Deleted' | 'Unknown' | 'None' {\n\tif (operation == null) {\n\t\treturn null;\n\t}\n\tswitch (operation) {\n\t\tcase ChangedObject_IdOperation.CREATED:\n\t\t\treturn 'Created';\n\t\tcase ChangedObject_IdOperation.DELETED:\n\t\t\treturn 'Deleted';\n\t\tcase ChangedObject_IdOperation.NONE:\n\t\tcase ChangedObject_IdOperation.ID_OPERATION_UNKNOWN:\n\t\t\treturn 'None';\n\t\tdefault:\n\t\t\toperation satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nfunction mapInputObjectState(\n\tstate: ChangedObject_InputObjectState | undefined,\n): null | 'Exists' | 'DoesNotExist' | 'Unknown' {\n\tif (state == null) {\n\t\treturn null;\n\t}\n\tswitch (state) {\n\t\tcase ChangedObject_InputObjectState.EXISTS:\n\t\t\treturn 'Exists';\n\t\tcase ChangedObject_InputObjectState.DOES_NOT_EXIST:\n\t\t\treturn 'DoesNotExist';\n\t\tcase ChangedObject_InputObjectState.UNKNOWN:\n\t\t\treturn 'Unknown';\n\t\tdefault:\n\t\t\tstate satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nfunction mapOutputObjectState(\n\tstate: ChangedObject_OutputObjectState | undefined,\n): null | 'ObjectWrite' | 'PackageWrite' | 'DoesNotExist' | 'Unknown' {\n\tif (state == null) {\n\t\treturn null;\n\t}\n\tswitch (state) {\n\t\tcase ChangedObject_OutputObjectState.OBJECT_WRITE:\n\t\t\treturn 'ObjectWrite';\n\t\tcase ChangedObject_OutputObjectState.PACKAGE_WRITE:\n\t\t\treturn 'PackageWrite';\n\t\tcase ChangedObject_OutputObjectState.DOES_NOT_EXIST:\n\t\t\treturn 'DoesNotExist';\n\t\tcase ChangedObject_OutputObjectState.UNKNOWN:\n\t\t\treturn 'Unknown';\n\t\tdefault:\n\t\t\tstate satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nfunction mapUnchangedConsensusObjectKind(\n\tkind: UnchangedConsensusObject_UnchangedConsensusObjectKind | undefined,\n): null | Experimental_SuiClientTypes.UnchangedConsensusObject['kind'] {\n\tif (kind == null) {\n\t\treturn null;\n\t}\n\tswitch (kind) {\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.UNCHANGED_CONSENSUS_OBJECT_KIND_UNKNOWN:\n\t\t\treturn 'Unknown';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.READ_ONLY_ROOT:\n\t\t\treturn 'ReadOnlyRoot';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.MUTATE_CONSENSUS_STREAM_ENDED:\n\t\t\treturn 'MutateConsensusStreamEnded';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.READ_CONSENSUS_STREAM_ENDED:\n\t\t\treturn 'ReadConsensusStreamEnded';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.CANCELED:\n\t\t\treturn 'Cancelled';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.PER_EPOCH_CONFIG:\n\t\t\treturn 'PerEpochConfig';\n\t\tdefault:\n\t\t\tkind satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nexport function parseTransactionEffects({\n\teffects,\n}: {\n\teffects: TransactionEffects | undefined;\n}): Experimental_SuiClientTypes.TransactionEffects | null {\n\tif (!effects) {\n\t\treturn null;\n\t}\n\n\tconst changedObjects = effects.changedObjects.map(\n\t\t(change): Experimental_SuiClientTypes.ChangedObject => {\n\t\t\treturn {\n\t\t\t\tid: change.objectId!,\n\t\t\t\tinputState: mapInputObjectState(change.inputState)!,\n\t\t\t\tinputVersion: change.inputVersion?.toString() ?? null,\n\t\t\t\tinputDigest: change.inputDigest ?? null,\n\t\t\t\tinputOwner: mapOwner(change.inputOwner),\n\t\t\t\toutputState: mapOutputObjectState(change.outputState)!,\n\t\t\t\toutputVersion: change.outputVersion?.toString() ?? null,\n\t\t\t\toutputDigest: change.outputDigest ?? null,\n\t\t\t\toutputOwner: mapOwner(change.outputOwner),\n\t\t\t\tidOperation: mapIdOperation(change.idOperation)!,\n\t\t\t};\n\t\t},\n\t);\n\n\treturn {\n\t\tbcs: effects.bcs?.value!,\n\t\tdigest: effects.digest!,\n\t\tversion: 2,\n\t\tstatus: effects.status?.success\n\t\t\t? {\n\t\t\t\t\tsuccess: true,\n\t\t\t\t\terror: null,\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\tsuccess: false,\n\t\t\t\t\t// TODO: parse errors properly\n\t\t\t\t\terror: JSON.stringify(effects.status?.error),\n\t\t\t\t},\n\t\tgasUsed: {\n\t\t\tcomputationCost: effects.gasUsed?.computationCost?.toString()!,\n\t\t\tstorageCost: effects.gasUsed?.storageCost?.toString()!,\n\t\t\tstorageRebate: effects.gasUsed?.storageRebate?.toString()!,\n\t\t\tnonRefundableStorageFee: effects.gasUsed?.nonRefundableStorageFee?.toString()!,\n\t\t},\n\t\ttransactionDigest: effects.transactionDigest!,\n\t\tgasObject: {\n\t\t\tid: effects.gasObject?.objectId!,\n\t\t\tinputState: mapInputObjectState(effects.gasObject?.inputState)!,\n\t\t\tinputVersion: effects.gasObject?.inputVersion?.toString() ?? null,\n\t\t\tinputDigest: effects.gasObject?.inputDigest ?? null,\n\t\t\tinputOwner: mapOwner(effects.gasObject?.inputOwner),\n\t\t\toutputState: mapOutputObjectState(effects.gasObject?.outputState)!,\n\t\t\toutputVersion: effects.gasObject?.outputVersion?.toString() ?? null,\n\t\t\toutputDigest: effects.gasObject?.outputDigest ?? null,\n\t\t\toutputOwner: mapOwner(effects.gasObject?.outputOwner),\n\t\t\tidOperation: mapIdOperation(effects.gasObject?.idOperation)!,\n\t\t},\n\t\teventsDigest: effects.eventsDigest ?? null,\n\t\tdependencies: effects.dependencies,\n\t\tlamportVersion: effects.lamportVersion?.toString() ?? null,\n\t\tchangedObjects,\n\t\tunchangedConsensusObjects: effects.unchangedConsensusObjects.map(\n\t\t\t(object): Experimental_SuiClientTypes.UnchangedConsensusObject => {\n\t\t\t\treturn {\n\t\t\t\t\tkind: mapUnchangedConsensusObjectKind(object.kind)!,\n\t\t\t\t\t// TODO: we are inconsistent about id vs objectId\n\t\t\t\t\tobjectId: object.objectId!,\n\t\t\t\t\tversion: object.version?.toString() ?? null,\n\t\t\t\t\tdigest: object.digest ?? null,\n\t\t\t\t};\n\t\t\t},\n\t\t),\n\t\tauxiliaryDataDigest: effects.auxiliaryDataDigest ?? null,\n\t};\n}\n\nfunction parseTransaction(\n\ttransaction: ExecutedTransaction,\n): Experimental_SuiClientTypes.TransactionResponse {\n\tconst parsedTx = bcs.SenderSignedData.parse(transaction.transaction?.bcs?.value!)[0];\n\tconst bytes = bcs.TransactionData.serialize(parsedTx.intentMessage.value).toBytes();\n\tconst data = TransactionDataBuilder.restore({\n\t\tversion: 2,\n\t\tsender: parsedTx.intentMessage.value.V1.sender,\n\t\texpiration: parsedTx.intentMessage.value.V1.expiration,\n\t\tgasData: parsedTx.intentMessage.value.V1.gasData,\n\t\tinputs: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction!.inputs,\n\t\tcommands: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction!.commands,\n\t});\n\n\tconst objectTypes: Record<string, string> = {};\n\ttransaction.inputObjects.forEach((object) => {\n\t\tif (object.objectId && object.objectType) {\n\t\t\tobjectTypes[object.objectId] = object.objectType;\n\t\t}\n\t});\n\n\ttransaction.outputObjects.forEach((object) => {\n\t\tif (object.objectId && object.objectType) {\n\t\t\tobjectTypes[object.objectId] = object.objectType;\n\t\t}\n\t});\n\n\tconst effects = parseTransactionEffects({\n\t\teffects: transaction.effects,\n\t})!;\n\n\treturn {\n\t\tdigest: transaction.digest!,\n\t\tepoch: transaction.effects?.epoch?.toString() ?? null,\n\t\teffects,\n\t\tobjectTypes: Promise.resolve(objectTypes),\n\t\ttransaction: {\n\t\t\tgasData: data.gasData,\n\t\t\tsender: data.sender,\n\t\t\texpiration: data.expiration,\n\t\t\tcommands: data.commands,\n\t\t\tinputs: data.inputs,\n\t\t\tversion: data.version,\n\t\t\tbcs: bytes,\n\t\t},\n\t\tsignatures: parsedTx.txSignatures,\n\t\tbalanceChanges:\n\t\t\ttransaction.balanceChanges?.map((change) => ({\n\t\t\t\tcoinType: change.coinType!,\n\t\t\t\taddress: change.address!,\n\t\t\t\tamount: change.amount!,\n\t\t\t})) ?? [],\n\t};\n}\n\nfunction parseNormalizedSuiMoveType(\n\ttype: OpenSignature,\n): Experimental_SuiClientTypes.OpenSignature {\n\tlet reference: 'mutable' | 'immutable' | null = null;\n\n\tif (type.reference === OpenSignature_Reference.IMMUTABLE) {\n\t\treference = 'immutable';\n\t} else if (type.reference === OpenSignature_Reference.MUTABLE) {\n\t\treference = 'mutable';\n\t}\n\n\treturn {\n\t\treference,\n\t\tbody: parseNormalizedSuiMoveTypeBody(type.body!),\n\t};\n}\n\nfunction parseNormalizedSuiMoveTypeBody(\n\ttype: OpenSignatureBody,\n): Experimental_SuiClientTypes.OpenSignatureBody {\n\tswitch (type.type) {\n\t\tcase OpenSignatureBody_Type.TYPE_UNKNOWN:\n\t\t\treturn { $kind: 'unknown' };\n\t\tcase OpenSignatureBody_Type.ADDRESS:\n\t\t\treturn { $kind: 'address' };\n\t\tcase OpenSignatureBody_Type.BOOL:\n\t\t\treturn { $kind: 'bool' };\n\t\tcase OpenSignatureBody_Type.U8:\n\t\t\treturn { $kind: 'u8' };\n\t\tcase OpenSignatureBody_Type.U16:\n\t\t\treturn { $kind: 'u16' };\n\t\tcase OpenSignatureBody_Type.U32:\n\t\t\treturn { $kind: 'u32' };\n\t\tcase OpenSignatureBody_Type.U64:\n\t\t\treturn { $kind: 'u64' };\n\t\tcase OpenSignatureBody_Type.U128:\n\t\t\treturn { $kind: 'u128' };\n\t\tcase OpenSignatureBody_Type.U256:\n\t\t\treturn { $kind: 'u256' };\n\t\tcase OpenSignatureBody_Type.VECTOR:\n\t\t\treturn {\n\t\t\t\t$kind: 'vector',\n\t\t\t\tvector: parseNormalizedSuiMoveTypeBody(type.typeParameterInstantiation[0]),\n\t\t\t};\n\t\tcase OpenSignatureBody_Type.DATATYPE:\n\t\t\treturn {\n\t\t\t\t$kind: 'datatype',\n\t\t\t\tdatatype: {\n\t\t\t\t\ttypeName: type.typeName!,\n\t\t\t\t\ttypeParameters: type.typeParameterInstantiation.map((t) =>\n\t\t\t\t\t\tparseNormalizedSuiMoveTypeBody(t),\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t};\n\t\tcase OpenSignatureBody_Type.TYPE_PARAMETER:\n\t\t\treturn {\n\t\t\t\t$kind: 'typeParameter',\n\t\t\t\tindex: type.typeParameter!,\n\t\t\t};\n\t\tdefault:\n\t\t\treturn { $kind: 'unknown' };\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,0BAAwC;AAGxC,mBAAgC;AAChC,mBAA4C;AAG5C,qBAAsE;AACtE,IAAAA,kBAIO;AACP,0BAAuC;AACvC,iBAAoB;AAEpB,0BAKO;AA5BP;AAgCO,MAAM,uBAAuB,4CAAwB;AAAA,EAE3D,YAAY,EAAE,QAAQ,GAAG,QAAQ,GAA0B;AAC1D,UAAM,OAAO;AAFd;AAGC,uBAAK,SAAU;AAAA,EAChB;AAAA,EAEA,MAAM,WACL,SAC0D;AAC1D,UAAM,cAAU,oBAAM,QAAQ,WAAW,EAAE;AAC3C,UAAM,UAAqE,CAAC;AAE5E,eAAW,SAAS,SAAS;AAC5B,YAAM,WAAW,MAAM,mBAAK,SAAQ,cAAc,gBAAgB;AAAA,QACjE,UAAU,MAAM,IAAI,CAAC,QAAQ,EAAE,UAAU,GA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CAAC,CAAC;AAAA,MAC1E;AAAA,IACD,KAAK,2CAAuB;AAC3B,aAAO;AAAA,QACN,OAAO;AAAA,QACP,UAAU;AAAA,UACT,UAAU,KAAK;AAAA,UACf,gBAAgB,KAAK,2BAA2B;AAAA,YAAI,CAAC,MACpD,+BAA+B,CAAC;AAAA,UACjC;AAAA,QACD;AAAA,MACD;AAAA,IACD,KAAK,2CAAuB;AAC3B,aAAO;AAAA,QACN,OAAO;AAAA,QACP,OAAO,KAAK;AAAA,MACb;AAAA,IACD;AACC,aAAO,EAAE,OAAO,UAAU;AAAA,EAC5B;AACD;",
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type {\n\tExperimental_CoreClientOptions,\n\tExperimental_SuiClientTypes,\n} from '../experimental/index.js';\nimport { Experimental_CoreClient } from '../experimental/index.js';\nimport type { SuiGrpcClient } from './client.js';\nimport type { Owner } from './proto/sui/rpc/v2/owner.js';\nimport { Owner_OwnerKind } from './proto/sui/rpc/v2/owner.js';\nimport { chunk, fromBase64, toBase64 } from '@mysten/utils';\nimport type { ExecutedTransaction } from './proto/sui/rpc/v2/executed_transaction.js';\nimport type { TransactionEffects } from './proto/sui/rpc/v2/effects.js';\nimport { UnchangedConsensusObject_UnchangedConsensusObjectKind } from './proto/sui/rpc/v2/effects.js';\nimport {\n\tChangedObject_IdOperation,\n\tChangedObject_InputObjectState,\n\tChangedObject_OutputObjectState,\n} from './proto/sui/rpc/v2/effects.js';\nimport { TransactionDataBuilder } from '../transactions/index.js';\nimport { bcs } from '../bcs/index.js';\nimport type { OpenSignature, OpenSignatureBody } from './proto/sui/rpc/v2/move_package.js';\nimport {\n\tAbility,\n\tFunctionDescriptor_Visibility,\n\tOpenSignature_Reference,\n\tOpenSignatureBody_Type,\n} from './proto/sui/rpc/v2/move_package.js';\nexport interface GrpcCoreClientOptions extends Experimental_CoreClientOptions {\n\tclient: SuiGrpcClient;\n}\nexport class GrpcCoreClient extends Experimental_CoreClient {\n\t#client: SuiGrpcClient;\n\tconstructor({ client, ...options }: GrpcCoreClientOptions) {\n\t\tsuper(options);\n\t\tthis.#client = client;\n\t}\n\n\tasync getObjects(\n\t\toptions: Experimental_SuiClientTypes.GetObjectsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetObjectsResponse> {\n\t\tconst batches = chunk(options.objectIds, 50);\n\t\tconst results: Experimental_SuiClientTypes.GetObjectsResponse['objects'] = [];\n\n\t\tfor (const batch of batches) {\n\t\t\tconst response = await this.#client.ledgerService.batchGetObjects({\n\t\t\t\trequests: batch.map((id) => ({ objectId: id })),\n\t\t\t\treadMask: {\n\t\t\t\t\tpaths: [\n\t\t\t\t\t\t'owner',\n\t\t\t\t\t\t'object_type',\n\t\t\t\t\t\t'bcs',\n\t\t\t\t\t\t'digest',\n\t\t\t\t\t\t'version',\n\t\t\t\t\t\t'object_id',\n\t\t\t\t\t\t'previous_transaction',\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t});\n\n\t\t\tresults.push(\n\t\t\t\t...response.response.objects.map(\n\t\t\t\t\t(object): Experimental_SuiClientTypes.ObjectResponse | Error => {\n\t\t\t\t\t\tif (object.result.oneofKind === 'error') {\n\t\t\t\t\t\t\t// TODO: improve error handling\n\t\t\t\t\t\t\treturn new Error(object.result.error.message);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (object.result.oneofKind !== 'object') {\n\t\t\t\t\t\t\treturn new Error('Unexpected result type');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid: object.result.object.objectId!,\n\t\t\t\t\t\t\tversion: object.result.object.version?.toString()!,\n\t\t\t\t\t\t\tdigest: object.result.object.digest!,\n\t\t\t\t\t\t\t// TODO: bcs content is not returned in all cases\n\t\t\t\t\t\t\tcontent: Promise.resolve(object.result.object.bcs?.value!),\n\t\t\t\t\t\t\towner: mapOwner(object.result.object.owner)!,\n\t\t\t\t\t\t\ttype: object.result.object.objectType!,\n\t\t\t\t\t\t\tpreviousTransaction: object.result.object.previousTransaction ?? null,\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\treturn {\n\t\t\tobjects: results,\n\t\t};\n\t}\n\tasync getOwnedObjects(\n\t\toptions: Experimental_SuiClientTypes.GetOwnedObjectsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetOwnedObjectsResponse> {\n\t\tconst response = await this.#client.stateService.listOwnedObjects({\n\t\t\towner: options.address,\n\t\t\tobjectType: options.type\n\t\t\t\t? (await this.mvr.resolveType({ type: options.type })).type\n\t\t\t\t: undefined,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'owner',\n\t\t\t\t\t'object_type',\n\t\t\t\t\t'bcs',\n\t\t\t\t\t'digest',\n\t\t\t\t\t'version',\n\t\t\t\t\t'object_id',\n\t\t\t\t\t'previous_transaction',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\n\t\tconst objects = response.response.objects.map(\n\t\t\t(object): Experimental_SuiClientTypes.ObjectResponse => ({\n\t\t\t\tid: object.objectId!,\n\t\t\t\tversion: object.version?.toString()!,\n\t\t\t\tdigest: object.digest!,\n\t\t\t\t// TODO: List owned objects doesn't return content right now\n\t\t\t\tget content() {\n\t\t\t\t\treturn Promise.reject(\n\t\t\t\t\t\tnew Error('GRPC does not return object contents when listing owned objects'),\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\towner: mapOwner(object.owner)!,\n\t\t\t\ttype: object.objectType!,\n\t\t\t\tpreviousTransaction: object.previousTransaction ?? null,\n\t\t\t}),\n\t\t);\n\n\t\treturn {\n\t\t\tobjects,\n\t\t\tcursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,\n\t\t\thasNextPage: response.response.nextPageToken !== undefined,\n\t\t};\n\t}\n\tasync getCoins(\n\t\toptions: Experimental_SuiClientTypes.GetCoinsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetCoinsResponse> {\n\t\tconst response = await this.#client.stateService.listOwnedObjects({\n\t\t\towner: options.address,\n\t\t\tobjectType: `0x2::coin::Coin<${(await this.mvr.resolveType({ type: options.coinType })).type}>`,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'owner',\n\t\t\t\t\t'object_type',\n\t\t\t\t\t'bcs',\n\t\t\t\t\t'digest',\n\t\t\t\t\t'version',\n\t\t\t\t\t'object_id',\n\t\t\t\t\t'balance',\n\t\t\t\t\t'previous_transaction',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\tobjects: response.response.objects.map(\n\t\t\t\t(object): Experimental_SuiClientTypes.CoinResponse => ({\n\t\t\t\t\tid: object.objectId!,\n\t\t\t\t\tversion: object.version?.toString()!,\n\t\t\t\t\tdigest: object.digest!,\n\t\t\t\t\t// TODO: List owned objects doesn't return content right now\n\t\t\t\t\tget content() {\n\t\t\t\t\t\treturn Promise.reject(\n\t\t\t\t\t\t\tnew Error('GRPC does not return object contents when listing owned objects'),\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t\towner: mapOwner(object.owner)!,\n\t\t\t\t\ttype: object.objectType!,\n\t\t\t\t\tbalance: object.balance?.toString()!,\n\t\t\t\t\tpreviousTransaction: object.previousTransaction ?? null,\n\t\t\t\t}),\n\t\t\t),\n\t\t\tcursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,\n\t\t\thasNextPage: response.response.nextPageToken !== undefined,\n\t\t};\n\t}\n\n\tasync getBalance(\n\t\toptions: Experimental_SuiClientTypes.GetBalanceOptions,\n\t): Promise<Experimental_SuiClientTypes.GetBalanceResponse> {\n\t\tconst result = await this.#client.stateService.getBalance({\n\t\t\towner: options.address,\n\t\t\tcoinType: (await this.mvr.resolveType({ type: options.coinType })).type,\n\t\t});\n\n\t\treturn {\n\t\t\tbalance: {\n\t\t\t\tbalance: result.response.balance?.balance?.toString() ?? '0',\n\t\t\t\tcoinType: result.response.balance?.coinType ?? options.coinType,\n\t\t\t},\n\t\t};\n\t}\n\n\tasync getAllBalances(\n\t\toptions: Experimental_SuiClientTypes.GetAllBalancesOptions,\n\t): Promise<Experimental_SuiClientTypes.GetAllBalancesResponse> {\n\t\tconst result = await this.#client.stateService.listBalances({\n\t\t\towner: options.address,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t\tpageSize: options.limit,\n\t\t});\n\n\t\treturn {\n\t\t\thasNextPage: !!result.response.nextPageToken,\n\t\t\tcursor: result.response.nextPageToken ? toBase64(result.response.nextPageToken) : null,\n\t\t\tbalances: result.response.balances.map((balance) => ({\n\t\t\t\tbalance: balance.balance?.toString() ?? '0',\n\t\t\t\tcoinType: balance.coinType!,\n\t\t\t})),\n\t\t};\n\t}\n\tasync getTransaction(\n\t\toptions: Experimental_SuiClientTypes.GetTransactionOptions,\n\t): Promise<Experimental_SuiClientTypes.GetTransactionResponse> {\n\t\tconst { response } = await this.#client.ledgerService.getTransaction({\n\t\t\tdigest: options.digest,\n\t\t\treadMask: {\n\t\t\t\tpaths: ['digest', 'transaction', 'effects', 'signatures', 'balance_changes'],\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\ttransaction: parseTransaction(response.transaction!),\n\t\t};\n\t}\n\tasync executeTransaction(\n\t\toptions: Experimental_SuiClientTypes.ExecuteTransactionOptions,\n\t): Promise<Experimental_SuiClientTypes.ExecuteTransactionResponse> {\n\t\tconst { response } = await this.#client.transactionExecutionService.executeTransaction({\n\t\t\ttransaction: {\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: options.transaction,\n\t\t\t\t},\n\t\t\t},\n\t\t\tsignatures: options.signatures.map((signature) => ({\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: fromBase64(signature),\n\t\t\t\t},\n\t\t\t\tsignature: {\n\t\t\t\t\toneofKind: undefined,\n\t\t\t\t},\n\t\t\t})),\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'transaction.digest',\n\t\t\t\t\t'transaction.transaction',\n\t\t\t\t\t'transaction.effects',\n\t\t\t\t\t'transaction.signatures',\n\t\t\t\t\t'transaction.balance_changes',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\t\treturn {\n\t\t\ttransaction: parseTransaction(response.transaction!),\n\t\t};\n\t}\n\tasync dryRunTransaction(\n\t\toptions: Experimental_SuiClientTypes.DryRunTransactionOptions,\n\t): Promise<Experimental_SuiClientTypes.DryRunTransactionResponse> {\n\t\tconst { response } = await this.#client.transactionExecutionService.simulateTransaction({\n\t\t\ttransaction: {\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: options.transaction,\n\t\t\t\t},\n\t\t\t},\n\t\t\treadMask: {\n\t\t\t\tpaths: [\n\t\t\t\t\t'transaction.digest',\n\t\t\t\t\t'transaction.transaction',\n\t\t\t\t\t'transaction.effects',\n\t\t\t\t\t'transaction.signatures',\n\t\t\t\t\t'transaction.balance_changes',\n\t\t\t\t],\n\t\t\t},\n\t\t});\n\n\t\treturn {\n\t\t\ttransaction: parseTransaction(response.transaction!),\n\t\t};\n\t}\n\tasync getReferenceGasPrice(): Promise<Experimental_SuiClientTypes.GetReferenceGasPriceResponse> {\n\t\tconst response = await this.#client.ledgerService.getEpoch({});\n\n\t\treturn {\n\t\t\treferenceGasPrice: response.response.epoch?.referenceGasPrice?.toString()!,\n\t\t};\n\t}\n\n\tasync getDynamicFields(\n\t\toptions: Experimental_SuiClientTypes.GetDynamicFieldsOptions,\n\t): Promise<Experimental_SuiClientTypes.GetDynamicFieldsResponse> {\n\t\tconst response = await this.#client.stateService.listDynamicFields({\n\t\t\tparent: options.parentId,\n\t\t\tpageToken: options.cursor ? fromBase64(options.cursor) : undefined,\n\t\t});\n\n\t\treturn {\n\t\t\tdynamicFields: response.response.dynamicFields.map((field) => ({\n\t\t\t\tid: field.fieldId!,\n\t\t\t\tname: {\n\t\t\t\t\ttype: field.name?.name!,\n\t\t\t\t\tbcs: field.name?.value!,\n\t\t\t\t},\n\t\t\t\ttype: field.fieldObject\n\t\t\t\t\t? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${field.name?.name!}>,0x2::object::ID>`\n\t\t\t\t\t: `0x2::dynamic_field::Field<${field.name?.value!},${field.valueType!}>`,\n\t\t\t})),\n\t\t\tcursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,\n\t\t\thasNextPage: response.response.nextPageToken !== undefined,\n\t\t};\n\t}\n\n\tasync verifyZkLoginSignature(\n\t\toptions: Experimental_SuiClientTypes.VerifyZkLoginSignatureOptions,\n\t): Promise<Experimental_SuiClientTypes.ZkLoginVerifyResponse> {\n\t\tconst { response } = await this.#client.signatureVerificationService.verifySignature({\n\t\t\tmessage: {\n\t\t\t\tname: options.intentScope,\n\t\t\t\tvalue: fromBase64(options.bytes),\n\t\t\t},\n\t\t\tsignature: {\n\t\t\t\tbcs: {\n\t\t\t\t\tvalue: fromBase64(options.signature),\n\t\t\t\t},\n\t\t\t\tsignature: {\n\t\t\t\t\toneofKind: undefined,\n\t\t\t\t},\n\t\t\t},\n\t\t\tjwks: [],\n\t\t});\n\n\t\treturn {\n\t\t\tsuccess: response.isValid ?? false,\n\t\t\terrors: response.reason ? [response.reason] : [],\n\t\t};\n\t}\n\n\tasync getMoveFunction(\n\t\toptions: Experimental_SuiClientTypes.GetMoveFunctionOptions,\n\t): Promise<Experimental_SuiClientTypes.GetMoveFunctionResponse> {\n\t\tconst { response } = await this.#client.movePackageService.getFunction({\n\t\t\tpackageId: (await this.mvr.resolvePackage({ package: options.packageId })).package,\n\t\t\tmoduleName: options.moduleName,\n\t\t\tname: options.name,\n\t\t});\n\n\t\tlet visibility: 'public' | 'private' | 'friend' | 'unknown' = 'unknown';\n\n\t\tswitch (response.function?.visibility) {\n\t\t\tcase FunctionDescriptor_Visibility.PUBLIC:\n\t\t\t\tvisibility = 'public';\n\t\t\t\tbreak;\n\t\t\tcase FunctionDescriptor_Visibility.PRIVATE:\n\t\t\t\tvisibility = 'private';\n\t\t\t\tbreak;\n\t\t\tcase FunctionDescriptor_Visibility.FRIEND:\n\t\t\t\tvisibility = 'friend';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn {\n\t\t\tfunction: {\n\t\t\t\tpackageId: options.packageId,\n\t\t\t\tmoduleName: options.moduleName,\n\t\t\t\tname: response.function?.name!,\n\t\t\t\tvisibility,\n\t\t\t\tisEntry: response.function?.isEntry ?? false,\n\t\t\t\ttypeParameters:\n\t\t\t\t\tresponse.function?.typeParameters?.map(({ constraints }) => ({\n\t\t\t\t\t\tisPhantom: false,\n\t\t\t\t\t\tconstraints:\n\t\t\t\t\t\t\tconstraints.map((constraint) => {\n\t\t\t\t\t\t\t\tswitch (constraint) {\n\t\t\t\t\t\t\t\t\tcase Ability.COPY:\n\t\t\t\t\t\t\t\t\t\treturn 'copy';\n\t\t\t\t\t\t\t\t\tcase Ability.DROP:\n\t\t\t\t\t\t\t\t\t\treturn 'drop';\n\t\t\t\t\t\t\t\t\tcase Ability.STORE:\n\t\t\t\t\t\t\t\t\t\treturn 'store';\n\t\t\t\t\t\t\t\t\tcase Ability.KEY:\n\t\t\t\t\t\t\t\t\t\treturn 'key';\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\treturn 'unknown';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}) ?? [],\n\t\t\t\t\t})) ?? [],\n\t\t\t\tparameters:\n\t\t\t\t\tresponse.function?.parameters?.map((param) => parseNormalizedSuiMoveType(param)) ?? [],\n\t\t\t\treturns: response.function?.returns?.map((ret) => parseNormalizedSuiMoveType(ret)) ?? [],\n\t\t\t},\n\t\t};\n\t}\n\n\tresolveTransactionPlugin(): never {\n\t\tthrow new Error('GRPC client does not support transaction resolution yet');\n\t}\n}\n\nfunction mapOwner(owner: Owner | null | undefined): Experimental_SuiClientTypes.ObjectOwner | null {\n\tif (!owner) {\n\t\treturn null;\n\t}\n\tif (owner.kind === Owner_OwnerKind.IMMUTABLE) {\n\t\treturn {\n\t\t\t$kind: 'Immutable',\n\t\t\tImmutable: true,\n\t\t};\n\t}\n\tif (owner.kind === Owner_OwnerKind.ADDRESS) {\n\t\treturn {\n\t\t\tAddressOwner: owner.address!,\n\t\t\t$kind: 'AddressOwner',\n\t\t};\n\t}\n\tif (owner.kind === Owner_OwnerKind.OBJECT) {\n\t\treturn {\n\t\t\t$kind: 'ObjectOwner',\n\t\t\tObjectOwner: owner.address!,\n\t\t};\n\t}\n\n\tif (owner.kind === Owner_OwnerKind.SHARED) {\n\t\tif (owner.address) {\n\t\t\treturn {\n\t\t\t\t$kind: 'ConsensusAddressOwner',\n\t\t\t\tConsensusAddressOwner: {\n\t\t\t\t\towner: owner.address,\n\t\t\t\t\tstartVersion: owner.version?.toString()!,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t$kind: 'Shared',\n\t\t\tShared: {\n\t\t\t\tinitialSharedVersion: owner.version?.toString()!,\n\t\t\t},\n\t\t};\n\t}\n\n\tthrow new Error('Unknown owner kind');\n}\n\nfunction mapIdOperation(\n\toperation: ChangedObject_IdOperation | undefined,\n): null | 'Created' | 'Deleted' | 'Unknown' | 'None' {\n\tif (operation == null) {\n\t\treturn null;\n\t}\n\tswitch (operation) {\n\t\tcase ChangedObject_IdOperation.CREATED:\n\t\t\treturn 'Created';\n\t\tcase ChangedObject_IdOperation.DELETED:\n\t\t\treturn 'Deleted';\n\t\tcase ChangedObject_IdOperation.NONE:\n\t\tcase ChangedObject_IdOperation.ID_OPERATION_UNKNOWN:\n\t\t\treturn 'None';\n\t\tdefault:\n\t\t\toperation satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nfunction mapInputObjectState(\n\tstate: ChangedObject_InputObjectState | undefined,\n): null | 'Exists' | 'DoesNotExist' | 'Unknown' {\n\tif (state == null) {\n\t\treturn null;\n\t}\n\tswitch (state) {\n\t\tcase ChangedObject_InputObjectState.EXISTS:\n\t\t\treturn 'Exists';\n\t\tcase ChangedObject_InputObjectState.DOES_NOT_EXIST:\n\t\t\treturn 'DoesNotExist';\n\t\tcase ChangedObject_InputObjectState.UNKNOWN:\n\t\t\treturn 'Unknown';\n\t\tdefault:\n\t\t\tstate satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nfunction mapOutputObjectState(\n\tstate: ChangedObject_OutputObjectState | undefined,\n): null | 'ObjectWrite' | 'PackageWrite' | 'DoesNotExist' | 'Unknown' {\n\tif (state == null) {\n\t\treturn null;\n\t}\n\tswitch (state) {\n\t\tcase ChangedObject_OutputObjectState.OBJECT_WRITE:\n\t\t\treturn 'ObjectWrite';\n\t\tcase ChangedObject_OutputObjectState.PACKAGE_WRITE:\n\t\t\treturn 'PackageWrite';\n\t\tcase ChangedObject_OutputObjectState.DOES_NOT_EXIST:\n\t\t\treturn 'DoesNotExist';\n\t\tcase ChangedObject_OutputObjectState.UNKNOWN:\n\t\t\treturn 'Unknown';\n\t\tdefault:\n\t\t\tstate satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nfunction mapUnchangedConsensusObjectKind(\n\tkind: UnchangedConsensusObject_UnchangedConsensusObjectKind | undefined,\n): null | Experimental_SuiClientTypes.UnchangedConsensusObject['kind'] {\n\tif (kind == null) {\n\t\treturn null;\n\t}\n\tswitch (kind) {\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.UNCHANGED_CONSENSUS_OBJECT_KIND_UNKNOWN:\n\t\t\treturn 'Unknown';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.READ_ONLY_ROOT:\n\t\t\treturn 'ReadOnlyRoot';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.MUTATE_CONSENSUS_STREAM_ENDED:\n\t\t\treturn 'MutateConsensusStreamEnded';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.READ_CONSENSUS_STREAM_ENDED:\n\t\t\treturn 'ReadConsensusStreamEnded';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.CANCELED:\n\t\t\treturn 'Cancelled';\n\t\tcase UnchangedConsensusObject_UnchangedConsensusObjectKind.PER_EPOCH_CONFIG:\n\t\t\treturn 'PerEpochConfig';\n\t\tdefault:\n\t\t\tkind satisfies never;\n\t\t\treturn 'Unknown';\n\t}\n}\n\nexport function parseTransactionEffects({\n\teffects,\n}: {\n\teffects: TransactionEffects | undefined;\n}): Experimental_SuiClientTypes.TransactionEffects | null {\n\tif (!effects) {\n\t\treturn null;\n\t}\n\n\tconst changedObjects = effects.changedObjects.map(\n\t\t(change): Experimental_SuiClientTypes.ChangedObject => {\n\t\t\treturn {\n\t\t\t\tid: change.objectId!,\n\t\t\t\tinputState: mapInputObjectState(change.inputState)!,\n\t\t\t\tinputVersion: change.inputVersion?.toString() ?? null,\n\t\t\t\tinputDigest: change.inputDigest ?? null,\n\t\t\t\tinputOwner: mapOwner(change.inputOwner),\n\t\t\t\toutputState: mapOutputObjectState(change.outputState)!,\n\t\t\t\toutputVersion: change.outputVersion?.toString() ?? null,\n\t\t\t\toutputDigest: change.outputDigest ?? null,\n\t\t\t\toutputOwner: mapOwner(change.outputOwner),\n\t\t\t\tidOperation: mapIdOperation(change.idOperation)!,\n\t\t\t};\n\t\t},\n\t);\n\n\treturn {\n\t\tbcs: effects.bcs?.value!,\n\t\tdigest: effects.digest!,\n\t\tversion: 2,\n\t\tstatus: effects.status?.success\n\t\t\t? {\n\t\t\t\t\tsuccess: true,\n\t\t\t\t\terror: null,\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\tsuccess: false,\n\t\t\t\t\t// TODO: parse errors properly\n\t\t\t\t\terror: JSON.stringify(effects.status?.error),\n\t\t\t\t},\n\t\tgasUsed: {\n\t\t\tcomputationCost: effects.gasUsed?.computationCost?.toString()!,\n\t\t\tstorageCost: effects.gasUsed?.storageCost?.toString()!,\n\t\t\tstorageRebate: effects.gasUsed?.storageRebate?.toString()!,\n\t\t\tnonRefundableStorageFee: effects.gasUsed?.nonRefundableStorageFee?.toString()!,\n\t\t},\n\t\ttransactionDigest: effects.transactionDigest!,\n\t\tgasObject: {\n\t\t\tid: effects.gasObject?.objectId!,\n\t\t\tinputState: mapInputObjectState(effects.gasObject?.inputState)!,\n\t\t\tinputVersion: effects.gasObject?.inputVersion?.toString() ?? null,\n\t\t\tinputDigest: effects.gasObject?.inputDigest ?? null,\n\t\t\tinputOwner: mapOwner(effects.gasObject?.inputOwner),\n\t\t\toutputState: mapOutputObjectState(effects.gasObject?.outputState)!,\n\t\t\toutputVersion: effects.gasObject?.outputVersion?.toString() ?? null,\n\t\t\toutputDigest: effects.gasObject?.outputDigest ?? null,\n\t\t\toutputOwner: mapOwner(effects.gasObject?.outputOwner),\n\t\t\tidOperation: mapIdOperation(effects.gasObject?.idOperation)!,\n\t\t},\n\t\teventsDigest: effects.eventsDigest ?? null,\n\t\tdependencies: effects.dependencies,\n\t\tlamportVersion: effects.lamportVersion?.toString() ?? null,\n\t\tchangedObjects,\n\t\tunchangedConsensusObjects: effects.unchangedConsensusObjects.map(\n\t\t\t(object): Experimental_SuiClientTypes.UnchangedConsensusObject => {\n\t\t\t\treturn {\n\t\t\t\t\tkind: mapUnchangedConsensusObjectKind(object.kind)!,\n\t\t\t\t\t// TODO: we are inconsistent about id vs objectId\n\t\t\t\t\tobjectId: object.objectId!,\n\t\t\t\t\tversion: object.version?.toString() ?? null,\n\t\t\t\t\tdigest: object.digest ?? null,\n\t\t\t\t};\n\t\t\t},\n\t\t),\n\t\tauxiliaryDataDigest: effects.auxiliaryDataDigest ?? null,\n\t};\n}\n\nfunction parseTransaction(\n\ttransaction: ExecutedTransaction,\n): Experimental_SuiClientTypes.TransactionResponse {\n\tconst parsedTx = bcs.SenderSignedData.parse(transaction.transaction?.bcs?.value!)[0];\n\tconst bytes = bcs.TransactionData.serialize(parsedTx.intentMessage.value).toBytes();\n\tconst data = TransactionDataBuilder.restore({\n\t\tversion: 2,\n\t\tsender: parsedTx.intentMessage.value.V1.sender,\n\t\texpiration: parsedTx.intentMessage.value.V1.expiration,\n\t\tgasData: parsedTx.intentMessage.value.V1.gasData,\n\t\tinputs: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction!.inputs,\n\t\tcommands: parsedTx.intentMessage.value.V1.kind.ProgrammableTransaction!.commands,\n\t});\n\n\tconst objectTypes: Record<string, string> = {};\n\ttransaction.objects?.objects.forEach((object) => {\n\t\tif (object.objectId && object.objectType) {\n\t\t\tobjectTypes[object.objectId] = object.objectType;\n\t\t}\n\t});\n\n\tconst effects = parseTransactionEffects({\n\t\teffects: transaction.effects,\n\t})!;\n\n\treturn {\n\t\tdigest: transaction.digest!,\n\t\tepoch: transaction.effects?.epoch?.toString() ?? null,\n\t\teffects,\n\t\tobjectTypes: Promise.resolve(objectTypes),\n\t\ttransaction: {\n\t\t\tgasData: data.gasData,\n\t\t\tsender: data.sender,\n\t\t\texpiration: data.expiration,\n\t\t\tcommands: data.commands,\n\t\t\tinputs: data.inputs,\n\t\t\tversion: data.version,\n\t\t\tbcs: bytes,\n\t\t},\n\t\tsignatures: parsedTx.txSignatures,\n\t\tbalanceChanges:\n\t\t\ttransaction.balanceChanges?.map((change) => ({\n\t\t\t\tcoinType: change.coinType!,\n\t\t\t\taddress: change.address!,\n\t\t\t\tamount: change.amount!,\n\t\t\t})) ?? [],\n\t};\n}\n\nfunction parseNormalizedSuiMoveType(\n\ttype: OpenSignature,\n): Experimental_SuiClientTypes.OpenSignature {\n\tlet reference: 'mutable' | 'immutable' | null = null;\n\n\tif (type.reference === OpenSignature_Reference.IMMUTABLE) {\n\t\treference = 'immutable';\n\t} else if (type.reference === OpenSignature_Reference.MUTABLE) {\n\t\treference = 'mutable';\n\t}\n\n\treturn {\n\t\treference,\n\t\tbody: parseNormalizedSuiMoveTypeBody(type.body!),\n\t};\n}\n\nfunction parseNormalizedSuiMoveTypeBody(\n\ttype: OpenSignatureBody,\n): Experimental_SuiClientTypes.OpenSignatureBody {\n\tswitch (type.type) {\n\t\tcase OpenSignatureBody_Type.TYPE_UNKNOWN:\n\t\t\treturn { $kind: 'unknown' };\n\t\tcase OpenSignatureBody_Type.ADDRESS:\n\t\t\treturn { $kind: 'address' };\n\t\tcase OpenSignatureBody_Type.BOOL:\n\t\t\treturn { $kind: 'bool' };\n\t\tcase OpenSignatureBody_Type.U8:\n\t\t\treturn { $kind: 'u8' };\n\t\tcase OpenSignatureBody_Type.U16:\n\t\t\treturn { $kind: 'u16' };\n\t\tcase OpenSignatureBody_Type.U32:\n\t\t\treturn { $kind: 'u32' };\n\t\tcase OpenSignatureBody_Type.U64:\n\t\t\treturn { $kind: 'u64' };\n\t\tcase OpenSignatureBody_Type.U128:\n\t\t\treturn { $kind: 'u128' };\n\t\tcase OpenSignatureBody_Type.U256:\n\t\t\treturn { $kind: 'u256' };\n\t\tcase OpenSignatureBody_Type.VECTOR:\n\t\t\treturn {\n\t\t\t\t$kind: 'vector',\n\t\t\t\tvector: parseNormalizedSuiMoveTypeBody(type.typeParameterInstantiation[0]),\n\t\t\t};\n\t\tcase OpenSignatureBody_Type.DATATYPE:\n\t\t\treturn {\n\t\t\t\t$kind: 'datatype',\n\t\t\t\tdatatype: {\n\t\t\t\t\ttypeName: type.typeName!,\n\t\t\t\t\ttypeParameters: type.typeParameterInstantiation.map((t) =>\n\t\t\t\t\t\tparseNormalizedSuiMoveTypeBody(t),\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t};\n\t\tcase OpenSignatureBody_Type.TYPE_PARAMETER:\n\t\t\treturn {\n\t\t\t\t$kind: 'typeParameter',\n\t\t\t\tindex: type.typeParameter!,\n\t\t\t};\n\t\tdefault:\n\t\t\treturn { $kind: 'unknown' };\n\t}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,0BAAwC;AAGxC,mB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C3B,aAAO,EAAE,OAAO,MAAM;AAAA,IACvB,KAAK,2CAAuB;AAC3B,aAAO,EAAE,OAAO,MAAM;AAAA,IACvB,KAAK,2CAAuB;AAC3B,aAAO,EAAE,OAAO,MAAM;AAAA,IACvB,KAAK,2CAAuB;AAC3B,aAAO,EAAE,OAAO,OAAO;AAAA,IACxB,KAAK,2CAAuB;AAC3B,aAAO,EAAE,OAAO,OAAO;AAAA,IACxB,KAAK,2CAAuB;AAC3B,aAAO;AAAA,QACN,OAAO;AAAA,QACP,QAAQ,+BAA+B,KAAK,2BAA2B,CAAC,CAAC;AAAA,MAC1E;AAAA,IACD,KAAK,2CAAuB;AAC3B,aAAO;AAAA,QACN,OAAO;AAAA,QACP,UAAU;AAAA,UACT,UAAU,KAAK;AAAA,UACf,gBAAgB,KAAK,2BAA2B;AAAA,YAAI,CAAC,MACpD,+BAA+B,CAAC;AAAA,UACjC;AAAA,QACD;AAAA,MACD;AAAA,IACD,KAAK,2CAAuB;AAC3B,aAAO;AAAA,QACN,OAAO;AAAA,QACP,OAAO,KAAK;AAAA,MACb;AAAA,IACD;AACC,aAAO,EAAE,OAAO,UAAU;AAAA,EAC5B;AACD;",
6
6
  "names": ["import_effects"]
7
7
  }
@@ -1,9 +1,9 @@
1
- import type { JsonValue } from '@protobuf-ts/runtime';
2
- import type { JsonReadOptions } from '@protobuf-ts/runtime';
3
- import type { JsonWriteOptions } from '@protobuf-ts/runtime';
4
- import type { BinaryReadOptions } from '@protobuf-ts/runtime';
5
- import type { IMessageType } from '@protobuf-ts/runtime';
6
- import { MessageType } from '@protobuf-ts/runtime';
1
+ import type { JsonValue } from "@protobuf-ts/runtime";
2
+ import type { JsonReadOptions } from "@protobuf-ts/runtime";
3
+ import type { JsonWriteOptions } from "@protobuf-ts/runtime";
4
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
5
+ import type { IMessageType } from "@protobuf-ts/runtime";
6
+ import { MessageType } from "@protobuf-ts/runtime";
7
7
  /**
8
8
  * `Any` contains an arbitrary serialized protocol buffer message along with a
9
9
  * URL that describes the type of the serialized message.
@@ -60,16 +60,15 @@ class Any$Type extends import_runtime4.MessageType {
60
60
  */
61
61
  unpack(any, type, options) {
62
62
  if (!this.contains(any, type))
63
- throw new Error(
64
- "Cannot unpack google.protobuf.Any with typeUrl '" + any.typeUrl + "' as " + type.typeName + "."
65
- );
63
+ throw new Error("Cannot unpack google.protobuf.Any with typeUrl '" + any.typeUrl + "' as " + type.typeName + ".");
66
64
  return type.fromBinary(any.value, options);
67
65
  }
68
66
  /**
69
67
  * Does the given `Any` contain a packed message of the given type?
70
68
  */
71
69
  contains(any, type) {
72
- if (!any.typeUrl.length) return false;
70
+ if (!any.typeUrl.length)
71
+ return false;
73
72
  let wants = typeof type == "string" ? type : type.typeName;
74
73
  let has = this.typeUrlToName(any.typeUrl);
75
74
  return wants === has;
@@ -84,32 +83,29 @@ class Any$Type extends import_runtime4.MessageType {
84
83
  * `google.protobuf.Any` from JSON format.
85
84
  */
86
85
  internalJsonWrite(any, options) {
87
- if (any.typeUrl === "") return {};
86
+ if (any.typeUrl === "")
87
+ return {};
88
88
  let typeName = this.typeUrlToName(any.typeUrl);
89
89
  let opt = (0, import_runtime3.jsonWriteOptions)(options);
90
90
  let type = opt.typeRegistry?.find((t) => t.typeName === typeName);
91
91
  if (!type)
92
- throw new globalThis.Error(
93
- "Unable to convert google.protobuf.Any with typeUrl '" + any.typeUrl + "' to JSON. The specified type " + typeName + " is not available in the type registry."
94
- );
92
+ throw new globalThis.Error("Unable to convert google.protobuf.Any with typeUrl '" + any.typeUrl + "' to JSON. The specified type " + typeName + " is not available in the type registry.");
95
93
  let value = type.fromBinary(any.value, { readUnknownField: false });
96
94
  let json = type.internalJsonWrite(value, opt);
97
- if (typeName.startsWith("google.protobuf.") || !(0, import_runtime.isJsonObject)(json)) json = { value: json };
95
+ if (typeName.startsWith("google.protobuf.") || !(0, import_runtime.isJsonObject)(json))
96
+ json = { value: json };
98
97
  json["@type"] = any.typeUrl;
99
98
  return json;
100
99
  }
101
100
  internalJsonRead(json, options, target) {
102
101
  if (!(0, import_runtime.isJsonObject)(json))
103
- throw new globalThis.Error(
104
- "Unable to parse google.protobuf.Any from JSON " + (0, import_runtime2.typeofJsonValue)(json) + "."
105
- );
106
- if (typeof json["@type"] != "string" || json["@type"] == "") return this.create();
102
+ throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON " + (0, import_runtime2.typeofJsonValue)(json) + ".");
103
+ if (typeof json["@type"] != "string" || json["@type"] == "")
104
+ return this.create();
107
105
  let typeName = this.typeUrlToName(json["@type"]);
108
106
  let type = options?.typeRegistry?.find((t) => t.typeName == typeName);
109
107
  if (!type)
110
- throw new globalThis.Error(
111
- "Unable to parse google.protobuf.Any from JSON. The specified type " + typeName + " is not available in the type registry."
112
- );
108
+ throw new globalThis.Error("Unable to parse google.protobuf.Any from JSON. The specified type " + typeName + " is not available in the type registry.");
113
109
  let value;
114
110
  if (typeName.startsWith("google.protobuf.") && json.hasOwnProperty("value"))
115
111
  value = type.fromJson(json["value"], options);
@@ -118,20 +114,24 @@ class Any$Type extends import_runtime4.MessageType {
118
114
  delete copy["@type"];
119
115
  value = type.fromJson(copy, options);
120
116
  }
121
- if (target === void 0) target = this.create();
117
+ if (target === void 0)
118
+ target = this.create();
122
119
  target.typeUrl = json["@type"];
123
120
  target.value = type.toBinary(value);
124
121
  return target;
125
122
  }
126
123
  typeNameToUrl(name) {
127
- if (!name.length) throw new Error("invalid type name: " + name);
124
+ if (!name.length)
125
+ throw new Error("invalid type name: " + name);
128
126
  return "type.googleapis.com/" + name;
129
127
  }
130
128
  typeUrlToName(url) {
131
- if (!url.length) throw new Error("invalid type url: " + url);
129
+ if (!url.length)
130
+ throw new Error("invalid type url: " + url);
132
131
  let slash = url.lastIndexOf("/");
133
132
  let name = slash > 0 ? url.substring(slash + 1) : url;
134
- if (!name.length) throw new Error("invalid type url: " + url);
133
+ if (!name.length)
134
+ throw new Error("invalid type url: " + url);
135
135
  return name;
136
136
  }
137
137
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/grpc/proto/google/protobuf/any.ts"],
4
- "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// @generated by protobuf-ts 2.9.6 with parameter force_server_none,optimize_code_size,ts_nocheck\n// @generated from protobuf file \"google/protobuf/any.proto\" (package \"google.protobuf\", syntax proto3)\n// tslint:disable\n// @ts-nocheck\n//\n// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\nimport { isJsonObject } from '@protobuf-ts/runtime';\nimport { typeofJsonValue } from '@protobuf-ts/runtime';\nimport type { JsonValue } from '@protobuf-ts/runtime';\nimport { jsonWriteOptions } from '@protobuf-ts/runtime';\nimport type { JsonReadOptions } from '@protobuf-ts/runtime';\nimport type { JsonWriteOptions } from '@protobuf-ts/runtime';\nimport type { BinaryReadOptions } from '@protobuf-ts/runtime';\nimport type { IMessageType } from '@protobuf-ts/runtime';\nimport { MessageType } from '@protobuf-ts/runtime';\n/**\n * `Any` contains an arbitrary serialized protocol buffer message along with a\n * URL that describes the type of the serialized message.\n *\n * Protobuf library provides support to pack/unpack Any values in the form\n * of utility functions or additional generated methods of the Any type.\n *\n * Example 1: Pack and unpack a message in C++.\n *\n * Foo foo = ...;\n * Any any;\n * any.PackFrom(foo);\n * ...\n * if (any.UnpackTo(&foo)) {\n * ...\n * }\n *\n * Example 2: Pack and unpack a message in Java.\n *\n * Foo foo = ...;\n * Any any = Any.pack(foo);\n * ...\n * if (any.is(Foo.class)) {\n * foo = any.unpack(Foo.class);\n * }\n * // or ...\n * if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n * foo = any.unpack(Foo.getDefaultInstance());\n * }\n *\n * Example 3: Pack and unpack a message in Python.\n *\n * foo = Foo(...)\n * any = Any()\n * any.Pack(foo)\n * ...\n * if any.Is(Foo.DESCRIPTOR):\n * any.Unpack(foo)\n * ...\n *\n * Example 4: Pack and unpack a message in Go\n *\n * foo := &pb.Foo{...}\n * any, err := anypb.New(foo)\n * if err != nil {\n * ...\n * }\n * ...\n * foo := &pb.Foo{}\n * if err := any.UnmarshalTo(foo); err != nil {\n * ...\n * }\n *\n * The pack methods provided by protobuf library will by default use\n * 'type.googleapis.com/full.type.name' as the type URL and the unpack\n * methods only use the fully qualified type name after the last '/'\n * in the type URL, for example \"foo.bar.com/x/y.z\" will yield type\n * name \"y.z\".\n *\n * JSON\n * ====\n * The JSON representation of an `Any` value uses the regular\n * representation of the deserialized, embedded message, with an\n * additional field `@type` which contains the type URL. Example:\n *\n * package google.profile;\n * message Person {\n * string first_name = 1;\n * string last_name = 2;\n * }\n *\n * {\n * \"@type\": \"type.googleapis.com/google.profile.Person\",\n * \"firstName\": <string>,\n * \"lastName\": <string>\n * }\n *\n * If the embedded message type is well-known and has a custom JSON\n * representation, that representation will be embedded adding a field\n * `value` which holds the custom JSON in addition to the `@type`\n * field. Example (for message [google.protobuf.Duration][]):\n *\n * {\n * \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n * \"value\": \"1.212s\"\n * }\n *\n *\n * @generated from protobuf message google.protobuf.Any\n */\nexport interface Any {\n\t/**\n\t * A URL/resource name that uniquely identifies the type of the serialized\n\t * protocol buffer message. This string must contain at least\n\t * one \"/\" character. The last segment of the URL's path must represent\n\t * the fully qualified name of the type (as in\n\t * `path/google.protobuf.Duration`). The name should be in a canonical form\n\t * (e.g., leading \".\" is not accepted).\n\t *\n\t * In practice, teams usually precompile into the binary all types that they\n\t * expect it to use in the context of Any. However, for URLs which use the\n\t * scheme `http`, `https`, or no scheme, one can optionally set up a type\n\t * server that maps type URLs to message definitions as follows:\n\t *\n\t * * If no scheme is provided, `https` is assumed.\n\t * * An HTTP GET on the URL must yield a [google.protobuf.Type][]\n\t * value in binary format, or produce an error.\n\t * * Applications are allowed to cache lookup results based on the\n\t * URL, or have them precompiled into a binary to avoid any\n\t * lookup. Therefore, binary compatibility needs to be preserved\n\t * on changes to types. (Use versioned type names to manage\n\t * breaking changes.)\n\t *\n\t * Note: this functionality is not currently available in the official\n\t * protobuf release, and it is not used for type URLs beginning with\n\t * type.googleapis.com. As of May 2023, there are no widely used type server\n\t * implementations and no plans to implement one.\n\t *\n\t * Schemes other than `http`, `https` (or the empty scheme) might be\n\t * used with implementation specific semantics.\n\t *\n\t *\n\t * @generated from protobuf field: string type_url = 1;\n\t */\n\ttypeUrl: string;\n\t/**\n\t * Must be a valid serialized protocol buffer of the above specified type.\n\t *\n\t * @generated from protobuf field: bytes value = 2;\n\t */\n\tvalue: Uint8Array;\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Any$Type extends MessageType<Any> {\n\tconstructor() {\n\t\tsuper('google.protobuf.Any', [\n\t\t\t{ no: 1, name: 'type_url', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },\n\t\t\t{ no: 2, name: 'value', kind: 'scalar', T: 12 /*ScalarType.BYTES*/ },\n\t\t]);\n\t}\n\t/**\n\t * Pack the message into a new `Any`.\n\t *\n\t * Uses 'type.googleapis.com/full.type.name' as the type URL.\n\t */\n\tpack<T extends object>(message: T, type: IMessageType<T>): Any {\n\t\treturn {\n\t\t\ttypeUrl: this.typeNameToUrl(type.typeName),\n\t\t\tvalue: type.toBinary(message),\n\t\t};\n\t}\n\t/**\n\t * Unpack the message from the `Any`.\n\t */\n\tunpack<T extends object>(\n\t\tany: Any,\n\t\ttype: IMessageType<T>,\n\t\toptions?: Partial<BinaryReadOptions>,\n\t): T {\n\t\tif (!this.contains(any, type))\n\t\t\tthrow new Error(\n\t\t\t\t\"Cannot unpack google.protobuf.Any with typeUrl '\" +\n\t\t\t\t\tany.typeUrl +\n\t\t\t\t\t\"' as \" +\n\t\t\t\t\ttype.typeName +\n\t\t\t\t\t'.',\n\t\t\t);\n\t\treturn type.fromBinary(any.value, options);\n\t}\n\t/**\n\t * Does the given `Any` contain a packed message of the given type?\n\t */\n\tcontains(any: Any, type: IMessageType<any> | string): boolean {\n\t\tif (!any.typeUrl.length) return false;\n\t\tlet wants = typeof type == 'string' ? type : type.typeName;\n\t\tlet has = this.typeUrlToName(any.typeUrl);\n\t\treturn wants === has;\n\t}\n\t/**\n\t * Convert the message to canonical JSON value.\n\t *\n\t * You have to provide the `typeRegistry` option so that the\n\t * packed message can be converted to JSON.\n\t *\n\t * The `typeRegistry` option is also required to read\n\t * `google.protobuf.Any` from JSON format.\n\t */\n\tinternalJsonWrite(any: Any, options: JsonWriteOptions): JsonValue {\n\t\tif (any.typeUrl === '') return {};\n\t\tlet typeName = this.typeUrlToName(any.typeUrl);\n\t\tlet opt = jsonWriteOptions(options);\n\t\tlet type = opt.typeRegistry?.find((t) => t.typeName === typeName);\n\t\tif (!type)\n\t\t\tthrow new globalThis.Error(\n\t\t\t\t\"Unable to convert google.protobuf.Any with typeUrl '\" +\n\t\t\t\t\tany.typeUrl +\n\t\t\t\t\t\"' to JSON. The specified type \" +\n\t\t\t\t\ttypeName +\n\t\t\t\t\t' is not available in the type registry.',\n\t\t\t);\n\t\tlet value = type.fromBinary(any.value, { readUnknownField: false });\n\t\tlet json = type.internalJsonWrite(value, opt);\n\t\tif (typeName.startsWith('google.protobuf.') || !isJsonObject(json)) json = { value: json };\n\t\tjson['@type'] = any.typeUrl;\n\t\treturn json;\n\t}\n\tinternalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Any): Any {\n\t\tif (!isJsonObject(json))\n\t\t\tthrow new globalThis.Error(\n\t\t\t\t'Unable to parse google.protobuf.Any from JSON ' + typeofJsonValue(json) + '.',\n\t\t\t);\n\t\tif (typeof json['@type'] != 'string' || json['@type'] == '') return this.create();\n\t\tlet typeName = this.typeUrlToName(json['@type']);\n\t\tlet type = options?.typeRegistry?.find((t) => t.typeName == typeName);\n\t\tif (!type)\n\t\t\tthrow new globalThis.Error(\n\t\t\t\t'Unable to parse google.protobuf.Any from JSON. The specified type ' +\n\t\t\t\t\ttypeName +\n\t\t\t\t\t' is not available in the type registry.',\n\t\t\t);\n\t\tlet value;\n\t\tif (typeName.startsWith('google.protobuf.') && json.hasOwnProperty('value'))\n\t\t\tvalue = type.fromJson(json['value'], options);\n\t\telse {\n\t\t\tlet copy = Object.assign({}, json);\n\t\t\tdelete copy['@type'];\n\t\t\tvalue = type.fromJson(copy, options);\n\t\t}\n\t\tif (target === undefined) target = this.create();\n\t\ttarget.typeUrl = json['@type'];\n\t\ttarget.value = type.toBinary(value);\n\t\treturn target;\n\t}\n\ttypeNameToUrl(name: string): string {\n\t\tif (!name.length) throw new Error('invalid type name: ' + name);\n\t\treturn 'type.googleapis.com/' + name;\n\t}\n\ttypeUrlToName(url: string): string {\n\t\tif (!url.length) throw new Error('invalid type url: ' + url);\n\t\tlet slash = url.lastIndexOf('/');\n\t\tlet name = slash > 0 ? url.substring(slash + 1) : url;\n\t\tif (!name.length) throw new Error('invalid type url: ' + url);\n\t\treturn name;\n\t}\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Any\n */\nexport const Any = new Any$Type();\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCA,qBAA6B;AAC7B,IAAAA,kBAAgC;AAEhC,IAAAA,kBAAiC;AAKjC,IAAAA,kBAA4B;AAsI5B,MAAM,iBAAiB,4BAAiB;AAAA,EACvC,cAAc;AACb,UAAM,uBAAuB;AAAA,MAC5B;AAAA,QAAE,IAAI;AAAA,QAAG,MAAM;AAAA,QAAY,MAAM;AAAA,QAAU,GAAG;AAAA;AAAA,MAAwB;AAAA,MACtE;AAAA,QAAE,IAAI;AAAA,QAAG,MAAM;AAAA,QAAS,MAAM;AAAA,QAAU,GAAG;AAAA;AAAA,MAAwB;AAAA,IACpE,CAAC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,KAAuB,SAAY,MAA4B;AAC9D,WAAO;AAAA,MACN,SAAS,KAAK,cAAc,KAAK,QAAQ;AAAA,MACzC,OAAO,KAAK,SAAS,OAAO;AAAA,IAC7B;AAAA,EACD;AAAA;AAAA;AAAA;AAAA,EAIA,OACC,KACA,MACA,SACI;AACJ,QAAI,CAAC,KAAK,SAAS,KAAK,IAAI;AAC3B,YAAM,IAAI;AAAA,QACT,qDACC,IAAI,UACJ,UACA,KAAK,WACL;AAAA,MACF;AACD,WAAO,KAAK,WAAW,IAAI,OAAO,OAAO;AAAA,EAC1C;AAAA;AAAA;AA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EACC,WACA;AAAA,MACF;AACD,QAAI;AACJ,QAAI,SAAS,WAAW,kBAAkB,KAAK,KAAK,eAAe,OAAO;AACzE,cAAQ,KAAK,SAAS,KAAK,OAAO,GAAG,OAAO;AAAA,SACxC;AACJ,UAAI,OAAO,OAAO,OAAO,CAAC,GAAG,IAAI;AACjC,aAAO,KAAK,OAAO;AACnB,cAAQ,KAAK,SAAS,MAAM,OAAO;AAAA,IACpC;AACA,QAAI,WAAW,OAAW,UAAS,KAAK,OAAO;AAC/C,WAAO,UAAU,KAAK,OAAO;AAC7B,WAAO,QAAQ,KAAK,SAAS,KAAK;AAClC,WAAO;AAAA,EACR;AAAA,EACA,cAAc,MAAsB;AACnC,QAAI,CAAC,KAAK,OAAQ,OAAM,IAAI,MAAM,wBAAwB,IAAI;AAC9D,WAAO,yBAAyB;AAAA,EACjC;AAAA,EACA,cAAc,KAAqB;AAClC,QAAI,CAAC,IAAI,OAAQ,OAAM,IAAI,MAAM,uBAAuB,GAAG;AAC3D,QAAI,QAAQ,IAAI,YAAY,GAAG;AAC/B,QAAI,OAAO,QAAQ,IAAI,IAAI,UAAU,QAAQ,CAAC,IAAI;AAClD,QAAI,CAAC,KAAK,OAAQ,OAAM,IAAI,MAAM,uBAAuB,GAAG;AAC5D,WAAO;AAAA,EACR;AACD;AAIO,MAAM,MAAM,IAAI,SAAS;",
4
+ "sourcesContent": ["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// @generated by protobuf-ts 2.9.6 with parameter force_server_none,optimize_code_size,ts_nocheck\n// @generated from protobuf file \"google/protobuf/any.proto\" (package \"google.protobuf\", syntax proto3)\n// tslint:disable\n// @ts-nocheck\n//\n// Protocol Buffers - Google's data interchange format\n// Copyright 2008 Google Inc. All rights reserved.\n// https://developers.google.com/protocol-buffers/\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\nimport { isJsonObject } from \"@protobuf-ts/runtime\";\nimport { typeofJsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonValue } from \"@protobuf-ts/runtime\";\nimport { jsonWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonReadOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { BinaryReadOptions } from \"@protobuf-ts/runtime\";\nimport type { IMessageType } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\n/**\n * `Any` contains an arbitrary serialized protocol buffer message along with a\n * URL that describes the type of the serialized message.\n *\n * Protobuf library provides support to pack/unpack Any values in the form\n * of utility functions or additional generated methods of the Any type.\n *\n * Example 1: Pack and unpack a message in C++.\n *\n * Foo foo = ...;\n * Any any;\n * any.PackFrom(foo);\n * ...\n * if (any.UnpackTo(&foo)) {\n * ...\n * }\n *\n * Example 2: Pack and unpack a message in Java.\n *\n * Foo foo = ...;\n * Any any = Any.pack(foo);\n * ...\n * if (any.is(Foo.class)) {\n * foo = any.unpack(Foo.class);\n * }\n * // or ...\n * if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n * foo = any.unpack(Foo.getDefaultInstance());\n * }\n *\n * Example 3: Pack and unpack a message in Python.\n *\n * foo = Foo(...)\n * any = Any()\n * any.Pack(foo)\n * ...\n * if any.Is(Foo.DESCRIPTOR):\n * any.Unpack(foo)\n * ...\n *\n * Example 4: Pack and unpack a message in Go\n *\n * foo := &pb.Foo{...}\n * any, err := anypb.New(foo)\n * if err != nil {\n * ...\n * }\n * ...\n * foo := &pb.Foo{}\n * if err := any.UnmarshalTo(foo); err != nil {\n * ...\n * }\n *\n * The pack methods provided by protobuf library will by default use\n * 'type.googleapis.com/full.type.name' as the type URL and the unpack\n * methods only use the fully qualified type name after the last '/'\n * in the type URL, for example \"foo.bar.com/x/y.z\" will yield type\n * name \"y.z\".\n *\n * JSON\n * ====\n * The JSON representation of an `Any` value uses the regular\n * representation of the deserialized, embedded message, with an\n * additional field `@type` which contains the type URL. Example:\n *\n * package google.profile;\n * message Person {\n * string first_name = 1;\n * string last_name = 2;\n * }\n *\n * {\n * \"@type\": \"type.googleapis.com/google.profile.Person\",\n * \"firstName\": <string>,\n * \"lastName\": <string>\n * }\n *\n * If the embedded message type is well-known and has a custom JSON\n * representation, that representation will be embedded adding a field\n * `value` which holds the custom JSON in addition to the `@type`\n * field. Example (for message [google.protobuf.Duration][]):\n *\n * {\n * \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n * \"value\": \"1.212s\"\n * }\n *\n *\n * @generated from protobuf message google.protobuf.Any\n */\nexport interface Any {\n /**\n * A URL/resource name that uniquely identifies the type of the serialized\n * protocol buffer message. This string must contain at least\n * one \"/\" character. The last segment of the URL's path must represent\n * the fully qualified name of the type (as in\n * `path/google.protobuf.Duration`). The name should be in a canonical form\n * (e.g., leading \".\" is not accepted).\n *\n * In practice, teams usually precompile into the binary all types that they\n * expect it to use in the context of Any. However, for URLs which use the\n * scheme `http`, `https`, or no scheme, one can optionally set up a type\n * server that maps type URLs to message definitions as follows:\n *\n * * If no scheme is provided, `https` is assumed.\n * * An HTTP GET on the URL must yield a [google.protobuf.Type][]\n * value in binary format, or produce an error.\n * * Applications are allowed to cache lookup results based on the\n * URL, or have them precompiled into a binary to avoid any\n * lookup. Therefore, binary compatibility needs to be preserved\n * on changes to types. (Use versioned type names to manage\n * breaking changes.)\n *\n * Note: this functionality is not currently available in the official\n * protobuf release, and it is not used for type URLs beginning with\n * type.googleapis.com. As of May 2023, there are no widely used type server\n * implementations and no plans to implement one.\n *\n * Schemes other than `http`, `https` (or the empty scheme) might be\n * used with implementation specific semantics.\n *\n *\n * @generated from protobuf field: string type_url = 1;\n */\n typeUrl: string;\n /**\n * Must be a valid serialized protocol buffer of the above specified type.\n *\n * @generated from protobuf field: bytes value = 2;\n */\n value: Uint8Array;\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Any$Type extends MessageType<Any> {\n constructor() {\n super(\"google.protobuf.Any\", [\n { no: 1, name: \"type_url\", kind: \"scalar\", T: 9 /*ScalarType.STRING*/ },\n { no: 2, name: \"value\", kind: \"scalar\", T: 12 /*ScalarType.BYTES*/ }\n ]);\n }\n /**\n * Pack the message into a new `Any`.\n *\n * Uses 'type.googleapis.com/full.type.name' as the type URL.\n */\n pack<T extends object>(message: T, type: IMessageType<T>): Any {\n return {\n typeUrl: this.typeNameToUrl(type.typeName), value: type.toBinary(message),\n };\n }\n /**\n * Unpack the message from the `Any`.\n */\n unpack<T extends object>(any: Any, type: IMessageType<T>, options?: Partial<BinaryReadOptions>): T {\n if (!this.contains(any, type))\n throw new Error(\"Cannot unpack google.protobuf.Any with typeUrl '\" + any.typeUrl + \"' as \" + type.typeName + \".\");\n return type.fromBinary(any.value, options);\n }\n /**\n * Does the given `Any` contain a packed message of the given type?\n */\n contains(any: Any, type: IMessageType<any> | string): boolean {\n if (!any.typeUrl.length)\n return false;\n let wants = typeof type == \"string\" ? type : type.typeName;\n let has = this.typeUrlToName(any.typeUrl);\n return wants === has;\n }\n /**\n * Convert the message to canonical JSON value.\n *\n * You have to provide the `typeRegistry` option so that the\n * packed message can be converted to JSON.\n *\n * The `typeRegistry` option is also required to read\n * `google.protobuf.Any` from JSON format.\n */\n internalJsonWrite(any: Any, options: JsonWriteOptions): JsonValue {\n if (any.typeUrl === \"\")\n return {};\n let typeName = this.typeUrlToName(any.typeUrl);\n let opt = jsonWriteOptions(options);\n let type = opt.typeRegistry?.find(t => t.typeName === typeName);\n if (!type)\n throw new globalThis.Error(\"Unable to convert google.protobuf.Any with typeUrl '\" + any.typeUrl + \"' to JSON. The specified type \" + typeName + \" is not available in the type registry.\");\n let value = type.fromBinary(any.value, { readUnknownField: false });\n let json = type.internalJsonWrite(value, opt);\n if (typeName.startsWith(\"google.protobuf.\") || !isJsonObject(json))\n json = { value: json };\n json[\"@type\"] = any.typeUrl;\n return json;\n }\n internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Any): Any {\n if (!isJsonObject(json))\n throw new globalThis.Error(\"Unable to parse google.protobuf.Any from JSON \" + typeofJsonValue(json) + \".\");\n if (typeof json[\"@type\"] != \"string\" || json[\"@type\"] == \"\")\n return this.create();\n let typeName = this.typeUrlToName(json[\"@type\"]);\n let type = options?.typeRegistry?.find(t => t.typeName == typeName);\n if (!type)\n throw new globalThis.Error(\"Unable to parse google.protobuf.Any from JSON. The specified type \" + typeName + \" is not available in the type registry.\");\n let value;\n if (typeName.startsWith(\"google.protobuf.\") && json.hasOwnProperty(\"value\"))\n value = type.fromJson(json[\"value\"], options);\n else {\n let copy = Object.assign({}, json);\n delete copy[\"@type\"];\n value = type.fromJson(copy, options);\n }\n if (target === undefined)\n target = this.create();\n target.typeUrl = json[\"@type\"];\n target.value = type.toBinary(value);\n return target;\n }\n typeNameToUrl(name: string): string {\n if (!name.length)\n throw new Error(\"invalid type name: \" + name);\n return \"type.googleapis.com/\" + name;\n }\n typeUrlToName(url: string): string {\n if (!url.length)\n throw new Error(\"invalid type url: \" + url);\n let slash = url.lastIndexOf(\"/\");\n let name = slash > 0 ? url.substring(slash + 1) : url;\n if (!name.length)\n throw new Error(\"invalid type url: \" + url);\n return name;\n }\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Any\n */\nexport const Any = new Any$Type();\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCA,qBAA6B;AAC7B,IAAAA,kBAAgC;AAEhC,IAAAA,kBAAiC;AAKjC,IAAAA,kBAA4B;AAsI5B,MAAM,iBAAiB,4BAAiB;AAAA,EACpC,cAAc;AACV,UAAM,uBAAuB;AAAA,MACzB;AAAA,QAAE,IAAI;AAAA,QAAG,MAAM;AAAA,QAAY,MAAM;AAAA,QAAU,GAAG;AAAA;AAAA,MAAwB;AAAA,MACtE;AAAA,QAAE,IAAI;AAAA,QAAG,MAAM;AAAA,QAAS,MAAM;AAAA,QAAU,GAAG;AAAA;AAAA,MAAwB;AAAA,IACvE,CAAC;AAAA,EACL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,KAAuB,SAAY,MAA4B;AAC3D,WAAO;AAAA,MACH,SAAS,KAAK,cAAc,KAAK,QAAQ;AAAA,MAAG,OAAO,KAAK,SAAS,OAAO;AAAA,IAC5E;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA,EAIA,OAAyB,KAAU,MAAuB,SAAyC;AAC/F,QAAI,CAAC,KAAK,SAAS,KAAK,IAAI;AACxB,YAAM,IAAI,MAAM,qDAAqD,IAAI,UAAU,UAAU,KAAK,WAAW,GAAG;AACpH,WAAO,KA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AAM,IAAI,WAAW,MAAM,uEAAuE,WAAW,yCAAyC;AAC1J,QAAI;AACJ,QAAI,SAAS,WAAW,kBAAkB,KAAK,KAAK,eAAe,OAAO;AACtE,cAAQ,KAAK,SAAS,KAAK,OAAO,GAAG,OAAO;AAAA,SAC3C;AACD,UAAI,OAAO,OAAO,OAAO,CAAC,GAAG,IAAI;AACjC,aAAO,KAAK,OAAO;AACnB,cAAQ,KAAK,SAAS,MAAM,OAAO;AAAA,IACvC;AACA,QAAI,WAAW;AACX,eAAS,KAAK,OAAO;AACzB,WAAO,UAAU,KAAK,OAAO;AAC7B,WAAO,QAAQ,KAAK,SAAS,KAAK;AAClC,WAAO;AAAA,EACX;AAAA,EACA,cAAc,MAAsB;AAChC,QAAI,CAAC,KAAK;AACN,YAAM,IAAI,MAAM,wBAAwB,IAAI;AAChD,WAAO,yBAAyB;AAAA,EACpC;AAAA,EACA,cAAc,KAAqB;AAC/B,QAAI,CAAC,IAAI;AACL,YAAM,IAAI,MAAM,uBAAuB,GAAG;AAC9C,QAAI,QAAQ,IAAI,YAAY,GAAG;AAC/B,QAAI,OAAO,QAAQ,IAAI,IAAI,UAAU,QAAQ,CAAC,IAAI;AAClD,QAAI,CAAC,KAAK;AACN,YAAM,IAAI,MAAM,uBAAuB,GAAG;AAC9C,WAAO;AAAA,EACX;AACJ;AAIO,MAAM,MAAM,IAAI,SAAS;",
6
6
  "names": ["import_runtime"]
7
7
  }
@@ -1,7 +1,7 @@
1
- import type { JsonValue } from '@protobuf-ts/runtime';
2
- import type { JsonReadOptions } from '@protobuf-ts/runtime';
3
- import type { JsonWriteOptions } from '@protobuf-ts/runtime';
4
- import { MessageType } from '@protobuf-ts/runtime';
1
+ import type { JsonValue } from "@protobuf-ts/runtime";
2
+ import type { JsonReadOptions } from "@protobuf-ts/runtime";
3
+ import type { JsonWriteOptions } from "@protobuf-ts/runtime";
4
+ import { MessageType } from "@protobuf-ts/runtime";
5
5
  /**
6
6
  * A Duration represents a signed, fixed-length span of time represented
7
7
  * as a count of seconds and fractions of seconds at nanosecond