@mysten/sui 1.42.0 → 1.43.1

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 (429) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/bcs/bcs.d.ts +47 -111
  3. package/dist/cjs/bcs/bcs.js +17 -17
  4. package/dist/cjs/bcs/bcs.js.map +2 -2
  5. package/dist/cjs/bcs/effects.d.ts +2 -6
  6. package/dist/cjs/bcs/effects.js +1 -1
  7. package/dist/cjs/bcs/effects.js.map +2 -2
  8. package/dist/cjs/bcs/index.d.ts +49 -117
  9. package/dist/cjs/bcs/type-tag-serializer.d.ts +1 -0
  10. package/dist/cjs/bcs/type-tag-serializer.js +5 -1
  11. package/dist/cjs/bcs/type-tag-serializer.js.map +2 -2
  12. package/dist/cjs/cryptography/intent.js +1 -1
  13. package/dist/cjs/cryptography/intent.js.map +2 -2
  14. package/dist/cjs/cryptography/keypair.js +1 -1
  15. package/dist/cjs/cryptography/keypair.js.map +2 -2
  16. package/dist/cjs/cryptography/publickey.js +1 -1
  17. package/dist/cjs/cryptography/publickey.js.map +2 -2
  18. package/dist/cjs/cryptography/signature.d.ts +2 -2
  19. package/dist/cjs/experimental/client.js +0 -4
  20. package/dist/cjs/experimental/client.js.map +2 -2
  21. package/dist/cjs/experimental/types.d.ts +1 -7
  22. package/dist/cjs/experimental/types.js.map +1 -1
  23. package/dist/cjs/graphql/generated/queries.d.ts +1 -1
  24. package/dist/cjs/graphql/generated/queries.js.map +1 -1
  25. package/dist/cjs/grpc/core.d.ts +3 -1
  26. package/dist/cjs/grpc/core.js +5 -3
  27. package/dist/cjs/grpc/core.js.map +2 -2
  28. package/dist/cjs/grpc/proto/google/protobuf/any.d.ts +6 -6
  29. package/dist/cjs/grpc/proto/google/protobuf/any.js +20 -20
  30. package/dist/cjs/grpc/proto/google/protobuf/any.js.map +2 -2
  31. package/dist/cjs/grpc/proto/google/protobuf/duration.d.ts +4 -4
  32. package/dist/cjs/grpc/proto/google/protobuf/duration.js +8 -12
  33. package/dist/cjs/grpc/proto/google/protobuf/duration.js.map +2 -2
  34. package/dist/cjs/grpc/proto/google/protobuf/empty.d.ts +1 -1
  35. package/dist/cjs/grpc/proto/google/protobuf/empty.js.map +2 -2
  36. package/dist/cjs/grpc/proto/google/protobuf/field_mask.d.ts +4 -4
  37. package/dist/cjs/grpc/proto/google/protobuf/field_mask.js +8 -7
  38. package/dist/cjs/grpc/proto/google/protobuf/field_mask.js.map +2 -2
  39. package/dist/cjs/grpc/proto/google/protobuf/struct.d.ts +10 -10
  40. package/dist/cjs/grpc/proto/google/protobuf/struct.js +29 -17
  41. package/dist/cjs/grpc/proto/google/protobuf/struct.js.map +2 -2
  42. package/dist/cjs/grpc/proto/google/protobuf/timestamp.d.ts +4 -4
  43. package/dist/cjs/grpc/proto/google/protobuf/timestamp.js +21 -18
  44. package/dist/cjs/grpc/proto/google/protobuf/timestamp.js.map +2 -2
  45. package/dist/cjs/grpc/proto/google/rpc/error_details.d.ts +2 -2
  46. package/dist/cjs/grpc/proto/google/rpc/error_details.js +40 -11
  47. package/dist/cjs/grpc/proto/google/rpc/error_details.js.map +2 -2
  48. package/dist/cjs/grpc/proto/google/rpc/status.d.ts +2 -2
  49. package/dist/cjs/grpc/proto/google/rpc/status.js +1 -1
  50. package/dist/cjs/grpc/proto/google/rpc/status.js.map +2 -2
  51. package/dist/cjs/grpc/proto/sui/rpc/v2/argument.d.ts +1 -1
  52. package/dist/cjs/grpc/proto/sui/rpc/v2/argument.js +7 -1
  53. package/dist/cjs/grpc/proto/sui/rpc/v2/argument.js.map +2 -2
  54. package/dist/cjs/grpc/proto/sui/rpc/v2/balance_change.d.ts +1 -1
  55. package/dist/cjs/grpc/proto/sui/rpc/v2/balance_change.js.map +2 -2
  56. package/dist/cjs/grpc/proto/sui/rpc/v2/bcs.d.ts +1 -1
  57. package/dist/cjs/grpc/proto/sui/rpc/v2/bcs.js.map +2 -2
  58. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.d.ts +6 -6
  59. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.js +12 -7
  60. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint.js.map +2 -2
  61. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_contents.d.ts +3 -3
  62. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_contents.js +16 -4
  63. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_contents.js.map +2 -2
  64. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_summary.d.ts +5 -5
  65. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_summary.js +35 -13
  66. package/dist/cjs/grpc/proto/sui/rpc/v2/checkpoint_summary.js.map +2 -2
  67. package/dist/cjs/grpc/proto/sui/rpc/v2/effects.d.ts +6 -6
  68. package/dist/cjs/grpc/proto/sui/rpc/v2/effects.js +65 -19
  69. package/dist/cjs/grpc/proto/sui/rpc/v2/effects.js.map +2 -2
  70. package/dist/cjs/grpc/proto/sui/rpc/v2/epoch.d.ts +5 -5
  71. package/dist/cjs/grpc/proto/sui/rpc/v2/epoch.js +4 -8
  72. package/dist/cjs/grpc/proto/sui/rpc/v2/epoch.js.map +2 -2
  73. package/dist/cjs/grpc/proto/sui/rpc/v2/error_reason.js.map +2 -2
  74. package/dist/cjs/grpc/proto/sui/rpc/v2/event.d.ts +3 -3
  75. package/dist/cjs/grpc/proto/sui/rpc/v2/event.js +2 -2
  76. package/dist/cjs/grpc/proto/sui/rpc/v2/event.js.map +2 -2
  77. package/dist/cjs/grpc/proto/sui/rpc/v2/executed_transaction.d.ts +8 -8
  78. package/dist/cjs/grpc/proto/sui/rpc/v2/executed_transaction.js +21 -10
  79. package/dist/cjs/grpc/proto/sui/rpc/v2/executed_transaction.js.map +2 -2
  80. package/dist/cjs/grpc/proto/sui/rpc/v2/execution_status.d.ts +12 -12
  81. package/dist/cjs/grpc/proto/sui/rpc/v2/execution_status.js +75 -17
  82. package/dist/cjs/grpc/proto/sui/rpc/v2/execution_status.js.map +2 -2
  83. package/dist/cjs/grpc/proto/sui/rpc/v2/gas_cost_summary.d.ts +1 -1
  84. package/dist/cjs/grpc/proto/sui/rpc/v2/gas_cost_summary.js +0 -4
  85. package/dist/cjs/grpc/proto/sui/rpc/v2/gas_cost_summary.js.map +2 -2
  86. package/dist/cjs/grpc/proto/sui/rpc/v2/input.d.ts +2 -2
  87. package/dist/cjs/grpc/proto/sui/rpc/v2/input.js +8 -3
  88. package/dist/cjs/grpc/proto/sui/rpc/v2/input.js.map +2 -2
  89. package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.d.ts +1 -1
  90. package/dist/cjs/grpc/proto/sui/rpc/v2/jwk.js.map +2 -2
  91. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.client.d.ts +18 -18
  92. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.client.js +50 -8
  93. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.client.js.map +2 -2
  94. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.d.ts +15 -15
  95. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.js +41 -20
  96. package/dist/cjs/grpc/proto/sui/rpc/v2/ledger_service.js.map +2 -2
  97. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package.d.ts +1 -1
  98. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package.js +126 -20
  99. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package.js.map +2 -2
  100. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.client.d.ts +12 -12
  101. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.client.js +29 -5
  102. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.client.js.map +2 -2
  103. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.d.ts +5 -5
  104. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.js +16 -6
  105. package/dist/cjs/grpc/proto/sui/rpc/v2/move_package_service.js.map +2 -2
  106. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.client.d.ts +8 -8
  107. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.client.js +15 -3
  108. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.client.js.map +2 -2
  109. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.d.ts +3 -3
  110. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.js +18 -7
  111. package/dist/cjs/grpc/proto/sui/rpc/v2/name_service.js.map +2 -2
  112. package/dist/cjs/grpc/proto/sui/rpc/v2/object.d.ts +5 -5
  113. package/dist/cjs/grpc/proto/sui/rpc/v2/object.js +4 -8
  114. package/dist/cjs/grpc/proto/sui/rpc/v2/object.js.map +2 -2
  115. package/dist/cjs/grpc/proto/sui/rpc/v2/object_reference.d.ts +1 -1
  116. package/dist/cjs/grpc/proto/sui/rpc/v2/object_reference.js +0 -1
  117. package/dist/cjs/grpc/proto/sui/rpc/v2/object_reference.js.map +2 -2
  118. package/dist/cjs/grpc/proto/sui/rpc/v2/owner.d.ts +1 -1
  119. package/dist/cjs/grpc/proto/sui/rpc/v2/owner.js +7 -2
  120. package/dist/cjs/grpc/proto/sui/rpc/v2/owner.js.map +2 -2
  121. package/dist/cjs/grpc/proto/sui/rpc/v2/protocol_config.d.ts +1 -1
  122. package/dist/cjs/grpc/proto/sui/rpc/v2/protocol_config.js +22 -11
  123. package/dist/cjs/grpc/proto/sui/rpc/v2/protocol_config.js.map +2 -2
  124. package/dist/cjs/grpc/proto/sui/rpc/v2/signature.d.ts +8 -8
  125. package/dist/cjs/grpc/proto/sui/rpc/v2/signature.js +73 -17
  126. package/dist/cjs/grpc/proto/sui/rpc/v2/signature.js.map +2 -2
  127. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_scheme.js.map +2 -2
  128. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.ts +6 -6
  129. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.client.js +8 -2
  130. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.client.js.map +2 -2
  131. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.d.ts +5 -5
  132. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.js +7 -6
  133. package/dist/cjs/grpc/proto/sui/rpc/v2/signature_verification_service.js.map +2 -2
  134. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.d.ts +14 -14
  135. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.js +36 -6
  136. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.client.js.map +2 -2
  137. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.d.ts +5 -5
  138. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.js +60 -14
  139. package/dist/cjs/grpc/proto/sui/rpc/v2/state_service.js.map +2 -2
  140. package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.client.d.ts +6 -6
  141. package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.client.js +8 -2
  142. package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.client.js.map +2 -2
  143. package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.d.ts +4 -4
  144. package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.js +9 -4
  145. package/dist/cjs/grpc/proto/sui/rpc/v2/subscription_service.js.map +2 -2
  146. package/dist/cjs/grpc/proto/sui/rpc/v2/system_state.d.ts +1 -1
  147. package/dist/cjs/grpc/proto/sui/rpc/v2/system_state.js +26 -59
  148. package/dist/cjs/grpc/proto/sui/rpc/v2/system_state.js.map +2 -2
  149. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction.d.ts +29 -29
  150. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction.js +210 -71
  151. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction.js.map +2 -2
  152. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.ts +8 -8
  153. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js +15 -3
  154. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js.map +2 -2
  155. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.d.ts +9 -9
  156. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.js +62 -16
  157. package/dist/cjs/grpc/proto/sui/rpc/v2/transaction_execution_service.js.map +2 -2
  158. package/dist/cjs/jsonRpc/client.d.ts +2 -6
  159. package/dist/cjs/jsonRpc/client.js +0 -8
  160. package/dist/cjs/jsonRpc/client.js.map +2 -2
  161. package/dist/cjs/keypairs/passkey/publickey.d.ts +1 -1
  162. package/dist/cjs/multisig/publickey.d.ts +10 -10
  163. package/dist/cjs/multisig/publickey.js +2 -2
  164. package/dist/cjs/multisig/publickey.js.map +2 -2
  165. package/dist/cjs/transactions/Transaction.d.ts +2 -2
  166. package/dist/cjs/transactions/Transaction.js.map +2 -2
  167. package/dist/cjs/transactions/TransactionData.d.ts +1 -0
  168. package/dist/cjs/transactions/TransactionData.js +71 -0
  169. package/dist/cjs/transactions/TransactionData.js.map +3 -3
  170. package/dist/cjs/transactions/serializer.js +1 -1
  171. package/dist/cjs/transactions/serializer.js.map +2 -2
  172. package/dist/cjs/utils/index.d.ts +1 -0
  173. package/dist/cjs/utils/index.js +2 -0
  174. package/dist/cjs/utils/index.js.map +2 -2
  175. package/dist/cjs/version.d.ts +2 -2
  176. package/dist/cjs/version.js +2 -2
  177. package/dist/cjs/version.js.map +1 -1
  178. package/dist/cjs/zklogin/bcs.d.ts +1 -3
  179. package/dist/cjs/zklogin/bcs.js +1 -1
  180. package/dist/cjs/zklogin/bcs.js.map +2 -2
  181. package/dist/cjs/zklogin/publickey.d.ts +1 -1
  182. package/dist/cjs/zklogin/signature.d.ts +1 -1
  183. package/dist/esm/bcs/bcs.d.ts +47 -111
  184. package/dist/esm/bcs/bcs.js +17 -17
  185. package/dist/esm/bcs/bcs.js.map +2 -2
  186. package/dist/esm/bcs/effects.d.ts +2 -6
  187. package/dist/esm/bcs/effects.js +1 -1
  188. package/dist/esm/bcs/effects.js.map +2 -2
  189. package/dist/esm/bcs/index.d.ts +49 -117
  190. package/dist/esm/bcs/type-tag-serializer.d.ts +1 -0
  191. package/dist/esm/bcs/type-tag-serializer.js +5 -1
  192. package/dist/esm/bcs/type-tag-serializer.js.map +2 -2
  193. package/dist/esm/cryptography/intent.js +1 -1
  194. package/dist/esm/cryptography/intent.js.map +2 -2
  195. package/dist/esm/cryptography/keypair.js +1 -1
  196. package/dist/esm/cryptography/keypair.js.map +2 -2
  197. package/dist/esm/cryptography/publickey.js +1 -1
  198. package/dist/esm/cryptography/publickey.js.map +2 -2
  199. package/dist/esm/cryptography/signature.d.ts +2 -2
  200. package/dist/esm/experimental/client.js +0 -4
  201. package/dist/esm/experimental/client.js.map +2 -2
  202. package/dist/esm/experimental/types.d.ts +1 -7
  203. package/dist/esm/graphql/generated/queries.d.ts +1 -1
  204. package/dist/esm/graphql/generated/queries.js.map +1 -1
  205. package/dist/esm/grpc/core.d.ts +3 -1
  206. package/dist/esm/grpc/core.js +5 -3
  207. package/dist/esm/grpc/core.js.map +2 -2
  208. package/dist/esm/grpc/proto/google/protobuf/any.d.ts +6 -6
  209. package/dist/esm/grpc/proto/google/protobuf/any.js +20 -20
  210. package/dist/esm/grpc/proto/google/protobuf/any.js.map +2 -2
  211. package/dist/esm/grpc/proto/google/protobuf/duration.d.ts +4 -4
  212. package/dist/esm/grpc/proto/google/protobuf/duration.js +8 -12
  213. package/dist/esm/grpc/proto/google/protobuf/duration.js.map +2 -2
  214. package/dist/esm/grpc/proto/google/protobuf/empty.d.ts +1 -1
  215. package/dist/esm/grpc/proto/google/protobuf/empty.js.map +2 -2
  216. package/dist/esm/grpc/proto/google/protobuf/field_mask.d.ts +4 -4
  217. package/dist/esm/grpc/proto/google/protobuf/field_mask.js +8 -7
  218. package/dist/esm/grpc/proto/google/protobuf/field_mask.js.map +2 -2
  219. package/dist/esm/grpc/proto/google/protobuf/struct.d.ts +10 -10
  220. package/dist/esm/grpc/proto/google/protobuf/struct.js +29 -17
  221. package/dist/esm/grpc/proto/google/protobuf/struct.js.map +2 -2
  222. package/dist/esm/grpc/proto/google/protobuf/timestamp.d.ts +4 -4
  223. package/dist/esm/grpc/proto/google/protobuf/timestamp.js +21 -18
  224. package/dist/esm/grpc/proto/google/protobuf/timestamp.js.map +2 -2
  225. package/dist/esm/grpc/proto/google/rpc/error_details.d.ts +2 -2
  226. package/dist/esm/grpc/proto/google/rpc/error_details.js +40 -11
  227. package/dist/esm/grpc/proto/google/rpc/error_details.js.map +2 -2
  228. package/dist/esm/grpc/proto/google/rpc/status.d.ts +2 -2
  229. package/dist/esm/grpc/proto/google/rpc/status.js +1 -1
  230. package/dist/esm/grpc/proto/google/rpc/status.js.map +2 -2
  231. package/dist/esm/grpc/proto/sui/rpc/v2/argument.d.ts +1 -1
  232. package/dist/esm/grpc/proto/sui/rpc/v2/argument.js +7 -1
  233. package/dist/esm/grpc/proto/sui/rpc/v2/argument.js.map +2 -2
  234. package/dist/esm/grpc/proto/sui/rpc/v2/balance_change.d.ts +1 -1
  235. package/dist/esm/grpc/proto/sui/rpc/v2/balance_change.js.map +2 -2
  236. package/dist/esm/grpc/proto/sui/rpc/v2/bcs.d.ts +1 -1
  237. package/dist/esm/grpc/proto/sui/rpc/v2/bcs.js.map +2 -2
  238. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.d.ts +6 -6
  239. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.js +12 -7
  240. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint.js.map +2 -2
  241. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_contents.d.ts +3 -3
  242. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_contents.js +16 -4
  243. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_contents.js.map +2 -2
  244. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_summary.d.ts +5 -5
  245. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_summary.js +35 -13
  246. package/dist/esm/grpc/proto/sui/rpc/v2/checkpoint_summary.js.map +2 -2
  247. package/dist/esm/grpc/proto/sui/rpc/v2/effects.d.ts +6 -6
  248. package/dist/esm/grpc/proto/sui/rpc/v2/effects.js +65 -19
  249. package/dist/esm/grpc/proto/sui/rpc/v2/effects.js.map +2 -2
  250. package/dist/esm/grpc/proto/sui/rpc/v2/epoch.d.ts +5 -5
  251. package/dist/esm/grpc/proto/sui/rpc/v2/epoch.js +4 -8
  252. package/dist/esm/grpc/proto/sui/rpc/v2/epoch.js.map +2 -2
  253. package/dist/esm/grpc/proto/sui/rpc/v2/error_reason.js.map +2 -2
  254. package/dist/esm/grpc/proto/sui/rpc/v2/event.d.ts +3 -3
  255. package/dist/esm/grpc/proto/sui/rpc/v2/event.js +2 -2
  256. package/dist/esm/grpc/proto/sui/rpc/v2/event.js.map +2 -2
  257. package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.d.ts +8 -8
  258. package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.js +21 -10
  259. package/dist/esm/grpc/proto/sui/rpc/v2/executed_transaction.js.map +2 -2
  260. package/dist/esm/grpc/proto/sui/rpc/v2/execution_status.d.ts +12 -12
  261. package/dist/esm/grpc/proto/sui/rpc/v2/execution_status.js +75 -17
  262. package/dist/esm/grpc/proto/sui/rpc/v2/execution_status.js.map +2 -2
  263. package/dist/esm/grpc/proto/sui/rpc/v2/gas_cost_summary.d.ts +1 -1
  264. package/dist/esm/grpc/proto/sui/rpc/v2/gas_cost_summary.js +0 -4
  265. package/dist/esm/grpc/proto/sui/rpc/v2/gas_cost_summary.js.map +2 -2
  266. package/dist/esm/grpc/proto/sui/rpc/v2/input.d.ts +2 -2
  267. package/dist/esm/grpc/proto/sui/rpc/v2/input.js +8 -3
  268. package/dist/esm/grpc/proto/sui/rpc/v2/input.js.map +2 -2
  269. package/dist/esm/grpc/proto/sui/rpc/v2/jwk.d.ts +1 -1
  270. package/dist/esm/grpc/proto/sui/rpc/v2/jwk.js.map +2 -2
  271. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.d.ts +18 -18
  272. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.js +50 -8
  273. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.client.js.map +2 -2
  274. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.d.ts +15 -15
  275. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.js +41 -20
  276. package/dist/esm/grpc/proto/sui/rpc/v2/ledger_service.js.map +2 -2
  277. package/dist/esm/grpc/proto/sui/rpc/v2/move_package.d.ts +1 -1
  278. package/dist/esm/grpc/proto/sui/rpc/v2/move_package.js +126 -20
  279. package/dist/esm/grpc/proto/sui/rpc/v2/move_package.js.map +2 -2
  280. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.client.d.ts +12 -12
  281. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.client.js +29 -5
  282. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.client.js.map +2 -2
  283. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.d.ts +5 -5
  284. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.js +16 -6
  285. package/dist/esm/grpc/proto/sui/rpc/v2/move_package_service.js.map +2 -2
  286. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.client.d.ts +8 -8
  287. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.client.js +15 -3
  288. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.client.js.map +2 -2
  289. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.d.ts +3 -3
  290. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.js +18 -7
  291. package/dist/esm/grpc/proto/sui/rpc/v2/name_service.js.map +2 -2
  292. package/dist/esm/grpc/proto/sui/rpc/v2/object.d.ts +5 -5
  293. package/dist/esm/grpc/proto/sui/rpc/v2/object.js +4 -8
  294. package/dist/esm/grpc/proto/sui/rpc/v2/object.js.map +2 -2
  295. package/dist/esm/grpc/proto/sui/rpc/v2/object_reference.d.ts +1 -1
  296. package/dist/esm/grpc/proto/sui/rpc/v2/object_reference.js +0 -1
  297. package/dist/esm/grpc/proto/sui/rpc/v2/object_reference.js.map +2 -2
  298. package/dist/esm/grpc/proto/sui/rpc/v2/owner.d.ts +1 -1
  299. package/dist/esm/grpc/proto/sui/rpc/v2/owner.js +7 -2
  300. package/dist/esm/grpc/proto/sui/rpc/v2/owner.js.map +2 -2
  301. package/dist/esm/grpc/proto/sui/rpc/v2/protocol_config.d.ts +1 -1
  302. package/dist/esm/grpc/proto/sui/rpc/v2/protocol_config.js +22 -11
  303. package/dist/esm/grpc/proto/sui/rpc/v2/protocol_config.js.map +2 -2
  304. package/dist/esm/grpc/proto/sui/rpc/v2/signature.d.ts +8 -8
  305. package/dist/esm/grpc/proto/sui/rpc/v2/signature.js +73 -17
  306. package/dist/esm/grpc/proto/sui/rpc/v2/signature.js.map +2 -2
  307. package/dist/esm/grpc/proto/sui/rpc/v2/signature_scheme.js.map +2 -2
  308. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.ts +6 -6
  309. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.client.js +8 -2
  310. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.client.js.map +2 -2
  311. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.d.ts +5 -5
  312. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.js +7 -6
  313. package/dist/esm/grpc/proto/sui/rpc/v2/signature_verification_service.js.map +2 -2
  314. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.d.ts +14 -14
  315. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.js +36 -6
  316. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.client.js.map +2 -2
  317. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.d.ts +5 -5
  318. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.js +60 -14
  319. package/dist/esm/grpc/proto/sui/rpc/v2/state_service.js.map +2 -2
  320. package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.client.d.ts +6 -6
  321. package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.client.js +8 -2
  322. package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.client.js.map +2 -2
  323. package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.d.ts +4 -4
  324. package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.js +9 -4
  325. package/dist/esm/grpc/proto/sui/rpc/v2/subscription_service.js.map +2 -2
  326. package/dist/esm/grpc/proto/sui/rpc/v2/system_state.d.ts +1 -1
  327. package/dist/esm/grpc/proto/sui/rpc/v2/system_state.js +26 -59
  328. package/dist/esm/grpc/proto/sui/rpc/v2/system_state.js.map +2 -2
  329. package/dist/esm/grpc/proto/sui/rpc/v2/transaction.d.ts +29 -29
  330. package/dist/esm/grpc/proto/sui/rpc/v2/transaction.js +210 -71
  331. package/dist/esm/grpc/proto/sui/rpc/v2/transaction.js.map +2 -2
  332. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.ts +8 -8
  333. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js +15 -3
  334. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.client.js.map +2 -2
  335. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.d.ts +9 -9
  336. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.js +62 -16
  337. package/dist/esm/grpc/proto/sui/rpc/v2/transaction_execution_service.js.map +2 -2
  338. package/dist/esm/jsonRpc/client.d.ts +2 -6
  339. package/dist/esm/jsonRpc/client.js +0 -8
  340. package/dist/esm/jsonRpc/client.js.map +2 -2
  341. package/dist/esm/keypairs/passkey/publickey.d.ts +1 -1
  342. package/dist/esm/multisig/publickey.d.ts +10 -10
  343. package/dist/esm/multisig/publickey.js +2 -2
  344. package/dist/esm/multisig/publickey.js.map +2 -2
  345. package/dist/esm/transactions/Transaction.d.ts +2 -2
  346. package/dist/esm/transactions/Transaction.js.map +2 -2
  347. package/dist/esm/transactions/TransactionData.d.ts +1 -0
  348. package/dist/esm/transactions/TransactionData.js +71 -0
  349. package/dist/esm/transactions/TransactionData.js.map +3 -3
  350. package/dist/esm/transactions/serializer.js +1 -1
  351. package/dist/esm/transactions/serializer.js.map +2 -2
  352. package/dist/esm/utils/index.d.ts +1 -0
  353. package/dist/esm/utils/index.js +2 -0
  354. package/dist/esm/utils/index.js.map +2 -2
  355. package/dist/esm/version.d.ts +2 -2
  356. package/dist/esm/version.js +2 -2
  357. package/dist/esm/version.js.map +1 -1
  358. package/dist/esm/zklogin/bcs.d.ts +1 -3
  359. package/dist/esm/zklogin/bcs.js +1 -1
  360. package/dist/esm/zklogin/bcs.js.map +2 -2
  361. package/dist/esm/zklogin/publickey.d.ts +1 -1
  362. package/dist/esm/zklogin/signature.d.ts +1 -1
  363. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  364. package/dist/tsconfig.tsbuildinfo +1 -1
  365. package/package.json +2 -2
  366. package/src/bcs/bcs.ts +17 -17
  367. package/src/bcs/effects.ts +1 -1
  368. package/src/bcs/type-tag-serializer.ts +4 -0
  369. package/src/cryptography/intent.ts +1 -1
  370. package/src/cryptography/keypair.ts +1 -1
  371. package/src/cryptography/publickey.ts +1 -1
  372. package/src/experimental/client.ts +0 -4
  373. package/src/experimental/types.ts +4 -17
  374. package/src/graphql/generated/queries.ts +1 -1
  375. package/src/grpc/core.ts +28 -8
  376. package/src/grpc/proto/google/protobuf/any.ts +159 -144
  377. package/src/grpc/proto/google/protobuf/duration.ts +77 -74
  378. package/src/grpc/proto/google/protobuf/empty.ts +5 -6
  379. package/src/grpc/proto/google/protobuf/field_mask.ts +59 -47
  380. package/src/grpc/proto/google/protobuf/struct.ts +223 -201
  381. package/src/grpc/proto/google/protobuf/timestamp.ts +121 -100
  382. package/src/grpc/proto/google/rpc/error_details.ts +388 -352
  383. package/src/grpc/proto/google/rpc/status.ts +32 -32
  384. package/src/grpc/proto/sui/rpc/v2/argument.ts +60 -54
  385. package/src/grpc/proto/sui/rpc/v2/balance_change.ts +26 -26
  386. package/src/grpc/proto/sui/rpc/v2/bcs.ts +19 -19
  387. package/src/grpc/proto/sui/rpc/v2/checkpoint.ts +79 -66
  388. package/src/grpc/proto/sui/rpc/v2/checkpoint_contents.ts +72 -60
  389. package/src/grpc/proto/sui/rpc/v2/checkpoint_summary.ts +219 -158
  390. package/src/grpc/proto/sui/rpc/v2/effects.ts +418 -318
  391. package/src/grpc/proto/sui/rpc/v2/epoch.ts +90 -62
  392. package/src/grpc/proto/sui/rpc/v2/error_reason.ts +12 -12
  393. package/src/grpc/proto/sui/rpc/v2/event.ts +76 -76
  394. package/src/grpc/proto/sui/rpc/v2/executed_transaction.ts +99 -80
  395. package/src/grpc/proto/sui/rpc/v2/execution_status.ts +888 -755
  396. package/src/grpc/proto/sui/rpc/v2/gas_cost_summary.ts +62 -34
  397. package/src/grpc/proto/sui/rpc/v2/input.ts +102 -89
  398. package/src/grpc/proto/sui/rpc/v2/jwk.ts +51 -51
  399. package/src/grpc/proto/sui/rpc/v2/ledger_service.client.ts +196 -106
  400. package/src/grpc/proto/sui/rpc/v2/ledger_service.ts +420 -328
  401. package/src/grpc/proto/sui/rpc/v2/move_package.ts +608 -486
  402. package/src/grpc/proto/sui/rpc/v2/move_package_service.client.ts +114 -63
  403. package/src/grpc/proto/sui/rpc/v2/move_package_service.ts +190 -172
  404. package/src/grpc/proto/sui/rpc/v2/name_service.client.ts +62 -37
  405. package/src/grpc/proto/sui/rpc/v2/name_service.ts +123 -112
  406. package/src/grpc/proto/sui/rpc/v2/object.ts +147 -120
  407. package/src/grpc/proto/sui/rpc/v2/object_reference.ts +33 -26
  408. package/src/grpc/proto/sui/rpc/v2/owner.ts +61 -48
  409. package/src/grpc/proto/sui/rpc/v2/protocol_config.ts +43 -24
  410. package/src/grpc/proto/sui/rpc/v2/signature.ts +596 -503
  411. package/src/grpc/proto/sui/rpc/v2/signature_scheme.ts +28 -28
  412. package/src/grpc/proto/sui/rpc/v2/signature_verification_service.client.ts +43 -29
  413. package/src/grpc/proto/sui/rpc/v2/signature_verification_service.ts +68 -67
  414. package/src/grpc/proto/sui/rpc/v2/state_service.client.ts +140 -76
  415. package/src/grpc/proto/sui/rpc/v2/state_service.ts +642 -573
  416. package/src/grpc/proto/sui/rpc/v2/subscription_service.client.ts +60 -48
  417. package/src/grpc/proto/sui/rpc/v2/subscription_service.ts +50 -37
  418. package/src/grpc/proto/sui/rpc/v2/system_state.ts +1055 -689
  419. package/src/grpc/proto/sui/rpc/v2/transaction.ts +1535 -1110
  420. package/src/grpc/proto/sui/rpc/v2/transaction_execution_service.client.ts +65 -38
  421. package/src/grpc/proto/sui/rpc/v2/transaction_execution_service.ts +185 -139
  422. package/src/jsonRpc/client.ts +2 -17
  423. package/src/multisig/publickey.ts +14 -14
  424. package/src/transactions/Transaction.ts +2 -2
  425. package/src/transactions/TransactionData.ts +100 -1
  426. package/src/transactions/serializer.ts +1 -1
  427. package/src/utils/index.ts +1 -0
  428. package/src/version.ts +2 -2
  429. package/src/zklogin/bcs.ts +1 -1
