@alephium/web3 1.8.3-rc.0 → 1.8.3

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 (446) hide show
  1. package/dist/alephium-web3.min.js +3 -0
  2. package/dist/alephium-web3.min.js.LICENSE.txt +12 -0
  3. package/dist/alephium-web3.min.js.map +1 -0
  4. package/dist/scripts/check-versions.d.ts +1 -0
  5. package/dist/{_cjs/scripts → scripts}/check-versions.js +0 -1
  6. package/dist/scripts/header.d.ts +0 -0
  7. package/dist/{_esm/scripts → scripts}/header.js +0 -1
  8. package/dist/{_types/src → src}/address/address.d.ts +0 -1
  9. package/dist/{_cjs/src → src}/address/address.js +0 -1
  10. package/dist/src/address/index.d.ts +1 -0
  11. package/dist/{_cjs/src → src}/address/index.js +0 -1
  12. package/dist/{_types/src → src}/api/api-alephium.d.ts +0 -1
  13. package/dist/{_cjs/src → src}/api/api-alephium.js +0 -1
  14. package/dist/{_types/src → src}/api/api-explorer.d.ts +0 -1
  15. package/dist/{_cjs/src → src}/api/api-explorer.js +0 -1
  16. package/dist/{_types/src → src}/api/explorer-provider.d.ts +0 -1
  17. package/dist/{_cjs/src → src}/api/explorer-provider.js +0 -1
  18. package/dist/{_types/src → src}/api/index.d.ts +0 -1
  19. package/dist/{_cjs/src → src}/api/index.js +0 -1
  20. package/dist/{_types/src → src}/api/node-provider.d.ts +0 -1
  21. package/dist/{_cjs/src → src}/api/node-provider.js +0 -1
  22. package/dist/{_types/src → src}/api/types.d.ts +0 -1
  23. package/dist/{_cjs/src → src}/api/types.js +0 -1
  24. package/dist/{_types/src → src}/api/utils.d.ts +0 -1
  25. package/dist/{_cjs/src → src}/api/utils.js +0 -1
  26. package/dist/{_types/src → src}/block/block.d.ts +0 -1
  27. package/dist/{_cjs/src → src}/block/block.js +0 -1
  28. package/dist/{_types/src → src}/block/index.d.ts +0 -1
  29. package/dist/{_cjs/src → src}/block/index.js +0 -1
  30. package/dist/{_types/src → src}/codec/array-codec.d.ts +0 -1
  31. package/dist/{_cjs/src → src}/codec/array-codec.js +0 -1
  32. package/dist/{_types/src → src}/codec/asset-output-codec.d.ts +0 -1
  33. package/dist/{_cjs/src → src}/codec/asset-output-codec.js +0 -1
  34. package/dist/{_types/src → src}/codec/bigint-codec.d.ts +0 -1
  35. package/dist/{_cjs/src → src}/codec/bigint-codec.js +0 -1
  36. package/dist/{_types/src → src}/codec/bytestring-codec.d.ts +0 -1
  37. package/dist/{_cjs/src → src}/codec/bytestring-codec.js +0 -1
  38. package/dist/{_types/src → src}/codec/codec.d.ts +0 -1
  39. package/dist/{_cjs/src → src}/codec/codec.js +0 -1
  40. package/dist/{_types/src → src}/codec/compact-int-codec.d.ts +0 -1
  41. package/dist/{_cjs/src → src}/codec/compact-int-codec.js +0 -1
  42. package/dist/{_types/src → src}/codec/contract-codec.d.ts +0 -1
  43. package/dist/{_cjs/src → src}/codec/contract-codec.js +0 -1
  44. package/dist/{_types/src → src}/codec/contract-output-codec.d.ts +0 -1
  45. package/dist/{_cjs/src → src}/codec/contract-output-codec.js +0 -1
  46. package/dist/{_types/src → src}/codec/contract-output-ref-codec.d.ts +0 -1
  47. package/dist/{_cjs/src → src}/codec/contract-output-ref-codec.js +0 -1
  48. package/dist/{_types/src → src}/codec/either-codec.d.ts +0 -1
  49. package/dist/{_cjs/src → src}/codec/either-codec.js +0 -1
  50. package/dist/{_types/src → src}/codec/hash.d.ts +0 -1
  51. package/dist/{_cjs/src → src}/codec/hash.js +0 -1
  52. package/dist/{_types/src → src}/codec/index.d.ts +0 -1
  53. package/dist/{_cjs/src → src}/codec/index.js +0 -1
  54. package/dist/{_types/src → src}/codec/input-codec.d.ts +0 -1
  55. package/dist/{_cjs/src → src}/codec/input-codec.js +0 -1
  56. package/dist/{_types/src → src}/codec/instr-codec.d.ts +0 -1
  57. package/dist/{_cjs/src → src}/codec/instr-codec.js +0 -1
  58. package/dist/{_types/src → src}/codec/int-as-4bytes-codec.d.ts +0 -1
  59. package/dist/{_cjs/src → src}/codec/int-as-4bytes-codec.js +0 -1
  60. package/dist/{_types/src → src}/codec/lockup-script-codec.d.ts +0 -1
  61. package/dist/{_cjs/src → src}/codec/lockup-script-codec.js +0 -1
  62. package/dist/{_types/src → src}/codec/method-codec.d.ts +0 -1
  63. package/dist/{_cjs/src → src}/codec/method-codec.js +0 -1
  64. package/dist/{_types/src → src}/codec/option-codec.d.ts +0 -1
  65. package/dist/{_cjs/src → src}/codec/option-codec.js +0 -1
  66. package/dist/{_types/src → src}/codec/output-codec.d.ts +0 -1
  67. package/dist/{_cjs/src → src}/codec/output-codec.js +0 -1
  68. package/dist/{_types/src → src}/codec/reader.d.ts +0 -1
  69. package/dist/{_cjs/src → src}/codec/reader.js +0 -1
  70. package/dist/{_types/src → src}/codec/script-codec.d.ts +0 -1
  71. package/dist/{_cjs/src → src}/codec/script-codec.js +0 -1
  72. package/dist/{_types/src → src}/codec/signature-codec.d.ts +0 -1
  73. package/dist/{_cjs/src → src}/codec/signature-codec.js +0 -1
  74. package/dist/{_types/src → src}/codec/timestamp-codec.d.ts +0 -1
  75. package/dist/{_cjs/src → src}/codec/timestamp-codec.js +0 -1
  76. package/dist/{_types/src → src}/codec/token-codec.d.ts +0 -1
  77. package/dist/{_cjs/src → src}/codec/token-codec.js +0 -1
  78. package/dist/{_types/src → src}/codec/transaction-codec.d.ts +0 -1
  79. package/dist/{_cjs/src → src}/codec/transaction-codec.js +0 -1
  80. package/dist/{_types/src → src}/codec/unlock-script-codec.d.ts +0 -1
  81. package/dist/{_cjs/src → src}/codec/unlock-script-codec.js +0 -1
  82. package/dist/{_types/src → src}/codec/unsigned-tx-codec.d.ts +0 -1
  83. package/dist/{_cjs/src → src}/codec/unsigned-tx-codec.js +0 -1
  84. package/dist/{_types/src → src}/codec/val.d.ts +0 -1
  85. package/dist/{_cjs/src → src}/codec/val.js +0 -1
  86. package/dist/{_types/src → src}/constants.d.ts +0 -1
  87. package/dist/{_cjs/src → src}/constants.js +0 -1
  88. package/dist/{_types/src → src}/contract/contract.d.ts +0 -1
  89. package/dist/{_cjs/src → src}/contract/contract.js +0 -1
  90. package/dist/{_types/src → src}/contract/events.d.ts +0 -1
  91. package/dist/{_cjs/src → src}/contract/events.js +0 -1
  92. package/dist/{_types/src → src}/contract/index.d.ts +0 -1
  93. package/dist/{_cjs/src → src}/contract/index.js +0 -1
  94. package/dist/{_types/src → src}/contract/ralph.d.ts +0 -1
  95. package/dist/{_cjs/src → src}/contract/ralph.js +0 -1
  96. package/dist/{_types/src → src}/contract/script-simulator.d.ts +0 -1
  97. package/dist/{_cjs/src → src}/contract/script-simulator.js +0 -1
  98. package/dist/{_types/src → src}/debug.d.ts +0 -1
  99. package/dist/{_cjs/src → src}/debug.js +0 -1
  100. package/dist/{_types/src → src}/error.d.ts +0 -1
  101. package/dist/{_cjs/src → src}/error.js +0 -1
  102. package/dist/{_types/src → src}/exchange/exchange.d.ts +0 -1
  103. package/dist/{_cjs/src → src}/exchange/exchange.js +0 -1
  104. package/dist/{_types/src → src}/exchange/index.d.ts +0 -1
  105. package/dist/{_cjs/src → src}/exchange/index.js +0 -1
  106. package/dist/{_types/src → src}/global.d.ts +0 -1
  107. package/dist/{_cjs/src → src}/global.js +0 -1
  108. package/dist/{_types/src → src}/index.d.ts +0 -1
  109. package/dist/{_cjs/src → src}/index.js +0 -1
  110. package/dist/{_types/src → src}/signer/index.d.ts +0 -1
  111. package/dist/{_cjs/src → src}/signer/index.js +0 -1
  112. package/dist/{_types/src → src}/signer/signer.d.ts +0 -1
  113. package/dist/{_cjs/src → src}/signer/signer.js +1 -2
  114. package/dist/{_types/src → src}/signer/tx-builder.d.ts +1 -2
  115. package/dist/{_cjs/src → src}/signer/tx-builder.js +1 -2
  116. package/dist/{_types/src → src}/signer/types.d.ts +0 -1
  117. package/dist/{_cjs/src → src}/signer/types.js +0 -1
  118. package/dist/src/token/index.d.ts +1 -0
  119. package/dist/{_cjs/src → src}/token/index.js +0 -1
  120. package/dist/{_types/src → src}/token/nft.d.ts +0 -1
  121. package/dist/{_cjs/src → src}/token/nft.js +0 -1
  122. package/dist/{_types/src → src}/transaction/index.d.ts +0 -1
  123. package/dist/{_cjs/src → src}/transaction/index.js +0 -1
  124. package/dist/{_types/src → src}/transaction/sign-verify.d.ts +0 -1
  125. package/dist/{_cjs/src → src}/transaction/sign-verify.js +0 -1
  126. package/dist/{_types/src → src}/transaction/status.d.ts +0 -1
  127. package/dist/{_cjs/src → src}/transaction/status.js +0 -1
  128. package/dist/{_types/src → src}/transaction/utils.d.ts +0 -1
  129. package/dist/{_cjs/src → src}/transaction/utils.js +0 -1
  130. package/dist/{_types/src → src}/utils/bs58.d.ts +0 -1
  131. package/dist/{_cjs/src → src}/utils/bs58.js +0 -1
  132. package/dist/{_types/src → src}/utils/djb2.d.ts +0 -1
  133. package/dist/{_cjs/src → src}/utils/djb2.js +0 -1
  134. package/dist/{_types/src → src}/utils/index.d.ts +0 -1
  135. package/dist/{_cjs/src → src}/utils/index.js +0 -1
  136. package/dist/{_types/src → src}/utils/number.d.ts +0 -1
  137. package/dist/{_types/src → src}/utils/number.fixture.d.ts +0 -1
  138. package/dist/{_cjs/src → src}/utils/number.fixture.js +0 -1
  139. package/dist/{_cjs/src → src}/utils/number.js +0 -1
  140. package/dist/{_types/src → src}/utils/sign.d.ts +0 -1
  141. package/dist/{_cjs/src → src}/utils/sign.js +0 -1
  142. package/dist/{_types/src → src}/utils/subscription.d.ts +0 -1
  143. package/dist/{_cjs/src → src}/utils/subscription.js +0 -1
  144. package/dist/{_types/src → src}/utils/utils.d.ts +0 -1
  145. package/dist/{_cjs/src → src}/utils/utils.js +0 -1
  146. package/dist/{_types/src → src}/utils/webcrypto.d.ts +0 -1
  147. package/dist/{_cjs/src → src}/utils/webcrypto.js +0 -1
  148. package/package.json +23 -21
  149. package/src/signer/signer.ts +1 -1
  150. package/src/signer/tx-builder.ts +1 -1
  151. package/{webpack.config.cjs → webpack.config.js} +2 -2
  152. package/LICENSE +0 -165
  153. package/dist/_cjs/scripts/check-versions.js.map +0 -1
  154. package/dist/_cjs/scripts/header.js +0 -19
  155. package/dist/_cjs/scripts/header.js.map +0 -1
  156. package/dist/_cjs/src/address/address.js.map +0 -1
  157. package/dist/_cjs/src/address/index.js.map +0 -1
  158. package/dist/_cjs/src/api/api-alephium.js.map +0 -1
  159. package/dist/_cjs/src/api/api-explorer.js.map +0 -1
  160. package/dist/_cjs/src/api/explorer-provider.js.map +0 -1
  161. package/dist/_cjs/src/api/index.js.map +0 -1
  162. package/dist/_cjs/src/api/node-provider.js.map +0 -1
  163. package/dist/_cjs/src/api/types.js.map +0 -1
  164. package/dist/_cjs/src/api/utils.js.map +0 -1
  165. package/dist/_cjs/src/block/block.js.map +0 -1
  166. package/dist/_cjs/src/block/index.js.map +0 -1
  167. package/dist/_cjs/src/codec/array-codec.js.map +0 -1
  168. package/dist/_cjs/src/codec/asset-output-codec.js.map +0 -1
  169. package/dist/_cjs/src/codec/bigint-codec.js.map +0 -1
  170. package/dist/_cjs/src/codec/bytestring-codec.js.map +0 -1
  171. package/dist/_cjs/src/codec/codec.js.map +0 -1
  172. package/dist/_cjs/src/codec/compact-int-codec.js.map +0 -1
  173. package/dist/_cjs/src/codec/contract-codec.js.map +0 -1
  174. package/dist/_cjs/src/codec/contract-output-codec.js.map +0 -1
  175. package/dist/_cjs/src/codec/contract-output-ref-codec.js.map +0 -1
  176. package/dist/_cjs/src/codec/either-codec.js.map +0 -1
  177. package/dist/_cjs/src/codec/hash.js.map +0 -1
  178. package/dist/_cjs/src/codec/index.js.map +0 -1
  179. package/dist/_cjs/src/codec/input-codec.js.map +0 -1
  180. package/dist/_cjs/src/codec/instr-codec.js.map +0 -1
  181. package/dist/_cjs/src/codec/int-as-4bytes-codec.js.map +0 -1
  182. package/dist/_cjs/src/codec/lockup-script-codec.js.map +0 -1
  183. package/dist/_cjs/src/codec/method-codec.js.map +0 -1
  184. package/dist/_cjs/src/codec/option-codec.js.map +0 -1
  185. package/dist/_cjs/src/codec/output-codec.js.map +0 -1
  186. package/dist/_cjs/src/codec/reader.js.map +0 -1
  187. package/dist/_cjs/src/codec/script-codec.js.map +0 -1
  188. package/dist/_cjs/src/codec/signature-codec.js.map +0 -1
  189. package/dist/_cjs/src/codec/timestamp-codec.js.map +0 -1
  190. package/dist/_cjs/src/codec/token-codec.js.map +0 -1
  191. package/dist/_cjs/src/codec/transaction-codec.js.map +0 -1
  192. package/dist/_cjs/src/codec/unlock-script-codec.js.map +0 -1
  193. package/dist/_cjs/src/codec/unsigned-tx-codec.js.map +0 -1
  194. package/dist/_cjs/src/codec/val.js.map +0 -1
  195. package/dist/_cjs/src/constants.js.map +0 -1
  196. package/dist/_cjs/src/contract/contract.js.map +0 -1
  197. package/dist/_cjs/src/contract/events.js.map +0 -1
  198. package/dist/_cjs/src/contract/index.js.map +0 -1
  199. package/dist/_cjs/src/contract/ralph.js.map +0 -1
  200. package/dist/_cjs/src/contract/script-simulator.js.map +0 -1
  201. package/dist/_cjs/src/debug.js.map +0 -1
  202. package/dist/_cjs/src/error.js.map +0 -1
  203. package/dist/_cjs/src/exchange/exchange.js.map +0 -1
  204. package/dist/_cjs/src/exchange/index.js.map +0 -1
  205. package/dist/_cjs/src/global.js.map +0 -1
  206. package/dist/_cjs/src/index.js.map +0 -1
  207. package/dist/_cjs/src/signer/index.js.map +0 -1
  208. package/dist/_cjs/src/signer/signer.js.map +0 -1
  209. package/dist/_cjs/src/signer/tx-builder.js.map +0 -1
  210. package/dist/_cjs/src/signer/types.js.map +0 -1
  211. package/dist/_cjs/src/token/index.js.map +0 -1
  212. package/dist/_cjs/src/token/nft.js.map +0 -1
  213. package/dist/_cjs/src/transaction/index.js.map +0 -1
  214. package/dist/_cjs/src/transaction/sign-verify.js.map +0 -1
  215. package/dist/_cjs/src/transaction/status.js.map +0 -1
  216. package/dist/_cjs/src/transaction/utils.js.map +0 -1
  217. package/dist/_cjs/src/utils/bs58.js.map +0 -1
  218. package/dist/_cjs/src/utils/djb2.js.map +0 -1
  219. package/dist/_cjs/src/utils/index.js.map +0 -1
  220. package/dist/_cjs/src/utils/number.fixture.js.map +0 -1
  221. package/dist/_cjs/src/utils/number.js.map +0 -1
  222. package/dist/_cjs/src/utils/sign.js.map +0 -1
  223. package/dist/_cjs/src/utils/subscription.js.map +0 -1
  224. package/dist/_cjs/src/utils/utils.js.map +0 -1
  225. package/dist/_cjs/src/utils/webcrypto.js.map +0 -1
  226. package/dist/_esm/scripts/check-versions.js +0 -40
  227. package/dist/_esm/scripts/check-versions.js.map +0 -1
  228. package/dist/_esm/scripts/header.js.map +0 -1
  229. package/dist/_esm/src/address/address.js +0 -220
  230. package/dist/_esm/src/address/address.js.map +0 -1
  231. package/dist/_esm/src/address/index.js +0 -19
  232. package/dist/_esm/src/address/index.js.map +0 -1
  233. package/dist/_esm/src/api/api-alephium.js +0 -1519
  234. package/dist/_esm/src/api/api-alephium.js.map +0 -1
  235. package/dist/_esm/src/api/api-explorer.js +0 -964
  236. package/dist/_esm/src/api/api-explorer.js.map +0 -1
  237. package/dist/_esm/src/api/explorer-provider.js +0 -66
  238. package/dist/_esm/src/api/explorer-provider.js.map +0 -1
  239. package/dist/_esm/src/api/index.js +0 -24
  240. package/dist/_esm/src/api/index.js.map +0 -1
  241. package/dist/_esm/src/api/node-provider.js +0 -201
  242. package/dist/_esm/src/api/node-provider.js.map +0 -1
  243. package/dist/_esm/src/api/types.js +0 -211
  244. package/dist/_esm/src/api/types.js.map +0 -1
  245. package/dist/_esm/src/api/utils.js +0 -51
  246. package/dist/_esm/src/api/utils.js.map +0 -1
  247. package/dist/_esm/src/block/block.js +0 -145
  248. package/dist/_esm/src/block/block.js.map +0 -1
  249. package/dist/_esm/src/block/index.js +0 -19
  250. package/dist/_esm/src/block/index.js.map +0 -1
  251. package/dist/_esm/src/codec/array-codec.js +0 -42
  252. package/dist/_esm/src/codec/array-codec.js.map +0 -1
  253. package/dist/_esm/src/codec/asset-output-codec.js +0 -91
  254. package/dist/_esm/src/codec/asset-output-codec.js.map +0 -1
  255. package/dist/_esm/src/codec/bigint-codec.js +0 -94
  256. package/dist/_esm/src/codec/bigint-codec.js.map +0 -1
  257. package/dist/_esm/src/codec/bytestring-codec.js +0 -33
  258. package/dist/_esm/src/codec/bytestring-codec.js.map +0 -1
  259. package/dist/_esm/src/codec/codec.js +0 -131
  260. package/dist/_esm/src/codec/codec.js.map +0 -1
  261. package/dist/_esm/src/codec/compact-int-codec.js +0 -304
  262. package/dist/_esm/src/codec/compact-int-codec.js.map +0 -1
  263. package/dist/_esm/src/codec/contract-codec.js +0 -64
  264. package/dist/_esm/src/codec/contract-codec.js.map +0 -1
  265. package/dist/_esm/src/codec/contract-output-codec.js +0 -57
  266. package/dist/_esm/src/codec/contract-output-codec.js.map +0 -1
  267. package/dist/_esm/src/codec/contract-output-ref-codec.js +0 -26
  268. package/dist/_esm/src/codec/contract-output-ref-codec.js.map +0 -1
  269. package/dist/_esm/src/codec/either-codec.js +0 -22
  270. package/dist/_esm/src/codec/either-codec.js.map +0 -1
  271. package/dist/_esm/src/codec/hash.js +0 -32
  272. package/dist/_esm/src/codec/hash.js.map +0 -1
  273. package/dist/_esm/src/codec/index.js +0 -42
  274. package/dist/_esm/src/codec/index.js.map +0 -1
  275. package/dist/_esm/src/codec/input-codec.js +0 -33
  276. package/dist/_esm/src/codec/input-codec.js.map +0 -1
  277. package/dist/_esm/src/codec/instr-codec.js +0 -1067
  278. package/dist/_esm/src/codec/instr-codec.js.map +0 -1
  279. package/dist/_esm/src/codec/int-as-4bytes-codec.js +0 -29
  280. package/dist/_esm/src/codec/int-as-4bytes-codec.js.map +0 -1
  281. package/dist/_esm/src/codec/lockup-script-codec.js +0 -32
  282. package/dist/_esm/src/codec/lockup-script-codec.js.map +0 -1
  283. package/dist/_esm/src/codec/method-codec.js +0 -71
  284. package/dist/_esm/src/codec/method-codec.js.map +0 -1
  285. package/dist/_esm/src/codec/option-codec.js +0 -33
  286. package/dist/_esm/src/codec/option-codec.js.map +0 -1
  287. package/dist/_esm/src/codec/output-codec.js +0 -24
  288. package/dist/_esm/src/codec/output-codec.js.map +0 -1
  289. package/dist/_esm/src/codec/reader.js +0 -45
  290. package/dist/_esm/src/codec/reader.js.map +0 -1
  291. package/dist/_esm/src/codec/script-codec.js +0 -31
  292. package/dist/_esm/src/codec/script-codec.js.map +0 -1
  293. package/dist/_esm/src/codec/signature-codec.js +0 -22
  294. package/dist/_esm/src/codec/signature-codec.js.map +0 -1
  295. package/dist/_esm/src/codec/timestamp-codec.js +0 -36
  296. package/dist/_esm/src/codec/timestamp-codec.js.map +0 -1
  297. package/dist/_esm/src/codec/token-codec.js +0 -26
  298. package/dist/_esm/src/codec/token-codec.js.map +0 -1
  299. package/dist/_esm/src/codec/transaction-codec.js +0 -99
  300. package/dist/_esm/src/codec/transaction-codec.js.map +0 -1
  301. package/dist/_esm/src/codec/unlock-script-codec.js +0 -47
  302. package/dist/_esm/src/codec/unlock-script-codec.js.map +0 -1
  303. package/dist/_esm/src/codec/unsigned-tx-codec.js +0 -57
  304. package/dist/_esm/src/codec/unsigned-tx-codec.js.map +0 -1
  305. package/dist/_esm/src/codec/val.js +0 -31
  306. package/dist/_esm/src/codec/val.js.map +0 -1
  307. package/dist/_esm/src/constants.js +0 -31
  308. package/dist/_esm/src/constants.js.map +0 -1
  309. package/dist/_esm/src/contract/contract.js +0 -1361
  310. package/dist/_esm/src/contract/contract.js.map +0 -1
  311. package/dist/_esm/src/contract/events.js +0 -56
  312. package/dist/_esm/src/contract/events.js.map +0 -1
  313. package/dist/_esm/src/contract/index.js +0 -22
  314. package/dist/_esm/src/contract/index.js.map +0 -1
  315. package/dist/_esm/src/contract/ralph.js +0 -415
  316. package/dist/_esm/src/contract/ralph.js.map +0 -1
  317. package/dist/_esm/src/contract/script-simulator.js +0 -754
  318. package/dist/_esm/src/contract/script-simulator.js.map +0 -1
  319. package/dist/_esm/src/debug.js +0 -38
  320. package/dist/_esm/src/debug.js.map +0 -1
  321. package/dist/_esm/src/error.js +0 -33
  322. package/dist/_esm/src/error.js.map +0 -1
  323. package/dist/_esm/src/exchange/exchange.js +0 -119
  324. package/dist/_esm/src/exchange/exchange.js.map +0 -1
  325. package/dist/_esm/src/exchange/index.js +0 -19
  326. package/dist/_esm/src/exchange/index.js.map +0 -1
  327. package/dist/_esm/src/global.js +0 -48
  328. package/dist/_esm/src/global.js.map +0 -1
  329. package/dist/_esm/src/index.js +0 -36
  330. package/dist/_esm/src/index.js.map +0 -1
  331. package/dist/_esm/src/signer/index.js +0 -21
  332. package/dist/_esm/src/signer/index.js.map +0 -1
  333. package/dist/_esm/src/signer/signer.js +0 -206
  334. package/dist/_esm/src/signer/signer.js.map +0 -1
  335. package/dist/_esm/src/signer/tx-builder.js +0 -182
  336. package/dist/_esm/src/signer/tx-builder.js.map +0 -1
  337. package/dist/_esm/src/signer/types.js +0 -29
  338. package/dist/_esm/src/signer/types.js.map +0 -1
  339. package/dist/_esm/src/token/index.js +0 -19
  340. package/dist/_esm/src/token/index.js.map +0 -1
  341. package/dist/_esm/src/token/nft.js +0 -115
  342. package/dist/_esm/src/token/nft.js.map +0 -1
  343. package/dist/_esm/src/transaction/index.js +0 -21
  344. package/dist/_esm/src/transaction/index.js.map +0 -1
  345. package/dist/_esm/src/transaction/sign-verify.js +0 -25
  346. package/dist/_esm/src/transaction/sign-verify.js.map +0 -1
  347. package/dist/_esm/src/transaction/status.js +0 -50
  348. package/dist/_esm/src/transaction/status.js.map +0 -1
  349. package/dist/_esm/src/transaction/utils.js +0 -52
  350. package/dist/_esm/src/transaction/utils.js.map +0 -1
  351. package/dist/_esm/src/utils/bs58.js +0 -43
  352. package/dist/_esm/src/utils/bs58.js.map +0 -1
  353. package/dist/_esm/src/utils/djb2.js +0 -25
  354. package/dist/_esm/src/utils/djb2.js.map +0 -1
  355. package/dist/_esm/src/utils/index.js +0 -25
  356. package/dist/_esm/src/utils/index.js.map +0 -1
  357. package/dist/_esm/src/utils/number.fixture.js +0 -187
  358. package/dist/_esm/src/utils/number.fixture.js.map +0 -1
  359. package/dist/_esm/src/utils/number.js +0 -139
  360. package/dist/_esm/src/utils/number.js.map +0 -1
  361. package/dist/_esm/src/utils/sign.js +0 -62
  362. package/dist/_esm/src/utils/sign.js.map +0 -1
  363. package/dist/_esm/src/utils/subscription.js +0 -48
  364. package/dist/_esm/src/utils/subscription.js.map +0 -1
  365. package/dist/_esm/src/utils/utils.js +0 -144
  366. package/dist/_esm/src/utils/utils.js.map +0 -1
  367. package/dist/_esm/src/utils/webcrypto.js +0 -38
  368. package/dist/_esm/src/utils/webcrypto.js.map +0 -1
  369. package/dist/_types/scripts/check-versions.d.ts +0 -2
  370. package/dist/_types/scripts/check-versions.d.ts.map +0 -1
  371. package/dist/_types/scripts/header.d.ts +0 -1
  372. package/dist/_types/scripts/header.d.ts.map +0 -1
  373. package/dist/_types/src/address/address.d.ts.map +0 -1
  374. package/dist/_types/src/address/index.d.ts +0 -2
  375. package/dist/_types/src/address/index.d.ts.map +0 -1
  376. package/dist/_types/src/api/api-alephium.d.ts.map +0 -1
  377. package/dist/_types/src/api/api-explorer.d.ts.map +0 -1
  378. package/dist/_types/src/api/explorer-provider.d.ts.map +0 -1
  379. package/dist/_types/src/api/index.d.ts.map +0 -1
  380. package/dist/_types/src/api/node-provider.d.ts.map +0 -1
  381. package/dist/_types/src/api/types.d.ts.map +0 -1
  382. package/dist/_types/src/api/utils.d.ts.map +0 -1
  383. package/dist/_types/src/block/block.d.ts.map +0 -1
  384. package/dist/_types/src/block/index.d.ts.map +0 -1
  385. package/dist/_types/src/codec/array-codec.d.ts.map +0 -1
  386. package/dist/_types/src/codec/asset-output-codec.d.ts.map +0 -1
  387. package/dist/_types/src/codec/bigint-codec.d.ts.map +0 -1
  388. package/dist/_types/src/codec/bytestring-codec.d.ts.map +0 -1
  389. package/dist/_types/src/codec/codec.d.ts.map +0 -1
  390. package/dist/_types/src/codec/compact-int-codec.d.ts.map +0 -1
  391. package/dist/_types/src/codec/contract-codec.d.ts.map +0 -1
  392. package/dist/_types/src/codec/contract-output-codec.d.ts.map +0 -1
  393. package/dist/_types/src/codec/contract-output-ref-codec.d.ts.map +0 -1
  394. package/dist/_types/src/codec/either-codec.d.ts.map +0 -1
  395. package/dist/_types/src/codec/hash.d.ts.map +0 -1
  396. package/dist/_types/src/codec/index.d.ts.map +0 -1
  397. package/dist/_types/src/codec/input-codec.d.ts.map +0 -1
  398. package/dist/_types/src/codec/instr-codec.d.ts.map +0 -1
  399. package/dist/_types/src/codec/int-as-4bytes-codec.d.ts.map +0 -1
  400. package/dist/_types/src/codec/lockup-script-codec.d.ts.map +0 -1
  401. package/dist/_types/src/codec/method-codec.d.ts.map +0 -1
  402. package/dist/_types/src/codec/option-codec.d.ts.map +0 -1
  403. package/dist/_types/src/codec/output-codec.d.ts.map +0 -1
  404. package/dist/_types/src/codec/reader.d.ts.map +0 -1
  405. package/dist/_types/src/codec/script-codec.d.ts.map +0 -1
  406. package/dist/_types/src/codec/signature-codec.d.ts.map +0 -1
  407. package/dist/_types/src/codec/timestamp-codec.d.ts.map +0 -1
  408. package/dist/_types/src/codec/token-codec.d.ts.map +0 -1
  409. package/dist/_types/src/codec/transaction-codec.d.ts.map +0 -1
  410. package/dist/_types/src/codec/unlock-script-codec.d.ts.map +0 -1
  411. package/dist/_types/src/codec/unsigned-tx-codec.d.ts.map +0 -1
  412. package/dist/_types/src/codec/val.d.ts.map +0 -1
  413. package/dist/_types/src/constants.d.ts.map +0 -1
  414. package/dist/_types/src/contract/contract.d.ts.map +0 -1
  415. package/dist/_types/src/contract/events.d.ts.map +0 -1
  416. package/dist/_types/src/contract/index.d.ts.map +0 -1
  417. package/dist/_types/src/contract/ralph.d.ts.map +0 -1
  418. package/dist/_types/src/contract/script-simulator.d.ts.map +0 -1
  419. package/dist/_types/src/debug.d.ts.map +0 -1
  420. package/dist/_types/src/error.d.ts.map +0 -1
  421. package/dist/_types/src/exchange/exchange.d.ts.map +0 -1
  422. package/dist/_types/src/exchange/index.d.ts.map +0 -1
  423. package/dist/_types/src/global.d.ts.map +0 -1
  424. package/dist/_types/src/index.d.ts.map +0 -1
  425. package/dist/_types/src/signer/index.d.ts.map +0 -1
  426. package/dist/_types/src/signer/signer.d.ts.map +0 -1
  427. package/dist/_types/src/signer/tx-builder.d.ts.map +0 -1
  428. package/dist/_types/src/signer/types.d.ts.map +0 -1
  429. package/dist/_types/src/token/index.d.ts +0 -2
  430. package/dist/_types/src/token/index.d.ts.map +0 -1
  431. package/dist/_types/src/token/nft.d.ts.map +0 -1
  432. package/dist/_types/src/transaction/index.d.ts.map +0 -1
  433. package/dist/_types/src/transaction/sign-verify.d.ts.map +0 -1
  434. package/dist/_types/src/transaction/status.d.ts.map +0 -1
  435. package/dist/_types/src/transaction/utils.d.ts.map +0 -1
  436. package/dist/_types/src/utils/bs58.d.ts.map +0 -1
  437. package/dist/_types/src/utils/djb2.d.ts.map +0 -1
  438. package/dist/_types/src/utils/index.d.ts.map +0 -1
  439. package/dist/_types/src/utils/number.d.ts.map +0 -1
  440. package/dist/_types/src/utils/number.fixture.d.ts.map +0 -1
  441. package/dist/_types/src/utils/sign.d.ts.map +0 -1
  442. package/dist/_types/src/utils/subscription.d.ts.map +0 -1
  443. package/dist/_types/src/utils/utils.d.ts.map +0 -1
  444. package/dist/_types/src/utils/webcrypto.d.ts.map +0 -1
  445. package/dist/_umd/alephium-web3.min.js +0 -2
  446. package/dist/_umd/alephium-web3.min.js.map +0 -1
