@mysten/sui 2.39.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/CHANGELOG.md +160 -0
  2. package/README.md +5 -188
  3. package/dist/bcs/bcs.d.mts +6 -6
  4. package/dist/bcs/bcs.d.mts.map +1 -1
  5. package/dist/bcs/bcs.mjs +49 -22
  6. package/dist/bcs/bcs.mjs.map +1 -1
  7. package/dist/bcs/effects.mjs +49 -20
  8. package/dist/bcs/effects.mjs.map +1 -1
  9. package/dist/bcs/index.d.mts +1441 -624
  10. package/dist/bcs/index.d.mts.map +1 -1
  11. package/dist/bcs/index.mjs +2 -1
  12. package/dist/bcs/index.mjs.map +1 -1
  13. package/dist/bcs/transactions.d.mts +1059 -0
  14. package/dist/bcs/transactions.d.mts.map +1 -0
  15. package/dist/bcs/transactions.mjs +33 -14
  16. package/dist/bcs/transactions.mjs.map +1 -1
  17. package/dist/bcs/types.d.mts +6 -1
  18. package/dist/bcs/types.d.mts.map +1 -1
  19. package/dist/client/core-resolver.mjs +4 -4
  20. package/dist/client/core-resolver.mjs.map +1 -1
  21. package/dist/client/core.d.mts +55 -4
  22. package/dist/client/core.d.mts.map +1 -1
  23. package/dist/client/core.mjs +98 -1
  24. package/dist/client/core.mjs.map +1 -1
  25. package/dist/client/errors.mjs +11 -1
  26. package/dist/client/errors.mjs.map +1 -1
  27. package/dist/client/index.d.mts +4 -2
  28. package/dist/client/index.mjs +5 -2
  29. package/dist/client/mvr.d.mts +12 -2
  30. package/dist/client/mvr.d.mts.map +1 -1
  31. package/dist/client/mvr.mjs +34 -13
  32. package/dist/client/mvr.mjs.map +1 -1
  33. package/dist/client/query-filters.mjs +80 -76
  34. package/dist/client/query-filters.mjs.map +1 -1
  35. package/dist/client/stream/adapter.d.mts +102 -0
  36. package/dist/client/stream/adapter.d.mts.map +1 -0
  37. package/dist/client/stream/errors.d.mts +14 -0
  38. package/dist/client/stream/errors.d.mts.map +1 -0
  39. package/dist/client/stream/errors.mjs +25 -0
  40. package/dist/client/stream/errors.mjs.map +1 -0
  41. package/dist/client/stream/filter.mjs +18 -0
  42. package/dist/client/stream/filter.mjs.map +1 -0
  43. package/dist/client/stream/follow.mjs +48 -0
  44. package/dist/client/stream/follow.mjs.map +1 -0
  45. package/dist/client/stream/index.d.mts +4 -0
  46. package/dist/client/stream/pager.mjs +123 -0
  47. package/dist/client/stream/pager.mjs.map +1 -0
  48. package/dist/client/stream/plan.mjs +79 -0
  49. package/dist/client/stream/plan.mjs.map +1 -0
  50. package/dist/client/stream/position.d.mts +30 -0
  51. package/dist/client/stream/position.d.mts.map +1 -0
  52. package/dist/client/stream/position.mjs +121 -0
  53. package/dist/client/stream/position.mjs.map +1 -0
  54. package/dist/client/stream/run.d.mts +2 -0
  55. package/dist/client/stream/run.mjs +99 -0
  56. package/dist/client/stream/run.mjs.map +1 -0
  57. package/dist/client/stream/session.mjs +205 -0
  58. package/dist/client/stream/session.mjs.map +1 -0
  59. package/dist/client/stream/status.mjs +47 -0
  60. package/dist/client/stream/status.mjs.map +1 -0
  61. package/dist/client/stream/token.mjs +80 -0
  62. package/dist/client/stream/token.mjs.map +1 -0
  63. package/dist/client/transaction-data.d.mts +12 -0
  64. package/dist/client/transaction-data.d.mts.map +1 -0
  65. package/dist/client/transaction-data.mjs +469 -0
  66. package/dist/client/transaction-data.mjs.map +1 -0
  67. package/dist/client/transaction-resolver.mjs +102 -58
  68. package/dist/client/transaction-resolver.mjs.map +1 -1
  69. package/dist/client/types.d.mts +560 -240
  70. package/dist/client/types.d.mts.map +1 -1
  71. package/dist/client/utils.d.mts +3 -1
  72. package/dist/client/utils.d.mts.map +1 -1
  73. package/dist/client/utils.mjs +91 -26
  74. package/dist/client/utils.mjs.map +1 -1
  75. package/dist/cryptography/index.d.mts +1 -1
  76. package/dist/cryptography/keypair.d.mts +1 -1
  77. package/dist/cryptography/publickey.d.mts +11 -0
  78. package/dist/cryptography/publickey.d.mts.map +1 -1
  79. package/dist/cryptography/publickey.mjs +12 -1
  80. package/dist/cryptography/publickey.mjs.map +1 -1
  81. package/dist/cryptography/signature.d.mts +2 -2
  82. package/dist/cryptography/signature.mjs +18 -7
  83. package/dist/cryptography/signature.mjs.map +1 -1
  84. package/dist/graphql/client.d.mts +51 -35
  85. package/dist/graphql/client.d.mts.map +1 -1
  86. package/dist/graphql/client.mjs +125 -69
  87. package/dist/graphql/client.mjs.map +1 -1
  88. package/dist/graphql/core.d.mts +14 -9
  89. package/dist/graphql/core.d.mts.map +1 -1
  90. package/dist/graphql/core.mjs +293 -117
  91. package/dist/graphql/core.mjs.map +1 -1
  92. package/dist/graphql/errors.d.mts +20 -0
  93. package/dist/graphql/errors.d.mts.map +1 -0
  94. package/dist/graphql/errors.mjs +19 -0
  95. package/dist/graphql/errors.mjs.map +1 -0
  96. package/dist/graphql/filters.mjs +32 -0
  97. package/dist/graphql/filters.mjs.map +1 -0
  98. package/dist/graphql/generated/queries.d.mts.map +1 -1
  99. package/dist/graphql/generated/queries.mjs +1216 -208
  100. package/dist/graphql/generated/queries.mjs.map +1 -1
  101. package/dist/graphql/generated/tada-env.d.mts +820 -11
  102. package/dist/graphql/index.d.mts +2 -1
  103. package/dist/graphql/index.mjs +2 -1
  104. package/dist/graphql/sse-parser.mjs +82 -0
  105. package/dist/graphql/sse-parser.mjs.map +1 -0
  106. package/dist/graphql/stream/families.mjs +306 -0
  107. package/dist/graphql/stream/families.mjs.map +1 -0
  108. package/dist/graphql/stream/index.mjs +38 -0
  109. package/dist/graphql/stream/index.mjs.map +1 -0
  110. package/dist/graphql/stream/live.mjs +60 -0
  111. package/dist/graphql/stream/live.mjs.map +1 -0
  112. package/dist/graphql/stream/page.mjs +38 -0
  113. package/dist/graphql/stream/page.mjs.map +1 -0
  114. package/dist/graphql/stream/query.mjs +47 -0
  115. package/dist/graphql/stream/query.mjs.map +1 -0
  116. package/dist/graphql/subscribe.mjs +70 -0
  117. package/dist/graphql/subscribe.mjs.map +1 -0
  118. package/dist/grpc/client.d.mts +31 -27
  119. package/dist/grpc/client.d.mts.map +1 -1
  120. package/dist/grpc/client.mjs +42 -46
  121. package/dist/grpc/client.mjs.map +1 -1
  122. package/dist/grpc/core.d.mts +13 -6
  123. package/dist/grpc/core.d.mts.map +1 -1
  124. package/dist/grpc/core.mjs +254 -166
  125. package/dist/grpc/core.mjs.map +1 -1
  126. package/dist/grpc/filters.mjs +44 -34
  127. package/dist/grpc/filters.mjs.map +1 -1
  128. package/dist/grpc/grpc-web-pull.mjs +245 -0
  129. package/dist/grpc/grpc-web-pull.mjs.map +1 -0
  130. package/dist/grpc/index.d.mts +2 -1
  131. package/dist/grpc/index.mjs +1 -1
  132. package/dist/grpc/network-error.mjs +31 -0
  133. package/dist/grpc/network-error.mjs.map +1 -0
  134. package/dist/grpc/proto/google/rpc/error_details.mjs +306 -0
  135. package/dist/grpc/proto/google/rpc/error_details.mjs.map +1 -0
  136. package/dist/grpc/proto/sui/rpc/v2/error_reason.d.mts +176 -1
  137. package/dist/grpc/proto/sui/rpc/v2/error_reason.d.mts.map +1 -1
  138. package/dist/grpc/proto/sui/rpc/v2/error_reason.mjs +175 -0
  139. package/dist/grpc/proto/sui/rpc/v2/error_reason.mjs.map +1 -1
  140. package/dist/grpc/proto/sui/rpc/v2/executed_transaction.d.mts +2 -2
  141. package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts +4 -4
  142. package/dist/grpc/proto/sui/rpc/v2/ledger_service.d.mts +111 -0
  143. package/dist/grpc/proto/sui/rpc/v2/ledger_service.d.mts.map +1 -1
  144. package/dist/grpc/proto/sui/rpc/v2/ledger_service.mjs +46 -0
  145. package/dist/grpc/proto/sui/rpc/v2/ledger_service.mjs.map +1 -1
  146. package/dist/grpc/proto/sui/rpc/v2/move_package_service.client.d.mts +4 -4
  147. package/dist/grpc/proto/sui/rpc/v2/move_package_service.d.mts +24 -1
  148. package/dist/grpc/proto/sui/rpc/v2/move_package_service.d.mts.map +1 -1
  149. package/dist/grpc/proto/sui/rpc/v2/move_package_service.mjs +25 -7
  150. package/dist/grpc/proto/sui/rpc/v2/move_package_service.mjs.map +1 -1
  151. package/dist/grpc/proto/sui/rpc/v2/object.mjs +1 -1
  152. package/dist/grpc/proto/sui/rpc/v2/query_options.d.mts +111 -9
  153. package/dist/grpc/proto/sui/rpc/v2/query_options.d.mts.map +1 -1
  154. package/dist/grpc/proto/sui/rpc/v2/query_options.mjs +63 -19
  155. package/dist/grpc/proto/sui/rpc/v2/query_options.mjs.map +1 -1
  156. package/dist/grpc/proto/sui/rpc/v2/signature.d.mts +5 -5
  157. package/dist/grpc/proto/sui/rpc/v2/signature.mjs.map +1 -1
  158. package/dist/grpc/proto/sui/rpc/v2/signature_scheme.d.mts +5 -1
  159. package/dist/grpc/proto/sui/rpc/v2/signature_scheme.d.mts.map +1 -1
  160. package/dist/grpc/proto/sui/rpc/v2/signature_scheme.mjs +4 -0
  161. package/dist/grpc/proto/sui/rpc/v2/signature_scheme.mjs.map +1 -1
  162. package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.mts +4 -4
  163. package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.d.mts +20 -1
  164. package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.d.mts.map +1 -1
  165. package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.mjs +30 -13
  166. package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.mjs.map +1 -1
  167. package/dist/grpc/proto/sui/rpc/v2/state_service.client.d.mts +4 -4
  168. package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.d.mts +16 -10
  169. package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.d.mts.map +1 -1
  170. package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.mjs +8 -5
  171. package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.mjs.map +1 -1
  172. package/dist/grpc/proto/sui/rpc/v2/transaction.d.mts +11 -5
  173. package/dist/grpc/proto/sui/rpc/v2/transaction.d.mts.map +1 -1
  174. package/dist/grpc/proto/sui/rpc/v2/transaction.mjs +6 -0
  175. package/dist/grpc/proto/sui/rpc/v2/transaction.mjs.map +1 -1
  176. package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.d.mts +6 -2
  177. package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.d.mts.map +1 -1
  178. package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.mjs.map +1 -1
  179. package/dist/grpc/proto/types.d.mts +7 -7
  180. package/dist/grpc/proto/types.mjs +3 -2
  181. package/dist/grpc/pull-call.d.mts +20 -0
  182. package/dist/grpc/pull-call.d.mts.map +1 -0
  183. package/dist/grpc/pull-call.mjs +28 -0
  184. package/dist/grpc/pull-call.mjs.map +1 -0
  185. package/dist/grpc/stream/call.mjs +238 -0
  186. package/dist/grpc/stream/call.mjs.map +1 -0
  187. package/dist/grpc/stream/families.d.mts +26 -0
  188. package/dist/grpc/stream/families.d.mts.map +1 -0
  189. package/dist/grpc/stream/families.mjs +145 -0
  190. package/dist/grpc/stream/families.mjs.map +1 -0
  191. package/dist/grpc/stream/index.d.mts +41 -0
  192. package/dist/grpc/stream/index.d.mts.map +1 -0
  193. package/dist/grpc/stream/index.mjs +127 -0
  194. package/dist/grpc/stream/index.mjs.map +1 -0
  195. package/dist/grpc/stream/live.mjs +31 -0
  196. package/dist/grpc/stream/live.mjs.map +1 -0
  197. package/dist/grpc/stream/page.mjs +120 -0
  198. package/dist/grpc/stream/page.mjs.map +1 -0
  199. package/dist/grpc/stream-types.d.mts +28 -0
  200. package/dist/grpc/stream-types.d.mts.map +1 -0
  201. package/dist/grpc/transport.d.mts +8 -3
  202. package/dist/grpc/transport.d.mts.map +1 -1
  203. package/dist/grpc/transport.mjs +88 -45
  204. package/dist/grpc/transport.mjs.map +1 -1
  205. package/dist/jsonRpc/index.d.mts +34 -12
  206. package/dist/jsonRpc/index.d.mts.map +1 -0
  207. package/dist/jsonRpc/index.mjs +39 -5
  208. package/dist/jsonRpc/index.mjs.map +1 -0
  209. package/dist/jsonRpc/types.d.mts +420 -0
  210. package/dist/jsonRpc/types.d.mts.map +1 -0
  211. package/dist/keypairs/passkey/keypair.d.mts +1 -1
  212. package/dist/multisig/publickey.d.mts +12 -4
  213. package/dist/multisig/publickey.d.mts.map +1 -1
  214. package/dist/multisig/publickey.mjs +5 -5
  215. package/dist/multisig/publickey.mjs.map +1 -1
  216. package/dist/multisig/signer.d.mts +1 -1
  217. package/dist/transactions/ObjectCache.d.mts +1 -1
  218. package/dist/transactions/ObjectCache.mjs +5 -5
  219. package/dist/transactions/ObjectCache.mjs.map +1 -1
  220. package/dist/transactions/Transaction.d.mts +11 -10
  221. package/dist/transactions/Transaction.d.mts.map +1 -1
  222. package/dist/transactions/Transaction.mjs +17 -6
  223. package/dist/transactions/Transaction.mjs.map +1 -1
  224. package/dist/transactions/data/internal.d.mts +135 -133
  225. package/dist/transactions/data/internal.d.mts.map +1 -1
  226. package/dist/transactions/data/internal.mjs +2 -1
  227. package/dist/transactions/data/internal.mjs.map +1 -1
  228. package/dist/transactions/data/v1.d.mts +239 -239
  229. package/dist/transactions/data/v1.d.mts.map +1 -1
  230. package/dist/transactions/data/v2.d.mts +16 -16
  231. package/dist/transactions/data/v2.d.mts.map +1 -1
  232. package/dist/transactions/executor/parallel.d.mts +2 -2
  233. package/dist/transactions/executor/serial.d.mts +1 -1
  234. package/dist/transactions/executor/serial.mjs +2 -2
  235. package/dist/transactions/executor/serial.mjs.map +1 -1
  236. package/dist/transactions/index.d.mts +3 -2
  237. package/dist/transactions/index.mjs +4 -3
  238. package/dist/transactions/intents/AllowanceBalance.mjs +1 -1
  239. package/dist/transactions/intents/CoinWithBalance.mjs +1 -1
  240. package/dist/transactions/resolve.d.mts +6 -0
  241. package/dist/transactions/resolve.d.mts.map +1 -1
  242. package/dist/transactions/resolve.mjs.map +1 -1
  243. package/dist/transactions/restricted-move-calls.d.mts +25 -0
  244. package/dist/transactions/restricted-move-calls.d.mts.map +1 -0
  245. package/dist/transactions/restricted-move-calls.mjs +47 -0
  246. package/dist/transactions/restricted-move-calls.mjs.map +1 -0
  247. package/dist/transactions/serializer.d.mts +1 -4
  248. package/dist/transactions/serializer.d.mts.map +1 -1
  249. package/dist/transactions/serializer.mjs +1 -44
  250. package/dist/transactions/serializer.mjs.map +1 -1
  251. package/dist/transactions/utils.d.mts +0 -1
  252. package/dist/transactions/utils.d.mts.map +1 -1
  253. package/dist/transactions/utils.mjs.map +1 -1
  254. package/dist/utils/abort.mjs +89 -0
  255. package/dist/utils/abort.mjs.map +1 -0
  256. package/dist/utils/coin-reservation.mjs +1 -4
  257. package/dist/utils/coin-reservation.mjs.map +1 -1
  258. package/dist/utils/index.mjs +1 -1
  259. package/dist/utils/sui-types.mjs +1 -1
  260. package/dist/verify/index.d.mts +2 -2
  261. package/dist/verify/verify.d.mts +74 -24
  262. package/dist/verify/verify.d.mts.map +1 -1
  263. package/dist/verify/verify.mjs +128 -42
  264. package/dist/verify/verify.mjs.map +1 -1
  265. package/dist/version.mjs +1 -1
  266. package/dist/version.mjs.map +1 -1
  267. package/dist/zklogin/bcs.d.mts +14 -14
  268. package/dist/zklogin/publickey.d.mts.map +1 -1
  269. package/dist/zklogin/publickey.mjs +15 -20
  270. package/dist/zklogin/publickey.mjs.map +1 -1
  271. package/docs/bcs.md +2 -2
  272. package/docs/clients/core.md +19 -18
  273. package/docs/clients/executing.md +53 -8
  274. package/docs/clients/graphql.md +81 -11
  275. package/docs/clients/grpc.md +31 -15
  276. package/docs/clients/index.md +8 -7
  277. package/docs/clients/querying.md +134 -30
  278. package/docs/clients/streaming.md +324 -0
  279. package/docs/cryptography/index.md +85 -58
  280. package/docs/llms-index.md +4 -2
  281. package/docs/migrations/sui-2.0/dapp-kit.md +3 -2
  282. package/docs/migrations/sui-2.0/json-rpc-migration.md +106 -79
  283. package/docs/migrations/sui-3.0/index.md +250 -0
  284. package/docs/plugins.md +10 -10
  285. package/docs/sdk-building.md +3 -4
  286. package/docs/transactions/coins-and-balances.md +6 -11
  287. package/docs/transactions/reference.md +36 -1
  288. package/package.json +2 -3
  289. package/src/bcs/bcs.ts +80 -41
  290. package/src/bcs/effects.ts +61 -25
  291. package/src/bcs/index.ts +2 -0
  292. package/src/bcs/transactions.ts +36 -17
  293. package/src/bcs/types.ts +10 -4
  294. package/src/client/core-resolver.ts +3 -5
  295. package/src/client/core.ts +180 -8
  296. package/src/client/errors.ts +12 -0
  297. package/src/client/index.ts +4 -1
  298. package/src/client/mvr.ts +37 -10
  299. package/src/client/query-filters.ts +151 -97
  300. package/src/client/stream/adapter.ts +110 -0
  301. package/src/client/stream/errors.ts +40 -0
  302. package/src/client/stream/filter.ts +17 -0
  303. package/src/client/stream/follow.ts +63 -0
  304. package/src/client/stream/index.ts +9 -0
  305. package/src/client/stream/pager.ts +158 -0
  306. package/src/client/stream/plan.ts +147 -0
  307. package/src/client/stream/position.ts +143 -0
  308. package/src/client/stream/run.ts +147 -0
  309. package/src/client/stream/session.ts +259 -0
  310. package/src/client/stream/status.ts +44 -0
  311. package/src/client/stream/token.ts +104 -0
  312. package/src/client/transaction-data.ts +587 -0
  313. package/src/client/transaction-resolver.ts +158 -69
  314. package/src/client/types.ts +530 -115
  315. package/src/client/utils.ts +147 -50
  316. package/src/cryptography/publickey.ts +12 -1
  317. package/src/cryptography/signature.ts +6 -3
  318. package/src/graphql/client.ts +204 -135
  319. package/src/graphql/core.ts +446 -139
  320. package/src/graphql/errors.ts +24 -0
  321. package/src/graphql/filters.ts +48 -0
  322. package/src/graphql/generated/queries.ts +1455 -277
  323. package/src/graphql/generated/schema.graphql +282 -9
  324. package/src/graphql/generated/tada-env.ts +933 -4
  325. package/src/graphql/queries/checkpoints.graphql +34 -0
  326. package/src/graphql/queries/getDynamicFields.graphql +1 -0
  327. package/src/graphql/queries/listEvents.graphql +16 -24
  328. package/src/graphql/queries/streams.graphql +212 -0
  329. package/src/graphql/queries/transactions.graphql +71 -28
  330. package/src/graphql/queries/verifySignature.graphql +17 -0
  331. package/src/graphql/sse-parser.ts +99 -0
  332. package/src/graphql/stream/families.ts +515 -0
  333. package/src/graphql/stream/index.ts +55 -0
  334. package/src/graphql/stream/live.ts +70 -0
  335. package/src/graphql/stream/page.ts +47 -0
  336. package/src/graphql/stream/query.ts +52 -0
  337. package/src/graphql/subscribe.ts +83 -0
  338. package/src/grpc/client.ts +81 -79
  339. package/src/grpc/core.ts +388 -274
  340. package/src/grpc/filters.ts +59 -60
  341. package/src/grpc/grpc-web-pull.ts +360 -0
  342. package/src/grpc/index.ts +5 -0
  343. package/src/grpc/network-error.ts +33 -0
  344. package/src/grpc/proto/sui/rpc/v2/error_reason.ts +175 -0
  345. package/src/grpc/proto/sui/rpc/v2/ledger_service.ts +145 -0
  346. package/src/grpc/proto/sui/rpc/v2/move_package_service.ts +43 -1
  347. package/src/grpc/proto/sui/rpc/v2/query_options.ts +132 -8
  348. package/src/grpc/proto/sui/rpc/v2/signature.ts +4 -4
  349. package/src/grpc/proto/sui/rpc/v2/signature_scheme.ts +4 -0
  350. package/src/grpc/proto/sui/rpc/v2/signature_verification_service.ts +30 -0
  351. package/src/grpc/proto/sui/rpc/v2/subscription_service.client.ts +16 -10
  352. package/src/grpc/proto/sui/rpc/v2/transaction.ts +6 -0
  353. package/src/grpc/proto/sui/rpc/v2/transaction_execution_service.ts +5 -1
  354. package/src/grpc/pull-call.ts +54 -0
  355. package/src/grpc/stream/call.ts +317 -0
  356. package/src/grpc/stream/families.ts +228 -0
  357. package/src/grpc/stream/index.ts +182 -0
  358. package/src/grpc/stream/live.ts +33 -0
  359. package/src/grpc/stream/page.ts +161 -0
  360. package/src/grpc/stream-types.ts +33 -0
  361. package/src/grpc/transport.ts +116 -59
  362. package/src/jsonRpc/index.ts +60 -17
  363. package/src/jsonRpc/types.ts +421 -0
  364. package/src/multisig/publickey.ts +19 -7
  365. package/src/transactions/ObjectCache.ts +6 -6
  366. package/src/transactions/Transaction.ts +30 -6
  367. package/src/transactions/data/internal.ts +2 -0
  368. package/src/transactions/executor/serial.ts +2 -2
  369. package/src/transactions/index.ts +8 -1
  370. package/src/transactions/resolve.ts +6 -0
  371. package/src/transactions/restricted-move-calls.ts +87 -0
  372. package/src/transactions/serializer.ts +0 -70
  373. package/src/transactions/utils.ts +0 -37
  374. package/src/utils/abort.ts +101 -0
  375. package/src/verify/index.ts +1 -0
  376. package/src/verify/verify.ts +190 -62
  377. package/src/version.ts +1 -1
  378. package/src/zklogin/publickey.ts +18 -34
  379. package/dist/client/core-resolver.d.mts +0 -9
  380. package/dist/client/core-resolver.d.mts.map +0 -1
  381. package/dist/jsonRpc/client.d.mts +0 -507
  382. package/dist/jsonRpc/client.d.mts.map +0 -1
  383. package/dist/jsonRpc/client.mjs +0 -868
  384. package/dist/jsonRpc/client.mjs.map +0 -1
  385. package/dist/jsonRpc/core.d.mts +0 -168
  386. package/dist/jsonRpc/core.d.mts.map +0 -1
  387. package/dist/jsonRpc/core.mjs +0 -1054
  388. package/dist/jsonRpc/core.mjs.map +0 -1
  389. package/dist/jsonRpc/errors.d.mts +0 -27
  390. package/dist/jsonRpc/errors.d.mts.map +0 -1
  391. package/dist/jsonRpc/errors.mjs +0 -50
  392. package/dist/jsonRpc/errors.mjs.map +0 -1
  393. package/dist/jsonRpc/http-transport.d.mts +0 -62
  394. package/dist/jsonRpc/http-transport.d.mts.map +0 -1
  395. package/dist/jsonRpc/http-transport.mjs +0 -60
  396. package/dist/jsonRpc/http-transport.mjs.map +0 -1
  397. package/dist/jsonRpc/network.d.mts +0 -9
  398. package/dist/jsonRpc/network.d.mts.map +0 -1
  399. package/dist/jsonRpc/network.mjs +0 -18
  400. package/dist/jsonRpc/network.mjs.map +0 -1
  401. package/dist/jsonRpc/types/chain.d.mts +0 -169
  402. package/dist/jsonRpc/types/chain.d.mts.map +0 -1
  403. package/dist/jsonRpc/types/changes.d.mts +0 -48
  404. package/dist/jsonRpc/types/changes.d.mts.map +0 -1
  405. package/dist/jsonRpc/types/coins.d.mts +0 -15
  406. package/dist/jsonRpc/types/coins.d.mts.map +0 -1
  407. package/dist/jsonRpc/types/common.d.mts +0 -9
  408. package/dist/jsonRpc/types/common.d.mts.map +0 -1
  409. package/dist/jsonRpc/types/generated.d.mts +0 -1976
  410. package/dist/jsonRpc/types/generated.d.mts.map +0 -1
  411. package/dist/jsonRpc/types/index.d.mts +0 -6
  412. package/dist/jsonRpc/types/params.d.mts +0 -898
  413. package/dist/jsonRpc/types/params.d.mts.map +0 -1
  414. package/src/graphql/generated/tsconfig.tada.json +0 -11
  415. package/src/graphql/queries/verifyZkLoginSignature.graphql +0 -15
  416. package/src/jsonRpc/client.ts +0 -1252
  417. package/src/jsonRpc/core.ts +0 -1557
  418. package/src/jsonRpc/errors.ts +0 -57
  419. package/src/jsonRpc/http-transport.ts +0 -118
  420. package/src/jsonRpc/network.ts +0 -21
  421. package/src/jsonRpc/types/chain.ts +0 -190
  422. package/src/jsonRpc/types/changes.ts +0 -35
  423. package/src/jsonRpc/types/coins.ts +0 -14
  424. package/src/jsonRpc/types/common.ts +0 -8
  425. package/src/jsonRpc/types/generated.ts +0 -2165
  426. package/src/jsonRpc/types/index.ts +0 -9
  427. package/src/jsonRpc/types/params.ts +0 -908
