@haneullabs/haneul 2.5.2 → 2.13.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 (442) hide show
  1. package/CHANGELOG.md +129 -0
  2. package/README.md +36 -36
  3. package/dist/bcs/bcs.d.mts +6 -7
  4. package/dist/bcs/bcs.d.mts.map +1 -1
  5. package/dist/bcs/bcs.mjs.map +1 -1
  6. package/dist/bcs/effects.mjs.map +1 -1
  7. package/dist/bcs/index.d.mts +2 -2
  8. package/dist/bcs/index.d.mts.map +1 -1
  9. package/dist/bcs/index.mjs +2 -2
  10. package/dist/bcs/index.mjs.map +1 -1
  11. package/dist/bcs/pure.d.mts.map +1 -1
  12. package/dist/bcs/type-tag-serializer.d.mts.map +1 -1
  13. package/dist/bcs/types.d.mts +0 -1
  14. package/dist/bcs/types.d.mts.map +1 -1
  15. package/dist/client/cache.d.mts.map +1 -1
  16. package/dist/client/client.d.mts.map +1 -1
  17. package/dist/client/core-resolver.d.mts.map +1 -1
  18. package/dist/client/core-resolver.mjs +87 -68
  19. package/dist/client/core-resolver.mjs.map +1 -1
  20. package/dist/client/core.d.mts +9 -8
  21. package/dist/client/core.d.mts.map +1 -1
  22. package/dist/client/core.mjs +29 -10
  23. package/dist/client/core.mjs.map +1 -1
  24. package/dist/client/errors.d.mts.map +1 -1
  25. package/dist/client/mvr.d.mts +0 -1
  26. package/dist/client/mvr.d.mts.map +1 -1
  27. package/dist/client/types.d.mts +110 -24
  28. package/dist/client/types.d.mts.map +1 -1
  29. package/dist/client/utils.d.mts.map +1 -1
  30. package/dist/client/utils.mjs +7 -7
  31. package/dist/client/utils.mjs.map +1 -1
  32. package/dist/cryptography/index.d.mts +2 -2
  33. package/dist/cryptography/index.mjs +2 -2
  34. package/dist/cryptography/intent.d.mts +2 -2
  35. package/dist/cryptography/intent.d.mts.map +1 -1
  36. package/dist/cryptography/intent.mjs +2 -2
  37. package/dist/cryptography/intent.mjs.map +1 -1
  38. package/dist/cryptography/keypair.d.mts +3 -3
  39. package/dist/cryptography/keypair.d.mts.map +1 -1
  40. package/dist/cryptography/keypair.mjs +3 -3
  41. package/dist/cryptography/keypair.mjs.map +1 -1
  42. package/dist/cryptography/mnemonics.d.mts +5 -5
  43. package/dist/cryptography/mnemonics.d.mts.map +1 -1
  44. package/dist/cryptography/mnemonics.mjs +7 -7
  45. package/dist/cryptography/mnemonics.mjs.map +1 -1
  46. package/dist/cryptography/publickey.d.mts +1 -2
  47. package/dist/cryptography/publickey.d.mts.map +1 -1
  48. package/dist/cryptography/publickey.mjs +7 -7
  49. package/dist/cryptography/publickey.mjs.map +1 -1
  50. package/dist/cryptography/signature-scheme.d.mts.map +1 -1
  51. package/dist/cryptography/signature.d.mts +10 -13
  52. package/dist/cryptography/signature.d.mts.map +1 -1
  53. package/dist/cryptography/signature.mjs +2 -2
  54. package/dist/cryptography/signature.mjs.map +1 -1
  55. package/dist/faucet/faucet.d.mts +2 -2
  56. package/dist/faucet/faucet.d.mts.map +1 -1
  57. package/dist/faucet/faucet.mjs +2 -2
  58. package/dist/faucet/faucet.mjs.map +1 -1
  59. package/dist/faucet/index.d.mts +2 -2
  60. package/dist/faucet/index.mjs +2 -2
  61. package/dist/graphql/client.d.mts +20 -5
  62. package/dist/graphql/client.d.mts.map +1 -1
  63. package/dist/graphql/client.mjs +55 -7
  64. package/dist/graphql/client.mjs.map +1 -1
  65. package/dist/graphql/core.d.mts +6 -5
  66. package/dist/graphql/core.d.mts.map +1 -1
  67. package/dist/graphql/core.mjs +43 -47
  68. package/dist/graphql/core.mjs.map +1 -1
  69. package/dist/graphql/generated/queries.d.mts +0 -1
  70. package/dist/graphql/generated/queries.d.mts.map +1 -1
  71. package/dist/graphql/generated/queries.mjs +46 -10
  72. package/dist/graphql/generated/queries.mjs.map +1 -1
  73. package/dist/graphql/generated/tada-env.d.mts +706 -98
  74. package/dist/graphql/generated/tada-env.d.mts.map +1 -1
  75. package/dist/graphql/index.d.mts +2 -2
  76. package/dist/graphql/index.mjs +2 -2
  77. package/dist/graphql/schema/index.d.mts +0 -1
  78. package/dist/graphql/schema/index.d.mts.map +1 -1
  79. package/dist/graphql/types.d.mts.map +1 -1
  80. package/dist/grpc/client.d.mts +20 -5
  81. package/dist/grpc/client.d.mts.map +1 -1
  82. package/dist/grpc/client.mjs +47 -7
  83. package/dist/grpc/client.mjs.map +1 -1
  84. package/dist/grpc/core.d.mts +6 -5
  85. package/dist/grpc/core.d.mts.map +1 -1
  86. package/dist/grpc/core.mjs +35 -34
  87. package/dist/grpc/core.mjs.map +1 -1
  88. package/dist/grpc/index.d.mts +2 -2
  89. package/dist/grpc/index.mjs +2 -2
  90. package/dist/grpc/proto/google/protobuf/any.d.mts +0 -1
  91. package/dist/grpc/proto/google/protobuf/any.d.mts.map +1 -1
  92. package/dist/grpc/proto/google/protobuf/duration.d.mts +0 -1
  93. package/dist/grpc/proto/google/protobuf/duration.d.mts.map +1 -1
  94. package/dist/grpc/proto/google/protobuf/field_mask.d.mts +0 -1
  95. package/dist/grpc/proto/google/protobuf/field_mask.d.mts.map +1 -1
  96. package/dist/grpc/proto/google/protobuf/struct.d.mts +1 -2
  97. package/dist/grpc/proto/google/protobuf/struct.d.mts.map +1 -1
  98. package/dist/grpc/proto/google/protobuf/timestamp.d.mts +0 -1
  99. package/dist/grpc/proto/google/protobuf/timestamp.d.mts.map +1 -1
  100. package/dist/grpc/proto/google/rpc/status.d.mts +0 -1
  101. package/dist/grpc/proto/google/rpc/status.d.mts.map +1 -1
  102. package/dist/grpc/proto/haneul/rpc/v2/argument.d.mts +1 -2
  103. package/dist/grpc/proto/haneul/rpc/v2/argument.d.mts.map +1 -1
  104. package/dist/grpc/proto/haneul/rpc/v2/balance_change.d.mts +0 -1
  105. package/dist/grpc/proto/haneul/rpc/v2/balance_change.d.mts.map +1 -1
  106. package/dist/grpc/proto/haneul/rpc/v2/bcs.d.mts +1 -2
  107. package/dist/grpc/proto/haneul/rpc/v2/bcs.d.mts.map +1 -1
  108. package/dist/grpc/proto/haneul/rpc/v2/bcs.mjs.map +1 -1
  109. package/dist/grpc/proto/haneul/rpc/v2/checkpoint.d.mts +0 -1
  110. package/dist/grpc/proto/haneul/rpc/v2/checkpoint.d.mts.map +1 -1
  111. package/dist/grpc/proto/haneul/rpc/v2/checkpoint_contents.d.mts +0 -1
  112. package/dist/grpc/proto/haneul/rpc/v2/checkpoint_contents.d.mts.map +1 -1
  113. package/dist/grpc/proto/haneul/rpc/v2/checkpoint_summary.d.mts +1 -2
  114. package/dist/grpc/proto/haneul/rpc/v2/checkpoint_summary.d.mts.map +1 -1
  115. package/dist/grpc/proto/haneul/rpc/v2/effects.d.mts +5 -6
  116. package/dist/grpc/proto/haneul/rpc/v2/effects.d.mts.map +1 -1
  117. package/dist/grpc/proto/haneul/rpc/v2/epoch.d.mts +0 -1
  118. package/dist/grpc/proto/haneul/rpc/v2/epoch.d.mts.map +1 -1
  119. package/dist/grpc/proto/haneul/rpc/v2/error_reason.d.mts +1 -1
  120. package/dist/grpc/proto/haneul/rpc/v2/error_reason.d.mts.map +1 -1
  121. package/dist/grpc/proto/haneul/rpc/v2/event.d.mts +0 -1
  122. package/dist/grpc/proto/haneul/rpc/v2/event.d.mts.map +1 -1
  123. package/dist/grpc/proto/haneul/rpc/v2/executed_transaction.d.mts +0 -1
  124. package/dist/grpc/proto/haneul/rpc/v2/executed_transaction.d.mts.map +1 -1
  125. package/dist/grpc/proto/haneul/rpc/v2/execution_status.d.mts +8 -9
  126. package/dist/grpc/proto/haneul/rpc/v2/execution_status.d.mts.map +1 -1
  127. package/dist/grpc/proto/haneul/rpc/v2/execution_status.mjs +4 -4
  128. package/dist/grpc/proto/haneul/rpc/v2/execution_status.mjs.map +1 -1
  129. package/dist/grpc/proto/haneul/rpc/v2/gas_cost_summary.d.mts +0 -1
  130. package/dist/grpc/proto/haneul/rpc/v2/gas_cost_summary.d.mts.map +1 -1
  131. package/dist/grpc/proto/haneul/rpc/v2/input.d.mts +3 -4
  132. package/dist/grpc/proto/haneul/rpc/v2/input.d.mts.map +1 -1
  133. package/dist/grpc/proto/haneul/rpc/v2/jwk.d.mts +0 -1
  134. package/dist/grpc/proto/haneul/rpc/v2/jwk.d.mts.map +1 -1
  135. package/dist/grpc/proto/haneul/rpc/v2/ledger_service.client.d.mts +4 -5
  136. package/dist/grpc/proto/haneul/rpc/v2/ledger_service.client.d.mts.map +1 -1
  137. package/dist/grpc/proto/haneul/rpc/v2/ledger_service.d.mts +0 -1
  138. package/dist/grpc/proto/haneul/rpc/v2/ledger_service.d.mts.map +1 -1
  139. package/dist/grpc/proto/haneul/rpc/v2/move_package.d.mts +5 -6
  140. package/dist/grpc/proto/haneul/rpc/v2/move_package.d.mts.map +1 -1
  141. package/dist/grpc/proto/haneul/rpc/v2/move_package_service.client.d.mts +4 -5
  142. package/dist/grpc/proto/haneul/rpc/v2/move_package_service.client.d.mts.map +1 -1
  143. package/dist/grpc/proto/haneul/rpc/v2/move_package_service.d.mts +0 -1
  144. package/dist/grpc/proto/haneul/rpc/v2/move_package_service.d.mts.map +1 -1
  145. package/dist/grpc/proto/haneul/rpc/v2/name_service.client.d.mts +4 -5
  146. package/dist/grpc/proto/haneul/rpc/v2/name_service.client.d.mts.map +1 -1
  147. package/dist/grpc/proto/haneul/rpc/v2/name_service.d.mts +0 -1
  148. package/dist/grpc/proto/haneul/rpc/v2/name_service.d.mts.map +1 -1
  149. package/dist/grpc/proto/haneul/rpc/v2/object.d.mts +38 -2
  150. package/dist/grpc/proto/haneul/rpc/v2/object.d.mts.map +1 -1
  151. package/dist/grpc/proto/haneul/rpc/v2/object.mjs +26 -1
  152. package/dist/grpc/proto/haneul/rpc/v2/object.mjs.map +1 -1
  153. package/dist/grpc/proto/haneul/rpc/v2/object_reference.d.mts +0 -1
  154. package/dist/grpc/proto/haneul/rpc/v2/object_reference.d.mts.map +1 -1
  155. package/dist/grpc/proto/haneul/rpc/v2/owner.d.mts +1 -2
  156. package/dist/grpc/proto/haneul/rpc/v2/owner.d.mts.map +1 -1
  157. package/dist/grpc/proto/haneul/rpc/v2/protocol_config.d.mts +0 -1
  158. package/dist/grpc/proto/haneul/rpc/v2/protocol_config.d.mts.map +1 -1
  159. package/dist/grpc/proto/haneul/rpc/v2/signature.d.mts +1 -2
  160. package/dist/grpc/proto/haneul/rpc/v2/signature.d.mts.map +1 -1
  161. package/dist/grpc/proto/haneul/rpc/v2/signature.mjs.map +1 -1
  162. package/dist/grpc/proto/haneul/rpc/v2/signature_scheme.d.mts +2 -2
  163. package/dist/grpc/proto/haneul/rpc/v2/signature_scheme.d.mts.map +1 -1
  164. package/dist/grpc/proto/haneul/rpc/v2/signature_scheme.mjs +1 -1
  165. package/dist/grpc/proto/haneul/rpc/v2/signature_scheme.mjs.map +1 -1
  166. package/dist/grpc/proto/haneul/rpc/v2/signature_verification_service.client.d.mts +0 -1
  167. package/dist/grpc/proto/haneul/rpc/v2/signature_verification_service.client.d.mts.map +1 -1
  168. package/dist/grpc/proto/haneul/rpc/v2/signature_verification_service.d.mts +0 -1
  169. package/dist/grpc/proto/haneul/rpc/v2/signature_verification_service.d.mts.map +1 -1
  170. package/dist/grpc/proto/haneul/rpc/v2/state_service.client.d.mts +4 -5
  171. package/dist/grpc/proto/haneul/rpc/v2/state_service.client.d.mts.map +1 -1
  172. package/dist/grpc/proto/haneul/rpc/v2/state_service.d.mts +4 -5
  173. package/dist/grpc/proto/haneul/rpc/v2/state_service.d.mts.map +1 -1
  174. package/dist/grpc/proto/haneul/rpc/v2/subscription_service.client.d.mts +4 -5
  175. package/dist/grpc/proto/haneul/rpc/v2/subscription_service.client.d.mts.map +1 -1
  176. package/dist/grpc/proto/haneul/rpc/v2/subscription_service.d.mts +0 -1
  177. package/dist/grpc/proto/haneul/rpc/v2/subscription_service.d.mts.map +1 -1
  178. package/dist/grpc/proto/haneul/rpc/v2/system_state.d.mts +3 -4
  179. package/dist/grpc/proto/haneul/rpc/v2/system_state.d.mts.map +1 -1
  180. package/dist/grpc/proto/haneul/rpc/v2/system_state.mjs +1 -1
  181. package/dist/grpc/proto/haneul/rpc/v2/system_state.mjs.map +1 -1
  182. package/dist/grpc/proto/haneul/rpc/v2/transaction.d.mts +4 -5
  183. package/dist/grpc/proto/haneul/rpc/v2/transaction.d.mts.map +1 -1
  184. package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.client.d.mts +0 -1
  185. package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.client.d.mts.map +1 -1
  186. package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.d.mts +9 -2
  187. package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.d.mts.map +1 -1
  188. package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.mjs +23 -12
  189. package/dist/grpc/proto/haneul/rpc/v2/transaction_execution_service.mjs.map +1 -1
  190. package/dist/grpc/proto/types.d.mts +2 -2
  191. package/dist/grpc/proto/types.d.mts.map +1 -1
  192. package/dist/grpc/proto/types.mjs +2 -1
  193. package/dist/jsonRpc/client.d.mts +4 -7
  194. package/dist/jsonRpc/client.d.mts.map +1 -1
  195. package/dist/jsonRpc/client.mjs +4 -33
  196. package/dist/jsonRpc/client.mjs.map +1 -1
  197. package/dist/jsonRpc/core.d.mts +8 -15
  198. package/dist/jsonRpc/core.d.mts.map +1 -1
  199. package/dist/jsonRpc/core.mjs +81 -34
  200. package/dist/jsonRpc/core.mjs.map +1 -1
  201. package/dist/jsonRpc/errors.d.mts.map +1 -1
  202. package/dist/jsonRpc/http-transport.d.mts +1 -17
  203. package/dist/jsonRpc/http-transport.d.mts.map +1 -1
  204. package/dist/jsonRpc/http-transport.mjs +0 -23
  205. package/dist/jsonRpc/http-transport.mjs.map +1 -1
  206. package/dist/jsonRpc/index.d.mts +3 -3
  207. package/dist/jsonRpc/network.d.mts.map +1 -1
  208. package/dist/jsonRpc/types/chain.d.mts.map +1 -1
  209. package/dist/jsonRpc/types/changes.d.mts.map +1 -1
  210. package/dist/jsonRpc/types/coins.d.mts.map +1 -1
  211. package/dist/jsonRpc/types/common.d.mts +1 -2
  212. package/dist/jsonRpc/types/common.d.mts.map +1 -1
  213. package/dist/jsonRpc/types/generated.d.mts +101 -129
  214. package/dist/jsonRpc/types/generated.d.mts.map +1 -1
  215. package/dist/jsonRpc/types/index.d.mts +1 -1
  216. package/dist/jsonRpc/types/params.d.mts +9 -14
  217. package/dist/jsonRpc/types/params.d.mts.map +1 -1
  218. package/dist/keypairs/ed25519/keypair.d.mts +8 -6
  219. package/dist/keypairs/ed25519/keypair.d.mts.map +1 -1
  220. package/dist/keypairs/ed25519/keypair.mjs +13 -9
  221. package/dist/keypairs/ed25519/keypair.mjs.map +1 -1
  222. package/dist/keypairs/ed25519/publickey.d.mts +0 -1
  223. package/dist/keypairs/ed25519/publickey.d.mts.map +1 -1
  224. package/dist/keypairs/passkey/keypair.d.mts +12 -5
  225. package/dist/keypairs/passkey/keypair.d.mts.map +1 -1
  226. package/dist/keypairs/passkey/keypair.mjs +20 -7
  227. package/dist/keypairs/passkey/keypair.mjs.map +1 -1
  228. package/dist/keypairs/passkey/publickey.d.mts +0 -1
  229. package/dist/keypairs/passkey/publickey.d.mts.map +1 -1
  230. package/dist/keypairs/passkey/types.d.mts.map +1 -1
  231. package/dist/keypairs/secp256k1/keypair.d.mts +3 -3
  232. package/dist/keypairs/secp256k1/keypair.d.mts.map +1 -1
  233. package/dist/keypairs/secp256k1/keypair.mjs +6 -6
  234. package/dist/keypairs/secp256k1/keypair.mjs.map +1 -1
  235. package/dist/keypairs/secp256k1/publickey.d.mts +0 -1
  236. package/dist/keypairs/secp256k1/publickey.d.mts.map +1 -1
  237. package/dist/keypairs/secp256r1/keypair.d.mts +3 -3
  238. package/dist/keypairs/secp256r1/keypair.d.mts.map +1 -1
  239. package/dist/keypairs/secp256r1/keypair.mjs +6 -6
  240. package/dist/keypairs/secp256r1/keypair.mjs.map +1 -1
  241. package/dist/keypairs/secp256r1/publickey.d.mts +0 -1
  242. package/dist/keypairs/secp256r1/publickey.d.mts.map +1 -1
  243. package/dist/multisig/publickey.d.mts +1 -0
  244. package/dist/multisig/publickey.d.mts.map +1 -1
  245. package/dist/multisig/publickey.mjs +7 -7
  246. package/dist/multisig/publickey.mjs.map +1 -1
  247. package/dist/multisig/signer.d.mts.map +1 -1
  248. package/dist/transactions/Arguments.d.mts.map +1 -1
  249. package/dist/transactions/Commands.d.mts +1 -1
  250. package/dist/transactions/Commands.d.mts.map +1 -1
  251. package/dist/transactions/Commands.mjs.map +1 -1
  252. package/dist/transactions/Inputs.d.mts.map +1 -1
  253. package/dist/transactions/ObjectCache.d.mts +3 -3
  254. package/dist/transactions/ObjectCache.d.mts.map +1 -1
  255. package/dist/transactions/Transaction.d.mts +26 -0
  256. package/dist/transactions/Transaction.d.mts.map +1 -1
  257. package/dist/transactions/Transaction.mjs +23 -1
  258. package/dist/transactions/Transaction.mjs.map +1 -1
  259. package/dist/transactions/TransactionData.d.mts.map +1 -1
  260. package/dist/transactions/TransactionData.mjs +8 -8
  261. package/dist/transactions/TransactionData.mjs.map +1 -1
  262. package/dist/transactions/data/internal.d.mts +109 -109
  263. package/dist/transactions/data/internal.d.mts.map +1 -1
  264. package/dist/transactions/data/internal.mjs.map +1 -1
  265. package/dist/transactions/data/v1.d.mts +220 -221
  266. package/dist/transactions/data/v1.d.mts.map +1 -1
  267. package/dist/transactions/data/v2.d.mts.map +1 -1
  268. package/dist/transactions/data/v2.mjs.map +1 -1
  269. package/dist/transactions/executor/caching.mjs +2 -2
  270. package/dist/transactions/executor/caching.mjs.map +1 -1
  271. package/dist/transactions/executor/parallel.d.mts +1 -1
  272. package/dist/transactions/executor/parallel.d.mts.map +1 -1
  273. package/dist/transactions/executor/parallel.mjs +1 -1
  274. package/dist/transactions/executor/parallel.mjs.map +1 -1
  275. package/dist/transactions/executor/serial.d.mts +3 -3
  276. package/dist/transactions/executor/serial.d.mts.map +1 -1
  277. package/dist/transactions/executor/serial.mjs.map +1 -1
  278. package/dist/transactions/intents/CoinWithBalance.d.mts.map +1 -1
  279. package/dist/transactions/intents/CoinWithBalance.mjs +174 -97
  280. package/dist/transactions/intents/CoinWithBalance.mjs.map +1 -1
  281. package/dist/transactions/object.d.mts.map +1 -1
  282. package/dist/transactions/pure.d.mts.map +1 -1
  283. package/dist/transactions/pure.mjs +12 -12
  284. package/dist/transactions/pure.mjs.map +1 -1
  285. package/dist/transactions/resolve.d.mts.map +1 -1
  286. package/dist/transactions/resolve.mjs +3 -3
  287. package/dist/transactions/resolve.mjs.map +1 -1
  288. package/dist/transactions/serializer.d.mts.map +1 -1
  289. package/dist/transactions/serializer.mjs +15 -15
  290. package/dist/transactions/serializer.mjs.map +1 -1
  291. package/dist/transactions/utils.d.mts +0 -1
  292. package/dist/transactions/utils.d.mts.map +1 -1
  293. package/dist/utils/coin-reservation.mjs +67 -0
  294. package/dist/utils/coin-reservation.mjs.map +1 -0
  295. package/dist/utils/constants.d.mts +2 -1
  296. package/dist/utils/constants.d.mts.map +1 -1
  297. package/dist/utils/constants.mjs +2 -1
  298. package/dist/utils/constants.mjs.map +1 -1
  299. package/dist/utils/derived-objects.d.mts +0 -1
  300. package/dist/utils/derived-objects.d.mts.map +1 -1
  301. package/dist/utils/dynamic-fields.d.mts.map +1 -1
  302. package/dist/utils/dynamic-fields.mjs +4 -4
  303. package/dist/utils/dynamic-fields.mjs.map +1 -1
  304. package/dist/utils/format.d.mts.map +1 -1
  305. package/dist/utils/haneul-types.d.mts.map +1 -1
  306. package/dist/utils/haneul-types.mjs +8 -0
  307. package/dist/utils/haneul-types.mjs.map +1 -1
  308. package/dist/utils/haneulns.d.mts.map +1 -1
  309. package/dist/utils/index.d.mts +2 -2
  310. package/dist/utils/index.mjs +2 -2
  311. package/dist/utils/move-registry.d.mts.map +1 -1
  312. package/dist/verify/verify.d.mts.map +1 -1
  313. package/dist/version.mjs +1 -1
  314. package/dist/version.mjs.map +1 -1
  315. package/dist/zklogin/address.d.mts.map +1 -1
  316. package/dist/zklogin/bcs.d.mts +14 -14
  317. package/dist/zklogin/bcs.d.mts.map +1 -1
  318. package/dist/zklogin/jwt-decode.d.mts +0 -1
  319. package/dist/zklogin/jwt-decode.d.mts.map +1 -1
  320. package/dist/zklogin/jwt-utils.d.mts +0 -1
  321. package/dist/zklogin/jwt-utils.d.mts.map +1 -1
  322. package/dist/zklogin/nonce.d.mts.map +1 -1
  323. package/dist/zklogin/poseidon.d.mts.map +1 -1
  324. package/dist/zklogin/publickey.d.mts +0 -1
  325. package/dist/zklogin/publickey.d.mts.map +1 -1
  326. package/dist/zklogin/signature.d.mts.map +1 -1
  327. package/dist/zklogin/utils.d.mts.map +1 -1
  328. package/dist/zklogin/utils.mjs +1 -1
  329. package/dist/zklogin/utils.mjs.map +1 -1
  330. package/docs/bcs.md +132 -0
  331. package/docs/clients/core.md +616 -0
  332. package/docs/clients/graphql.md +99 -0
  333. package/docs/clients/grpc.md +152 -0
  334. package/docs/clients/index.md +93 -0
  335. package/docs/clients/json-rpc.md +235 -0
  336. package/docs/cryptography/keypairs.md +259 -0
  337. package/docs/cryptography/multisig.md +192 -0
  338. package/docs/cryptography/passkey.md +111 -0
  339. package/docs/cryptography/webcrypto-signer.md +81 -0
  340. package/docs/executors.md +148 -0
  341. package/docs/faucet.md +26 -0
  342. package/docs/hello-haneul.md +115 -0
  343. package/docs/index.md +56 -0
  344. package/docs/install.md +61 -0
  345. package/docs/llm-docs.md +32 -0
  346. package/docs/llms-index.md +66 -0
  347. package/docs/migrations/0.38.md +57 -0
  348. package/docs/migrations/haneul-1.0.md +454 -0
  349. package/docs/migrations/haneul-2.0/agent-prompt.md +42 -0
  350. package/docs/migrations/haneul-2.0/dapp-kit.md +350 -0
  351. package/docs/migrations/haneul-2.0/deepbook-v3.md +33 -0
  352. package/docs/migrations/haneul-2.0/haneul.md +341 -0
  353. package/docs/migrations/haneul-2.0/haneulns.md +42 -0
  354. package/docs/migrations/haneul-2.0/index.md +161 -0
  355. package/docs/migrations/haneul-2.0/json-rpc-migration.md +399 -0
  356. package/docs/migrations/haneul-2.0/kiosk.md +120 -0
  357. package/docs/migrations/haneul-2.0/sdk-maintainers.md +91 -0
  358. package/docs/migrations/haneul-2.0/seal.md +14 -0
  359. package/docs/migrations/haneul-2.0/wallet-builders.md +66 -0
  360. package/docs/migrations/haneul-2.0/walrus.md +41 -0
  361. package/docs/migrations/haneul-2.0/zksend.md +94 -0
  362. package/docs/plugins.md +255 -0
  363. package/docs/sdk-building.md +341 -0
  364. package/docs/transaction-building/basics.md +297 -0
  365. package/docs/transaction-building/gas.md +62 -0
  366. package/docs/transaction-building/intents.md +61 -0
  367. package/docs/transaction-building/offline.md +71 -0
  368. package/docs/transaction-building/sponsored-transactions.md +22 -0
  369. package/docs/utils/derived_objects.md +80 -0
  370. package/docs/utils/index.md +53 -0
  371. package/docs/zklogin.md +78 -0
  372. package/package.json +199 -199
  373. package/src/bcs/bcs.ts +13 -13
  374. package/src/bcs/effects.ts +20 -20
  375. package/src/bcs/index.ts +2 -2
  376. package/src/client/core-resolver.ts +150 -100
  377. package/src/client/core.ts +62 -22
  378. package/src/client/types.ts +109 -24
  379. package/src/cryptography/index.ts +2 -2
  380. package/src/cryptography/keypair.ts +2 -2
  381. package/src/cryptography/mnemonics.ts +7 -7
  382. package/src/cryptography/publickey.ts +5 -5
  383. package/src/faucet/faucet.ts +1 -1
  384. package/src/faucet/index.ts +1 -1
  385. package/src/graphql/client.ts +100 -8
  386. package/src/graphql/core.ts +73 -80
  387. package/src/graphql/generated/queries.ts +301 -51
  388. package/src/graphql/generated/schema.graphql +407 -104
  389. package/src/graphql/generated/tada-env.ts +779 -58
  390. package/src/graphql/index.ts +1 -1
  391. package/src/graphql/queries/getAllBalances.graphql +1 -1
  392. package/src/graphql/queries/getBalance.graphql +1 -1
  393. package/src/graphql/queries/getCoins.graphql +2 -2
  394. package/src/graphql/queries/getDynamicFields.graphql +9 -1
  395. package/src/graphql/queries/getMoveFunction.graphql +1 -1
  396. package/src/graphql/queries/getProtocolConfig.graphql +18 -0
  397. package/src/graphql/queries/nameService.graphql +1 -1
  398. package/src/graphql/queries/objects.graphql +11 -1
  399. package/src/graphql/queries/transactions.graphql +1 -3
  400. package/src/graphql/queries/verifyZkLoginSignature.graphql +1 -2
  401. package/src/grpc/client.ts +66 -8
  402. package/src/grpc/core.ts +74 -35
  403. package/src/grpc/index.ts +1 -1
  404. package/src/grpc/proto/haneul/rpc/v2/bcs.ts +1 -1
  405. package/src/grpc/proto/haneul/rpc/v2/execution_status.ts +4 -4
  406. package/src/grpc/proto/haneul/rpc/v2/object.ts +44 -0
  407. package/src/grpc/proto/haneul/rpc/v2/signature.ts +1 -1
  408. package/src/grpc/proto/haneul/rpc/v2/signature_scheme.ts +1 -1
  409. package/src/grpc/proto/haneul/rpc/v2/system_state.ts +4 -4
  410. package/src/grpc/proto/haneul/rpc/v2/transaction_execution_service.ts +16 -0
  411. package/src/jsonRpc/client.ts +5 -23
  412. package/src/jsonRpc/core.ts +114 -41
  413. package/src/jsonRpc/http-transport.ts +0 -52
  414. package/src/jsonRpc/index.ts +0 -1
  415. package/src/jsonRpc/types/common.ts +0 -1
  416. package/src/jsonRpc/types/generated.ts +2 -2
  417. package/src/jsonRpc/types/params.ts +6 -6
  418. package/src/keypairs/ed25519/keypair.ts +14 -10
  419. package/src/keypairs/passkey/keypair.ts +22 -8
  420. package/src/keypairs/secp256k1/keypair.ts +6 -6
  421. package/src/keypairs/secp256r1/keypair.ts +6 -6
  422. package/src/transactions/Commands.ts +1 -1
  423. package/src/transactions/Transaction.ts +38 -1
  424. package/src/transactions/TransactionData.ts +3 -3
  425. package/src/transactions/__tests__/bcs.test.ts +3 -3
  426. package/src/transactions/data/internal.ts +12 -12
  427. package/src/transactions/data/v2.ts +6 -6
  428. package/src/transactions/executor/caching.ts +2 -2
  429. package/src/transactions/executor/parallel.ts +1 -2
  430. package/src/transactions/executor/serial.ts +1 -1
  431. package/src/transactions/intents/CoinWithBalance.ts +247 -121
  432. package/src/utils/coin-reservation.ts +84 -0
  433. package/src/utils/constants.ts +2 -0
  434. package/src/utils/haneul-types.ts +16 -1
  435. package/src/utils/index.ts +1 -0
  436. package/src/version.ts +1 -1
  437. package/src/zklogin/utils.ts +1 -1
  438. package/dist/jsonRpc/rpc-websocket-client.d.mts +0 -26
  439. package/dist/jsonRpc/rpc-websocket-client.d.mts.map +0 -1
  440. package/dist/jsonRpc/rpc-websocket-client.mjs +0 -135
  441. package/dist/jsonRpc/rpc-websocket-client.mjs.map +0 -1
  442. package/src/jsonRpc/rpc-websocket-client.ts +0 -241
