@mysten/sui 2.39.1 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (425) hide show
  1. package/CHANGELOG.md +169 -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 +5 -3
  28. package/dist/client/index.mjs +6 -3
  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 +17 -0
  64. package/dist/client/transaction-data.d.mts.map +1 -0
  65. package/dist/client/transaction-data.mjs +472 -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 +2 -2
  72. package/dist/client/utils.d.mts.map +1 -1
  73. package/dist/client/utils.mjs +91 -30
  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 +8 -8
  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 +294 -118
  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/forking/v1alpha/forking_service.client.d.mts +4 -4
  137. package/dist/grpc/proto/sui/rpc/v2/error_reason.d.mts +176 -1
  138. package/dist/grpc/proto/sui/rpc/v2/error_reason.d.mts.map +1 -1
  139. package/dist/grpc/proto/sui/rpc/v2/error_reason.mjs +175 -0
  140. package/dist/grpc/proto/sui/rpc/v2/error_reason.mjs.map +1 -1
  141. package/dist/grpc/proto/sui/rpc/v2/executed_transaction.d.mts +2 -2
  142. package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts +4 -4
  143. package/dist/grpc/proto/sui/rpc/v2/ledger_service.d.mts +111 -0
  144. package/dist/grpc/proto/sui/rpc/v2/ledger_service.d.mts.map +1 -1
  145. package/dist/grpc/proto/sui/rpc/v2/ledger_service.mjs +46 -0
  146. package/dist/grpc/proto/sui/rpc/v2/ledger_service.mjs.map +1 -1
  147. package/dist/grpc/proto/sui/rpc/v2/move_package_service.client.d.mts +4 -4
  148. package/dist/grpc/proto/sui/rpc/v2/move_package_service.d.mts +24 -1
  149. package/dist/grpc/proto/sui/rpc/v2/move_package_service.d.mts.map +1 -1
  150. package/dist/grpc/proto/sui/rpc/v2/move_package_service.mjs +25 -7
  151. package/dist/grpc/proto/sui/rpc/v2/move_package_service.mjs.map +1 -1
  152. package/dist/grpc/proto/sui/rpc/v2/name_service.client.d.mts +4 -4
  153. package/dist/grpc/proto/sui/rpc/v2/object.mjs +1 -1
  154. package/dist/grpc/proto/sui/rpc/v2/query_options.d.mts +111 -9
  155. package/dist/grpc/proto/sui/rpc/v2/query_options.d.mts.map +1 -1
  156. package/dist/grpc/proto/sui/rpc/v2/query_options.mjs +63 -19
  157. package/dist/grpc/proto/sui/rpc/v2/query_options.mjs.map +1 -1
  158. package/dist/grpc/proto/sui/rpc/v2/signature.d.mts +5 -5
  159. package/dist/grpc/proto/sui/rpc/v2/signature.mjs.map +1 -1
  160. package/dist/grpc/proto/sui/rpc/v2/signature_scheme.d.mts +5 -1
  161. package/dist/grpc/proto/sui/rpc/v2/signature_scheme.d.mts.map +1 -1
  162. package/dist/grpc/proto/sui/rpc/v2/signature_scheme.mjs +4 -0
  163. package/dist/grpc/proto/sui/rpc/v2/signature_scheme.mjs.map +1 -1
  164. package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.mts +4 -4
  165. package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.d.mts +20 -1
  166. package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.d.mts.map +1 -1
  167. package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.mjs +30 -13
  168. package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.mjs.map +1 -1
  169. package/dist/grpc/proto/sui/rpc/v2/state_service.client.d.mts +4 -4
  170. package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.d.mts +20 -14
  171. package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.d.mts.map +1 -1
  172. package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.mjs +8 -5
  173. package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.mjs.map +1 -1
  174. package/dist/grpc/proto/sui/rpc/v2/transaction.d.mts +11 -5
  175. package/dist/grpc/proto/sui/rpc/v2/transaction.d.mts.map +1 -1
  176. package/dist/grpc/proto/sui/rpc/v2/transaction.mjs +6 -0
  177. package/dist/grpc/proto/sui/rpc/v2/transaction.mjs.map +1 -1
  178. package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.d.mts +6 -2
  179. package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.d.mts.map +1 -1
  180. package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.mjs.map +1 -1
  181. package/dist/grpc/proto/types.d.mts +7 -7
  182. package/dist/grpc/proto/types.mjs +3 -2
  183. package/dist/grpc/pull-call.d.mts +20 -0
  184. package/dist/grpc/pull-call.d.mts.map +1 -0
  185. package/dist/grpc/pull-call.mjs +28 -0
  186. package/dist/grpc/pull-call.mjs.map +1 -0
  187. package/dist/grpc/stream/call.mjs +238 -0
  188. package/dist/grpc/stream/call.mjs.map +1 -0
  189. package/dist/grpc/stream/families.d.mts +26 -0
  190. package/dist/grpc/stream/families.d.mts.map +1 -0
  191. package/dist/grpc/stream/families.mjs +145 -0
  192. package/dist/grpc/stream/families.mjs.map +1 -0
  193. package/dist/grpc/stream/index.d.mts +41 -0
  194. package/dist/grpc/stream/index.d.mts.map +1 -0
  195. package/dist/grpc/stream/index.mjs +127 -0
  196. package/dist/grpc/stream/index.mjs.map +1 -0
  197. package/dist/grpc/stream/live.mjs +31 -0
  198. package/dist/grpc/stream/live.mjs.map +1 -0
  199. package/dist/grpc/stream/page.mjs +120 -0
  200. package/dist/grpc/stream/page.mjs.map +1 -0
  201. package/dist/grpc/stream-types.d.mts +28 -0
  202. package/dist/grpc/stream-types.d.mts.map +1 -0
  203. package/dist/grpc/transport.d.mts +8 -3
  204. package/dist/grpc/transport.d.mts.map +1 -1
  205. package/dist/grpc/transport.mjs +88 -45
  206. package/dist/grpc/transport.mjs.map +1 -1
  207. package/dist/jsonRpc/index.d.mts +34 -12
  208. package/dist/jsonRpc/index.d.mts.map +1 -0
  209. package/dist/jsonRpc/index.mjs +39 -5
  210. package/dist/jsonRpc/index.mjs.map +1 -0
  211. package/dist/jsonRpc/types.d.mts +420 -0
  212. package/dist/jsonRpc/types.d.mts.map +1 -0
  213. package/dist/keypairs/passkey/keypair.d.mts +1 -1
  214. package/dist/multisig/publickey.d.mts +12 -4
  215. package/dist/multisig/publickey.d.mts.map +1 -1
  216. package/dist/multisig/publickey.mjs +5 -5
  217. package/dist/multisig/publickey.mjs.map +1 -1
  218. package/dist/multisig/signer.d.mts +1 -1
  219. package/dist/transactions/ObjectCache.d.mts +1 -1
  220. package/dist/transactions/ObjectCache.mjs +5 -5
  221. package/dist/transactions/ObjectCache.mjs.map +1 -1
  222. package/dist/transactions/Transaction.d.mts +10 -9
  223. package/dist/transactions/Transaction.d.mts.map +1 -1
  224. package/dist/transactions/Transaction.mjs +17 -6
  225. package/dist/transactions/Transaction.mjs.map +1 -1
  226. package/dist/transactions/data/internal.d.mts +2 -0
  227. package/dist/transactions/data/internal.d.mts.map +1 -1
  228. package/dist/transactions/data/internal.mjs +2 -1
  229. package/dist/transactions/data/internal.mjs.map +1 -1
  230. package/dist/transactions/executor/parallel.d.mts +2 -2
  231. package/dist/transactions/executor/serial.d.mts +1 -1
  232. package/dist/transactions/executor/serial.mjs +2 -2
  233. package/dist/transactions/executor/serial.mjs.map +1 -1
  234. package/dist/transactions/index.d.mts +3 -2
  235. package/dist/transactions/index.mjs +4 -3
  236. package/dist/transactions/intents/AllowanceBalance.mjs +1 -1
  237. package/dist/transactions/intents/CoinWithBalance.mjs +1 -1
  238. package/dist/transactions/resolve.d.mts +6 -0
  239. package/dist/transactions/resolve.d.mts.map +1 -1
  240. package/dist/transactions/resolve.mjs.map +1 -1
  241. package/dist/transactions/restricted-move-calls.d.mts +25 -0
  242. package/dist/transactions/restricted-move-calls.d.mts.map +1 -0
  243. package/dist/transactions/restricted-move-calls.mjs +47 -0
  244. package/dist/transactions/restricted-move-calls.mjs.map +1 -0
  245. package/dist/transactions/serializer.d.mts +1 -4
  246. package/dist/transactions/serializer.d.mts.map +1 -1
  247. package/dist/transactions/serializer.mjs +1 -44
  248. package/dist/transactions/serializer.mjs.map +1 -1
  249. package/dist/transactions/utils.d.mts +0 -1
  250. package/dist/transactions/utils.d.mts.map +1 -1
  251. package/dist/transactions/utils.mjs.map +1 -1
  252. package/dist/utils/abort.mjs +89 -0
  253. package/dist/utils/abort.mjs.map +1 -0
  254. package/dist/utils/coin-reservation.mjs +1 -4
  255. package/dist/utils/coin-reservation.mjs.map +1 -1
  256. package/dist/utils/index.mjs +1 -1
  257. package/dist/utils/sui-types.mjs +1 -1
  258. package/dist/verify/index.d.mts +2 -2
  259. package/dist/verify/verify.d.mts +74 -24
  260. package/dist/verify/verify.d.mts.map +1 -1
  261. package/dist/verify/verify.mjs +128 -42
  262. package/dist/verify/verify.mjs.map +1 -1
  263. package/dist/version.mjs +1 -1
  264. package/dist/version.mjs.map +1 -1
  265. package/dist/zklogin/bcs.d.mts +14 -14
  266. package/dist/zklogin/publickey.d.mts.map +1 -1
  267. package/dist/zklogin/publickey.mjs +15 -20
  268. package/dist/zklogin/publickey.mjs.map +1 -1
  269. package/docs/bcs.md +2 -2
  270. package/docs/clients/core.md +19 -18
  271. package/docs/clients/executing.md +53 -8
  272. package/docs/clients/graphql.md +81 -11
  273. package/docs/clients/grpc.md +31 -15
  274. package/docs/clients/index.md +8 -7
  275. package/docs/clients/querying.md +134 -30
  276. package/docs/clients/streaming.md +324 -0
  277. package/docs/cryptography/index.md +85 -58
  278. package/docs/llms-index.md +4 -2
  279. package/docs/migrations/sui-2.0/dapp-kit.md +3 -2
  280. package/docs/migrations/sui-2.0/json-rpc-migration.md +106 -79
  281. package/docs/migrations/sui-3.0/index.md +247 -0
  282. package/docs/plugins.md +10 -10
  283. package/docs/sdk-building.md +3 -4
  284. package/docs/transactions/coins-and-balances.md +6 -11
  285. package/docs/transactions/reference.md +36 -1
  286. package/package.json +4 -5
  287. package/src/bcs/bcs.ts +80 -41
  288. package/src/bcs/effects.ts +61 -25
  289. package/src/bcs/index.ts +2 -0
  290. package/src/bcs/transactions.ts +36 -17
  291. package/src/bcs/types.ts +10 -4
  292. package/src/client/core-resolver.ts +3 -5
  293. package/src/client/core.ts +180 -8
  294. package/src/client/errors.ts +12 -0
  295. package/src/client/index.ts +4 -2
  296. package/src/client/mvr.ts +37 -10
  297. package/src/client/query-filters.ts +151 -97
  298. package/src/client/stream/adapter.ts +110 -0
  299. package/src/client/stream/errors.ts +40 -0
  300. package/src/client/stream/filter.ts +17 -0
  301. package/src/client/stream/follow.ts +63 -0
  302. package/src/client/stream/index.ts +9 -0
  303. package/src/client/stream/pager.ts +158 -0
  304. package/src/client/stream/plan.ts +147 -0
  305. package/src/client/stream/position.ts +143 -0
  306. package/src/client/stream/run.ts +147 -0
  307. package/src/client/stream/session.ts +259 -0
  308. package/src/client/stream/status.ts +44 -0
  309. package/src/client/stream/token.ts +104 -0
  310. package/src/client/transaction-data.ts +610 -0
  311. package/src/client/transaction-resolver.ts +158 -69
  312. package/src/client/types.ts +530 -115
  313. package/src/client/utils.ts +146 -61
  314. package/src/cryptography/publickey.ts +12 -1
  315. package/src/cryptography/signature.ts +6 -3
  316. package/src/graphql/client.ts +204 -135
  317. package/src/graphql/core.ts +446 -139
  318. package/src/graphql/errors.ts +24 -0
  319. package/src/graphql/filters.ts +48 -0
  320. package/src/graphql/generated/queries.ts +1455 -277
  321. package/src/graphql/generated/schema.graphql +282 -9
  322. package/src/graphql/generated/tada-env.ts +933 -4
  323. package/src/graphql/queries/checkpoints.graphql +34 -0
  324. package/src/graphql/queries/getDynamicFields.graphql +1 -0
  325. package/src/graphql/queries/listEvents.graphql +16 -24
  326. package/src/graphql/queries/streams.graphql +212 -0
  327. package/src/graphql/queries/transactions.graphql +71 -28
  328. package/src/graphql/queries/verifySignature.graphql +17 -0
  329. package/src/graphql/sse-parser.ts +99 -0
  330. package/src/graphql/stream/families.ts +515 -0
  331. package/src/graphql/stream/index.ts +55 -0
  332. package/src/graphql/stream/live.ts +70 -0
  333. package/src/graphql/stream/page.ts +47 -0
  334. package/src/graphql/stream/query.ts +52 -0
  335. package/src/graphql/subscribe.ts +83 -0
  336. package/src/grpc/client.ts +81 -79
  337. package/src/grpc/core.ts +388 -274
  338. package/src/grpc/filters.ts +59 -60
  339. package/src/grpc/grpc-web-pull.ts +360 -0
  340. package/src/grpc/index.ts +5 -0
  341. package/src/grpc/network-error.ts +33 -0
  342. package/src/grpc/proto/sui/rpc/v2/error_reason.ts +175 -0
  343. package/src/grpc/proto/sui/rpc/v2/ledger_service.ts +145 -0
  344. package/src/grpc/proto/sui/rpc/v2/move_package_service.ts +43 -1
  345. package/src/grpc/proto/sui/rpc/v2/query_options.ts +132 -8
  346. package/src/grpc/proto/sui/rpc/v2/signature.ts +4 -4
  347. package/src/grpc/proto/sui/rpc/v2/signature_scheme.ts +4 -0
  348. package/src/grpc/proto/sui/rpc/v2/signature_verification_service.ts +30 -0
  349. package/src/grpc/proto/sui/rpc/v2/subscription_service.client.ts +16 -10
  350. package/src/grpc/proto/sui/rpc/v2/transaction.ts +6 -0
  351. package/src/grpc/proto/sui/rpc/v2/transaction_execution_service.ts +5 -1
  352. package/src/grpc/pull-call.ts +54 -0
  353. package/src/grpc/stream/call.ts +317 -0
  354. package/src/grpc/stream/families.ts +228 -0
  355. package/src/grpc/stream/index.ts +182 -0
  356. package/src/grpc/stream/live.ts +33 -0
  357. package/src/grpc/stream/page.ts +161 -0
  358. package/src/grpc/stream-types.ts +33 -0
  359. package/src/grpc/transport.ts +116 -59
  360. package/src/jsonRpc/index.ts +60 -17
  361. package/src/jsonRpc/types.ts +421 -0
  362. package/src/multisig/publickey.ts +19 -7
  363. package/src/transactions/ObjectCache.ts +6 -6
  364. package/src/transactions/Transaction.ts +30 -6
  365. package/src/transactions/data/internal.ts +2 -0
  366. package/src/transactions/executor/serial.ts +2 -2
  367. package/src/transactions/index.ts +8 -1
  368. package/src/transactions/resolve.ts +6 -0
  369. package/src/transactions/restricted-move-calls.ts +87 -0
  370. package/src/transactions/serializer.ts +0 -70
  371. package/src/transactions/utils.ts +0 -37
  372. package/src/utils/abort.ts +101 -0
  373. package/src/verify/index.ts +1 -0
  374. package/src/verify/verify.ts +190 -62
  375. package/src/version.ts +1 -1
  376. package/src/zklogin/publickey.ts +18 -34
  377. package/dist/client/core-resolver.d.mts +0 -9
  378. package/dist/client/core-resolver.d.mts.map +0 -1
  379. package/dist/jsonRpc/client.d.mts +0 -507
  380. package/dist/jsonRpc/client.d.mts.map +0 -1
  381. package/dist/jsonRpc/client.mjs +0 -868
  382. package/dist/jsonRpc/client.mjs.map +0 -1
  383. package/dist/jsonRpc/core.d.mts +0 -168
  384. package/dist/jsonRpc/core.d.mts.map +0 -1
  385. package/dist/jsonRpc/core.mjs +0 -1054
  386. package/dist/jsonRpc/core.mjs.map +0 -1
  387. package/dist/jsonRpc/errors.d.mts +0 -27
  388. package/dist/jsonRpc/errors.d.mts.map +0 -1
  389. package/dist/jsonRpc/errors.mjs +0 -50
  390. package/dist/jsonRpc/errors.mjs.map +0 -1
  391. package/dist/jsonRpc/http-transport.d.mts +0 -62
  392. package/dist/jsonRpc/http-transport.d.mts.map +0 -1
  393. package/dist/jsonRpc/http-transport.mjs +0 -60
  394. package/dist/jsonRpc/http-transport.mjs.map +0 -1
  395. package/dist/jsonRpc/network.d.mts +0 -9
  396. package/dist/jsonRpc/network.d.mts.map +0 -1
  397. package/dist/jsonRpc/network.mjs +0 -18
  398. package/dist/jsonRpc/network.mjs.map +0 -1
  399. package/dist/jsonRpc/types/chain.d.mts +0 -169
  400. package/dist/jsonRpc/types/chain.d.mts.map +0 -1
  401. package/dist/jsonRpc/types/changes.d.mts +0 -48
  402. package/dist/jsonRpc/types/changes.d.mts.map +0 -1
  403. package/dist/jsonRpc/types/coins.d.mts +0 -15
  404. package/dist/jsonRpc/types/coins.d.mts.map +0 -1
  405. package/dist/jsonRpc/types/common.d.mts +0 -9
  406. package/dist/jsonRpc/types/common.d.mts.map +0 -1
  407. package/dist/jsonRpc/types/generated.d.mts +0 -1976
  408. package/dist/jsonRpc/types/generated.d.mts.map +0 -1
  409. package/dist/jsonRpc/types/index.d.mts +0 -6
  410. package/dist/jsonRpc/types/params.d.mts +0 -898
  411. package/dist/jsonRpc/types/params.d.mts.map +0 -1
  412. package/src/graphql/generated/tsconfig.tada.json +0 -11
  413. package/src/graphql/queries/verifyZkLoginSignature.graphql +0 -15
  414. package/src/jsonRpc/client.ts +0 -1252
  415. package/src/jsonRpc/core.ts +0 -1557
  416. package/src/jsonRpc/errors.ts +0 -57
  417. package/src/jsonRpc/http-transport.ts +0 -118
  418. package/src/jsonRpc/network.ts +0 -21
  419. package/src/jsonRpc/types/chain.ts +0 -190
  420. package/src/jsonRpc/types/changes.ts +0 -35
  421. package/src/jsonRpc/types/coins.ts +0 -14
  422. package/src/jsonRpc/types/common.ts +0 -8
  423. package/src/jsonRpc/types/generated.ts +0 -2165
  424. package/src/jsonRpc/types/index.ts +0 -9
  425. package/src/jsonRpc/types/params.ts +0 -908
