opnet 1.0.49 → 1.0.50

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 (478) hide show
  1. package/.babelrc +8 -7
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +38 -38
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +20 -20
  4. package/.github/workflows/ci.yml +48 -0
  5. package/.prettierrc.json +11 -11
  6. package/CONTRIBUTING.md +71 -71
  7. package/LICENSE.md +16 -16
  8. package/README.md +96 -93
  9. package/STAKING.md +60 -70
  10. package/browser/_version.d.ts +1 -1
  11. package/browser/bitcoin/BitcoinAddress.d.ts +0 -1
  12. package/browser/contracts/CallResult.d.ts +0 -1
  13. package/browser/contracts/Contract.d.ts +0 -1
  14. package/browser/contracts/ContractData.d.ts +0 -1
  15. package/browser/contracts/interfaces/IContract.d.ts +0 -1
  16. package/browser/contracts/interfaces/IRawContract.d.ts +0 -1
  17. package/browser/crypto/crypto.d.ts +0 -1
  18. package/browser/index.js +2 -2
  19. package/browser/providers/AbstractRpcProvider.d.ts +47 -48
  20. package/browser/providers/JSONRpcProvider.d.ts +10 -10
  21. package/browser/storage/StoredValue.d.ts +0 -1
  22. package/browser/storage/interfaces/IStorageValue.d.ts +0 -1
  23. package/browser/transactions/decoders/DeploymentTransaction.d.ts +0 -1
  24. package/browser/transactions/decoders/InteractionTransaction.d.ts +0 -1
  25. package/browser/transactions/interfaces/ITransaction.d.ts +0 -1
  26. package/browser/transactions/interfaces/ITransactionReceipt.d.ts +0 -1
  27. package/browser/transactions/interfaces/transactions/IDeploymentTransaction.d.ts +0 -1
  28. package/browser/transactions/interfaces/transactions/IInteractionTransaction.d.ts +0 -1
  29. package/browser/transactions/interfaces/transactions/IUnwrapTransaction.d.ts +0 -1
  30. package/browser/transactions/metadata/TransactionOutput.d.ts +0 -1
  31. package/browser/transactions/metadata/TransactionReceipt.d.ts +0 -1
  32. package/build/abi/BitcoinInterface.js +0 -1
  33. package/build/bitcoin/BitcoinAddress.d.ts +0 -1
  34. package/build/bitcoin/BitcoinAddress.js +30 -19
  35. package/build/bitcoin/UTXOs.js +0 -4
  36. package/build/block/Block.js +1 -19
  37. package/build/contracts/CallResult.d.ts +0 -1
  38. package/build/contracts/CallResult.js +2 -7
  39. package/build/contracts/Contract.d.ts +0 -1
  40. package/build/contracts/Contract.js +1 -6
  41. package/build/contracts/ContractData.d.ts +0 -1
  42. package/build/contracts/ContractData.js +0 -11
  43. package/build/contracts/OPNetEvent.js +2 -5
  44. package/build/contracts/interfaces/IContract.d.ts +0 -1
  45. package/build/contracts/interfaces/IRawContract.d.ts +0 -1
  46. package/build/crypto/crypto.d.ts +0 -1
  47. package/build/providers/AbstractRpcProvider.d.ts +0 -1
  48. package/build/providers/AbstractRpcProvider.js +3 -4
  49. package/build/providers/JSONRpcProvider.js +1 -3
  50. package/build/providers/WebsocketRpcProvider.js +0 -1
  51. package/build/storage/StoredValue.d.ts +0 -1
  52. package/build/storage/StoredValue.js +0 -4
  53. package/build/storage/interfaces/IStorageValue.d.ts +0 -1
  54. package/build/transactions/Transaction.js +0 -8
  55. package/build/transactions/decoders/DeploymentTransaction.d.ts +0 -1
  56. package/build/transactions/decoders/DeploymentTransaction.js +0 -10
  57. package/build/transactions/decoders/InteractionTransaction.d.ts +0 -1
  58. package/build/transactions/decoders/InteractionTransaction.js +0 -7
  59. package/build/transactions/decoders/UnwrapTransaction.js +0 -5
  60. package/build/transactions/decoders/WrapTransaction.js +0 -7
  61. package/build/transactions/interfaces/ITransaction.d.ts +0 -1
  62. package/build/transactions/interfaces/ITransactionReceipt.d.ts +0 -1
  63. package/build/transactions/interfaces/transactions/IDeploymentTransaction.d.ts +0 -1
  64. package/build/transactions/interfaces/transactions/IInteractionTransaction.d.ts +0 -1
  65. package/build/transactions/interfaces/transactions/IUnwrapTransaction.d.ts +0 -1
  66. package/build/transactions/metadata/TransactionInput.js +1 -5
  67. package/build/transactions/metadata/TransactionOutput.d.ts +0 -1
  68. package/build/transactions/metadata/TransactionOutput.js +0 -4
  69. package/build/transactions/metadata/TransactionReceipt.d.ts +0 -1
  70. package/build/transactions/metadata/TransactionReceipt.js +0 -4
  71. package/cjs/package.json +3 -3
  72. package/docs/assets/highlight.css +92 -92
  73. package/docs/classes/AbstractRpcProvider.html +334 -334
  74. package/docs/classes/BaseContract.html +198 -198
  75. package/docs/classes/BitcoinAddress.html +192 -192
  76. package/docs/classes/BitcoinInterface.html +182 -182
  77. package/docs/classes/BitcoinUtils.html +182 -182
  78. package/docs/classes/Block.html +196 -196
  79. package/docs/classes/CallResult.html +185 -185
  80. package/docs/classes/ContractData.html +187 -187
  81. package/docs/classes/DeploymentTransaction.html +220 -220
  82. package/docs/classes/GenericTransaction.html +200 -200
  83. package/docs/classes/IBaseContract.html +203 -203
  84. package/docs/classes/InteractionTransaction.html +213 -213
  85. package/docs/classes/JSONRpcProvider.html +332 -332
  86. package/docs/classes/OPNetEvent.html +181 -181
  87. package/docs/classes/StoredValue.html +181 -181
  88. package/docs/classes/TransactionBase.html +200 -200
  89. package/docs/classes/TransactionInput.html +180 -180
  90. package/docs/classes/TransactionOutput.html +180 -180
  91. package/docs/classes/TransactionParser.html +177 -177
  92. package/docs/classes/TransactionReceipt.html +187 -187
  93. package/docs/classes/UTXO.html +180 -180
  94. package/docs/classes/UnwrapTransaction.html +224 -224
  95. package/docs/classes/WebSocketRpcProvider.html +329 -329
  96. package/docs/classes/WrapTransaction.html +228 -228
  97. package/docs/enums/ABIDataTypes.html +193 -193
  98. package/docs/enums/BitcoinAbiTypes.html +177 -177
  99. package/docs/enums/GenerateTarget.html +174 -174
  100. package/docs/enums/JSONRPCErrorCode.html +183 -183
  101. package/docs/enums/JSONRPCErrorHttpCodes.html +183 -183
  102. package/docs/enums/JSONRpcMethods.html +196 -196
  103. package/docs/enums/OPNetTransactionTypes.html +178 -178
  104. package/docs/functions/getContract.html +182 -182
  105. package/docs/hierarchy.html +173 -173
  106. package/docs/index.html +218 -218
  107. package/docs/interfaces/BaseContractProperties.html +180 -180
  108. package/docs/interfaces/BitcoinAbiValue.html +179 -179
  109. package/docs/interfaces/BitcoinInterfaceAbiBase.html +177 -177
  110. package/docs/interfaces/BroadcastedTransaction.html +183 -183
  111. package/docs/interfaces/ContractEvents.html +173 -173
  112. package/docs/interfaces/EventBaseData.html +178 -178
  113. package/docs/interfaces/FunctionBaseData.html +181 -181
  114. package/docs/interfaces/IAccessList.html +175 -175
  115. package/docs/interfaces/IAccessListItem.html +175 -175
  116. package/docs/interfaces/IBlock.html +195 -195
  117. package/docs/interfaces/IBlockCommon.html +194 -194
  118. package/docs/interfaces/IBlockWitness.html +175 -175
  119. package/docs/interfaces/IBlockWitnessAPI.html +177 -177
  120. package/docs/interfaces/ICallRequestError.html +176 -176
  121. package/docs/interfaces/ICallResultData.html +179 -179
  122. package/docs/interfaces/ICommonTransaction.html +205 -205
  123. package/docs/interfaces/IContract.html +180 -180
  124. package/docs/interfaces/IDecodedEvent.html +177 -177
  125. package/docs/interfaces/IDeploymentTransaction.html +219 -219
  126. package/docs/interfaces/IGenericTransaction.html +199 -199
  127. package/docs/interfaces/IInteractionTransaction.html +213 -213
  128. package/docs/interfaces/IMotoContract.html +196 -196
  129. package/docs/interfaces/IMotoswapFactoryContract.html +193 -193
  130. package/docs/interfaces/IMotoswapPoolContract.html +208 -208
  131. package/docs/interfaces/IMotoswapRouterContract.html +227 -227
  132. package/docs/interfaces/IOP_20Contract.html +196 -196
  133. package/docs/interfaces/IOP_NETContract.html +183 -183
  134. package/docs/interfaces/IRawContract.html +187 -187
  135. package/docs/interfaces/IRawContractEvents.html +173 -173
  136. package/docs/interfaces/IStackingContract.html +183 -183
  137. package/docs/interfaces/IStorageValue.html +179 -179
  138. package/docs/interfaces/ITransactionBase.html +199 -199
  139. package/docs/interfaces/ITransactionInput.html +179 -179
  140. package/docs/interfaces/ITransactionOutput.html +177 -177
  141. package/docs/interfaces/ITransactionReceipt.html +183 -183
  142. package/docs/interfaces/IUTXO.html +179 -179
  143. package/docs/interfaces/IUnwrapTransaction.html +223 -223
  144. package/docs/interfaces/IWBTCContract.html +209 -209
  145. package/docs/interfaces/IWrapTransaction.html +227 -227
  146. package/docs/interfaces/JSONRpc2Request.html +177 -177
  147. package/docs/interfaces/JSONRpc2ResponseError.html +177 -177
  148. package/docs/interfaces/JSONRpc2ResponseResult.html +177 -177
  149. package/docs/interfaces/JSONRpc2ResultData.html +173 -173
  150. package/docs/interfaces/JSONRpcErrorData.html +173 -173
  151. package/docs/interfaces/JSONRpcParams.html +173 -173
  152. package/docs/interfaces/JSONRpcResultError.html +176 -176
  153. package/docs/interfaces/MergedOP_20AndStackingContract.html +201 -201
  154. package/docs/interfaces/NetEventDocument.html +182 -182
  155. package/docs/interfaces/ParsedPartialWBTCUTXODocument.html +178 -178
  156. package/docs/interfaces/PartialWBTCUTXODocument.html +178 -178
  157. package/docs/interfaces/ReorgInformation.html +176 -176
  158. package/docs/interfaces/UsedUTXO.html +175 -175
  159. package/docs/modules.html +296 -296
  160. package/docs/types/BaseContractProperty.html +175 -175
  161. package/docs/types/BigNumberish.html +173 -173
  162. package/docs/types/BitcoinAddressLike.html +173 -173
  163. package/docs/types/BitcoinInterfaceAbi.html +173 -173
  164. package/docs/types/BlockHeaderChecksumProof.html +173 -173
  165. package/docs/types/BlockTag.html +173 -173
  166. package/docs/types/BlockWitnesses.html +173 -173
  167. package/docs/types/ContractDecodedObjectResult.html +173 -173
  168. package/docs/types/DecodedCallResult.html +173 -173
  169. package/docs/types/DecodedOutput.html +173 -173
  170. package/docs/types/GenerationParameters.html +173 -173
  171. package/docs/types/ICallResult.html +174 -174
  172. package/docs/types/ITransaction.html +174 -174
  173. package/docs/types/InteractionType.html +173 -173
  174. package/docs/types/JSONRpc2RequestParams.html +173 -173
  175. package/docs/types/JSONRpc2Result.html +173 -173
  176. package/docs/types/JSONRpcId.html +173 -173
  177. package/docs/types/JsonRpcCallResult.html +173 -173
  178. package/docs/types/JsonRpcError.html +173 -173
  179. package/docs/types/JsonRpcPayload.html +173 -173
  180. package/docs/types/JsonRpcResult.html +173 -173
  181. package/docs/types/Numeric.html +173 -173
  182. package/docs/types/PointerLike.html +173 -173
  183. package/docs/types/RawContractEvents.html +173 -173
  184. package/docs/types/UTXOs.html +175 -175
  185. package/docs/variables/MOTOSWAP_ROUTER_ABI.html +173 -173
  186. package/docs/variables/MOTO_TOKEN_ABI.html +173 -173
  187. package/docs/variables/MotoSwapFactoryAbi.html +173 -173
  188. package/docs/variables/MotoSwapFactoryEvents.html +173 -173
  189. package/docs/variables/MotoSwapPoolEvents.html +173 -173
  190. package/docs/variables/MotoswapPoolAbi.html +173 -173
  191. package/docs/variables/OP20Events.html +173 -173
  192. package/docs/variables/OP_20_ABI.html +173 -173
  193. package/docs/variables/OP_NET_ABI.html +173 -173
  194. package/docs/variables/STAKING_ABI.html +173 -173
  195. package/docs/variables/StackingEvents.html +173 -173
  196. package/docs/variables/WBTCEvents.html +173 -173
  197. package/docs/variables/WBTC_ABI.html +173 -173
  198. package/docs/variables/version.html +173 -173
  199. package/gulpfile.js +49 -120
  200. package/package.json +111 -109
  201. package/src/_version.ts +1 -1
  202. package/src/abi/shared/json/MOTOSWAP_POOL_ABI.ts +299 -299
  203. package/src/contracts/Contract.ts +600 -600
  204. package/src/crypto/crypto.ts +1 -1
  205. package/src/providers/AbstractRpcProvider.ts +602 -602
  206. package/src/providers/JSONRpcProvider.ts +81 -81
  207. package/src/serialize/BigInt.ts +15 -15
  208. package/tsconfig.base.json +43 -43
  209. package/tsconfig.json +15 -8
  210. package/tsconfig.webpack.json +19 -19
  211. package/.github/workflows/node.js.yml +0 -21
  212. package/.idea/bsc.iml +0 -14
  213. package/.idea/bsi-binary.iml +0 -14
  214. package/.idea/codeStyles/Project.xml +0 -101
  215. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  216. package/.idea/inspectionProfiles/Project_Default.xml +0 -7
  217. package/.idea/markdown.xml +0 -7
  218. package/.idea/modules.xml +0 -8
  219. package/.idea/motoswap.iml +0 -12
  220. package/.idea/opnet.iml +0 -17
  221. package/.idea/prettier.xml +0 -7
  222. package/.idea/vcs.xml +0 -6
  223. package/browser/crypto/crypto-browser.d.ts +0 -40
  224. package/browser/generator/WrappedGenerationParameters.d.ts +0 -9
  225. package/browser/scripts/ITestContract.d.ts +0 -22
  226. package/browser/scripts/block.d.ts +0 -1
  227. package/browser/scripts/test.d.ts +0 -1
  228. package/browser/scripts/testContract.d.ts +0 -1
  229. package/browser/scripts/testMethods.d.ts +0 -1
  230. package/browser/scripts/testMethodsReg.d.ts +0 -1
  231. package/browser/scripts/testWBTCContract.d.ts +0 -1
  232. package/browser/transactions/DeploymentTransaction.d.ts +0 -16
  233. package/browser/transactions/GenericTransaction.d.ts +0 -6
  234. package/browser/transactions/InteractionTransaction.d.ts +0 -15
  235. package/browser/transactions/TransactionInput.d.ts +0 -16
  236. package/browser/transactions/TransactionOutput.d.ts +0 -19
  237. package/browser/transactions/TransactionReceipt.d.ts +0 -11
  238. package/build/abi/BitcoinInterfaceAbi.d.ts +0 -3
  239. package/build/abi/BitcoinInterfaceAbi.js +0 -1
  240. package/build/abi/enums/ParamTypes.d.ts +0 -0
  241. package/build/abi/enums/ParamTypes.js +0 -1
  242. package/build/abi/interface/BitcoinInterface.d.ts +0 -6
  243. package/build/abi/interface/BitcoinInterface.js +0 -12
  244. package/build/abi/interface/BitcoinInterfaceAbi.d.ts +0 -3
  245. package/build/abi/interface/BitcoinInterfaceAbi.js +0 -1
  246. package/build/abi/interfaces/BaseContractProperty.d.ts +0 -2
  247. package/build/abi/interfaces/BaseContractProperty.js +0 -1
  248. package/build/abi/interfaces/BitcoinAbiInput.d.ts +0 -5
  249. package/build/abi/interfaces/BitcoinAbiInput.js +0 -1
  250. package/build/abi/shared/MOTOSWAP_FACTORY_ABI.d.ts +0 -2
  251. package/build/abi/shared/MOTOSWAP_FACTORY_ABI.js +0 -68
  252. package/build/abi/shared/OP_20_ABI.d.ts +0 -2
  253. package/build/abi/shared/OP_20_ABI.js +0 -235
  254. package/build/abi/shared/OP_NET_ABI.d.ts +0 -2
  255. package/build/abi/shared/OP_NET_ABI.js +0 -31
  256. package/build/abi/shared/STAKING_ABI.d.ts +0 -2
  257. package/build/abi/shared/STAKING_ABI.js +0 -96
  258. package/build/abi/shared/WBTC_ABI.d.ts +0 -2
  259. package/build/abi/shared/WBTC_ABI.js +0 -40
  260. package/build/bitcoin/UXTOs.d.ts +0 -7
  261. package/build/bitcoin/UXTOs.js +0 -1
  262. package/build/block/index.d.ts +0 -2
  263. package/build/block/index.js +0 -1
  264. package/build/contracts/DecodedEvent.d.ts +0 -15
  265. package/build/contracts/DecodedEvent.js +0 -18
  266. package/build/contracts/IRawContract.d.ts +0 -13
  267. package/build/contracts/IRawContract.js +0 -1
  268. package/build/crypto/crypto-browser.d.ts +0 -0
  269. package/build/crypto/crypto-browser.js +0 -47
  270. package/build/generator/WrappedGenerationParameters.d.ts +0 -9
  271. package/build/generator/WrappedGenerationParameters.js +0 -14
  272. package/build/interface/BitcoinInterface.d.ts +0 -6
  273. package/build/interface/BitcoinInterface.js +0 -12
  274. package/build/interface/BitcoinInterfaceAbi.d.ts +0 -3
  275. package/build/interface/BitcoinInterfaceAbi.js +0 -1
  276. package/build/interface/Interface.d.ts +0 -2
  277. package/build/interface/Interface.js +0 -2
  278. package/build/interface.d.ts +0 -0
  279. package/build/interface.js +0 -1
  280. package/build/interfaces/Block.d.ts +0 -0
  281. package/build/interfaces/Block.js +0 -1
  282. package/build/interfaces/IBlock.d.ts +0 -0
  283. package/build/interfaces/IBlock.js +0 -1
  284. package/build/interfaces/blocks/IBlock.d.ts +0 -28
  285. package/build/interfaces/blocks/IBlock.js +0 -1
  286. package/build/interfaces/transactions/ITransaction.d.ts +0 -39
  287. package/build/interfaces/transactions/ITransaction.js +0 -1
  288. package/build/providers/index.d.ts +0 -4
  289. package/build/providers/index.js +0 -4
  290. package/build/providers/interfaces/GenerateResult.d.ts +0 -0
  291. package/build/providers/interfaces/GenerateResult.js +0 -1
  292. package/build/scripts/ITestContract.d.ts +0 -18
  293. package/build/scripts/ITestContract.js +0 -1
  294. package/build/scripts/block.d.ts +0 -1
  295. package/build/scripts/block.js +0 -13
  296. package/build/scripts/test.d.ts +0 -1
  297. package/build/scripts/test.js +0 -24
  298. package/build/scripts/testContract.d.ts +0 -1
  299. package/build/scripts/testContract.js +0 -11
  300. package/build/scripts/testMethods.d.ts +0 -1
  301. package/build/scripts/testMethods.js +0 -11
  302. package/build/scripts/testMethodsReg.d.ts +0 -1
  303. package/build/scripts/testMethodsReg.js +0 -8
  304. package/build/scripts/testWBTCContract.d.ts +0 -1
  305. package/build/scripts/testWBTCContract.js +0 -11
  306. package/build/storage/interfaces/IStorage.d.ts +0 -7
  307. package/build/storage/interfaces/IStorage.js +0 -1
  308. package/build/transactions/DeploymentTransaction.d.ts +0 -16
  309. package/build/transactions/DeploymentTransaction.js +0 -24
  310. package/build/transactions/GenericTransaction.d.ts +0 -6
  311. package/build/transactions/GenericTransaction.js +0 -6
  312. package/build/transactions/InteractionTransaction.d.ts +0 -15
  313. package/build/transactions/InteractionTransaction.js +0 -21
  314. package/build/transactions/TransactionInput.d.ts +0 -16
  315. package/build/transactions/TransactionInput.js +0 -14
  316. package/build/transactions/TransactionOutput.d.ts +0 -19
  317. package/build/transactions/TransactionOutput.js +0 -16
  318. package/build/transactions/TransactionReceipt.d.ts +0 -11
  319. package/build/transactions/TransactionReceipt.js +0 -53
  320. package/build/transactions/decoders/WrapInteractionTransaction.d.ts +0 -15
  321. package/build/transactions/decoders/WrapInteractionTransaction.js +0 -21
  322. package/build/transactions/index.d.ts +0 -6
  323. package/build/transactions/index.js +0 -6
  324. package/build/transactions/interfaces/IWrapTransaction.d.ts +0 -3
  325. package/build/transactions/interfaces/IWrapTransaction.js +0 -1
  326. package/build/transactions/types/DeploymentTransaction.d.ts +0 -16
  327. package/build/transactions/types/DeploymentTransaction.js +0 -24
  328. package/build/transactions/types/GenericTransaction.d.ts +0 -6
  329. package/build/transactions/types/GenericTransaction.js +0 -6
  330. package/build/transactions/types/InteractionTransaction.d.ts +0 -15
  331. package/build/transactions/types/InteractionTransaction.js +0 -21
  332. package/cjs/_version.d.ts +0 -1
  333. package/cjs/_version.js +0 -4
  334. package/cjs/abi/BaseContractProperty.d.ts +0 -3
  335. package/cjs/abi/BaseContractProperty.js +0 -2
  336. package/cjs/abi/BitcoinAbiTypes.d.ts +0 -4
  337. package/cjs/abi/BitcoinAbiTypes.js +0 -8
  338. package/cjs/abi/BitcoinInterface.d.ts +0 -10
  339. package/cjs/abi/BitcoinInterface.js +0 -60
  340. package/cjs/abi/interfaces/BaseContractProperties.d.ts +0 -5
  341. package/cjs/abi/interfaces/BaseContractProperties.js +0 -2
  342. package/cjs/abi/interfaces/BitcoinAbiValue.d.ts +0 -5
  343. package/cjs/abi/interfaces/BitcoinAbiValue.js +0 -2
  344. package/cjs/abi/interfaces/BitcoinInterfaceAbi.d.ts +0 -16
  345. package/cjs/abi/interfaces/BitcoinInterfaceAbi.js +0 -2
  346. package/cjs/abi/shared/interfaces/IMotoContract.d.ts +0 -6
  347. package/cjs/abi/shared/interfaces/IMotoContract.js +0 -2
  348. package/cjs/abi/shared/interfaces/IMotoswapFactoryContract.d.ts +0 -7
  349. package/cjs/abi/shared/interfaces/IMotoswapFactoryContract.js +0 -2
  350. package/cjs/abi/shared/interfaces/IMotoswapPoolContract.d.ts +0 -13
  351. package/cjs/abi/shared/interfaces/IMotoswapPoolContract.js +0 -2
  352. package/cjs/abi/shared/interfaces/IMotoswapRouterContract.d.ts +0 -15
  353. package/cjs/abi/shared/interfaces/IMotoswapRouterContract.js +0 -2
  354. package/cjs/abi/shared/interfaces/IOP_20Contract.d.ts +0 -16
  355. package/cjs/abi/shared/interfaces/IOP_20Contract.js +0 -2
  356. package/cjs/abi/shared/interfaces/IOP_NETContract.d.ts +0 -7
  357. package/cjs/abi/shared/interfaces/IOP_NETContract.js +0 -2
  358. package/cjs/abi/shared/interfaces/IStackingContract.d.ts +0 -11
  359. package/cjs/abi/shared/interfaces/IStackingContract.js +0 -2
  360. package/cjs/abi/shared/interfaces/IWBTCContract.d.ts +0 -8
  361. package/cjs/abi/shared/interfaces/IWBTCContract.js +0 -2
  362. package/cjs/abi/shared/json/MOTOSWAP_FACTORY_ABI.d.ts +0 -3
  363. package/cjs/abi/shared/json/MOTOSWAP_FACTORY_ABI.js +0 -74
  364. package/cjs/abi/shared/json/MOTOSWAP_POOL_ABI.d.ts +0 -3
  365. package/cjs/abi/shared/json/MOTOSWAP_POOL_ABI.js +0 -280
  366. package/cjs/abi/shared/json/MOTOSWAP_ROUTER_ABI.d.ts +0 -2
  367. package/cjs/abi/shared/json/MOTOSWAP_ROUTER_ABI.js +0 -277
  368. package/cjs/abi/shared/json/MOTO_TOKEN_ABI.d.ts +0 -2
  369. package/cjs/abi/shared/json/MOTO_TOKEN_ABI.js +0 -25
  370. package/cjs/abi/shared/json/OP_20_ABI.d.ts +0 -3
  371. package/cjs/abi/shared/json/OP_20_ABI.js +0 -270
  372. package/cjs/abi/shared/json/OP_NET_ABI.d.ts +0 -2
  373. package/cjs/abi/shared/json/OP_NET_ABI.js +0 -34
  374. package/cjs/abi/shared/json/STAKING_ABI.d.ts +0 -3
  375. package/cjs/abi/shared/json/STAKING_ABI.js +0 -132
  376. package/cjs/abi/shared/json/WBTC_ABI.d.ts +0 -3
  377. package/cjs/abi/shared/json/WBTC_ABI.js +0 -60
  378. package/cjs/bitcoin/BitcoinAddress.d.ts +0 -20
  379. package/cjs/bitcoin/BitcoinAddress.js +0 -116
  380. package/cjs/bitcoin/UTXOs.d.ts +0 -10
  381. package/cjs/bitcoin/UTXOs.js +0 -16
  382. package/cjs/bitcoin/interfaces/IUTXO.d.ts +0 -7
  383. package/cjs/bitcoin/interfaces/IUTXO.js +0 -2
  384. package/cjs/block/Block.d.ts +0 -26
  385. package/cjs/block/Block.js +0 -47
  386. package/cjs/block/interfaces/BlockWitness.d.ts +0 -11
  387. package/cjs/block/interfaces/BlockWitness.js +0 -2
  388. package/cjs/block/interfaces/IBlock.d.ts +0 -28
  389. package/cjs/block/interfaces/IBlock.js +0 -2
  390. package/cjs/common/CommonTypes.d.ts +0 -8
  391. package/cjs/common/CommonTypes.js +0 -2
  392. package/cjs/contracts/CallResult.d.ts +0 -19
  393. package/cjs/contracts/CallResult.js +0 -35
  394. package/cjs/contracts/Contract.d.ts +0 -44
  395. package/cjs/contracts/Contract.js +0 -398
  396. package/cjs/contracts/ContractData.d.ts +0 -17
  397. package/cjs/contracts/ContractData.js +0 -38
  398. package/cjs/contracts/OPNetEvent.d.ts +0 -15
  399. package/cjs/contracts/OPNetEvent.js +0 -22
  400. package/cjs/contracts/interfaces/IAccessList.d.ts +0 -6
  401. package/cjs/contracts/interfaces/IAccessList.js +0 -2
  402. package/cjs/contracts/interfaces/ICallResult.d.ts +0 -12
  403. package/cjs/contracts/interfaces/ICallResult.js +0 -2
  404. package/cjs/contracts/interfaces/IContract.d.ts +0 -12
  405. package/cjs/contracts/interfaces/IContract.js +0 -2
  406. package/cjs/contracts/interfaces/IRawContract.d.ts +0 -15
  407. package/cjs/contracts/interfaces/IRawContract.js +0 -2
  408. package/cjs/crypto/crypto.d.ts +0 -2
  409. package/cjs/crypto/crypto.js +0 -8
  410. package/cjs/index.d.ts +0 -3
  411. package/cjs/index.js +0 -32
  412. package/cjs/interfaces/opnet/OPNetTransactionTypes.d.ts +0 -8
  413. package/cjs/interfaces/opnet/OPNetTransactionTypes.js +0 -11
  414. package/cjs/opnet.d.ts +0 -70
  415. package/cjs/opnet.js +0 -89
  416. package/cjs/providers/AbstractRpcProvider.d.ts +0 -48
  417. package/cjs/providers/AbstractRpcProvider.js +0 -277
  418. package/cjs/providers/JSONRpcProvider.d.ts +0 -10
  419. package/cjs/providers/JSONRpcProvider.js +0 -59
  420. package/cjs/providers/WebsocketRpcProvider.d.ts +0 -9
  421. package/cjs/providers/WebsocketRpcProvider.js +0 -27
  422. package/cjs/providers/interfaces/Generate.d.ts +0 -5
  423. package/cjs/providers/interfaces/Generate.js +0 -7
  424. package/cjs/providers/interfaces/JSONRpc.d.ts +0 -11
  425. package/cjs/providers/interfaces/JSONRpc.js +0 -2
  426. package/cjs/providers/interfaces/JSONRpcMethods.d.ts +0 -17
  427. package/cjs/providers/interfaces/JSONRpcMethods.js +0 -21
  428. package/cjs/providers/interfaces/JSONRpcParams.d.ts +0 -3
  429. package/cjs/providers/interfaces/JSONRpcParams.js +0 -2
  430. package/cjs/providers/interfaces/JSONRpcResult.d.ts +0 -51
  431. package/cjs/providers/interfaces/JSONRpcResult.js +0 -29
  432. package/cjs/providers/interfaces/ReorgInformation.d.ts +0 -5
  433. package/cjs/providers/interfaces/ReorgInformation.js +0 -2
  434. package/cjs/serialize/BigInt.d.ts +0 -6
  435. package/cjs/serialize/BigInt.js +0 -5
  436. package/cjs/storage/StoredValue.d.ts +0 -10
  437. package/cjs/storage/StoredValue.js +0 -28
  438. package/cjs/storage/interfaces/IStorageValue.d.ts +0 -8
  439. package/cjs/storage/interfaces/IStorageValue.js +0 -2
  440. package/cjs/transactions/Transaction.d.ts +0 -17
  441. package/cjs/transactions/Transaction.js +0 -33
  442. package/cjs/transactions/TransactionParser.d.ts +0 -7
  443. package/cjs/transactions/TransactionParser.js +0 -43
  444. package/cjs/transactions/decoders/DeploymentTransaction.d.ts +0 -17
  445. package/cjs/transactions/decoders/DeploymentTransaction.js +0 -30
  446. package/cjs/transactions/decoders/GenericTransaction.d.ts +0 -6
  447. package/cjs/transactions/decoders/GenericTransaction.js +0 -10
  448. package/cjs/transactions/decoders/InteractionTransaction.d.ts +0 -15
  449. package/cjs/transactions/decoders/InteractionTransaction.js +0 -25
  450. package/cjs/transactions/decoders/UnwrapTransaction.d.ts +0 -11
  451. package/cjs/transactions/decoders/UnwrapTransaction.js +0 -33
  452. package/cjs/transactions/decoders/WrapTransaction.d.ts +0 -15
  453. package/cjs/transactions/decoders/WrapTransaction.js +0 -34
  454. package/cjs/transactions/interfaces/BroadcastedTransaction.d.ts +0 -7
  455. package/cjs/transactions/interfaces/BroadcastedTransaction.js +0 -2
  456. package/cjs/transactions/interfaces/ITransaction.d.ts +0 -23
  457. package/cjs/transactions/interfaces/ITransaction.js +0 -2
  458. package/cjs/transactions/interfaces/ITransactionReceipt.d.ts +0 -21
  459. package/cjs/transactions/interfaces/ITransactionReceipt.js +0 -2
  460. package/cjs/transactions/interfaces/transactions/ICommonTransaction.d.ts +0 -7
  461. package/cjs/transactions/interfaces/transactions/ICommonTransaction.js +0 -2
  462. package/cjs/transactions/interfaces/transactions/IDeploymentTransaction.d.ts +0 -13
  463. package/cjs/transactions/interfaces/transactions/IDeploymentTransaction.js +0 -2
  464. package/cjs/transactions/interfaces/transactions/IInteractionTransaction.d.ts +0 -14
  465. package/cjs/transactions/interfaces/transactions/IInteractionTransaction.js +0 -2
  466. package/cjs/transactions/interfaces/transactions/IUnwrapTransaction.d.ts +0 -28
  467. package/cjs/transactions/interfaces/transactions/IUnwrapTransaction.js +0 -2
  468. package/cjs/transactions/interfaces/transactions/IWrapTransaction.d.ts +0 -10
  469. package/cjs/transactions/interfaces/transactions/IWrapTransaction.js +0 -2
  470. package/cjs/transactions/metadata/TransactionInput.d.ts +0 -16
  471. package/cjs/transactions/metadata/TransactionInput.js +0 -18
  472. package/cjs/transactions/metadata/TransactionOutput.d.ts +0 -19
  473. package/cjs/transactions/metadata/TransactionOutput.js +0 -20
  474. package/cjs/transactions/metadata/TransactionReceipt.d.ts +0 -11
  475. package/cjs/transactions/metadata/TransactionReceipt.js +0 -57
  476. package/cjs/utils/BitcoinUtils.d.ts +0 -4
  477. package/cjs/utils/BitcoinUtils.js +0 -14
  478. package/tsconfig.cjs.json +0 -9