@@ -9,5 +9,5 @@ export {
9
9
  type HaneulGraphQLClientOptions,
10
10
  HaneulGraphQLClient,
11
11
  HaneulGraphQLRequestError,
12
- isSuiGraphQLClient,
12
+ isHaneulGraphQLClient,
13
13
  } from './client.js';
@@ -1,7 +1,7 @@
1
1
  # Copyright (c) Mysten Labs, Inc.
2
2
  # SPDX-License-Identifier: Apache-2.0
3
3
 
4
- query getAllBalances($owner: SuiAddress!, $limit: Int, $cursor: String) {
4
+ query getAllBalances($owner: HaneulAddress!, $limit: Int, $cursor: String) {
5
5
  address(address: $owner) {
6
6
  balances(first: $limit, after: $cursor) {
7
7
  pageInfo {
@@ -1,7 +1,7 @@
1
1
  # Copyright (c) Mysten Labs, Inc.
2
2
  # SPDX-License-Identifier: Apache-2.0
3
3
 
4
- query getBalance($owner: SuiAddress!, $coinType: String = "0x2::sui::SUI") {
4
+ query getBalance($owner: HaneulAddress!, $coinType: String = "0x2::haneul::HANEUL") {
5
5
  address(address: $owner) {
6
6
  balance(coinType: $coinType) {
7
7
  coinType {
@@ -2,10 +2,10 @@
2
2
  # SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  query getCoins(
5
- $owner: SuiAddress!
5
+ $owner: HaneulAddress!
6
6
  $first: Int
7
7
  $cursor: String
8
- $type: String = "0x2::coin::Coin<0x2::sui::SUI>"
8
+ $type: String = "0x2::coin::Coin<0x2::haneul::HANEUL>"
9
9
  ) {
10
10
  address(address: $owner) {
11
11
  address
@@ -1,7 +1,12 @@
1
1
  # Copyright (c) Mysten Labs, Inc.
2
2
  # SPDX-License-Identifier: Apache-2.0
3
3
 
4
- query getDynamicFields($parentId: SuiAddress!, $first: Int, $cursor: String) {
4
+ query getDynamicFields(
5
+ $parentId: HaneulAddress!
6
+ $first: Int
7
+ $cursor: String
8
+ $includeValue: Boolean = false
9
+ ) {
5
10
  address(address: $parentId) {
6
11
  dynamicFields(first: $first, after: $cursor) {
7
12
  pageInfo {
@@ -18,12 +23,15 @@ query getDynamicFields($parentId: SuiAddress!, $first: Int, $cursor: String) {
18
23
  value {
19
24
  __typename
20
25
  ... on MoveValue {
26
+ bcs @include(if: $includeValue)
21
27
  type {
22
28
  repr
23
29
  }
24
30
  }
25
31
  ... on MoveObject {
32
+ address
26
33
  contents {
34
+ bcs @include(if: $includeValue)
27
35
  type {
28
36
  repr
29
37
  }
@@ -1,4 +1,4 @@
1
- query getMoveFunction($package: SuiAddress!, $module: String!, $function: String!) {
1
+ query getMoveFunction($package: HaneulAddress!, $module: String!, $function: String!) {
2
2
  package(address: $package) {
3
3
  module(name: $module) {
4
4
  function(name: $function) {
@@ -0,0 +1,18 @@
1
+ # Copyright (c) Mysten Labs, Inc.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ query getProtocolConfig {
5
+ epoch {
6
+ protocolConfigs {
7
+ protocolVersion
8
+ featureFlags {
9
+ key
10
+ value
11
+ }
12
+ configs {
13
+ key
14
+ value
15
+ }
16
+ }
17
+ }
18
+ }
@@ -1,7 +1,7 @@
1
1
  # Copyright (c) Mysten Labs, Inc.
2
2
  # SPDX-License-Identifier: Apache-2.0
3
3
 
4
- query defaultSuinsName($address: SuiAddress!) {
4
+ query defaultHaneulnsName($address: HaneulAddress!) {
5
5
  address(address: $address) {
6
6
  defaultNameRecord {
7
7
  domain
@@ -2,7 +2,7 @@
2
2
  # SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  query getOwnedObjects(
5
- $owner: SuiAddress!
5
+ $owner: HaneulAddress!
6
6
  $limit: Int
7
7
  $cursor: String
8
8
  $filter: ObjectFilter
@@ -10,6 +10,7 @@ query getOwnedObjects(
10
10
  $includePreviousTransaction: Boolean = false
11
11
  $includeObjectBcs: Boolean = false
12
12
  $includeJson: Boolean = false
13
+ $includeDisplay: Boolean = false
13
14
  ) {
14
15
  address(address: $owner) {
15
16
  objects(first: $limit, after: $cursor, filter: $filter) {
@@ -30,6 +31,7 @@ query multiGetObjects(
30
31
  $includePreviousTransaction: Boolean = false
31
32
  $includeObjectBcs: Boolean = false
32
33
  $includeJson: Boolean = false
34
+ $includeDisplay: Boolean = false
33
35
  ) {
34
36
  multiGetObjects(keys: $objectKeys) {
35
37
  ...OBJECT_FIELDS
@@ -45,6 +47,10 @@ fragment OBJECT_FIELDS on Object {
45
47
  contents {
46
48
  bcs @include(if: $includeContent)
47
49
  json @include(if: $includeJson)
50
+ display @include(if: $includeDisplay) {
51
+ output
52
+ errors
53
+ }
48
54
  type {
49
55
  repr
50
56
  }
@@ -69,6 +75,10 @@ fragment MOVE_OBJECT_FIELDS on MoveObject {
69
75
  contents {
70
76
  bcs @include(if: $includeContent)
71
77
  json @include(if: $includeJson)
78
+ display @include(if: $includeDisplay) {
79
+ output
80
+ errors
81
+ }
72
82
  type {
73
83
  repr
74
84
  }
@@ -18,7 +18,6 @@ query simulateTransaction(
18
18
  doGasSelection: $doGasSelection
19
19
  checksEnabled: $checksEnabled
20
20
  ) {
21
- error
22
21
  effects {
23
22
  transaction {
24
23
  ...TRANSACTION_FIELDS
@@ -50,7 +49,6 @@ mutation executeTransaction(
50
49
  $includeBcs: Boolean = false
51
50
  ) {
52
51
  executeTransaction(transactionDataBcs: $transactionDataBcs, signatures: $signatures) {
53
- errors
54
52
  effects {
55
53
  transaction {
56
54
  ...TRANSACTION_FIELDS
@@ -138,6 +136,7 @@ fragment TRANSACTION_FIELDS on Transaction {
138
136
  repr
139
137
  }
140
138
  bcs
139
+ json
141
140
  }
142
141
  }
143
142
  }
@@ -146,7 +145,6 @@ fragment TRANSACTION_FIELDS on Transaction {
146
145
 
147
146
  query resolveTransaction($transaction: JSON!, $doGasSelection: Boolean = true) {
148
147
  simulateTransaction(transaction: $transaction, doGasSelection: $doGasSelection) {
149
- error
150
148
  effects {
151
149
  transaction {
152
150
  transactionBcs
@@ -2,7 +2,7 @@ query verifyZkLoginSignature(
2
2
  $bytes: Base64!
3
3
  $signature: Base64!
4
4
  $intentScope: ZkLoginIntentScope!
5
- $author: SuiAddress!
5
+ $author: HaneulAddress!
6
6
  ) {
7
7
  verifyZkLoginSignature(
8
8
  bytes: $bytes
@@ -11,6 +11,5 @@ query verifyZkLoginSignature(
11
11
  author: $author
12
12
  ) {
13
13
  success
14
- error
15
14
  }
16
15
  }
@@ -13,6 +13,9 @@ import { SubscriptionServiceClient } from './proto/haneul/rpc/v2/subscription_se
13
13
  import { GrpcCoreClient } from './core.js';
14
14
  import type { HaneulClientTypes } from '../client/index.js';
15
15
  import { BaseClient } from '../client/index.js';
16
+ import { DynamicField_DynamicFieldKind } from './proto/haneul/rpc/v2/state_service.js';
17
+ import { normalizeStructTag } from '../utils/haneul-types.js';
18
+ import { fromBase64, toBase64 } from '@haneullabs/utils';
16
19
  import { NameServiceClient } from './proto/haneul/rpc/v2/name_service.client.js';
17
20
  import type { TransactionPlugin } from '../transactions/index.js';
18
21
 
@@ -30,14 +33,29 @@ export type HaneulGrpcClientOptions = {
30
33
  | HaneulGrpcTransportOptions
31
34
  );
32
35
 
33
- const SUI_CLIENT_BRAND = Symbol.for('@haneullabs/HaneulGrpcClient') as never;
36
+ const HANEUL_CLIENT_BRAND = Symbol.for('@haneullabs/HaneulGrpcClient') as never;
34
37
 
35
- export function isSuiGrpcClient(client: unknown): client is HaneulGrpcClient {
38
+ export function isHaneulGrpcClient(client: unknown): client is HaneulGrpcClient {
36
39
  return (
37
- typeof client === 'object' && client !== null && (client as any)[SUI_CLIENT_BRAND] === true
40
+ typeof client === 'object' && client !== null && (client as any)[HANEUL_CLIENT_BRAND] === true
38
41
  );
39
42
  }
40
43
 
44
+ export interface DynamicFieldInclude {
45
+ value?: boolean;
46
+ }
47
+
48
+ export type DynamicFieldEntryWithValue<Include extends DynamicFieldInclude = {}> =
49
+ HaneulClientTypes.DynamicFieldEntry & {
50
+ value: Include extends { value: true } ? HaneulClientTypes.DynamicFieldValue : undefined;
51
+ };
52
+
53
+ export interface ListDynamicFieldsWithValueResponse<Include extends DynamicFieldInclude = {}> {
54
+ hasNextPage: boolean;
55
+ cursor: string | null;
56
+ dynamicFields: DynamicFieldEntryWithValue<Include>[];
57
+ }
58
+
41
59
  export class HaneulGrpcClient extends BaseClient implements HaneulClientTypes.TransportMethods {
42
60
  core: GrpcCoreClient;
43
61
  get mvr(): HaneulClientTypes.MvrMethods {
@@ -51,7 +69,7 @@ export class HaneulGrpcClient extends BaseClient implements HaneulClientTypes.Tr
51
69
  signatureVerificationService: SignatureVerificationServiceClient;
52
70
  nameService: NameServiceClient;
53
71
 
54
- get [SUI_CLIENT_BRAND]() {
72
+ get [HANEUL_CLIENT_BRAND]() {
55
73
  return true;
56
74
  }
57
75
 
@@ -148,10 +166,50 @@ export class HaneulGrpcClient extends BaseClient implements HaneulClientTypes.Tr
148
166
  return this.core.getReferenceGasPrice();
149
167
  }
150
168
 
151
- listDynamicFields(
152
- input: HaneulClientTypes.ListDynamicFieldsOptions,
153
- ): Promise<HaneulClientTypes.ListDynamicFieldsResponse> {
154
- return this.core.listDynamicFields(input);
169
+ async listDynamicFields<Include extends DynamicFieldInclude = {}>(
170
+ input: HaneulClientTypes.ListDynamicFieldsOptions & { include?: Include & DynamicFieldInclude },
171
+ ): Promise<ListDynamicFieldsWithValueResponse<Include>> {
172
+ const includeValue = input.include?.value ?? false;
173
+ const paths = ['field_id', 'name', 'value_type', 'kind', 'child_id'];
174
+ if (includeValue) {
175
+ paths.push('value');
176
+ }
177
+
178
+ const response = await this.stateService.listDynamicFields({
179
+ parent: input.parentId,
180
+ pageToken: input.cursor ? fromBase64(input.cursor) : undefined,
181
+ pageSize: input.limit,
182
+ readMask: {
183
+ paths,
184
+ },
185
+ });
186
+
187
+ return {
188
+ dynamicFields: response.response.dynamicFields.map(
189
+ (field): DynamicFieldEntryWithValue<Include> => {
190
+ const isDynamicObject = field.kind === DynamicField_DynamicFieldKind.OBJECT;
191
+ const fieldType = isDynamicObject
192
+ ? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${field.name?.name!}>,0x2::object::ID>`
193
+ : `0x2::dynamic_field::Field<${field.name?.name!},${field.valueType!}>`;
194
+ return {
195
+ $kind: isDynamicObject ? 'DynamicObject' : 'DynamicField',
196
+ fieldId: field.fieldId!,
197
+ name: {
198
+ type: field.name?.name!,
199
+ bcs: field.name?.value!,
200
+ },
201
+ valueType: field.valueType!,
202
+ type: normalizeStructTag(fieldType),
203
+ childId: field.childId,
204
+ value: (includeValue
205
+ ? { type: field.valueType!, bcs: field.value?.value ?? new Uint8Array() }
206
+ : undefined) as DynamicFieldEntryWithValue<Include>['value'],
207
+ } as DynamicFieldEntryWithValue<Include>;
208
+ },
209
+ ),
210
+ cursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,
211
+ hasNextPage: response.response.nextPageToken !== undefined,
212
+ };
155
213
  }
156
214
 
157
215
  getDynamicField(
package/src/grpc/core.ts CHANGED
@@ -6,7 +6,6 @@ import { CoreClient, formatMoveAbortMessage, SimulationError } from '../client/i
6
6
  import type { HaneulGrpcClient } from './client.js';
7
7
  import type { Owner } from './proto/haneul/rpc/v2/owner.js';
8
8
  import { Owner_OwnerKind } from './proto/haneul/rpc/v2/owner.js';
9
- import { DynamicField_DynamicFieldKind } from './proto/haneul/rpc/v2/state_service.js';
10
9
  import { chunk, fromBase64, toBase64 } from '@haneullabs/utils';
11
10
  import type { ExecutedTransaction } from './proto/haneul/rpc/v2/executed_transaction.js';
12
11
  import type { TransactionEffects } from './proto/haneul/rpc/v2/effects.js';
@@ -45,6 +44,7 @@ import {
45
44
  grpcTransactionToTransactionData,
46
45
  } from '../client/transaction-resolver.js';
47
46
  import { Value } from './proto/google/protobuf/struct.js';
47
+ import { SimulateTransactionRequest_TransactionChecks } from './proto/haneul/rpc/v2/transaction_execution_service.js';
48
48
 
49
49
  export interface GrpcCoreClientOptions extends CoreClientOptions {
50
50
  client: HaneulGrpcClient;
@@ -56,7 +56,7 @@ export class GrpcCoreClient extends CoreClient {
56
56
  this.#client = client;
57
57
  }
58
58
 
59
- async getObjects<Include extends HaneulClientTypes.ObjectInclude = object>(
59
+ async getObjects<Include extends HaneulClientTypes.ObjectInclude = {}>(
60
60
  options: HaneulClientTypes.GetObjectsOptions<Include>,
61
61
  ): Promise<HaneulClientTypes.GetObjectsResponse<Include>> {
62
62
  const batches = chunk(options.objectIds, 50);
@@ -75,6 +75,9 @@ export class GrpcCoreClient extends CoreClient {
75
75
  if (options.include?.json) {
76
76
  paths.push('json');
77
77
  }
78
+ if (options.include?.display) {
79
+ paths.push('display');
80
+ }
78
81
 
79
82
  for (const batch of batches) {
80
83
  const response = await this.#client.ledgerService.batchGetObjects({
@@ -111,6 +114,11 @@ export class GrpcCoreClient extends CoreClient {
111
114
  : null
112
115
  : undefined;
113
116
 
117
+ const displayData = mapDisplayProto(
118
+ options.include?.display,
119
+ object.result.object.display,
120
+ );
121
+
114
122
  return {
115
123
  objectId: object.result.object.objectId!,
116
124
  version: object.result.object.version?.toString()!,
@@ -122,6 +130,7 @@ export class GrpcCoreClient extends CoreClient {
122
130
  undefined) as HaneulClientTypes.Object<Include>['previousTransaction'],
123
131
  objectBcs: objectBcs as HaneulClientTypes.Object<Include>['objectBcs'],
124
132
  json: jsonContent as HaneulClientTypes.Object<Include>['json'],
133
+ display: displayData as HaneulClientTypes.Object<Include>['display'],
125
134
  };
126
135
  }),
127
136
  );
@@ -131,7 +140,7 @@ export class GrpcCoreClient extends CoreClient {
131
140
  objects: results,
132
141
  };
133
142
  }
134
- async listOwnedObjects<Include extends HaneulClientTypes.ObjectInclude = object>(
143
+ async listOwnedObjects<Include extends HaneulClientTypes.ObjectInclude = {}>(
135
144
  options: HaneulClientTypes.ListOwnedObjectsOptions<Include>,
136
145
  ): Promise<HaneulClientTypes.ListOwnedObjectsResponse<Include>> {
137
146
  const paths = ['owner', 'object_type', 'digest', 'version', 'object_id'];
@@ -147,6 +156,9 @@ export class GrpcCoreClient extends CoreClient {
147
156
  if (options.include?.json) {
148
157
  paths.push('json');
149
158
  }
159
+ if (options.include?.display) {
160
+ paths.push('display');
161
+ }
150
162
 
151
163
  const response = await this.#client.stateService.listOwnedObjects({
152
164
  owner: options.owner,
@@ -176,6 +188,10 @@ export class GrpcCoreClient extends CoreClient {
176
188
  ? (Value.toJson(object.json) as Record<string, unknown>)
177
189
  : null
178
190
  : undefined) as HaneulClientTypes.Object<Include>['json'],
191
+ display: mapDisplayProto(
192
+ options.include?.display,
193
+ object.display,
194
+ ) as HaneulClientTypes.Object<Include>['display'],
179
195
  }),
180
196
  );
181
197
 
@@ -285,7 +301,7 @@ export class GrpcCoreClient extends CoreClient {
285
301
  })),
286
302
  };
287
303
  }
288
- async getTransaction<Include extends HaneulClientTypes.TransactionInclude = object>(
304
+ async getTransaction<Include extends HaneulClientTypes.TransactionInclude = {}>(
289
305
  options: HaneulClientTypes.GetTransactionOptions<Include>,
290
306
  ): Promise<HaneulClientTypes.TransactionResult<Include>> {
291
307
  const paths = ['digest', 'transaction.digest', 'signatures', 'effects.status'];
@@ -327,7 +343,7 @@ export class GrpcCoreClient extends CoreClient {
327
343
 
328
344
  return parseTransaction(response.transaction, options.include);
329
345
  }
330
- async executeTransaction<Include extends HaneulClientTypes.TransactionInclude = object>(
346
+ async executeTransaction<Include extends HaneulClientTypes.TransactionInclude = {}>(
331
347
  options: HaneulClientTypes.ExecuteTransactionOptions<Include>,
332
348
  ): Promise<HaneulClientTypes.TransactionResult<Include>> {
333
349
  const paths = ['digest', 'transaction.digest', 'signatures', 'effects.status'];
@@ -377,7 +393,7 @@ export class GrpcCoreClient extends CoreClient {
377
393
 
378
394
  return parseTransaction(response.transaction!, options.include);
379
395
  }
380
- async simulateTransaction<Include extends HaneulClientTypes.SimulateTransactionInclude = object>(
396
+ async simulateTransaction<Include extends HaneulClientTypes.SimulateTransactionInclude = {}>(
381
397
  options: HaneulClientTypes.SimulateTransactionOptions<Include>,
382
398
  ): Promise<HaneulClientTypes.SimulateTransactionResult<Include>> {
383
399
  const paths = [
@@ -432,6 +448,10 @@ export class GrpcCoreClient extends CoreClient {
432
448
  paths,
433
449
  },
434
450
  doGasSelection: false,
451
+ checks:
452
+ options.checksEnabled === false
453
+ ? SimulateTransactionRequest_TransactionChecks.DISABLED
454
+ : SimulateTransactionRequest_TransactionChecks.ENABLED,
435
455
  });
436
456
 
437
457
  const transactionResult = parseTransaction(response.transaction!, options.include);
@@ -477,6 +497,33 @@ export class GrpcCoreClient extends CoreClient {
477
497
  };
478
498
  }
479
499
 
500
+ async getProtocolConfig(): Promise<HaneulClientTypes.GetProtocolConfigResponse> {
501
+ const response = await this.#client.ledgerService.getEpoch({
502
+ readMask: { paths: ['protocol_config'] },
503
+ });
504
+
505
+ const protocolConfig = response.response.epoch?.protocolConfig;
506
+ if (!protocolConfig) {
507
+ throw new Error('Protocol config not found in response');
508
+ }
509
+
510
+ const featureFlags: Record<string, boolean> = { ...protocolConfig.featureFlags };
511
+ const attributes: Record<string, string | null> = {};
512
+ if (protocolConfig.attributes) {
513
+ for (const [key, value] of Object.entries(protocolConfig.attributes)) {
514
+ attributes[key] = value ?? null;
515
+ }
516
+ }
517
+
518
+ return {
519
+ protocolConfig: {
520
+ protocolVersion: protocolConfig.protocolVersion?.toString() ?? (null as never),
521
+ featureFlags,
522
+ attributes,
523
+ },
524
+ };
525
+ }
526
+
480
527
  async getCurrentSystemState(): Promise<HaneulClientTypes.GetCurrentSystemStateResponse> {
481
528
  const response = await this.#client.ledgerService.getEpoch({
482
529
  readMask: {
@@ -561,34 +608,7 @@ export class GrpcCoreClient extends CoreClient {
561
608
  async listDynamicFields(
562
609
  options: HaneulClientTypes.ListDynamicFieldsOptions,
563
610
  ): Promise<HaneulClientTypes.ListDynamicFieldsResponse> {
564
- const response = await this.#client.stateService.listDynamicFields({
565
- parent: options.parentId,
566
- pageToken: options.cursor ? fromBase64(options.cursor) : undefined,
567
- pageSize: options.limit,
568
- readMask: {
569
- paths: ['field_id', 'name', 'value_type', 'kind'],
570
- },
571
- });
572
-
573
- return {
574
- dynamicFields: response.response.dynamicFields.map((field) => {
575
- const isDynamicObject = field.kind === DynamicField_DynamicFieldKind.OBJECT;
576
- const fieldType = isDynamicObject
577
- ? `0x2::dynamic_field::Field<0x2::dynamic_object_field::Wrapper<${field.name?.name!}>,0x2::object::ID>`
578
- : `0x2::dynamic_field::Field<${field.name?.name!},${field.valueType!}>`;
579
- return {
580
- fieldId: field.fieldId!,
581
- name: {
582
- type: field.name?.name!,
583
- bcs: field.name?.value!,
584
- },
585
- valueType: field.valueType!,
586
- type: normalizeStructTag(fieldType),
587
- };
588
- }),
589
- cursor: response.response.nextPageToken ? toBase64(response.response.nextPageToken) : null,
590
- hasNextPage: response.response.nextPageToken !== undefined,
591
- };
611
+ return this.#client.listDynamicFields(options);
592
612
  }
593
613
 
594
614
  async verifyZkLoginSignature(
@@ -780,6 +800,24 @@ export class GrpcCoreClient extends CoreClient {
780
800
  }
781
801
  }
782
802
 
803
+ function mapDisplayProto(
804
+ include: boolean | undefined,
805
+ display: { output?: Value; errors?: Value } | undefined,
806
+ ): HaneulClientTypes.Display | null | undefined {
807
+ if (!include) return undefined;
808
+ if (display === undefined) return null;
809
+ return {
810
+ output:
811
+ display.output !== undefined
812
+ ? (Value.toJson(display.output) as Record<string, string> | null)
813
+ : null,
814
+ errors:
815
+ display.errors !== undefined
816
+ ? (Value.toJson(display.errors) as Record<string, string> | null)
817
+ : null,
818
+ };
819
+ }
820
+
783
821
  function mapOwner(owner: Owner | null | undefined): HaneulClientTypes.ObjectOwner | null {
784
822
  if (!owner) {
785
823
  return null;
@@ -1166,7 +1204,7 @@ export function parseTransactionEffects({
1166
1204
  };
1167
1205
  }
1168
1206
 
1169
- function parseTransaction<Include extends HaneulClientTypes.TransactionInclude = object>(
1207
+ function parseTransaction<Include extends HaneulClientTypes.TransactionInclude = {}>(
1170
1208
  transaction: ExecutedTransaction,
1171
1209
  include?: Include,
1172
1210
  ): HaneulClientTypes.TransactionResult<Include> {
@@ -1244,6 +1282,7 @@ function parseTransaction<Include extends HaneulClientTypes.TransactionInclude =
1244
1282
  sender: normalizeHaneulAddress(event.sender!),
1245
1283
  eventType: event.eventType!,
1246
1284
  bcs: event.contents?.value ?? new Uint8Array(),
1285
+ json: event.json ? (Value.toJson(event.json) as Record<string, unknown>) : null,
1247
1286
  })) ?? [])
1248
1287
  : undefined) as HaneulClientTypes.Transaction<Include>['events'],
1249
1288
  };
package/src/grpc/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Mysten Labs, Inc.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- export { HaneulGrpcClient, isSuiGrpcClient } from './client.js';
4
+ export { HaneulGrpcClient, isHaneulGrpcClient } from './client.js';
5
5
  export { GrpcCoreClient } from './core.js';
6
6
  export type { HaneulGrpcClientOptions } from './client.js';
7
7
  export type { GrpcCoreClientOptions } from './core.js';
@@ -12,7 +12,7 @@
12
12
  import { MessageType } from '@protobuf-ts/runtime';
13
13
  /**
14
14
  * `Bcs` contains an arbitrary type that is serialized using the
15
- * [BCS](https://mystenlabs.github.i./haneul-rust-sdk/sui_sdk_types/index.html#bcs)
15
+ * [BCS](https://mystenlabs.github.io/sui-rust-sdk/sui_sdk_types/index.html#bcs)
16
16
  * format as well as a name that identifies the type of the serialized value.
17
17
  *
18
18
  * @generated from protobuf message haneul.rpc.v2.Bcs
@@ -196,9 +196,9 @@ export enum ExecutionError_ExecutionErrorKind {
196
196
  /**
197
197
  * Haneul Move bytecode verification error.
198
198
  *
199
- * @generated from protobuf enum value: SUI_MOVE_VERIFICATION_ERROR = 11;
199
+ * @generated from protobuf enum value: HANEUL_MOVE_VERIFICATION_ERROR = 11;
200
200
  */
201
- SUI_MOVE_VERIFICATION_ERROR = 11,
201
+ HANEUL_MOVE_VERIFICATION_ERROR = 11,
202
202
  /**
203
203
  * Error from a non-abort instruction.
204
204
  * Possible causes:
@@ -325,9 +325,9 @@ export enum ExecutionError_ExecutionErrorKind {
325
325
  /**
326
326
  * Haneul Move bytecode verification timed out.
327
327
  *
328
- * @generated from protobuf enum value: SUI_MOVE_VERIFICATION_TIMEDOUT = 31;
328
+ * @generated from protobuf enum value: HANEUL_MOVE_VERIFICATION_TIMEDOUT = 31;
329
329
  */
330
- SUI_MOVE_VERIFICATION_TIMEDOUT = 31,
330
+ HANEUL_MOVE_VERIFICATION_TIMEDOUT = 31,
331
331
  /**
332
332
  * The requested consensus object operation is not allowed.
333
333
  *
@@ -107,6 +107,13 @@ export interface Object {
107
107
  * @generated from protobuf field: optional uint64 balance = 101;
108
108
  */
109
109
  balance?: bigint;
110
+ /**
111
+ * JSON rendering of the object based on an on-chain template.
112
+ * This will not be set if the value's type does not have an associated `Display` template.
113
+ *
114
+ * @generated from protobuf field: optional haneul.rpc.v2.Display display = 102;
115
+ */
116
+ display?: Display;
110
117
  }
111
118
  /**
112
119
  * Set of Objects
@@ -121,6 +128,29 @@ export interface ObjectSet {
121
128
  */
122
129
  objects: Object[];
123
130
  }
131
+ /**
132
+ * A rendered JSON blob based on an on-chain template.
133
+ *
134
+ * @generated from protobuf message haneul.rpc.v2.Display
135
+ */
136
+ export interface Display {
137
+ /**
138
+ * Output for all successfully substituted display fields. Unsuccessful
139
+ * fields will be `null`, and will be accompanied by a field in `errors`,
140
+ * explaining the error.
141
+ *
142
+ * @generated from protobuf field: optional google.protobuf.Value output = 1;
143
+ */
144
+ output?: Value;
145
+ /**
146
+ * If any fields failed to render, this will contain a mapping from failed
147
+ * field names to error messages. If all fields succeed, this will either be
148
+ * `null` or not set.
149
+ *
150
+ * @generated from protobuf field: optional google.protobuf.Value errors = 2;
151
+ */
152
+ errors?: Value;
153
+ }
124
154
  // @generated message type with reflection information, may provide speed optimized methods
125
155
  class Object$Type extends MessageType<Object> {
126
156
  constructor() {
@@ -165,6 +195,7 @@ class Object$Type extends MessageType<Object> {
165
195
  T: 4 /*ScalarType.UINT64*/,
166
196
  L: 0 /*LongType.BIGINT*/,
167
197
  },
198
+ { no: 102, name: 'display', kind: 'message', T: () => Display },
168
199
  ]);
169
200
  }
170
201
  }
@@ -184,3 +215,16 @@ class ObjectSet$Type extends MessageType<ObjectSet> {
184
215
  * @generated MessageType for protobuf message haneul.rpc.v2.ObjectSet
185
216
  */
186
217
  export const ObjectSet = new ObjectSet$Type();
218
+ // @generated message type with reflection information, may provide speed optimized methods
219
+ class Display$Type extends MessageType<Display> {
220
+ constructor() {
221
+ super('haneul.rpc.v2.Display', [
222
+ { no: 1, name: 'output', kind: 'message', T: () => Value },
223
+ { no: 2, name: 'errors', kind: 'message', T: () => Value },
224
+ ]);
225
+ }
226
+ }
227
+ /**
228
+ * @generated MessageType for protobuf message haneul.rpc.v2.Display
229
+ */
230
+ export const Display = new Display$Type();
@@ -418,7 +418,7 @@ export interface CircomG2 {
418
418
  * A passkey authenticator.
419
419
  *
420
420
  * See
421
- * [struct.PasskeyAuthenticator](https://mystenlabs.github.i./haneul-rust-sdk/sui_sdk_types/struct.PasskeyAuthenticator.html#bcs)
421
+ * [struct.PasskeyAuthenticator](https://mystenlabs.github.io/sui-rust-sdk/sui_sdk_types/struct.PasskeyAuthenticator.html#bcs)
422
422
  * for more information on the requirements on the shape of the
423
423
  * `client_data_json` field.
424
424
  *
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * Note: the enum values defined by this proto message exactly match their
16
16
  * expected BCS serialized values when serialized as a u8. See
17
- * [enum.SignatureScheme](https://mystenlabs.github.i./haneul-rust-sdk/sui_sdk_types/enum.SignatureScheme.html)
17
+ * [enum.SignatureScheme](https://mystenlabs.github.io/sui-rust-sdk/sui_sdk_types/enum.SignatureScheme.html)
18
18
  * for more information about signature schemes.
19
19
  *
20
20
  * @generated from protobuf enum haneul.rpc.v2.SignatureScheme