@ckb-ccc/core 0.0.0-canary-20250214032000

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 (623) hide show
  1. package/CHANGELOG.md +375 -0
  2. package/README.md +41 -0
  3. package/dist/address/address.advanced.d.ts +65 -0
  4. package/dist/address/address.advanced.d.ts.map +1 -0
  5. package/dist/address/address.advanced.js +147 -0
  6. package/dist/address/advanced.d.ts +2 -0
  7. package/dist/address/advanced.d.ts.map +1 -0
  8. package/dist/address/advanced.js +1 -0
  9. package/dist/address/index.d.ts +58 -0
  10. package/dist/address/index.d.ts.map +1 -0
  11. package/dist/address/index.js +78 -0
  12. package/dist/advanced.d.ts +3 -0
  13. package/dist/advanced.d.ts.map +1 -0
  14. package/dist/advanced.js +2 -0
  15. package/dist/advancedBarrel.d.ts +7 -0
  16. package/dist/advancedBarrel.d.ts.map +1 -0
  17. package/dist/advancedBarrel.js +6 -0
  18. package/dist/barrel.d.ts +14 -0
  19. package/dist/barrel.d.ts.map +1 -0
  20. package/dist/barrel.js +13 -0
  21. package/dist/bytes/advanced.d.ts +6 -0
  22. package/dist/bytes/advanced.d.ts.map +1 -0
  23. package/dist/bytes/advanced.js +1 -0
  24. package/dist/bytes/index.d.ts +108 -0
  25. package/dist/bytes/index.d.ts.map +1 -0
  26. package/dist/bytes/index.js +151 -0
  27. package/dist/ckb/advanced.d.ts +3 -0
  28. package/dist/ckb/advanced.d.ts.map +1 -0
  29. package/dist/ckb/advanced.js +2 -0
  30. package/dist/ckb/index.d.ts +4 -0
  31. package/dist/ckb/index.d.ts.map +1 -0
  32. package/dist/ckb/index.js +3 -0
  33. package/dist/ckb/script.advanced.d.ts +5 -0
  34. package/dist/ckb/script.advanced.d.ts.map +1 -0
  35. package/dist/ckb/script.advanced.js +13 -0
  36. package/dist/ckb/script.d.ts +143 -0
  37. package/dist/ckb/script.d.ts.map +1 -0
  38. package/dist/ckb/script.js +167 -0
  39. package/dist/ckb/transaction.advanced.d.ts +5 -0
  40. package/dist/ckb/transaction.advanced.d.ts.map +1 -0
  41. package/dist/ckb/transaction.advanced.js +9 -0
  42. package/dist/ckb/transaction.d.ts +893 -0
  43. package/dist/ckb/transaction.d.ts.map +1 -0
  44. package/dist/ckb/transaction.js +1299 -0
  45. package/dist/ckb/transactionLumos.d.ts +30 -0
  46. package/dist/ckb/transactionLumos.d.ts.map +1 -0
  47. package/dist/ckb/transactionLumos.js +1 -0
  48. package/dist/client/advanced.d.ts +6 -0
  49. package/dist/client/advanced.d.ts.map +1 -0
  50. package/dist/client/advanced.js +5 -0
  51. package/dist/client/cache/advanced.d.ts +2 -0
  52. package/dist/client/cache/advanced.d.ts.map +1 -0
  53. package/dist/client/cache/advanced.js +1 -0
  54. package/dist/client/cache/cache.d.ts +91 -0
  55. package/dist/client/cache/cache.d.ts.map +1 -0
  56. package/dist/client/cache/cache.js +128 -0
  57. package/dist/client/cache/index.d.ts +3 -0
  58. package/dist/client/cache/index.d.ts.map +1 -0
  59. package/dist/client/cache/index.js +2 -0
  60. package/dist/client/cache/memory.advanced.d.ts +22 -0
  61. package/dist/client/cache/memory.advanced.d.ts.map +1 -0
  62. package/dist/client/cache/memory.advanced.js +118 -0
  63. package/dist/client/cache/memory.d.ts +44 -0
  64. package/dist/client/cache/memory.d.ts.map +1 -0
  65. package/dist/client/cache/memory.js +137 -0
  66. package/dist/client/client.d.ts +98 -0
  67. package/dist/client/client.d.ts.map +1 -0
  68. package/dist/client/client.js +323 -0
  69. package/dist/client/clientPublicMainnet.advanced.d.ts +3 -0
  70. package/dist/client/clientPublicMainnet.advanced.d.ts.map +1 -0
  71. package/dist/client/clientPublicMainnet.advanced.js +326 -0
  72. package/dist/client/clientPublicMainnet.d.ts +16 -0
  73. package/dist/client/clientPublicMainnet.d.ts.map +1 -0
  74. package/dist/client/clientPublicMainnet.js +40 -0
  75. package/dist/client/clientPublicTestnet.advanced.d.ts +3 -0
  76. package/dist/client/clientPublicTestnet.advanced.d.ts.map +1 -0
  77. package/dist/client/clientPublicTestnet.advanced.js +336 -0
  78. package/dist/client/clientPublicTestnet.d.ts +16 -0
  79. package/dist/client/clientPublicTestnet.d.ts.map +1 -0
  80. package/dist/client/clientPublicTestnet.js +40 -0
  81. package/dist/client/clientTypes.advanced.d.ts +26 -0
  82. package/dist/client/clientTypes.advanced.d.ts.map +1 -0
  83. package/dist/client/clientTypes.advanced.js +7 -0
  84. package/dist/client/clientTypes.d.ts +360 -0
  85. package/dist/client/clientTypes.d.ts.map +1 -0
  86. package/dist/client/clientTypes.js +259 -0
  87. package/dist/client/index.d.ts +7 -0
  88. package/dist/client/index.d.ts.map +1 -0
  89. package/dist/client/index.js +6 -0
  90. package/dist/client/jsonRpc/advanced.d.ts +3 -0
  91. package/dist/client/jsonRpc/advanced.d.ts.map +1 -0
  92. package/dist/client/jsonRpc/advanced.js +2 -0
  93. package/dist/client/jsonRpc/client.d.ts +160 -0
  94. package/dist/client/jsonRpc/client.d.ts.map +1 -0
  95. package/dist/client/jsonRpc/client.js +220 -0
  96. package/dist/client/jsonRpc/index.d.ts +2 -0
  97. package/dist/client/jsonRpc/index.d.ts.map +1 -0
  98. package/dist/client/jsonRpc/index.js +1 -0
  99. package/dist/client/jsonRpc/transformers.d.ts +51 -0
  100. package/dist/client/jsonRpc/transformers.d.ts.map +1 -0
  101. package/dist/client/jsonRpc/transformers.js +246 -0
  102. package/dist/client/jsonRpc/types.d.ts +101 -0
  103. package/dist/client/jsonRpc/types.d.ts.map +1 -0
  104. package/dist/client/jsonRpc/types.js +1 -0
  105. package/dist/fixedPoint/index.d.ts +55 -0
  106. package/dist/fixedPoint/index.d.ts.map +1 -0
  107. package/dist/fixedPoint/index.js +68 -0
  108. package/dist/hasher/advanced.d.ts +2 -0
  109. package/dist/hasher/advanced.d.ts.map +1 -0
  110. package/dist/hasher/advanced.js +1 -0
  111. package/dist/hasher/hasher.d.ts +35 -0
  112. package/dist/hasher/hasher.d.ts.map +1 -0
  113. package/dist/hasher/hasher.js +1 -0
  114. package/dist/hasher/hasherCkb.d.ts +73 -0
  115. package/dist/hasher/hasherCkb.d.ts.map +1 -0
  116. package/dist/hasher/hasherCkb.js +88 -0
  117. package/dist/hasher/hasherKeecak256.d.ts +41 -0
  118. package/dist/hasher/hasherKeecak256.d.ts.map +1 -0
  119. package/dist/hasher/hasherKeecak256.js +46 -0
  120. package/dist/hasher/index.d.ts +4 -0
  121. package/dist/hasher/index.d.ts.map +1 -0
  122. package/dist/hasher/index.js +3 -0
  123. package/dist/hex/index.d.ts +27 -0
  124. package/dist/hex/index.d.ts.map +1 -0
  125. package/dist/hex/index.js +17 -0
  126. package/dist/index.d.ts +3 -0
  127. package/dist/index.d.ts.map +1 -0
  128. package/dist/index.js +2 -0
  129. package/dist/jsonRpc/advanced.d.ts +2 -0
  130. package/dist/jsonRpc/advanced.d.ts.map +1 -0
  131. package/dist/jsonRpc/advanced.js +1 -0
  132. package/dist/jsonRpc/index.d.ts +2 -0
  133. package/dist/jsonRpc/index.d.ts.map +1 -0
  134. package/dist/jsonRpc/index.js +1 -0
  135. package/dist/jsonRpc/requestor.d.ts +49 -0
  136. package/dist/jsonRpc/requestor.d.ts.map +1 -0
  137. package/dist/jsonRpc/requestor.js +109 -0
  138. package/dist/jsonRpc/transports/advanced.d.ts +6 -0
  139. package/dist/jsonRpc/transports/advanced.d.ts.map +1 -0
  140. package/dist/jsonRpc/transports/advanced.js +5 -0
  141. package/dist/jsonRpc/transports/factory.d.ts +6 -0
  142. package/dist/jsonRpc/transports/factory.d.ts.map +1 -0
  143. package/dist/jsonRpc/transports/factory.js +8 -0
  144. package/dist/jsonRpc/transports/fallback.d.ts +8 -0
  145. package/dist/jsonRpc/transports/fallback.d.ts.map +1 -0
  146. package/dist/jsonRpc/transports/fallback.js +22 -0
  147. package/dist/jsonRpc/transports/http.d.ts +8 -0
  148. package/dist/jsonRpc/transports/http.d.ts.map +1 -0
  149. package/dist/jsonRpc/transports/http.js +22 -0
  150. package/dist/jsonRpc/transports/transport.d.ts +18 -0
  151. package/dist/jsonRpc/transports/transport.d.ts.map +1 -0
  152. package/dist/jsonRpc/transports/transport.js +1 -0
  153. package/dist/jsonRpc/transports/webSocket.d.ts +11 -0
  154. package/dist/jsonRpc/transports/webSocket.d.ts.map +1 -0
  155. package/dist/jsonRpc/transports/webSocket.js +87 -0
  156. package/dist/keystore/index.d.ts +31 -0
  157. package/dist/keystore/index.d.ts.map +1 -0
  158. package/dist/keystore/index.js +106 -0
  159. package/dist/molecule/barrel.d.ts +4 -0
  160. package/dist/molecule/barrel.d.ts.map +1 -0
  161. package/dist/molecule/barrel.js +3 -0
  162. package/dist/molecule/codec.d.ts +120 -0
  163. package/dist/molecule/codec.d.ts.map +1 -0
  164. package/dist/molecule/codec.js +468 -0
  165. package/dist/molecule/entity.d.ts +119 -0
  166. package/dist/molecule/entity.d.ts.map +1 -0
  167. package/dist/molecule/entity.js +134 -0
  168. package/dist/molecule/index.d.ts +2 -0
  169. package/dist/molecule/index.d.ts.map +1 -0
  170. package/dist/molecule/index.js +1 -0
  171. package/dist/molecule/predefined.d.ts +57 -0
  172. package/dist/molecule/predefined.d.ts.map +1 -0
  173. package/dist/molecule/predefined.js +83 -0
  174. package/dist/num/index.d.ts +148 -0
  175. package/dist/num/index.d.ts.map +1 -0
  176. package/dist/num/index.js +188 -0
  177. package/dist/package.json +3 -0
  178. package/dist/signer/btc/index.d.ts +4 -0
  179. package/dist/signer/btc/index.d.ts.map +1 -0
  180. package/dist/signer/btc/index.js +3 -0
  181. package/dist/signer/btc/signerBtc.d.ts +59 -0
  182. package/dist/signer/btc/signerBtc.d.ts.map +1 -0
  183. package/dist/signer/btc/signerBtc.js +83 -0
  184. package/dist/signer/btc/signerBtcPublicKeyReadonly.d.ts +55 -0
  185. package/dist/signer/btc/signerBtcPublicKeyReadonly.d.ts.map +1 -0
  186. package/dist/signer/btc/signerBtcPublicKeyReadonly.js +61 -0
  187. package/dist/signer/btc/verify.d.ts +19 -0
  188. package/dist/signer/btc/verify.d.ts.map +1 -0
  189. package/dist/signer/btc/verify.js +33 -0
  190. package/dist/signer/ckb/index.d.ts +6 -0
  191. package/dist/signer/ckb/index.d.ts.map +1 -0
  192. package/dist/signer/ckb/index.js +5 -0
  193. package/dist/signer/ckb/signerCkbPrivateKey.d.ts +16 -0
  194. package/dist/signer/ckb/signerCkbPrivateKey.d.ts.map +1 -0
  195. package/dist/signer/ckb/signerCkbPrivateKey.js +42 -0
  196. package/dist/signer/ckb/signerCkbPublicKey.d.ts +27 -0
  197. package/dist/signer/ckb/signerCkbPublicKey.d.ts.map +1 -0
  198. package/dist/signer/ckb/signerCkbPublicKey.js +105 -0
  199. package/dist/signer/ckb/signerCkbScriptReadonly.d.ts +56 -0
  200. package/dist/signer/ckb/signerCkbScriptReadonly.d.ts.map +1 -0
  201. package/dist/signer/ckb/signerCkbScriptReadonly.js +66 -0
  202. package/dist/signer/ckb/verifyCkbSecp256k1.d.ts +11 -0
  203. package/dist/signer/ckb/verifyCkbSecp256k1.d.ts.map +1 -0
  204. package/dist/signer/ckb/verifyCkbSecp256k1.js +20 -0
  205. package/dist/signer/ckb/verifyJoyId.d.ts +6 -0
  206. package/dist/signer/ckb/verifyJoyId.d.ts.map +1 -0
  207. package/dist/signer/ckb/verifyJoyId.js +16 -0
  208. package/dist/signer/doge/index.d.ts +5 -0
  209. package/dist/signer/doge/index.d.ts.map +1 -0
  210. package/dist/signer/doge/index.js +4 -0
  211. package/dist/signer/doge/signerDoge.d.ts +52 -0
  212. package/dist/signer/doge/signerDoge.d.ts.map +1 -0
  213. package/dist/signer/doge/signerDoge.js +82 -0
  214. package/dist/signer/doge/signerDogeAddressReadonly.d.ts +41 -0
  215. package/dist/signer/doge/signerDogeAddressReadonly.d.ts.map +1 -0
  216. package/dist/signer/doge/signerDogeAddressReadonly.js +45 -0
  217. package/dist/signer/doge/signerDogePrivateKey.d.ts +52 -0
  218. package/dist/signer/doge/signerDogePrivateKey.d.ts.map +1 -0
  219. package/dist/signer/doge/signerDogePrivateKey.js +68 -0
  220. package/dist/signer/doge/verify.d.ts +6 -0
  221. package/dist/signer/doge/verify.d.ts.map +1 -0
  222. package/dist/signer/doge/verify.js +19 -0
  223. package/dist/signer/dummy/alwaysError.d.ts +12 -0
  224. package/dist/signer/dummy/alwaysError.d.ts.map +1 -0
  225. package/dist/signer/dummy/alwaysError.js +13 -0
  226. package/dist/signer/dummy/dummy.d.ts +15 -0
  227. package/dist/signer/dummy/dummy.d.ts.map +1 -0
  228. package/dist/signer/dummy/dummy.js +22 -0
  229. package/dist/signer/dummy/index.d.ts +4 -0
  230. package/dist/signer/dummy/index.d.ts.map +1 -0
  231. package/dist/signer/dummy/index.js +3 -0
  232. package/dist/signer/dummy/openLink.d.ts +12 -0
  233. package/dist/signer/dummy/openLink.d.ts.map +1 -0
  234. package/dist/signer/dummy/openLink.js +13 -0
  235. package/dist/signer/evm/index.d.ts +4 -0
  236. package/dist/signer/evm/index.d.ts.map +1 -0
  237. package/dist/signer/evm/index.js +3 -0
  238. package/dist/signer/evm/signerEvm.d.ts +59 -0
  239. package/dist/signer/evm/signerEvm.d.ts.map +1 -0
  240. package/dist/signer/evm/signerEvm.js +139 -0
  241. package/dist/signer/evm/signerEvmAddressReadonly.d.ts +47 -0
  242. package/dist/signer/evm/signerEvmAddressReadonly.d.ts.map +1 -0
  243. package/dist/signer/evm/signerEvmAddressReadonly.js +51 -0
  244. package/dist/signer/evm/verify.d.ts +6 -0
  245. package/dist/signer/evm/verify.d.ts.map +1 -0
  246. package/dist/signer/evm/verify.js +9 -0
  247. package/dist/signer/index.d.ts +8 -0
  248. package/dist/signer/index.d.ts.map +1 -0
  249. package/dist/signer/index.js +7 -0
  250. package/dist/signer/nostr/index.d.ts +4 -0
  251. package/dist/signer/nostr/index.d.ts.map +1 -0
  252. package/dist/signer/nostr/index.js +3 -0
  253. package/dist/signer/nostr/signerNostr.d.ts +72 -0
  254. package/dist/signer/nostr/signerNostr.d.ts.map +1 -0
  255. package/dist/signer/nostr/signerNostr.js +88 -0
  256. package/dist/signer/nostr/signerNostrPrivateKey.d.ts +12 -0
  257. package/dist/signer/nostr/signerNostrPrivateKey.d.ts.map +1 -0
  258. package/dist/signer/nostr/signerNostrPrivateKey.js +28 -0
  259. package/dist/signer/nostr/verify.d.ts +9 -0
  260. package/dist/signer/nostr/verify.d.ts.map +1 -0
  261. package/dist/signer/nostr/verify.js +55 -0
  262. package/dist/signer/signer/index.d.ts +237 -0
  263. package/dist/signer/signer/index.d.ts.map +1 -0
  264. package/dist/signer/signer/index.js +274 -0
  265. package/dist/utils/index.d.ts +97 -0
  266. package/dist/utils/index.d.ts.map +1 -0
  267. package/dist/utils/index.js +55 -0
  268. package/dist.commonjs/address/address.advanced.d.ts +65 -0
  269. package/dist.commonjs/address/address.advanced.d.ts.map +1 -0
  270. package/dist.commonjs/address/address.advanced.js +152 -0
  271. package/dist.commonjs/address/advanced.d.ts +2 -0
  272. package/dist.commonjs/address/advanced.d.ts.map +1 -0
  273. package/dist.commonjs/address/advanced.js +17 -0
  274. package/dist.commonjs/address/index.d.ts +58 -0
  275. package/dist.commonjs/address/index.d.ts.map +1 -0
  276. package/dist.commonjs/address/index.js +82 -0
  277. package/dist.commonjs/advanced.d.ts +3 -0
  278. package/dist.commonjs/advanced.d.ts.map +1 -0
  279. package/dist.commonjs/advanced.js +41 -0
  280. package/dist.commonjs/advancedBarrel.d.ts +7 -0
  281. package/dist.commonjs/advancedBarrel.d.ts.map +1 -0
  282. package/dist.commonjs/advancedBarrel.js +22 -0
  283. package/dist.commonjs/barrel.d.ts +14 -0
  284. package/dist.commonjs/barrel.d.ts.map +1 -0
  285. package/dist.commonjs/barrel.js +29 -0
  286. package/dist.commonjs/bytes/advanced.d.ts +6 -0
  287. package/dist.commonjs/bytes/advanced.d.ts.map +1 -0
  288. package/dist.commonjs/bytes/advanced.js +2 -0
  289. package/dist.commonjs/bytes/index.d.ts +108 -0
  290. package/dist.commonjs/bytes/index.d.ts.map +1 -0
  291. package/dist.commonjs/bytes/index.js +158 -0
  292. package/dist.commonjs/ckb/advanced.d.ts +3 -0
  293. package/dist.commonjs/ckb/advanced.d.ts.map +1 -0
  294. package/dist.commonjs/ckb/advanced.js +18 -0
  295. package/dist.commonjs/ckb/index.d.ts +4 -0
  296. package/dist.commonjs/ckb/index.d.ts.map +1 -0
  297. package/dist.commonjs/ckb/index.js +19 -0
  298. package/dist.commonjs/ckb/script.advanced.d.ts +5 -0
  299. package/dist.commonjs/ckb/script.advanced.d.ts.map +1 -0
  300. package/dist.commonjs/ckb/script.advanced.js +16 -0
  301. package/dist.commonjs/ckb/script.d.ts +143 -0
  302. package/dist.commonjs/ckb/script.d.ts.map +1 -0
  303. package/dist.commonjs/ckb/script.js +173 -0
  304. package/dist.commonjs/ckb/transaction.advanced.d.ts +5 -0
  305. package/dist.commonjs/ckb/transaction.advanced.d.ts.map +1 -0
  306. package/dist.commonjs/ckb/transaction.advanced.js +12 -0
  307. package/dist.commonjs/ckb/transaction.d.ts +893 -0
  308. package/dist.commonjs/ckb/transaction.d.ts.map +1 -0
  309. package/dist.commonjs/ckb/transaction.js +1310 -0
  310. package/dist.commonjs/ckb/transactionLumos.d.ts +30 -0
  311. package/dist.commonjs/ckb/transactionLumos.d.ts.map +1 -0
  312. package/dist.commonjs/ckb/transactionLumos.js +2 -0
  313. package/dist.commonjs/client/advanced.d.ts +6 -0
  314. package/dist.commonjs/client/advanced.d.ts.map +1 -0
  315. package/dist.commonjs/client/advanced.js +21 -0
  316. package/dist.commonjs/client/cache/advanced.d.ts +2 -0
  317. package/dist.commonjs/client/cache/advanced.d.ts.map +1 -0
  318. package/dist.commonjs/client/cache/advanced.js +17 -0
  319. package/dist.commonjs/client/cache/cache.d.ts +91 -0
  320. package/dist.commonjs/client/cache/cache.d.ts.map +1 -0
  321. package/dist.commonjs/client/cache/cache.js +132 -0
  322. package/dist.commonjs/client/cache/index.d.ts +3 -0
  323. package/dist.commonjs/client/cache/index.d.ts.map +1 -0
  324. package/dist.commonjs/client/cache/index.js +18 -0
  325. package/dist.commonjs/client/cache/memory.advanced.d.ts +22 -0
  326. package/dist.commonjs/client/cache/memory.advanced.d.ts.map +1 -0
  327. package/dist.commonjs/client/cache/memory.advanced.js +127 -0
  328. package/dist.commonjs/client/cache/memory.d.ts +44 -0
  329. package/dist.commonjs/client/cache/memory.d.ts.map +1 -0
  330. package/dist.commonjs/client/cache/memory.js +141 -0
  331. package/dist.commonjs/client/client.d.ts +98 -0
  332. package/dist.commonjs/client/client.d.ts.map +1 -0
  333. package/dist.commonjs/client/client.js +327 -0
  334. package/dist.commonjs/client/clientPublicMainnet.advanced.d.ts +3 -0
  335. package/dist.commonjs/client/clientPublicMainnet.advanced.d.ts.map +1 -0
  336. package/dist.commonjs/client/clientPublicMainnet.advanced.js +329 -0
  337. package/dist.commonjs/client/clientPublicMainnet.d.ts +16 -0
  338. package/dist.commonjs/client/clientPublicMainnet.d.ts.map +1 -0
  339. package/dist.commonjs/client/clientPublicMainnet.js +47 -0
  340. package/dist.commonjs/client/clientPublicTestnet.advanced.d.ts +3 -0
  341. package/dist.commonjs/client/clientPublicTestnet.advanced.d.ts.map +1 -0
  342. package/dist.commonjs/client/clientPublicTestnet.advanced.js +339 -0
  343. package/dist.commonjs/client/clientPublicTestnet.d.ts +16 -0
  344. package/dist.commonjs/client/clientPublicTestnet.d.ts.map +1 -0
  345. package/dist.commonjs/client/clientPublicTestnet.js +47 -0
  346. package/dist.commonjs/client/clientTypes.advanced.d.ts +26 -0
  347. package/dist.commonjs/client/clientTypes.advanced.d.ts.map +1 -0
  348. package/dist.commonjs/client/clientTypes.advanced.js +11 -0
  349. package/dist.commonjs/client/clientTypes.d.ts +360 -0
  350. package/dist.commonjs/client/clientTypes.d.ts.map +1 -0
  351. package/dist.commonjs/client/clientTypes.js +278 -0
  352. package/dist.commonjs/client/index.d.ts +7 -0
  353. package/dist.commonjs/client/index.d.ts.map +1 -0
  354. package/dist.commonjs/client/index.js +22 -0
  355. package/dist.commonjs/client/jsonRpc/advanced.d.ts +3 -0
  356. package/dist.commonjs/client/jsonRpc/advanced.d.ts.map +1 -0
  357. package/dist.commonjs/client/jsonRpc/advanced.js +18 -0
  358. package/dist.commonjs/client/jsonRpc/client.d.ts +160 -0
  359. package/dist.commonjs/client/jsonRpc/client.d.ts.map +1 -0
  360. package/dist.commonjs/client/jsonRpc/client.js +224 -0
  361. package/dist.commonjs/client/jsonRpc/index.d.ts +2 -0
  362. package/dist.commonjs/client/jsonRpc/index.d.ts.map +1 -0
  363. package/dist.commonjs/client/jsonRpc/index.js +17 -0
  364. package/dist.commonjs/client/jsonRpc/transformers.d.ts +51 -0
  365. package/dist.commonjs/client/jsonRpc/transformers.d.ts.map +1 -0
  366. package/dist.commonjs/client/jsonRpc/transformers.js +250 -0
  367. package/dist.commonjs/client/jsonRpc/types.d.ts +101 -0
  368. package/dist.commonjs/client/jsonRpc/types.d.ts.map +1 -0
  369. package/dist.commonjs/client/jsonRpc/types.js +2 -0
  370. package/dist.commonjs/fixedPoint/index.d.ts +55 -0
  371. package/dist.commonjs/fixedPoint/index.d.ts.map +1 -0
  372. package/dist.commonjs/fixedPoint/index.js +73 -0
  373. package/dist.commonjs/hasher/advanced.d.ts +2 -0
  374. package/dist.commonjs/hasher/advanced.d.ts.map +1 -0
  375. package/dist.commonjs/hasher/advanced.js +4 -0
  376. package/dist.commonjs/hasher/hasher.d.ts +35 -0
  377. package/dist.commonjs/hasher/hasher.d.ts.map +1 -0
  378. package/dist.commonjs/hasher/hasher.js +2 -0
  379. package/dist.commonjs/hasher/hasherCkb.d.ts +73 -0
  380. package/dist.commonjs/hasher/hasherCkb.d.ts.map +1 -0
  381. package/dist.commonjs/hasher/hasherCkb.js +94 -0
  382. package/dist.commonjs/hasher/hasherKeecak256.d.ts +41 -0
  383. package/dist.commonjs/hasher/hasherKeecak256.d.ts.map +1 -0
  384. package/dist.commonjs/hasher/hasherKeecak256.js +50 -0
  385. package/dist.commonjs/hasher/index.d.ts +4 -0
  386. package/dist.commonjs/hasher/index.d.ts.map +1 -0
  387. package/dist.commonjs/hasher/index.js +19 -0
  388. package/dist.commonjs/hex/index.d.ts +27 -0
  389. package/dist.commonjs/hex/index.d.ts.map +1 -0
  390. package/dist.commonjs/hex/index.js +20 -0
  391. package/dist.commonjs/index.d.ts +3 -0
  392. package/dist.commonjs/index.d.ts.map +1 -0
  393. package/dist.commonjs/index.js +41 -0
  394. package/dist.commonjs/jsonRpc/advanced.d.ts +2 -0
  395. package/dist.commonjs/jsonRpc/advanced.d.ts.map +1 -0
  396. package/dist.commonjs/jsonRpc/advanced.js +17 -0
  397. package/dist.commonjs/jsonRpc/index.d.ts +2 -0
  398. package/dist.commonjs/jsonRpc/index.d.ts.map +1 -0
  399. package/dist.commonjs/jsonRpc/index.js +17 -0
  400. package/dist.commonjs/jsonRpc/requestor.d.ts +49 -0
  401. package/dist.commonjs/jsonRpc/requestor.d.ts.map +1 -0
  402. package/dist.commonjs/jsonRpc/requestor.js +113 -0
  403. package/dist.commonjs/jsonRpc/transports/advanced.d.ts +6 -0
  404. package/dist.commonjs/jsonRpc/transports/advanced.d.ts.map +1 -0
  405. package/dist.commonjs/jsonRpc/transports/advanced.js +21 -0
  406. package/dist.commonjs/jsonRpc/transports/factory.d.ts +6 -0
  407. package/dist.commonjs/jsonRpc/transports/factory.d.ts.map +1 -0
  408. package/dist.commonjs/jsonRpc/transports/factory.js +11 -0
  409. package/dist.commonjs/jsonRpc/transports/fallback.d.ts +8 -0
  410. package/dist.commonjs/jsonRpc/transports/fallback.d.ts.map +1 -0
  411. package/dist.commonjs/jsonRpc/transports/fallback.js +26 -0
  412. package/dist.commonjs/jsonRpc/transports/http.d.ts +8 -0
  413. package/dist.commonjs/jsonRpc/transports/http.d.ts.map +1 -0
  414. package/dist.commonjs/jsonRpc/transports/http.js +26 -0
  415. package/dist.commonjs/jsonRpc/transports/transport.d.ts +18 -0
  416. package/dist.commonjs/jsonRpc/transports/transport.d.ts.map +1 -0
  417. package/dist.commonjs/jsonRpc/transports/transport.js +2 -0
  418. package/dist.commonjs/jsonRpc/transports/webSocket.d.ts +11 -0
  419. package/dist.commonjs/jsonRpc/transports/webSocket.d.ts.map +1 -0
  420. package/dist.commonjs/jsonRpc/transports/webSocket.js +94 -0
  421. package/dist.commonjs/keystore/index.d.ts +31 -0
  422. package/dist.commonjs/keystore/index.d.ts.map +1 -0
  423. package/dist.commonjs/keystore/index.js +110 -0
  424. package/dist.commonjs/molecule/barrel.d.ts +4 -0
  425. package/dist.commonjs/molecule/barrel.d.ts.map +1 -0
  426. package/dist.commonjs/molecule/barrel.js +19 -0
  427. package/dist.commonjs/molecule/codec.d.ts +120 -0
  428. package/dist.commonjs/molecule/codec.d.ts.map +1 -0
  429. package/dist.commonjs/molecule/codec.js +483 -0
  430. package/dist.commonjs/molecule/entity.d.ts +119 -0
  431. package/dist.commonjs/molecule/entity.d.ts.map +1 -0
  432. package/dist.commonjs/molecule/entity.js +139 -0
  433. package/dist.commonjs/molecule/index.d.ts +2 -0
  434. package/dist.commonjs/molecule/index.d.ts.map +1 -0
  435. package/dist.commonjs/molecule/index.js +37 -0
  436. package/dist.commonjs/molecule/predefined.d.ts +57 -0
  437. package/dist.commonjs/molecule/predefined.d.ts.map +1 -0
  438. package/dist.commonjs/molecule/predefined.js +87 -0
  439. package/dist.commonjs/num/index.d.ts +148 -0
  440. package/dist.commonjs/num/index.d.ts.map +1 -0
  441. package/dist.commonjs/num/index.js +200 -0
  442. package/dist.commonjs/package.json +3 -0
  443. package/dist.commonjs/signer/btc/index.d.ts +4 -0
  444. package/dist.commonjs/signer/btc/index.d.ts.map +1 -0
  445. package/dist.commonjs/signer/btc/index.js +19 -0
  446. package/dist.commonjs/signer/btc/signerBtc.d.ts +59 -0
  447. package/dist.commonjs/signer/btc/signerBtc.d.ts.map +1 -0
  448. package/dist.commonjs/signer/btc/signerBtc.js +87 -0
  449. package/dist.commonjs/signer/btc/signerBtcPublicKeyReadonly.d.ts +55 -0
  450. package/dist.commonjs/signer/btc/signerBtcPublicKeyReadonly.d.ts.map +1 -0
  451. package/dist.commonjs/signer/btc/signerBtcPublicKeyReadonly.js +65 -0
  452. package/dist.commonjs/signer/btc/verify.d.ts +19 -0
  453. package/dist.commonjs/signer/btc/verify.d.ts.map +1 -0
  454. package/dist.commonjs/signer/btc/verify.js +42 -0
  455. package/dist.commonjs/signer/ckb/index.d.ts +6 -0
  456. package/dist.commonjs/signer/ckb/index.d.ts.map +1 -0
  457. package/dist.commonjs/signer/ckb/index.js +21 -0
  458. package/dist.commonjs/signer/ckb/signerCkbPrivateKey.d.ts +16 -0
  459. package/dist.commonjs/signer/ckb/signerCkbPrivateKey.d.ts.map +1 -0
  460. package/dist.commonjs/signer/ckb/signerCkbPrivateKey.js +46 -0
  461. package/dist.commonjs/signer/ckb/signerCkbPublicKey.d.ts +27 -0
  462. package/dist.commonjs/signer/ckb/signerCkbPublicKey.d.ts.map +1 -0
  463. package/dist.commonjs/signer/ckb/signerCkbPublicKey.js +109 -0
  464. package/dist.commonjs/signer/ckb/signerCkbScriptReadonly.d.ts +56 -0
  465. package/dist.commonjs/signer/ckb/signerCkbScriptReadonly.d.ts.map +1 -0
  466. package/dist.commonjs/signer/ckb/signerCkbScriptReadonly.js +70 -0
  467. package/dist.commonjs/signer/ckb/verifyCkbSecp256k1.d.ts +11 -0
  468. package/dist.commonjs/signer/ckb/verifyCkbSecp256k1.d.ts.map +1 -0
  469. package/dist.commonjs/signer/ckb/verifyCkbSecp256k1.js +24 -0
  470. package/dist.commonjs/signer/ckb/verifyJoyId.d.ts +6 -0
  471. package/dist.commonjs/signer/ckb/verifyJoyId.d.ts.map +1 -0
  472. package/dist.commonjs/signer/ckb/verifyJoyId.js +19 -0
  473. package/dist.commonjs/signer/doge/index.d.ts +5 -0
  474. package/dist.commonjs/signer/doge/index.d.ts.map +1 -0
  475. package/dist.commonjs/signer/doge/index.js +20 -0
  476. package/dist.commonjs/signer/doge/signerDoge.d.ts +52 -0
  477. package/dist.commonjs/signer/doge/signerDoge.d.ts.map +1 -0
  478. package/dist.commonjs/signer/doge/signerDoge.js +89 -0
  479. package/dist.commonjs/signer/doge/signerDogeAddressReadonly.d.ts +41 -0
  480. package/dist.commonjs/signer/doge/signerDogeAddressReadonly.d.ts.map +1 -0
  481. package/dist.commonjs/signer/doge/signerDogeAddressReadonly.js +49 -0
  482. package/dist.commonjs/signer/doge/signerDogePrivateKey.d.ts +52 -0
  483. package/dist.commonjs/signer/doge/signerDogePrivateKey.d.ts.map +1 -0
  484. package/dist.commonjs/signer/doge/signerDogePrivateKey.js +72 -0
  485. package/dist.commonjs/signer/doge/verify.d.ts +6 -0
  486. package/dist.commonjs/signer/doge/verify.d.ts.map +1 -0
  487. package/dist.commonjs/signer/doge/verify.js +22 -0
  488. package/dist.commonjs/signer/dummy/alwaysError.d.ts +12 -0
  489. package/dist.commonjs/signer/dummy/alwaysError.d.ts.map +1 -0
  490. package/dist.commonjs/signer/dummy/alwaysError.js +17 -0
  491. package/dist.commonjs/signer/dummy/dummy.d.ts +15 -0
  492. package/dist.commonjs/signer/dummy/dummy.d.ts.map +1 -0
  493. package/dist.commonjs/signer/dummy/dummy.js +26 -0
  494. package/dist.commonjs/signer/dummy/index.d.ts +4 -0
  495. package/dist.commonjs/signer/dummy/index.d.ts.map +1 -0
  496. package/dist.commonjs/signer/dummy/index.js +19 -0
  497. package/dist.commonjs/signer/dummy/openLink.d.ts +12 -0
  498. package/dist.commonjs/signer/dummy/openLink.d.ts.map +1 -0
  499. package/dist.commonjs/signer/dummy/openLink.js +17 -0
  500. package/dist.commonjs/signer/evm/index.d.ts +4 -0
  501. package/dist.commonjs/signer/evm/index.d.ts.map +1 -0
  502. package/dist.commonjs/signer/evm/index.js +19 -0
  503. package/dist.commonjs/signer/evm/signerEvm.d.ts +59 -0
  504. package/dist.commonjs/signer/evm/signerEvm.d.ts.map +1 -0
  505. package/dist.commonjs/signer/evm/signerEvm.js +143 -0
  506. package/dist.commonjs/signer/evm/signerEvmAddressReadonly.d.ts +47 -0
  507. package/dist.commonjs/signer/evm/signerEvmAddressReadonly.d.ts.map +1 -0
  508. package/dist.commonjs/signer/evm/signerEvmAddressReadonly.js +55 -0
  509. package/dist.commonjs/signer/evm/verify.d.ts +6 -0
  510. package/dist.commonjs/signer/evm/verify.d.ts.map +1 -0
  511. package/dist.commonjs/signer/evm/verify.js +12 -0
  512. package/dist.commonjs/signer/index.d.ts +8 -0
  513. package/dist.commonjs/signer/index.d.ts.map +1 -0
  514. package/dist.commonjs/signer/index.js +23 -0
  515. package/dist.commonjs/signer/nostr/index.d.ts +4 -0
  516. package/dist.commonjs/signer/nostr/index.d.ts.map +1 -0
  517. package/dist.commonjs/signer/nostr/index.js +19 -0
  518. package/dist.commonjs/signer/nostr/signerNostr.d.ts +72 -0
  519. package/dist.commonjs/signer/nostr/signerNostr.d.ts.map +1 -0
  520. package/dist.commonjs/signer/nostr/signerNostr.js +92 -0
  521. package/dist.commonjs/signer/nostr/signerNostrPrivateKey.d.ts +12 -0
  522. package/dist.commonjs/signer/nostr/signerNostrPrivateKey.d.ts.map +1 -0
  523. package/dist.commonjs/signer/nostr/signerNostrPrivateKey.js +32 -0
  524. package/dist.commonjs/signer/nostr/verify.d.ts +9 -0
  525. package/dist.commonjs/signer/nostr/verify.d.ts.map +1 -0
  526. package/dist.commonjs/signer/nostr/verify.js +60 -0
  527. package/dist.commonjs/signer/signer/index.d.ts +237 -0
  528. package/dist.commonjs/signer/signer/index.d.ts.map +1 -0
  529. package/dist.commonjs/signer/signer/index.js +280 -0
  530. package/dist.commonjs/utils/index.d.ts +97 -0
  531. package/dist.commonjs/utils/index.d.ts.map +1 -0
  532. package/dist.commonjs/utils/index.js +62 -0
  533. package/jest.config.js +5 -0
  534. package/package.json +80 -0
  535. package/src/address/address.advanced.ts +182 -0
  536. package/src/address/advanced.ts +1 -0
  537. package/src/address/index.ts +127 -0
  538. package/src/advanced.ts +2 -0
  539. package/src/advancedBarrel.ts +6 -0
  540. package/src/barrel.ts +13 -0
  541. package/src/bytes/advanced.ts +14 -0
  542. package/src/bytes/index.ts +184 -0
  543. package/src/ckb/advanced.ts +2 -0
  544. package/src/ckb/index.ts +3 -0
  545. package/src/ckb/script.advanced.ts +15 -0
  546. package/src/ckb/script.ts +214 -0
  547. package/src/ckb/transaction.advanced.ts +11 -0
  548. package/src/ckb/transaction.ts +1781 -0
  549. package/src/ckb/transactionLumos.ts +27 -0
  550. package/src/client/advanced.ts +5 -0
  551. package/src/client/cache/advanced.ts +1 -0
  552. package/src/client/cache/cache.ts +188 -0
  553. package/src/client/cache/index.ts +2 -0
  554. package/src/client/cache/memory.advanced.ts +190 -0
  555. package/src/client/cache/memory.ts +219 -0
  556. package/src/client/client.ts +703 -0
  557. package/src/client/clientPublicMainnet.advanced.ts +372 -0
  558. package/src/client/clientPublicMainnet.ts +54 -0
  559. package/src/client/clientPublicTestnet.advanced.ts +384 -0
  560. package/src/client/clientPublicTestnet.ts +54 -0
  561. package/src/client/clientTypes.advanced.ts +30 -0
  562. package/src/client/clientTypes.ts +590 -0
  563. package/src/client/index.ts +6 -0
  564. package/src/client/jsonRpc/advanced.ts +2 -0
  565. package/src/client/jsonRpc/client.ts +397 -0
  566. package/src/client/jsonRpc/index.ts +1 -0
  567. package/src/client/jsonRpc/transformers.ts +358 -0
  568. package/src/client/jsonRpc/types.ts +115 -0
  569. package/src/fixedPoint/index.ts +92 -0
  570. package/src/hasher/advanced.ts +1 -0
  571. package/src/hasher/hasher.ts +38 -0
  572. package/src/hasher/hasherCkb.ts +107 -0
  573. package/src/hasher/hasherKeecak256.ts +55 -0
  574. package/src/hasher/index.ts +3 -0
  575. package/src/hex/index.ts +30 -0
  576. package/src/index.ts +2 -0
  577. package/src/jsonRpc/advanced.ts +1 -0
  578. package/src/jsonRpc/index.ts +1 -0
  579. package/src/jsonRpc/requestor.ts +166 -0
  580. package/src/jsonRpc/transports/advanced.ts +5 -0
  581. package/src/jsonRpc/transports/factory.ts +10 -0
  582. package/src/jsonRpc/transports/fallback.ts +27 -0
  583. package/src/jsonRpc/transports/http.ts +28 -0
  584. package/src/jsonRpc/transports/transport.ts +18 -0
  585. package/src/jsonRpc/transports/webSocket.ts +114 -0
  586. package/src/keystore/index.ts +162 -0
  587. package/src/molecule/barrel.ts +3 -0
  588. package/src/molecule/codec.ts +651 -0
  589. package/src/molecule/entity.ts +183 -0
  590. package/src/molecule/index.ts +1 -0
  591. package/src/molecule/predefined.ts +97 -0
  592. package/src/num/index.ts +217 -0
  593. package/src/signer/btc/index.ts +3 -0
  594. package/src/signer/btc/signerBtc.ts +126 -0
  595. package/src/signer/btc/signerBtcPublicKeyReadonly.ts +73 -0
  596. package/src/signer/btc/verify.ts +49 -0
  597. package/src/signer/ckb/index.ts +5 -0
  598. package/src/signer/ckb/signerCkbPrivateKey.ts +65 -0
  599. package/src/signer/ckb/signerCkbPublicKey.ts +151 -0
  600. package/src/signer/ckb/signerCkbScriptReadonly.ts +78 -0
  601. package/src/signer/ckb/verifyCkbSecp256k1.ts +33 -0
  602. package/src/signer/ckb/verifyJoyId.ts +27 -0
  603. package/src/signer/doge/index.ts +4 -0
  604. package/src/signer/doge/signerDoge.ts +116 -0
  605. package/src/signer/doge/signerDogeAddressReadonly.ts +52 -0
  606. package/src/signer/doge/signerDogePrivateKey.ts +97 -0
  607. package/src/signer/doge/verify.ts +40 -0
  608. package/src/signer/dummy/alwaysError.ts +20 -0
  609. package/src/signer/dummy/dummy.ts +31 -0
  610. package/src/signer/dummy/index.ts +3 -0
  611. package/src/signer/dummy/openLink.ts +20 -0
  612. package/src/signer/evm/index.ts +3 -0
  613. package/src/signer/evm/signerEvm.ts +259 -0
  614. package/src/signer/evm/signerEvmAddressReadonly.ts +60 -0
  615. package/src/signer/evm/verify.ts +19 -0
  616. package/src/signer/index.ts +7 -0
  617. package/src/signer/nostr/index.ts +3 -0
  618. package/src/signer/nostr/signerNostr.ts +141 -0
  619. package/src/signer/nostr/signerNostrPrivateKey.ts +37 -0
  620. package/src/signer/nostr/verify.ts +72 -0
  621. package/src/signer/signer/index.ts +468 -0
  622. package/src/utils/index.ts +198 -0
  623. package/typedoc.json +6 -0
