@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
@@ -0,0 +1,148 @@
1
+ # Transaction Executors
2
+
3
+ > Manage transaction execution with queuing and parallel strategies
4
+
5
+ The Typescript SDK ships 2 Transaction executor classes that simplify the processes of efficiently
6
+ executing multiple transactions signed by the same address. These executors help manage object
7
+ versions and gas coins which significantly reduces the number of requests made to RPC nodes, and for
8
+ many cases avoids the need to wait for the RPC nodes to index previously executed transactions.
9
+
10
+ ## `SerialTransactionExecutor`
11
+
12
+ The `SerialTransactionExecutor` is designed for use in wallet implementations, and dapps where the
13
+ objects owned by the address executing transactions are unlikely to be changed by transactions not
14
+ executed through the executor.
15
+
16
+ To fund transactions, the `SerialTransactionExecutor` will select all of the senders HANEUL coins
17
+ for the first transaction, which will result in a single coin that will then be used as the gas
18
+ payment on all subsequent transactions. This allows executing multiple transactions, without needing
19
+ to re-query for gas coins, or wait for the RPC node to index the previous transactions.
20
+
21
+ To further improve execution efficiency, the `SerialTransactionExecutor` caches the object versions
22
+ of every object used or created by a transaction. This will significantly speed up the execution
23
+ when multiple transactions use the same objects.
24
+
25
+ `SerialTransactionExecutor` maintains an internal queue, so you don't need to wait for previous
26
+ transactions to finish before sending the next one.
27
+
28
+ `SerialTransactionExecutor` can be configured with a number of options:
29
+
30
+ - `client`: An instance of a Haneul client (such as `HaneulGrpcClient`) used to execute
31
+ transactions.
32
+ - `signer`: The signer/keypair used for signed transactions.
33
+ - `defaultBudget`: The default budget for transactions, which will be used if the transaction does
34
+ not specify a budget (default `50_000_000n`).
35
+ - `gasMode`: Either `'coins'` (default) to use owned coins for gas, or `'addressBalance'` to pay gas
36
+ from the sender's address balance.
37
+
38
+ ```ts
39
+ const client = new HaneulGrpcClient({
40
+ network: 'devnet',
41
+ baseUrl: 'https://fullnode.devnet.haneul.io:443',
42
+ });
43
+
44
+ const executor = new SerialTransactionExecutor({
45
+ client,
46
+ signer: yourKeyPair,
47
+ });
48
+
49
+ const tx1 = new Transaction();
50
+ const [coin1] = tx1.splitCoins(tx1.gas, [1]);
51
+ tx1.transferObjects([coin1], address1);
52
+ const tx2 = new Transaction();
53
+ const [coin2] = tx2.splitCoins(tx2.gas, [1]);
54
+ tx2.transferObjects([coin2], address2);
55
+
56
+ const [{ digest: digest1 }, { digest: digest2 }] = await Promise.all([
57
+ executor.executeTransaction(tx1),
58
+ executor.executeTransaction(tx2),
59
+ ]);
60
+ ```
61
+
62
+ ## `ParallelTransactionExecutor`
63
+
64
+ > **Warning:** `ParallelTransactionExecutor` is experimental and may change rapidly as it is being
65
+ > developed.
66
+
67
+ The `ParallelTransactionExecutor` class works similarly to the `SerialTransactionExecutor`, but
68
+ allows for parallel execution of transactions. To make this work, the `ParallelTransactionExecutor`
69
+ will maintain a pool of gas coins, and automatically execute additional transactions to refill the
70
+ gas pool as needed.
71
+
72
+ > **Warning:** Using other client methods or wallets to execute additional transactions while
73
+ > `ParallelTransactionExecutor` is in use may consume/combine gas coins in the gasPool, causing
74
+ > transactions to fail. This may also result in the coins becoming locked for the remainder of the
75
+ > current epoch, preventing them from being used in future transactions.
76
+ >
77
+ > Running multiple instances of `ParallelTransactionExecutor` using the same `sourceCoins` will
78
+ > result in the same issues.
79
+
80
+ In addition to managing gas and caching object versions, the `ParallelTransactionExecutor` will
81
+ automatically detect what objects are being used by transactions, and schedules transactions in a
82
+ way that avoids conflicts between transactions using the same object ids.
83
+
84
+ `ParallelTransactionExecutor` can be configured with a number of options:
85
+
86
+ - `client`: An instance of `HaneulJsonRpcClient` used to execute transactions.
87
+ - `signer`: The signer/keypair used for signed transactions.
88
+ - `gasMode`: Either `'coins'` (default) to use owned coins for gas, or `'addressBalance'` to pay gas
89
+ from the sender's address balance. When using `'addressBalance'`, coin-specific options like
90
+ `coinBatchSize`, `initialCoinBalance`, `minimumCoinBalance`, and `sourceCoins` are not available.
91
+ - `coinBatchSize`: The maximum number of new coins to create when refilling the gas pool
92
+ (default 20)
93
+ - `initialCoinBalance`: The balance of new coins created for the gas pool in GEUNHWA (default
94
+ `200_000_000n`),
95
+ - `minimumCoinBalance`: After executing a transaction, the gasCoin will be reused unless it's
96
+ balance is below this value (default `50_000_000n`),
97
+ - `defaultBudget`: The default budget for transactions, which will be used if the transaction does
98
+ not specify a budget (default `minimumCoinBalance`),
99
+ - `maxPoolSize`: The maximum number of gas coins to keep in the gas pool, which also limits the
100
+ maximum number of concurrent transactions (default 50),
101
+ - `sourceCoins`: An array of coins to use to create the gas pool, defaults to using all coins owned
102
+ by the signer.
103
+ - `epochBoundaryWindow` Time to wait before/after the expected epoch boundary before re-fetching the
104
+ gas pool (in milliseconds). Building transactions will be paused for up to 2x this duration around
105
+ each epoch boundary to ensure the gas price is up-to-date for the next epoch. (default `1000`)
106
+
107
+ ```ts
108
+ const client = new HaneulJsonRpcClient({ url: getJsonRpcFullnodeUrl('devnet'), network: 'devnet' });
109
+
110
+ const executor = new ParallelTransactionExecutor({
111
+ client,
112
+ signer: yourKeyPair,
113
+ });
114
+
115
+ const tx1 = new Transaction();
116
+ const [coin1] = tx1.splitCoins(tx1.gas, [1]);
117
+ tx1.transferObjects([coin1], address1);
118
+ const tx2 = new Transaction();
119
+ const [coin2] = tx2.splitCoins(tx2.gas, [1]);
120
+ tx2.transferObjects([coin2], address2);
121
+
122
+ const [{ digest: digest1 }, { digest: digest2 }] = await Promise.all([
123
+ executor.executeTransaction(tx1),
124
+ executor.executeTransaction(tx2),
125
+ ]);
126
+ ```
127
+
128
+ ## Building and Executing Transactions with Executors
129
+
130
+ The executor classes will significantly improve efficiency when executing multiple transactions, but
131
+ to get the best results there are some best practices to follow:
132
+
133
+ When building transactions, always prefer using unresolved object IDs rather than specifying the
134
+ full `id`/`version`/`digest` for an object input (eg use `tx.object(id)` rather than
135
+ `tx.objectRef({ objectId, version, digest })`). By doing this, you allow the executor to use object
136
+ versions and digests from the cache, and will avoid executing transactions using stale object
137
+ versions.
138
+
139
+ If the signer executes transactions that are not sent through the executor that may cause
140
+ transactions to fail. The executor classes will handle this by invalidating the cache for any
141
+ objects used in the transaction, so you will often be able to recover by re-trying a failed
142
+ transaction once. If it was caused by a stale cache, it should succeed on the second execution.
143
+
144
+ > **Warning:** Transaction plugins and intents may resolve their own data (such as object
145
+ > references) that are not automatically managed by the executor's object cache. This can cause
146
+ > transactions to include stale object versions. The `coinWithBalance` intent is partially supported
147
+ > by the executors and will work correctly when all coin types are either HANEUL or the required
148
+ > balances are available as address balances rather than coin objects.
package/docs/faucet.md ADDED
@@ -0,0 +1,26 @@
1
+ # Faucet
2
+
3
+ > Request test HANEUL tokens from the faucet
4
+
5
+ Devnet, Testnet, and local networks include faucets that mint HANEUL. You can use the Haneul
6
+ TypeScript SDK to call a network's faucet and provide HANEUL to the address you provide.
7
+
8
+ To request HANEUL from a faucet, import the `requestHaneulFromFaucetV2` function from the
9
+ `@haneullabs/haneul/faucet` package to your project.
10
+
11
+ ```typescript
12
+
13
+ ```
14
+
15
+ Use `requestHaneulFromFaucetV2` in your TypeScript code to request HANEUL from the network's faucet.
16
+
17
+ ```typescript
18
+ await requestHaneulFromFaucetV2({
19
+ host: getFaucetHost('testnet'),
20
+ recipient: <RECIPIENT_ADDRESS>,
21
+ });
22
+ ```
23
+
24
+ > **Note:** Faucets on Devnet and Testnet are rate limited. If you run the script too many times,
25
+ > you surpass the limit and must wait to successfully run it again. For testnet, the best way to get
26
+ > HANEUL is via the Web UI: `faucet.haneul.io`.
@@ -0,0 +1,115 @@
1
+ # Hello Haneul
2
+
3
+ > Build your first Haneul application with the TypeScript SDK
4
+
5
+ This basic example introduces you to the Haneul TypeScript SDK. The Node.js example mints HANEUL on
6
+ a Haneul network and then queries the address to get a sum for the owned HANEUL. You don't need to
7
+ use an IDE to complete the example, but one like Microsoft Visual Studio Code helps centralize more
8
+ advanced projects.
9
+
10
+ ## Before you begin
11
+
12
+ You need an address on a Haneul development network (Devnet, Testnet, local). If you don't already
13
+ have an address, use the [Haneul Client CLI](https://docs.haneul.io/references/cli/client) or the
14
+ [Haneul Wallet browser extension](https://docs.haneul-labs.com) to create one.
15
+
16
+ You also need [Node.js](https://nodejs.org/en/download/current) and a package manager like
17
+ [pnpm](https://pnpm.io/installation) to follow this example, so install them on your system if you
18
+ haven't already.
19
+
20
+ ## Start a project
21
+
22
+ Using a Terminal or Console, create a folder on your system (`hello-haneul` in this example) and
23
+ make it the working directory.
24
+
25
+ ```sh
26
+ mkdir hello-haneul
27
+ cd hello-haneul
28
+ ```
29
+
30
+ When you use a package manager to install the necessary packages, it downloads the modules to your
31
+ `node_modules` folder and adds the references to your `package.json` file, creating the file if it
32
+ doesn't already exist. For this example, you need only the Haneul TypeScript SDK:
33
+
34
+ ```sh npm2yarn
35
+ npm i -D @haneullabs/haneul
36
+ ```
37
+
38
+ The SDK is published as an ESM only package, so you also need to set `"type": "module"` in your
39
+ `package.json`. Your `package.json` file should look like this:
40
+
41
+ ```json
42
+ {
43
+ "type": "module",
44
+ "dependencies": {
45
+ "@haneullabs/haneul": "^<VERSION_NUMBER>"
46
+ }
47
+ }
48
+ ```
49
+
50
+ ## Get some HANEUL for your account
51
+
52
+ Instead of a 'Hello World' output to your console, this example introduces some HANEUL to your
53
+ wallet address. You must be on Devnet, Testnet, or a local network to use a faucet for minting
54
+ HANEUL.
55
+
56
+ Create a new `index.js` file in the root of your project with the following code.
57
+
58
+ ```js
59
+ // replace <YOUR_HANEUL_ADDRESS> with your actual address, which is in the form 0x123...
60
+ const MY_ADDRESS = '<YOUR_HANEUL_ADDRESS>';
61
+
62
+ // create a new HaneulGrpcClient object pointing to the network you want to use
63
+ const haneulClient = new HaneulGrpcClient({
64
+ network: 'devnet',
65
+ baseUrl: 'https://fullnode.devnet.haneul.io:443',
66
+ });
67
+
68
+ // Convert GEUNHWA to Haneul
69
+ const balance = (balance) => {
70
+ return Number.parseInt(balance.totalBalance) / Number(GEUNHWA_PER_HANEUL);
71
+ };
72
+
73
+ // store the JSON representation for the HANEUL the address owns before using faucet
74
+ const haneulBefore = await haneulClient.getBalance({
75
+ owner: MY_ADDRESS,
76
+ });
77
+
78
+ await requestHaneulFromFaucetV2({
79
+ // use getFaucetHost to make sure you're using correct faucet address
80
+ // you can also just use the address (see Haneul TypeScript SDK Quick Start for values)
81
+ host: getFaucetHost('devnet'),
82
+ recipient: MY_ADDRESS,
83
+ });
84
+
85
+ // store the JSON representation for the HANEUL the address owns after using faucet
86
+ const haneulAfter = await haneulClient.getBalance({
87
+ owner: MY_ADDRESS,
88
+ });
89
+
90
+ // Output result to console.
91
+ console.log(
92
+ `Balance before faucet: ${balance(haneulBefore)} HANEUL. Balance after: ${balance(
93
+ haneulAfter,
94
+ )} HANEUL. Hello, HANEUL!`,
95
+ );
96
+ ```
97
+
98
+ Save the file, then use Node.js to run it in your Console or Terminal:
99
+
100
+ ```sh
101
+ node index.js
102
+ ```
103
+
104
+ The code imports the `requestHaneulFromFaucetV2` function from the SDK and calls it to mint HANEUL
105
+ for the provided address. The code also imports `HaneulGrpcClient` to create a new client on the
106
+ Haneul network that it uses to query the address and output the amount of HANEUL the address owns
107
+ before and after using the faucet. You can check the total HANEUL for your address using the Haneul
108
+ Wallet or Haneul Client CLI.
109
+
110
+ > **Note:** Faucets on Devnet and Testnet are rate limited. If you run the script too many times,
111
+ > you surpass the limit and must wait to successfully run it again. For testnet, the best way to get
112
+ > HANEUL is via the Web UI: `faucet.haneul.io`.
113
+
114
+ You can also use the [Haneul Client CLI](https://docs.haneul.io/references/cli/client) to perform
115
+ client calls on a Haneul network.
package/docs/index.md ADDED
@@ -0,0 +1,56 @@
1
+ # Haneul TypeScript SDK Quick Start
2
+
3
+ > TypeScript SDK for building on the Haneul blockchain
4
+
5
+ The Haneul TypeScript SDK is a modular library of tools for interacting with the Haneul blockchain.
6
+ Use it to send queries to RPC nodes, build and sign transactions, and interact with a Haneul or
7
+ local network.
8
+
9
+ ## Installation
10
+
11
+ ```sh npm2yarn
12
+ npm i @haneullabs/haneul
13
+ ```
14
+
15
+ ## Network locations
16
+
17
+ The following table lists the locations for Haneul networks.
18
+
19
+ | Network | Full node | faucet |
20
+ | ------- | ---------------------------------------- | ----------------------------------------- |
21
+ | local | `http://127.0.0.1:9000` (default) | `http://127.0.0.1:9123/v2/gas` (default) |
22
+ | Devnet | `https://fullnode.devnet.haneul.io:443` | `https://faucet.devnet.haneul.io/v2/gas` |
23
+ | Testnet | `https://fullnode.testnet.haneul.io:443` | `https://faucet.testnet.haneul.io/v2/gas` |
24
+ | Mainnet | `https://fullnode.mainnet.haneul.io:443` | `null` |
25
+
26
+ > **Warning:** Use dedicated nodes/shared services rather than public endpoints for production apps.
27
+ > The public endpoints maintained by Haneul Labs (`fullnode.<NETWORK>.haneul.io:443`) are
28
+ > rate-limited, and support only 100 requests per 30 seconds or so. Do not use public endpoints in
29
+ > production applications with high traffic volume.
30
+ >
31
+ > You can either run your own Full nodes, or outsource this to a professional infrastructure
32
+ > provider (preferred for apps that have high traffic). You can find a list of reliable RPC endpoint
33
+ > providers for Haneul on the [Haneul Dev Portal](https://haneul.io/developers#dev-tools) using the
34
+ > **Node Service** tab.
35
+
36
+ ## Module packages
37
+
38
+ The SDK contains a set of modular packages that you can use independently or together. Import just
39
+ what you need to keep your code light and compact.
40
+
41
+ - [`@haneullabs/haneul/client`](/haneul/clients) - A client for interacting with Haneul RPC nodes.
42
+ - [`@haneullabs/haneul/bcs`](/haneul/bcs) - A BCS builder with pre-defined types for Haneul.
43
+ - [`@haneullabs/haneul/transactions`](/haneul/transaction-building/basics) - Utilities for building
44
+ and interacting with transactions.
45
+ - [`@haneullabs/haneul/keypairs/*`](/haneul/cryptography/keypairs) - Modular exports for specific
46
+ KeyPair implementations.
47
+ - [`@haneullabs/haneul/verify`](/haneul/cryptography/keypairs#verifying-signatures-without-a-key-pair) -
48
+ Methods for verifying transactions and messages.
49
+ - [`@haneullabs/haneul/cryptography`](/haneul/cryptography/keypairs) - Shared types and classes for
50
+ cryptography.
51
+ - [`@haneullabs/haneul/multisig`](/haneul/cryptography/multisig) - Utilities for working with
52
+ multisig signatures.
53
+ - [`@haneullabs/haneul/utils`](/haneul/utils) - Utilities for formatting and parsing various Haneul
54
+ types.
55
+ - [`@haneullabs/haneul/faucet`](/haneul/faucet) - Methods for requesting HANEUL from a faucet.
56
+ - [`@haneullabs/haneul/zklogin`](/haneul/zklogin) - Utilities for working with zkLogin.
@@ -0,0 +1,61 @@
1
+ # Install Haneul TypeScript SDK
2
+
3
+ > Install the @haneullabs/haneul package and configure your project
4
+
5
+ The Haneul TypeScript SDK is available in the
6
+ [Haneul TS SDK monorepo](https://github.com/GeunhwaJeong/ts-sdks) and NPM.
7
+
8
+ ## Install from NPM
9
+
10
+ To use the Haneul TypeScript SDK in your project, run the following command in your project root:
11
+
12
+ ```sh npm2yarn
13
+ npm i @haneullabs/haneul
14
+ ```
15
+
16
+ The SDK is published as an ESM only package. Make sure your `package.json` includes
17
+ `"type": "module"`:
18
+
19
+ ```json
20
+ {
21
+ "type": "module"
22
+ }
23
+ ```
24
+
25
+ If you are using TypeScript, your `tsconfig.json` should use a compatible `moduleResolution` setting
26
+ such as `"NodeNext"`, `"Node16"`, or `"Bundler"`. See the
27
+ [2.0 migration guide](/haneul/migrations/haneul-2.0#esm-migration) for more details.
28
+
29
+ ## Experimental tag for use with a local Haneul network
30
+
31
+ Projects developing against one of the on-chain Haneul networks (Devnet, Testnet, Mainnet) should
32
+ use the base SDK published in the NPM registry (previous section) because the code aligns with the
33
+ relevant JSON-RPC. If your developing against a
34
+ [local network](https://docs.haneul.io/guides/developer/getting-started/local-network) built from
35
+ the `main` branch of the Haneul monorepo, however, you should use the `experimental`-tagged SDK
36
+ package as it contains the latest features (or a local build detailed in the section that follows).
37
+
38
+ ```sh npm2yarn
39
+ npm i @haneullabs/haneul@experimental
40
+ ```
41
+
42
+ ## Install from local build
43
+
44
+ To build the SDK from the Haneul monorepo, you must use [pnpm](https://pnpm.io/). With pnpm
45
+ installed, run the following command from the `haneul` root directory:
46
+
47
+ ```bash
48
+ # Install all dependencies
49
+ pnpm install
50
+ # Run the build for the TypeScript SDK
51
+ pnpm sdk build
52
+ ```
53
+
54
+ With the SDK built, you can import the library from your `haneul` project. To do so, use a path to
55
+ the `ts-sdks/packages/haneul` directory that is relative to your project. For example, if you
56
+ created a folder `my-haneul-project` at the same level as `haneul`, use the following to import the
57
+ locally built Haneul TypeScript package:
58
+
59
+ ```bash
60
+ pnpm add ../ts-sdks/packages/haneul
61
+ ```
@@ -0,0 +1,32 @@
1
+ # LLM Documentation
2
+
3
+ > Give AI agents access to Haneul SDK documentation in your project
4
+
5
+ Every `@haneullabs/*` package ships a `docs/` directory containing flat markdown files optimized for
6
+ AI agent consumption. When you install an SDK package, you automatically get accurate, up-to-date
7
+ documentation that coding agents (Claude Code, Cursor, Copilot, etc.) can read directly — no
8
+ separate install or training data required.
9
+
10
+ ## How It Works
11
+
12
+ Each package includes:
13
+
14
+ - `docs/llms-index.md` — routing index listing all doc pages with descriptions
15
+ - `docs/*.md` — individual reference pages
16
+
17
+ For example, installing `@haneullabs/haneul` gives you docs at
18
+ `node_modules/@haneullabs/haneul/docs/llms-index.md`.
19
+
20
+ ## Configure Your Agent
21
+
22
+ Add the following snippet to your agent's configuration file (`AGENTS.md`, `CLAUDE.md`,
23
+ `.cursorrules`, etc.):
24
+
25
+ ```markdown
26
+ ## Haneul SDK Reference
27
+
28
+ Every @haneullabs/\* package ships LLM documentation in its `docs/` directory. When working with
29
+ these packages, find the relevant docs by looking for `docs/llms-index.md` files inside
30
+ `node_modules/@haneullabs/\*/`. Read the index first to find the page you need, then read that page
31
+ for details.
32
+ ```
@@ -0,0 +1,66 @@
1
+ # Haneul SDK
2
+
3
+ > TypeScript interfaces for Haneul
4
+
5
+ - [Haneul TypeScript SDK Quick Start](./index.md): TypeScript SDK for building on the Haneul
6
+ blockchain
7
+ - [Install Haneul TypeScript SDK](./install.md): Install the @haneullabs/haneul package and
8
+ configure your project
9
+ - [LLM Documentation](./llm-docs.md): Give AI agents access to Haneul SDK documentation in your
10
+ project
11
+ - [Hello Haneul](./hello-haneul.md): Build your first Haneul application with the TypeScript SDK
12
+ - [Faucet](./faucet.md): Request test HANEUL tokens from the faucet
13
+ - [Haneul Clients](./clients/index.md): Choose and configure gRPC, GraphQL, or JSON-RPC clients
14
+ - [Core API](./clients/core.md): Transport-agnostic Core API shared by all Haneul clients
15
+ - [HaneulGrpcClient](./clients/grpc.md): Connect to Haneul via gRPC with HaneulGrpcClient
16
+ - [HaneulGraphQLClient](./clients/graphql.md): Connect to Haneul via GraphQL with
17
+ HaneulGraphQLClient
18
+ - [HaneulJsonRpcClient](./clients/json-rpc.md): Connect to Haneul via JSON-RPC with
19
+ HaneulJsonRpcClient
20
+ - [Haneul Programmable Transaction Basics](./transaction-building/basics.md): Construct programmable
21
+ transaction blocks with the Transaction API
22
+ - [Paying for Haneul Transactions with Gas Coins](./transaction-building/gas.md): Configure gas
23
+ budget, price, and coin selection for transactions
24
+ - [Transaction Intents](./transaction-building/intents.md): Use high-level intents to simplify
25
+ transaction building
26
+ - [Building Offline](./transaction-building/offline.md): Build transactions without a network
27
+ connection
28
+ - [Sponsored Transactions](./transaction-building/sponsored-transactions.md): Pay gas fees on behalf
29
+ of other users with sponsored transactions
30
+ - [Key pairs](./cryptography/keypairs.md): Create and manage Ed25519, Secp256k1, and Secp256r1
31
+ keypairs
32
+ - [Multi-Signature Transactions](./cryptography/multisig.md): Create multi-signature transactions
33
+ with multiple signers
34
+ - [Passkey](./cryptography/passkey.md): Use WebAuthn passkeys for Haneul transaction signing
35
+ - [Web Crypto Signer](./cryptography/webcrypto-signer.md): Sign transactions using the Web Crypto
36
+ API
37
+ - [The `@haneullabs/haneul/utils` package](./utils/index.md): Utility functions for addresses,
38
+ coins, and common operations
39
+ - [Derived Objects](./utils/derived_objects.md): Compute derived object IDs from parent objects
40
+ - [BCS](./bcs.md): Binary Canonical Serialization for encoding Haneul Move types
41
+ - [ZkLogin](./zklogin.md): Zero-knowledge authentication with OAuth providers on Haneul
42
+ - [Transaction Executors](./executors.md): Manage transaction execution with queuing and parallel
43
+ strategies
44
+ - [Transaction Plugins](./plugins.md): Extend transaction building with reusable plugins
45
+ - [Building SDKs](./sdk-building.md): Build custom SDKs on top of the Haneul TypeScript SDK
46
+ - [Migrate to 2.0](./migrations/haneul-2.0/index.md): Migration guide for Haneul TypeScript SDK 2.0
47
+ - [Agent Migration Prompt](./migrations/haneul-2.0/agent-prompt.md): AI agent prompt for automated
48
+ SDK 2.0 migration
49
+ - [@haneullabs/haneul](./migrations/haneul-2.0/haneul.md): Migrate @haneullabs/haneul from 1.x to
50
+ 2.0
51
+ - [Migrating from JSON-RPC](./migrations/haneul-2.0/json-rpc-migration.md): Migrate from JSON-RPC to
52
+ the new Core API
53
+ - [@haneullabs/dapp-kit](./migrations/haneul-2.0/dapp-kit.md): Migrate @haneullabs/dapp-kit to 2.0
54
+ - [@haneullabs/kiosk](./migrations/haneul-2.0/kiosk.md): Migrate @haneullabs/kiosk to 2.0
55
+ - [@haneullabs/zksend](./migrations/haneul-2.0/zksend.md): Migrate @haneullabs/zksend to 2.0
56
+ - [@haneullabs/haneulns](./migrations/haneul-2.0/haneulns.md): Migrate @haneullabs/haneulns to 2.0
57
+ - [@haneullabs/deepbook-v3](./migrations/haneul-2.0/deepbook-v3.md): Migrate @haneullabs/deepbook-v3
58
+ to 2.0
59
+ - [@haneullabs/walrus](./migrations/haneul-2.0/walrus.md): Migrate @haneullabs/walrus to 2.0
60
+ - [@haneullabs/seal](./migrations/haneul-2.0/seal.md): Migrate @haneullabs/seal to 2.0
61
+ - [Wallet Builders](./migrations/haneul-2.0/wallet-builders.md): Migration guide for wallet
62
+ extension developers
63
+ - [SDK Maintainers](./migrations/haneul-2.0/sdk-maintainers.md): Migration guide for SDK maintainers
64
+ and library authors
65
+ - [Migrate to 1.0](./migrations/haneul-1.0.md): Migrate to Haneul TypeScript SDK 1.0
66
+ - [Migrate to 0.38.0](./migrations/0.38.md): Migrate from SDK version 0.37 to 0.38
@@ -0,0 +1,57 @@
1
+ # Migrate to 0.38.0
2
+
3
+ > Migrate from SDK version 0.37 to 0.38
4
+
5
+ > **Warning:** The 1.0 release of the SDK contains many additional changes. This document may help
6
+ > help as an intermediate step when upgrading from older versions of the SDK, but all apps should be
7
+ > upgraded to the latest version of the SDK instead of 0.38.0.
8
+
9
+ The Haneul TypeScript SDK was refactored beginning with version 0.38.0. If you are updating from an
10
+ earlier version of the SDK, there are some changes you should consider when updating your code.
11
+
12
+ ### Module structure
13
+
14
+ The Haneul TypeScript SDK is now divided into modular components. Before version 0.38.0, you
15
+ imported the complete SDK module. Now, you upload the individual packages of the SDK module instead.
16
+ See the [Module Packages section](#module-packages) for the list of packages.
17
+
18
+ ### Deprecated classes
19
+
20
+ The Haneul TypeScript SDK deprecates the following classes with version 0.38.0:
21
+
22
+ - `JsonRpcProvider` - The `JsonRpcProvider` class is deprecated in favor of the `haneulClient` class
23
+ when creating a client for a Haneul network. See
24
+ [Network Interactions with HaneulJsonRpcClient](/haneul/clients) for more information.
25
+ - `SignerWithProver` and `RawSigner` - Key pairs now directly support signing transactions and
26
+ messages without the need of a `Signer` class. See the [Key pairs](/haneul/cryptography/keypairs)
27
+ topic for more information.
28
+ - `signAndExecuteTransaction` - This method was not deprecated, but is now part of
29
+ `HaneulJsonRpcClient`.
30
+ - `Connection` classes - The `Connection` classes (`Connection`, `devnetConnection`, and so on) have
31
+ been deprecated in favor ofHaneulJsonRpcClientuiClient` for establishing the connection. See
32
+ [Network Interactions with HaneulJsonRpcClient](/haneul/clients) for more information.
33
+ - The `superstruct` type definitions for `JsonRPCProvider` types are replaced with generated types
34
+ exported from `@haneullabs/haneul/client`. The new type definitions are pure TypeScript types that
35
+ you can't use for runtime validation.
36
+ - A more stable JSON-RPC API has reduced the need for many of the SDK "getter" methods, which are
37
+ now deprecated.
38
+
39
+ ### Signing transactions
40
+
41
+ Signing and sending transactions changes slightly with the deprecation of the `Signer` pattern. For
42
+ an example of transaction signing, see the
43
+ [Haneul Programmable Transaction Blocks Basics](/haneul/transaction-building/basics) topic.
44
+
45
+ ### Faucet requests
46
+
47
+ HaneulJsonRpcClient The ability to request HANEUL from a faucet is not part of `HaneulJsonRpcClient`
48
+ as it was with `JsonRpcProvider`. Instead, you must use the `requestHaneulFromFaucetV0` method from
49
+ `@haneullabs/haneul/faucet`. The `@haneullabs/haneul/faucet` import also provides a `getFaucetHost`
50
+ method to retrieve the faucet URL for `localnet`, `testnet`, or `devnet` networks.
51
+
52
+ ```ts
53
+ await requestHaneulFromFaucetV0({
54
+ host: getFaucetHost('devnet'),
55
+ recipient: '<HANEUL_ADDRESS>',
56
+ });
57
+ ```