@@ -1,908 +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
- import type * as RpcTypes from './generated.js';
14
- import type { Transaction } from '../../transactions/index.js';
15
- /**
16
- * Runs the transaction in dev-inspect mode. Which allows for nearly any transaction (or Move call)
17
- * with any arguments. Detailed results are provided, including both the transaction effects and any
18
- * return values.
19
- *
20
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
21
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
22
- */
23
- export interface DevInspectTransactionBlockParams {
24
- sender: string;
25
- /** BCS encoded TransactionKind(as opposed to TransactionData, which include gasBudget and gasPrice) */
26
- transactionBlock: Transaction | Uint8Array | string;
27
- /** Gas is not charged, but gas usage is still calculated. Default to use reference gas price */
28
- gasPrice?: bigint | number | null | undefined;
29
- /** The epoch to perform the call. Will be set from the system state object if not provided */
30
- epoch?: string | null | undefined;
31
- /** Additional arguments including gas_budget, gas_objects, gas_sponsor and skip_checks. */
32
- additionalArgs?: RpcTypes.DevInspectArgs | null | undefined;
33
- signal?: AbortSignal;
34
- }
35
- /**
36
- * Return transaction execution effects including the gas cost summary, while the effects are not
37
- * committed to the chain.
38
- *
39
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
40
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
41
- */
42
- export interface DryRunTransactionBlockParams {
43
- transactionBlock: Uint8Array | string;
44
- signal?: AbortSignal;
45
- }
46
- /**
47
- * Execute the transaction and wait for results if desired. Request types: 1. WaitForEffectsCert: waits
48
- * for TransactionEffectsCert and then return to client. This mode is a proxy for transaction
49
- * finality. 2. WaitForLocalExecution: waits for TransactionEffectsCert and make sure the node executed
50
- * the transaction locally before returning the client. The local execution makes sure this node is
51
- * aware of this transaction when client fires subsequent queries. However if the node fails to execute
52
- * the transaction locally in a timely manner, a bool type in the response is set to false to indicated
53
- * the case. request_type is default to be `WaitForEffectsCert` unless options.show_events or
54
- * options.show_effects is true
55
- *
56
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
57
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
58
- */
59
- export interface ExecuteTransactionBlockParams {
60
- /** BCS serialized transaction data bytes without its type tag, as base-64 encoded string. */
61
- transactionBlock: Uint8Array | string;
62
- /**
63
- * A list of signatures (`flag || signature || pubkey` bytes, as base-64 encoded string). Signature is
64
- * committed to the intent message of the transaction data, as base-64 encoded string.
65
- */
66
- signature: string | string[];
67
- /** options for specifying the content to be returned */
68
- options?: RpcTypes.SuiTransactionBlockResponseOptions | null | undefined;
69
- /** @deprecated requestType is deprecated and should not be used */
70
- requestType?: RpcTypes.ExecuteTransactionRequestType | null | undefined;
71
- signal?: AbortSignal;
72
- }
73
- /**
74
- * Return the first four bytes of the chain's genesis checkpoint digest.
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 GetChainIdentifierParams {
80
- signal?: AbortSignal;
81
- }
82
- /**
83
- * Return a checkpoint
84
- *
85
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
86
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
87
- */
88
- export interface GetCheckpointParams {
89
- /** Checkpoint identifier, can use either checkpoint digest, or checkpoint sequence number as input. */
90
- id: RpcTypes.CheckpointId;
91
- signal?: AbortSignal;
92
- }
93
- /**
94
- * Return paginated list of checkpoints
95
- *
96
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
97
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
98
- */
99
- export interface GetCheckpointsParams {
100
- /**
101
- * An optional paging cursor. If provided, the query will start from the next item after the specified
102
- * cursor. Default to start from the first item if not specified.
103
- */
104
- cursor?: string | null | undefined;
105
- /** Maximum item returned per page, default to [QUERY_MAX_RESULT_LIMIT_CHECKPOINTS] if not specified. */
106
- limit?: number | null | undefined;
107
- /** query result ordering, default to false (ascending order), oldest record first. */
108
- descendingOrder: boolean;
109
- signal?: AbortSignal;
110
- }
111
- /**
112
- * Return transaction events.
113
- *
114
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
115
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
116
- */
117
- export interface GetEventsParams {
118
- /** the event query criteria. */
119
- transactionDigest: string;
120
- signal?: AbortSignal;
121
- }
122
- /**
123
- * Return the sequence number of the latest checkpoint that has been executed
124
- *
125
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
126
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
127
- */
128
- export interface GetLatestCheckpointSequenceNumberParams {
129
- signal?: AbortSignal;
130
- }
131
- /**
132
- * Return the argument types of a Move function, based on normalized Type.
133
- *
134
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
135
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
136
- */
137
- export interface GetMoveFunctionArgTypesParams {
138
- package: string;
139
- module: string;
140
- function: string;
141
- signal?: AbortSignal;
142
- }
143
- /**
144
- * Return a structured representation of Move function
145
- *
146
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
147
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
148
- */
149
- export interface GetNormalizedMoveFunctionParams {
150
- package: string;
151
- module: string;
152
- function: string;
153
- signal?: AbortSignal;
154
- }
155
- /**
156
- * Return a structured representation of Move module
157
- *
158
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
159
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
160
- */
161
- export interface GetNormalizedMoveModuleParams {
162
- package: string;
163
- module: string;
164
- signal?: AbortSignal;
165
- }
166
- /**
167
- * Return structured representations of all modules in the given package
168
- *
169
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
170
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
171
- */
172
- export interface GetNormalizedMoveModulesByPackageParams {
173
- package: string;
174
- signal?: AbortSignal;
175
- }
176
- /**
177
- * Return a structured representation of Move struct
178
- *
179
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
180
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
181
- */
182
- export interface GetNormalizedMoveStructParams {
183
- package: string;
184
- module: string;
185
- struct: string;
186
- signal?: AbortSignal;
187
- }
188
- /**
189
- * Return the object information for a specified object
190
- *
191
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
192
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
193
- */
194
- export interface GetObjectParams {
195
- /** the ID of the queried object */
196
- id: string;
197
- /** options for specifying the content to be returned */
198
- options?: RpcTypes.SuiObjectDataOptions | null | undefined;
199
- signal?: AbortSignal;
200
- }
201
- /**
202
- * Return the protocol config table for the given version number. If none is specified, the node uses
203
- * the version of the latest epoch it has processed.
204
- *
205
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
206
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
207
- */
208
- export interface GetProtocolConfigParams {
209
- /**
210
- * An optional protocol version specifier. If omitted, the latest protocol config table for the node
211
- * will be returned.
212
- */
213
- version?: string | null | undefined;
214
- signal?: AbortSignal;
215
- }
216
- /**
217
- * Return the total number of transaction blocks known to the server.
218
- *
219
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
220
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
221
- */
222
- export interface GetTotalTransactionBlocksParams {
223
- signal?: AbortSignal;
224
- }
225
- /**
226
- * Return the transaction response object.
227
- *
228
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
229
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
230
- */
231
- export interface GetTransactionBlockParams {
232
- /** the digest of the queried transaction */
233
- digest: string;
234
- /** options for specifying the content to be returned */
235
- options?: RpcTypes.SuiTransactionBlockResponseOptions | null | undefined;
236
- signal?: AbortSignal;
237
- }
238
- /**
239
- * Return the object data for a list of objects
240
- *
241
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
242
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
243
- */
244
- export interface MultiGetObjectsParams {
245
- /** the IDs of the queried objects */
246
- ids: string[];
247
- /** options for specifying the content to be returned */
248
- options?: RpcTypes.SuiObjectDataOptions | null | undefined;
249
- signal?: AbortSignal;
250
- }
251
- /**
252
- * Returns an ordered list of transaction responses The method will throw an error if the input
253
- * contains any duplicate or the input size exceeds QUERY_MAX_RESULT_LIMIT
254
- *
255
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
256
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
257
- */
258
- export interface MultiGetTransactionBlocksParams {
259
- /** A list of transaction digests. */
260
- digests: string[];
261
- /** config options to control which fields to fetch */
262
- options?: RpcTypes.SuiTransactionBlockResponseOptions | null | undefined;
263
- signal?: AbortSignal;
264
- }
265
- /**
266
- * Note there is no software-level guarantee/SLA that objects with past versions can be retrieved by
267
- * this API, even if the object and version exists/existed. The result may vary across nodes depending
268
- * on their pruning policies. Return the object information for a specified version
269
- *
270
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
271
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
272
- */
273
- export interface TryGetPastObjectParams {
274
- /** the ID of the queried object */
275
- id: string;
276
- /** the version of the queried object. If None, default to the latest known version */
277
- version: number;
278
- /** options for specifying the content to be returned */
279
- options?: RpcTypes.SuiObjectDataOptions | null | undefined;
280
- signal?: AbortSignal;
281
- }
282
- /**
283
- * Note there is no software-level guarantee/SLA that objects with past versions can be retrieved by
284
- * this API, even if the object and version exists/existed. The result may vary across nodes depending
285
- * on their pruning policies. Return the object information for a specified version
286
- *
287
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
288
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
289
- */
290
- export interface TryMultiGetPastObjectsParams {
291
- /** a vector of object and versions to be queried */
292
- pastObjects: RpcTypes.GetPastObjectRequest[];
293
- /** options for specifying the content to be returned */
294
- options?: RpcTypes.SuiObjectDataOptions | null | undefined;
295
- signal?: AbortSignal;
296
- }
297
- /**
298
- * Verify a zklogin signature for the given bytes, intent scope and author.
299
- *
300
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
301
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
302
- */
303
- export interface VerifyZkLoginSignatureParams {
304
- /**
305
- * The Base64 string of bcs bytes for raw transaction data or personal message indicated by
306
- * intent_scope.
307
- */
308
- bytes: string;
309
- /** The Base64 string of the zklogin signature to verify. */
310
- signature: string;
311
- /** The intent scope, either transaction data or personal message. Used to parse bytes. */
312
- intentScope: RpcTypes.ZkLoginIntentScope;
313
- /** The author of the signature. */
314
- author: string;
315
- signal?: AbortSignal;
316
- }
317
- /**
318
- * Return the total coin balance for all coin type, owned by the address owner.
319
- *
320
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
321
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
322
- */
323
- export interface GetAllBalancesParams {
324
- /** the owner's Sui address */
325
- owner: string;
326
- signal?: AbortSignal;
327
- }
328
- /**
329
- * Return all Coin objects owned by an address.
330
- *
331
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
332
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
333
- */
334
- export interface GetAllCoinsParams {
335
- /** the owner's Sui address */
336
- owner: string;
337
- /** optional paging cursor */
338
- cursor?: string | null | undefined;
339
- /** maximum number of items per page */
340
- limit?: number | null | undefined;
341
- signal?: AbortSignal;
342
- }
343
- /**
344
- * Return the total coin balance for one coin type, owned by the address owner.
345
- *
346
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
347
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
348
- */
349
- export interface GetBalanceParams {
350
- /** the owner's Sui address */
351
- owner: string;
352
- /**
353
- * optional type names for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC),
354
- * default to 0x2::sui::SUI if not specified.
355
- */
356
- coinType?: string | null | undefined;
357
- signal?: AbortSignal;
358
- }
359
- /**
360
- * Return metadata (e.g., symbol, decimals) for a coin. Note that if the coin's metadata was wrapped in
361
- * the transaction that published its marker type, or the latest version of the metadata object is
362
- * wrapped or deleted, it will not be found.
363
- *
364
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
365
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
366
- */
367
- export interface GetCoinMetadataParams {
368
- /** type name for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC) */
369
- coinType: string;
370
- signal?: AbortSignal;
371
- }
372
- /**
373
- * Return all Coin<`coin_type`> objects owned by an address.
374
- *
375
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
376
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
377
- */
378
- export interface GetCoinsParams {
379
- /** the owner's Sui address */
380
- owner: string;
381
- /**
382
- * optional type name for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC),
383
- * default to 0x2::sui::SUI if not specified.
384
- */
385
- coinType?: string | null | undefined;
386
- /** optional paging cursor */
387
- cursor?: string | null | undefined;
388
- /** maximum number of items per page */
389
- limit?: number | null | undefined;
390
- signal?: AbortSignal;
391
- }
392
- /**
393
- * Return the committee information for the asked `epoch`.
394
- *
395
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
396
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
397
- */
398
- export interface GetCommitteeInfoParams {
399
- /** The epoch of interest. If None, default to the latest epoch */
400
- epoch?: string | null | undefined;
401
- signal?: AbortSignal;
402
- }
403
- /**
404
- * Return the dynamic field object information for a specified object
405
- *
406
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
407
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
408
- */
409
- export interface GetDynamicFieldObjectParams {
410
- /** The ID of the queried parent object */
411
- parentId: string;
412
- /** The Name of the dynamic field */
413
- name: RpcTypes.DynamicFieldName;
414
- signal?: AbortSignal;
415
- }
416
- /**
417
- * Return the list of dynamic field objects owned by an object.
418
- *
419
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
420
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
421
- */
422
- export interface GetDynamicFieldsParams {
423
- /** The ID of the parent object */
424
- parentId: string;
425
- /**
426
- * An optional paging cursor. If provided, the query will start from the next item after the specified
427
- * cursor. Default to start from the first item if not specified.
428
- */
429
- cursor?: string | null | undefined;
430
- /** Maximum item returned per page, default to [QUERY_MAX_RESULT_LIMIT] if not specified. */
431
- limit?: number | null | undefined;
432
- signal?: AbortSignal;
433
- }
434
- /**
435
- * Return the latest SUI system state object on-chain.
436
- *
437
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
438
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
439
- */
440
- export interface GetLatestSuiSystemStateParams {
441
- signal?: AbortSignal;
442
- }
443
- /**
444
- * Return the list of objects owned by an address. Note that if the address owns more than
445
- * `QUERY_MAX_RESULT_LIMIT` objects, the pagination is not accurate, because previous page may have
446
- * been updated when the next page is fetched. Please use suix_queryObjects if this is a concern.
447
- *
448
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
449
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
450
- */
451
- export type GetOwnedObjectsParams = {
452
- /** the owner's Sui address */
453
- owner: string;
454
- /**
455
- * An optional paging cursor. If provided, the query will start from the next item after the specified
456
- * cursor. Default to start from the first item if not specified.
457
- */
458
- cursor?: string | null | undefined;
459
- /** Max number of items returned per page, default to [QUERY_MAX_RESULT_LIMIT] if not specified. */
460
- limit?: number | null | undefined;
461
- signal?: AbortSignal;
462
- } & RpcTypes.SuiObjectResponseQuery;
463
- /**
464
- * Return the reference gas price for the network
465
- *
466
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
467
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
468
- */
469
- export interface GetReferenceGasPriceParams {
470
- signal?: AbortSignal;
471
- }
472
- /**
473
- * Return all [DelegatedStake].
474
- *
475
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
476
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
477
- */
478
- export interface GetStakesParams {
479
- owner: string;
480
- signal?: AbortSignal;
481
- }
482
- /**
483
- * Return one or more [DelegatedStake]. If a Stake was withdrawn its status will be Unstaked.
484
- *
485
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
486
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
487
- */
488
- export interface GetStakesByIdsParams {
489
- stakedSuiIds: string[];
490
- signal?: AbortSignal;
491
- }
492
- /**
493
- * Return total supply for a coin
494
- *
495
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
496
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
497
- */
498
- export interface GetTotalSupplyParams {
499
- /** type name for the coin (e.g., 0x168da5bf1f48dafc111b0a488fa454aca95e0b5e::usdc::USDC) */
500
- coinType: string;
501
- signal?: AbortSignal;
502
- }
503
- /**
504
- * Return the validator APY
505
- *
506
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
507
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
508
- */
509
- export interface GetValidatorsApyParams {
510
- signal?: AbortSignal;
511
- }
512
- /**
513
- * Return list of events for a specified query criteria.
514
- *
515
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
516
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
517
- */
518
- export interface QueryEventsParams {
519
- /**
520
- * The event query criteria. See [Event filter](https://docs.sui.io/build/event_api#event-filters)
521
- * documentation for examples.
522
- */
523
- query: RpcTypes.SuiEventFilter;
524
- /** optional paging cursor */
525
- cursor?: RpcTypes.EventId | null | undefined;
526
- /** maximum number of items per page, default to [QUERY_MAX_RESULT_LIMIT] if not specified. */
527
- limit?: number | null | undefined;
528
- /** query result ordering, default to false (ascending order), oldest record first. */
529
- order?: 'ascending' | 'descending' | null | undefined;
530
- signal?: AbortSignal;
531
- }
532
- /**
533
- * Return list of transactions for a specified query criteria.
534
- *
535
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
536
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
537
- */
538
- export type QueryTransactionBlocksParams = {
539
- /**
540
- * An optional paging cursor. If provided, the query will start from the next item after the specified
541
- * cursor. Default to start from the first item if not specified.
542
- */
543
- cursor?: string | null | undefined;
544
- /** Maximum item returned per page, default to QUERY_MAX_RESULT_LIMIT if not specified. */
545
- limit?: number | null | undefined;
546
- /** query result ordering, default to false (ascending order), oldest record first. */
547
- order?: 'ascending' | 'descending' | null | undefined;
548
- signal?: AbortSignal;
549
- } & RpcTypes.SuiTransactionBlockResponseQuery;
550
- /**
551
- * Return the resolved address given resolver and name
552
- *
553
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
554
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
555
- */
556
- export interface ResolveNameServiceAddressParams {
557
- /** The name to resolve */
558
- name: string;
559
- signal?: AbortSignal;
560
- }
561
- /**
562
- * Return the resolved names given address, if multiple names are resolved, the first one is the
563
- * primary name.
564
- *
565
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
566
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
567
- */
568
- export interface ResolveNameServiceNamesParams {
569
- /** The address to resolve */
570
- address: string;
571
- cursor?: string | null | undefined;
572
- limit?: number | null | undefined;
573
- signal?: AbortSignal;
574
- }
575
- /**
576
- * Subscribe to a stream of Sui event
577
- *
578
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
579
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
580
- */
581
- export interface SubscribeEventParams {
582
- /**
583
- * The filter criteria of the event stream. See
584
- * [Event filter](https://docs.sui.io/build/event_api#event-filters) documentation for examples.
585
- */
586
- filter: RpcTypes.SuiEventFilter;
587
- signal?: AbortSignal;
588
- }
589
- /**
590
- * Subscribe to a stream of Sui transaction effects
591
- *
592
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
593
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
594
- */
595
- export interface SubscribeTransactionParams {
596
- filter: RpcTypes.TransactionFilter;
597
- signal?: AbortSignal;
598
- }
599
- /**
600
- * Create an unsigned batched transaction.
601
- *
602
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
603
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
604
- */
605
- export interface UnsafeBatchTransactionParams {
606
- /** the transaction signer's Sui address */
607
- signer: string;
608
- /** list of transaction request parameters */
609
- singleTransactionParams: RpcTypes.RPCTransactionRequestParams[];
610
- /**
611
- * gas object to be used in this transaction, node will pick one from the signer's possession if not
612
- * provided
613
- */
614
- gas?: string | null | undefined;
615
- /** the gas budget, the transaction will fail if the gas cost exceed the budget */
616
- gasBudget: string;
617
- /** Whether this is a regular transaction or a Dev Inspect Transaction */
618
- txnBuilderMode?: RpcTypes.SuiTransactionBlockBuilderMode | null | undefined;
619
- signal?: AbortSignal;
620
- }
621
- /**
622
- * Create an unsigned transaction to merge multiple coins into one coin.
623
- *
624
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
625
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
626
- */
627
- export interface UnsafeMergeCoinsParams {
628
- /** the transaction signer's Sui address */
629
- signer: string;
630
- /** the coin object to merge into, this coin will remain after the transaction */
631
- primaryCoin: string;
632
- /**
633
- * the coin object to be merged, this coin will be destroyed, the balance will be added to
634
- * `primary_coin`
635
- */
636
- coinToMerge: string;
637
- /**
638
- * gas object to be used in this transaction, node will pick one from the signer's possession if not
639
- * provided
640
- */
641
- gas?: string | null | undefined;
642
- /** the gas budget, the transaction will fail if the gas cost exceed the budget */
643
- gasBudget: string;
644
- signal?: AbortSignal;
645
- }
646
- /**
647
- * Create an unsigned transaction to execute a Move call on the network, by calling the specified
648
- * function in the module of a given package.
649
- *
650
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
651
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
652
- */
653
- export interface UnsafeMoveCallParams {
654
- /** the transaction signer's Sui address */
655
- signer: string;
656
- /** the Move package ID, e.g. `0x2` */
657
- packageObjectId: string;
658
- /** the Move module name, e.g. `pay` */
659
- module: string;
660
- /** the move function name, e.g. `split` */
661
- function: string;
662
- /** the type arguments of the Move function */
663
- typeArguments: string[];
664
- /**
665
- * the arguments to be passed into the Move function, in [SuiJson](https://docs.sui.io/build/sui-json)
666
- * format
667
- */
668
- arguments: unknown[];
669
- /**
670
- * gas object to be used in this transaction, node will pick one from the signer's possession if not
671
- * provided
672
- */
673
- gas?: string | null | undefined;
674
- /** the gas budget, the transaction will fail if the gas cost exceed the budget */
675
- gasBudget: string;
676
- /**
677
- * Whether this is a Normal transaction or a Dev Inspect Transaction. Default to be
678
- * `SuiTransactionBlockBuilderMode::Commit` when it's None.
679
- */
680
- executionMode?: RpcTypes.SuiTransactionBlockBuilderMode | null | undefined;
681
- signal?: AbortSignal;
682
- }
683
- /**
684
- * Send `Coin<T>` to a list of addresses, where `T` can be any coin type, following a list of amounts,
685
- * The object specified in the `gas` field will be used to pay the gas fee for the transaction. The gas
686
- * object can not appear in `input_coins`. If the gas object is not specified, the RPC server will
687
- * auto-select one.
688
- *
689
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
690
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
691
- */
692
- export interface UnsafePayParams {
693
- /** the transaction signer's Sui address */
694
- signer: string;
695
- /** the Sui coins to be used in this transaction */
696
- inputCoins: string[];
697
- /** the recipients' addresses, the length of this vector must be the same as amounts. */
698
- recipients: string[];
699
- /** the amounts to be transferred to recipients, following the same order */
700
- amounts: string[];
701
- /**
702
- * gas object to be used in this transaction, node will pick one from the signer's possession if not
703
- * provided
704
- */
705
- gas?: string | null | undefined;
706
- /** the gas budget, the transaction will fail if the gas cost exceed the budget */
707
- gasBudget: string;
708
- signal?: AbortSignal;
709
- }
710
- /**
711
- * Send all SUI coins to one recipient. This is for SUI coin only and does not require a separate gas
712
- * coin object. Specifically, what pay_all_sui does are: 1. accumulate all SUI from input coins and
713
- * deposit all SUI to the first input coin 2. transfer the updated first coin to the recipient and also
714
- * use this first coin as gas coin object. 3. the balance of the first input coin after tx is
715
- * sum(input_coins) - actual_gas_cost. 4. all other input coins other than the first are deleted.
716
- *
717
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
718
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
719
- */
720
- export interface UnsafePayAllSuiParams {
721
- /** the transaction signer's Sui address */
722
- signer: string;
723
- /** the Sui coins to be used in this transaction, including the coin for gas payment. */
724
- inputCoins: string[];
725
- /** the recipient address, */
726
- recipient: string;
727
- /** the gas budget, the transaction will fail if the gas cost exceed the budget */
728
- gasBudget: string;
729
- signal?: AbortSignal;
730
- }
731
- /**
732
- * Send SUI coins to a list of addresses, following a list of amounts. This is for SUI coin only and
733
- * does not require a separate gas coin object. Specifically, what pay_sui does are: 1. debit each
734
- * input_coin to create new coin following the order of amounts and assign it to the corresponding
735
- * recipient. 2. accumulate all residual SUI from input coins left and deposit all SUI to the first
736
- * input coin, then use the first input coin as the gas coin object. 3. the balance of the first input
737
- * coin after tx is sum(input_coins) - sum(amounts) - actual_gas_cost 4. all other input coins other
738
- * than the first one are deleted.
739
- *
740
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
741
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
742
- */
743
- export interface UnsafePaySuiParams {
744
- /** the transaction signer's Sui address */
745
- signer: string;
746
- /** the Sui coins to be used in this transaction, including the coin for gas payment. */
747
- inputCoins: string[];
748
- /** the recipients' addresses, the length of this vector must be the same as amounts. */
749
- recipients: string[];
750
- /** the amounts to be transferred to recipients, following the same order */
751
- amounts: string[];
752
- /** the gas budget, the transaction will fail if the gas cost exceed the budget */
753
- gasBudget: string;
754
- signal?: AbortSignal;
755
- }
756
- /**
757
- * Create an unsigned transaction to publish a Move package.
758
- *
759
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
760
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
761
- */
762
- export interface UnsafePublishParams {
763
- /** the transaction signer's Sui address */
764
- sender: string;
765
- /** the compiled bytes of a Move package */
766
- compiledModules: string[];
767
- /** a list of transitive dependency addresses that this set of modules depends on. */
768
- dependencies: string[];
769
- /**
770
- * gas object to be used in this transaction, node will pick one from the signer's possession if not
771
- * provided
772
- */
773
- gas?: string | null | undefined;
774
- /** the gas budget, the transaction will fail if the gas cost exceed the budget */
775
- gasBudget: string;
776
- signal?: AbortSignal;
777
- }
778
- /**
779
- * Add stake to a validator's staking pool using multiple coins and amount.
780
- *
781
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
782
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
783
- */
784
- export interface UnsafeRequestAddStakeParams {
785
- /** the transaction signer's Sui address */
786
- signer: string;
787
- /** Coin<SUI> object to stake */
788
- coins: string[];
789
- /** stake amount */
790
- amount?: string | null | undefined;
791
- /** the validator's Sui address */
792
- validator: string;
793
- /**
794
- * gas object to be used in this transaction, node will pick one from the signer's possession if not
795
- * provided
796
- */
797
- gas?: string | null | undefined;
798
- /** the gas budget, the transaction will fail if the gas cost exceed the budget */
799
- gasBudget: string;
800
- signal?: AbortSignal;
801
- }
802
- /**
803
- * Withdraw stake from a validator's staking pool.
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 interface UnsafeRequestWithdrawStakeParams {
809
- /** the transaction signer's Sui address */
810
- signer: string;
811
- /** StakedSui object ID */
812
- stakedSui: string;
813
- /**
814
- * gas object to be used in this transaction, node will pick one from the signer's possession if not
815
- * provided
816
- */
817
- gas?: string | null | undefined;
818
- /** the gas budget, the transaction will fail if the gas cost exceed the budget */
819
- gasBudget: string;
820
- signal?: AbortSignal;
821
- }
822
- /**
823
- * Create an unsigned transaction to split a coin object into multiple coins.
824
- *
825
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
826
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
827
- */
828
- export interface UnsafeSplitCoinParams {
829
- /** the transaction signer's Sui address */
830
- signer: string;
831
- /** the coin object to be split */
832
- coinObjectId: string;
833
- /** the amounts to split out from the coin */
834
- splitAmounts: string[];
835
- /**
836
- * gas object to be used in this transaction, node will pick one from the signer's possession if not
837
- * provided
838
- */
839
- gas?: string | null | undefined;
840
- /** the gas budget, the transaction will fail if the gas cost exceed the budget */
841
- gasBudget: string;
842
- signal?: AbortSignal;
843
- }
844
- /**
845
- * Create an unsigned transaction to split a coin object into multiple equal-size coins.
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 interface UnsafeSplitCoinEqualParams {
851
- /** the transaction signer's Sui address */
852
- signer: string;
853
- /** the coin object to be split */
854
- coinObjectId: string;
855
- /** the number of coins to split into */
856
- splitCount: string;
857
- /**
858
- * gas object to be used in this transaction, node will pick one from the signer's possession if not
859
- * provided
860
- */
861
- gas?: string | null | undefined;
862
- /** the gas budget, the transaction will fail if the gas cost exceed the budget */
863
- gasBudget: string;
864
- signal?: AbortSignal;
865
- }
866
- /**
867
- * Create an unsigned transaction to transfer an object from one address to another. The object's type
868
- * must allow public transfers
869
- *
870
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
871
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
872
- */
873
- export interface UnsafeTransferObjectParams {
874
- /** the transaction signer's Sui address */
875
- signer: string;
876
- /** the ID of the object to be transferred */
877
- objectId: string;
878
- /**
879
- * gas object to be used in this transaction, node will pick one from the signer's possession if not
880
- * provided
881
- */
882
- gas?: string | null | undefined;
883
- /** the gas budget, the transaction will fail if the gas cost exceed the budget */
884
- gasBudget: string;
885
- /** the recipient's Sui address */
886
- recipient: string;
887
- signal?: AbortSignal;
888
- }
889
- /**
890
- * Create an unsigned transaction to send SUI coin object to a Sui address. The SUI object is also used
891
- * as the gas object.
892
- *
893
- * @deprecated JSON-RPC APIs are deprecated in the Sui TypeScript SDK. Use `SuiGrpcClient` from
894
- * `@mysten/sui/grpc` or `SuiGraphQLClient` from `@mysten/sui/graphql` instead.
895
- */
896
- export interface UnsafeTransferSuiParams {
897
- /** the transaction signer's Sui address */
898
- signer: string;
899
- /** the Sui coin object to be used in this transaction */
900
- suiObjectId: string;
901
- /** the gas budget, the transaction will fail if the gas cost exceed the budget */
902
- gasBudget: string;
903
- /** the recipient's Sui address */
904
- recipient: string;
905
- /** the amount to be split out and transferred */
906
- amount?: string | null | undefined;
907
- signal?: AbortSignal;
908
- }