@@ -1,2165 +0,0 @@
1
- // Copyright (c) Mysten Labs, Inc.
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- /**
5
- * ######################################
6
- * ### DO NOT EDIT THIS FILE DIRECTLY ###
7
- * ######################################
8
- *
9
- * This file is generated from:
10
- * /crates/sui-open-rpc/spec/openrpc.json
11
- */
12
-
13
- /**
14
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
15
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
16
- */
17
- export interface AccumulatorEvent {
18
- accumulatorObj: string;
19
- address: string;
20
- operation: AccumulatorOperation;
21
- ty: string;
22
- value: AccumulatorValue;
23
- }
24
- /**
25
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
26
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
27
- */
28
- export type AccumulatorOperation = 'merge' | 'split';
29
- /**
30
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
31
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
32
- */
33
- export type AccumulatorValue =
34
- | {
35
- integer: string;
36
- }
37
- | {
38
- integerTuple: [string, string];
39
- }
40
- | {
41
- eventDigest: [string, string][];
42
- };
43
- /**
44
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
45
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
46
- */
47
- export interface Balance {
48
- coinObjectCount: number;
49
- coinType: string;
50
- /**
51
- * The portion of `total_balance` that resides in the address balance rather than in the coin objects.
52
- * `total_balance` is the total amount of funds owned by the address. That is, do not add these two
53
- * fields together.
54
- */
55
- fundsInAddressBalance?: string;
56
- lockedBalance: {
57
- [key: string]: string;
58
- };
59
- totalBalance: string;
60
- }
61
- /**
62
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
63
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
64
- */
65
- export interface BalanceChange {
66
- /**
67
- * The amount indicate the balance value changes, negative amount means spending coin value and
68
- * positive means receiving coin value.
69
- */
70
- amount: string;
71
- coinType: string;
72
- /** Owner of the balance change */
73
- owner: ObjectOwner;
74
- }
75
- /**
76
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
77
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
78
- */
79
- export interface Checkpoint {
80
- /** Commitments to checkpoint state */
81
- checkpointCommitments: CheckpointCommitment[];
82
- /** Checkpoint digest */
83
- digest: string;
84
- /** Present only on the final checkpoint of the epoch. */
85
- endOfEpochData?: EndOfEpochData | null;
86
- /** Checkpoint's epoch ID */
87
- epoch: string;
88
- /**
89
- * The running total gas costs of all transactions included in the current epoch so far until this
90
- * checkpoint.
91
- */
92
- epochRollingGasCostSummary: GasCostSummary;
93
- /** Total number of transactions committed since genesis, including those in this checkpoint. */
94
- networkTotalTransactions: string;
95
- /** Digest of the previous checkpoint */
96
- previousDigest?: string | null;
97
- /** Checkpoint sequence number */
98
- sequenceNumber: string;
99
- /**
100
- * Timestamp of the checkpoint - number of milliseconds from the Unix epoch Checkpoint timestamps are
101
- * monotonic, but not strongly monotonic - subsequent checkpoints can have same timestamp if they
102
- * originate from the same underlining consensus commit
103
- */
104
- timestampMs: string;
105
- /** Transaction digests */
106
- transactions: string[];
107
- /** Validator Signature */
108
- validatorSignature: string;
109
- }
110
- /**
111
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
112
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
113
- */
114
- export type CheckpointCommitment =
115
- | {
116
- ECMHLiveObjectSetDigest: ECMHLiveObjectSetDigest;
117
- }
118
- | {
119
- CheckpointArtifactsDigest: string;
120
- };
121
- /**
122
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
123
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
124
- */
125
- export type CheckpointId = string | string;
126
- /**
127
- * A claim consists of value and index_mod_4.
128
- *
129
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
130
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
131
- */
132
- export interface Claim {
133
- indexMod4: number;
134
- value: string;
135
- }
136
- /**
137
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
138
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
139
- */
140
- export interface CoinStruct {
141
- balance: string;
142
- coinObjectId: string;
143
- coinType: string;
144
- digest: string;
145
- previousTransaction: string;
146
- version: string;
147
- }
148
- /**
149
- * RPC representation of the [Committee] type.
150
- *
151
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
152
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
153
- */
154
- export interface CommitteeInfo {
155
- epoch: string;
156
- validators: [string, string][];
157
- }
158
- /**
159
- * Unlike [enum Signature], [enum CompressedSignature] does not contain public key.
160
- *
161
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
162
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
163
- */
164
- export type CompressedSignature =
165
- | {
166
- Ed25519: string;
167
- }
168
- | {
169
- Secp256k1: string;
170
- }
171
- | {
172
- Secp256r1: string;
173
- }
174
- | {
175
- ZkLogin: string;
176
- }
177
- | {
178
- Passkey: string;
179
- };
180
- /**
181
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
182
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
183
- */
184
- export type ConsensusDeterminedVersionAssignments =
185
- | {
186
- CancelledTransactions: [string, [string, string][]][];
187
- }
188
- | {
189
- CancelledTransactionsV2: [string, [[string, string], string][]][];
190
- };
191
- /**
192
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
193
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
194
- */
195
- export type SuiParsedData =
196
- | {
197
- dataType: 'moveObject';
198
- fields: MoveStruct;
199
- hasPublicTransfer: boolean;
200
- type: string;
201
- }
202
- | {
203
- dataType: 'package';
204
- disassembled: {
205
- [key: string]: unknown;
206
- };
207
- };
208
- /**
209
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
210
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
211
- */
212
- export interface DelegatedStake {
213
- stakes: StakeObject[];
214
- /** Staking pool object id. */
215
- stakingPool: string;
216
- /** Validator's Address. */
217
- validatorAddress: string;
218
- }
219
- /**
220
- * Additional rguments supplied to dev inspect beyond what is allowed in today's API.
221
- *
222
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
223
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
224
- */
225
- export interface DevInspectArgs {
226
- /** The gas budget for the transaction. */
227
- gasBudget?: string | null;
228
- /** The gas objects used to pay for the transaction. */
229
- gasObjects?: [string, string, string][] | null;
230
- /** The sponsor of the gas for the transaction, might be different from the sender. */
231
- gasSponsor?: string | null;
232
- /** Whether to return the raw transaction data and effects. */
233
- showRawTxnDataAndEffects?: boolean | null;
234
- /** Whether to skip transaction checks for the transaction. */
235
- skipChecks?: boolean | null;
236
- }
237
- /**
238
- * The response from processing a dev inspect transaction
239
- *
240
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
241
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
242
- */
243
- export interface DevInspectResults {
244
- /**
245
- * Summary of effects that likely would be generated if the transaction is actually run. Note however,
246
- * that not all dev-inspect transactions are actually usable as transactions so it might not be
247
- * possible actually generate these effects from a normal transaction.
248
- */
249
- effects: TransactionEffects;
250
- /** Execution error from executing the transactions */
251
- error?: string | null;
252
- /** Events that likely would be generated if the transaction is actually run. */
253
- events: SuiEvent[];
254
- /** The raw effects of the transaction that was dev inspected. */
255
- rawEffects?: number[];
256
- /** The raw transaction data that was dev inspected. */
257
- rawTxnData?: number[];
258
- /** Execution results (including return values) from executing the transactions */
259
- results?: SuiExecutionResult[] | null;
260
- }
261
- /**
262
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
263
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
264
- */
265
- export interface DisplayFieldsResponse {
266
- data?: {
267
- [key: string]: unknown;
268
- } | null;
269
- error?: ObjectResponseError | null;
270
- }
271
- /**
272
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
273
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
274
- */
275
- export interface DryRunTransactionBlockResponse {
276
- balanceChanges: BalanceChange[];
277
- effects: TransactionEffects;
278
- events: SuiEvent[];
279
- executionErrorSource?: string | null;
280
- input: TransactionBlockData;
281
- objectChanges: SuiObjectChange[];
282
- suggestedGasPrice?: string | null;
283
- }
284
- /**
285
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
286
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
287
- */
288
- export type DynamicFieldInfo =
289
- | {
290
- digest: string;
291
- name: DynamicFieldName;
292
- objectId: string;
293
- objectType: string;
294
- type: DynamicFieldType;
295
- version: string;
296
- bcsEncoding: 'base64';
297
- bcsName: string;
298
- }
299
- | {
300
- digest: string;
301
- name: DynamicFieldName;
302
- objectId: string;
303
- objectType: string;
304
- type: DynamicFieldType;
305
- version: string;
306
- bcsEncoding: 'base58';
307
- bcsName: string;
308
- };
309
- /**
310
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
311
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
312
- */
313
- export interface DynamicFieldName {
314
- type: string;
315
- value: unknown;
316
- }
317
- /**
318
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
319
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
320
- */
321
- export type DynamicFieldType = 'DynamicField' | 'DynamicObject';
322
- /**
323
- * The Sha256 digest of an EllipticCurveMultisetHash committing to the live object set.
324
- *
325
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
326
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
327
- */
328
- export interface ECMHLiveObjectSetDigest {
329
- digest: number[];
330
- }
331
- /**
332
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
333
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
334
- */
335
- export interface EndOfEpochData {
336
- /** Commitments to epoch specific state (e.g. live object set) */
337
- epochCommitments: CheckpointCommitment[];
338
- /**
339
- * next_epoch_committee is `Some` if and only if the current checkpoint is the last checkpoint of an
340
- * epoch. Therefore next_epoch_committee can be used to pick the last checkpoint of an epoch, which is
341
- * often useful to get epoch level summary stats like total gas cost of an epoch, or the total number
342
- * of transactions from genesis to the end of an epoch. The committee is stored as a vector of
343
- * validator pub key and stake pairs. The vector should be sorted based on the Committee data
344
- * structure.
345
- */
346
- nextEpochCommittee: [string, string][];
347
- /**
348
- * The protocol version that is in effect during the epoch that starts immediately after this
349
- * checkpoint.
350
- */
351
- nextEpochProtocolVersion: string;
352
- }
353
- /**
354
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
355
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
356
- */
357
- export type SuiEvent =
358
- | {
359
- /**
360
- * Sequential event ID, ie (transaction seq number, event seq number). 1) Serves as a unique event ID
361
- * for each fullnode 2) Also serves to sequence events for the purposes of pagination and querying. A
362
- * higher id is an event seen later by that fullnode. This ID is the "cursor" for event querying.
363
- */
364
- id: EventId;
365
- /** Move package where this event was emitted. */
366
- packageId: string;
367
- /** Parsed json value of the event */
368
- parsedJson: unknown;
369
- /** Sender's Sui address. */
370
- sender: string;
371
- /** UTC timestamp in milliseconds since epoch (1/1/1970) */
372
- timestampMs?: string | null;
373
- /** Move module where this event was emitted. */
374
- transactionModule: string;
375
- /** Move event type. */
376
- type: string;
377
- bcs: string;
378
- bcsEncoding: 'base64';
379
- }
380
- | {
381
- /**
382
- * Sequential event ID, ie (transaction seq number, event seq number). 1) Serves as a unique event ID
383
- * for each fullnode 2) Also serves to sequence events for the purposes of pagination and querying. A
384
- * higher id is an event seen later by that fullnode. This ID is the "cursor" for event querying.
385
- */
386
- id: EventId;
387
- /** Move package where this event was emitted. */
388
- packageId: string;
389
- /** Parsed json value of the event */
390
- parsedJson: unknown;
391
- /** Sender's Sui address. */
392
- sender: string;
393
- /** UTC timestamp in milliseconds since epoch (1/1/1970) */
394
- timestampMs?: string | null;
395
- /** Move module where this event was emitted. */
396
- transactionModule: string;
397
- /** Move event type. */
398
- type: string;
399
- bcs: string;
400
- bcsEncoding: 'base58';
401
- };
402
- /**
403
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
404
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
405
- */
406
- export type SuiEventFilter =
407
- /** Return all events. */
408
- | {
409
- All: [];
410
- } /** Return events that match any of the given filters. Only supported on event subscriptions. */
411
- | {
412
- Any: SuiEventFilter[];
413
- } /** Query by sender address. */
414
- | {
415
- Sender: string;
416
- } /** Return events emitted by the given transaction. */
417
- | {
418
- Transaction: string;
419
- } /**
420
- * Return events emitted in a specified Move module. If the event is defined in Module A but emitted in
421
- * a tx with Module B, query `MoveModule` by module B returns the event. Query `MoveEventModule` by
422
- * module A returns the event too.
423
- */
424
- | {
425
- MoveModule: {
426
- /** the module name */
427
- module: string;
428
- /** the Move package ID */
429
- package: string;
430
- };
431
- } /**
432
- * Return events with the given Move event struct name (struct tag). For example, if the event is
433
- * defined in `0xabcd::MyModule`, and named `Foo`, then the struct tag is `0xabcd::MyModule::Foo`.
434
- */
435
- | {
436
- MoveEventType: string;
437
- } /**
438
- * Return events with the given Move module name where the event struct is defined. If the event is
439
- * defined in Module A but emitted in a tx with Module B, query `MoveEventModule` by module A returns
440
- * the event. Query `MoveModule` by module B returns the event too.
441
- */
442
- | {
443
- MoveEventModule: {
444
- /** the module name */
445
- module: string;
446
- /** the Move package ID */
447
- package: string;
448
- };
449
- } /** Return events emitted in [start_time, end_time] interval */
450
- | {
451
- TimeRange: {
452
- /** right endpoint of time interval, milliseconds since epoch, exclusive */
453
- endTime: string;
454
- /** left endpoint of time interval, milliseconds since epoch, inclusive */
455
- startTime: string;
456
- };
457
- };
458
- /**
459
- * Unique ID of a Sui Event, the ID is a combination of transaction digest and event seq number.
460
- *
461
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
462
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
463
- */
464
- export interface EventId {
465
- eventSeq: string;
466
- txDigest: string;
467
- }
468
- /**
469
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
470
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
471
- */
472
- export type ExecuteTransactionRequestType = 'WaitForEffectsCert' | 'WaitForLocalExecution';
473
- /**
474
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
475
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
476
- */
477
- export type ExecutionStatus = {
478
- status: 'success' | 'failure';
479
- error?: string;
480
- };
481
- /**
482
- * Summary of the charges in a transaction. Storage is charged independently of computation. There are
483
- * 3 parts to the storage charges: `storage_cost`: it is the charge of storage at the time the
484
- * transaction is executed. The cost of storage is the number of bytes of the objects being mutated
485
- * multiplied by a variable storage cost per byte `storage_rebate`: this is the amount a user gets back
486
- * when manipulating an object. The `storage_rebate` is the `storage_cost` for an object minus fees.
487
- * `non_refundable_storage_fee`: not all the value of the object storage cost is given back to user and
488
- * there is a small fraction that is kept by the system. This value tracks that charge.
489
- *
490
- * When looking at a gas cost summary the amount charged to the user is
491
- * `computation_cost + storage_cost - storage_rebate` and that is the amount that is deducted from the
492
- * gas coins. `non_refundable_storage_fee` is collected from the objects being mutated/deleted and it
493
- * is tracked by the system in storage funds.
494
- *
495
- * Objects deleted, including the older versions of objects mutated, have the storage field on the
496
- * objects added up to a pool of "potential rebate". This rebate then is reduced by the "nonrefundable
497
- * rate" such that:
498
- * `potential_rebate(storage cost of deleted/mutated objects) = storage_rebate + non_refundable_storage_fee`
499
- *
500
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
501
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
502
- */
503
- export interface GasCostSummary {
504
- /** Cost of computation/execution */
505
- computationCost: string;
506
- /** The fee for the rebate. The portion of the storage rebate kept by the system. */
507
- nonRefundableStorageFee: string;
508
- /** Storage cost, it's the sum of all storage cost for all objects created or mutated. */
509
- storageCost: string;
510
- /**
511
- * The amount of storage cost refunded to the user for all objects deleted or mutated in the
512
- * transaction.
513
- */
514
- storageRebate: string;
515
- }
516
- /**
517
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
518
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
519
- */
520
- export interface SuiGasData {
521
- budget: string;
522
- owner: string;
523
- payment: SuiObjectRef[];
524
- price: string;
525
- }
526
- /**
527
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
528
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
529
- */
530
- export interface GetPastObjectRequest {
531
- /** the ID of the queried object */
532
- objectId: string;
533
- /** the version of the queried object. */
534
- version: string;
535
- }
536
- /**
537
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
538
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
539
- */
540
- export type InputObjectKind =
541
- | {
542
- MovePackage: string;
543
- }
544
- | {
545
- ImmOrOwnedMoveObject: SuiObjectRef;
546
- }
547
- | {
548
- SharedMoveObject: {
549
- id: string;
550
- initial_shared_version: string;
551
- mutable?: boolean;
552
- };
553
- };
554
- /**
555
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
556
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
557
- */
558
- export interface MoveCallParams {
559
- arguments: unknown[];
560
- function: string;
561
- module: string;
562
- packageObjectId: string;
563
- typeArguments?: string[];
564
- }
565
- /**
566
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
567
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
568
- */
569
- export type SuiMoveFunctionArgType =
570
- | 'Pure'
571
- | {
572
- Object: ObjectValueKind;
573
- };
574
- /**
575
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
576
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
577
- */
578
- export type MoveStruct =
579
- | MoveValue[]
580
- | {
581
- fields: {
582
- [key: string]: MoveValue;
583
- };
584
- type: string;
585
- }
586
- | {
587
- [key: string]: MoveValue;
588
- };
589
- /**
590
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
591
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
592
- */
593
- export type MoveValue =
594
- | number
595
- | boolean
596
- | string
597
- | MoveValue[]
598
- | string
599
- | {
600
- id: string;
601
- }
602
- | MoveStruct
603
- | null
604
- | MoveVariant;
605
- /**
606
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
607
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
608
- */
609
- export interface MoveVariant {
610
- fields: {
611
- [key: string]: MoveValue;
612
- };
613
- type: string;
614
- variant: string;
615
- }
616
- /**
617
- * The struct that contains signatures and public keys necessary for authenticating a MultiSig.
618
- *
619
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
620
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
621
- */
622
- export interface MultiSig {
623
- /** A bitmap that indicates the position of which public key the signature should be authenticated with. */
624
- bitmap: number;
625
- /**
626
- * The public key encoded with each public key with its signature scheme used along with the
627
- * corresponding weight.
628
- */
629
- multisig_pk: MultiSigPublicKey;
630
- /** The plain signature encoded with signature scheme. */
631
- sigs: CompressedSignature[];
632
- }
633
- /**
634
- * Deprecated, use [struct MultiSig] instead. The struct that contains signatures and public keys
635
- * necessary for authenticating a MultiSigLegacy.
636
- *
637
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
638
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
639
- */
640
- export interface MultiSigLegacy {
641
- /** A bitmap that indicates the position of which public key the signature should be authenticated with. */
642
- bitmap: string;
643
- /**
644
- * The public key encoded with each public key with its signature scheme used along with the
645
- * corresponding weight.
646
- */
647
- multisig_pk: MultiSigPublicKeyLegacy;
648
- /** The plain signature encoded with signature scheme. */
649
- sigs: CompressedSignature[];
650
- }
651
- /**
652
- * The struct that contains the public key used for authenticating a MultiSig.
653
- *
654
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
655
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
656
- */
657
- export interface MultiSigPublicKey {
658
- /** A list of public key and its corresponding weight. */
659
- pk_map: [PublicKey, number][];
660
- /**
661
- * If the total weight of the public keys corresponding to verified signatures is larger than
662
- * threshold, the MultiSig is verified.
663
- */
664
- threshold: number;
665
- }
666
- /**
667
- * Deprecated, use [struct MultiSigPublicKey] instead. The struct that contains the public key used for
668
- * authenticating a MultiSig.
669
- *
670
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
671
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
672
- */
673
- export interface MultiSigPublicKeyLegacy {
674
- /** A list of public key and its corresponding weight. */
675
- pk_map: [PublicKey, number][];
676
- /**
677
- * If the total weight of the public keys corresponding to verified signatures is larger than
678
- * threshold, the MultiSig is verified.
679
- */
680
- threshold: number;
681
- }
682
- /**
683
- * ObjectChange are derived from the object mutations in the TransactionEffect to provide richer object
684
- * information.
685
- *
686
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
687
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
688
- */
689
- export type SuiObjectChange =
690
- /** Module published */
691
- | {
692
- digest: string;
693
- modules: string[];
694
- packageId: string;
695
- type: 'published';
696
- version: string;
697
- } /** Transfer objects to new address / wrap in another object */
698
- | {
699
- digest: string;
700
- objectId: string;
701
- objectType: string;
702
- recipient: ObjectOwner;
703
- sender: string;
704
- type: 'transferred';
705
- version: string;
706
- } /** Object mutated. */
707
- | {
708
- digest: string;
709
- objectId: string;
710
- objectType: string;
711
- owner: ObjectOwner;
712
- previousVersion: string;
713
- sender: string;
714
- type: 'mutated';
715
- version: string;
716
- } /** Delete object */
717
- | {
718
- objectId: string;
719
- objectType: string;
720
- sender: string;
721
- type: 'deleted';
722
- version: string;
723
- } /** Wrapped object */
724
- | {
725
- objectId: string;
726
- objectType: string;
727
- sender: string;
728
- type: 'wrapped';
729
- version: string;
730
- } /** New object creation */
731
- | {
732
- digest: string;
733
- objectId: string;
734
- objectType: string;
735
- owner: ObjectOwner;
736
- sender: string;
737
- type: 'created';
738
- version: string;
739
- };
740
- /**
741
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
742
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
743
- */
744
- export interface SuiObjectData {
745
- /**
746
- * Move object content or package content in BCS, default to be None unless
747
- * SuiObjectDataOptions.showBcs is set to true
748
- */
749
- bcs?: RawData | null;
750
- /**
751
- * Move object content or package content, default to be None unless SuiObjectDataOptions.showContent
752
- * is set to true
753
- */
754
- content?: SuiParsedData | null;
755
- /** Base64 string representing the object digest */
756
- digest: string;
757
- /**
758
- * The Display metadata for frontend UI rendering, default to be None unless
759
- * SuiObjectDataOptions.showContent is set to true This can also be None if the struct type does not
760
- * have Display defined See more details in <https://forums.sui.io/t/nft-object-display-proposal/4872>
761
- */
762
- display?: DisplayFieldsResponse | null;
763
- objectId: string;
764
- /** The owner of this object. Default to be None unless SuiObjectDataOptions.showOwner is set to true */
765
- owner?: ObjectOwner | null;
766
- /**
767
- * The digest of the transaction that created or last mutated this object. Default to be None unless
768
- * SuiObjectDataOptions.showPreviousTransaction is set to true
769
- */
770
- previousTransaction?: string | null;
771
- /**
772
- * The amount of SUI we would rebate if this object gets deleted. This number is re-calculated each
773
- * time the object is mutated based on the present storage gas price.
774
- */
775
- storageRebate?: string | null;
776
- /** The type of the object. Default to be None unless SuiObjectDataOptions.showType is set to true */
777
- type?: string | null;
778
- /** Object version. */
779
- version: string;
780
- }
781
- /**
782
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
783
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
784
- */
785
- export interface SuiObjectDataOptions {
786
- /** Whether to show the content in BCS format. Default to be False */
787
- showBcs?: boolean;
788
- /**
789
- * Whether to show the content(i.e., package content or Move struct content) of the object. Default to
790
- * be False
791
- */
792
- showContent?: boolean;
793
- /** Whether to show the Display metadata of the object for frontend rendering. Default to be False */
794
- showDisplay?: boolean;
795
- /** Whether to show the owner of the object. Default to be False */
796
- showOwner?: boolean;
797
- /** Whether to show the previous transaction digest of the object. Default to be False */
798
- showPreviousTransaction?: boolean;
799
- /** Whether to show the storage rebate of the object. Default to be False */
800
- showStorageRebate?: boolean;
801
- /** Whether to show the type of the object. Default to be False */
802
- showType?: boolean;
803
- }
804
- /**
805
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
806
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
807
- */
808
- export type ObjectRead =
809
- /** The object exists and is found with this version */
810
- | {
811
- details: SuiObjectData;
812
- status: 'VersionFound';
813
- } /** The object does not exist */
814
- | {
815
- details: string;
816
- status: 'ObjectNotExists';
817
- } /** The object is found to be deleted with this version */
818
- | {
819
- details: SuiObjectRef;
820
- status: 'ObjectDeleted';
821
- } /** The object exists but not found with this version */
822
- | {
823
- details: [string, string];
824
- status: 'VersionNotFound';
825
- } /** The asked object version is higher than the latest */
826
- | {
827
- details: {
828
- asked_version: string;
829
- latest_version: string;
830
- object_id: string;
831
- };
832
- status: 'VersionTooHigh';
833
- };
834
- /**
835
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
836
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
837
- */
838
- export interface SuiObjectRef {
839
- /** Base64 string representing the object digest */
840
- digest: string;
841
- /** Hex code as string representing the object id */
842
- objectId: string;
843
- /** Object version. */
844
- version: string;
845
- }
846
- /**
847
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
848
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
849
- */
850
- export type ObjectResponseError =
851
- | {
852
- code: 'notExists';
853
- object_id: string;
854
- }
855
- | {
856
- code: 'dynamicFieldNotFound';
857
- parent_object_id: string;
858
- }
859
- | {
860
- code: 'deleted';
861
- /** Base64 string representing the object digest */
862
- digest: string;
863
- object_id: string;
864
- /** Object version. */
865
- version: string;
866
- }
867
- | {
868
- code: 'unknown';
869
- }
870
- | {
871
- code: 'displayError';
872
- error: string;
873
- };
874
- /**
875
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
876
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
877
- */
878
- export interface SuiObjectResponseQuery {
879
- /** If None, no filter will be applied */
880
- filter?: SuiObjectDataFilter | null;
881
- /** config which fields to include in the response, by default only digest is included */
882
- options?: SuiObjectDataOptions | null;
883
- }
884
- /**
885
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
886
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
887
- */
888
- export type ObjectValueKind = 'ByImmutableReference' | 'ByMutableReference' | 'ByValue';
889
- /**
890
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
891
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
892
- */
893
- export interface OwnedObjectRef {
894
- owner: ObjectOwner;
895
- reference: SuiObjectRef;
896
- }
897
- /**
898
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
899
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
900
- */
901
- export type ObjectOwner =
902
- /** Object is exclusively owned by a single address, and is mutable. */
903
- | {
904
- AddressOwner: string;
905
- } /**
906
- * Object is exclusively owned by a single object, and is mutable. The object ID is converted to
907
- * SuiAddress as SuiAddress is universal.
908
- */
909
- | {
910
- ObjectOwner: string;
911
- } /** Object is shared, can be used by any address, and is mutable. */
912
- | {
913
- Shared: {
914
- /** The version at which the object became shared */
915
- initial_shared_version: string;
916
- };
917
- }
918
- | 'Immutable' /** Object is exclusively owned by a single address and sequenced via consensus. */
919
- | {
920
- ConsensusAddressOwner: {
921
- owner: string;
922
- /**
923
- * The version at which the object most recently became a consensus object. This serves the same
924
- * function as `initial_shared_version`, except it may change if the object's Owner type changes.
925
- */
926
- start_version: string;
927
- };
928
- };
929
- /**
930
- * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the
931
- * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first
932
- * item.
933
- *
934
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
935
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
936
- */
937
- export interface PaginatedCheckpoints {
938
- data: Checkpoint[];
939
- hasNextPage: boolean;
940
- nextCursor?: string | null;
941
- }
942
- /**
943
- * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the
944
- * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first
945
- * item.
946
- *
947
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
948
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
949
- */
950
- export interface PaginatedCoins {
951
- data: CoinStruct[];
952
- hasNextPage: boolean;
953
- nextCursor?: string | null;
954
- }
955
- /**
956
- * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the
957
- * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first
958
- * item.
959
- *
960
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
961
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
962
- */
963
- export interface PaginatedDynamicFieldInfos {
964
- data: DynamicFieldInfo[];
965
- hasNextPage: boolean;
966
- nextCursor?: string | null;
967
- }
968
- /**
969
- * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the
970
- * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first
971
- * item.
972
- *
973
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
974
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
975
- */
976
- export interface PaginatedEvents {
977
- data: SuiEvent[];
978
- hasNextPage: boolean;
979
- nextCursor?: EventId | null;
980
- }
981
- /**
982
- * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the
983
- * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first
984
- * item.
985
- *
986
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
987
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
988
- */
989
- export interface PaginatedStrings {
990
- data: string[];
991
- hasNextPage: boolean;
992
- nextCursor?: string | null;
993
- }
994
- /**
995
- * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the
996
- * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first
997
- * item.
998
- *
999
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1000
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1001
- */
1002
- export interface PaginatedObjectsResponse {
1003
- data: SuiObjectResponse[];
1004
- hasNextPage: boolean;
1005
- nextCursor?: string | null;
1006
- }
1007
- /**
1008
- * `next_cursor` points to the last item in the page; Reading with `next_cursor` will start from the
1009
- * next item after `next_cursor` if `next_cursor` is `Some`, otherwise it will start from the first
1010
- * item.
1011
- *
1012
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1013
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1014
- */
1015
- export interface PaginatedTransactionResponse {
1016
- data: SuiTransactionBlockResponse[];
1017
- hasNextPage: boolean;
1018
- nextCursor?: string | null;
1019
- }
1020
- /**
1021
- * An passkey authenticator with parsed fields. See field defition below. Can be initialized from
1022
- * [struct RawPasskeyAuthenticator].
1023
- *
1024
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1025
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1026
- */
1027
- export interface PasskeyAuthenticator {
1028
- /**
1029
- * `authenticatorData` is a bytearray that encodes
1030
- * [Authenticator Data](https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data) structure returned
1031
- * by the authenticator attestation response as is.
1032
- */
1033
- authenticator_data: number[];
1034
- /**
1035
- * `clientDataJSON` contains a JSON-compatible UTF-8 encoded string of the client data which is passed
1036
- * to the authenticator by the client during the authentication request (see
1037
- * [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata))
1038
- */
1039
- client_data_json: string;
1040
- }
1041
- /**
1042
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1043
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1044
- */
1045
- export interface ProtocolConfig {
1046
- attributes: {
1047
- [key: string]: ProtocolConfigValue | null;
1048
- };
1049
- featureFlags: {
1050
- [key: string]: boolean;
1051
- };
1052
- maxSupportedProtocolVersion: string;
1053
- minSupportedProtocolVersion: string;
1054
- protocolVersion: string;
1055
- }
1056
- /**
1057
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1058
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1059
- */
1060
- export type ProtocolConfigValue =
1061
- | {
1062
- u16: string;
1063
- }
1064
- | {
1065
- u32: string;
1066
- }
1067
- | {
1068
- u64: string;
1069
- }
1070
- | {
1071
- f64: string;
1072
- }
1073
- | {
1074
- bool: string;
1075
- };
1076
- /**
1077
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1078
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1079
- */
1080
- export type PublicKey =
1081
- | {
1082
- Ed25519: string;
1083
- }
1084
- | {
1085
- Secp256k1: string;
1086
- }
1087
- | {
1088
- Secp256r1: string;
1089
- }
1090
- | {
1091
- ZkLogin: string;
1092
- }
1093
- | {
1094
- Passkey: string;
1095
- };
1096
- /**
1097
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1098
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1099
- */
1100
- export type RPCTransactionRequestParams =
1101
- | {
1102
- transferObjectRequestParams: TransferObjectParams;
1103
- }
1104
- | {
1105
- moveCallRequestParams: MoveCallParams;
1106
- };
1107
- /**
1108
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1109
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1110
- */
1111
- export type RawData =
1112
- | {
1113
- bcsBytes: string;
1114
- dataType: 'moveObject';
1115
- hasPublicTransfer: boolean;
1116
- type: string;
1117
- version: string;
1118
- }
1119
- | {
1120
- dataType: 'package';
1121
- id: string;
1122
- linkageTable: {
1123
- [key: string]: UpgradeInfo;
1124
- };
1125
- moduleMap: {
1126
- [key: string]: string;
1127
- };
1128
- typeOriginTable: TypeOrigin[];
1129
- version: string;
1130
- };
1131
- /**
1132
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1133
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1134
- */
1135
- export type Signature =
1136
- | {
1137
- Ed25519SuiSignature: string;
1138
- }
1139
- | {
1140
- Secp256k1SuiSignature: string;
1141
- }
1142
- | {
1143
- Secp256r1SuiSignature: string;
1144
- };
1145
- /**
1146
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1147
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1148
- */
1149
- export type StakeObject =
1150
- | {
1151
- principal: string;
1152
- stakeActiveEpoch: string;
1153
- stakeRequestEpoch: string;
1154
- /** ID of the StakedSui receipt object. */
1155
- stakedSuiId: string;
1156
- status: 'Pending';
1157
- }
1158
- | {
1159
- principal: string;
1160
- stakeActiveEpoch: string;
1161
- stakeRequestEpoch: string;
1162
- /** ID of the StakedSui receipt object. */
1163
- stakedSuiId: string;
1164
- estimatedReward: string;
1165
- status: 'Active';
1166
- }
1167
- | {
1168
- principal: string;
1169
- stakeActiveEpoch: string;
1170
- stakeRequestEpoch: string;
1171
- /** ID of the StakedSui receipt object. */
1172
- stakedSuiId: string;
1173
- status: 'Unstaked';
1174
- };
1175
- /**
1176
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1177
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1178
- */
1179
- export interface SuiActiveJwk {
1180
- epoch: string;
1181
- jwk: SuiJWK;
1182
- jwk_id: SuiJwkId;
1183
- }
1184
- /**
1185
- * An argument to a transaction in a programmable transaction block
1186
- *
1187
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1188
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1189
- */
1190
- export type SuiArgument =
1191
- | 'GasCoin' /** One of the input objects or primitive values (from `ProgrammableTransactionBlock` inputs) */
1192
- | {
1193
- Input: number;
1194
- } /** The result of another transaction (from `ProgrammableTransactionBlock` transactions) */
1195
- | {
1196
- Result: number;
1197
- } /**
1198
- * Like a `Result` but it accesses a nested result. Currently, the only usage of this is to access a
1199
- * value from a Move call with multiple return values.
1200
- */
1201
- | {
1202
- NestedResult: [number, number];
1203
- };
1204
- /**
1205
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1206
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1207
- */
1208
- export interface SuiAuthenticatorStateExpire {
1209
- min_epoch: string;
1210
- }
1211
- /**
1212
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1213
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1214
- */
1215
- export type SuiCallArg =
1216
- | {
1217
- type: 'object';
1218
- digest: string;
1219
- objectId: string;
1220
- objectType: 'immOrOwnedObject';
1221
- version: string;
1222
- }
1223
- | {
1224
- type: 'object';
1225
- initialSharedVersion: string;
1226
- mutable: boolean;
1227
- objectId: string;
1228
- objectType: 'sharedObject';
1229
- }
1230
- | {
1231
- type: 'object';
1232
- digest: string;
1233
- objectId: string;
1234
- objectType: 'receiving';
1235
- version: string;
1236
- }
1237
- | {
1238
- type: 'pure';
1239
- value: unknown;
1240
- valueType?: string | null;
1241
- }
1242
- | {
1243
- reservation: SuiReservation;
1244
- type: 'fundsWithdrawal';
1245
- typeArg: SuiWithdrawalTypeArg;
1246
- withdrawFrom: SuiWithdrawFrom;
1247
- };
1248
- /**
1249
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1250
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1251
- */
1252
- export interface SuiChangeEpoch {
1253
- computation_charge: string;
1254
- epoch: string;
1255
- epoch_start_timestamp_ms: string;
1256
- storage_charge: string;
1257
- storage_rebate: string;
1258
- }
1259
- /**
1260
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1261
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1262
- */
1263
- export interface CoinMetadata {
1264
- /** Number of decimal places the coin uses. */
1265
- decimals: number;
1266
- /** Description of the token */
1267
- description: string;
1268
- /** URL for the token logo */
1269
- iconUrl?: string | null;
1270
- /** Object id for the CoinMetadata object */
1271
- id?: string | null;
1272
- /** Name for the token */
1273
- name: string;
1274
- /** Symbol for the token */
1275
- symbol: string;
1276
- }
1277
- /**
1278
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1279
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1280
- */
1281
- export type SuiEndOfEpochTransactionKind =
1282
- | 'AuthenticatorStateCreate'
1283
- | 'RandomnessStateCreate'
1284
- | 'CoinDenyListStateCreate'
1285
- | 'StoreExecutionTimeObservations'
1286
- | 'AccumulatorRootCreate'
1287
- | 'CoinRegistryCreate'
1288
- | 'DisplayRegistryCreate'
1289
- | 'AddressAliasStateCreate'
1290
- | 'WriteAccumulatorStorageCost'
1291
- | {
1292
- ChangeEpoch: SuiChangeEpoch;
1293
- }
1294
- | {
1295
- AuthenticatorStateExpire: SuiAuthenticatorStateExpire;
1296
- }
1297
- | {
1298
- BridgeStateCreate: string;
1299
- }
1300
- | {
1301
- BridgeCommitteeUpdate: string;
1302
- };
1303
- /**
1304
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1305
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1306
- */
1307
- export interface SuiExecutionResult {
1308
- /** The value of any arguments that were mutably borrowed. Non-mut borrowed values are not included */
1309
- mutableReferenceOutputs?: [SuiArgument, number[], string][];
1310
- /** The return values from the transaction */
1311
- returnValues?: [number[], string][];
1312
- }
1313
- /**
1314
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1315
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1316
- */
1317
- export interface SuiJWK {
1318
- alg: string;
1319
- e: string;
1320
- kty: string;
1321
- n: string;
1322
- }
1323
- /**
1324
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1325
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1326
- */
1327
- export interface SuiJwkId {
1328
- iss: string;
1329
- kid: string;
1330
- }
1331
- /**
1332
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1333
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1334
- */
1335
- export type SuiMoveAbility = 'Copy' | 'Drop' | 'Store' | 'Key';
1336
- /**
1337
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1338
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1339
- */
1340
- export interface SuiMoveAbilitySet {
1341
- abilities: SuiMoveAbility[];
1342
- }
1343
- /**
1344
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1345
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1346
- */
1347
- export interface SuiMoveAbort {
1348
- error_code?: string | null;
1349
- function?: string | null;
1350
- line?: number | null;
1351
- module_id?: string | null;
1352
- }
1353
- /**
1354
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1355
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1356
- */
1357
- export interface SuiMoveModuleId {
1358
- address: string;
1359
- name: string;
1360
- }
1361
- /**
1362
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1363
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1364
- */
1365
- export interface SuiMoveNormalizedEnum {
1366
- abilities: SuiMoveAbilitySet;
1367
- typeParameters: SuiMoveStructTypeParameter[];
1368
- variantDeclarationOrder?: string[] | null;
1369
- variants: {
1370
- [key: string]: SuiMoveNormalizedField[];
1371
- };
1372
- }
1373
- /**
1374
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1375
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1376
- */
1377
- export interface SuiMoveNormalizedField {
1378
- name: string;
1379
- type: SuiMoveNormalizedType;
1380
- }
1381
- /**
1382
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1383
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1384
- */
1385
- export interface SuiMoveNormalizedFunction {
1386
- isEntry: boolean;
1387
- parameters: SuiMoveNormalizedType[];
1388
- return: SuiMoveNormalizedType[];
1389
- typeParameters: SuiMoveAbilitySet[];
1390
- visibility: SuiMoveVisibility;
1391
- }
1392
- /**
1393
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1394
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1395
- */
1396
- export interface SuiMoveNormalizedModule {
1397
- address: string;
1398
- enums?: {
1399
- [key: string]: SuiMoveNormalizedEnum;
1400
- };
1401
- exposedFunctions: {
1402
- [key: string]: SuiMoveNormalizedFunction;
1403
- };
1404
- fileFormatVersion: number;
1405
- friends: SuiMoveModuleId[];
1406
- name: string;
1407
- structs: {
1408
- [key: string]: SuiMoveNormalizedStruct;
1409
- };
1410
- }
1411
- /**
1412
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1413
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1414
- */
1415
- export interface SuiMoveNormalizedStruct {
1416
- abilities: SuiMoveAbilitySet;
1417
- fields: SuiMoveNormalizedField[];
1418
- typeParameters: SuiMoveStructTypeParameter[];
1419
- }
1420
- /**
1421
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1422
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1423
- */
1424
- export type SuiMoveNormalizedType =
1425
- | 'Bool'
1426
- | 'U8'
1427
- | 'U16'
1428
- | 'U32'
1429
- | 'U64'
1430
- | 'U128'
1431
- | 'U256'
1432
- | 'Address'
1433
- | 'Signer'
1434
- | {
1435
- Struct: {
1436
- address: string;
1437
- module: string;
1438
- name: string;
1439
- typeArguments: SuiMoveNormalizedType[];
1440
- };
1441
- }
1442
- | {
1443
- Vector: SuiMoveNormalizedType;
1444
- }
1445
- | {
1446
- TypeParameter: number;
1447
- }
1448
- | {
1449
- Reference: SuiMoveNormalizedType;
1450
- }
1451
- | {
1452
- MutableReference: SuiMoveNormalizedType;
1453
- };
1454
- /**
1455
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1456
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1457
- */
1458
- export interface SuiMoveStructTypeParameter {
1459
- constraints: SuiMoveAbilitySet;
1460
- isPhantom: boolean;
1461
- }
1462
- /**
1463
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1464
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1465
- */
1466
- export type SuiMoveVisibility = 'Private' | 'Public' | 'Friend';
1467
- /**
1468
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1469
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1470
- */
1471
- export type SuiObjectDataFilter =
1472
- | {
1473
- MatchAll: SuiObjectDataFilter[];
1474
- }
1475
- | {
1476
- MatchAny: SuiObjectDataFilter[];
1477
- }
1478
- | {
1479
- MatchNone: SuiObjectDataFilter[];
1480
- } /** Query by type a specified Package. */
1481
- | {
1482
- Package: string;
1483
- } /** Query by type a specified Move module. */
1484
- | {
1485
- MoveModule: {
1486
- /** the module name */
1487
- module: string;
1488
- /** the Move package ID */
1489
- package: string;
1490
- };
1491
- } /** Query by type */
1492
- | {
1493
- StructType: string;
1494
- }
1495
- | {
1496
- AddressOwner: string;
1497
- }
1498
- | {
1499
- ObjectOwner: string;
1500
- }
1501
- | {
1502
- ObjectId: string;
1503
- }
1504
- | {
1505
- ObjectIds: string[];
1506
- }
1507
- | {
1508
- Version: string;
1509
- };
1510
- /**
1511
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1512
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1513
- */
1514
- export interface SuiObjectResponse {
1515
- data?: SuiObjectData | null;
1516
- error?: ObjectResponseError | null;
1517
- }
1518
- /**
1519
- * The transaction for calling a Move function, either an entry function or a public function (which
1520
- * cannot return references).
1521
- *
1522
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1523
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1524
- */
1525
- export interface MoveCallSuiTransaction {
1526
- /** The arguments to the function. */
1527
- arguments?: SuiArgument[];
1528
- /** The function to be called. */
1529
- function: string;
1530
- /** The specific module in the package containing the function. */
1531
- module: string;
1532
- /** The package containing the module and function. */
1533
- package: string;
1534
- /** The type arguments to the function. */
1535
- type_arguments?: string[];
1536
- }
1537
- /**
1538
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1539
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1540
- */
1541
- export type SuiReservation = {
1542
- maxAmountU64: string;
1543
- };
1544
- /**
1545
- * This is the JSON-RPC type for the SUI system state object. It flattens all fields to make them
1546
- * top-level fields such that it as minimum dependencies to the internal data structures of the SUI
1547
- * system state type.
1548
- *
1549
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1550
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1551
- */
1552
- export interface SuiSystemStateSummary {
1553
- /** The list of active validators in the current epoch. */
1554
- activeValidators: SuiValidatorSummary[];
1555
- /** Map storing the number of epochs for which each validator has been below the low stake threshold. */
1556
- atRiskValidators: [string, string][];
1557
- /** The current epoch ID, starting from 0. */
1558
- epoch: string;
1559
- /** The duration of an epoch, in milliseconds. */
1560
- epochDurationMs: string;
1561
- /** Unix timestamp of the current epoch start */
1562
- epochStartTimestampMs: string;
1563
- /**
1564
- * ID of the object that maps from a staking pool ID to the inactive validator that has that pool as
1565
- * its staking pool.
1566
- */
1567
- inactivePoolsId: string;
1568
- /** Number of inactive staking pools. */
1569
- inactivePoolsSize: string;
1570
- /**
1571
- * Maximum number of active validators at any moment. We do not allow the number of validators in any
1572
- * epoch to go above this.
1573
- */
1574
- maxValidatorCount: string;
1575
- /** Lower-bound on the amount of stake required to become a validator. */
1576
- minValidatorJoiningStake: string;
1577
- /** ID of the object that contains the list of new validators that will join at the end of the epoch. */
1578
- pendingActiveValidatorsId: string;
1579
- /** Number of new validators that will join at the end of the epoch. */
1580
- pendingActiveValidatorsSize: string;
1581
- /** Removal requests from the validators. Each element is an index pointing to `active_validators`. */
1582
- pendingRemovals: string[];
1583
- /** The current protocol version, starting from 1. */
1584
- protocolVersion: string;
1585
- /** The reference gas price for the current epoch. */
1586
- referenceGasPrice: string;
1587
- /**
1588
- * Whether the system is running in a downgraded safe mode due to a non-recoverable bug. This is set
1589
- * whenever we failed to execute advance_epoch, and ended up executing advance_epoch_safe_mode. It can
1590
- * be reset once we are able to successfully execute advance_epoch.
1591
- */
1592
- safeMode: boolean;
1593
- /** Amount of computation rewards accumulated (and not yet distributed) during safe mode. */
1594
- safeModeComputationRewards: string;
1595
- /** Amount of non-refundable storage fee accumulated during safe mode. */
1596
- safeModeNonRefundableStorageFee: string;
1597
- /** Amount of storage rebates accumulated (and not yet burned) during safe mode. */
1598
- safeModeStorageRebates: string;
1599
- /** Amount of storage rewards accumulated (and not yet distributed) during safe mode. */
1600
- safeModeStorageRewards: string;
1601
- /** Balance of SUI set aside for stake subsidies that will be drawn down over time. */
1602
- stakeSubsidyBalance: string;
1603
- /** The amount of stake subsidy to be drawn down per epoch. This amount decays and decreases over time. */
1604
- stakeSubsidyCurrentDistributionAmount: string;
1605
- /**
1606
- * The rate at which the distribution amount decays at the end of each period. Expressed in basis
1607
- * points.
1608
- */
1609
- stakeSubsidyDecreaseRate: number;
1610
- /**
1611
- * This counter may be different from the current epoch number if in some epochs we decide to skip the
1612
- * subsidy.
1613
- */
1614
- stakeSubsidyDistributionCounter: string;
1615
- /** Number of distributions to occur before the distribution amount decays. */
1616
- stakeSubsidyPeriodLength: string;
1617
- /** The starting epoch in which stake subsidies start being paid out */
1618
- stakeSubsidyStartEpoch: string;
1619
- /** ID of the object that maps from staking pool's ID to the sui address of a validator. */
1620
- stakingPoolMappingsId: string;
1621
- /** Number of staking pool mappings. */
1622
- stakingPoolMappingsSize: string;
1623
- /**
1624
- * The non-refundable portion of the storage fund coming from storage reinvestment, non-refundable
1625
- * storage rebates and any leftover staking rewards.
1626
- */
1627
- storageFundNonRefundableBalance: string;
1628
- /** The storage rebates of all the objects on-chain stored in the storage fund. */
1629
- storageFundTotalObjectStorageRebates: string;
1630
- /** The current version of the system state data structure type. */
1631
- systemStateVersion: string;
1632
- /** Total amount of stake from all active validators at the beginning of the epoch. */
1633
- totalStake: string;
1634
- /**
1635
- * ID of the object that stores preactive validators, mapping their addresses to their `Validator`
1636
- * structs.
1637
- */
1638
- validatorCandidatesId: string;
1639
- /** Number of preactive validators. */
1640
- validatorCandidatesSize: string;
1641
- /**
1642
- * A validator can have stake below `validator_low_stake_threshold` for this many epochs before being
1643
- * kicked out.
1644
- */
1645
- validatorLowStakeGracePeriod: string;
1646
- /**
1647
- * Validators with stake amount below `validator_low_stake_threshold` are considered to have low stake
1648
- * and will be escorted out of the validator set after being below this threshold for more than
1649
- * `validator_low_stake_grace_period` number of epochs.
1650
- */
1651
- validatorLowStakeThreshold: string;
1652
- /** A map storing the records of validator reporting each other. */
1653
- validatorReportRecords: [string, string[]][];
1654
- /**
1655
- * Validators with stake below `validator_very_low_stake_threshold` will be removed immediately at
1656
- * epoch change, no grace period.
1657
- */
1658
- validatorVeryLowStakeThreshold: string;
1659
- }
1660
- /**
1661
- * A single transaction in a programmable transaction block.
1662
- *
1663
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1664
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1665
- */
1666
- export type SuiTransaction =
1667
- /** A call to either an entry or a public Move function */
1668
- | {
1669
- MoveCall: MoveCallSuiTransaction;
1670
- } /**
1671
- * `(Vec<forall T:key+store. T>, address)` It sends n-objects to the specified address. These objects
1672
- * must have store (public transfer) and either the previous owner must be an address or the object
1673
- * must be newly created.
1674
- */
1675
- | {
1676
- TransferObjects: [SuiArgument[], SuiArgument];
1677
- } /**
1678
- * `(&mut Coin<T>, Vec<u64>)` -> `Vec<Coin<T>>` It splits off some amounts into a new coins with those
1679
- * amounts
1680
- */
1681
- | {
1682
- SplitCoins: [SuiArgument, SuiArgument[]];
1683
- } /** `(&mut Coin<T>, Vec<Coin<T>>)` It merges n-coins into the first coin */
1684
- | {
1685
- MergeCoins: [SuiArgument, SuiArgument[]];
1686
- } /**
1687
- * Publishes a Move package. It takes the package bytes and a list of the package's transitive
1688
- * dependencies to link against on-chain.
1689
- */
1690
- | {
1691
- Publish: string[];
1692
- } /** Upgrades a Move package */
1693
- | {
1694
- Upgrade: [string[], string, SuiArgument];
1695
- } /**
1696
- * `forall T: Vec<T> -> vector<T>` Given n-values of the same type, it constructs a vector. For non
1697
- * objects or an empty vector, the type tag must be specified.
1698
- */
1699
- | {
1700
- MakeMoveVec: [string | null, SuiArgument[]];
1701
- };
1702
- /**
1703
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1704
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1705
- */
1706
- export type SuiTransactionBlockBuilderMode = 'Commit' | 'DevInspect';
1707
- /**
1708
- * This is the JSON-RPC type for the SUI validator. It flattens all inner structures to top-level
1709
- * fields so that they are decoupled from the internal definitions.
1710
- *
1711
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1712
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1713
- */
1714
- export interface SuiValidatorSummary {
1715
- commissionRate: string;
1716
- description: string;
1717
- /** ID of the exchange rate table object. */
1718
- exchangeRatesId: string;
1719
- /** Number of exchange rates in the table. */
1720
- exchangeRatesSize: string;
1721
- gasPrice: string;
1722
- imageUrl: string;
1723
- name: string;
1724
- netAddress: string;
1725
- networkPubkeyBytes: string;
1726
- nextEpochCommissionRate: string;
1727
- nextEpochGasPrice: string;
1728
- nextEpochNetAddress?: string | null;
1729
- nextEpochNetworkPubkeyBytes?: string | null;
1730
- nextEpochP2pAddress?: string | null;
1731
- nextEpochPrimaryAddress?: string | null;
1732
- nextEpochProofOfPossession?: string | null;
1733
- nextEpochProtocolPubkeyBytes?: string | null;
1734
- nextEpochStake: string;
1735
- nextEpochWorkerAddress?: string | null;
1736
- nextEpochWorkerPubkeyBytes?: string | null;
1737
- operationCapId: string;
1738
- p2pAddress: string;
1739
- /** Pending pool token withdrawn during the current epoch, emptied at epoch boundaries. */
1740
- pendingPoolTokenWithdraw: string;
1741
- /** Pending stake amount for this epoch. */
1742
- pendingStake: string;
1743
- /** Pending stake withdrawn during the current epoch, emptied at epoch boundaries. */
1744
- pendingTotalSuiWithdraw: string;
1745
- /** Total number of pool tokens issued by the pool. */
1746
- poolTokenBalance: string;
1747
- primaryAddress: string;
1748
- projectUrl: string;
1749
- proofOfPossessionBytes: string;
1750
- protocolPubkeyBytes: string;
1751
- /** The epoch stake rewards will be added here at the end of each epoch. */
1752
- rewardsPool: string;
1753
- /** The epoch at which this pool became active. */
1754
- stakingPoolActivationEpoch?: string | null;
1755
- /** The epoch at which this staking pool ceased to be active. `None` = {pre-active, active}, */
1756
- stakingPoolDeactivationEpoch?: string | null;
1757
- /** ID of the staking pool object. */
1758
- stakingPoolId: string;
1759
- /** The total number of SUI tokens in this pool. */
1760
- stakingPoolSuiBalance: string;
1761
- suiAddress: string;
1762
- votingPower: string;
1763
- workerAddress: string;
1764
- workerPubkeyBytes: string;
1765
- }
1766
- /**
1767
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1768
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1769
- */
1770
- export type SuiWithdrawFrom = 'sender' | 'sponsor';
1771
- /**
1772
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1773
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1774
- */
1775
- export type SuiWithdrawalTypeArg = {
1776
- balance: string;
1777
- };
1778
- /**
1779
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1780
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1781
- */
1782
- export interface CoinSupply {
1783
- value: string;
1784
- }
1785
- /**
1786
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1787
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1788
- */
1789
- export interface SuiTransactionBlock {
1790
- data: TransactionBlockData;
1791
- txSignatures: string[];
1792
- }
1793
- /**
1794
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1795
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1796
- */
1797
- export interface TransactionBlockBytes {
1798
- /** the gas objects to be used */
1799
- gas: SuiObjectRef[];
1800
- /** objects to be used in this transaction */
1801
- inputObjects: InputObjectKind[];
1802
- /** BCS serialized transaction data bytes without its type tag, as base-64 encoded string. */
1803
- txBytes: string;
1804
- }
1805
- /**
1806
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1807
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1808
- */
1809
- export type TransactionBlockData = {
1810
- gasData: SuiGasData;
1811
- messageVersion: 'v1';
1812
- sender: string;
1813
- transaction: SuiTransactionBlockKind;
1814
- };
1815
- /**
1816
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1817
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1818
- */
1819
- export type TransactionEffects =
1820
- /** The response from processing a transaction or a certified transaction */
1821
- {
1822
- /** The abort error populated if the transaction failed with an abort code. */
1823
- abortError?: SuiMoveAbort | null;
1824
- accumulatorEvents?: AccumulatorEvent[];
1825
- /** ObjectRef and owner of new objects created. */
1826
- created?: OwnedObjectRef[];
1827
- /** Object Refs of objects now deleted (the old refs). */
1828
- deleted?: SuiObjectRef[];
1829
- /** The set of transaction digests this transaction depends on. */
1830
- dependencies?: string[];
1831
- /**
1832
- * The digest of the events emitted during execution, can be None if the transaction does not emit any
1833
- * event.
1834
- */
1835
- eventsDigest?: string | null;
1836
- /** The epoch when this transaction was executed. */
1837
- executedEpoch: string;
1838
- /**
1839
- * The updated gas object reference. Have a dedicated field for convenient access. It's also included
1840
- * in mutated.
1841
- */
1842
- gasObject: OwnedObjectRef;
1843
- gasUsed: GasCostSummary;
1844
- messageVersion: 'v1';
1845
- /**
1846
- * The version that every modified (mutated or deleted) object had before it was modified by this
1847
- * transaction.
1848
- */
1849
- modifiedAtVersions?: TransactionBlockEffectsModifiedAtVersions[];
1850
- /** ObjectRef and owner of mutated objects, including gas object. */
1851
- mutated?: OwnedObjectRef[];
1852
- /**
1853
- * The object references of the shared objects used in this transaction. Empty if no shared objects
1854
- * were used.
1855
- */
1856
- sharedObjects?: SuiObjectRef[];
1857
- /** The status of the execution */
1858
- status: ExecutionStatus;
1859
- /** The transaction digest */
1860
- transactionDigest: string;
1861
- /**
1862
- * ObjectRef and owner of objects that are unwrapped in this transaction. Unwrapped objects are objects
1863
- * that were wrapped into other objects in the past, and just got extracted out.
1864
- */
1865
- unwrapped?: OwnedObjectRef[];
1866
- /** Object refs of objects previously wrapped in other objects but now deleted. */
1867
- unwrappedThenDeleted?: SuiObjectRef[];
1868
- /** Object refs of objects now wrapped in other objects. */
1869
- wrapped?: SuiObjectRef[];
1870
- };
1871
- /**
1872
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1873
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1874
- */
1875
- export interface TransactionBlockEffectsModifiedAtVersions {
1876
- objectId: string;
1877
- sequenceNumber: string;
1878
- }
1879
- /**
1880
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1881
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1882
- */
1883
- export type SuiTransactionBlockKind =
1884
- /** A system transaction that will update epoch information on-chain. */
1885
- | {
1886
- computation_charge: string;
1887
- epoch: string;
1888
- epoch_start_timestamp_ms: string;
1889
- kind: 'ChangeEpoch';
1890
- storage_charge: string;
1891
- storage_rebate: string;
1892
- } /** A system transaction used for initializing the initial state of the chain. */
1893
- | {
1894
- kind: 'Genesis';
1895
- objects: string[];
1896
- } /** A system transaction marking the start of a series of transactions scheduled as part of a checkpoint */
1897
- | {
1898
- commit_timestamp_ms: string;
1899
- epoch: string;
1900
- kind: 'ConsensusCommitPrologue';
1901
- round: string;
1902
- } /** A series of transactions where the results of one transaction can be used in future transactions */
1903
- | {
1904
- /** Input objects or primitive values */
1905
- inputs: SuiCallArg[];
1906
- kind: 'ProgrammableTransaction';
1907
- /**
1908
- * The transactions to be executed sequentially. A failure in any transaction will result in the
1909
- * failure of the entire programmable transaction block.
1910
- */
1911
- transactions: SuiTransaction[];
1912
- } /** A transaction which updates global authenticator state */
1913
- | {
1914
- epoch: string;
1915
- kind: 'AuthenticatorStateUpdate';
1916
- new_active_jwks: SuiActiveJwk[];
1917
- round: string;
1918
- } /** A transaction which updates global randomness state */
1919
- | {
1920
- epoch: string;
1921
- kind: 'RandomnessStateUpdate';
1922
- random_bytes: number[];
1923
- randomness_round: string;
1924
- } /** The transaction which occurs only at the end of the epoch */
1925
- | {
1926
- kind: 'EndOfEpochTransaction';
1927
- transactions: SuiEndOfEpochTransactionKind[];
1928
- }
1929
- | {
1930
- commit_timestamp_ms: string;
1931
- consensus_commit_digest: string;
1932
- epoch: string;
1933
- kind: 'ConsensusCommitPrologueV2';
1934
- round: string;
1935
- }
1936
- | {
1937
- commit_timestamp_ms: string;
1938
- consensus_commit_digest: string;
1939
- consensus_determined_version_assignments: ConsensusDeterminedVersionAssignments;
1940
- epoch: string;
1941
- kind: 'ConsensusCommitPrologueV3';
1942
- round: string;
1943
- sub_dag_index?: string | null;
1944
- }
1945
- | {
1946
- additional_state_digest: string;
1947
- commit_timestamp_ms: string;
1948
- consensus_commit_digest: string;
1949
- consensus_determined_version_assignments: ConsensusDeterminedVersionAssignments;
1950
- epoch: string;
1951
- kind: 'ConsensusCommitPrologueV4';
1952
- round: string;
1953
- sub_dag_index?: string | null;
1954
- } /** A series of commands where the results of one command can be used in future commands */
1955
- | {
1956
- /** Input objects or primitive values */
1957
- inputs: SuiCallArg[];
1958
- kind: 'ProgrammableSystemTransaction';
1959
- /**
1960
- * The transactions to be executed sequentially. A failure in any transaction will result in the
1961
- * failure of the entire programmable transaction block.
1962
- */
1963
- transactions: SuiTransaction[];
1964
- };
1965
- /**
1966
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1967
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1968
- */
1969
- export interface SuiTransactionBlockResponse {
1970
- balanceChanges?: BalanceChange[] | null;
1971
- /**
1972
- * The checkpoint number when this transaction was included and hence finalized. This is only returned
1973
- * in the read api, not in the transaction execution api.
1974
- */
1975
- checkpoint?: string | null;
1976
- confirmedLocalExecution?: boolean | null;
1977
- digest: string;
1978
- effects?: TransactionEffects | null;
1979
- errors?: string[];
1980
- events?: SuiEvent[] | null;
1981
- objectChanges?: SuiObjectChange[] | null;
1982
- rawEffects?: number[];
1983
- /**
1984
- * BCS encoded [SenderSignedData] that includes input object references returns empty array if
1985
- * `show_raw_transaction` is false
1986
- */
1987
- rawTransaction?: string;
1988
- timestampMs?: string | null;
1989
- /** Transaction input data */
1990
- transaction?: SuiTransactionBlock | null;
1991
- }
1992
- /**
1993
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
1994
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
1995
- */
1996
- export interface SuiTransactionBlockResponseOptions {
1997
- /** Whether to show balance_changes. Default to be False */
1998
- showBalanceChanges?: boolean;
1999
- /** Whether to show transaction effects. Default to be False */
2000
- showEffects?: boolean;
2001
- /** Whether to show transaction events. Default to be False */
2002
- showEvents?: boolean;
2003
- /** Whether to show transaction input data. Default to be False */
2004
- showInput?: boolean;
2005
- /** Whether to show object_changes. Default to be False */
2006
- showObjectChanges?: boolean;
2007
- /** Whether to show raw transaction effects. Default to be False */
2008
- showRawEffects?: boolean;
2009
- /** Whether to show bcs-encoded transaction input data */
2010
- showRawInput?: boolean;
2011
- }
2012
- /**
2013
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
2014
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
2015
- */
2016
- export interface SuiTransactionBlockResponseQuery {
2017
- /** If None, no filter will be applied */
2018
- filter?: TransactionFilter | null;
2019
- /** config which fields to include in the response, by default only digest is included */
2020
- options?: SuiTransactionBlockResponseOptions | null;
2021
- }
2022
- /**
2023
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
2024
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
2025
- */
2026
- export type TransactionFilter =
2027
- /** CURRENTLY NOT SUPPORTED. Query by checkpoint. */
2028
- | {
2029
- Checkpoint: string;
2030
- } /** Query by move function. */
2031
- | {
2032
- MoveFunction: {
2033
- function?: string | null;
2034
- module?: string | null;
2035
- package: string;
2036
- };
2037
- } /** Query by input object. */
2038
- | {
2039
- InputObject: string;
2040
- } /** Query by changed object, including created, mutated and unwrapped objects. */
2041
- | {
2042
- ChangedObject: string;
2043
- } /** Query for transactions that touch this object. */
2044
- | {
2045
- AffectedObject: string;
2046
- } /** Query by sender address. */
2047
- | {
2048
- FromAddress: string;
2049
- } /** Query by recipient address. */
2050
- | {
2051
- ToAddress: string;
2052
- } /** Query by sender and recipient address. */
2053
- | {
2054
- FromAndToAddress: {
2055
- from: string;
2056
- to: string;
2057
- };
2058
- } /** CURRENTLY NOT SUPPORTED. Query txs that have a given address as sender or recipient. */
2059
- | {
2060
- FromOrToAddress: {
2061
- addr: string;
2062
- };
2063
- } /** Query by transaction kind */
2064
- | {
2065
- TransactionKind: string;
2066
- } /** Query transactions of any given kind in the input. */
2067
- | {
2068
- TransactionKindIn: string[];
2069
- };
2070
- /**
2071
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
2072
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
2073
- */
2074
- export interface TransferObjectParams {
2075
- objectId: string;
2076
- recipient: string;
2077
- }
2078
- /**
2079
- * Identifies a struct and the module it was defined in
2080
- *
2081
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
2082
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
2083
- */
2084
- export interface TypeOrigin {
2085
- datatype_name: string;
2086
- module_name: string;
2087
- package: string;
2088
- }
2089
- /**
2090
- * Upgraded package info for the linkage table
2091
- *
2092
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
2093
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
2094
- */
2095
- export interface UpgradeInfo {
2096
- /** ID of the upgraded packages */
2097
- upgraded_id: string;
2098
- /** Version of the upgraded package */
2099
- upgraded_version: string;
2100
- }
2101
- /**
2102
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
2103
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
2104
- */
2105
- export interface ValidatorApy {
2106
- address: string;
2107
- apy: number;
2108
- }
2109
- /**
2110
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
2111
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
2112
- */
2113
- export interface ValidatorsApy {
2114
- apys: ValidatorApy[];
2115
- epoch: string;
2116
- }
2117
- /**
2118
- * An zk login authenticator with all the necessary fields.
2119
- *
2120
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
2121
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
2122
- */
2123
- export interface ZkLoginAuthenticator {
2124
- inputs: ZkLoginInputs;
2125
- maxEpoch: string;
2126
- userSignature: Signature;
2127
- }
2128
- /**
2129
- * All inputs required for the zk login proof verification and other public inputs.
2130
- *
2131
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
2132
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
2133
- */
2134
- export interface ZkLoginInputs {
2135
- addressSeed: string;
2136
- headerBase64: string;
2137
- issBase64Details: Claim;
2138
- proofPoints: ZkLoginProof;
2139
- }
2140
- /**
2141
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
2142
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
2143
- */
2144
- export type ZkLoginIntentScope = 'TransactionData' | 'PersonalMessage';
2145
- /**
2146
- * The struct for zk login proof.
2147
- *
2148
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
2149
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
2150
- */
2151
- export interface ZkLoginProof {
2152
- a: string[];
2153
- b: string[][];
2154
- c: string[];
2155
- }
2156
- /**
2157
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
2158
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
2159
- */
2160
- export interface ZkLoginVerifyResult {
2161
- /** The errors field captures any verification error */
2162
- errors: string[];
2163
- /** The boolean result of the verification. If true, errors should be empty. */
2164
- success: boolean;
2165
- }