@@ -33,7 +33,6 @@ class FieldMask$Type extends import_runtime3.MessageType {
33
33
  kind: "scalar",
34
34
  repeat: 2,
35
35
  T: 9
36
- /*ScalarType.STRING*/
37
36
  }
38
37
  ]);
39
38
  }
@@ -44,7 +43,9 @@ class FieldMask$Type extends import_runtime3.MessageType {
44
43
  const invalidFieldMaskJsonRegex = /[A-Z]|(_([.0-9_]|$))/g;
45
44
  return message.paths.map((p) => {
46
45
  if (invalidFieldMaskJsonRegex.test(p))
47
- throw new Error('Unable to encode FieldMask to JSON. lowerCamelCase of path name "' + p + '" is irreversible.');
46
+ throw new Error(
47
+ 'Unable to encode FieldMask to JSON. lowerCamelCase of path name "' + p + '" is irreversible.'
48
+ );
48
49
  return (0, import_runtime2.lowerCamelCase)(p);
49
50
  }).join(",");
50
51
  }
@@ -53,11 +54,11 @@ class FieldMask$Type extends import_runtime3.MessageType {
53
54
  */
54
55
  internalJsonRead(json, options, target) {
55
56
  if (typeof json !== "string")
56
- throw new Error("Unable to parse FieldMask from JSON " + (0, import_runtime.typeofJsonValue)(json) + ". Expected string.");
57
- if (!target)
58
- target = this.create();
59
- if (json === "")
60
- return target;
57
+ throw new Error(
58
+ "Unable to parse FieldMask from JSON " + (0, import_runtime.typeofJsonValue)(json) + ". Expected string."
59
+ );
60
+ if (!target) target = this.create();
61
+ if (json === "") return target;
61
62
  let camelToSnake = (str) => {
62
63
  if (str.includes("_"))
63
64
  throw new Error("Unable to parse FieldMask from JSON. Path names must be lowerCamelCase.");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/grpc/proto/google/protobuf/field_mask.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/field_mask.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 { typeofJsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonValue } from \"@protobuf-ts/runtime\";\nimport { lowerCamelCase } from \"@protobuf-ts/runtime\";\nimport type { JsonReadOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonWriteOptions } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\n/**\n * `FieldMask` represents a set of symbolic field paths, for example:\n *\n * paths: \"f.a\"\n * paths: \"f.b.d\"\n *\n * Here `f` represents a field in some root message, `a` and `b`\n * fields in the message found in `f`, and `d` a field found in the\n * message in `f.b`.\n *\n * Field masks are used to specify a subset of fields that should be\n * returned by a get operation or modified by an update operation.\n * Field masks also have a custom JSON encoding (see below).\n *\n * # Field Masks in Projections\n *\n * When used in the context of a projection, a response message or\n * sub-message is filtered by the API to only contain those fields as\n * specified in the mask. For example, if the mask in the previous\n * example is applied to a response message as follows:\n *\n * f {\n * a : 22\n * b {\n * d : 1\n * x : 2\n * }\n * y : 13\n * }\n * z: 8\n *\n * The result will not contain specific values for fields x,y and z\n * (their value will be set to the default, and omitted in proto text\n * output):\n *\n *\n * f {\n * a : 22\n * b {\n * d : 1\n * }\n * }\n *\n * A repeated field is not allowed except at the last position of a\n * paths string.\n *\n * If a FieldMask object is not present in a get operation, the\n * operation applies to all fields (as if a FieldMask of all fields\n * had been specified).\n *\n * Note that a field mask does not necessarily apply to the\n * top-level response message. In case of a REST get operation, the\n * field mask applies directly to the response, but in case of a REST\n * list operation, the mask instead applies to each individual message\n * in the returned resource list. In case of a REST custom method,\n * other definitions may be used. Where the mask applies will be\n * clearly documented together with its declaration in the API. In\n * any case, the effect on the returned resource/resources is required\n * behavior for APIs.\n *\n * # Field Masks in Update Operations\n *\n * A field mask in update operations specifies which fields of the\n * targeted resource are going to be updated. The API is required\n * to only change the values of the fields as specified in the mask\n * and leave the others untouched. If a resource is passed in to\n * describe the updated values, the API ignores the values of all\n * fields not covered by the mask.\n *\n * If a repeated field is specified for an update operation, new values will\n * be appended to the existing repeated field in the target resource. Note that\n * a repeated field is only allowed in the last position of a `paths` string.\n *\n * If a sub-message is specified in the last position of the field mask for an\n * update operation, then new value will be merged into the existing sub-message\n * in the target resource.\n *\n * For example, given the target message:\n *\n * f {\n * b {\n * d: 1\n * x: 2\n * }\n * c: [1]\n * }\n *\n * And an update message:\n *\n * f {\n * b {\n * d: 10\n * }\n * c: [2]\n * }\n *\n * then if the field mask is:\n *\n * paths: [\"f.b\", \"f.c\"]\n *\n * then the result will be:\n *\n * f {\n * b {\n * d: 10\n * x: 2\n * }\n * c: [1, 2]\n * }\n *\n * An implementation may provide options to override this default behavior for\n * repeated and message fields.\n *\n * In order to reset a field's value to the default, the field must\n * be in the mask and set to the default value in the provided resource.\n * Hence, in order to reset all fields of a resource, provide a default\n * instance of the resource and set all fields in the mask, or do\n * not provide a mask as described below.\n *\n * If a field mask is not present on update, the operation applies to\n * all fields (as if a field mask of all fields has been specified).\n * Note that in the presence of schema evolution, this may mean that\n * fields the client does not know and has therefore not filled into\n * the request will be reset to their default. If this is unwanted\n * behavior, a specific service may require a client to always specify\n * a field mask, producing an error if not.\n *\n * As with get operations, the location of the resource which\n * describes the updated values in the request message depends on the\n * operation kind. In any case, the effect of the field mask is\n * required to be honored by the API.\n *\n * ## Considerations for HTTP REST\n *\n * The HTTP kind of an update operation which uses a field mask must\n * be set to PATCH instead of PUT in order to satisfy HTTP semantics\n * (PUT must only be used for full updates).\n *\n * # JSON Encoding of Field Masks\n *\n * In JSON, a field mask is encoded as a single string where paths are\n * separated by a comma. Fields name in each path are converted\n * to/from lower-camel naming conventions.\n *\n * As an example, consider the following message declarations:\n *\n * message Profile {\n * User user = 1;\n * Photo photo = 2;\n * }\n * message User {\n * string display_name = 1;\n * string address = 2;\n * }\n *\n * In proto a field mask for `Profile` may look as such:\n *\n * mask {\n * paths: \"user.display_name\"\n * paths: \"photo\"\n * }\n *\n * In JSON, the same mask is represented as below:\n *\n * {\n * mask: \"user.displayName,photo\"\n * }\n *\n * # Field Masks and Oneof Fields\n *\n * Field masks treat fields in oneofs just as regular fields. Consider the\n * following message:\n *\n * message SampleMessage {\n * oneof test_oneof {\n * string name = 4;\n * SubMessage sub_message = 9;\n * }\n * }\n *\n * The field mask can be:\n *\n * mask {\n * paths: \"name\"\n * }\n *\n * Or:\n *\n * mask {\n * paths: \"sub_message\"\n * }\n *\n * Note that oneof type names (\"test_oneof\" in this case) cannot be used in\n * paths.\n *\n * ## Field Mask Verification\n *\n * The implementation of any API method which has a FieldMask type field in the\n * request should verify the included field paths, and return an\n * `INVALID_ARGUMENT` error if any path is unmappable.\n *\n * @generated from protobuf message google.protobuf.FieldMask\n */\nexport interface FieldMask {\n /**\n * The set of field mask paths.\n *\n * @generated from protobuf field: repeated string paths = 1;\n */\n paths: string[];\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass FieldMask$Type extends MessageType<FieldMask> {\n constructor() {\n super(\"google.protobuf.FieldMask\", [\n { no: 1, name: \"paths\", kind: \"scalar\", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }\n ]);\n }\n /**\n * Encode `FieldMask` to JSON object.\n */\n internalJsonWrite(message: FieldMask, options: JsonWriteOptions): JsonValue {\n const invalidFieldMaskJsonRegex = /[A-Z]|(_([.0-9_]|$))/g;\n return message.paths.map(p => {\n if (invalidFieldMaskJsonRegex.test(p))\n throw new Error(\"Unable to encode FieldMask to JSON. lowerCamelCase of path name \\\"\" + p + \"\\\" is irreversible.\");\n return lowerCamelCase(p);\n }).join(\",\");\n }\n /**\n * Decode `FieldMask` from JSON object.\n */\n internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: FieldMask): FieldMask {\n if (typeof json !== \"string\")\n throw new Error(\"Unable to parse FieldMask from JSON \" + typeofJsonValue(json) + \". Expected string.\");\n if (!target)\n target = this.create();\n if (json === \"\")\n return target;\n let camelToSnake = (str: string) => {\n if (str.includes(\"_\"))\n throw new Error(\"Unable to parse FieldMask from JSON. Path names must be lowerCamelCase.\");\n let sc = str.replace(/[A-Z]/g, letter => \"_\" + letter.toLowerCase());\n return sc;\n };\n target.paths = json.split(\",\").map(camelToSnake);\n return target;\n }\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.FieldMask\n */\nexport const FieldMask = new FieldMask$Type();\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCA,qBAAgC;AAEhC,IAAAA,kBAA+B;AAG/B,IAAAA,kBAA4B;AAqN5B,MAAM,uBAAuB,4BAAuB;AAAA,EAChD,cAAc;AACV,UAAM,6BAA6B;AAAA,MAC/B;AAAA,QAAE,IAAI;AAAA,QAAG,MAAM;AAAA,QAAS,MAAM;AAAA,QAAU,QAAQ;AAAA,QAA2B,GAAG;AAAA;AAAA,MAAwB;AAAA,IAC1G,CAAC;AAAA,EACL;AAAA;AAAA;AAAA;AAAA,EAIA,kBAAkB,SAAoB,SAAsC;AACxE,UAAM,4BAA4B;AAClC,WAAO,QAAQ,MAAM,IAAI,OAAK;AAC1B,UAAI,0BAA0B,KAAK,CAAC;AAChC,cAAM,IAAI,MAAM,sEAAuE,IAAI,oBAAqB;AACpH,iBAAO,gCAAe,CAAC;AAAA,IAC3B,CAAC,EAAE,KAAK,GAAG;AAAA,EACf;AAAA;AAAA;AAAA;AAAA,EAIA,iBAAiB,MAAiB,SAA0B,QAA+B;AACvF,QAAI,OAAO,SAAS;AAChB,YAAM,IAAI,MAAM,6CAAyC,gCAAgB,IAAI,IAAI,oBAAoB;AACzG,QAAI,CAAC;AACD,eAAS,KAAK,OAAO;AACzB,QAAI,SAAS;AACT,aAAO;AACX,QAAI,eAAe,CAAC,QAAgB;AAChC,UAAI,IAAI,SAAS,GAAG;AAChB,cAAM,IAAI,MAAM,yEAAyE;AAC7F,UAAI,KAAK,IAAI,QAAQ,UAAU,YAAU,MAAM,OAAO,YAAY,CAAC;AACnE,aAAO;AAAA,IACX;AACA,WAAO,QAAQ,KAAK,MAAM,GAAG,EAAE,IAAI,YAAY;AAC/C,WAAO;AAAA,EACX;AACJ;AAIO,MAAM,YAAY,IAAI,eAAe;",
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/field_mask.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 { typeofJsonValue } from '@protobuf-ts/runtime';\nimport type { JsonValue } from '@protobuf-ts/runtime';\nimport { lowerCamelCase } from '@protobuf-ts/runtime';\nimport type { JsonReadOptions } from '@protobuf-ts/runtime';\nimport type { JsonWriteOptions } from '@protobuf-ts/runtime';\nimport { MessageType } from '@protobuf-ts/runtime';\n/**\n * `FieldMask` represents a set of symbolic field paths, for example:\n *\n * paths: \"f.a\"\n * paths: \"f.b.d\"\n *\n * Here `f` represents a field in some root message, `a` and `b`\n * fields in the message found in `f`, and `d` a field found in the\n * message in `f.b`.\n *\n * Field masks are used to specify a subset of fields that should be\n * returned by a get operation or modified by an update operation.\n * Field masks also have a custom JSON encoding (see below).\n *\n * # Field Masks in Projections\n *\n * When used in the context of a projection, a response message or\n * sub-message is filtered by the API to only contain those fields as\n * specified in the mask. For example, if the mask in the previous\n * example is applied to a response message as follows:\n *\n * f {\n * a : 22\n * b {\n * d : 1\n * x : 2\n * }\n * y : 13\n * }\n * z: 8\n *\n * The result will not contain specific values for fields x,y and z\n * (their value will be set to the default, and omitted in proto text\n * output):\n *\n *\n * f {\n * a : 22\n * b {\n * d : 1\n * }\n * }\n *\n * A repeated field is not allowed except at the last position of a\n * paths string.\n *\n * If a FieldMask object is not present in a get operation, the\n * operation applies to all fields (as if a FieldMask of all fields\n * had been specified).\n *\n * Note that a field mask does not necessarily apply to the\n * top-level response message. In case of a REST get operation, the\n * field mask applies directly to the response, but in case of a REST\n * list operation, the mask instead applies to each individual message\n * in the returned resource list. In case of a REST custom method,\n * other definitions may be used. Where the mask applies will be\n * clearly documented together with its declaration in the API. In\n * any case, the effect on the returned resource/resources is required\n * behavior for APIs.\n *\n * # Field Masks in Update Operations\n *\n * A field mask in update operations specifies which fields of the\n * targeted resource are going to be updated. The API is required\n * to only change the values of the fields as specified in the mask\n * and leave the others untouched. If a resource is passed in to\n * describe the updated values, the API ignores the values of all\n * fields not covered by the mask.\n *\n * If a repeated field is specified for an update operation, new values will\n * be appended to the existing repeated field in the target resource. Note that\n * a repeated field is only allowed in the last position of a `paths` string.\n *\n * If a sub-message is specified in the last position of the field mask for an\n * update operation, then new value will be merged into the existing sub-message\n * in the target resource.\n *\n * For example, given the target message:\n *\n * f {\n * b {\n * d: 1\n * x: 2\n * }\n * c: [1]\n * }\n *\n * And an update message:\n *\n * f {\n * b {\n * d: 10\n * }\n * c: [2]\n * }\n *\n * then if the field mask is:\n *\n * paths: [\"f.b\", \"f.c\"]\n *\n * then the result will be:\n *\n * f {\n * b {\n * d: 10\n * x: 2\n * }\n * c: [1, 2]\n * }\n *\n * An implementation may provide options to override this default behavior for\n * repeated and message fields.\n *\n * In order to reset a field's value to the default, the field must\n * be in the mask and set to the default value in the provided resource.\n * Hence, in order to reset all fields of a resource, provide a default\n * instance of the resource and set all fields in the mask, or do\n * not provide a mask as described below.\n *\n * If a field mask is not present on update, the operation applies to\n * all fields (as if a field mask of all fields has been specified).\n * Note that in the presence of schema evolution, this may mean that\n * fields the client does not know and has therefore not filled into\n * the request will be reset to their default. If this is unwanted\n * behavior, a specific service may require a client to always specify\n * a field mask, producing an error if not.\n *\n * As with get operations, the location of the resource which\n * describes the updated values in the request message depends on the\n * operation kind. In any case, the effect of the field mask is\n * required to be honored by the API.\n *\n * ## Considerations for HTTP REST\n *\n * The HTTP kind of an update operation which uses a field mask must\n * be set to PATCH instead of PUT in order to satisfy HTTP semantics\n * (PUT must only be used for full updates).\n *\n * # JSON Encoding of Field Masks\n *\n * In JSON, a field mask is encoded as a single string where paths are\n * separated by a comma. Fields name in each path are converted\n * to/from lower-camel naming conventions.\n *\n * As an example, consider the following message declarations:\n *\n * message Profile {\n * User user = 1;\n * Photo photo = 2;\n * }\n * message User {\n * string display_name = 1;\n * string address = 2;\n * }\n *\n * In proto a field mask for `Profile` may look as such:\n *\n * mask {\n * paths: \"user.display_name\"\n * paths: \"photo\"\n * }\n *\n * In JSON, the same mask is represented as below:\n *\n * {\n * mask: \"user.displayName,photo\"\n * }\n *\n * # Field Masks and Oneof Fields\n *\n * Field masks treat fields in oneofs just as regular fields. Consider the\n * following message:\n *\n * message SampleMessage {\n * oneof test_oneof {\n * string name = 4;\n * SubMessage sub_message = 9;\n * }\n * }\n *\n * The field mask can be:\n *\n * mask {\n * paths: \"name\"\n * }\n *\n * Or:\n *\n * mask {\n * paths: \"sub_message\"\n * }\n *\n * Note that oneof type names (\"test_oneof\" in this case) cannot be used in\n * paths.\n *\n * ## Field Mask Verification\n *\n * The implementation of any API method which has a FieldMask type field in the\n * request should verify the included field paths, and return an\n * `INVALID_ARGUMENT` error if any path is unmappable.\n *\n * @generated from protobuf message google.protobuf.FieldMask\n */\nexport interface FieldMask {\n\t/**\n\t * The set of field mask paths.\n\t *\n\t * @generated from protobuf field: repeated string paths = 1;\n\t */\n\tpaths: string[];\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass FieldMask$Type extends MessageType<FieldMask> {\n\tconstructor() {\n\t\tsuper('google.protobuf.FieldMask', [\n\t\t\t{\n\t\t\t\tno: 1,\n\t\t\t\tname: 'paths',\n\t\t\t\tkind: 'scalar',\n\t\t\t\trepeat: 2 /*RepeatType.UNPACKED*/,\n\t\t\t\tT: 9 /*ScalarType.STRING*/,\n\t\t\t},\n\t\t]);\n\t}\n\t/**\n\t * Encode `FieldMask` to JSON object.\n\t */\n\tinternalJsonWrite(message: FieldMask, options: JsonWriteOptions): JsonValue {\n\t\tconst invalidFieldMaskJsonRegex = /[A-Z]|(_([.0-9_]|$))/g;\n\t\treturn message.paths\n\t\t\t.map((p) => {\n\t\t\t\tif (invalidFieldMaskJsonRegex.test(p))\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t'Unable to encode FieldMask to JSON. lowerCamelCase of path name \"' +\n\t\t\t\t\t\t\tp +\n\t\t\t\t\t\t\t'\" is irreversible.',\n\t\t\t\t\t);\n\t\t\t\treturn lowerCamelCase(p);\n\t\t\t})\n\t\t\t.join(',');\n\t}\n\t/**\n\t * Decode `FieldMask` from JSON object.\n\t */\n\tinternalJsonRead(json: JsonValue, options: JsonReadOptions, target?: FieldMask): FieldMask {\n\t\tif (typeof json !== 'string')\n\t\t\tthrow new Error(\n\t\t\t\t'Unable to parse FieldMask from JSON ' + typeofJsonValue(json) + '. Expected string.',\n\t\t\t);\n\t\tif (!target) target = this.create();\n\t\tif (json === '') return target;\n\t\tlet camelToSnake = (str: string) => {\n\t\t\tif (str.includes('_'))\n\t\t\t\tthrow new Error('Unable to parse FieldMask from JSON. Path names must be lowerCamelCase.');\n\t\t\tlet sc = str.replace(/[A-Z]/g, (letter) => '_' + letter.toLowerCase());\n\t\t\treturn sc;\n\t\t};\n\t\ttarget.paths = json.split(',').map(camelToSnake);\n\t\treturn target;\n\t}\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.FieldMask\n */\nexport const FieldMask = new FieldMask$Type();\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCA,qBAAgC;AAEhC,IAAAA,kBAA+B;AAG/B,IAAAA,kBAA4B;AAqN5B,MAAM,uBAAuB,4BAAuB;AAAA,EACnD,cAAc;AACb,UAAM,6BAA6B;AAAA,MAClC;AAAA,QACC,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,GAAG;AAAA,MACJ;AAAA,IACD,CAAC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAIA,kBAAkB,SAAoB,SAAsC;AAC3E,UAAM,4BAA4B;AAClC,WAAO,QAAQ,MACb,IAAI,CAAC,MAAM;AACX,UAAI,0BAA0B,KAAK,CAAC;AACnC,cAAM,IAAI;AAAA,UACT,sEACC,IACA;AAAA,QACF;AACD,iBAAO,gCAAe,CAAC;AAAA,IACxB,CAAC,EACA,KAAK,GAAG;AAAA,EACX;AAAA;AAAA;AAAA;AAAA,EAIA,iBAAiB,MAAiB,SAA0B,QAA+B;AAC1F,QAAI,OAAO,SAAS;AACnB,YAAM,IAAI;AAAA,QACT,6CAAyC,gCAAgB,IAAI,IAAI;AAAA,MAClE;AACD,QAAI,CAAC,OAAQ,UAAS,KAAK,OAAO;AAClC,QAAI,SAAS,GAAI,QAAO;AACxB,QAAI,eAAe,CAAC,QAAgB;AACnC,UAAI,IAAI,SAAS,GAAG;AACnB,cAAM,IAAI,MAAM,yEAAyE;AAC1F,UAAI,KAAK,IAAI,QAAQ,UAAU,CAAC,WAAW,MAAM,OAAO,YAAY,CAAC;AACrE,aAAO;AAAA,IACR;AACA,WAAO,QAAQ,KAAK,MAAM,GAAG,EAAE,IAAI,YAAY;AAC/C,WAAO;AAAA,EACR;AACD;AAIO,MAAM,YAAY,IAAI,eAAe;",
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
  * `Struct` represents a structured data value, consisting of fields
7
7
  * which map to dynamically typed values. In some languages, `Struct`
@@ -39,7 +39,7 @@ export interface Value {
39
39
  * @generated from protobuf oneof: kind
40
40
  */
41
41
  kind: {
42
- oneofKind: "nullValue";
42
+ oneofKind: 'nullValue';
43
43
  /**
44
44
  * Represents a null value.
45
45
  *
@@ -47,7 +47,7 @@ export interface Value {
47
47
  */
48
48
  nullValue: NullValue;
49
49
  } | {
50
- oneofKind: "numberValue";
50
+ oneofKind: 'numberValue';
51
51
  /**
52
52
  * Represents a double value.
53
53
  *
@@ -55,7 +55,7 @@ export interface Value {
55
55
  */
56
56
  numberValue: number;
57
57
  } | {
58
- oneofKind: "stringValue";
58
+ oneofKind: 'stringValue';
59
59
  /**
60
60
  * Represents a string value.
61
61
  *
@@ -63,7 +63,7 @@ export interface Value {
63
63
  */
64
64
  stringValue: string;
65
65
  } | {
66
- oneofKind: "boolValue";
66
+ oneofKind: 'boolValue';
67
67
  /**
68
68
  * Represents a boolean value.
69
69
  *
@@ -71,7 +71,7 @@ export interface Value {
71
71
  */
72
72
  boolValue: boolean;
73
73
  } | {
74
- oneofKind: "structValue";
74
+ oneofKind: 'structValue';
75
75
  /**
76
76
  * Represents a structured value.
77
77
  *
@@ -79,7 +79,7 @@ export interface Value {
79
79
  */
80
80
  structValue: Struct;
81
81
  } | {
82
- oneofKind: "listValue";
82
+ oneofKind: 'listValue';
83
83
  /**
84
84
  * Represents a repeated `Value`.
85
85
  *
@@ -34,7 +34,13 @@ var NullValue = /* @__PURE__ */ ((NullValue2) => {
34
34
  class Struct$Type extends import_runtime3.MessageType {
35
35
  constructor() {
36
36
  super("google.protobuf.Struct", [
37
- { no: 1, name: "fields", kind: "map", K: 9, V: { kind: "message", T: () => Value } }
37
+ {
38
+ no: 1,
39
+ name: "fields",
40
+ kind: "map",
41
+ K: 9,
42
+ V: { kind: "message", T: () => Value }
43
+ }
38
44
  ]);
39
45
  }
40
46
  /**
@@ -52,9 +58,10 @@ class Struct$Type extends import_runtime3.MessageType {
52
58
  */
53
59
  internalJsonRead(json, options, target) {
54
60
  if (!(0, import_runtime.isJsonObject)(json))
55
- throw new globalThis.Error("Unable to parse message " + this.typeName + " from JSON " + (0, import_runtime2.typeofJsonValue)(json) + ".");
56
- if (!target)
57
- target = this.create();
61
+ throw new globalThis.Error(
62
+ "Unable to parse message " + this.typeName + " from JSON " + (0, import_runtime2.typeofJsonValue)(json) + "."
63
+ );
64
+ if (!target) target = this.create();
58
65
  for (let [k, v] of globalThis.Object.entries(json)) {
59
66
  target.fields[k] = Value.fromJson(v);
60
67
  }
@@ -65,7 +72,13 @@ const Struct = new Struct$Type();
65
72
  class Value$Type extends import_runtime3.MessageType {
66
73
  constructor() {
67
74
  super("google.protobuf.Value", [
68
- { no: 1, name: "null_value", kind: "enum", oneof: "kind", T: () => ["google.protobuf.NullValue", NullValue] },
75
+ {
76
+ no: 1,
77
+ name: "null_value",
78
+ kind: "enum",
79
+ oneof: "kind",
80
+ T: () => ["google.protobuf.NullValue", NullValue]
81
+ },
69
82
  {
70
83
  no: 2,
71
84
  name: "number_value",
@@ -98,8 +111,7 @@ class Value$Type extends import_runtime3.MessageType {
98
111
  * Encode `Value` to JSON value.
99
112
  */
100
113
  internalJsonWrite(message, options) {
101
- if (message.kind.oneofKind === void 0)
102
- throw new globalThis.Error();
114
+ if (message.kind.oneofKind === void 0) throw new globalThis.Error();
103
115
  switch (message.kind.oneofKind) {
104
116
  case void 0:
105
117
  throw new globalThis.Error();
@@ -116,13 +128,11 @@ class Value$Type extends import_runtime3.MessageType {
116
128
  return message.kind.stringValue;
117
129
  case "listValue":
118
130
  let listValueField = this.fields.find((f) => f.no === 6);
119
- if (listValueField?.kind !== "message")
120
- throw new globalThis.Error();
131
+ if (listValueField?.kind !== "message") throw new globalThis.Error();
121
132
  return listValueField.T().toJson(message.kind.listValue);
122
133
  case "structValue":
123
134
  let structValueField = this.fields.find((f) => f.no === 5);
124
- if (structValueField?.kind !== "message")
125
- throw new globalThis.Error();
135
+ if (structValueField?.kind !== "message") throw new globalThis.Error();
126
136
  return structValueField.T().toJson(message.kind.structValue);
127
137
  }
128
138
  }
@@ -130,8 +140,7 @@ class Value$Type extends import_runtime3.MessageType {
130
140
  * Decode `Value` from JSON value.
131
141
  */
132
142
  internalJsonRead(json, options, target) {
133
- if (!target)
134
- target = this.create();
143
+ if (!target) target = this.create();
135
144
  switch (typeof json) {
136
145
  case "number":
137
146
  target.kind = { oneofKind: "numberValue", numberValue: json };
@@ -152,7 +161,9 @@ class Value$Type extends import_runtime3.MessageType {
152
161
  }
153
162
  break;
154
163
  default:
155
- throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + (0, import_runtime2.typeofJsonValue)(json));
164
+ throw new globalThis.Error(
165
+ "Unable to parse " + this.typeName + " from JSON " + (0, import_runtime2.typeofJsonValue)(json)
166
+ );
156
167
  }
157
168
  return target;
158
169
  }
@@ -175,9 +186,10 @@ class ListValue$Type extends import_runtime3.MessageType {
175
186
  */
176
187
  internalJsonRead(json, options, target) {
177
188
  if (!globalThis.Array.isArray(json))
178
- throw new globalThis.Error("Unable to parse " + this.typeName + " from JSON " + (0, import_runtime2.typeofJsonValue)(json));
179
- if (!target)
180
- target = this.create();
189
+ throw new globalThis.Error(
190
+ "Unable to parse " + this.typeName + " from JSON " + (0, import_runtime2.typeofJsonValue)(json)
191
+ );
192
+ if (!target) target = this.create();
181
193
  let values = json.map((v) => Value.fromJson(v));
182
194
  target.values.push(...values);
183
195
  return target;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/grpc/proto/google/protobuf/struct.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/struct.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 type { JsonReadOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonObject } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\n/**\n * `Struct` represents a structured data value, consisting of fields\n * which map to dynamically typed values. In some languages, `Struct`\n * might be supported by a native representation. For example, in\n * scripting languages like JS a struct is represented as an\n * object. The details of that representation are described together\n * with the proto support for the language.\n *\n * The JSON representation for `Struct` is JSON object.\n *\n * @generated from protobuf message google.protobuf.Struct\n */\nexport interface Struct {\n /**\n * Unordered map of dynamically typed values.\n *\n * @generated from protobuf field: map<string, google.protobuf.Value> fields = 1;\n */\n fields: {\n [key: string]: Value;\n };\n}\n/**\n * `Value` represents a dynamically typed value which can be either\n * null, a number, a string, a boolean, a recursive struct value, or a\n * list of values. A producer of value is expected to set one of these\n * variants. Absence of any variant indicates an error.\n *\n * The JSON representation for `Value` is JSON value.\n *\n * @generated from protobuf message google.protobuf.Value\n */\nexport interface Value {\n /**\n * @generated from protobuf oneof: kind\n */\n kind: {\n oneofKind: \"nullValue\";\n /**\n * Represents a null value.\n *\n * @generated from protobuf field: google.protobuf.NullValue null_value = 1;\n */\n nullValue: NullValue;\n } | {\n oneofKind: \"numberValue\";\n /**\n * Represents a double value.\n *\n * @generated from protobuf field: double number_value = 2;\n */\n numberValue: number;\n } | {\n oneofKind: \"stringValue\";\n /**\n * Represents a string value.\n *\n * @generated from protobuf field: string string_value = 3;\n */\n stringValue: string;\n } | {\n oneofKind: \"boolValue\";\n /**\n * Represents a boolean value.\n *\n * @generated from protobuf field: bool bool_value = 4;\n */\n boolValue: boolean;\n } | {\n oneofKind: \"structValue\";\n /**\n * Represents a structured value.\n *\n * @generated from protobuf field: google.protobuf.Struct struct_value = 5;\n */\n structValue: Struct;\n } | {\n oneofKind: \"listValue\";\n /**\n * Represents a repeated `Value`.\n *\n * @generated from protobuf field: google.protobuf.ListValue list_value = 6;\n */\n listValue: ListValue;\n } | {\n oneofKind: undefined;\n };\n}\n/**\n * `ListValue` is a wrapper around a repeated field of values.\n *\n * The JSON representation for `ListValue` is JSON array.\n *\n * @generated from protobuf message google.protobuf.ListValue\n */\nexport interface ListValue {\n /**\n * Repeated field of dynamically typed values.\n *\n * @generated from protobuf field: repeated google.protobuf.Value values = 1;\n */\n values: Value[];\n}\n/**\n * `NullValue` is a singleton enumeration to represent the null value for the\n * `Value` type union.\n *\n * The JSON representation for `NullValue` is JSON `null`.\n *\n * @generated from protobuf enum google.protobuf.NullValue\n */\nexport enum NullValue {\n /**\n * Null value.\n *\n * @generated from protobuf enum value: NULL_VALUE = 0;\n */\n NULL_VALUE = 0\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Struct$Type extends MessageType<Struct> {\n constructor() {\n super(\"google.protobuf.Struct\", [\n { no: 1, name: \"fields\", kind: \"map\", K: 9 /*ScalarType.STRING*/, V: { kind: \"message\", T: () => Value } }\n ]);\n }\n /**\n * Encode `Struct` to JSON object.\n */\n internalJsonWrite(message: Struct, options: JsonWriteOptions): JsonValue {\n let json: JsonObject = {};\n for (let [k, v] of Object.entries(message.fields)) {\n json[k] = Value.toJson(v);\n }\n return json;\n }\n /**\n * Decode `Struct` from JSON object.\n */\n internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Struct): Struct {\n if (!isJsonObject(json))\n throw new globalThis.Error(\"Unable to parse message \" + this.typeName + \" from JSON \" + typeofJsonValue(json) + \".\");\n if (!target)\n target = this.create();\n for (let [k, v] of globalThis.Object.entries(json)) {\n target.fields[k] = Value.fromJson(v);\n }\n return target;\n }\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Struct\n */\nexport const Struct = new Struct$Type();\n// @generated message type with reflection information, may provide speed optimized methods\nclass Value$Type extends MessageType<Value> {\n constructor() {\n super(\"google.protobuf.Value\", [\n { no: 1, name: \"null_value\", kind: \"enum\", oneof: \"kind\", T: () => [\"google.protobuf.NullValue\", NullValue] },\n { no: 2, name: \"number_value\", kind: \"scalar\", oneof: \"kind\", T: 1 /*ScalarType.DOUBLE*/ },\n { no: 3, name: \"string_value\", kind: \"scalar\", oneof: \"kind\", T: 9 /*ScalarType.STRING*/ },\n { no: 4, name: \"bool_value\", kind: \"scalar\", oneof: \"kind\", T: 8 /*ScalarType.BOOL*/ },\n { no: 5, name: \"struct_value\", kind: \"message\", oneof: \"kind\", T: () => Struct },\n { no: 6, name: \"list_value\", kind: \"message\", oneof: \"kind\", T: () => ListValue }\n ]);\n }\n /**\n * Encode `Value` to JSON value.\n */\n internalJsonWrite(message: Value, options: JsonWriteOptions): JsonValue {\n if (message.kind.oneofKind === undefined)\n throw new globalThis.Error();\n switch (message.kind.oneofKind) {\n case undefined: throw new globalThis.Error();\n case \"boolValue\": return message.kind.boolValue;\n case \"nullValue\": return null;\n case \"numberValue\":\n let numberValue = message.kind.numberValue;\n if (typeof numberValue == \"number\" && !Number.isFinite(numberValue))\n throw new globalThis.Error();\n return numberValue;\n case \"stringValue\": return message.kind.stringValue;\n case \"listValue\":\n let listValueField = this.fields.find(f => f.no === 6);\n if (listValueField?.kind !== \"message\")\n throw new globalThis.Error();\n return listValueField.T().toJson(message.kind.listValue);\n case \"structValue\":\n let structValueField = this.fields.find(f => f.no === 5);\n if (structValueField?.kind !== \"message\")\n throw new globalThis.Error();\n return structValueField.T().toJson(message.kind.structValue);\n }\n }\n /**\n * Decode `Value` from JSON value.\n */\n internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Value): Value {\n if (!target)\n target = this.create();\n switch (typeof json) {\n case \"number\":\n target.kind = { oneofKind: \"numberValue\", numberValue: json };\n break;\n case \"string\":\n target.kind = { oneofKind: \"stringValue\", stringValue: json };\n break;\n case \"boolean\":\n target.kind = { oneofKind: \"boolValue\", boolValue: json };\n break;\n case \"object\":\n if (json === null) {\n target.kind = { oneofKind: \"nullValue\", nullValue: NullValue.NULL_VALUE };\n }\n else if (globalThis.Array.isArray(json)) {\n target.kind = { oneofKind: \"listValue\", listValue: ListValue.fromJson(json) };\n }\n else {\n target.kind = { oneofKind: \"structValue\", structValue: Struct.fromJson(json) };\n }\n break;\n default: throw new globalThis.Error(\"Unable to parse \" + this.typeName + \" from JSON \" + typeofJsonValue(json));\n }\n return target;\n }\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Value\n */\nexport const Value = new Value$Type();\n// @generated message type with reflection information, may provide speed optimized methods\nclass ListValue$Type extends MessageType<ListValue> {\n constructor() {\n super(\"google.protobuf.ListValue\", [\n { no: 1, name: \"values\", kind: \"message\", repeat: 1 /*RepeatType.PACKED*/, T: () => Value }\n ]);\n }\n /**\n * Encode `ListValue` to JSON array.\n */\n internalJsonWrite(message: ListValue, options: JsonWriteOptions): JsonValue {\n return message.values.map(v => Value.toJson(v));\n }\n /**\n * Decode `ListValue` from JSON array.\n */\n internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: ListValue): ListValue {\n if (!globalThis.Array.isArray(json))\n throw new globalThis.Error(\"Unable to parse \" + this.typeName + \" from JSON \" + typeofJsonValue(json));\n if (!target)\n target = this.create();\n let values = json.map(v => Value.fromJson(v));\n target.values.push(...values);\n return target;\n }\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.ListValue\n */\nexport const ListValue = new ListValue$Type();\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCA,qBAA6B;AAC7B,IAAAA,kBAAgC;AAKhC,IAAAA,kBAA4B;AAgHrB,IAAK,YAAL,kBAAKC,eAAL;AAMH,EAAAA,sBAAA,gBAAa,KAAb;AANQ,SAAAA;AAAA,GAAA;AASZ,MAAM,oBAAoB,4BAAoB;AAAA,EAC1C,cAAc;AACV,UAAM,0BAA0B;AAAA,MAC5B,EAAE,IAAI,GAAG,MAAM,UAAU,MAAM,O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AK,OAAO;AACzB,QAAI,SAAS,KAAK,IAAI,OAAK,MAAM,SAAS,CAAC,CAAC;AAC5C,WAAO,OAAO,KAAK,GAAG,MAAM;AAC5B,WAAO;AAAA,EACX;AACJ;AAIO,MAAM,YAAY,IAAI,eAAe;",
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/struct.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 type { JsonReadOptions } from '@protobuf-ts/runtime';\nimport type { JsonWriteOptions } from '@protobuf-ts/runtime';\nimport type { JsonObject } from '@protobuf-ts/runtime';\nimport { MessageType } from '@protobuf-ts/runtime';\n/**\n * `Struct` represents a structured data value, consisting of fields\n * which map to dynamically typed values. In some languages, `Struct`\n * might be supported by a native representation. For example, in\n * scripting languages like JS a struct is represented as an\n * object. The details of that representation are described together\n * with the proto support for the language.\n *\n * The JSON representation for `Struct` is JSON object.\n *\n * @generated from protobuf message google.protobuf.Struct\n */\nexport interface Struct {\n\t/**\n\t * Unordered map of dynamically typed values.\n\t *\n\t * @generated from protobuf field: map<string, google.protobuf.Value> fields = 1;\n\t */\n\tfields: {\n\t\t[key: string]: Value;\n\t};\n}\n/**\n * `Value` represents a dynamically typed value which can be either\n * null, a number, a string, a boolean, a recursive struct value, or a\n * list of values. A producer of value is expected to set one of these\n * variants. Absence of any variant indicates an error.\n *\n * The JSON representation for `Value` is JSON value.\n *\n * @generated from protobuf message google.protobuf.Value\n */\nexport interface Value {\n\t/**\n\t * @generated from protobuf oneof: kind\n\t */\n\tkind:\n\t\t| {\n\t\t\t\toneofKind: 'nullValue';\n\t\t\t\t/**\n\t\t\t\t * Represents a null value.\n\t\t\t\t *\n\t\t\t\t * @generated from protobuf field: google.protobuf.NullValue null_value = 1;\n\t\t\t\t */\n\t\t\t\tnullValue: NullValue;\n\t\t }\n\t\t| {\n\t\t\t\toneofKind: 'numberValue';\n\t\t\t\t/**\n\t\t\t\t * Represents a double value.\n\t\t\t\t *\n\t\t\t\t * @generated from protobuf field: double number_value = 2;\n\t\t\t\t */\n\t\t\t\tnumberValue: number;\n\t\t }\n\t\t| {\n\t\t\t\toneofKind: 'stringValue';\n\t\t\t\t/**\n\t\t\t\t * Represents a string value.\n\t\t\t\t *\n\t\t\t\t * @generated from protobuf field: string string_value = 3;\n\t\t\t\t */\n\t\t\t\tstringValue: string;\n\t\t }\n\t\t| {\n\t\t\t\toneofKind: 'boolValue';\n\t\t\t\t/**\n\t\t\t\t * Represents a boolean value.\n\t\t\t\t *\n\t\t\t\t * @generated from protobuf field: bool bool_value = 4;\n\t\t\t\t */\n\t\t\t\tboolValue: boolean;\n\t\t }\n\t\t| {\n\t\t\t\toneofKind: 'structValue';\n\t\t\t\t/**\n\t\t\t\t * Represents a structured value.\n\t\t\t\t *\n\t\t\t\t * @generated from protobuf field: google.protobuf.Struct struct_value = 5;\n\t\t\t\t */\n\t\t\t\tstructValue: Struct;\n\t\t }\n\t\t| {\n\t\t\t\toneofKind: 'listValue';\n\t\t\t\t/**\n\t\t\t\t * Represents a repeated `Value`.\n\t\t\t\t *\n\t\t\t\t * @generated from protobuf field: google.protobuf.ListValue list_value = 6;\n\t\t\t\t */\n\t\t\t\tlistValue: ListValue;\n\t\t }\n\t\t| {\n\t\t\t\toneofKind: undefined;\n\t\t };\n}\n/**\n * `ListValue` is a wrapper around a repeated field of values.\n *\n * The JSON representation for `ListValue` is JSON array.\n *\n * @generated from protobuf message google.protobuf.ListValue\n */\nexport interface ListValue {\n\t/**\n\t * Repeated field of dynamically typed values.\n\t *\n\t * @generated from protobuf field: repeated google.protobuf.Value values = 1;\n\t */\n\tvalues: Value[];\n}\n/**\n * `NullValue` is a singleton enumeration to represent the null value for the\n * `Value` type union.\n *\n * The JSON representation for `NullValue` is JSON `null`.\n *\n * @generated from protobuf enum google.protobuf.NullValue\n */\nexport enum NullValue {\n\t/**\n\t * Null value.\n\t *\n\t * @generated from protobuf enum value: NULL_VALUE = 0;\n\t */\n\tNULL_VALUE = 0,\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Struct$Type extends MessageType<Struct> {\n\tconstructor() {\n\t\tsuper('google.protobuf.Struct', [\n\t\t\t{\n\t\t\t\tno: 1,\n\t\t\t\tname: 'fields',\n\t\t\t\tkind: 'map',\n\t\t\t\tK: 9 /*ScalarType.STRING*/,\n\t\t\t\tV: { kind: 'message', T: () => Value },\n\t\t\t},\n\t\t]);\n\t}\n\t/**\n\t * Encode `Struct` to JSON object.\n\t */\n\tinternalJsonWrite(message: Struct, options: JsonWriteOptions): JsonValue {\n\t\tlet json: JsonObject = {};\n\t\tfor (let [k, v] of Object.entries(message.fields)) {\n\t\t\tjson[k] = Value.toJson(v);\n\t\t}\n\t\treturn json;\n\t}\n\t/**\n\t * Decode `Struct` from JSON object.\n\t */\n\tinternalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Struct): Struct {\n\t\tif (!isJsonObject(json))\n\t\t\tthrow new globalThis.Error(\n\t\t\t\t'Unable to parse message ' + this.typeName + ' from JSON ' + typeofJsonValue(json) + '.',\n\t\t\t);\n\t\tif (!target) target = this.create();\n\t\tfor (let [k, v] of globalThis.Object.entries(json)) {\n\t\t\ttarget.fields[k] = Value.fromJson(v);\n\t\t}\n\t\treturn target;\n\t}\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Struct\n */\nexport const Struct = new Struct$Type();\n// @generated message type with reflection information, may provide speed optimized methods\nclass Value$Type extends MessageType<Value> {\n\tconstructor() {\n\t\tsuper('google.protobuf.Value', [\n\t\t\t{\n\t\t\t\tno: 1,\n\t\t\t\tname: 'null_value',\n\t\t\t\tkind: 'enum',\n\t\t\t\toneof: 'kind',\n\t\t\t\tT: () => ['google.protobuf.NullValue', NullValue],\n\t\t\t},\n\t\t\t{ no: 2, name: 'number_value', kind: 'scalar', oneof: 'kind', T: 1 /*ScalarType.DOUBLE*/ },\n\t\t\t{ no: 3, name: 'string_value', kind: 'scalar', oneof: 'kind', T: 9 /*ScalarType.STRING*/ },\n\t\t\t{ no: 4, name: 'bool_value', kind: 'scalar', oneof: 'kind', T: 8 /*ScalarType.BOOL*/ },\n\t\t\t{ no: 5, name: 'struct_value', kind: 'message', oneof: 'kind', T: () => Struct },\n\t\t\t{ no: 6, name: 'list_value', kind: 'message', oneof: 'kind', T: () => ListValue },\n\t\t]);\n\t}\n\t/**\n\t * Encode `Value` to JSON value.\n\t */\n\tinternalJsonWrite(message: Value, options: JsonWriteOptions): JsonValue {\n\t\tif (message.kind.oneofKind === undefined) throw new globalThis.Error();\n\t\tswitch (message.kind.oneofKind) {\n\t\t\tcase undefined:\n\t\t\t\tthrow new globalThis.Error();\n\t\t\tcase 'boolValue':\n\t\t\t\treturn message.kind.boolValue;\n\t\t\tcase 'nullValue':\n\t\t\t\treturn null;\n\t\t\tcase 'numberValue':\n\t\t\t\tlet numberValue = message.kind.numberValue;\n\t\t\t\tif (typeof numberValue == 'number' && !Number.isFinite(numberValue))\n\t\t\t\t\tthrow new globalThis.Error();\n\t\t\t\treturn numberValue;\n\t\t\tcase 'stringValue':\n\t\t\t\treturn message.kind.stringValue;\n\t\t\tcase 'listValue':\n\t\t\t\tlet listValueField = this.fields.find((f) => f.no === 6);\n\t\t\t\tif (listValueField?.kind !== 'message') throw new globalThis.Error();\n\t\t\t\treturn listValueField.T().toJson(message.kind.listValue);\n\t\t\tcase 'structValue':\n\t\t\t\tlet structValueField = this.fields.find((f) => f.no === 5);\n\t\t\t\tif (structValueField?.kind !== 'message') throw new globalThis.Error();\n\t\t\t\treturn structValueField.T().toJson(message.kind.structValue);\n\t\t}\n\t}\n\t/**\n\t * Decode `Value` from JSON value.\n\t */\n\tinternalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Value): Value {\n\t\tif (!target) target = this.create();\n\t\tswitch (typeof json) {\n\t\t\tcase 'number':\n\t\t\t\ttarget.kind = { oneofKind: 'numberValue', numberValue: json };\n\t\t\t\tbreak;\n\t\t\tcase 'string':\n\t\t\t\ttarget.kind = { oneofKind: 'stringValue', stringValue: json };\n\t\t\t\tbreak;\n\t\t\tcase 'boolean':\n\t\t\t\ttarget.kind = { oneofKind: 'boolValue', boolValue: json };\n\t\t\t\tbreak;\n\t\t\tcase 'object':\n\t\t\t\tif (json === null) {\n\t\t\t\t\ttarget.kind = { oneofKind: 'nullValue', nullValue: NullValue.NULL_VALUE };\n\t\t\t\t} else if (globalThis.Array.isArray(json)) {\n\t\t\t\t\ttarget.kind = { oneofKind: 'listValue', listValue: ListValue.fromJson(json) };\n\t\t\t\t} else {\n\t\t\t\t\ttarget.kind = { oneofKind: 'structValue', structValue: Struct.fromJson(json) };\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new globalThis.Error(\n\t\t\t\t\t'Unable to parse ' + this.typeName + ' from JSON ' + typeofJsonValue(json),\n\t\t\t\t);\n\t\t}\n\t\treturn target;\n\t}\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Value\n */\nexport const Value = new Value$Type();\n// @generated message type with reflection information, may provide speed optimized methods\nclass ListValue$Type extends MessageType<ListValue> {\n\tconstructor() {\n\t\tsuper('google.protobuf.ListValue', [\n\t\t\t{ no: 1, name: 'values', kind: 'message', repeat: 1 /*RepeatType.PACKED*/, T: () => Value },\n\t\t]);\n\t}\n\t/**\n\t * Encode `ListValue` to JSON array.\n\t */\n\tinternalJsonWrite(message: ListValue, options: JsonWriteOptions): JsonValue {\n\t\treturn message.values.map((v) => Value.toJson(v));\n\t}\n\t/**\n\t * Decode `ListValue` from JSON array.\n\t */\n\tinternalJsonRead(json: JsonValue, options: JsonReadOptions, target?: ListValue): ListValue {\n\t\tif (!globalThis.Array.isArray(json))\n\t\t\tthrow new globalThis.Error(\n\t\t\t\t'Unable to parse ' + this.typeName + ' from JSON ' + typeofJsonValue(json),\n\t\t\t);\n\t\tif (!target) target = this.create();\n\t\tlet values = json.map((v) => Value.fromJson(v));\n\t\ttarget.values.push(...values);\n\t\treturn target;\n\t}\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.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,UAAM,6BAA6B;AAAA,MAClC,EAAE,IAAI,GAAG,MAAM,UAAU,MAAM,WAAW,QAAQ,GAAyB,GAAG,MAAM,MAAM;AAAA,IAC3F,CAAC;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAIA,kBAAkB,SAAoB,SAAsC;AAC3E,WAAO,QAAQ,OAAO,IAAI,CAAC,MAAM,MAAM,OAAO,CAAC,CAAC;AAAA,EACjD;AAAA;AAAA;AAAA;AAAA,EAIA,iBAAiB,MAAiB,SAA0B,QAA+B;AAC1F,QAAI,CAAC,WAAW,MAAM,QAAQ,IAAI;AACjC,YAAM,IAAI,WAAW;AAAA,QACpB,qBAAqB,KAAK,WAAW,oBAAgB,iCAAgB,IAAI;AAAA,MAC1E;AACD,QAAI,CAAC,OAAQ,UAAS,KAAK,OAAO;AAClC,QAAI,SAAS,KAAK,IAAI,CAAC,MAAM,MAAM,SAAS,CAAC,CAAC;AAC9C,WAAO,OAAO,KAAK,GAAG,MAAM;AAC5B,WAAO;AAAA,EACR;AACD;AAIO,MAAM,YAAY,IAAI,eAAe;",
6
6
  "names": ["import_runtime", "NullValue"]
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 Timestamp represents a point in time independent of any time zone
7
7
  * or calendar, represented as seconds and fractions of seconds at
@@ -33,7 +33,6 @@ class Timestamp$Type extends import_runtime3.MessageType {
33
33
  kind: "scalar",
34
34
  T: 3,
35
35
  L: 0
36
- /*LongType.BIGINT*/
37
36
  },
38
37
  {
39
38
  no: 2,
@@ -58,7 +57,9 @@ class Timestamp$Type extends import_runtime3.MessageType {
58
57
  * Converts a `Timestamp` to a JavaScript Date.
59
58
  */
60
59
  toDate(message) {
61
- return new Date(import_runtime2.PbLong.from(message.seconds).toNumber() * 1e3 + Math.ceil(message.nanos / 1e6));
60
+ return new Date(
61
+ import_runtime2.PbLong.from(message.seconds).toNumber() * 1e3 + Math.ceil(message.nanos / 1e6)
62
+ );
62
63
  }
63
64
  /**
64
65
  * Converts a JavaScript Date to a `Timestamp`.
@@ -77,18 +78,17 @@ class Timestamp$Type extends import_runtime3.MessageType {
77
78
  internalJsonWrite(message, options) {
78
79
  let ms = import_runtime2.PbLong.from(message.seconds).toNumber() * 1e3;
79
80
  if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
80
- throw new Error("Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
81
+ throw new Error(
82
+ "Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."
83
+ );
81
84
  if (message.nanos < 0)
82
85
  throw new Error("Unable to encode invalid Timestamp to JSON. Nanos must not be negative.");
83
86
  let z = "Z";
84
87
  if (message.nanos > 0) {
85
88
  let nanosStr = (message.nanos + 1e9).toString().substring(1);
86
- if (nanosStr.substring(3) === "000000")
87
- z = "." + nanosStr.substring(0, 3) + "Z";
88
- else if (nanosStr.substring(6) === "000")
89
- z = "." + nanosStr.substring(0, 6) + "Z";
90
- else
91
- z = "." + nanosStr + "Z";
89
+ if (nanosStr.substring(3) === "000000") z = "." + nanosStr.substring(0, 3) + "Z";
90
+ else if (nanosStr.substring(6) === "000") z = "." + nanosStr.substring(0, 6) + "Z";
91
+ else z = "." + nanosStr + "Z";
92
92
  }
93
93
  return new Date(ms).toISOString().replace(".000Z", z);
94
94
  }
@@ -99,16 +99,19 @@ class Timestamp$Type extends import_runtime3.MessageType {
99
99
  internalJsonRead(json, options, target) {
100
100
  if (typeof json !== "string")
101
101
  throw new Error("Unable to parse Timestamp from JSON " + (0, import_runtime.typeofJsonValue)(json) + ".");
102
- let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
103
- if (!matches)
104
- throw new Error("Unable to parse Timestamp from JSON. Invalid format.");
105
- let ms = Date.parse(matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z"));
106
- if (Number.isNaN(ms))
107
- throw new Error("Unable to parse Timestamp from JSON. Invalid value.");
102
+ let matches = json.match(
103
+ /^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/
104
+ );
105
+ if (!matches) throw new Error("Unable to parse Timestamp from JSON. Invalid format.");
106
+ let ms = Date.parse(
107
+ matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z")
108
+ );
109
+ if (Number.isNaN(ms)) throw new Error("Unable to parse Timestamp from JSON. Invalid value.");
108
110
  if (ms < Date.parse("0001-01-01T00:00:00Z") || ms > Date.parse("9999-12-31T23:59:59Z"))
109
- throw new globalThis.Error("Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.");
110
- if (!target)
111
- target = this.create();
111
+ throw new globalThis.Error(
112
+ "Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive."
113
+ );
114
+ if (!target) target = this.create();
112
115
  target.seconds = import_runtime2.PbLong.from(ms / 1e3).toBigInt();
113
116
  target.nanos = 0;
114
117
  if (matches[7])
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/grpc/proto/google/protobuf/timestamp.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/timestamp.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 { typeofJsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonValue } from \"@protobuf-ts/runtime\";\nimport type { JsonReadOptions } from \"@protobuf-ts/runtime\";\nimport type { JsonWriteOptions } from \"@protobuf-ts/runtime\";\nimport { PbLong } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\n/**\n * A Timestamp represents a point in time independent of any time zone\n * or calendar, represented as seconds and fractions of seconds at\n * nanosecond resolution in UTC Epoch time. It is encoded using the\n * Proleptic Gregorian Calendar which extends the Gregorian calendar\n * backwards to year one. It is encoded assuming all minutes are 60\n * seconds long, i.e. leap seconds are \"smeared\" so that no leap second\n * table is needed for interpretation. Range is from\n * `0001-01-01T00:00:00Z` to `9999-12-31T23:59:59.999999999Z`.\n * Restricting to that range ensures that conversion to\n * and from RFC 3339 date strings is possible.\n * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).\n *\n * # Examples\n *\n * Example 1: Compute Timestamp from POSIX `time()`.\n *\n * ```\n * Timestamp timestamp;\n * timestamp.set_seconds(time(NULL));\n * timestamp.set_nanos(0);\n * ```\n *\n * Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n *\n * ```\n * struct timeval tv;\n * gettimeofday(&tv, NULL);\n *\n * Timestamp timestamp;\n * timestamp.set_seconds(tv.tv_sec);\n * timestamp.set_nanos(tv.tv_usec * 1000);\n * ```\n *\n * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n *\n * ```\n * FILETIME ft;\n * GetSystemTimeAsFileTime(&ft);\n * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n *\n * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n * Timestamp timestamp;\n * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); //\n * ```\n *\n * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n *\n * ```\n * long millis = System.currentTimeMillis();\n *\n * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n * .setNanos((int) ((millis % 1000) * 1000000)).build();\n *\n * ```\n *\n * Example 5: Compute Timestamp from current time in Python.\n *\n * ```\n * timestamp = Timestamp()\n * timestamp.GetCurrentTime()\n * ```\n *\n * # JSON Mapping\n *\n * In JSON format, the `Timestamp` type is encoded as a string in the\n * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n * format is `{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z`\n * where `{year}` is always expressed using four digits while `{month}`, `{day}`,\n * `{hour}`, `{min}`, and `{sec}` are zero-padded to two digits each. The fractional\n * seconds, which can go up to 9 digits (so up to 1 nanosecond resolution),\n * are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n * is required, though only UTC (as indicated by \"Z\") is presently supported.\n *\n * For example, `2017-01-15T01:30:15.01Z` encodes 15.01 seconds past\n * 01:30 UTC on January 15, 2017.\n *\n * In JavaScript, you can convert a `Date` object to this format using the\n * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n * method. In Python, you can convert a standard `datetime.datetime` object\n * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)\n * with the time format spec `%Y-%m-%dT%H:%M:%S.%fZ`. Likewise, in Java, you\n * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](\n * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--)\n * to obtain a formatter capable of generating timestamps in this format.\n *\n *\n *\n * @generated from protobuf message google.protobuf.Timestamp\n */\nexport interface Timestamp {\n /**\n * Represents seconds of UTC time since Unix epoch\n * `1970-01-01T00:00:00Z`. Must be from `0001-01-01T00:00:00Z` to\n * `9999-12-31T23:59:59Z` inclusive.\n *\n * @generated from protobuf field: int64 seconds = 1;\n */\n seconds: bigint;\n /**\n * Non-negative fractions of a second at nanosecond resolution. Negative\n * second values with fractions must still have non-negative nano values\n * that count forward in time. Must be from 0 to 999,999,999\n * inclusive.\n *\n * @generated from protobuf field: int32 nanos = 2;\n */\n nanos: number;\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Timestamp$Type extends MessageType<Timestamp> {\n constructor() {\n super(\"google.protobuf.Timestamp\", [\n { no: 1, name: \"seconds\", kind: \"scalar\", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },\n { no: 2, name: \"nanos\", kind: \"scalar\", T: 5 /*ScalarType.INT32*/ }\n ]);\n }\n /**\n * Creates a new `Timestamp` for the current time.\n */\n now(): Timestamp {\n const msg = this.create();\n const ms = Date.now();\n msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();\n msg.nanos = (ms % 1000) * 1000000;\n return msg;\n }\n /**\n * Converts a `Timestamp` to a JavaScript Date.\n */\n toDate(message: Timestamp): Date {\n return new Date(PbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000));\n }\n /**\n * Converts a JavaScript Date to a `Timestamp`.\n */\n fromDate(date: Date): Timestamp {\n const msg = this.create();\n const ms = date.getTime();\n msg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();\n msg.nanos = ((ms % 1000) + (ms < 0 && ms % 1000 !== 0 ? 1000 : 0)) * 1000000;\n return msg;\n }\n /**\n * In JSON format, the `Timestamp` type is encoded as a string\n * in the RFC 3339 format.\n */\n internalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue {\n let ms = PbLong.from(message.seconds).toNumber() * 1000;\n if (ms < Date.parse(\"0001-01-01T00:00:00Z\") || ms > Date.parse(\"9999-12-31T23:59:59Z\"))\n throw new Error(\"Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.\");\n if (message.nanos < 0)\n throw new Error(\"Unable to encode invalid Timestamp to JSON. Nanos must not be negative.\");\n let z = \"Z\";\n if (message.nanos > 0) {\n let nanosStr = (message.nanos + 1000000000).toString().substring(1);\n if (nanosStr.substring(3) === \"000000\")\n z = \".\" + nanosStr.substring(0, 3) + \"Z\";\n else if (nanosStr.substring(6) === \"000\")\n z = \".\" + nanosStr.substring(0, 6) + \"Z\";\n else\n z = \".\" + nanosStr + \"Z\";\n }\n return new Date(ms).toISOString().replace(\".000Z\", z);\n }\n /**\n * In JSON format, the `Timestamp` type is encoded as a string\n * in the RFC 3339 format.\n */\n internalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp {\n if (typeof json !== \"string\")\n throw new Error(\"Unable to parse Timestamp from JSON \" + typeofJsonValue(json) + \".\");\n let matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);\n if (!matches)\n throw new Error(\"Unable to parse Timestamp from JSON. Invalid format.\");\n let ms = Date.parse(matches[1] + \"-\" + matches[2] + \"-\" + matches[3] + \"T\" + matches[4] + \":\" + matches[5] + \":\" + matches[6] + (matches[8] ? matches[8] : \"Z\"));\n if (Number.isNaN(ms))\n throw new Error(\"Unable to parse Timestamp from JSON. Invalid value.\");\n if (ms < Date.parse(\"0001-01-01T00:00:00Z\") || ms > Date.parse(\"9999-12-31T23:59:59Z\"))\n throw new globalThis.Error(\"Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.\");\n if (!target)\n target = this.create();\n target.seconds = PbLong.from(ms / 1000).toBigInt();\n target.nanos = 0;\n if (matches[7])\n target.nanos = (parseInt(\"1\" + matches[7] + \"0\".repeat(9 - matches[7].length)) - 1000000000);\n return target;\n }\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Timest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,MAAM,2GAA2G;AAC1I,QAAI,CAAC;AACD,eAAS,KAAK,OAAO;AACzB,WAAO,UAAU,uBAAO,KAAK,KAAK,GAAI,EAAE,SAAS;AACjD,WAAO,QAAQ;AACf,QAAI,QAAQ,CAAC;AACT,aAAO,QAAS,SAAS,MAAM,QAAQ,CAAC,IAAI,IAAI,OAAO,IAAI,QAAQ,CAAC,EAAE,MAAM,CAAC,IAAI;AACrF,WAAO;AAAA,EACX;AACJ;AAIO,MAAM,YAAY,IAAI,eAAe;",
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/timestamp.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 { typeofJsonValue } from '@protobuf-ts/runtime';\nimport type { JsonValue } from '@protobuf-ts/runtime';\nimport type { JsonReadOptions } from '@protobuf-ts/runtime';\nimport type { JsonWriteOptions } from '@protobuf-ts/runtime';\nimport { PbLong } from '@protobuf-ts/runtime';\nimport { MessageType } from '@protobuf-ts/runtime';\n/**\n * A Timestamp represents a point in time independent of any time zone\n * or calendar, represented as seconds and fractions of seconds at\n * nanosecond resolution in UTC Epoch time. It is encoded using the\n * Proleptic Gregorian Calendar which extends the Gregorian calendar\n * backwards to year one. It is encoded assuming all minutes are 60\n * seconds long, i.e. leap seconds are \"smeared\" so that no leap second\n * table is needed for interpretation. Range is from\n * `0001-01-01T00:00:00Z` to `9999-12-31T23:59:59.999999999Z`.\n * Restricting to that range ensures that conversion to\n * and from RFC 3339 date strings is possible.\n * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).\n *\n * # Examples\n *\n * Example 1: Compute Timestamp from POSIX `time()`.\n *\n * ```\n * Timestamp timestamp;\n * timestamp.set_seconds(time(NULL));\n * timestamp.set_nanos(0);\n * ```\n *\n * Example 2: Compute Timestamp from POSIX `gettimeofday()`.\n *\n * ```\n * struct timeval tv;\n * gettimeofday(&tv, NULL);\n *\n * Timestamp timestamp;\n * timestamp.set_seconds(tv.tv_sec);\n * timestamp.set_nanos(tv.tv_usec * 1000);\n * ```\n *\n * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n *\n * ```\n * FILETIME ft;\n * GetSystemTimeAsFileTime(&ft);\n * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;\n *\n * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\n * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\n * Timestamp timestamp;\n * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\n * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); //\n * ```\n *\n * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n *\n * ```\n * long millis = System.currentTimeMillis();\n *\n * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n * .setNanos((int) ((millis % 1000) * 1000000)).build();\n *\n * ```\n *\n * Example 5: Compute Timestamp from current time in Python.\n *\n * ```\n * timestamp = Timestamp()\n * timestamp.GetCurrentTime()\n * ```\n *\n * # JSON Mapping\n *\n * In JSON format, the `Timestamp` type is encoded as a string in the\n * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\n * format is `{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z`\n * where `{year}` is always expressed using four digits while `{month}`, `{day}`,\n * `{hour}`, `{min}`, and `{sec}` are zero-padded to two digits each. The fractional\n * seconds, which can go up to 9 digits (so up to 1 nanosecond resolution),\n * are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\n * is required, though only UTC (as indicated by \"Z\") is presently supported.\n *\n * For example, `2017-01-15T01:30:15.01Z` encodes 15.01 seconds past\n * 01:30 UTC on January 15, 2017.\n *\n * In JavaScript, you can convert a `Date` object to this format using the\n * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)\n * method. In Python, you can convert a standard `datetime.datetime` object\n * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)\n * with the time format spec `%Y-%m-%dT%H:%M:%S.%fZ`. Likewise, in Java, you\n * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](\n * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--)\n * to obtain a formatter capable of generating timestamps in this format.\n *\n *\n *\n * @generated from protobuf message google.protobuf.Timestamp\n */\nexport interface Timestamp {\n\t/**\n\t * Represents seconds of UTC time since Unix epoch\n\t * `1970-01-01T00:00:00Z`. Must be from `0001-01-01T00:00:00Z` to\n\t * `9999-12-31T23:59:59Z` inclusive.\n\t *\n\t * @generated from protobuf field: int64 seconds = 1;\n\t */\n\tseconds: bigint;\n\t/**\n\t * Non-negative fractions of a second at nanosecond resolution. Negative\n\t * second values with fractions must still have non-negative nano values\n\t * that count forward in time. Must be from 0 to 999,999,999\n\t * inclusive.\n\t *\n\t * @generated from protobuf field: int32 nanos = 2;\n\t */\n\tnanos: number;\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Timestamp$Type extends MessageType<Timestamp> {\n\tconstructor() {\n\t\tsuper('google.protobuf.Timestamp', [\n\t\t\t{\n\t\t\t\tno: 1,\n\t\t\t\tname: 'seconds',\n\t\t\t\tkind: 'scalar',\n\t\t\t\tT: 3 /*ScalarType.INT64*/,\n\t\t\t\tL: 0 /*LongType.BIGINT*/,\n\t\t\t},\n\t\t\t{ no: 2, name: 'nanos', kind: 'scalar', T: 5 /*ScalarType.INT32*/ },\n\t\t]);\n\t}\n\t/**\n\t * Creates a new `Timestamp` for the current time.\n\t */\n\tnow(): Timestamp {\n\t\tconst msg = this.create();\n\t\tconst ms = Date.now();\n\t\tmsg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();\n\t\tmsg.nanos = (ms % 1000) * 1000000;\n\t\treturn msg;\n\t}\n\t/**\n\t * Converts a `Timestamp` to a JavaScript Date.\n\t */\n\ttoDate(message: Timestamp): Date {\n\t\treturn new Date(\n\t\t\tPbLong.from(message.seconds).toNumber() * 1000 + Math.ceil(message.nanos / 1000000),\n\t\t);\n\t}\n\t/**\n\t * Converts a JavaScript Date to a `Timestamp`.\n\t */\n\tfromDate(date: Date): Timestamp {\n\t\tconst msg = this.create();\n\t\tconst ms = date.getTime();\n\t\tmsg.seconds = PbLong.from(Math.floor(ms / 1000)).toBigInt();\n\t\tmsg.nanos = ((ms % 1000) + (ms < 0 && ms % 1000 !== 0 ? 1000 : 0)) * 1000000;\n\t\treturn msg;\n\t}\n\t/**\n\t * In JSON format, the `Timestamp` type is encoded as a string\n\t * in the RFC 3339 format.\n\t */\n\tinternalJsonWrite(message: Timestamp, options: JsonWriteOptions): JsonValue {\n\t\tlet ms = PbLong.from(message.seconds).toNumber() * 1000;\n\t\tif (ms < Date.parse('0001-01-01T00:00:00Z') || ms > Date.parse('9999-12-31T23:59:59Z'))\n\t\t\tthrow new Error(\n\t\t\t\t'Unable to encode Timestamp to JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.',\n\t\t\t);\n\t\tif (message.nanos < 0)\n\t\t\tthrow new Error('Unable to encode invalid Timestamp to JSON. Nanos must not be negative.');\n\t\tlet z = 'Z';\n\t\tif (message.nanos > 0) {\n\t\t\tlet nanosStr = (message.nanos + 1000000000).toString().substring(1);\n\t\t\tif (nanosStr.substring(3) === '000000') z = '.' + nanosStr.substring(0, 3) + 'Z';\n\t\t\telse if (nanosStr.substring(6) === '000') z = '.' + nanosStr.substring(0, 6) + 'Z';\n\t\t\telse z = '.' + nanosStr + 'Z';\n\t\t}\n\t\treturn new Date(ms).toISOString().replace('.000Z', z);\n\t}\n\t/**\n\t * In JSON format, the `Timestamp` type is encoded as a string\n\t * in the RFC 3339 format.\n\t */\n\tinternalJsonRead(json: JsonValue, options: JsonReadOptions, target?: Timestamp): Timestamp {\n\t\tif (typeof json !== 'string')\n\t\t\tthrow new Error('Unable to parse Timestamp from JSON ' + typeofJsonValue(json) + '.');\n\t\tlet matches = json.match(\n\t\t\t/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/,\n\t\t);\n\t\tif (!matches) throw new Error('Unable to parse Timestamp from JSON. Invalid format.');\n\t\tlet ms = Date.parse(\n\t\t\tmatches[1] +\n\t\t\t\t'-' +\n\t\t\t\tmatches[2] +\n\t\t\t\t'-' +\n\t\t\t\tmatches[3] +\n\t\t\t\t'T' +\n\t\t\t\tmatches[4] +\n\t\t\t\t':' +\n\t\t\t\tmatches[5] +\n\t\t\t\t':' +\n\t\t\t\tmatches[6] +\n\t\t\t\t(matches[8] ? matches[8] : 'Z'),\n\t\t);\n\t\tif (Number.isNaN(ms)) throw new Error('Unable to parse Timestamp from JSON. Invalid value.');\n\t\tif (ms < Date.parse('0001-01-01T00:00:00Z') || ms > Date.parse('9999-12-31T23:59:59Z'))\n\t\t\tthrow new globalThis.Error(\n\t\t\t\t'Unable to parse Timestamp from JSON. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.',\n\t\t\t);\n\t\tif (!target) target = this.create();\n\t\ttarget.seconds = PbLong.from(ms / 1000).toBigInt();\n\t\ttarget.nanos = 0;\n\t\tif (matches[7])\n\t\t\ttarget.nanos = parseInt('1' + matches[7] + '0'.repeat(9 - matches[7].length)) - 1000000000;\n\t\treturn target;\n\t}\n}\n/**\n * @generated MessageType for protobuf message google.protobuf.Timestamp\n */\nexport const Timestamp = new Timestamp$Type();\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCA,qBAAgC;AAIhC,IAAAA,kBAAuB;AACvB,IAAAA,kBAA4B;AAiH5B,MAAM,uBAAuB,4BAAuB;AAAA,EACnD,cAAc;AACb,UAAM,6BAA6B;AAAA,MAClC;AAAA,QACC,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,MAAM;AAAA,QACN,GAAG;AAAA,QACH,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,QAAE,IAAI;AAAA,QAAG,MAAM;AAAA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MessageType } from "@protobuf-ts/runtime";
2
- import { Duration } from "../protobuf/duration";
1
+ import { MessageType } from '@protobuf-ts/runtime';
2
+ import { Duration } from '../protobuf/duration.js';
3
3
  /**
4
4
  * Describes the cause of the error with structured details.
5
5
  *