@@ -0,0 +1,893 @@
1
+ import { Bytes, BytesLike } from "../bytes/index.js";
2
+ import type { ClientCollectableSearchKeyFilterLike } from "../client/clientTypes.advanced.js";
3
+ import type { CellDepInfoLike, Client, KnownScript } from "../client/index.js";
4
+ import { Hasher } from "../hasher/index.js";
5
+ import { Hex, HexLike } from "../hex/index.js";
6
+ import { mol } from "../molecule/index.js";
7
+ import { Num, NumLike } from "../num/index.js";
8
+ import type { Signer } from "../signer/index.js";
9
+ import { Script, ScriptLike } from "./script.js";
10
+ import type { LumosTransactionSkeletonType } from "./transactionLumos.js";
11
+ export declare const DepTypeCodec: mol.Codec<DepTypeLike, DepType>;
12
+ /**
13
+ * @public
14
+ */
15
+ export type DepTypeLike = string | number | bigint;
16
+ /**
17
+ * @public
18
+ */
19
+ export type DepType = "depGroup" | "code";
20
+ /**
21
+ * Converts a DepTypeLike value to a DepType.
22
+ * @public
23
+ *
24
+ * @param val - The value to convert, which can be a string, number, or bigint.
25
+ * @returns The corresponding DepType.
26
+ *
27
+ * @throws Will throw an error if the input value is not a valid dep type.
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const depType = depTypeFrom(1); // Outputs "code"
32
+ * const depType = depTypeFrom("depGroup"); // Outputs "depGroup"
33
+ * ```
34
+ */
35
+ export declare function depTypeFrom(val: DepTypeLike): DepType;
36
+ /**
37
+ * Converts a DepTypeLike value to its corresponding byte representation.
38
+ * @public
39
+ *
40
+ * @param depType - The dep type value to convert.
41
+ * @returns A Uint8Array containing the byte representation of the dep type.
42
+ *
43
+ * @example
44
+ * ```typescript
45
+ * const depTypeBytes = depTypeToBytes("code"); // Outputs Uint8Array [1]
46
+ * ```
47
+ */
48
+ export declare function depTypeToBytes(depType: DepTypeLike): Bytes;
49
+ /**
50
+ * Converts a byte-like value to a DepType.
51
+ * @public
52
+ *
53
+ * @param bytes - The byte-like value to convert.
54
+ * @returns The corresponding DepType.
55
+ *
56
+ * @throws Will throw an error if the input bytes do not correspond to a valid dep type.
57
+ *
58
+ * @example
59
+ * ```typescript
60
+ * const depType = depTypeFromBytes(new Uint8Array([1])); // Outputs "code"
61
+ * ```
62
+ */
63
+ export declare function depTypeFromBytes(bytes: BytesLike): DepType;
64
+ /**
65
+ * @public
66
+ */
67
+ export type OutPointLike = {
68
+ txHash: HexLike;
69
+ index: NumLike;
70
+ };
71
+ declare const OutPoint_base: (abstract new () => {
72
+ toBytes(): Bytes;
73
+ clone(): OutPoint;
74
+ eq(other: OutPointLike): boolean;
75
+ hash(): Hex;
76
+ }) & {
77
+ byteLength?: number;
78
+ encode(_: OutPointLike): Bytes;
79
+ decode(_: BytesLike): OutPoint;
80
+ fromBytes(_bytes: BytesLike): OutPoint;
81
+ from(_: OutPointLike): OutPoint;
82
+ };
83
+ /**
84
+ * @public
85
+ */
86
+ export declare class OutPoint extends OutPoint_base {
87
+ txHash: Hex;
88
+ index: Num;
89
+ /**
90
+ * Creates an instance of OutPoint.
91
+ *
92
+ * @param txHash - The transaction hash.
93
+ * @param index - The index of the output in the transaction.
94
+ */
95
+ constructor(txHash: Hex, index: Num);
96
+ /**
97
+ * Creates an OutPoint instance from an OutPointLike object.
98
+ *
99
+ * @param outPoint - An OutPointLike object or an instance of OutPoint.
100
+ * @returns An OutPoint instance.
101
+ *
102
+ * @example
103
+ * ```typescript
104
+ * const outPoint = OutPoint.from({ txHash: "0x...", index: 0 });
105
+ * ```
106
+ */
107
+ static from(outPoint: OutPointLike): OutPoint;
108
+ }
109
+ /**
110
+ * @public
111
+ */
112
+ export type CellOutputLike = {
113
+ capacity: NumLike;
114
+ lock: ScriptLike;
115
+ type?: ScriptLike | null;
116
+ };
117
+ declare const CellOutput_base: (abstract new () => {
118
+ toBytes(): Bytes;
119
+ clone(): CellOutput;
120
+ eq(other: CellOutputLike): boolean;
121
+ hash(): Hex;
122
+ }) & {
123
+ byteLength?: number;
124
+ encode(_: CellOutputLike): Bytes;
125
+ decode(_: BytesLike): CellOutput;
126
+ fromBytes(_bytes: BytesLike): CellOutput;
127
+ from(_: CellOutputLike): CellOutput;
128
+ };
129
+ /**
130
+ * @public
131
+ */
132
+ export declare class CellOutput extends CellOutput_base {
133
+ capacity: Num;
134
+ lock: Script;
135
+ type?: Script | undefined;
136
+ /**
137
+ * Creates an instance of CellOutput.
138
+ *
139
+ * @param capacity - The capacity of the cell.
140
+ * @param lock - The lock script of the cell.
141
+ * @param type - The optional type script of the cell.
142
+ */
143
+ constructor(capacity: Num, lock: Script, type?: Script | undefined);
144
+ get occupiedSize(): number;
145
+ /**
146
+ * Creates a CellOutput instance from a CellOutputLike object.
147
+ *
148
+ * @param cellOutput - A CellOutputLike object or an instance of CellOutput.
149
+ * @returns A CellOutput instance.
150
+ *
151
+ * @example
152
+ * ```typescript
153
+ * const cellOutput = CellOutput.from({
154
+ * capacity: 1000n,
155
+ * lock: { codeHash: "0x...", hashType: "type", args: "0x..." },
156
+ * type: { codeHash: "0x...", hashType: "type", args: "0x..." }
157
+ * });
158
+ * ```
159
+ */
160
+ static from(cellOutput: CellOutputLike): CellOutput;
161
+ }
162
+ export declare const CellOutputVec: mol.Codec<CellOutputLike[], CellOutput[]>;
163
+ /**
164
+ * @public
165
+ */
166
+ export type CellLike = ({
167
+ outPoint: OutPointLike;
168
+ } | {
169
+ previousOutput: OutPointLike;
170
+ }) & {
171
+ cellOutput: CellOutputLike;
172
+ outputData: HexLike;
173
+ };
174
+ /**
175
+ * @public
176
+ */
177
+ export declare class Cell {
178
+ outPoint: OutPoint;
179
+ cellOutput: CellOutput;
180
+ outputData: Hex;
181
+ /**
182
+ * Creates an instance of Cell.
183
+ *
184
+ * @param outPoint - The output point of the cell.
185
+ * @param cellOutput - The cell output of the cell.
186
+ * @param outputData - The output data of the cell.
187
+ */
188
+ constructor(outPoint: OutPoint, cellOutput: CellOutput, outputData: Hex);
189
+ /**
190
+ * Creates a Cell instance from a CellLike object.
191
+ *
192
+ * @param cell - A CellLike object or an instance of Cell.
193
+ * @returns A Cell instance.
194
+ */
195
+ static from(cell: CellLike): Cell;
196
+ /**
197
+ * Clone a Cell
198
+ *
199
+ * @returns A cloned Cell instance.
200
+ *
201
+ * @example
202
+ * ```typescript
203
+ * const cell1 = cell0.clone();
204
+ * ```
205
+ */
206
+ clone(): Cell;
207
+ }
208
+ /**
209
+ * @public
210
+ */
211
+ export type EpochLike = [NumLike, NumLike, NumLike];
212
+ /**
213
+ * @public
214
+ */
215
+ export type Epoch = [Num, Num, Num];
216
+ /**
217
+ * @public
218
+ */
219
+ export declare function epochFrom(epochLike: EpochLike): Epoch;
220
+ /**
221
+ * @public
222
+ */
223
+ export declare function epochFromHex(hex: HexLike): Epoch;
224
+ /**
225
+ * @public
226
+ */
227
+ export declare function epochToHex(epochLike: EpochLike): Hex;
228
+ /**
229
+ * @public
230
+ */
231
+ export type SinceLike = {
232
+ relative: "absolute" | "relative";
233
+ metric: "blockNumber" | "epoch" | "timestamp";
234
+ value: NumLike;
235
+ } | NumLike;
236
+ declare const Since_base: (abstract new () => {
237
+ toBytes(): Bytes;
238
+ clone(): Since;
239
+ eq(other: SinceLike): boolean;
240
+ hash(): Hex;
241
+ }) & {
242
+ byteLength?: number;
243
+ encode(_: SinceLike): Bytes;
244
+ decode(_: BytesLike): Since;
245
+ fromBytes(_bytes: BytesLike): Since;
246
+ from(_: SinceLike): Since;
247
+ };
248
+ /**
249
+ * @public
250
+ */
251
+ export declare class Since extends Since_base {
252
+ relative: "absolute" | "relative";
253
+ metric: "blockNumber" | "epoch" | "timestamp";
254
+ value: Num;
255
+ /**
256
+ * Creates an instance of Since.
257
+ *
258
+ * @param relative - Absolute or relative
259
+ * @param metric - The metric of since
260
+ * @param value - The value of since
261
+ */
262
+ constructor(relative: "absolute" | "relative", metric: "blockNumber" | "epoch" | "timestamp", value: Num);
263
+ /**
264
+ * Clone a Since.
265
+ *
266
+ * @returns A cloned Since instance.
267
+ *
268
+ * @example
269
+ * ```typescript
270
+ * const since1 = since0.clone();
271
+ * ```
272
+ */
273
+ clone(): Since;
274
+ /**
275
+ * Creates a Since instance from a SinceLike object.
276
+ *
277
+ * @param since - A SinceLike object or an instance of Since.
278
+ * @returns A Since instance.
279
+ *
280
+ * @example
281
+ * ```typescript
282
+ * const since = Since.from("0x1234567812345678");
283
+ * ```
284
+ */
285
+ static from(since: SinceLike): Since;
286
+ /**
287
+ * Converts the Since instance to num.
288
+ *
289
+ * @returns A num
290
+ *
291
+ * @example
292
+ * ```typescript
293
+ * const num = since.toNum();
294
+ * ```
295
+ */
296
+ toNum(): Num;
297
+ /**
298
+ * Creates a Since instance from a num-like value.
299
+ *
300
+ * @param numLike - The num-like value to convert.
301
+ * @returns A Since instance.
302
+ *
303
+ * @example
304
+ * ```typescript
305
+ * const since = Since.fromNum("0x0");
306
+ * ```
307
+ */
308
+ static fromNum(numLike: NumLike): Since;
309
+ }
310
+ /**
311
+ * @public
312
+ */
313
+ export type CellInputLike = ({
314
+ previousOutput: OutPointLike;
315
+ } | {
316
+ outPoint: OutPointLike;
317
+ }) & {
318
+ since?: SinceLike | NumLike | null;
319
+ cellOutput?: CellOutputLike | null;
320
+ outputData?: HexLike | null;
321
+ };
322
+ declare const CellInput_base: (abstract new () => {
323
+ toBytes(): Bytes;
324
+ clone(): CellInput;
325
+ eq(other: CellInputLike): boolean;
326
+ hash(): Hex;
327
+ }) & {
328
+ byteLength?: number;
329
+ encode(_: CellInputLike): Bytes;
330
+ decode(_: BytesLike): CellInput;
331
+ fromBytes(_bytes: BytesLike): CellInput;
332
+ from(_: CellInputLike): CellInput;
333
+ };
334
+ /**
335
+ * @public
336
+ */
337
+ export declare class CellInput extends CellInput_base {
338
+ previousOutput: OutPoint;
339
+ since: Num;
340
+ cellOutput?: CellOutput | undefined;
341
+ outputData?: Hex | undefined;
342
+ /**
343
+ * Creates an instance of CellInput.
344
+ *
345
+ * @param previousOutput - The previous outpoint of the cell.
346
+ * @param since - The since value of the cell input.
347
+ * @param cellOutput - The optional cell output associated with the cell input.
348
+ * @param outputData - The optional output data associated with the cell input.
349
+ */
350
+ constructor(previousOutput: OutPoint, since: Num, cellOutput?: CellOutput | undefined, outputData?: Hex | undefined);
351
+ /**
352
+ * Creates a CellInput instance from a CellInputLike object.
353
+ *
354
+ * @param cellInput - A CellInputLike object or an instance of CellInput.
355
+ * @returns A CellInput instance.
356
+ *
357
+ * @example
358
+ * ```typescript
359
+ * const cellInput = CellInput.from({
360
+ * previousOutput: { txHash: "0x...", index: 0 },
361
+ * since: 0n
362
+ * });
363
+ * ```
364
+ */
365
+ static from(cellInput: CellInputLike): CellInput;
366
+ /**
367
+ * Complete extra infos in the input. Like the output of the out point.
368
+ * The instance will be modified.
369
+ *
370
+ * @returns true if succeed.
371
+ * @example
372
+ * ```typescript
373
+ * await cellInput.completeExtraInfos();
374
+ * ```
375
+ */
376
+ completeExtraInfos(client: Client): Promise<void>;
377
+ clone(): CellInput;
378
+ }
379
+ export declare const CellInputVec: mol.Codec<CellInputLike[], CellInput[]>;
380
+ /**
381
+ * @public
382
+ */
383
+ export type CellDepLike = {
384
+ outPoint: OutPointLike;
385
+ depType: DepTypeLike;
386
+ };
387
+ declare const CellDep_base: (abstract new () => {
388
+ toBytes(): Bytes;
389
+ clone(): CellDep;
390
+ eq(other: CellDepLike): boolean;
391
+ hash(): Hex;
392
+ }) & {
393
+ byteLength?: number;
394
+ encode(_: CellDepLike): Bytes;
395
+ decode(_: BytesLike): CellDep;
396
+ fromBytes(_bytes: BytesLike): CellDep;
397
+ from(_: CellDepLike): CellDep;
398
+ };
399
+ /**
400
+ * @public
401
+ */
402
+ export declare class CellDep extends CellDep_base {
403
+ outPoint: OutPoint;
404
+ depType: DepType;
405
+ /**
406
+ * Creates an instance of CellDep.
407
+ *
408
+ * @param outPoint - The outpoint of the cell dependency.
409
+ * @param depType - The dependency type.
410
+ */
411
+ constructor(outPoint: OutPoint, depType: DepType);
412
+ /**
413
+ * Clone a CellDep.
414
+ *
415
+ * @returns A cloned CellDep instance.
416
+ *
417
+ * @example
418
+ * ```typescript
419
+ * const cellDep1 = cellDep0.clone();
420
+ * ```
421
+ */
422
+ clone(): CellDep;
423
+ /**
424
+ * Creates a CellDep instance from a CellDepLike object.
425
+ *
426
+ * @param cellDep - A CellDepLike object or an instance of CellDep.
427
+ * @returns A CellDep instance.
428
+ *
429
+ * @example
430
+ * ```typescript
431
+ * const cellDep = CellDep.from({
432
+ * outPoint: { txHash: "0x...", index: 0 },
433
+ * depType: "depGroup"
434
+ * });
435
+ * ```
436
+ */
437
+ static from(cellDep: CellDepLike): CellDep;
438
+ }
439
+ export declare const CellDepVec: mol.Codec<CellDepLike[], CellDep[]>;
440
+ /**
441
+ * @public
442
+ */
443
+ export type WitnessArgsLike = {
444
+ lock?: HexLike | null;
445
+ inputType?: HexLike | null;
446
+ outputType?: HexLike | null;
447
+ };
448
+ declare const WitnessArgs_base: (abstract new () => {
449
+ toBytes(): Bytes;
450
+ clone(): WitnessArgs;
451
+ eq(other: WitnessArgsLike): boolean;
452
+ hash(): Hex;
453
+ }) & {
454
+ byteLength?: number;
455
+ encode(_: WitnessArgsLike): Bytes;
456
+ decode(_: BytesLike): WitnessArgs;
457
+ fromBytes(_bytes: BytesLike): WitnessArgs;
458
+ from(_: WitnessArgsLike): WitnessArgs;
459
+ };
460
+ /**
461
+ * @public
462
+ */
463
+ export declare class WitnessArgs extends WitnessArgs_base {
464
+ lock?: Hex | undefined;
465
+ inputType?: Hex | undefined;
466
+ outputType?: Hex | undefined;
467
+ /**
468
+ * Creates an instance of WitnessArgs.
469
+ *
470
+ * @param lock - The optional lock field of the witness.
471
+ * @param inputType - The optional input type field of the witness.
472
+ * @param outputType - The optional output type field of the witness.
473
+ */
474
+ constructor(lock?: Hex | undefined, inputType?: Hex | undefined, outputType?: Hex | undefined);
475
+ /**
476
+ * Creates a WitnessArgs instance from a WitnessArgsLike object.
477
+ *
478
+ * @param witnessArgs - A WitnessArgsLike object or an instance of WitnessArgs.
479
+ * @returns A WitnessArgs instance.
480
+ *
481
+ * @example
482
+ * ```typescript
483
+ * const witnessArgs = WitnessArgs.from({
484
+ * lock: "0x...",
485
+ * inputType: "0x...",
486
+ * outputType: "0x..."
487
+ * });
488
+ * ```
489
+ */
490
+ static from(witnessArgs: WitnessArgsLike): WitnessArgs;
491
+ }
492
+ /**
493
+ * @public
494
+ */
495
+ export declare function udtBalanceFrom(dataLike: BytesLike): Num;
496
+ export declare const RawTransaction: mol.Codec<mol.EncodableRecord<{
497
+ version: mol.Codec<NumLike, number>;
498
+ cellDeps: mol.Codec<CellDepLike[], CellDep[]>;
499
+ headerDeps: mol.Codec<BytesLike[], `0x${string}`[]>;
500
+ inputs: mol.Codec<CellInputLike[], CellInput[]>;
501
+ outputs: mol.Codec<CellOutputLike[], CellOutput[]>;
502
+ outputsData: mol.Codec<BytesLike[], `0x${string}`[]>;
503
+ }>, mol.DecodedRecord<{
504
+ version: mol.Codec<NumLike, number>;
505
+ cellDeps: mol.Codec<CellDepLike[], CellDep[]>;
506
+ headerDeps: mol.Codec<BytesLike[], `0x${string}`[]>;
507
+ inputs: mol.Codec<CellInputLike[], CellInput[]>;
508
+ outputs: mol.Codec<CellOutputLike[], CellOutput[]>;
509
+ outputsData: mol.Codec<BytesLike[], `0x${string}`[]>;
510
+ }>>;
511
+ /**
512
+ * @public
513
+ */
514
+ export type TransactionLike = {
515
+ version?: NumLike | null;
516
+ cellDeps?: CellDepLike[] | null;
517
+ headerDeps?: HexLike[] | null;
518
+ inputs?: CellInputLike[] | null;
519
+ outputs?: (Omit<CellOutputLike, "capacity"> & Partial<Pick<CellOutputLike, "capacity">>)[] | null;
520
+ outputsData?: HexLike[] | null;
521
+ witnesses?: HexLike[] | null;
522
+ };
523
+ declare const Transaction_base: (abstract new () => {
524
+ toBytes(): Bytes;
525
+ clone(): Transaction;
526
+ eq(other: TransactionLike): boolean;
527
+ hash(): Hex;
528
+ }) & {
529
+ byteLength?: number;
530
+ encode(_: TransactionLike): Bytes;
531
+ decode(_: BytesLike): Transaction;
532
+ fromBytes(_bytes: BytesLike): Transaction;
533
+ from(_: TransactionLike): Transaction;
534
+ };
535
+ /**
536
+ * @public
537
+ */
538
+ export declare class Transaction extends Transaction_base {
539
+ version: Num;
540
+ cellDeps: CellDep[];
541
+ headerDeps: Hex[];
542
+ inputs: CellInput[];
543
+ outputs: CellOutput[];
544
+ outputsData: Hex[];
545
+ witnesses: Hex[];
546
+ /**
547
+ * Creates an instance of Transaction.
548
+ *
549
+ * @param version - The version of the transaction.
550
+ * @param cellDeps - The cell dependencies of the transaction.
551
+ * @param headerDeps - The header dependencies of the transaction.
552
+ * @param inputs - The inputs of the transaction.
553
+ * @param outputs - The outputs of the transaction.
554
+ * @param outputsData - The data associated with the outputs.
555
+ * @param witnesses - The witnesses of the transaction.
556
+ */
557
+ constructor(version: Num, cellDeps: CellDep[], headerDeps: Hex[], inputs: CellInput[], outputs: CellOutput[], outputsData: Hex[], witnesses: Hex[]);
558
+ /**
559
+ * Creates a default Transaction instance with empty fields.
560
+ *
561
+ * @returns A default Transaction instance.
562
+ *
563
+ * @example
564
+ * ```typescript
565
+ * const defaultTx = Transaction.default();
566
+ * ```
567
+ */
568
+ static default(): Transaction;
569
+ /**
570
+ * Copy every properties from another transaction.
571
+ *
572
+ * @example
573
+ * ```typescript
574
+ * this.copy(Transaction.default());
575
+ * ```
576
+ */
577
+ copy(txLike: TransactionLike): void;
578
+ /**
579
+ * Creates a Transaction instance from a TransactionLike object.
580
+ *
581
+ * @param tx - A TransactionLike object or an instance of Transaction.
582
+ * @returns A Transaction instance.
583
+ *
584
+ * @example
585
+ * ```typescript
586
+ * const transaction = Transaction.from({
587
+ * version: 0,
588
+ * cellDeps: [],
589
+ * headerDeps: [],
590
+ * inputs: [],
591
+ * outputs: [],
592
+ * outputsData: [],
593
+ * witnesses: []
594
+ * });
595
+ * ```
596
+ */
597
+ static from(tx: TransactionLike): Transaction;
598
+ /**
599
+ * Creates a Transaction instance from a Lumos skeleton.
600
+ *
601
+ * @param skeleton - The Lumos transaction skeleton.
602
+ * @returns A Transaction instance.
603
+ *
604
+ * @throws Will throw an error if an input's outPoint is missing.
605
+ *
606
+ * @example
607
+ * ```typescript
608
+ * const transaction = Transaction.fromLumosSkeleton(skeleton);
609
+ * ```
610
+ */
611
+ static fromLumosSkeleton(skeleton: LumosTransactionSkeletonType): Transaction;
612
+ /**
613
+ * @deprecated
614
+ * Use ccc.stringify instead.
615
+ * stringify the tx to JSON string.
616
+ */
617
+ stringify(): string;
618
+ /**
619
+ * Converts the raw transaction data to bytes.
620
+ *
621
+ * @returns A Uint8Array containing the raw transaction bytes.
622
+ *
623
+ * @example
624
+ * ```typescript
625
+ * const rawTxBytes = transaction.rawToBytes();
626
+ * ```
627
+ */
628
+ rawToBytes(): Bytes;
629
+ /**
630
+ * Calculates the hash of the transaction without witnesses. This is the transaction hash in the usual sense.
631
+ * To calculate the hash of the whole transaction including the witnesses, use transaction.hashFull() instead.
632
+ *
633
+ * @returns The hash of the transaction.
634
+ *
635
+ * @example
636
+ * ```typescript
637
+ * const txHash = transaction.hash();
638
+ * ```
639
+ */
640
+ hash(): Hex;
641
+ /**
642
+ * Calculates the hash of the transaction with witnesses.
643
+ *
644
+ * @returns The hash of the transaction with witnesses.
645
+ *
646
+ * @example
647
+ * ```typescript
648
+ * const txFullHash = transaction.hashFull();
649
+ * ```
650
+ */
651
+ hashFull(): Hex;
652
+ /**
653
+ * Hashes a witness and updates the hasher.
654
+ *
655
+ * @param witness - The witness to hash.
656
+ * @param hasher - The hasher instance to update.
657
+ *
658
+ * @example
659
+ * ```typescript
660
+ * Transaction.hashWitnessToHasher("0x...", hasher);
661
+ * ```
662
+ */
663
+ static hashWitnessToHasher(witness: HexLike, hasher: Hasher): void;
664
+ /**
665
+ * Computes the signing hash information for a given script.
666
+ *
667
+ * @param scriptLike - The script associated with the transaction, represented as a ScriptLike object.
668
+ * @param client - The client for complete extra infos in the transaction.
669
+ * @returns A promise that resolves to an object containing the signing message and the witness position,
670
+ * or undefined if no matching input is found.
671
+ *
672
+ * @example
673
+ * ```typescript
674
+ * const signHashInfo = await tx.getSignHashInfo(scriptLike, client);
675
+ * if (signHashInfo) {
676
+ * console.log(signHashInfo.message); // Outputs the signing message
677
+ * console.log(signHashInfo.position); // Outputs the witness position
678
+ * }
679
+ * ```
680
+ */
681
+ getSignHashInfo(scriptLike: ScriptLike, client: Client, hasher?: Hasher): Promise<{
682
+ message: Hex;
683
+ position: number;
684
+ } | undefined>;
685
+ /**
686
+ * Find the first occurrence of a input with the specified lock id
687
+ *
688
+ * @param scriptIdLike - The script associated with the transaction, represented as a ScriptLike object without args.
689
+ * @param client - The client for complete extra infos in the transaction.
690
+ * @returns A promise that resolves to the found index
691
+ *
692
+ * @example
693
+ * ```typescript
694
+ * const index = await tx.findInputIndexByLockId(scriptIdLike, client);
695
+ * ```
696
+ */
697
+ findInputIndexByLockId(scriptIdLike: Pick<ScriptLike, "codeHash" | "hashType">, client: Client): Promise<number | undefined>;
698
+ /**
699
+ * Find the first occurrence of a input with the specified lock
700
+ *
701
+ * @param scriptLike - The script associated with the transaction, represented as a ScriptLike object.
702
+ * @param client - The client for complete extra infos in the transaction.
703
+ * @returns A promise that resolves to the prepared transaction
704
+ *
705
+ * @example
706
+ * ```typescript
707
+ * const index = await tx.findInputIndexByLock(scriptLike, client);
708
+ * ```
709
+ */
710
+ findInputIndexByLock(scriptLike: ScriptLike, client: Client): Promise<number | undefined>;
711
+ /**
712
+ * Find the last occurrence of a input with the specified lock
713
+ *
714
+ * @param scriptLike - The script associated with the transaction, represented as a ScriptLike object.
715
+ * @param client - The client for complete extra infos in the transaction.
716
+ * @returns A promise that resolves to the prepared transaction
717
+ *
718
+ * @example
719
+ * ```typescript
720
+ * const index = await tx.findLastInputIndexByLock(scriptLike, client);
721
+ * ```
722
+ */
723
+ findLastInputIndexByLock(scriptLike: ScriptLike, client: Client): Promise<number | undefined>;
724
+ /**
725
+ * Add cell deps if they are not existed
726
+ *
727
+ * @param cellDepLikes - The cell deps to add
728
+ *
729
+ * @example
730
+ * ```typescript
731
+ * tx.addCellDeps(cellDep);
732
+ * ```
733
+ */
734
+ addCellDeps(...cellDepLikes: (CellDepLike | CellDepLike[])[]): void;
735
+ /**
736
+ * Add cell deps at the start if they are not existed
737
+ *
738
+ * @param cellDepLikes - The cell deps to add
739
+ *
740
+ * @example
741
+ * ```typescript
742
+ * tx.addCellDepsAtBegin(cellDep);
743
+ * ```
744
+ */
745
+ addCellDepsAtStart(...cellDepLikes: (CellDepLike | CellDepLike[])[]): void;
746
+ /**
747
+ * Add cell dep from infos if they are not existed
748
+ *
749
+ * @param client - A client for searching cell deps
750
+ * @param cellDepInfoLikes - The cell dep infos to add
751
+ *
752
+ * @example
753
+ * ```typescript
754
+ * tx.addCellDepInfos(client, cellDepInfos);
755
+ * ```
756
+ */
757
+ addCellDepInfos(client: Client, ...cellDepInfoLikes: (CellDepInfoLike | CellDepInfoLike[])[]): Promise<void>;
758
+ /**
759
+ * Add cell deps from known script
760
+ *
761
+ * @param client - The client for searching known script and cell deps
762
+ * @param scripts - The known scripts to add
763
+ *
764
+ * @example
765
+ * ```typescript
766
+ * tx.addCellDepsOfKnownScripts(client, KnownScript.OmniLock);
767
+ * ```
768
+ */
769
+ addCellDepsOfKnownScripts(client: Client, ...scripts: (KnownScript | KnownScript[])[]): Promise<void>;
770
+ /**
771
+ * Set output data at index.
772
+ *
773
+ * @param index - The index of the output data.
774
+ * @param witness - The data to set.
775
+ *
776
+ * @example
777
+ * ```typescript
778
+ * await tx.setOutputDataAt(0, "0x00");
779
+ * ```
780
+ */
781
+ setOutputDataAt(index: number, witness: HexLike): void;
782
+ /**
783
+ * get input
784
+ *
785
+ * @param index - The cell input index
786
+ *
787
+ * @example
788
+ * ```typescript
789
+ * await tx.getInput(0);
790
+ * ```
791
+ */
792
+ getInput(index: NumLike): CellInput | undefined;
793
+ /**
794
+ * add input
795
+ *
796
+ * @param inputLike - The cell input.
797
+ *
798
+ * @example
799
+ * ```typescript
800
+ * await tx.addInput({ });
801
+ * ```
802
+ */
803
+ addInput(inputLike: CellInputLike): number;
804
+ /**
805
+ * get output
806
+ *
807
+ * @param index - The cell output index
808
+ *
809
+ * @example
810
+ * ```typescript
811
+ * await tx.getOutput(0);
812
+ * ```
813
+ */
814
+ getOutput(index: NumLike): {
815
+ cellOutput: CellOutput;
816
+ outputData: Hex;
817
+ } | undefined;
818
+ /**
819
+ * Add output
820
+ *
821
+ * @param outputLike - The cell output to add
822
+ * @param outputData - optional output data
823
+ *
824
+ * @example
825
+ * ```typescript
826
+ * await tx.addOutput(cellOutput, "0xabcd");
827
+ * ```
828
+ */
829
+ addOutput(outputLike: Omit<CellOutputLike, "capacity"> & Partial<Pick<CellOutputLike, "capacity">>, outputData?: HexLike): number;
830
+ /**
831
+ * Get witness at index as WitnessArgs
832
+ *
833
+ * @param index - The index of the witness.
834
+ * @returns The witness parsed as WitnessArgs.
835
+ *
836
+ * @example
837
+ * ```typescript
838
+ * const witnessArgs = await tx.getWitnessArgsAt(0);
839
+ * ```
840
+ */
841
+ getWitnessArgsAt(index: number): WitnessArgs | undefined;
842
+ /**
843
+ * Set witness at index by WitnessArgs
844
+ *
845
+ * @param index - The index of the witness.
846
+ * @param witness - The WitnessArgs to set.
847
+ *
848
+ * @example
849
+ * ```typescript
850
+ * await tx.setWitnessArgsAt(0, witnessArgs);
851
+ * ```
852
+ */
853
+ setWitnessArgsAt(index: number, witness: WitnessArgs): void;
854
+ /**
855
+ * Prepare dummy witness for sighash all method
856
+ *
857
+ * @param scriptLike - The script associated with the transaction, represented as a ScriptLike object.
858
+ * @param lockLen - The length of dummy lock bytes.
859
+ * @param client - The client for complete extra infos in the transaction.
860
+ * @returns A promise that resolves to the prepared transaction
861
+ *
862
+ * @example
863
+ * ```typescript
864
+ * await tx.prepareSighashAllWitness(scriptLike, 85, client);
865
+ * ```
866
+ */
867
+ prepareSighashAllWitness(scriptLike: ScriptLike, lockLen: number, client: Client): Promise<void>;
868
+ getInputsCapacity(client: Client): Promise<Num>;
869
+ getOutputsCapacity(): Num;
870
+ getInputsUdtBalance(client: Client, type: ScriptLike): Promise<Num>;
871
+ getOutputsUdtBalance(type: ScriptLike): Num;
872
+ completeInputs<T>(from: Signer, filter: ClientCollectableSearchKeyFilterLike, accumulator: (acc: T, v: Cell, i: number, array: Cell[]) => Promise<T | undefined> | T | undefined, init: T): Promise<{
873
+ addedCount: number;
874
+ accumulated?: T;
875
+ }>;
876
+ completeInputsByCapacity(from: Signer, capacityTweak?: NumLike, filter?: ClientCollectableSearchKeyFilterLike): Promise<number>;
877
+ completeInputsAll(from: Signer, filter?: ClientCollectableSearchKeyFilterLike): Promise<number>;
878
+ completeInputsByUdt(from: Signer, type: ScriptLike, balanceTweak?: NumLike): Promise<number>;
879
+ completeInputsAddOne(from: Signer, filter?: ClientCollectableSearchKeyFilterLike): Promise<number>;
880
+ completeInputsAtLeastOne(from: Signer, filter?: ClientCollectableSearchKeyFilterLike): Promise<number>;
881
+ fee(client: Client): Promise<Num>;
882
+ feeRate(client: Client): Promise<Num>;
883
+ estimateFee(feeRate: NumLike): Num;
884
+ completeFee(from: Signer, change: (tx: Transaction, capacity: Num) => Promise<NumLike> | NumLike, expectedFeeRate?: NumLike, filter?: ClientCollectableSearchKeyFilterLike, options?: {
885
+ feeRateBlockRange?: NumLike;
886
+ maxFeeRate?: NumLike;
887
+ }): Promise<[number, boolean]>;
888
+ completeFeeChangeToLock(from: Signer, change: ScriptLike, feeRate?: NumLike, filter?: ClientCollectableSearchKeyFilterLike): Promise<[number, boolean]>;
889
+ completeFeeBy(from: Signer, feeRate?: NumLike, filter?: ClientCollectableSearchKeyFilterLike): Promise<[number, boolean]>;
890
+ completeFeeChangeToOutput(from: Signer, index: NumLike, feeRate?: NumLike, filter?: ClientCollectableSearchKeyFilterLike): Promise<[number, boolean]>;
891
+ }
892
+ export {};
893
+ //# sourceMappingURL=transaction.d.ts.map