@@ -1,48 +1,47 @@
1
- /// <reference types="node" />
2
- import '../serialize/BigInt.js';
3
- import { WrappedGeneration } from '@btc-vision/transaction';
4
- import { Network } from 'bitcoinjs-lib';
5
- import { Block } from '../block/Block.js';
6
- import { BlockWitnesses } from '../block/interfaces/BlockWitness.js';
7
- import { BigNumberish, BitcoinAddressLike, BlockTag } from '../common/CommonTypes.js';
8
- import { CallResult } from '../contracts/CallResult.js';
9
- import { ContractData } from '../contracts/ContractData.js';
10
- import { ICallRequestError } from '../contracts/interfaces/ICallResult.js';
11
- import { OPNetTransactionTypes } from '../interfaces/opnet/OPNetTransactionTypes.js';
12
- import { StoredValue } from '../storage/StoredValue.js';
13
- import { BroadcastedTransaction } from '../transactions/interfaces/BroadcastedTransaction.js';
14
- import { TransactionReceipt } from '../transactions/metadata/TransactionReceipt.js';
15
- import { TransactionBase } from '../transactions/Transaction.js';
16
- import { JsonRpcPayload } from './interfaces/JSONRpc.js';
17
- import { JsonRpcCallResult, JsonRpcResult } from './interfaces/JSONRpcResult.js';
18
- import { ReorgInformation } from './interfaces/ReorgInformation.js';
19
- export declare abstract class AbstractRpcProvider {
20
- private nextId;
21
- private network;
22
- private chainId;
23
- protected constructor();
24
- getBlockNumber(): Promise<bigint>;
25
- getBlock(blockNumberOrHash: BlockTag, prefetchTxs?: boolean): Promise<Block>;
26
- getBlocks(blockNumbers: BlockTag[], prefetchTxs?: boolean): Promise<Block[]>;
27
- getBlockByHash(blockHash: string): Promise<Block>;
28
- getBalance(addressLike: BitcoinAddressLike, filterOrdinals?: boolean): Promise<bigint>;
29
- getUXTOs(address: BitcoinAddressLike, optimize?: boolean): Promise<unknown>;
30
- getTransaction(txHash: string): Promise<TransactionBase<OPNetTransactionTypes>>;
31
- getTransactionReceipt(txHash: string): Promise<TransactionReceipt>;
32
- getNetwork(): Promise<Network>;
33
- getChainId(): Promise<bigint>;
34
- getCode(address: BitcoinAddressLike, onlyBytecode?: boolean): Promise<ContractData | Buffer>;
35
- getStorageAt(address: BitcoinAddressLike, rawPointer: bigint | string, proofs?: boolean, height?: BigNumberish): Promise<StoredValue>;
36
- call(to: BitcoinAddressLike, data: Buffer | string, from?: BitcoinAddressLike, height?: BigNumberish): Promise<CallResult | ICallRequestError>;
37
- sendRawTransaction(tx: string, psbt: boolean): Promise<BroadcastedTransaction>;
38
- getBlockWitness(height?: BigNumberish | -1, trusted?: boolean, limit?: number, page?: number): Promise<BlockWitnesses>;
39
- getReorg(fromBlock?: BigNumberish, toBlock?: BigNumberish): Promise<ReorgInformation[]>;
40
- requestTrustedPublicKeyForBitcoinWrapping(amount: BigNumberish): Promise<WrappedGeneration>;
41
- abstract _send(payload: JsonRpcPayload | JsonRpcPayload[]): Promise<JsonRpcCallResult>;
42
- callPayloadSingle(payload: JsonRpcPayload): Promise<JsonRpcResult>;
43
- callMultiplePayloads(payloads: JsonRpcPayload[]): Promise<JsonRpcCallResult>;
44
- protected abstract providerUrl(url: string): string;
45
- private bufferToHex;
46
- private bigintToBase64;
47
- private buildJsonRpcPayload;
48
- }
1
+ import '../serialize/BigInt.js';
2
+ import { WrappedGeneration } from '@btc-vision/transaction';
3
+ import { Network } from 'bitcoinjs-lib';
4
+ import { Block } from '../block/Block.js';
5
+ import { BlockWitnesses } from '../block/interfaces/BlockWitness.js';
6
+ import { BigNumberish, BitcoinAddressLike, BlockTag } from '../common/CommonTypes.js';
7
+ import { CallResult } from '../contracts/CallResult.js';
8
+ import { ContractData } from '../contracts/ContractData.js';
9
+ import { ICallRequestError } from '../contracts/interfaces/ICallResult.js';
10
+ import { OPNetTransactionTypes } from '../interfaces/opnet/OPNetTransactionTypes.js';
11
+ import { StoredValue } from '../storage/StoredValue.js';
12
+ import { BroadcastedTransaction } from '../transactions/interfaces/BroadcastedTransaction.js';
13
+ import { TransactionReceipt } from '../transactions/metadata/TransactionReceipt.js';
14
+ import { TransactionBase } from '../transactions/Transaction.js';
15
+ import { JsonRpcPayload } from './interfaces/JSONRpc.js';
16
+ import { JsonRpcCallResult, JsonRpcResult } from './interfaces/JSONRpcResult.js';
17
+ import { ReorgInformation } from './interfaces/ReorgInformation.js';
18
+ export declare abstract class AbstractRpcProvider {
19
+ private nextId;
20
+ private network;
21
+ private chainId;
22
+ protected constructor();
23
+ getBlockNumber(): Promise<bigint>;
24
+ getBlock(blockNumberOrHash: BlockTag, prefetchTxs?: boolean): Promise<Block>;
25
+ getBlocks(blockNumbers: BlockTag[], prefetchTxs?: boolean): Promise<Block[]>;
26
+ getBlockByHash(blockHash: string): Promise<Block>;
27
+ getBalance(addressLike: BitcoinAddressLike, filterOrdinals?: boolean): Promise<bigint>;
28
+ getUXTOs(address: BitcoinAddressLike, optimize?: boolean): Promise<unknown>;
29
+ getTransaction(txHash: string): Promise<TransactionBase<OPNetTransactionTypes>>;
30
+ getTransactionReceipt(txHash: string): Promise<TransactionReceipt>;
31
+ getNetwork(): Promise<Network>;
32
+ getChainId(): Promise<bigint>;
33
+ getCode(address: BitcoinAddressLike, onlyBytecode?: boolean): Promise<ContractData | Buffer>;
34
+ getStorageAt(address: BitcoinAddressLike, rawPointer: bigint | string, proofs?: boolean, height?: BigNumberish): Promise<StoredValue>;
35
+ call(to: BitcoinAddressLike, data: Buffer | string, from?: BitcoinAddressLike, height?: BigNumberish): Promise<CallResult | ICallRequestError>;
36
+ sendRawTransaction(tx: string, psbt: boolean): Promise<BroadcastedTransaction>;
37
+ getBlockWitness(height?: BigNumberish | -1, trusted?: boolean, limit?: number, page?: number): Promise<BlockWitnesses>;
38
+ getReorg(fromBlock?: BigNumberish, toBlock?: BigNumberish): Promise<ReorgInformation[]>;
39
+ requestTrustedPublicKeyForBitcoinWrapping(amount: BigNumberish): Promise<WrappedGeneration>;
40
+ abstract _send(payload: JsonRpcPayload | JsonRpcPayload[]): Promise<JsonRpcCallResult>;
41
+ callPayloadSingle(payload: JsonRpcPayload): Promise<JsonRpcResult>;
42
+ callMultiplePayloads(payloads: JsonRpcPayload[]): Promise<JsonRpcCallResult>;
43
+ protected abstract providerUrl(url: string): string;
44
+ private bufferToHex;
45
+ private bigintToBase64;
46
+ private buildJsonRpcPayload;
47
+ }
@@ -1,10 +1,10 @@
1
- import { AbstractRpcProvider } from './AbstractRpcProvider.js';
2
- import { JsonRpcPayload } from './interfaces/JSONRpc.js';
3
- import { JsonRpcCallResult } from './interfaces/JSONRpcResult.js';
4
- export declare class JSONRpcProvider extends AbstractRpcProvider {
5
- private readonly timeout;
6
- private readonly url;
7
- constructor(url: string, timeout?: number);
8
- _send(payload: JsonRpcPayload | JsonRpcPayload[]): Promise<JsonRpcCallResult>;
9
- protected providerUrl(url: string): string;
10
- }
1
+ import { AbstractRpcProvider } from './AbstractRpcProvider.js';
2
+ import { JsonRpcPayload } from './interfaces/JSONRpc.js';
3
+ import { JsonRpcCallResult } from './interfaces/JSONRpcResult.js';
4
+ export declare class JSONRpcProvider extends AbstractRpcProvider {
5
+ private readonly timeout;
6
+ private readonly url;
7
+ constructor(url: string, timeout?: number);
8
+ _send(payload: JsonRpcPayload | JsonRpcPayload[]): Promise<JsonRpcCallResult>;
9
+ protected providerUrl(url: string): string;
10
+ }
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { IStorageValue } from './interfaces/IStorageValue.js';
3
2
  export declare class StoredValue implements IStorageValue {
4
3
  readonly pointer: bigint;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { BigNumberish, PointerLike } from '../../common/CommonTypes.js';
3
2
  export interface IStorageValue {
4
3
  readonly pointer: PointerLike;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { OPNetTransactionTypes } from '../../interfaces/opnet/OPNetTransactionTypes.js';
3
2
  import { IDeploymentTransaction } from '../interfaces/transactions/IDeploymentTransaction.js';
4
3
  import { TransactionBase } from '../Transaction.js';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Buffer } from 'buffer';
3
2
  import { InteractionType } from '../../interfaces/opnet/OPNetTransactionTypes.js';
4
3
  import { IInteractionTransaction } from '../interfaces/transactions/IInteractionTransaction.js';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { BigNumberish } from '../../common/CommonTypes.js';
3
2
  import { OPNetTransactionTypes } from '../../interfaces/opnet/OPNetTransactionTypes.js';
4
3
  import { ITransactionInput, TransactionInput } from '../metadata/TransactionInput.js';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { NetEvent } from '@btc-vision/bsi-binary';
3
2
  export interface NetEventDocument {
4
3
  readonly contractAddress: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { OPNetTransactionTypes } from '../../../interfaces/opnet/OPNetTransactionTypes.js';
3
2
  import { ICommonTransaction } from './ICommonTransaction.js';
4
3
  export interface IDeploymentTransaction extends ICommonTransaction<OPNetTransactionTypes.Deployment> {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { InteractionType } from '../../../interfaces/opnet/OPNetTransactionTypes.js';
3
2
  import { ContractEvents } from '../ITransactionReceipt.js';
4
3
  import { ICommonTransaction } from './ICommonTransaction.js';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Address } from '@btc-vision/bsi-binary';
3
2
  import { IInteractionTransaction } from './IInteractionTransaction.js';
4
3
  export interface UsedUTXO {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { ScriptPubKey } from '@btc-vision/bsi-bitcoin-rpc';
3
2
  export interface ITransactionOutput {
4
3
  readonly index: number;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { ContractEvents, ITransactionReceipt } from '../interfaces/ITransactionReceipt.js';
3
2
  export declare class TransactionReceipt implements ITransactionReceipt {
4
3
  readonly receipt?: Buffer;
@@ -1,6 +1,5 @@
1
1
  import { BitcoinAbiTypes } from './BitcoinAbiTypes.js';
2
2
  export class BitcoinInterface {
3
- abi;
4
3
  constructor(abi) {
5
4
  this.verifyAbi(abi);
6
5
  this.abi = abi;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Network } from 'bitcoinjs-lib';
3
2
  import { ECPairInterface } from 'ecpair';
4
3
  import { BitcoinAddressLike } from '../common/CommonTypes.js';
@@ -1,42 +1,53 @@
1
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
+ if (kind === "m") throw new TypeError("Private method is not writable");
3
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
+ };
7
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
+ };
12
+ var _BitcoinAddress_keyPair, _BitcoinAddress_taprootAddress, _BitcoinAddress_p2wpkhAddress;
1
13
  import * as ecc from '@bitcoinerlab/secp256k1';
2
14
  import { address, initEccLib, networks, payments } from 'bitcoinjs-lib';
3
15
  import { ECPairFactory } from 'ecpair';
4
16
  initEccLib(ecc);
5
17
  const ECPair = ECPairFactory(ecc);
6
18
  export class BitcoinAddress {
7
- #keyPair;
8
- #taprootAddress;
9
- #p2wpkhAddress;
10
- network;
11
19
  constructor(keypair, network = networks.bitcoin) {
12
- this.#keyPair = keypair;
20
+ _BitcoinAddress_keyPair.set(this, void 0);
21
+ _BitcoinAddress_taprootAddress.set(this, void 0);
22
+ _BitcoinAddress_p2wpkhAddress.set(this, void 0);
23
+ __classPrivateFieldSet(this, _BitcoinAddress_keyPair, keypair, "f");
13
24
  this.network = network;
14
- this.#taprootAddress = this.getTaprootAddress();
15
- this.#p2wpkhAddress = this.getP2WPKHAddress();
25
+ __classPrivateFieldSet(this, _BitcoinAddress_taprootAddress, this.getTaprootAddress(), "f");
26
+ __classPrivateFieldSet(this, _BitcoinAddress_p2wpkhAddress, this.getP2WPKHAddress(), "f");
16
27
  }
17
28
  get taprootAddress() {
18
- if (!this.#taprootAddress) {
29
+ if (!__classPrivateFieldGet(this, _BitcoinAddress_taprootAddress, "f")) {
19
30
  throw new Error('Address not set');
20
31
  }
21
- return this.#taprootAddress;
32
+ return __classPrivateFieldGet(this, _BitcoinAddress_taprootAddress, "f");
22
33
  }
23
34
  get p2wpkhAddress() {
24
- if (!this.#p2wpkhAddress) {
35
+ if (!__classPrivateFieldGet(this, _BitcoinAddress_p2wpkhAddress, "f")) {
25
36
  throw new Error('Address not set');
26
37
  }
27
- return this.#p2wpkhAddress;
38
+ return __classPrivateFieldGet(this, _BitcoinAddress_p2wpkhAddress, "f");
28
39
  }
29
40
  get publicKey() {
30
- if (!this.#keyPair) {
41
+ if (!__classPrivateFieldGet(this, _BitcoinAddress_keyPair, "f")) {
31
42
  throw new Error('KeyPair not set');
32
43
  }
33
- return this.#keyPair.publicKey;
44
+ return __classPrivateFieldGet(this, _BitcoinAddress_keyPair, "f").publicKey;
34
45
  }
35
46
  get privateKey() {
36
- if (!this.#keyPair) {
47
+ if (!__classPrivateFieldGet(this, _BitcoinAddress_keyPair, "f")) {
37
48
  throw new Error('KeyPair not set');
38
49
  }
39
- return this.#keyPair.privateKey;
50
+ return __classPrivateFieldGet(this, _BitcoinAddress_keyPair, "f").privateKey;
40
51
  }
41
52
  static isValidTaprootAddress(_addr, network = networks.bitcoin) {
42
53
  try {
@@ -65,21 +76,21 @@ export class BitcoinAddress {
65
76
  const keyPair = ECPair.fromWIF(wif, network);
66
77
  return new BitcoinAddress(keyPair, network);
67
78
  }
68
- [Symbol.toStringTag]() {
79
+ [(_BitcoinAddress_keyPair = new WeakMap(), _BitcoinAddress_taprootAddress = new WeakMap(), _BitcoinAddress_p2wpkhAddress = new WeakMap(), Symbol.toStringTag)]() {
69
80
  return this.taprootAddress;
70
81
  }
71
82
  getP2WPKHAddress() {
72
- const res = payments.p2wpkh({ pubkey: this.#keyPair.publicKey, network: this.network });
83
+ const res = payments.p2wpkh({ pubkey: __classPrivateFieldGet(this, _BitcoinAddress_keyPair, "f").publicKey, network: this.network });
73
84
  if (!res.address) {
74
85
  throw new Error('Failed to generate wallet');
75
86
  }
76
87
  return res.address;
77
88
  }
78
89
  getTaprootAddress() {
79
- if (!this.#keyPair) {
90
+ if (!__classPrivateFieldGet(this, _BitcoinAddress_keyPair, "f")) {
80
91
  throw new Error('KeyPair not set');
81
92
  }
82
- const myXOnlyPubkey = this.#keyPair.publicKey.slice(1, 33);
93
+ const myXOnlyPubkey = __classPrivateFieldGet(this, _BitcoinAddress_keyPair, "f").publicKey.slice(1, 33);
83
94
  const output = Buffer.concat([
84
95
  Buffer.from([0x51, 0x20]),
85
96
  myXOnlyPubkey,
@@ -1,8 +1,4 @@
1
1
  export class UTXO {
2
- transactionId;
3
- outputIndex;
4
- value;
5
- scriptPubKey;
6
2
  constructor(iUTXO) {
7
3
  this.transactionId = iUTXO.transactionId;
8
4
  this.outputIndex = iUTXO.outputIndex;
@@ -1,25 +1,7 @@
1
1
  import { TransactionParser } from '../transactions/TransactionParser.js';
2
2
  export class Block {
3
- height;
4
- hash;
5
- previousBlockHash;
6
- previousBlockChecksum;
7
- bits;
8
- nonce;
9
- version;
10
- size;
11
- txCount;
12
- weight;
13
- strippedSize;
14
- time;
15
- medianTime;
16
- checksumRoot;
17
- merkleRoot;
18
- storageRoot;
19
- receiptRoot;
20
- checksumProofs;
21
- transactions = [];
22
3
  constructor(block) {
4
+ this.transactions = [];
23
5
  this.height = BigInt(block.height.toString());
24
6
  this.hash = block.hash;
25
7
  this.previousBlockHash = block.previousBlockHash;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { BinaryReader, NetEvent } from '@btc-vision/bsi-binary';
3
2
  import { DecodedCallResult } from '../common/CommonTypes.js';
4
3
  import { ContractDecodedObjectResult, DecodedOutput } from './Contract.js';
@@ -1,13 +1,8 @@
1
1
  import { BinaryReader, BufferHelper } from '@btc-vision/bsi-binary';
2
2
  export class CallResult {
3
- result;
4
- events;
5
- accessList;
6
- calldata;
7
- estimatedGas;
8
- decoded = [];
9
- properties = {};
10
3
  constructor(callResult) {
4
+ this.decoded = [];
5
+ this.properties = {};
11
6
  this.events = callResult.events;
12
7
  this.accessList = callResult.accessList;
13
8
  if (callResult.estimatedGas) {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Address, NetEvent } from '@btc-vision/bsi-binary';
3
2
  import { BaseContractProperty } from '../abi/BaseContractProperty.js';
4
3
  import { BitcoinInterface } from '../abi/BitcoinInterface.js';
@@ -5,13 +5,8 @@ import { OPNetEvent } from './OPNetEvent.js';
5
5
  const internal = Symbol.for('_btc_internal');
6
6
  const bitcoinAbiCoder = new ABICoder();
7
7
  export class IBaseContract {
8
- address;
9
- interface;
10
- provider;
11
- from;
12
- [internal];
13
- events = new Map();
14
8
  constructor(address, abi, provider, from) {
9
+ this.events = new Map();
15
10
  this.address = address;
16
11
  this.provider = provider;
17
12
  this.interface = BitcoinInterface.from(abi);
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Address } from '@btc-vision/bsi-binary';
3
2
  import { IRawContract } from './interfaces/IRawContract.js';
4
3
  export declare class ContractData implements IRawContract {
@@ -1,15 +1,4 @@
1
1
  export class ContractData {
2
- contractAddress;
3
- virtualAddress;
4
- p2trAddress;
5
- bytecode;
6
- wasCompressed;
7
- deployedTransactionId;
8
- deployedTransactionHash;
9
- deployerPubKey;
10
- contractSeed;
11
- contractSaltHash;
12
- deployerAddress;
13
2
  constructor(raw) {
14
3
  this.contractAddress = raw.contractAddress;
15
4
  this.virtualAddress = raw.virtualAddress;
@@ -1,15 +1,12 @@
1
1
  import { NetEvent } from '@btc-vision/bsi-binary';
2
2
  export class OPNetEvent extends NetEvent {
3
- eventType;
4
- eventDataSelector;
5
- eventData;
6
- properties = {};
7
- values = [];
8
3
  constructor(eventType, eventDataSelector, eventData) {
9
4
  super(eventType, eventDataSelector, eventData);
10
5
  this.eventType = eventType;
11
6
  this.eventDataSelector = eventDataSelector;
12
7
  this.eventData = eventData;
8
+ this.properties = {};
9
+ this.values = [];
13
10
  }
14
11
  setDecoded(decoded) {
15
12
  this.properties = Object.freeze(decoded.obj);
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { NetEvent } from '@btc-vision/bsi-binary';
3
2
  import { BitcoinAddressLike } from '../../common/CommonTypes.js';
4
3
  import { ContractEvents } from '../../transactions/interfaces/ITransactionReceipt.js';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Address } from '@btc-vision/bsi-binary';
3
2
  export interface IRawContract {
4
3
  readonly contractAddress: Address;
@@ -1,2 +1 @@
1
- /// <reference types="node" />
2
1
  export { createHash, createHmac, pbkdf2Sync, randomBytes } from 'crypto';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import '../serialize/BigInt.js';
3
2
  import { WrappedGeneration } from '@btc-vision/transaction';
4
3
  import { Network } from 'bitcoinjs-lib';
@@ -12,10 +12,9 @@ import { TransactionParser } from '../transactions/TransactionParser.js';
12
12
  import { GenerateTarget } from './interfaces/Generate.js';
13
13
  import { JSONRpcMethods } from './interfaces/JSONRpcMethods.js';
14
14
  export class AbstractRpcProvider {
15
- nextId = 0;
16
- network;
17
- chainId;
18
- constructor() { }
15
+ constructor() {
16
+ this.nextId = 0;
17
+ }
19
18
  async getBlockNumber() {
20
19
  const payload = this.buildJsonRpcPayload(JSONRpcMethods.BLOCK_BY_NUMBER, []);
21
20
  const rawBlockNumber = await this.callPayloadSingle(payload);
@@ -1,8 +1,6 @@
1
1
  import { AbstractRpcProvider } from './AbstractRpcProvider.js';
2
2
  export class JSONRpcProvider extends AbstractRpcProvider {
3
- timeout;
4
- url;
5
- constructor(url, timeout = 10_000) {
3
+ constructor(url, timeout = 10000) {
6
4
  super();
7
5
  this.timeout = timeout;
8
6
  this.url = this.providerUrl(url);
@@ -1,6 +1,5 @@
1
1
  import { AbstractRpcProvider } from './AbstractRpcProvider.js';
2
2
  export class WebSocketRpcProvider extends AbstractRpcProvider {
3
- wsUrl;
4
3
  constructor(url) {
5
4
  super();
6
5
  this.wsUrl = this.providerUrl(url);
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { IStorageValue } from './interfaces/IStorageValue.js';
3
2
  export declare class StoredValue implements IStorageValue {
4
3
  readonly pointer: bigint;
@@ -1,9 +1,5 @@
1
1
  import { BufferHelper } from '@btc-vision/bsi-binary';
2
2
  export class StoredValue {
3
- pointer;
4
- value;
5
- height;
6
- proofs;
7
3
  constructor(iStoredValue) {
8
4
  this.pointer =
9
5
  typeof iStoredValue.pointer === 'string'
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { BigNumberish, PointerLike } from '../../common/CommonTypes.js';
3
2
  export interface IStorageValue {
4
3
  readonly pointer: PointerLike;
@@ -2,14 +2,6 @@ import { TransactionInput } from './metadata/TransactionInput.js';
2
2
  import { TransactionOutput } from './metadata/TransactionOutput.js';
3
3
  import { TransactionReceipt } from './metadata/TransactionReceipt.js';
4
4
  export class TransactionBase extends TransactionReceipt {
5
- id;
6
- hash;
7
- index;
8
- burnedBitcoin;
9
- inputs;
10
- outputs;
11
- OPNetType;
12
- gasUsed;
13
5
  constructor(transaction) {
14
6
  super({
15
7
  receipt: transaction.receipt,
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { OPNetTransactionTypes } from '../../interfaces/opnet/OPNetTransactionTypes.js';
3
2
  import { IDeploymentTransaction } from '../interfaces/transactions/IDeploymentTransaction.js';
4
3
  import { TransactionBase } from '../Transaction.js';
@@ -1,15 +1,5 @@
1
1
  import { TransactionBase } from '../Transaction.js';
2
2
  export class DeploymentTransaction extends TransactionBase {
3
- contractAddress;
4
- virtualAddress;
5
- p2trAddress;
6
- bytecode;
7
- wasCompressed;
8
- deployerPubKey;
9
- deployerAddress;
10
- contractSeed;
11
- contractSaltHash;
12
- from;
13
3
  constructor(transaction) {
14
4
  super(transaction);
15
5
  this.from = transaction.from;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Buffer } from 'buffer';
3
2
  import { InteractionType } from '../../interfaces/opnet/OPNetTransactionTypes.js';
4
3
  import { IInteractionTransaction } from '../interfaces/transactions/IInteractionTransaction.js';
@@ -1,13 +1,6 @@
1
1
  import { Buffer } from 'buffer';
2
2
  import { TransactionBase } from '../Transaction.js';
3
3
  export class InteractionTransaction extends TransactionBase {
4
- calldata;
5
- senderPubKeyHash;
6
- contractSecret;
7
- interactionPubKey;
8
- wasCompressed;
9
- from;
10
- contractAddress;
11
4
  constructor(transaction) {
12
5
  super(transaction);
13
6
  this.calldata = Buffer.from(transaction.calldata, 'base64');
@@ -1,10 +1,5 @@
1
1
  import { InteractionTransaction } from './InteractionTransaction.js';
2
2
  export class UnwrapTransaction extends InteractionTransaction {
3
- authorizedBy;
4
- usedUTXOs;
5
- consolidatedVault;
6
- unwrapAmount;
7
- requestedAmount;
8
3
  constructor(transaction) {
9
4
  super(transaction);
10
5
  this.authorizedBy = transaction.authorizedBy;
@@ -1,13 +1,6 @@
1
1
  import { EcKeyPair } from '@btc-vision/transaction';
2
2
  import { InteractionTransaction } from './InteractionTransaction.js';
3
3
  export class WrapTransaction extends InteractionTransaction {
4
- penalized;
5
- wrappingFees;
6
- depositAmount;
7
- depositAddress;
8
- vault;
9
- pubKeys;
10
- minimumSignatures;
11
4
  constructor(transaction) {
12
5
  super(transaction);
13
6
  this.penalized = transaction.penalized;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { BigNumberish } from '../../common/CommonTypes.js';
3
2
  import { OPNetTransactionTypes } from '../../interfaces/opnet/OPNetTransactionTypes.js';
4
3
  import { ITransactionInput, TransactionInput } from '../metadata/TransactionInput.js';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { NetEvent } from '@btc-vision/bsi-binary';
3
2
  export interface NetEventDocument {
4
3
  readonly contractAddress: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { OPNetTransactionTypes } from '../../../interfaces/opnet/OPNetTransactionTypes.js';
3
2
  import { ICommonTransaction } from './ICommonTransaction.js';
4
3
  export interface IDeploymentTransaction extends ICommonTransaction<OPNetTransactionTypes.Deployment> {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { InteractionType } from '../../../interfaces/opnet/OPNetTransactionTypes.js';
3
2
  import { ContractEvents } from '../ITransactionReceipt.js';
4
3
  import { ICommonTransaction } from './ICommonTransaction.js';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Address } from '@btc-vision/bsi-binary';
3
2
  import { IInteractionTransaction } from './IInteractionTransaction.js';
4
3
  export interface UsedUTXO {