@atomicfinance/types 4.0.0 → 4.0.1

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 (509) hide show
  1. package/.turbo/turbo-lint.log +1 -0
  2. package/.yalc/@node-dlc/bitcoin/.nyc_output/982e80bf-a70c-452f-b63d-d749ae385531.json +1 -0
  3. package/.yalc/@node-dlc/bitcoin/.nyc_output/processinfo/982e80bf-a70c-452f-b63d-d749ae385531.json +1 -0
  4. package/.yalc/@node-dlc/bitcoin/.nyc_output/processinfo/index.json +1 -0
  5. package/.yalc/@node-dlc/bitcoin/README.md +11 -0
  6. package/.yalc/@node-dlc/bitcoin/__tests__/bitcoin/amount.spec.ts +330 -0
  7. package/.yalc/@node-dlc/bitcoin/__tests__/bitcoin/value.spec.ts +320 -0
  8. package/.yalc/@node-dlc/bitcoin/__tests__/tsconfig.json +8 -0
  9. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Amount.ts.html +290 -0
  10. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Base58.ts.html +269 -0
  11. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Base58Check.ts.html +182 -0
  12. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/BitcoinError.ts.html +173 -0
  13. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/BitcoinErrorCode.ts.html +110 -0
  14. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/HashByteOrder.ts.html +143 -0
  15. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/HashValue.ts.html +350 -0
  16. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/LexicographicalSorters.ts.html +191 -0
  17. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/LockTime.ts.html +386 -0
  18. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/OpCodes.ts.html +437 -0
  19. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/OutPoint.ts.html +383 -0
  20. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Script.ts.html +1607 -0
  21. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Sequence.ts.html +713 -0
  22. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/SigHashType.ts.html +137 -0
  23. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Stack.ts.html +323 -0
  24. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/TimeLockMode.ts.html +128 -0
  25. package/.yalc/@node-dlc/{messaging/coverage/lcov-report/lib/serde/SerdeUtils.ts.html → bitcoin/coverage/lcov-report/Tx.ts.html} +617 -491
  26. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/TxBuilder.ts.html +971 -0
  27. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/TxIn.ts.html +425 -0
  28. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/TxOut.ts.html +341 -0
  29. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Value.ts.html +683 -0
  30. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Wif.ts.html +311 -0
  31. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Witness.ts.html +275 -0
  32. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/base.css +224 -0
  33. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/block-navigation.js +79 -0
  34. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/favicon.png +0 -0
  35. package/.yalc/@node-dlc/{messaging/coverage/lcov-report/lib/serde → bitcoin/coverage/lcov-report}/index.html +45 -30
  36. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/index.ts.html +164 -0
  37. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/prettify.css +1 -0
  38. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/prettify.js +2 -0
  39. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  40. package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/sorter.js +170 -0
  41. package/.yalc/@node-dlc/bitcoin/coverage/lcov.info +123 -0
  42. package/.yalc/@node-dlc/bitcoin/dist/Amount.d.ts +48 -0
  43. package/.yalc/@node-dlc/bitcoin/dist/Amount.js +68 -0
  44. package/.yalc/@node-dlc/bitcoin/dist/Amount.js.map +1 -0
  45. package/.yalc/@node-dlc/bitcoin/dist/Base58.d.ts +22 -0
  46. package/.yalc/@node-dlc/bitcoin/dist/Base58.js +62 -0
  47. package/.yalc/@node-dlc/bitcoin/dist/Base58.js.map +1 -0
  48. package/.yalc/@node-dlc/bitcoin/dist/Base58Check.d.ts +14 -0
  49. package/.yalc/@node-dlc/bitcoin/dist/Base58Check.js +36 -0
  50. package/.yalc/@node-dlc/bitcoin/dist/Base58Check.js.map +1 -0
  51. package/.yalc/@node-dlc/bitcoin/dist/BitcoinError.d.ts +6 -0
  52. package/.yalc/@node-dlc/bitcoin/dist/BitcoinError.js +36 -0
  53. package/.yalc/@node-dlc/bitcoin/dist/BitcoinError.js.map +1 -0
  54. package/.yalc/@node-dlc/bitcoin/dist/BitcoinErrorCode.d.ts +10 -0
  55. package/.yalc/@node-dlc/bitcoin/dist/BitcoinErrorCode.js +15 -0
  56. package/.yalc/@node-dlc/bitcoin/dist/BitcoinErrorCode.js.map +1 -0
  57. package/.yalc/@node-dlc/bitcoin/dist/Block.d.ts +19 -0
  58. package/.yalc/@node-dlc/bitcoin/dist/Block.js +3 -0
  59. package/.yalc/@node-dlc/bitcoin/dist/Block.js.map +1 -0
  60. package/.yalc/@node-dlc/bitcoin/dist/HashByteOrder.d.ts +20 -0
  61. package/.yalc/@node-dlc/bitcoin/dist/HashByteOrder.js +25 -0
  62. package/.yalc/@node-dlc/bitcoin/dist/HashByteOrder.js.map +1 -0
  63. package/.yalc/@node-dlc/bitcoin/dist/HashValue.d.ts +55 -0
  64. package/.yalc/@node-dlc/bitcoin/dist/HashValue.js +82 -0
  65. package/.yalc/@node-dlc/bitcoin/dist/HashValue.js.map +1 -0
  66. package/.yalc/@node-dlc/bitcoin/dist/ICloneable.d.ts +3 -0
  67. package/.yalc/@node-dlc/bitcoin/dist/ICloneable.js +3 -0
  68. package/.yalc/@node-dlc/bitcoin/dist/ICloneable.js.map +1 -0
  69. package/.yalc/@node-dlc/bitcoin/dist/LexicographicalSorters.d.ts +18 -0
  70. package/.yalc/@node-dlc/bitcoin/dist/LexicographicalSorters.js +41 -0
  71. package/.yalc/@node-dlc/bitcoin/dist/LexicographicalSorters.js.map +1 -0
  72. package/.yalc/@node-dlc/bitcoin/dist/LockTime.d.ts +61 -0
  73. package/.yalc/@node-dlc/bitcoin/dist/LockTime.js +94 -0
  74. package/.yalc/@node-dlc/bitcoin/dist/LockTime.js.map +1 -0
  75. package/.yalc/@node-dlc/bitcoin/dist/OpCodes.d.ts +102 -0
  76. package/.yalc/@node-dlc/bitcoin/dist/OpCodes.js +116 -0
  77. package/.yalc/@node-dlc/bitcoin/dist/OpCodes.js.map +1 -0
  78. package/.yalc/@node-dlc/bitcoin/dist/OutPoint.d.ts +57 -0
  79. package/.yalc/@node-dlc/bitcoin/dist/OutPoint.js +88 -0
  80. package/.yalc/@node-dlc/bitcoin/dist/OutPoint.js.map +1 -0
  81. package/.yalc/@node-dlc/bitcoin/dist/Script.d.ts +185 -0
  82. package/.yalc/@node-dlc/bitcoin/dist/Script.js +404 -0
  83. package/.yalc/@node-dlc/bitcoin/dist/Script.js.map +1 -0
  84. package/.yalc/@node-dlc/bitcoin/dist/ScriptCmd.d.ts +3 -0
  85. package/.yalc/@node-dlc/bitcoin/dist/ScriptCmd.js +3 -0
  86. package/.yalc/@node-dlc/bitcoin/dist/ScriptCmd.js.map +1 -0
  87. package/.yalc/@node-dlc/bitcoin/dist/Sequence.d.ts +116 -0
  88. package/.yalc/@node-dlc/bitcoin/dist/Sequence.js +187 -0
  89. package/.yalc/@node-dlc/bitcoin/dist/Sequence.js.map +1 -0
  90. package/.yalc/@node-dlc/bitcoin/dist/SigHashType.d.ts +7 -0
  91. package/.yalc/@node-dlc/bitcoin/dist/SigHashType.js +27 -0
  92. package/.yalc/@node-dlc/bitcoin/dist/SigHashType.js.map +1 -0
  93. package/.yalc/@node-dlc/bitcoin/dist/SizeResult.d.ts +5 -0
  94. package/.yalc/@node-dlc/bitcoin/dist/SizeResult.js +3 -0
  95. package/.yalc/@node-dlc/bitcoin/dist/SizeResult.js.map +1 -0
  96. package/.yalc/@node-dlc/bitcoin/dist/Sorter.d.ts +1 -0
  97. package/.yalc/@node-dlc/bitcoin/dist/Sorter.js +3 -0
  98. package/.yalc/@node-dlc/bitcoin/dist/Sorter.js.map +1 -0
  99. package/.yalc/@node-dlc/bitcoin/dist/Stack.d.ts +15 -0
  100. package/.yalc/@node-dlc/bitcoin/dist/Stack.js +77 -0
  101. package/.yalc/@node-dlc/bitcoin/dist/Stack.js.map +1 -0
  102. package/.yalc/@node-dlc/bitcoin/dist/TimeLockMode.d.ts +15 -0
  103. package/.yalc/@node-dlc/bitcoin/dist/TimeLockMode.js +20 -0
  104. package/.yalc/@node-dlc/bitcoin/dist/TimeLockMode.js.map +1 -0
  105. package/.yalc/@node-dlc/bitcoin/dist/Tx.d.ts +150 -0
  106. package/.yalc/@node-dlc/bitcoin/dist/Tx.js +408 -0
  107. package/.yalc/@node-dlc/bitcoin/dist/Tx.js.map +1 -0
  108. package/.yalc/@node-dlc/bitcoin/dist/TxBuilder.d.ts +110 -0
  109. package/.yalc/@node-dlc/bitcoin/dist/TxBuilder.js +238 -0
  110. package/.yalc/@node-dlc/bitcoin/dist/TxBuilder.js.map +1 -0
  111. package/.yalc/@node-dlc/bitcoin/dist/TxIn.d.ts +71 -0
  112. package/.yalc/@node-dlc/bitcoin/dist/TxIn.js +79 -0
  113. package/.yalc/@node-dlc/bitcoin/dist/TxIn.js.map +1 -0
  114. package/.yalc/@node-dlc/bitcoin/dist/TxOut.d.ts +57 -0
  115. package/.yalc/@node-dlc/bitcoin/dist/TxOut.js +68 -0
  116. package/.yalc/@node-dlc/bitcoin/dist/TxOut.js.map +1 -0
  117. package/.yalc/@node-dlc/bitcoin/dist/Value.d.ts +122 -0
  118. package/.yalc/@node-dlc/bitcoin/dist/Value.js +180 -0
  119. package/.yalc/@node-dlc/bitcoin/dist/Value.js.map +1 -0
  120. package/.yalc/@node-dlc/bitcoin/dist/Wif.d.ts +41 -0
  121. package/.yalc/@node-dlc/bitcoin/dist/Wif.js +62 -0
  122. package/.yalc/@node-dlc/bitcoin/dist/Wif.js.map +1 -0
  123. package/.yalc/@node-dlc/bitcoin/dist/Witness.d.ts +41 -0
  124. package/.yalc/@node-dlc/bitcoin/dist/Witness.js +63 -0
  125. package/.yalc/@node-dlc/bitcoin/dist/Witness.js.map +1 -0
  126. package/.yalc/@node-dlc/bitcoin/dist/index.d.ts +28 -0
  127. package/.yalc/@node-dlc/bitcoin/dist/index.js +45 -0
  128. package/.yalc/@node-dlc/bitcoin/dist/index.js.map +1 -0
  129. package/.yalc/@node-dlc/bitcoin/lib/Amount.ts +70 -0
  130. package/.yalc/@node-dlc/bitcoin/lib/Base58.ts +63 -0
  131. package/.yalc/@node-dlc/bitcoin/lib/Base58Check.ts +34 -0
  132. package/.yalc/@node-dlc/bitcoin/lib/BitcoinError.ts +31 -0
  133. package/.yalc/@node-dlc/bitcoin/lib/BitcoinErrorCode.ts +10 -0
  134. package/.yalc/@node-dlc/bitcoin/lib/Block.ts +20 -0
  135. package/.yalc/@node-dlc/bitcoin/lib/HashByteOrder.ts +21 -0
  136. package/.yalc/@node-dlc/bitcoin/lib/HashValue.ts +90 -0
  137. package/.yalc/@node-dlc/bitcoin/lib/ICloneable.ts +3 -0
  138. package/.yalc/@node-dlc/bitcoin/lib/LexicographicalSorters.ts +37 -0
  139. package/.yalc/@node-dlc/bitcoin/lib/LockTime.ts +102 -0
  140. package/.yalc/@node-dlc/bitcoin/lib/OpCodes.ts +119 -0
  141. package/.yalc/@node-dlc/bitcoin/lib/OutPoint.ts +101 -0
  142. package/.yalc/@node-dlc/bitcoin/lib/Script.ts +509 -0
  143. package/.yalc/@node-dlc/bitcoin/lib/ScriptCmd.ts +3 -0
  144. package/.yalc/@node-dlc/bitcoin/lib/Sequence.ts +211 -0
  145. package/.yalc/@node-dlc/bitcoin/lib/SigHashType.ts +19 -0
  146. package/.yalc/@node-dlc/bitcoin/lib/SizeResult.ts +5 -0
  147. package/.yalc/@node-dlc/bitcoin/lib/Sorter.ts +1 -0
  148. package/.yalc/@node-dlc/bitcoin/lib/Stack.ts +81 -0
  149. package/.yalc/@node-dlc/bitcoin/lib/TimeLockMode.ts +16 -0
  150. package/.yalc/@node-dlc/bitcoin/lib/Tx.ts +480 -0
  151. package/.yalc/@node-dlc/bitcoin/lib/TxBuilder.ts +297 -0
  152. package/.yalc/@node-dlc/bitcoin/lib/TxIn.ts +115 -0
  153. package/.yalc/@node-dlc/bitcoin/lib/TxOut.ts +87 -0
  154. package/.yalc/@node-dlc/bitcoin/lib/Value.ts +201 -0
  155. package/.yalc/@node-dlc/bitcoin/lib/Wif.ts +77 -0
  156. package/.yalc/@node-dlc/bitcoin/lib/Witness.ts +65 -0
  157. package/.yalc/@node-dlc/bitcoin/lib/index.ts +28 -0
  158. package/.yalc/@node-dlc/bitcoin/package.json +31 -0
  159. package/.yalc/@node-dlc/bitcoin/tsconfig.json +8 -0
  160. package/.yalc/@node-dlc/bitcoin/yalc.sig +1 -0
  161. package/.yalc/@node-dlc/messaging/.nyc_output/83d37f9d-cecf-4c52-a753-115ff80bbca0.json +1 -0
  162. package/.yalc/@node-dlc/messaging/.nyc_output/processinfo/83d37f9d-cecf-4c52-a753-115ff80bbca0.json +1 -0
  163. package/.yalc/@node-dlc/messaging/.nyc_output/processinfo/index.json +1 -1
  164. package/.yalc/@node-dlc/messaging/__tests__/_test-utils.ts +1 -0
  165. package/.yalc/@node-dlc/messaging/__tests__/compatibility/dlcspecs-compatibility.spec.ts +13 -47
  166. package/.yalc/@node-dlc/messaging/__tests__/compatibility/rust-dlc-cross-language.spec.ts +166 -253
  167. package/.yalc/@node-dlc/messaging/__tests__/compatibility/true-serialization-compatibility.spec.ts +214 -483
  168. package/.yalc/@node-dlc/messaging/__tests__/messages/ContractDescriptor.spec.ts +3 -1
  169. package/.yalc/@node-dlc/messaging/__tests__/messages/ContractInfo.spec.ts +1 -1
  170. package/.yalc/@node-dlc/messaging/__tests__/messages/DlcAccept.spec.ts +72 -0
  171. package/.yalc/@node-dlc/messaging/__tests__/messages/DlcInput.spec.ts +111 -0
  172. package/.yalc/@node-dlc/messaging/__tests__/messages/DlcOffer.spec.ts +99 -37
  173. package/.yalc/@node-dlc/messaging/__tests__/messages/FundingInput.spec.ts +148 -63
  174. package/.yalc/@node-dlc/messaging/__tests__/messages/OracleAttestation.spec.ts +2 -4
  175. package/.yalc/@node-dlc/messaging/__tests__/messages/OrderAccept.spec.ts +7 -9
  176. package/.yalc/@node-dlc/messaging/__tests__/messages/OrderNegotiationFields.spec.ts +135 -52
  177. package/.yalc/@node-dlc/messaging/__tests__/messages/OrderPositionInfo.spec.ts +6 -6
  178. package/.yalc/@node-dlc/messaging/__tests__/messages/PayoutCurvePiece.spec.ts +1 -1
  179. package/.yalc/@node-dlc/messaging/__tests__/messages/PayoutFunction.spec.ts +1 -1
  180. package/.yalc/@node-dlc/messaging/__tests__/serialize/F64.spec.ts +1 -0
  181. package/.yalc/@node-dlc/messaging/coverage/lcov-report/index.html +31 -31
  182. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/MessageType.ts.html +11 -5
  183. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/chain/ChainManager.ts.html +6 -3
  184. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/chain/ChainMemoryStore.ts.html +1 -1
  185. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/chain/index.html +1 -1
  186. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/domain/Address.ts.html +1 -1
  187. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/domain/index.html +1 -1
  188. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/index.html +9 -9
  189. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/index.ts.html +11 -8
  190. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/irc/IrcMessage.ts.html +1 -1
  191. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/irc/index.html +1 -1
  192. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/AddressCache.ts.html +1 -1
  193. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/BatchFundingGroup.ts.html +1 -1
  194. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/CetAdaptorSignatures.ts.html +22 -22
  195. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/CetAdaptorSignaturesV0.ts.html +46 -37
  196. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/CloseTLV.ts.html +344 -0
  197. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/ContractDescriptor.ts.html +61 -70
  198. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/ContractInfo.ts.html +59 -44
  199. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcAccept.ts.html +251 -119
  200. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcCancel.ts.html +1 -1
  201. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcClose.ts.html +12 -3
  202. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcCloseMetadata.ts.html +2 -11
  203. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcIds.ts.html +1 -1
  204. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcInfo.ts.html +1 -1
  205. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcInput.ts.html +581 -0
  206. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcMessage.ts.html +1 -1
  207. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcOffer.ts.html +307 -127
  208. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcSign.ts.html +61 -46
  209. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcTransactions.ts.html +1 -1
  210. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/EventDescriptor.ts.html +67 -52
  211. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/FundingInput.ts.html +202 -70
  212. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/FundingSignatures.ts.html +15 -15
  213. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/FundingSignaturesV0.ts.html +47 -77
  214. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/NegotiationFields.ts.html +16 -4
  215. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/NodeAnnouncementMessage.ts.html +3 -3
  216. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleAnnouncement.ts.html +22 -22
  217. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleAnnouncementV0.ts.html +48 -270
  218. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleAttestation.ts.html +1 -1
  219. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleAttestationV0.ts.html +113 -404
  220. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleEvent.ts.html +49 -49
  221. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleEventContainer.ts.html +1 -1
  222. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleEventContainerV0.ts.html +22 -22
  223. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleEventV0.ts.html +61 -385
  224. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleIdentifier.ts.html +1 -1
  225. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleIdentifierV0.ts.html +1 -1
  226. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleInfo.ts.html +46 -25
  227. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleInfoV0.ts.html +55 -1378
  228. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OrderAccept.ts.html +68 -23
  229. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OrderIrcInfo.ts.html +1 -1
  230. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OrderMetadata.ts.html +1 -1
  231. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OrderNegotiationFields.ts.html +266 -107
  232. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OrderOffer.ts.html +31 -34
  233. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OrderPositionInfo.ts.html +19 -88
  234. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/PayoutCurvePiece.ts.html +36 -21
  235. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/PayoutFunction.ts.html +34 -28
  236. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/RoundingIntervals.ts.html +18 -15
  237. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/RoundingIntervalsV0.ts.html +75 -129
  238. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/ScriptWitnessV0.ts.html +6 -6
  239. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/index.html +84 -69
  240. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/serialize/F64.ts.html +8 -53
  241. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/serialize/deserializeTlv.ts.html +1 -1
  242. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/serialize/getTlv.ts.html +9 -9
  243. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/serialize/index.html +15 -15
  244. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/util.ts.html +22 -10
  245. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/validation/index.html +1 -1
  246. package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/validation/validate.ts.html +1 -1
  247. package/.yalc/@node-dlc/messaging/coverage/lcov.info +3049 -2826
  248. package/.yalc/@node-dlc/messaging/dist/MessageType.d.ts +2 -1
  249. package/.yalc/@node-dlc/messaging/dist/MessageType.js +2 -1
  250. package/.yalc/@node-dlc/messaging/dist/MessageType.js.map +1 -1
  251. package/.yalc/@node-dlc/messaging/dist/chain/ChainManager.js +1 -0
  252. package/.yalc/@node-dlc/messaging/dist/chain/ChainManager.js.map +1 -1
  253. package/.yalc/@node-dlc/messaging/dist/index.d.ts +5 -4
  254. package/.yalc/@node-dlc/messaging/dist/index.js +5 -4
  255. package/.yalc/@node-dlc/messaging/dist/index.js.map +1 -1
  256. package/.yalc/@node-dlc/messaging/dist/messages/CetAdaptorSignaturesV0.d.ts +42 -0
  257. package/.yalc/@node-dlc/messaging/dist/messages/CetAdaptorSignaturesV0.js +68 -0
  258. package/.yalc/@node-dlc/messaging/dist/messages/CetAdaptorSignaturesV0.js.map +1 -0
  259. package/.yalc/@node-dlc/messaging/dist/messages/CloseTLV.d.ts +38 -0
  260. package/.yalc/@node-dlc/messaging/dist/messages/CloseTLV.js +59 -0
  261. package/.yalc/@node-dlc/messaging/dist/messages/CloseTLV.js.map +1 -0
  262. package/.yalc/@node-dlc/messaging/dist/messages/ContractDescriptor.d.ts +11 -12
  263. package/.yalc/@node-dlc/messaging/dist/messages/ContractDescriptor.js +0 -1
  264. package/.yalc/@node-dlc/messaging/dist/messages/ContractDescriptor.js.map +1 -1
  265. package/.yalc/@node-dlc/messaging/dist/messages/ContractInfo.d.ts +10 -10
  266. package/.yalc/@node-dlc/messaging/dist/messages/ContractInfo.js +5 -1
  267. package/.yalc/@node-dlc/messaging/dist/messages/ContractInfo.js.map +1 -1
  268. package/.yalc/@node-dlc/messaging/dist/messages/DlcAccept.d.ts +15 -0
  269. package/.yalc/@node-dlc/messaging/dist/messages/DlcAccept.js +46 -5
  270. package/.yalc/@node-dlc/messaging/dist/messages/DlcAccept.js.map +1 -1
  271. package/.yalc/@node-dlc/messaging/dist/messages/DlcClose.js +6 -2
  272. package/.yalc/@node-dlc/messaging/dist/messages/DlcClose.js.map +1 -1
  273. package/.yalc/@node-dlc/messaging/dist/messages/DlcCloseMetadata.js.map +1 -1
  274. package/.yalc/@node-dlc/messaging/dist/messages/DlcInput.d.ts +56 -0
  275. package/.yalc/@node-dlc/messaging/dist/messages/DlcInput.js +135 -0
  276. package/.yalc/@node-dlc/messaging/dist/messages/DlcInput.js.map +1 -0
  277. package/.yalc/@node-dlc/messaging/dist/messages/DlcOffer.d.ts +16 -1
  278. package/.yalc/@node-dlc/messaging/dist/messages/DlcOffer.js +50 -5
  279. package/.yalc/@node-dlc/messaging/dist/messages/DlcOffer.js.map +1 -1
  280. package/.yalc/@node-dlc/messaging/dist/messages/DlcSign.js +11 -3
  281. package/.yalc/@node-dlc/messaging/dist/messages/DlcSign.js.map +1 -1
  282. package/.yalc/@node-dlc/messaging/dist/messages/EventDescriptor.d.ts +7 -6
  283. package/.yalc/@node-dlc/messaging/dist/messages/EventDescriptor.js +3 -0
  284. package/.yalc/@node-dlc/messaging/dist/messages/EventDescriptor.js.map +1 -1
  285. package/.yalc/@node-dlc/messaging/dist/messages/FundingInput.d.ts +7 -0
  286. package/.yalc/@node-dlc/messaging/dist/messages/FundingInput.js +31 -1
  287. package/.yalc/@node-dlc/messaging/dist/messages/FundingInput.js.map +1 -1
  288. package/.yalc/@node-dlc/messaging/dist/messages/FundingSignaturesV0.d.ts +34 -0
  289. package/.yalc/@node-dlc/messaging/dist/messages/FundingSignaturesV0.js +72 -0
  290. package/.yalc/@node-dlc/messaging/dist/messages/FundingSignaturesV0.js.map +1 -0
  291. package/.yalc/@node-dlc/messaging/dist/messages/NegotiationFields.d.ts +2 -2
  292. package/.yalc/@node-dlc/messaging/dist/messages/NegotiationFields.js +4 -0
  293. package/.yalc/@node-dlc/messaging/dist/messages/NegotiationFields.js.map +1 -1
  294. package/.yalc/@node-dlc/messaging/dist/messages/OracleAnnouncementV0.d.ts +47 -0
  295. package/.yalc/@node-dlc/messaging/dist/messages/OracleAnnouncementV0.js +76 -0
  296. package/.yalc/@node-dlc/messaging/dist/messages/OracleAnnouncementV0.js.map +1 -0
  297. package/.yalc/@node-dlc/messaging/dist/messages/OracleAttestationV0.d.ts +48 -0
  298. package/.yalc/@node-dlc/messaging/dist/messages/OracleAttestationV0.js +100 -0
  299. package/.yalc/@node-dlc/messaging/dist/messages/OracleAttestationV0.js.map +1 -0
  300. package/.yalc/@node-dlc/messaging/dist/messages/OracleEventContainerV0.d.ts +32 -0
  301. package/.yalc/@node-dlc/messaging/dist/messages/OracleEventContainerV0.js +67 -0
  302. package/.yalc/@node-dlc/messaging/dist/messages/OracleEventContainerV0.js.map +1 -0
  303. package/.yalc/@node-dlc/messaging/dist/messages/OracleEventV0.d.ts +54 -0
  304. package/.yalc/@node-dlc/messaging/dist/messages/OracleEventV0.js +100 -0
  305. package/.yalc/@node-dlc/messaging/dist/messages/OracleEventV0.js.map +1 -0
  306. package/.yalc/@node-dlc/messaging/dist/messages/OracleInfo.d.ts +8 -6
  307. package/.yalc/@node-dlc/messaging/dist/messages/OracleInfo.js +3 -0
  308. package/.yalc/@node-dlc/messaging/dist/messages/OracleInfo.js.map +1 -1
  309. package/.yalc/@node-dlc/messaging/dist/messages/OracleInfoV0.d.ts +15 -141
  310. package/.yalc/@node-dlc/messaging/dist/messages/OracleInfoV0.js +21 -350
  311. package/.yalc/@node-dlc/messaging/dist/messages/OracleInfoV0.js.map +1 -1
  312. package/.yalc/@node-dlc/messaging/dist/messages/OrderAccept.d.ts +3 -2
  313. package/.yalc/@node-dlc/messaging/dist/messages/OrderAccept.js +22 -7
  314. package/.yalc/@node-dlc/messaging/dist/messages/OrderAccept.js.map +1 -1
  315. package/.yalc/@node-dlc/messaging/dist/messages/OrderNegotiationFields.d.ts +48 -36
  316. package/.yalc/@node-dlc/messaging/dist/messages/OrderNegotiationFields.js +97 -50
  317. package/.yalc/@node-dlc/messaging/dist/messages/OrderNegotiationFields.js.map +1 -1
  318. package/.yalc/@node-dlc/messaging/dist/messages/OrderOffer.d.ts +1 -1
  319. package/.yalc/@node-dlc/messaging/dist/messages/OrderOffer.js +1 -1
  320. package/.yalc/@node-dlc/messaging/dist/messages/OrderOffer.js.map +1 -1
  321. package/.yalc/@node-dlc/messaging/dist/messages/OrderPositionInfo.d.ts +7 -13
  322. package/.yalc/@node-dlc/messaging/dist/messages/OrderPositionInfo.js +11 -25
  323. package/.yalc/@node-dlc/messaging/dist/messages/OrderPositionInfo.js.map +1 -1
  324. package/.yalc/@node-dlc/messaging/dist/messages/PayoutCurvePiece.js +5 -0
  325. package/.yalc/@node-dlc/messaging/dist/messages/PayoutCurvePiece.js.map +1 -1
  326. package/.yalc/@node-dlc/messaging/dist/messages/PayoutFunction.js +4 -1
  327. package/.yalc/@node-dlc/messaging/dist/messages/PayoutFunction.js.map +1 -1
  328. package/.yalc/@node-dlc/messaging/dist/messages/RoundingIntervals.js +1 -0
  329. package/.yalc/@node-dlc/messaging/dist/messages/RoundingIntervals.js.map +1 -1
  330. package/.yalc/@node-dlc/messaging/dist/messages/RoundingIntervalsV0.d.ts +47 -0
  331. package/.yalc/@node-dlc/messaging/dist/messages/RoundingIntervalsV0.js +86 -0
  332. package/.yalc/@node-dlc/messaging/dist/messages/RoundingIntervalsV0.js.map +1 -0
  333. package/.yalc/@node-dlc/messaging/dist/serialize/F64.d.ts +0 -8
  334. package/.yalc/@node-dlc/messaging/dist/serialize/F64.js +0 -13
  335. package/.yalc/@node-dlc/messaging/dist/serialize/F64.js.map +1 -1
  336. package/.yalc/@node-dlc/messaging/dist/util.d.ts +1 -1
  337. package/.yalc/@node-dlc/messaging/dist/util.js +2 -0
  338. package/.yalc/@node-dlc/messaging/dist/util.js.map +1 -1
  339. package/.yalc/@node-dlc/messaging/lib/MessageType.ts +3 -1
  340. package/.yalc/@node-dlc/messaging/lib/chain/ChainManager.ts +1 -0
  341. package/.yalc/@node-dlc/messaging/lib/index.ts +5 -4
  342. package/.yalc/@node-dlc/messaging/lib/messages/ContractDescriptor.ts +15 -16
  343. package/.yalc/@node-dlc/messaging/lib/messages/ContractInfo.ts +17 -12
  344. package/.yalc/@node-dlc/messaging/lib/messages/DlcAccept.ts +50 -6
  345. package/.yalc/@node-dlc/messaging/lib/messages/DlcClose.ts +4 -1
  346. package/.yalc/@node-dlc/messaging/lib/messages/DlcCloseMetadata.ts +0 -3
  347. package/.yalc/@node-dlc/messaging/lib/messages/DlcInput.ts +167 -0
  348. package/.yalc/@node-dlc/messaging/lib/messages/DlcOffer.ts +67 -7
  349. package/.yalc/@node-dlc/messaging/lib/messages/DlcSign.ts +5 -0
  350. package/.yalc/@node-dlc/messaging/lib/messages/EventDescriptor.ts +12 -7
  351. package/.yalc/@node-dlc/messaging/lib/messages/FundingInput.ts +45 -1
  352. package/.yalc/@node-dlc/messaging/lib/messages/NegotiationFields.ts +6 -2
  353. package/.yalc/@node-dlc/messaging/lib/messages/NodeAnnouncementMessage.ts +2 -2
  354. package/.yalc/@node-dlc/messaging/lib/messages/OracleInfo.ts +15 -8
  355. package/.yalc/@node-dlc/messaging/lib/messages/OrderAccept.ts +28 -13
  356. package/.yalc/@node-dlc/messaging/lib/messages/OrderNegotiationFields.ts +127 -74
  357. package/.yalc/@node-dlc/messaging/lib/messages/OrderOffer.ts +2 -3
  358. package/.yalc/@node-dlc/messaging/lib/messages/OrderPositionInfo.ts +10 -33
  359. package/.yalc/@node-dlc/messaging/lib/messages/PayoutCurvePiece.ts +5 -0
  360. package/.yalc/@node-dlc/messaging/lib/messages/PayoutFunction.ts +2 -0
  361. package/.yalc/@node-dlc/messaging/lib/messages/RoundingIntervals.ts +1 -0
  362. package/.yalc/@node-dlc/messaging/lib/serialize/F64.ts +0 -15
  363. package/.yalc/@node-dlc/messaging/lib/serialize/readTlvs.ts +1 -1
  364. package/.yalc/@node-dlc/messaging/lib/util.ts +5 -1
  365. package/.yalc/@node-dlc/messaging/package.json +8 -8
  366. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_3_of_3_test.json +76 -74
  367. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_3_of_5_test.json +90 -88
  368. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_and_numerical_3_of_5_test.json +162 -160
  369. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_and_numerical_5_of_5_test.json +162 -160
  370. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_and_numerical_with_diff_3_of_5_test.json +164 -162
  371. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_and_numerical_with_diff_5_of_5_test.json +164 -162
  372. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_single_oracle_test.json +60 -58
  373. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/single_oracle_numerical_hyperbola_test.json +71 -69
  374. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/single_oracle_numerical_test.json +71 -69
  375. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/three_of_five_oracle_numerical_with_diff_test.json +119 -117
  376. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/three_of_three_oracle_numerical_test.json +95 -93
  377. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/three_of_three_oracle_numerical_with_diff_test.json +97 -95
  378. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/two_of_five_oracle_numerical_test.json +117 -115
  379. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/two_of_five_oracle_numerical_with_diff_test.json +119 -117
  380. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_3_of_3_test.json +210 -0
  381. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_3_of_5_test.json +468 -0
  382. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_and_numerical_3_of_5_test.json +1517 -0
  383. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_and_numerical_5_of_5_test.json +545 -0
  384. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_and_numerical_with_diff_3_of_5_test.json +4761 -0
  385. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_and_numerical_with_diff_5_of_5_test.json +2169 -0
  386. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_single_oracle_test.json +164 -0
  387. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/single_oracle_numerical_hyperbola_test.json +502 -0
  388. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/single_oracle_numerical_test.json +262 -0
  389. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/three_of_five_oracle_numerical_with_diff_test.json +4382 -0
  390. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/three_of_three_oracle_numerical_test.json +324 -0
  391. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/three_of_three_oracle_numerical_with_diff_test.json +652 -0
  392. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/two_of_five_oracle_numerical_test.json +1138 -0
  393. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/two_of_five_oracle_numerical_with_diff_test.json +2222 -0
  394. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_3_of_3_test.json +212 -0
  395. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_3_of_5_test.json +470 -0
  396. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_and_numerical_3_of_5_test.json +1519 -0
  397. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_and_numerical_5_of_5_test.json +547 -0
  398. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_and_numerical_with_diff_3_of_5_test.json +4763 -0
  399. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_and_numerical_with_diff_5_of_5_test.json +2171 -0
  400. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_single_oracle_test.json +166 -0
  401. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/single_oracle_numerical_hyperbola_test.json +504 -0
  402. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/single_oracle_numerical_test.json +264 -0
  403. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/three_of_five_oracle_numerical_with_diff_test.json +4384 -0
  404. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/three_of_three_oracle_numerical_test.json +326 -0
  405. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/three_of_three_oracle_numerical_with_diff_test.json +654 -0
  406. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/two_of_five_oracle_numerical_test.json +1140 -0
  407. package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/two_of_five_oracle_numerical_with_diff_test.json +2224 -0
  408. package/.yalc/@node-dlc/messaging/yalc.sig +1 -1
  409. package/.yalc/@node-dlc/noise/.eslintrc +6 -0
  410. package/.yalc/@node-dlc/noise/.nyc_output/cce169d2-1730-4a39-9e05-4edcd8b14961.json +1 -0
  411. package/.yalc/@node-dlc/noise/.nyc_output/processinfo/cce169d2-1730-4a39-9e05-4edcd8b14961.json +1 -0
  412. package/.yalc/@node-dlc/noise/.nyc_output/processinfo/index.json +1 -0
  413. package/.yalc/@node-dlc/noise/README.md +165 -0
  414. package/.yalc/@node-dlc/noise/__integration__/ping-pong.spec.ts +85 -0
  415. package/.yalc/@node-dlc/noise/__tests__/noise-server.spec.ts +82 -0
  416. package/.yalc/@node-dlc/noise/__tests__/noise-socket.spec.ts +574 -0
  417. package/.yalc/@node-dlc/noise/__tests__/noise-state.spec.ts +485 -0
  418. package/.yalc/@node-dlc/noise/coverage/lcov-report/base.css +224 -0
  419. package/.yalc/@node-dlc/noise/coverage/lcov-report/block-navigation.js +79 -0
  420. package/.yalc/@node-dlc/noise/coverage/lcov-report/favicon.png +0 -0
  421. package/.yalc/@node-dlc/noise/coverage/lcov-report/handshake-state.ts.html +230 -0
  422. package/.yalc/@node-dlc/noise/coverage/lcov-report/index.html +201 -0
  423. package/.yalc/@node-dlc/noise/coverage/lcov-report/index.ts.html +344 -0
  424. package/.yalc/@node-dlc/noise/coverage/lcov-report/noise-error.ts.html +89 -0
  425. package/.yalc/@node-dlc/noise/coverage/lcov-report/noise-server.ts.html +485 -0
  426. package/.yalc/@node-dlc/noise/coverage/lcov-report/noise-socket.ts.html +1223 -0
  427. package/.yalc/@node-dlc/noise/coverage/lcov-report/noise-state.ts.html +1523 -0
  428. package/.yalc/@node-dlc/noise/coverage/lcov-report/prettify.css +1 -0
  429. package/.yalc/@node-dlc/noise/coverage/lcov-report/prettify.js +2 -0
  430. package/.yalc/@node-dlc/noise/coverage/lcov-report/read-state.ts.html +95 -0
  431. package/.yalc/@node-dlc/noise/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  432. package/.yalc/@node-dlc/noise/coverage/lcov-report/sorter.js +170 -0
  433. package/.yalc/@node-dlc/noise/coverage/lcov.info +565 -0
  434. package/.yalc/@node-dlc/noise/dist/handshake-state.d.ts +46 -0
  435. package/.yalc/@node-dlc/noise/dist/handshake-state.js +51 -0
  436. package/.yalc/@node-dlc/noise/dist/handshake-state.js.map +1 -0
  437. package/.yalc/@node-dlc/noise/dist/index.d.ts +46 -0
  438. package/.yalc/@node-dlc/noise/dist/index.js +69 -0
  439. package/.yalc/@node-dlc/noise/dist/index.js.map +1 -0
  440. package/.yalc/@node-dlc/noise/dist/noise-error.d.ts +3 -0
  441. package/.yalc/@node-dlc/noise/dist/noise-error.js +11 -0
  442. package/.yalc/@node-dlc/noise/dist/noise-error.js.map +1 -0
  443. package/.yalc/@node-dlc/noise/dist/noise-server-listen-options.d.ts +23 -0
  444. package/.yalc/@node-dlc/noise/dist/noise-server-listen-options.js +3 -0
  445. package/.yalc/@node-dlc/noise/dist/noise-server-listen-options.js.map +1 -0
  446. package/.yalc/@node-dlc/noise/dist/noise-server-options.d.ts +13 -0
  447. package/.yalc/@node-dlc/noise/dist/noise-server-options.js +3 -0
  448. package/.yalc/@node-dlc/noise/dist/noise-server-options.js.map +1 -0
  449. package/.yalc/@node-dlc/noise/dist/noise-server.d.ts +71 -0
  450. package/.yalc/@node-dlc/noise/dist/noise-server.js +125 -0
  451. package/.yalc/@node-dlc/noise/dist/noise-server.js.map +1 -0
  452. package/.yalc/@node-dlc/noise/dist/noise-socket-options.d.ts +28 -0
  453. package/.yalc/@node-dlc/noise/dist/noise-socket-options.js +3 -0
  454. package/.yalc/@node-dlc/noise/dist/noise-socket-options.js.map +1 -0
  455. package/.yalc/@node-dlc/noise/dist/noise-socket.d.ts +98 -0
  456. package/.yalc/@node-dlc/noise/dist/noise-socket.js +278 -0
  457. package/.yalc/@node-dlc/noise/dist/noise-socket.js.map +1 -0
  458. package/.yalc/@node-dlc/noise/dist/noise-state-options.d.ts +16 -0
  459. package/.yalc/@node-dlc/noise/dist/noise-state-options.js +3 -0
  460. package/.yalc/@node-dlc/noise/dist/noise-state-options.js.map +1 -0
  461. package/.yalc/@node-dlc/noise/dist/noise-state.d.ts +164 -0
  462. package/.yalc/@node-dlc/noise/dist/noise-state.js +304 -0
  463. package/.yalc/@node-dlc/noise/dist/noise-state.js.map +1 -0
  464. package/.yalc/@node-dlc/noise/dist/read-state.d.ts +5 -0
  465. package/.yalc/@node-dlc/noise/dist/read-state.js +10 -0
  466. package/.yalc/@node-dlc/noise/dist/read-state.js.map +1 -0
  467. package/.yalc/@node-dlc/noise/lib/handshake-state.ts +50 -0
  468. package/.yalc/@node-dlc/noise/lib/index.ts +88 -0
  469. package/.yalc/@node-dlc/noise/lib/noise-error.ts +3 -0
  470. package/.yalc/@node-dlc/noise/lib/noise-server-listen-options.ts +25 -0
  471. package/.yalc/@node-dlc/noise/lib/noise-server-options.ts +13 -0
  472. package/.yalc/@node-dlc/noise/lib/noise-server.ts +135 -0
  473. package/.yalc/@node-dlc/noise/lib/noise-socket-options.ts +32 -0
  474. package/.yalc/@node-dlc/noise/lib/noise-socket.ts +381 -0
  475. package/.yalc/@node-dlc/noise/lib/noise-state-options.ts +18 -0
  476. package/.yalc/@node-dlc/noise/lib/noise-state.ts +481 -0
  477. package/.yalc/@node-dlc/noise/lib/read-state.ts +5 -0
  478. package/.yalc/@node-dlc/noise/package.json +35 -0
  479. package/.yalc/@node-dlc/noise/tsconfig-build.json +7 -0
  480. package/.yalc/@node-dlc/noise/tsconfig.json +4 -0
  481. package/.yalc/@node-dlc/noise/yalc.sig +1 -0
  482. package/CHANGELOG.md +39 -5
  483. package/dist/dlc.d.ts +99 -2
  484. package/dist/index.d.ts +1 -1
  485. package/dist/index.js +2 -1
  486. package/dist/index.js.map +1 -1
  487. package/dist/models/Amount.js +1 -0
  488. package/dist/models/Amount.js.map +1 -1
  489. package/dist/models/Input.d.ts +30 -1
  490. package/dist/models/Input.js +42 -9
  491. package/dist/models/Input.js.map +1 -1
  492. package/dist/models/Outcome.js +1 -0
  493. package/dist/models/Outcome.js.map +1 -1
  494. package/dist/models/Utxo.js +9 -11
  495. package/dist/models/Utxo.js.map +1 -1
  496. package/dist/transaction.js.map +1 -1
  497. package/lib/block.ts +1 -0
  498. package/lib/dlc.ts +125 -1
  499. package/lib/index.ts +7 -1
  500. package/lib/models/Amount.ts +1 -0
  501. package/lib/models/Input.ts +73 -8
  502. package/lib/models/Outcome.ts +1 -0
  503. package/lib/models/Utxo.ts +19 -11
  504. package/lib/transaction.ts +1 -0
  505. package/lib/wallet.ts +1 -0
  506. package/package.json +4 -4
  507. package/yalc.lock +12 -2
  508. package/.yalc/@node-dlc/messaging/.nyc_output/2cf48009-1094-4275-bb91-c164c932feb6.json +0 -1
  509. package/.yalc/@node-dlc/messaging/.nyc_output/processinfo/2cf48009-1094-4275-bb91-c164c932feb6.json +0 -1