@@ -34,4 +34,3 @@ class TraceableError extends Error {
34
34
  }
35
35
  }
36
36
  exports.TraceableError = TraceableError;
37
- //# sourceMappingURL=error.js.map
@@ -8,4 +8,3 @@ export declare function getALPHDepositInfo(tx: Transaction): {
8
8
  }[];
9
9
  export declare function getSenderAddress(tx: Transaction): Address;
10
10
  export declare function getAddressFromUnlockScript(unlockScript: string): Address;
11
- //# sourceMappingURL=exchange.d.ts.map
@@ -124,4 +124,3 @@ function isTransferTx(tx) {
124
124
  }
125
125
  return true;
126
126
  }
127
- //# sourceMappingURL=exchange.js.map
@@ -1,2 +1 @@
1
1
  export { validateExchangeAddress, isALPHTransferTx, getSenderAddress, getALPHDepositInfo } from './exchange';
2
- //# sourceMappingURL=index.d.ts.map
@@ -23,4 +23,3 @@ Object.defineProperty(exports, "validateExchangeAddress", { enumerable: true, ge
23
23
  Object.defineProperty(exports, "isALPHTransferTx", { enumerable: true, get: function () { return exchange_1.isALPHTransferTx; } });
24
24
  Object.defineProperty(exports, "getSenderAddress", { enumerable: true, get: function () { return exchange_1.getSenderAddress; } });
25
25
  Object.defineProperty(exports, "getALPHDepositInfo", { enumerable: true, get: function () { return exchange_1.getALPHDepositInfo; } });
26
- //# sourceMappingURL=index.js.map
@@ -5,4 +5,3 @@ export declare function getCurrentNodeProvider(): NodeProvider;
5
5
  export declare function setCurrentExplorerProvider(provider: ExplorerProvider): void;
6
6
  export declare function setCurrentExplorerProvider(baseUrl: string, apiKey?: string, customFetch?: typeof fetch): void;
7
7
  export declare function getCurrentExplorerProvider(): ExplorerProvider | undefined;
8
- //# sourceMappingURL=global.d.ts.map
@@ -52,4 +52,3 @@ function getCurrentExplorerProvider() {
52
52
  return _currentExplorerProvider;
53
53
  }
54
54
  exports.getCurrentExplorerProvider = getCurrentExplorerProvider;
55
- //# sourceMappingURL=global.js.map
@@ -13,4 +13,3 @@ export * from './block';
13
13
  export * from './address';
14
14
  export * from './exchange';
15
15
  export * from './error';
16
- //# sourceMappingURL=index.d.ts.map
@@ -62,4 +62,3 @@ __exportStar(require("./block"), exports);
62
62
  __exportStar(require("./address"), exports);
63
63
  __exportStar(require("./exchange"), exports);
64
64
  __exportStar(require("./error"), exports);
65
- //# sourceMappingURL=index.js.map
@@ -1,4 +1,3 @@
1
1
  export * from './signer';
2
2
  export * from './types';
3
3
  export * from './tx-builder';
4
- //# sourceMappingURL=index.d.ts.map
@@ -34,4 +34,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
34
34
  __exportStar(require("./signer"), exports);
35
35
  __exportStar(require("./types"), exports);
36
36
  __exportStar(require("./tx-builder"), exports);
37
- //# sourceMappingURL=index.js.map
@@ -61,4 +61,3 @@ export declare function verifySignedMessage(message: string, messageHasher: Mess
61
61
  export declare function toApiDestination(data: Destination): node.Destination;
62
62
  export declare function toApiDestinations(data: Destination[]): node.Destination[];
63
63
  export declare function fromApiDestination(data: node.Destination): Destination;
64
- //# sourceMappingURL=signer.d.ts.map
@@ -141,7 +141,7 @@ class SignerProviderSimple extends SignerProvider {
141
141
  // in general, wallet should show the decoded information to user for confirmation
142
142
  // please overwrite this function for real wallet
143
143
  async signUnsignedTx(params) {
144
- const response = await tx_builder_1.TransactionBuilder.from(this.nodeProvider).buildUnsignedTx(params);
144
+ const response = tx_builder_1.TransactionBuilder.buildUnsignedTx(params);
145
145
  const signature = await this.signRaw(params.signerAddress, response.txId);
146
146
  return { signature, ...response };
147
147
  }
@@ -243,4 +243,3 @@ function fromApiDestination(data) {
243
243
  return { ...data, attoAlphAmount: (0, api_1.fromApiNumber256)(data.attoAlphAmount), tokens: (0, api_1.fromApiTokens)(data.tokens) };
244
244
  }
245
245
  exports.fromApiDestination = fromApiDestination;
246
- //# sourceMappingURL=signer.js.map
@@ -9,7 +9,7 @@ export declare abstract class TransactionBuilder {
9
9
  buildDeployContractTx(params: SignDeployContractTxParams, publicKey: string): Promise<Omit<SignDeployContractTxResult, 'signature'>>;
10
10
  buildExecuteScriptTx(params: SignExecuteScriptTxParams, publicKey: string): Promise<Omit<SignExecuteScriptTxResult, 'signature'>>;
11
11
  buildChainedTx(params: SignChainedTxParams[], publicKeys: string[]): Promise<Omit<SignChainedTxResult, 'signature'>[]>;
12
- buildUnsignedTx(params: SignUnsignedTxParams): Omit<SignUnsignedTxResult, 'signature'>;
12
+ static buildUnsignedTx(params: SignUnsignedTxParams): Omit<SignUnsignedTxResult, 'signature'>;
13
13
  private buildTransferTxParams;
14
14
  private buildDeployContractTxParams;
15
15
  private buildExecuteScriptTxParams;
@@ -17,4 +17,3 @@ export declare abstract class TransactionBuilder {
17
17
  private convertDeployContractTxResult;
18
18
  private convertExecuteScriptTxResult;
19
19
  }
20
- //# sourceMappingURL=tx-builder.d.ts.map
@@ -109,7 +109,7 @@ class TransactionBuilder {
109
109
  });
110
110
  return results;
111
111
  }
112
- buildUnsignedTx(params) {
112
+ static buildUnsignedTx(params) {
113
113
  const unsignedTxBin = (0, utils_1.hexToBinUnsafe)(params.unsignedTx);
114
114
  const decoded = codec_1.unsignedTxCodec.decode(unsignedTxBin);
115
115
  const txId = (0, utils_1.binToHex)((0, hash_1.blakeHash)(unsignedTxBin));
@@ -183,4 +183,3 @@ class TransactionBuilder {
183
183
  }
184
184
  }
185
185
  exports.TransactionBuilder = TransactionBuilder;
186
- //# sourceMappingURL=tx-builder.js.map
@@ -136,4 +136,3 @@ export interface EnableOptionsBase {
136
136
  networkId?: NetworkId;
137
137
  onDisconnected: () => Promise<void> | void;
138
138
  }
139
- //# sourceMappingURL=types.d.ts.map
@@ -28,4 +28,3 @@ utils_1.assertType;
28
28
  (0, utils_1.assertType)();
29
29
  utils_1.assertType;
30
30
  (0, utils_1.assertType)();
31
- //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ export * from './nft';
@@ -32,4 +32,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
32
32
  };
33
33
  Object.defineProperty(exports, "__esModule", { value: true });
34
34
  __exportStar(require("./nft"), exports);
35
- //# sourceMappingURL=index.js.map
@@ -7,4 +7,3 @@ export declare const validNFTCollectionUriMetaDataFields: string[];
7
7
  export declare function validateNFTTokenUriMetaData(metadata: any): NFTTokenUriMetaData;
8
8
  export declare function validateNFTCollectionUriMetaData(metadata: any): NFTCollectionUriMetaData;
9
9
  export declare function validateNFTBaseUri(nftBaseUri: string, maxSupply: number): Promise<NFTTokenUriMetaData[]>;
10
- //# sourceMappingURL=nft.d.ts.map
@@ -118,4 +118,3 @@ async function fetchNFTMetadata(nftBaseUri, index) {
118
118
  function isInteger(num) {
119
119
  return num === parseInt(num.toString(), 10);
120
120
  }
121
- //# sourceMappingURL=nft.js.map
@@ -1,4 +1,3 @@
1
1
  export * from './status';
2
2
  export * from './sign-verify';
3
3
  export * from './utils';
4
- //# sourceMappingURL=index.d.ts.map
@@ -34,4 +34,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
34
34
  __exportStar(require("./status"), exports);
35
35
  __exportStar(require("./sign-verify"), exports);
36
36
  __exportStar(require("./utils"), exports);
37
- //# sourceMappingURL=index.js.map
@@ -1,4 +1,3 @@
1
1
  import { KeyType } from '../signer';
2
2
  export declare function transactionSign(txId: string, privateKey: string, keyType?: KeyType): string;
3
3
  export declare function transactionVerifySignature(txId: string, publicKey: string, signature: string, keyType?: KeyType): boolean;
4
- //# sourceMappingURL=sign-verify.d.ts.map
@@ -50,4 +50,3 @@ function transactionVerifySignature(txId, publicKey, signature, keyType) {
50
50
  return utils.verifySignature(txId, publicKey, signature, keyType);
51
51
  }
52
52
  exports.transactionVerifySignature = transactionVerifySignature;
53
- //# sourceMappingURL=sign-verify.js.map
@@ -10,4 +10,3 @@ export declare class TxStatusSubscription extends Subscription<TxStatus> {
10
10
  polling(): Promise<void>;
11
11
  }
12
12
  export declare function subscribeToTxStatus(options: SubscribeOptions<TxStatus>, txId: string, fromGroup?: number, toGroup?: number, confirmations?: number): TxStatusSubscription;
13
- //# sourceMappingURL=status.d.ts.map
@@ -75,4 +75,3 @@ function subscribeToTxStatus(options, txId, fromGroup, toGroup, confirmations) {
75
75
  return subscription;
76
76
  }
77
77
  exports.subscribeToTxStatus = subscribeToTxStatus;
78
- //# sourceMappingURL=status.js.map
@@ -2,4 +2,3 @@ import { node } from '../api';
2
2
  import { UnsignedTx } from '../codec';
3
3
  export declare function waitForTxConfirmation(txId: string, confirmations: number, requestInterval: number): Promise<node.Confirmed>;
4
4
  export declare function groupIndexOfTransaction(unsignedTx: UnsignedTx): [number, number];
5
- //# sourceMappingURL=utils.d.ts.map
@@ -54,4 +54,3 @@ function groupFromHint(hint) {
54
54
  const hash = (0, utils_1.xorByte)(hint);
55
55
  return hash % constants_1.TOTAL_NUMBER_OF_GROUPS;
56
56
  }
57
- //# sourceMappingURL=utils.js.map
@@ -4,4 +4,3 @@ export declare const bs58: basex.BaseConverter;
4
4
  export declare function isBase58(s: string): boolean;
5
5
  export declare function base58ToBytes(s: string): Uint8Array;
6
6
  export default bs58;
7
- //# sourceMappingURL=bs58.d.ts.map
@@ -48,4 +48,3 @@ function base58ToBytes(s) {
48
48
  }
49
49
  exports.base58ToBytes = base58ToBytes;
50
50
  exports.default = exports.bs58;
51
- //# sourceMappingURL=bs58.js.map
@@ -1,2 +1 @@
1
1
  export default function djb2(bytes: Uint8Array): number;
2
- //# sourceMappingURL=djb2.d.ts.map
@@ -25,4 +25,3 @@ function djb2(bytes) {
25
25
  return hash;
26
26
  }
27
27
  exports.default = djb2;
28
- //# sourceMappingURL=djb2.js.map
@@ -5,4 +5,3 @@ export * from './utils';
5
5
  export * from './subscription';
6
6
  export * from './sign';
7
7
  export * from './number';
8
- //# sourceMappingURL=index.d.ts.map
@@ -38,4 +38,3 @@ __exportStar(require("./utils"), exports);
38
38
  __exportStar(require("./subscription"), exports);
39
39
  __exportStar(require("./sign"), exports);
40
40
  __exportStar(require("./number"), exports);
41
- //# sourceMappingURL=index.js.map
@@ -17,4 +17,3 @@ export declare function convertAmountWithDecimals(amount: string | number, decim
17
17
  export declare function convertAlphAmountWithDecimals(amount: string | number): bigint | undefined;
18
18
  export declare function number256ToBigint(number: Number256): bigint;
19
19
  export declare function number256ToNumber(number: Number256, decimals: number): number;
20
- //# sourceMappingURL=number.d.ts.map
@@ -10,4 +10,3 @@ export declare const tests1: {
10
10
  decimals: number;
11
11
  amount: bigint;
12
12
  }[];
13
- //# sourceMappingURL=number.fixture.d.ts.map
@@ -187,4 +187,3 @@ exports.tests1 = [
187
187
  amount: 1234567890000000000n
188
188
  }
189
189
  ];
190
- //# sourceMappingURL=number.fixture.js.map
@@ -151,4 +151,3 @@ function number256ToNumber(number, decimals) {
151
151
  return parseFloat(toFixedNumber(number256ToBigint(number), decimals));
152
152
  }
153
153
  exports.number256ToNumber = number256ToNumber;
154
- //# sourceMappingURL=number.js.map
@@ -1,4 +1,3 @@
1
1
  import { KeyType } from '../signer';
2
2
  export declare function sign(hash: string, privateKey: string, _keyType?: KeyType): string;
3
3
  export declare function verifySignature(hash: string, publicKey: string, signature: string, _keyType?: KeyType): boolean;
4
- //# sourceMappingURL=sign.d.ts.map
@@ -87,4 +87,3 @@ function verifySignature(hash, publicKey, signature, _keyType) {
87
87
  }
88
88
  }
89
89
  exports.verifySignature = verifySignature;
90
- //# sourceMappingURL=sign.js.map
@@ -20,4 +20,3 @@ export declare abstract class Subscription<Message> {
20
20
  protected abstract polling(): Promise<void>;
21
21
  }
22
22
  export {};
23
- //# sourceMappingURL=subscription.d.ts.map
@@ -52,4 +52,3 @@ class Subscription {
52
52
  }
53
53
  }
54
54
  exports.Subscription = Subscription;
55
- //# sourceMappingURL=subscription.js.map
@@ -37,4 +37,3 @@ export type Narrow<type> = (unknown extends type ? unknown : never) | (type exte
37
37
  [K in keyof type]: Narrow<type[K]>;
38
38
  };
39
39
  export {};
40
- //# sourceMappingURL=utils.d.ts.map
@@ -164,4 +164,3 @@ exports.xorByte = xorByte;
164
164
  // eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
165
165
  function assertType() { }
166
166
  exports.assertType = assertType;
167
- //# sourceMappingURL=utils.js.map
@@ -2,4 +2,3 @@ export declare class WebCrypto {
2
2
  subtle: SubtleCrypto;
3
3
  getRandomValues<T extends ArrayBufferView | null>(array: T): T;
4
4
  }
5
- //# sourceMappingURL=webcrypto.d.ts.map
@@ -39,4 +39,3 @@ class WebCrypto {
39
39
  }
40
40
  }
41
41
  exports.WebCrypto = WebCrypto;
42
- //# sourceMappingURL=webcrypto.js.map
package/package.json CHANGED
@@ -1,12 +1,28 @@
1
1
  {
2
2
  "name": "@alephium/web3",
3
- "version": "1.8.3-rc.0",
3
+ "version": "1.8.3",
4
4
  "description": "A JS/TS library to interact with the Alephium platform",
5
- "keywords": [
6
- "alephium",
7
- "web3"
8
- ],
9
5
  "license": "GPL",
6
+ "main": "dist/src/index.js",
7
+ "browser": "dist/alephium-web3.min.js",
8
+ "types": "dist/src/index.d.ts",
9
+ "exports": {
10
+ "node": {
11
+ "types": "./dist/src/index.d.ts",
12
+ "default": "./dist/src/index.js"
13
+ },
14
+ "default": {
15
+ "types": "./dist/src/index.d.ts",
16
+ "default": "./dist/alephium-web3.min.js"
17
+ }
18
+ },
19
+ "typesVersions": {
20
+ "*": {
21
+ "test": [
22
+ "dist/src/test/"
23
+ ]
24
+ }
25
+ },
10
26
  "repository": {
11
27
  "type": "git",
12
28
  "url": "git@github.com:alephium/alephium-web3.git"
@@ -16,22 +32,11 @@
16
32
  "url": "https://github.com/alephium/alephium-web3/issues"
17
33
  },
18
34
  "author": "Alephium dev <dev@alephium.org>",
19
- "main": "dist/_cjs/src/index.js",
20
- "module": "dist/_esm/src/index.js",
21
- "browser": "dist/_umd/alephium-web3.min.js",
22
- "types": "dist/_types/src/index.d.ts",
23
- "exports": {
24
- ".": {
25
- "types": "./dist/_types/src/index.d.ts",
26
- "require": "./dist/_cjs/src/index.js",
27
- "import": "./dist/_esm/src/index.js"
28
- }
29
- },
30
- "type": "module",
31
35
  "config": {
32
36
  "alephium_version": "3.8.1",
33
37
  "explorer_backend_version": "2.2.3"
34
38
  },
39
+ "type": "commonjs",
35
40
  "dependencies": {
36
41
  "@noble/secp256k1": "1.7.1",
37
42
  "base-x": "4.0.0",
@@ -86,10 +91,7 @@
86
91
  "npm": ">=7.0.0"
87
92
  },
88
93
  "scripts": {
89
- "build": "rm -rf dist/* && npm run build:cjs && npm run build:esm && npm run build:dts && webpack",
90
- "build:esm": "tsc --module esnext --outDir dist/_esm --declaration false --declarationMap false --sourceMap true",
91
- "build:cjs": "tsc --module commonjs --outDir dist/_cjs --declaration false --declarationMap false --sourceMap true",
92
- "build:dts": "tsc --module esnext --outDir dist/_types --declaration true --declarationMap true --sourceMap false --emitDeclarationOnly",
94
+ "build": "rm -rf dist/* && npx tsc --build . && webpack",
93
95
  "test": "jest -i --config ./jest-config.json",
94
96
  "update-schemas": "npm run update-schema:alephium && npm run update-schema:explorer",
95
97
  "update-schema:alephium": "npx swagger-typescript-api --disable-throw-on-error -t ./configs -o ./src/api -n api-alephium.ts -p https://raw.githubusercontent.com/alephium/alephium/v${npm_package_config_alephium_version}/api/src/main/resources/openapi.json",
@@ -186,7 +186,7 @@ export abstract class SignerProviderSimple extends SignerProvider {
186
186
  // in general, wallet should show the decoded information to user for confirmation
187
187
  // please overwrite this function for real wallet
188
188
  async signUnsignedTx(params: SignUnsignedTxParams): Promise<SignUnsignedTxResult> {
189
- const response = await TransactionBuilder.from(this.nodeProvider).buildUnsignedTx(params)
189
+ const response = TransactionBuilder.buildUnsignedTx(params)
190
190
  const signature = await this.signRaw(params.signerAddress, response.txId)
191
191
  return { signature, ...response }
192
192
  }
@@ -154,7 +154,7 @@ export abstract class TransactionBuilder {
154
154
  return results
155
155
  }
156
156
 
157
- buildUnsignedTx(params: SignUnsignedTxParams): Omit<SignUnsignedTxResult, 'signature'> {
157
+ static buildUnsignedTx(params: SignUnsignedTxParams): Omit<SignUnsignedTxResult, 'signature'> {
158
158
  const unsignedTxBin = hexToBinUnsafe(params.unsignedTx)
159
159
  const decoded = unsignedTxCodec.decode(unsignedTxBin)
160
160
  const txId = binToHex(blakeHash(unsignedTxBin))
@@ -21,7 +21,7 @@ const webpack = require('webpack')
21
21
  module.exports = {
22
22
  mode: 'production',
23
23
  entry: {
24
- alephium: './dist/_cjs/src/index.js'
24
+ alephium: './dist/src/index.js'
25
25
  },
26
26
  plugins: [
27
27
  new webpack.SourceMapDevToolPlugin({ filename: '[file].map' }),
@@ -41,7 +41,7 @@ module.exports = {
41
41
  }
42
42
  },
43
43
  output: {
44
- filename: '_umd/alephium-web3.min.js',
44
+ filename: 'alephium-web3.min.js',
45
45
  library: {
46
46
  name: 'alephium',
47
47
  type: 'umd'
package/LICENSE DELETED
@@ -1,165 +0,0 @@
1
- GNU LESSER GENERAL PUBLIC LICENSE
2
- Version 3, 29 June 2007
3
-
4
- Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
- Everyone is permitted to copy and distribute verbatim copies
6
- of this license document, but changing it is not allowed.
7
-
8
-
9
- This version of the GNU Lesser General Public License incorporates
10
- the terms and conditions of version 3 of the GNU General Public
11
- License, supplemented by the additional permissions listed below.
12
-
13
- 0. Additional Definitions.
14
-
15
- As used herein, "this License" refers to version 3 of the GNU Lesser
16
- General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
- General Public License.
18
-
19
- "The Library" refers to a covered work governed by this License,
20
- other than an Application or a Combined Work as defined below.
21
-
22
- An "Application" is any work that makes use of an interface provided
23
- by the Library, but which is not otherwise based on the Library.
24
- Defining a subclass of a class defined by the Library is deemed a mode
25
- of using an interface provided by the Library.
26
-
27
- A "Combined Work" is a work produced by combining or linking an
28
- Application with the Library. The particular version of the Library
29
- with which the Combined Work was made is also called the "Linked
30
- Version".
31
-
32
- The "Minimal Corresponding Source" for a Combined Work means the
33
- Corresponding Source for the Combined Work, excluding any source code
34
- for portions of the Combined Work that, considered in isolation, are
35
- based on the Application, and not on the Linked Version.
36
-
37
- The "Corresponding Application Code" for a Combined Work means the
38
- object code and/or source code for the Application, including any data
39
- and utility programs needed for reproducing the Combined Work from the
40
- Application, but excluding the System Libraries of the Combined Work.
41
-
42
- 1. Exception to Section 3 of the GNU GPL.
43
-
44
- You may convey a covered work under sections 3 and 4 of this License
45
- without being bound by section 3 of the GNU GPL.
46
-
47
- 2. Conveying Modified Versions.
48
-
49
- If you modify a copy of the Library, and, in your modifications, a
50
- facility refers to a function or data to be supplied by an Application
51
- that uses the facility (other than as an argument passed when the
52
- facility is invoked), then you may convey a copy of the modified
53
- version:
54
-
55
- a) under this License, provided that you make a good faith effort to
56
- ensure that, in the event an Application does not supply the
57
- function or data, the facility still operates, and performs
58
- whatever part of its purpose remains meaningful, or
59
-
60
- b) under the GNU GPL, with none of the additional permissions of
61
- this License applicable to that copy.
62
-
63
- 3. Object Code Incorporating Material from Library Header Files.
64
-
65
- The object code form of an Application may incorporate material from
66
- a header file that is part of the Library. You may convey such object
67
- code under terms of your choice, provided that, if the incorporated
68
- material is not limited to numerical parameters, data structure
69
- layouts and accessors, or small macros, inline functions and templates
70
- (ten or fewer lines in length), you do both of the following:
71
-
72
- a) Give prominent notice with each copy of the object code that the
73
- Library is used in it and that the Library and its use are
74
- covered by this License.
75
-
76
- b) Accompany the object code with a copy of the GNU GPL and this license
77
- document.
78
-
79
- 4. Combined Works.
80
-
81
- You may convey a Combined Work under terms of your choice that,
82
- taken together, effectively do not restrict modification of the
83
- portions of the Library contained in the Combined Work and reverse
84
- engineering for debugging such modifications, if you also do each of
85
- the following:
86
-
87
- a) Give prominent notice with each copy of the Combined Work that
88
- the Library is used in it and that the Library and its use are
89
- covered by this License.
90
-
91
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
- document.
93
-
94
- c) For a Combined Work that displays copyright notices during
95
- execution, include the copyright notice for the Library among
96
- these notices, as well as a reference directing the user to the
97
- copies of the GNU GPL and this license document.
98
-
99
- d) Do one of the following:
100
-
101
- 0) Convey the Minimal Corresponding Source under the terms of this
102
- License, and the Corresponding Application Code in a form
103
- suitable for, and under terms that permit, the user to
104
- recombine or relink the Application with a modified version of
105
- the Linked Version to produce a modified Combined Work, in the
106
- manner specified by section 6 of the GNU GPL for conveying
107
- Corresponding Source.
108
-
109
- 1) Use a suitable shared library mechanism for linking with the
110
- Library. A suitable mechanism is one that (a) uses at run time
111
- a copy of the Library already present on the user's computer
112
- system, and (b) will operate properly with a modified version
113
- of the Library that is interface-compatible with the Linked
114
- Version.
115
-
116
- e) Provide Installation Information, but only if you would otherwise
117
- be required to provide such information under section 6 of the
118
- GNU GPL, and only to the extent that such information is
119
- necessary to install and execute a modified version of the
120
- Combined Work produced by recombining or relinking the
121
- Application with a modified version of the Linked Version. (If
122
- you use option 4d0, the Installation Information must accompany
123
- the Minimal Corresponding Source and Corresponding Application
124
- Code. If you use option 4d1, you must provide the Installation
125
- Information in the manner specified by section 6 of the GNU GPL
126
- for conveying Corresponding Source.)
127
-
128
- 5. Combined Libraries.
129
-
130
- You may place library facilities that are a work based on the
131
- Library side by side in a single library together with other library
132
- facilities that are not Applications and are not covered by this
133
- License, and convey such a combined library under terms of your
134
- choice, if you do both of the following:
135
-
136
- a) Accompany the combined library with a copy of the same work based
137
- on the Library, uncombined with any other library facilities,
138
- conveyed under the terms of this License.
139
-
140
- b) Give prominent notice with the combined library that part of it
141
- is a work based on the Library, and explaining where to find the
142
- accompanying uncombined form of the same work.
143
-
144
- 6. Revised Versions of the GNU Lesser General Public License.
145
-
146
- The Free Software Foundation may publish revised and/or new versions
147
- of the GNU Lesser General Public License from time to time. Such new
148
- versions will be similar in spirit to the present version, but may
149
- differ in detail to address new problems or concerns.
150
-
151
- Each version is given a distinguishing version number. If the
152
- Library as you received it specifies that a certain numbered version
153
- of the GNU Lesser General Public License "or any later version"
154
- applies to it, you have the option of following the terms and
155
- conditions either of that published version or of any later version
156
- published by the Free Software Foundation. If the Library as you
157
- received it does not specify a version number of the GNU Lesser
158
- General Public License, you may choose any version of the GNU Lesser
159
- General Public License ever published by the Free Software Foundation.
160
-
161
- If the Library as you received it specifies that a proxy can decide
162
- whether future versions of the GNU Lesser General Public License shall
163
- apply, that proxy's public statement of acceptance of any version is
164
- permanent authorization for you to choose that version for the
165
- Library.
@@ -1 +0,0 @@
1
- {"version":3,"file":"check-versions.js","sourceRoot":"","sources":["../../../scripts/check-versions.js"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;EAgBE;AAEF,MAAM,KAAK,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;AACpC,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;AAElC,KAAK,UAAU,8BAA8B,CAAC,eAAe;IAC3D,MAAM,GAAG,GAAG,gEAAgE,eAAe,6BAA6B,CAAA;IACxH,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;IAChD,MAAM,KAAK,GAAG,sBAAsB,CAAA;IACpC,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;IACvC,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;AAC9B,CAAC;AAED,KAAK,UAAU,IAAI;IACjB,MAAM,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAC7C,MAAM,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjD,MAAM,mBAAmB,GAAG,MAAM,8BAA8B,CAAC,yBAAyB,CAAC,CAAA;IAE3F,IAAI,mBAAmB,IAAI,qBAAqB,EAAE;QAChD,OAAO,CAAC,GAAG,CACT,kEAAkE,yBAAyB,kBAAkB,mBAAmB,GAAG,CACpI,CAAA;QACD,OAAO,CAAC,GAAG,CAAC,2CAA2C,qBAAqB,EAAE,CAAC,CAAA;QAC/E,OAAO,CAAC,GAAG,CAAC,uGAAuG,CAAC,CAAA;QACpH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;KAChB;AACH,CAAC;AAED,IAAI,EAAE,CAAA"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- /*
3
- Copyright 2018 - 2022 The Alephium Authors
4
- This file is part of the alephium project.
5
-
6
- The library is free software: you can redistribute it and/or modify
7
- it under the terms of the GNU Lesser General Public License as published by
8
- the Free Software Foundation, either version 3 of the License, or
9
- (at your option) any later version.
10
-
11
- The library is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU Lesser General Public License for more details.
15
-
16
- You should have received a copy of the GNU Lesser General Public License
17
- along with the library. If not, see <http://www.gnu.org/licenses/>.
18
- */
19
- //# sourceMappingURL=header.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"header.js","sourceRoot":"","sources":["../../../scripts/header.js"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;EAgBE"}