@@ -0,0 +1,481 @@
1
+ import { ccpDecrypt, ccpEncrypt, ecdh, hkdf, sha256 } from '@node-dlc/crypto';
2
+ import { getPublicKey } from '@node-dlc/crypto';
3
+ import { ILogger } from '@node-dlc/logger';
4
+
5
+ import { NoiseStateOptions } from './noise-state-options';
6
+
7
+ export class NoiseState {
8
+ public logger: ILogger;
9
+
10
+ /**
11
+ * The official protocol name for the Lightning variant of Noise. This
12
+ * value is mixed into the iniitialiization function to start the
13
+ * handshake.
14
+ */
15
+ public protocolName = Buffer.from('Noise_XK_secp256k1_ChaChaPoly_SHA256');
16
+
17
+ /**
18
+ * Appended to the hash of the protocolName during initialization.
19
+ */
20
+ public prologue = Buffer.from('lightning');
21
+
22
+ /**
23
+ * Local secret is a 32-bit private key valid in elliptic curve
24
+ * secp256k1. This value is unique to the node and should be
25
+ * chosen with strong cryptographic randomness.
26
+ */
27
+ public ls: Buffer;
28
+
29
+ /**
30
+ * Local compressed public key derviced from the local secret `ls`.
31
+ * This value is stored as a 33-byte buffer.
32
+ */
33
+ public lpk: Buffer;
34
+
35
+ /**
36
+ * Ephemeral secret is a 32-bit private key valid in elliptic curve
37
+ * secp256k1. This value is generated by each node for each connection.
38
+ * This value must be generated with strong cryptographic randomness.
39
+ */
40
+ public es: Buffer;
41
+
42
+ /**
43
+ * Ephemeral compressed public key derived from the ephemeral secret
44
+ * `es`. This value is stored as a 33-byte buffer.
45
+ */
46
+ public epk: Buffer;
47
+
48
+ /**
49
+ * Remote compressed public key stored as a 33-byte buffer.
50
+ */
51
+ public rpk: Buffer;
52
+
53
+ /**
54
+ * Remote party's ephemeral public key as a 33-byte buffer storing
55
+ * the compressed public key. This value is extracted in act 2 where
56
+ * it is sent during act 1 to the opposing side.
57
+ */
58
+ public repk: Buffer;
59
+
60
+ /**
61
+ * Hanshake hash. This value is the accumulated hash of all handshake data that
62
+ * has been sent and received during the handshake process.
63
+ */
64
+ public h: Buffer;
65
+
66
+ /**
67
+ * Chaining key. This value is the accumulated hash of all previous ECDH outputs.
68
+ * At the end of the handshake, `ck` is used to dervice the encryption keys
69
+ * for messages.
70
+ */
71
+ public ck: Buffer;
72
+
73
+ /**
74
+ * The key used is the receiving key used to decrypt messages sent by the
75
+ * other side. It is generated in Act3.
76
+ */
77
+ public rk: Buffer;
78
+
79
+ /**
80
+ * The key used by the sender to encrypt messages to the receiver. This value
81
+ * is generated in Act3.
82
+ */
83
+ public sk: Buffer;
84
+
85
+ /**
86
+ * Nonce incremented when sending messages. Initialized to zero in Act3.
87
+ */
88
+ public sn: Buffer;
89
+
90
+ /**
91
+ * Nonce incremented when receiving messages. Initialized to zero in Act3.
92
+ */
93
+ public rn: Buffer;
94
+
95
+ /**
96
+ * Intermediate key 1. Used to encrypt or decrypt the zero-length AEAD
97
+ * payload in the corresponding initiator or receiver act.
98
+ */
99
+ public tempK1: Buffer;
100
+
101
+ /**
102
+ * Intermediate key 2. Used to encrypt or decrypt the zero-length AEAD
103
+ * payload in the corresponding initiator or receiver act.
104
+ */
105
+ public tempK2: Buffer;
106
+
107
+ /**
108
+ * Intermediate key 3. Used to encrypt or decrypt the zero-length AEAD
109
+ * payload in the corresponding initiator or receiver act.
110
+ */
111
+ public tempK3: Buffer;
112
+
113
+ /**
114
+ * State machine for perforing noise-protocol handshake, message
115
+ * encryption and decryption, and key rotation.
116
+ */
117
+ constructor({ ls, es, logger }: NoiseStateOptions) {
118
+ this.logger = logger;
119
+ this.ls = ls;
120
+ this.lpk = getPublicKey(ls);
121
+ this.es = es;
122
+ this.epk = getPublicKey(es);
123
+ }
124
+
125
+ /**
126
+ * Initiator Act1 is the starting point for the authenticated key exchange
127
+ * handshake. The initiator attempts to satisfy an implicit challenge by the
128
+ * responder: knowledge of the static public key of the responder. It also
129
+ * transmits the initiators ephemeral key.
130
+ * @param rpk remote public key
131
+ * @return Buffer that is 50 bytes
132
+ */
133
+ public initiatorAct1(rpk: Buffer): Buffer {
134
+ if (this.logger) this.logger.debug('initiator act1');
135
+ this.rpk = rpk;
136
+ this._initialize(this.rpk);
137
+
138
+ // 2. h = SHA-256(h || epk)
139
+ this.h = sha256(Buffer.concat([this.h, this.epk]));
140
+
141
+ // 3. es = ECDH(e.priv, rs)
142
+ const ss = ecdh(this.rpk, this.es);
143
+
144
+ // 4. ck, temp_k1 = HKDF(ck, es)
145
+ const tempK1 = hkdf(ss, 64, this.ck);
146
+ this.ck = tempK1.slice(0, 32);
147
+ this.tempK1 = tempK1.slice(32);
148
+
149
+ // 5. c = encryptWithAD(temp_k1, 0, h, zero)
150
+ const c = ccpEncrypt(
151
+ this.tempK1,
152
+ Buffer.alloc(12),
153
+ this.h,
154
+ Buffer.alloc(0),
155
+ );
156
+
157
+ // 6. h = SHA-256(h || c)
158
+ this.h = sha256(Buffer.concat([this.h, c]));
159
+
160
+ // 7. m = 0 || epk || c
161
+ const m = Buffer.concat([Buffer.alloc(1), this.epk, c]);
162
+ return m;
163
+ }
164
+
165
+ /**
166
+ * Initiator Act2 handles the response generated by the receiver's
167
+ * Act1, a 50-byte message. The responder's ephemeral key is extacted
168
+ * from the message during this phase.
169
+ *
170
+ * @param m 50-byte message from responder's act1
171
+ */
172
+ public initiatorAct2(m: Buffer): void {
173
+ if (this.logger) this.logger.debug('initiator act2');
174
+
175
+ // 1. read exactly 50 bytes off the stream
176
+ if (m.length !== 50) throw new Error('ACT2_READ_FAILED');
177
+
178
+ // 2. parse th read message m into v, re, and c
179
+ const v = m.slice(0, 1)[0];
180
+ const re = m.slice(1, 34);
181
+ const c = m.slice(34);
182
+
183
+ // 2a. convert re to public key
184
+ this.repk = re;
185
+
186
+ // 3. assert version is known version
187
+ if (v !== 0) throw new Error('ACT2_BAD_VERSION');
188
+
189
+ // 4. sha256(h || re.serializedCompressed');
190
+ this.h = sha256(Buffer.concat([this.h, this.repk]));
191
+
192
+ // 5. ss = ECDH(re, e.priv);
193
+ const ss = ecdh(this.repk, this.es);
194
+
195
+ // 6. ck, temp_k2 = HKDF(cd, ss)
196
+ const tempK2 = hkdf(ss, 64, this.ck);
197
+ this.ck = tempK2.slice(0, 32);
198
+ this.tempK2 = tempK2.slice(32);
199
+
200
+ // 7. p = decryptWithAD()
201
+ ccpDecrypt(this.tempK2, Buffer.alloc(12), this.h, c);
202
+
203
+ // 8. h = sha256(h || c)
204
+ this.h = sha256(Buffer.concat([this.h, c]));
205
+ }
206
+
207
+ /**
208
+ * Initiator Act3 is the final phase in the authenticated
209
+ * key agreement. This act is executed only if act 2
210
+ * was successful. The initiator transports its static public key
211
+ * to the responder.
212
+ */
213
+ public initiatorAct3(): Buffer {
214
+ if (this.logger) this.logger.debug('initiator act3');
215
+
216
+ // 1. c = encryptWithAD(temp_k2, 1, h, lpk)
217
+ const c = ccpEncrypt(
218
+ this.tempK2,
219
+ Buffer.from([0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]),
220
+ this.h,
221
+ this.lpk,
222
+ );
223
+
224
+ // 2. h = sha256(h || c)
225
+ this.h = sha256(Buffer.concat([this.h, c]));
226
+
227
+ // 3. ss = ECDH(re, s.priv)
228
+ const ss = ecdh(this.repk, this.ls);
229
+
230
+ // 4. ck, temp_k3 = HKDF(ck, ss)
231
+ const tempK3 = hkdf(ss, 64, this.ck);
232
+ this.ck = tempK3.slice(0, 32);
233
+ this.tempK3 = tempK3.slice(32);
234
+
235
+ // 5. t = encryptWithAD(temp_k3, 0, h, zero)
236
+ const t = ccpEncrypt(
237
+ this.tempK3,
238
+ Buffer.alloc(12),
239
+ this.h,
240
+ Buffer.alloc(0),
241
+ );
242
+
243
+ // 6. sk, rk = hkdf(ck, zero)
244
+ const sk = hkdf(Buffer.alloc(0), 64, this.ck);
245
+ this.rk = sk.slice(32);
246
+ this.sk = sk.slice(0, 32);
247
+
248
+ // 7. rn = 0, sn = 0
249
+ this.sn = Buffer.alloc(12);
250
+ this.rn = Buffer.alloc(12);
251
+
252
+ // 8. send m = 0 || c || t
253
+ const m = Buffer.concat([Buffer.alloc(1), c, t]);
254
+ return m;
255
+ }
256
+
257
+ /**
258
+ * Receiver Act1 extracts the initiators ephemeral key. It also
259
+ * validates that the initiator knows the receivers public key.
260
+ * @param m 50-byte message sent by the initiator
261
+ */
262
+ public receiveAct1(m: Buffer): void {
263
+ this._initialize(this.lpk);
264
+
265
+ if (this.logger) this.logger.debug('receive act1');
266
+
267
+ // 1. read exactly 50 bytes off the stream
268
+ if (m.length !== 50) throw new Error('ACT1_READ_FAILED');
269
+
270
+ // 2. parse th read message m into v,re, and c
271
+ const v = m.slice(0, 1)[0];
272
+ const re = m.slice(1, 34);
273
+ const c = m.slice(34);
274
+ this.repk = re;
275
+
276
+ // 3. assert version is known version
277
+ if (v !== 0) throw new Error('ACT1_BAD_VERSION');
278
+
279
+ // 4. sha256(h || re.serializedCompressed');
280
+ this.h = sha256(Buffer.concat([this.h, re]));
281
+
282
+ // 5. ss = ECDH(re, ls.priv);
283
+ const ss = ecdh(re, this.ls);
284
+
285
+ // 6. ck, temp_k1 = HKDF(cd, ss)
286
+ const tempK1 = hkdf(ss, 64, this.ck);
287
+ this.ck = tempK1.slice(0, 32);
288
+ this.tempK1 = tempK1.slice(32);
289
+
290
+ // 7. p = decryptWithAD(temp_k1, 0, h, c)
291
+ ccpDecrypt(this.tempK1, Buffer.alloc(12), this.h, c);
292
+
293
+ // 8. h = sha256(h || c)
294
+ this.h = sha256(Buffer.concat([this.h, c]));
295
+ }
296
+
297
+ /**
298
+ * Receiver Act2 takes place only if Act1 was successful.
299
+ * This act sends responder's ephermeral key to the initiator.
300
+ */
301
+ public recieveAct2(): Buffer {
302
+ // 1. e = generateKey() => done in initialization
303
+
304
+ // 2. h = sha256(h || e.pub.compressed())
305
+ this.h = sha256(Buffer.concat([this.h, this.epk]));
306
+
307
+ // 3. ss = ecdh(re, e.priv)
308
+ const ss = ecdh(this.repk, this.es);
309
+
310
+ // 4. ck, temp_k2 = hkdf(ck, ss)
311
+ const tempK2 = hkdf(ss, 64, this.ck);
312
+ this.ck = tempK2.slice(0, 32);
313
+ this.tempK2 = tempK2.slice(32);
314
+
315
+ // 5. c = encryptWithAd(temp_k2, 0, h, zero)
316
+ const c = ccpEncrypt(
317
+ this.tempK2,
318
+ Buffer.alloc(12),
319
+ this.h,
320
+ Buffer.alloc(0),
321
+ );
322
+
323
+ // 6. h = sha256(h || c)
324
+ this.h = sha256(Buffer.concat([this.h, c]));
325
+
326
+ // 7. m = 0 || e.pub.compressed() Z|| c
327
+ const m = Buffer.concat([Buffer.alloc(1), this.epk, c]);
328
+ return m;
329
+ }
330
+
331
+ /**
332
+ * Receiver Act3 is the final phase in the authenticated key
333
+ * agreement. This act is executed only if act 2 was successful.
334
+ * The receiver extracts the public key of the initiator.
335
+ * @param m 66-byte message
336
+ */
337
+ public receiveAct3(m: Buffer): void {
338
+ // 1. read exactly 66 bytes from the network buffer
339
+ if (m.length !== 66) throw new Error('ACT3_READ_FAILED');
340
+
341
+ // 2. parse m into v, c, t
342
+ const v = m.slice(0, 1)[0];
343
+ const c = m.slice(1, 50);
344
+ const t = m.slice(50);
345
+
346
+ // 3. validate v is recognized
347
+ if (v !== 0) throw new Error('ACT3_BAD_VERSION');
348
+
349
+ // 4. rs = decryptWithAD(temp_k2, 1, h, c)
350
+ const rs = ccpDecrypt(
351
+ this.tempK2,
352
+ Buffer.from('000000000100000000000000', 'hex'),
353
+ this.h,
354
+ c,
355
+ );
356
+ this.rpk = rs;
357
+
358
+ // 5. h = sha256(h || c)
359
+ this.h = sha256(Buffer.concat([this.h, c]));
360
+
361
+ // 6. ss = ECDH(rs, e.priv)
362
+ const ss = ecdh(this.rpk, this.es);
363
+
364
+ // 7. ck, temp_k3 = hkdf(cs, ss)
365
+ const tempK3 = hkdf(ss, 64, this.ck);
366
+ this.ck = tempK3.slice(0, 32);
367
+ this.tempK3 = tempK3.slice(32);
368
+
369
+ // 8. p = decryptWithAD(temp_k3, 0, h, t)
370
+ ccpDecrypt(this.tempK3, Buffer.alloc(12), this.h, t);
371
+
372
+ // 9. rk, sk = hkdf(ck, zero)
373
+ const sk = hkdf(Buffer.alloc(0), 64, this.ck);
374
+ this.rk = sk.slice(0, 32);
375
+ this.sk = sk.slice(32);
376
+
377
+ // 10. rn = 0, sn = 0
378
+ this.rn = Buffer.alloc(12);
379
+ this.sn = Buffer.alloc(12);
380
+ }
381
+
382
+ /**
383
+ * Sends an encrypted message using the shared sending key and nonce.
384
+ * The nonce is rotated once the message is sent. The sending key is
385
+ * rotated every 1000 messages.
386
+ * @param m
387
+ */
388
+ public encryptMessage(m: Buffer): Buffer {
389
+ // step 1/2. serialize m length into int16
390
+ const l = Buffer.alloc(2);
391
+ l.writeUInt16BE(m.length, 0);
392
+
393
+ // step 3. encrypt l, using chachapoly1305, sn, sk)
394
+ const lc = ccpEncrypt(this.sk, this.sn, Buffer.alloc(0), l);
395
+
396
+ // step 3a: increment sn
397
+ if (this._incrementSendingNonce() >= 1000) this._rotateSendingKeys();
398
+
399
+ // step 4 encrypt m using chachapoly1305, sn, sk
400
+ const c = ccpEncrypt(this.sk, this.sn, Buffer.alloc(0), m);
401
+
402
+ // step 4a: increment sn
403
+ if (this._incrementSendingNonce() >= 1000) this._rotateSendingKeys();
404
+
405
+ // step 5 return m to be sent
406
+ return Buffer.concat([lc, c]);
407
+ }
408
+
409
+ /**
410
+ * Decrypts the length of the message using the receiving key and nonce.
411
+ * The receiving key is rotated every 1000 messages.
412
+ */
413
+ public decryptLength(lc: Buffer): number {
414
+ const l = ccpDecrypt(this.rk, this.rn, Buffer.alloc(0), lc);
415
+
416
+ if (this._incrementRecievingNonce() >= 1000) this._rotateRecievingKeys();
417
+
418
+ return l.readUInt16BE(0);
419
+ }
420
+
421
+ /**
422
+ * Decrypts the message using the receiving key and nonce. The receiving
423
+ * key is rotated every 1000 messages.
424
+ */
425
+ public decryptMessage(c: Buffer): Buffer {
426
+ const m = ccpDecrypt(this.rk, this.rn, Buffer.alloc(0), c);
427
+
428
+ if (this._incrementRecievingNonce() >= 1000) this._rotateRecievingKeys();
429
+
430
+ return m;
431
+ }
432
+
433
+ /////////////////////////////////////
434
+
435
+ /**
436
+ * Initializes the noise state prior to Act1.
437
+ */
438
+ private _initialize(pubkey: Buffer) {
439
+ if (this.logger) this.logger.debug('initialize noise state');
440
+
441
+ // 1. h = SHA-256(protocolName)
442
+ this.h = sha256(Buffer.from(this.protocolName));
443
+
444
+ // 2. ck = h
445
+ this.ck = this.h;
446
+
447
+ // 3. h = SHA-256(h || prologue)
448
+ this.h = sha256(Buffer.concat([this.h, this.prologue]));
449
+
450
+ // 4. h = SHA-256(h || pubkey)
451
+ this.h = sha256(Buffer.concat([this.h, pubkey]));
452
+ }
453
+
454
+ private _incrementSendingNonce() {
455
+ const newValue = this.sn.readUInt16LE(4) + 1;
456
+ this.sn.writeUInt16LE(newValue, 4);
457
+ return newValue;
458
+ }
459
+
460
+ private _incrementRecievingNonce() {
461
+ const newValue = this.rn.readUInt16LE(4) + 1;
462
+ this.rn.writeUInt16LE(newValue, 4);
463
+ return newValue;
464
+ }
465
+
466
+ private _rotateSendingKeys() {
467
+ if (this.logger) this.logger.debug('rotating sending key');
468
+ const result = hkdf(this.sk, 64, this.ck);
469
+ this.sk = result.slice(32);
470
+ this.ck = result.slice(0, 32);
471
+ this.sn = Buffer.alloc(12);
472
+ }
473
+
474
+ private _rotateRecievingKeys() {
475
+ if (this.logger) this.logger.debug('rotating receiving key');
476
+ const result = hkdf(this.rk, 64, this.ck);
477
+ this.rk = result.slice(32);
478
+ this.ck = result.slice(0, 32);
479
+ this.rn = Buffer.alloc(12);
480
+ }
481
+ }
@@ -0,0 +1,5 @@
1
+ export enum READ_STATE {
2
+ READY_FOR_LEN = 2,
3
+ READY_FOR_BODY = 3,
4
+ BLOCKED = 4,
5
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@node-dlc/noise",
3
+ "version": "1.0.1",
4
+ "description": "BOLT 8 Lightning Network Noise Protocol Socket",
5
+ "main": "dist/index.js",
6
+ "scripts": {
7
+ "test": "../../node_modules/.bin/nyc --reporter=lcov --reporter=text --extension=.ts --exclude \"__integration__\" --exclude \"__tests__\" ../../node_modules/.bin/mocha --require ts-node/register --recursive \"__tests__/**/*.spec.*\" --recursive \"__integration__/**/*.spec.*\"",
8
+ "lint": "../../node_modules/.bin/eslint lib/**/*",
9
+ "lint:fix": "../../node_modules/.bin/eslint lib/**/* --fix",
10
+ "build": "../../node_modules/.bin/tsc --project ./tsconfig-build.json"
11
+ },
12
+ "keywords": [
13
+ "lightning network",
14
+ "bolt-8",
15
+ "noise protocol",
16
+ "socket",
17
+ "server",
18
+ "bitcoin"
19
+ ],
20
+ "author": "Brian Mancini <bmancini@gmail.com>",
21
+ "homepage": "https://github.com/atomicfinance/node-dlc/tree/master/packages/noise",
22
+ "license": "MIT",
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/atomicfinance/node-dlc.git"
26
+ },
27
+ "dependencies": {
28
+ "@node-dlc/crypto": "^1.0.1",
29
+ "@node-dlc/logger": "^1.0.1"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "yalcSig": "c7b8a3d4f548fa3387f48afc06c9fb04"
35
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist"
5
+ },
6
+ "include": ["lib"]
7
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "include": ["lib", "__tests__"]
4
+ }
@@ -0,0 +1 @@
1
+ c7b8a3d4f548fa3387f48afc06c9fb04
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @atomicfinance/types
2
2
 
3
+ ## 4.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 03c6974: Add DLC input splicing support
8
+
9
+ This release introduces DLC (Discreet Log Contract) input splicing functionality, enabling more flexible contract funding and management.
10
+
11
+ ## Key Features
12
+ - **Core Types**: Added new types and interfaces for DLC input splicing operations
13
+ - **Provider Integration**: Implemented splicing support in BitcoinDlcProvider with proper input handling
14
+ - **Comprehensive Testing**: Added integration tests to validate splicing functionality
15
+ - **Dependency Updates**: Upgraded @node-dlc to v1.1.0 for enhanced splicing capabilities
16
+
17
+ ## What's New
18
+ - DLC contracts can now be funded using spliced inputs
19
+ - Enhanced input selection and handling for splicing operations
20
+ - Improved test coverage for edge cases in DLC splicing scenarios
21
+
22
+ This feature enables more efficient Bitcoin transaction management when working with DLC contracts by allowing existing UTXOs to be split and used as contract inputs.
23
+
24
+ - d94fbbf: Fix TypeScript ESLint compatibility and improve type safety
25
+ - Upgrade @typescript-eslint dependencies to v6.21.0 for TypeScript 4.9.5 support
26
+
27
+ - b83e3a8: Add single-funded DLC support and update to node-dlc v1.0.1
28
+ - Add comprehensive single-funded DLC support to BitcoinDlcProvider
29
+ - Update @node-dlc dependencies to v1.0.1 with single-funded support
30
+ - Update cfd-dlc-js to v0.0.52
31
+ - Implement single-funded DLC detection and validation logic
32
+ - Handle acceptDlcOffer with 0 collateral scenarios (no funding)
33
+ - Fix fundTxVout calculation for parties with collateral only
34
+ - Add getFundOutputValueSats helper with proper error handling
35
+ - Add markAsSingleFunded() calls for proper DLC type identification
36
+ - Skip funding validation when accept collateral is 0
37
+ - Generate addresses/keys without requiring funding inputs
38
+
39
+ Enables single-funded DLCs where one party provides all collateral
40
+ while the other party participates without funding inputs.
41
+
3
42
  ## 4.0.0
4
43
 
5
44
  ### Major Changes
@@ -11,13 +50,11 @@
11
50
  This release upgrades to @node-dlc v1.0.0 with significant breaking changes:
12
51
 
13
52
  ### Dependencies
14
-
15
53
  - Upgraded @node-dlc packages from 0.24.0 to ^1.0.0
16
54
  - Minimum Node.js version now 18.18.2
17
55
  - Added decimal.js dependency for F64 type support
18
56
 
19
57
  ### API Changes
20
-
21
58
  - **Message Types**: Removed versioned suffixes (DlcOfferV0 → DlcOffer)
22
59
  - **Property Names**:
23
60
  - `fundingPubKey` → `fundingPubkey`
@@ -27,14 +64,12 @@
27
64
  - `tempContractId` → `temporaryContractId`
28
65
 
29
66
  ### Type System
30
-
31
67
  - **Contract Descriptors**: V0/V1 types replaced with Enumerated/Numerical descriptors
32
68
  - **Oracle Types**: OracleInfoV0 → SingleOracleInfo/MultiOracleInfo
33
69
  - **Message Validation**: Switched from type-based to property-based checking
34
70
  - **Enum Outcomes**: Migrated from Buffer to string format
35
71
 
36
72
  ### New Features
37
-
38
73
  - Enhanced oracle event descriptor handling
39
74
  - Improved decimal precision with F64 types
40
75
  - Fallback outcome index search algorithm
@@ -57,7 +92,6 @@
57
92
  ```
58
93
 
59
94
  ### Environment
60
-
61
95
  - Update Node.js to 18.18.2+
62
96
  - Run `yarn install` to update dependencies
63
97
  - Review custom DLC implementations for compatibility