@atomicfinance/bitcoin-dlc-provider 4.0.0 → 4.0.2
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.
- package/.turbo/turbo-lint.log +1 -0
- package/.yalc/@node-dlc/bitcoin/.nyc_output/982e80bf-a70c-452f-b63d-d749ae385531.json +1 -0
- package/.yalc/@node-dlc/bitcoin/.nyc_output/processinfo/982e80bf-a70c-452f-b63d-d749ae385531.json +1 -0
- package/.yalc/@node-dlc/bitcoin/.nyc_output/processinfo/index.json +1 -0
- package/.yalc/@node-dlc/bitcoin/README.md +11 -0
- package/.yalc/@node-dlc/bitcoin/__tests__/bitcoin/amount.spec.ts +330 -0
- package/.yalc/@node-dlc/bitcoin/__tests__/bitcoin/value.spec.ts +320 -0
- package/.yalc/@node-dlc/bitcoin/__tests__/tsconfig.json +8 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Amount.ts.html +290 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Base58.ts.html +269 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Base58Check.ts.html +182 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/BitcoinError.ts.html +173 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/BitcoinErrorCode.ts.html +110 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/HashByteOrder.ts.html +143 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/HashValue.ts.html +350 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/LexicographicalSorters.ts.html +191 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/LockTime.ts.html +386 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/OpCodes.ts.html +437 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/OutPoint.ts.html +383 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Script.ts.html +1607 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Sequence.ts.html +713 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/SigHashType.ts.html +137 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Stack.ts.html +323 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/TimeLockMode.ts.html +128 -0
- package/.yalc/@node-dlc/{messaging/coverage/lcov-report/lib/serde/SerdeUtils.ts.html → bitcoin/coverage/lcov-report/Tx.ts.html} +617 -491
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/TxBuilder.ts.html +971 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/TxIn.ts.html +425 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/TxOut.ts.html +341 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Value.ts.html +683 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Wif.ts.html +311 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/Witness.ts.html +275 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/base.css +224 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/block-navigation.js +79 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/favicon.png +0 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/index.html +126 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/index.ts.html +164 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/prettify.css +1 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/prettify.js +2 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov-report/sorter.js +170 -0
- package/.yalc/@node-dlc/bitcoin/coverage/lcov.info +123 -0
- package/.yalc/@node-dlc/bitcoin/dist/Amount.d.ts +48 -0
- package/.yalc/@node-dlc/bitcoin/dist/Amount.js +68 -0
- package/.yalc/@node-dlc/bitcoin/dist/Amount.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/Base58.d.ts +22 -0
- package/.yalc/@node-dlc/bitcoin/dist/Base58.js +62 -0
- package/.yalc/@node-dlc/bitcoin/dist/Base58.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/Base58Check.d.ts +14 -0
- package/.yalc/@node-dlc/bitcoin/dist/Base58Check.js +36 -0
- package/.yalc/@node-dlc/bitcoin/dist/Base58Check.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/BitcoinError.d.ts +6 -0
- package/.yalc/@node-dlc/bitcoin/dist/BitcoinError.js +36 -0
- package/.yalc/@node-dlc/bitcoin/dist/BitcoinError.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/BitcoinErrorCode.d.ts +10 -0
- package/.yalc/@node-dlc/bitcoin/dist/BitcoinErrorCode.js +15 -0
- package/.yalc/@node-dlc/bitcoin/dist/BitcoinErrorCode.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/Block.d.ts +19 -0
- package/.yalc/@node-dlc/bitcoin/dist/Block.js +3 -0
- package/.yalc/@node-dlc/bitcoin/dist/Block.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/HashByteOrder.d.ts +20 -0
- package/.yalc/@node-dlc/bitcoin/dist/HashByteOrder.js +25 -0
- package/.yalc/@node-dlc/bitcoin/dist/HashByteOrder.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/HashValue.d.ts +55 -0
- package/.yalc/@node-dlc/bitcoin/dist/HashValue.js +82 -0
- package/.yalc/@node-dlc/bitcoin/dist/HashValue.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/ICloneable.d.ts +3 -0
- package/.yalc/@node-dlc/bitcoin/dist/ICloneable.js +3 -0
- package/.yalc/@node-dlc/bitcoin/dist/ICloneable.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/LexicographicalSorters.d.ts +18 -0
- package/.yalc/@node-dlc/bitcoin/dist/LexicographicalSorters.js +41 -0
- package/.yalc/@node-dlc/bitcoin/dist/LexicographicalSorters.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/LockTime.d.ts +61 -0
- package/.yalc/@node-dlc/bitcoin/dist/LockTime.js +94 -0
- package/.yalc/@node-dlc/bitcoin/dist/LockTime.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/OpCodes.d.ts +102 -0
- package/.yalc/@node-dlc/bitcoin/dist/OpCodes.js +116 -0
- package/.yalc/@node-dlc/bitcoin/dist/OpCodes.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/OutPoint.d.ts +57 -0
- package/.yalc/@node-dlc/bitcoin/dist/OutPoint.js +88 -0
- package/.yalc/@node-dlc/bitcoin/dist/OutPoint.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/Script.d.ts +185 -0
- package/.yalc/@node-dlc/bitcoin/dist/Script.js +404 -0
- package/.yalc/@node-dlc/bitcoin/dist/Script.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/ScriptCmd.d.ts +3 -0
- package/.yalc/@node-dlc/bitcoin/dist/ScriptCmd.js +3 -0
- package/.yalc/@node-dlc/bitcoin/dist/ScriptCmd.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/Sequence.d.ts +116 -0
- package/.yalc/@node-dlc/bitcoin/dist/Sequence.js +187 -0
- package/.yalc/@node-dlc/bitcoin/dist/Sequence.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/SigHashType.d.ts +7 -0
- package/.yalc/@node-dlc/bitcoin/dist/SigHashType.js +27 -0
- package/.yalc/@node-dlc/bitcoin/dist/SigHashType.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/SizeResult.d.ts +5 -0
- package/.yalc/@node-dlc/bitcoin/dist/SizeResult.js +3 -0
- package/.yalc/@node-dlc/bitcoin/dist/SizeResult.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/Sorter.d.ts +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/Sorter.js +3 -0
- package/.yalc/@node-dlc/bitcoin/dist/Sorter.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/Stack.d.ts +15 -0
- package/.yalc/@node-dlc/bitcoin/dist/Stack.js +77 -0
- package/.yalc/@node-dlc/bitcoin/dist/Stack.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/TimeLockMode.d.ts +15 -0
- package/.yalc/@node-dlc/bitcoin/dist/TimeLockMode.js +20 -0
- package/.yalc/@node-dlc/bitcoin/dist/TimeLockMode.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/Tx.d.ts +150 -0
- package/.yalc/@node-dlc/bitcoin/dist/Tx.js +408 -0
- package/.yalc/@node-dlc/bitcoin/dist/Tx.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/TxBuilder.d.ts +110 -0
- package/.yalc/@node-dlc/bitcoin/dist/TxBuilder.js +238 -0
- package/.yalc/@node-dlc/bitcoin/dist/TxBuilder.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/TxIn.d.ts +71 -0
- package/.yalc/@node-dlc/bitcoin/dist/TxIn.js +79 -0
- package/.yalc/@node-dlc/bitcoin/dist/TxIn.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/TxOut.d.ts +57 -0
- package/.yalc/@node-dlc/bitcoin/dist/TxOut.js +68 -0
- package/.yalc/@node-dlc/bitcoin/dist/TxOut.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/Value.d.ts +122 -0
- package/.yalc/@node-dlc/bitcoin/dist/Value.js +180 -0
- package/.yalc/@node-dlc/bitcoin/dist/Value.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/Wif.d.ts +41 -0
- package/.yalc/@node-dlc/bitcoin/dist/Wif.js +62 -0
- package/.yalc/@node-dlc/bitcoin/dist/Wif.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/Witness.d.ts +41 -0
- package/.yalc/@node-dlc/bitcoin/dist/Witness.js +63 -0
- package/.yalc/@node-dlc/bitcoin/dist/Witness.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/dist/index.d.ts +28 -0
- package/.yalc/@node-dlc/bitcoin/dist/index.js +45 -0
- package/.yalc/@node-dlc/bitcoin/dist/index.js.map +1 -0
- package/.yalc/@node-dlc/bitcoin/lib/Amount.ts +70 -0
- package/.yalc/@node-dlc/bitcoin/lib/Base58.ts +63 -0
- package/.yalc/@node-dlc/bitcoin/lib/Base58Check.ts +34 -0
- package/.yalc/@node-dlc/bitcoin/lib/BitcoinError.ts +31 -0
- package/.yalc/@node-dlc/bitcoin/lib/BitcoinErrorCode.ts +10 -0
- package/.yalc/@node-dlc/bitcoin/lib/Block.ts +20 -0
- package/.yalc/@node-dlc/bitcoin/lib/HashByteOrder.ts +21 -0
- package/.yalc/@node-dlc/bitcoin/lib/HashValue.ts +90 -0
- package/.yalc/@node-dlc/bitcoin/lib/ICloneable.ts +3 -0
- package/.yalc/@node-dlc/bitcoin/lib/LexicographicalSorters.ts +37 -0
- package/.yalc/@node-dlc/bitcoin/lib/LockTime.ts +102 -0
- package/.yalc/@node-dlc/bitcoin/lib/OpCodes.ts +119 -0
- package/.yalc/@node-dlc/bitcoin/lib/OutPoint.ts +101 -0
- package/.yalc/@node-dlc/bitcoin/lib/Script.ts +509 -0
- package/.yalc/@node-dlc/bitcoin/lib/ScriptCmd.ts +3 -0
- package/.yalc/@node-dlc/bitcoin/lib/Sequence.ts +211 -0
- package/.yalc/@node-dlc/bitcoin/lib/SigHashType.ts +19 -0
- package/.yalc/@node-dlc/bitcoin/lib/SizeResult.ts +5 -0
- package/.yalc/@node-dlc/bitcoin/lib/Sorter.ts +1 -0
- package/.yalc/@node-dlc/bitcoin/lib/Stack.ts +81 -0
- package/.yalc/@node-dlc/bitcoin/lib/TimeLockMode.ts +16 -0
- package/.yalc/@node-dlc/bitcoin/lib/Tx.ts +480 -0
- package/.yalc/@node-dlc/bitcoin/lib/TxBuilder.ts +297 -0
- package/.yalc/@node-dlc/bitcoin/lib/TxIn.ts +115 -0
- package/.yalc/@node-dlc/bitcoin/lib/TxOut.ts +87 -0
- package/.yalc/@node-dlc/bitcoin/lib/Value.ts +201 -0
- package/.yalc/@node-dlc/bitcoin/lib/Wif.ts +77 -0
- package/.yalc/@node-dlc/bitcoin/lib/Witness.ts +65 -0
- package/.yalc/@node-dlc/bitcoin/lib/index.ts +28 -0
- package/.yalc/@node-dlc/bitcoin/package.json +31 -0
- package/.yalc/@node-dlc/bitcoin/tsconfig.json +8 -0
- package/.yalc/@node-dlc/bitcoin/yalc.sig +1 -0
- package/.yalc/@node-dlc/bufio/.eslintrc +6 -0
- package/.yalc/@node-dlc/bufio/.nyc_output/3c26c5b3-2a5e-4a53-88d4-06f4a5c339f7.json +1 -0
- package/.yalc/@node-dlc/bufio/.nyc_output/processinfo/3c26c5b3-2a5e-4a53-88d4-06f4a5c339f7.json +1 -0
- package/.yalc/@node-dlc/bufio/.nyc_output/processinfo/index.json +1 -0
- package/.yalc/@node-dlc/bufio/README.md +68 -0
- package/.yalc/@node-dlc/bufio/__tests__/BufferReader.spec.ts +548 -0
- package/.yalc/@node-dlc/bufio/__tests__/BufferWriter.spec.ts +530 -0
- package/.yalc/@node-dlc/bufio/__tests__/Hex.spec.ts +51 -0
- package/.yalc/@node-dlc/bufio/__tests__/StreamReader.spec.ts +133 -0
- package/.yalc/@node-dlc/bufio/__tests__/bigFromBufBE.spec.ts +14 -0
- package/.yalc/@node-dlc/bufio/__tests__/bigFromBufLE.spec.ts +14 -0
- package/.yalc/@node-dlc/bufio/__tests__/bigToBufBE.spec.ts +15 -0
- package/.yalc/@node-dlc/bufio/__tests__/bigToBufLE.spec.ts +14 -0
- package/.yalc/@node-dlc/bufio/__tests__/encodeVarInt.spec.ts +25 -0
- package/.yalc/@node-dlc/bufio/__tests__/tsconfig.json +7 -0
- package/.yalc/@node-dlc/bufio/__tests__/varIntBytes.spec.ts +34 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/BufferReader.ts.html +1142 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/BufferWriter.ts.html +953 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/Hex.ts.html +323 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/StreamReader.ts.html +620 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/base.css +224 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/bigFromBufBE.ts.html +89 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/bigFromBufLE.ts.html +95 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/bigToBufBE.ts.html +98 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/bigToBufLE.ts.html +95 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/block-navigation.js +79 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/bufToStream.ts.html +113 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/encodeVarInt.ts.html +203 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/favicon.png +0 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/index.html +261 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/prettify.css +1 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/prettify.js +2 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/sorter.js +170 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov-report/varIntBytes.ts.html +116 -0
- package/.yalc/@node-dlc/bufio/coverage/lcov.info +747 -0
- package/.yalc/@node-dlc/bufio/dist/BufferReader.d.ts +155 -0
- package/.yalc/@node-dlc/bufio/dist/BufferReader.js +346 -0
- package/.yalc/@node-dlc/bufio/dist/BufferReader.js.map +1 -0
- package/.yalc/@node-dlc/bufio/dist/BufferWriter.d.ts +143 -0
- package/.yalc/@node-dlc/bufio/dist/BufferWriter.js +279 -0
- package/.yalc/@node-dlc/bufio/dist/BufferWriter.js.map +1 -0
- package/.yalc/@node-dlc/bufio/dist/Hex.d.ts +13 -0
- package/.yalc/@node-dlc/bufio/dist/Hex.js +78 -0
- package/.yalc/@node-dlc/bufio/dist/Hex.js.map +1 -0
- package/.yalc/@node-dlc/bufio/dist/StreamReader.d.ts +111 -0
- package/.yalc/@node-dlc/bufio/dist/StreamReader.js +180 -0
- package/.yalc/@node-dlc/bufio/dist/StreamReader.js.map +1 -0
- package/.yalc/@node-dlc/bufio/dist/bigFromBufBE.d.ts +2 -0
- package/.yalc/@node-dlc/bufio/dist/bigFromBufBE.js +8 -0
- package/.yalc/@node-dlc/bufio/dist/bigFromBufBE.js.map +1 -0
- package/.yalc/@node-dlc/bufio/dist/bigFromBufLE.d.ts +2 -0
- package/.yalc/@node-dlc/bufio/dist/bigFromBufLE.js +9 -0
- package/.yalc/@node-dlc/bufio/dist/bigFromBufLE.js.map +1 -0
- package/.yalc/@node-dlc/bufio/dist/bigToBufBE.d.ts +2 -0
- package/.yalc/@node-dlc/bufio/dist/bigToBufBE.js +13 -0
- package/.yalc/@node-dlc/bufio/dist/bigToBufBE.js.map +1 -0
- package/.yalc/@node-dlc/bufio/dist/bigToBufLE.d.ts +2 -0
- package/.yalc/@node-dlc/bufio/dist/bigToBufLE.js +9 -0
- package/.yalc/@node-dlc/bufio/dist/bigToBufLE.js.map +1 -0
- package/.yalc/@node-dlc/bufio/dist/bufToStream.d.ts +7 -0
- package/.yalc/@node-dlc/bufio/dist/bufToStream.js +15 -0
- package/.yalc/@node-dlc/bufio/dist/bufToStream.js.map +1 -0
- package/.yalc/@node-dlc/bufio/dist/encodeVarInt.d.ts +12 -0
- package/.yalc/@node-dlc/bufio/dist/encodeVarInt.js +46 -0
- package/.yalc/@node-dlc/bufio/dist/encodeVarInt.js.map +1 -0
- package/.yalc/@node-dlc/bufio/dist/index.d.ts +11 -0
- package/.yalc/@node-dlc/bufio/dist/index.js +28 -0
- package/.yalc/@node-dlc/bufio/dist/index.js.map +1 -0
- package/.yalc/@node-dlc/bufio/dist/varIntBytes.d.ts +5 -0
- package/.yalc/@node-dlc/bufio/dist/varIntBytes.js +22 -0
- package/.yalc/@node-dlc/bufio/dist/varIntBytes.js.map +1 -0
- package/.yalc/@node-dlc/bufio/lib/BufferReader.ts +354 -0
- package/.yalc/@node-dlc/bufio/lib/BufferWriter.ts +291 -0
- package/.yalc/@node-dlc/bufio/lib/Hex.ts +81 -0
- package/.yalc/@node-dlc/bufio/lib/StreamReader.ts +180 -0
- package/.yalc/@node-dlc/bufio/lib/bigFromBufBE.ts +3 -0
- package/.yalc/@node-dlc/bufio/lib/bigFromBufLE.ts +5 -0
- package/.yalc/@node-dlc/bufio/lib/bigToBufBE.ts +6 -0
- package/.yalc/@node-dlc/bufio/lib/bigToBufLE.ts +5 -0
- package/.yalc/@node-dlc/bufio/lib/bufToStream.ts +11 -0
- package/.yalc/@node-dlc/bufio/lib/encodeVarInt.ts +41 -0
- package/.yalc/@node-dlc/bufio/lib/index.ts +11 -0
- package/.yalc/@node-dlc/bufio/lib/varIntBytes.ts +12 -0
- package/.yalc/@node-dlc/bufio/package.json +27 -0
- package/.yalc/@node-dlc/bufio/tsconfig-build.json +7 -0
- package/.yalc/@node-dlc/bufio/tsconfig.json +7 -0
- package/.yalc/@node-dlc/bufio/yalc.sig +1 -0
- package/.yalc/@node-dlc/core/.nyc_output/687a3c14-9765-45fd-a1fe-f7db3d56fee4.json +1 -0
- package/.yalc/@node-dlc/core/.nyc_output/processinfo/687a3c14-9765-45fd-a1fe-f7db3d56fee4.json +1 -0
- package/.yalc/@node-dlc/core/.nyc_output/processinfo/index.json +1 -0
- package/.yalc/@node-dlc/core/README.md +11 -0
- package/.yalc/@node-dlc/core/__tests__/core.spec.ts +7 -0
- package/.yalc/@node-dlc/core/__tests__/dlc/CETCalculator.spec.ts +1029 -0
- package/.yalc/@node-dlc/core/__tests__/dlc/CoinSelect.spec.ts +179 -0
- package/.yalc/@node-dlc/core/__tests__/dlc/PolynomialPayoutCurve.spec.ts +345 -0
- package/.yalc/@node-dlc/core/__tests__/dlc/TxBuilder.spec.ts +424 -0
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/Builder.spec.ts +492 -0
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/CoveredCall.spec.ts +112 -0
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/CsoInfo.spec.ts +1124 -0
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/LongCall.spec.ts +55 -0
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/LongPut.spec.ts +55 -0
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/OptionInfo.spec.ts +226 -0
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/ShortPut.spec.ts +62 -0
- package/.yalc/@node-dlc/core/__tests__/tsconfig.json +8 -0
- package/.yalc/@node-dlc/core/__tests__/utils/precision.spec.ts +40 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/base.css +224 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/block-navigation.js +79 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/favicon.png +0 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/index.html +171 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/AsyncProcessingQueue.ts.html +269 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/Base32.ts.html +86 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/BigIntUtils.ts.html +86 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/BitField.ts.html +86 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/ChannelId.ts.html +86 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/LinkedList.ts.html +413 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/LinkedListNode.ts.html +122 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/Queue.ts.html +188 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/ShortChannelId.ts.html +86 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/ShortChannelIdUtils.ts.html +107 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/CETCalculator.ts.html +1430 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/CoinSelect.ts.html +431 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/HyperbolaPayoutCurve.ts.html +644 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/PolynomialPayoutCurve.ts.html +878 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/TxBuilder.ts.html +1088 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/TxFinalizer.ts.html +731 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/Builder.ts.html +2270 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/CoveredCall.ts.html +410 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/CsoInfo.ts.html +1574 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/LinearPayout.ts.html +362 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/LongCall.ts.html +302 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/LongPut.ts.html +302 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/OptionInfo.ts.html +626 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/ShortPut.ts.html +305 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/index.html +216 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/index.html +186 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/index.html +261 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/index.ts.html +278 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/ChannelId.ts.html +242 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/ChannelKeys.ts.html +407 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/CommitmentNumber.ts.html +362 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/CommitmentSecret.ts.html +203 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/CommitmentSecretStore.ts.html +332 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/Htlc.ts.html +236 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/HtlcDirection.ts.html +131 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/ScriptFactory.ts.html +530 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/TxFactory.ts.html +1094 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/index.html +231 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/utils/BigIntUtils.ts.html +272 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/utils/Precision.ts.html +149 -0
- package/.yalc/@node-dlc/{messaging/coverage/lcov-report/lib/serde → core/coverage/lcov-report/lib/utils}/index.html +37 -22
- package/.yalc/@node-dlc/core/coverage/lcov-report/prettify.css +1 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/prettify.js +2 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/sorter.js +170 -0
- package/.yalc/@node-dlc/core/coverage/lcov.info +2426 -0
- package/.yalc/@node-dlc/core/dist/AsyncProcessingQueue.d.ts +22 -0
- package/.yalc/@node-dlc/core/dist/AsyncProcessingQueue.js +55 -0
- package/.yalc/@node-dlc/core/dist/AsyncProcessingQueue.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/Base32.d.ts +1 -0
- package/.yalc/@node-dlc/core/dist/Base32.js +7 -0
- package/.yalc/@node-dlc/core/dist/Base32.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/BigIntUtils.d.ts +1 -0
- package/.yalc/@node-dlc/core/dist/BigIntUtils.js +8 -0
- package/.yalc/@node-dlc/core/dist/BigIntUtils.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/BitField.d.ts +1 -0
- package/.yalc/@node-dlc/core/dist/BitField.js +7 -0
- package/.yalc/@node-dlc/core/dist/BitField.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/ChannelId.d.ts +1 -0
- package/.yalc/@node-dlc/core/dist/ChannelId.js +7 -0
- package/.yalc/@node-dlc/core/dist/ChannelId.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/LinkedList.d.ts +30 -0
- package/.yalc/@node-dlc/core/dist/LinkedList.js +104 -0
- package/.yalc/@node-dlc/core/dist/LinkedList.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/LinkedListNode.d.ts +9 -0
- package/.yalc/@node-dlc/core/dist/LinkedListNode.js +15 -0
- package/.yalc/@node-dlc/core/dist/LinkedListNode.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/Queue.d.ts +22 -0
- package/.yalc/@node-dlc/core/dist/Queue.js +38 -0
- package/.yalc/@node-dlc/core/dist/Queue.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/ShortChannelId.d.ts +1 -0
- package/.yalc/@node-dlc/core/dist/ShortChannelId.js +7 -0
- package/.yalc/@node-dlc/core/dist/ShortChannelId.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/ShortChannelIdUtils.d.ts +1 -0
- package/.yalc/@node-dlc/core/dist/ShortChannelIdUtils.js +12 -0
- package/.yalc/@node-dlc/core/dist/ShortChannelIdUtils.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/CETCalculator.d.ts +50 -0
- package/.yalc/@node-dlc/core/dist/dlc/CETCalculator.js +332 -0
- package/.yalc/@node-dlc/core/dist/dlc/CETCalculator.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/CoinSelect.d.ts +23 -0
- package/.yalc/@node-dlc/core/dist/dlc/CoinSelect.js +77 -0
- package/.yalc/@node-dlc/core/dist/dlc/CoinSelect.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/HyperbolaPayoutCurve.d.ts +20 -0
- package/.yalc/@node-dlc/core/dist/dlc/HyperbolaPayoutCurve.js +117 -0
- package/.yalc/@node-dlc/core/dist/dlc/HyperbolaPayoutCurve.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/PayoutCurve.d.ts +5 -0
- package/.yalc/@node-dlc/core/dist/dlc/PayoutCurve.js +3 -0
- package/.yalc/@node-dlc/core/dist/dlc/PayoutCurve.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/PolynomialPayoutCurve.d.ts +52 -0
- package/.yalc/@node-dlc/core/dist/dlc/PolynomialPayoutCurve.js +173 -0
- package/.yalc/@node-dlc/core/dist/dlc/PolynomialPayoutCurve.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/TxBuilder.d.ts +55 -0
- package/.yalc/@node-dlc/core/dist/dlc/TxBuilder.js +217 -0
- package/.yalc/@node-dlc/core/dist/dlc/TxBuilder.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/TxFinalizer.d.ts +40 -0
- package/.yalc/@node-dlc/core/dist/dlc/TxFinalizer.js +146 -0
- package/.yalc/@node-dlc/core/dist/dlc/TxFinalizer.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/Builder.d.ts +193 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/Builder.js +422 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/Builder.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/CoveredCall.d.ts +13 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/CoveredCall.js +67 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/CoveredCall.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/CsoInfo.d.ts +114 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/CsoInfo.js +290 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/CsoInfo.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/LinearPayout.d.ts +6 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/LinearPayout.js +79 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/LinearPayout.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/LongCall.d.ts +13 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/LongCall.js +47 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/LongCall.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/LongPut.d.ts +13 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/LongPut.js +47 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/LongPut.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/OptionInfo.d.ts +20 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/OptionInfo.js +101 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/OptionInfo.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/ShortPut.d.ts +12 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/ShortPut.js +46 -0
- package/.yalc/@node-dlc/core/dist/dlc/finance/ShortPut.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/index.d.ts +39 -0
- package/.yalc/@node-dlc/core/dist/index.js +78 -0
- package/.yalc/@node-dlc/core/dist/index.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/lightning/ChannelId.d.ts +31 -0
- package/.yalc/@node-dlc/core/dist/lightning/ChannelId.js +52 -0
- package/.yalc/@node-dlc/core/dist/lightning/ChannelId.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/lightning/ChannelKeys.d.ts +55 -0
- package/.yalc/@node-dlc/core/dist/lightning/ChannelKeys.js +105 -0
- package/.yalc/@node-dlc/core/dist/lightning/ChannelKeys.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentNumber.d.ts +55 -0
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentNumber.js +76 -0
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentNumber.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentSecret.d.ts +26 -0
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentSecret.js +44 -0
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentSecret.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentSecretStore.d.ts +41 -0
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentSecretStore.js +79 -0
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentSecretStore.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/lightning/Htlc.d.ts +46 -0
- package/.yalc/@node-dlc/core/dist/lightning/Htlc.js +46 -0
- package/.yalc/@node-dlc/core/dist/lightning/Htlc.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/lightning/HtlcDirection.d.ts +16 -0
- package/.yalc/@node-dlc/core/dist/lightning/HtlcDirection.js +21 -0
- package/.yalc/@node-dlc/core/dist/lightning/HtlcDirection.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/lightning/ScriptFactory.d.ts +76 -0
- package/.yalc/@node-dlc/core/dist/lightning/ScriptFactory.js +102 -0
- package/.yalc/@node-dlc/core/dist/lightning/ScriptFactory.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/lightning/TxFactory.d.ts +83 -0
- package/.yalc/@node-dlc/core/dist/lightning/TxFactory.js +222 -0
- package/.yalc/@node-dlc/core/dist/lightning/TxFactory.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/utils/BigIntUtils.d.ts +9 -0
- package/.yalc/@node-dlc/core/dist/utils/BigIntUtils.js +59 -0
- package/.yalc/@node-dlc/core/dist/utils/BigIntUtils.js.map +1 -0
- package/.yalc/@node-dlc/core/dist/utils/Precision.d.ts +13 -0
- package/.yalc/@node-dlc/core/dist/utils/Precision.js +28 -0
- package/.yalc/@node-dlc/core/dist/utils/Precision.js.map +1 -0
- package/.yalc/@node-dlc/core/lib/AsyncProcessingQueue.ts +63 -0
- package/.yalc/@node-dlc/core/lib/Base32.ts +2 -0
- package/.yalc/@node-dlc/core/lib/BigIntUtils.ts +2 -0
- package/.yalc/@node-dlc/core/lib/BitField.ts +2 -0
- package/.yalc/@node-dlc/core/lib/ChannelId.ts +2 -0
- package/.yalc/@node-dlc/core/lib/LinkedList.ts +111 -0
- package/.yalc/@node-dlc/core/lib/LinkedListNode.ts +14 -0
- package/.yalc/@node-dlc/core/lib/Queue.ts +36 -0
- package/.yalc/@node-dlc/core/lib/ShortChannelId.ts +2 -0
- package/.yalc/@node-dlc/core/lib/ShortChannelIdUtils.ts +9 -0
- package/.yalc/@node-dlc/core/lib/dlc/CETCalculator.ts +450 -0
- package/.yalc/@node-dlc/core/lib/dlc/CoinSelect.ts +117 -0
- package/.yalc/@node-dlc/core/lib/dlc/HyperbolaPayoutCurve.ts +188 -0
- package/.yalc/@node-dlc/core/lib/dlc/PayoutCurve.ts +6 -0
- package/.yalc/@node-dlc/core/lib/dlc/PolynomialPayoutCurve.ts +266 -0
- package/.yalc/@node-dlc/core/lib/dlc/TxBuilder.ts +336 -0
- package/.yalc/@node-dlc/core/lib/dlc/TxFinalizer.ts +217 -0
- package/.yalc/@node-dlc/core/lib/dlc/finance/Builder.ts +730 -0
- package/.yalc/@node-dlc/core/lib/dlc/finance/CoveredCall.ts +110 -0
- package/.yalc/@node-dlc/core/lib/dlc/finance/CsoInfo.ts +498 -0
- package/.yalc/@node-dlc/core/lib/dlc/finance/LinearPayout.ts +94 -0
- package/.yalc/@node-dlc/core/lib/dlc/finance/LongCall.ts +74 -0
- package/.yalc/@node-dlc/core/lib/dlc/finance/LongPut.ts +74 -0
- package/.yalc/@node-dlc/core/lib/dlc/finance/OptionInfo.ts +182 -0
- package/.yalc/@node-dlc/core/lib/dlc/finance/ShortPut.ts +75 -0
- package/.yalc/@node-dlc/core/lib/index.ts +66 -0
- package/.yalc/@node-dlc/core/lib/lightning/ChannelId.ts +54 -0
- package/.yalc/@node-dlc/core/lib/lightning/ChannelKeys.ts +109 -0
- package/.yalc/@node-dlc/core/lib/lightning/CommitmentNumber.ts +94 -0
- package/.yalc/@node-dlc/core/lib/lightning/CommitmentSecret.ts +41 -0
- package/.yalc/@node-dlc/core/lib/lightning/CommitmentSecretStore.ts +84 -0
- package/.yalc/@node-dlc/core/lib/lightning/Htlc.ts +52 -0
- package/.yalc/@node-dlc/core/lib/lightning/HtlcDirection.ts +17 -0
- package/.yalc/@node-dlc/core/lib/lightning/ScriptFactory.ts +150 -0
- package/.yalc/@node-dlc/core/lib/lightning/TxFactory.ts +338 -0
- package/.yalc/@node-dlc/core/lib/utils/BigIntUtils.ts +64 -0
- package/.yalc/@node-dlc/core/lib/utils/Precision.ts +23 -0
- package/.yalc/@node-dlc/core/package.json +38 -0
- package/.yalc/@node-dlc/core/tsconfig.json +8 -0
- package/.yalc/@node-dlc/core/yalc.sig +1 -0
- package/.yalc/@node-dlc/crypto/.eslintrc +6 -0
- package/.yalc/@node-dlc/crypto/.nyc_output/de03e0b4-d482-4f61-b680-59411360f56e.json +1 -0
- package/.yalc/@node-dlc/crypto/.nyc_output/processinfo/de03e0b4-d482-4f61-b680-59411360f56e.json +1 -0
- package/.yalc/@node-dlc/crypto/.nyc_output/processinfo/index.json +1 -0
- package/.yalc/@node-dlc/crypto/README.md +13 -0
- package/.yalc/@node-dlc/crypto/__tests__/chacha.spec.ts +29 -0
- package/.yalc/@node-dlc/crypto/__tests__/chachapoly.spec.ts +78 -0
- package/.yalc/@node-dlc/crypto/__tests__/hkdf.spec.ts +131 -0
- package/.yalc/@node-dlc/crypto/__tests__/key.spec.ts +125 -0
- package/.yalc/@node-dlc/crypto/__tests__/secp256k1.spec.ts +194 -0
- package/.yalc/@node-dlc/crypto/__tests__/xor.spec.ts +28 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/base.css +224 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/block-navigation.js +79 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/chacha.ts.html +119 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/chachapoly.ts.html +275 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/favicon.png +0 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/hkdf.ts.html +236 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/index.html +186 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/key.ts.html +272 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/prettify.css +1 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/prettify.js +2 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/secp256k1.ts.html +680 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/sorter.js +170 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov-report/xor.ts.html +116 -0
- package/.yalc/@node-dlc/crypto/coverage/lcov.info +221 -0
- package/.yalc/@node-dlc/crypto/dist/aes-key.d.ts +6 -0
- package/.yalc/@node-dlc/crypto/dist/aes-key.js +3 -0
- package/.yalc/@node-dlc/crypto/dist/aes-key.js.map +1 -0
- package/.yalc/@node-dlc/crypto/dist/aes.d.ts +34 -0
- package/.yalc/@node-dlc/crypto/dist/aes.js +62 -0
- package/.yalc/@node-dlc/crypto/dist/aes.js.map +1 -0
- package/.yalc/@node-dlc/crypto/dist/chacha.d.ts +4 -0
- package/.yalc/@node-dlc/crypto/dist/chacha.js +40 -0
- package/.yalc/@node-dlc/crypto/dist/chacha.js.map +1 -0
- package/.yalc/@node-dlc/crypto/dist/chachapoly.d.ts +24 -0
- package/.yalc/@node-dlc/crypto/dist/chachapoly.js +61 -0
- package/.yalc/@node-dlc/crypto/dist/chachapoly.js.map +1 -0
- package/.yalc/@node-dlc/crypto/dist/hash.d.ts +29 -0
- package/.yalc/@node-dlc/crypto/dist/hash.js +51 -0
- package/.yalc/@node-dlc/crypto/dist/hash.js.map +1 -0
- package/.yalc/@node-dlc/crypto/dist/hkdf.d.ts +20 -0
- package/.yalc/@node-dlc/crypto/dist/hkdf.js +50 -0
- package/.yalc/@node-dlc/crypto/dist/hkdf.js.map +1 -0
- package/.yalc/@node-dlc/crypto/dist/hmac.d.ts +3 -0
- package/.yalc/@node-dlc/crypto/dist/hmac.js +14 -0
- package/.yalc/@node-dlc/crypto/dist/hmac.js.map +1 -0
- package/.yalc/@node-dlc/crypto/dist/index.d.ts +11 -0
- package/.yalc/@node-dlc/crypto/dist/index.js +30 -0
- package/.yalc/@node-dlc/crypto/dist/index.js.map +1 -0
- package/.yalc/@node-dlc/crypto/dist/key.d.ts +37 -0
- package/.yalc/@node-dlc/crypto/dist/key.js +72 -0
- package/.yalc/@node-dlc/crypto/dist/key.js.map +1 -0
- package/.yalc/@node-dlc/crypto/dist/secp256k1.d.ts +120 -0
- package/.yalc/@node-dlc/crypto/dist/secp256k1.js +184 -0
- package/.yalc/@node-dlc/crypto/dist/secp256k1.js.map +1 -0
- package/.yalc/@node-dlc/crypto/dist/xor.d.ts +8 -0
- package/.yalc/@node-dlc/crypto/dist/xor.js +17 -0
- package/.yalc/@node-dlc/crypto/dist/xor.js.map +1 -0
- package/.yalc/@node-dlc/crypto/lib/aes-key.ts +4 -0
- package/.yalc/@node-dlc/crypto/lib/aes.ts +81 -0
- package/.yalc/@node-dlc/crypto/lib/chacha.ts +13 -0
- package/.yalc/@node-dlc/crypto/lib/chachapoly.ts +65 -0
- package/.yalc/@node-dlc/crypto/lib/hash.ts +44 -0
- package/.yalc/@node-dlc/crypto/lib/hkdf.ts +52 -0
- package/.yalc/@node-dlc/crypto/lib/hmac.ts +7 -0
- package/.yalc/@node-dlc/crypto/lib/index.ts +11 -0
- package/.yalc/@node-dlc/crypto/lib/key.ts +64 -0
- package/.yalc/@node-dlc/crypto/lib/secp256k1.ts +200 -0
- package/.yalc/@node-dlc/crypto/lib/xor.ts +12 -0
- package/.yalc/@node-dlc/crypto/package.json +34 -0
- package/.yalc/@node-dlc/crypto/tsconfig-build.json +7 -0
- package/.yalc/@node-dlc/crypto/tsconfig.json +4 -0
- package/.yalc/@node-dlc/crypto/yalc.sig +1 -0
- package/.yalc/@node-dlc/messaging/.nyc_output/83d37f9d-cecf-4c52-a753-115ff80bbca0.json +1 -0
- package/.yalc/@node-dlc/messaging/.nyc_output/processinfo/83d37f9d-cecf-4c52-a753-115ff80bbca0.json +1 -0
- package/.yalc/@node-dlc/messaging/.nyc_output/processinfo/index.json +1 -1
- package/.yalc/@node-dlc/messaging/__tests__/_test-utils.ts +1 -0
- package/.yalc/@node-dlc/messaging/__tests__/compatibility/dlcspecs-compatibility.spec.ts +13 -47
- package/.yalc/@node-dlc/messaging/__tests__/compatibility/rust-dlc-cross-language.spec.ts +166 -253
- package/.yalc/@node-dlc/messaging/__tests__/compatibility/true-serialization-compatibility.spec.ts +214 -483
- package/.yalc/@node-dlc/messaging/__tests__/messages/ContractDescriptor.spec.ts +3 -1
- package/.yalc/@node-dlc/messaging/__tests__/messages/ContractInfo.spec.ts +1 -1
- package/.yalc/@node-dlc/messaging/__tests__/messages/DlcAccept.spec.ts +72 -0
- package/.yalc/@node-dlc/messaging/__tests__/messages/DlcInput.spec.ts +111 -0
- package/.yalc/@node-dlc/messaging/__tests__/messages/DlcOffer.spec.ts +99 -37
- package/.yalc/@node-dlc/messaging/__tests__/messages/FundingInput.spec.ts +148 -63
- package/.yalc/@node-dlc/messaging/__tests__/messages/OracleAttestation.spec.ts +2 -4
- package/.yalc/@node-dlc/messaging/__tests__/messages/OrderAccept.spec.ts +7 -9
- package/.yalc/@node-dlc/messaging/__tests__/messages/OrderNegotiationFields.spec.ts +135 -52
- package/.yalc/@node-dlc/messaging/__tests__/messages/OrderPositionInfo.spec.ts +6 -6
- package/.yalc/@node-dlc/messaging/__tests__/messages/PayoutCurvePiece.spec.ts +1 -1
- package/.yalc/@node-dlc/messaging/__tests__/messages/PayoutFunction.spec.ts +1 -1
- package/.yalc/@node-dlc/messaging/__tests__/serialize/F64.spec.ts +1 -0
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/index.html +31 -31
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/MessageType.ts.html +11 -5
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/chain/ChainManager.ts.html +6 -3
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/chain/ChainMemoryStore.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/chain/index.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/domain/Address.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/domain/index.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/index.html +9 -9
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/index.ts.html +11 -8
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/irc/IrcMessage.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/irc/index.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/AddressCache.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/BatchFundingGroup.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/CetAdaptorSignatures.ts.html +22 -22
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/CetAdaptorSignaturesV0.ts.html +46 -37
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/CloseTLV.ts.html +344 -0
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/ContractDescriptor.ts.html +61 -70
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/ContractInfo.ts.html +59 -44
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcAccept.ts.html +251 -119
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcCancel.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcClose.ts.html +12 -3
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcCloseMetadata.ts.html +2 -11
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcIds.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcInfo.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcInput.ts.html +581 -0
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcMessage.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcOffer.ts.html +307 -127
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcSign.ts.html +61 -46
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/DlcTransactions.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/EventDescriptor.ts.html +67 -52
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/FundingInput.ts.html +202 -70
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/FundingSignatures.ts.html +15 -15
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/FundingSignaturesV0.ts.html +47 -77
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/NegotiationFields.ts.html +16 -4
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/NodeAnnouncementMessage.ts.html +3 -3
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleAnnouncement.ts.html +22 -22
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleAnnouncementV0.ts.html +48 -270
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleAttestation.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleAttestationV0.ts.html +113 -404
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleEvent.ts.html +49 -49
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleEventContainer.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleEventContainerV0.ts.html +22 -22
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleEventV0.ts.html +61 -385
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleIdentifier.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleIdentifierV0.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleInfo.ts.html +46 -25
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OracleInfoV0.ts.html +55 -1378
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OrderAccept.ts.html +68 -23
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OrderIrcInfo.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OrderMetadata.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OrderNegotiationFields.ts.html +266 -107
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OrderOffer.ts.html +31 -34
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/OrderPositionInfo.ts.html +19 -88
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/PayoutCurvePiece.ts.html +36 -21
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/PayoutFunction.ts.html +34 -28
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/RoundingIntervals.ts.html +18 -15
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/RoundingIntervalsV0.ts.html +75 -129
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/ScriptWitnessV0.ts.html +6 -6
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/messages/index.html +84 -69
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/serialize/F64.ts.html +8 -53
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/serialize/deserializeTlv.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/serialize/getTlv.ts.html +9 -9
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/serialize/index.html +15 -15
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/util.ts.html +22 -10
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/validation/index.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov-report/lib/validation/validate.ts.html +1 -1
- package/.yalc/@node-dlc/messaging/coverage/lcov.info +3049 -2826
- package/.yalc/@node-dlc/messaging/dist/MessageType.d.ts +2 -1
- package/.yalc/@node-dlc/messaging/dist/MessageType.js +2 -1
- package/.yalc/@node-dlc/messaging/dist/MessageType.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/chain/ChainManager.js +1 -0
- package/.yalc/@node-dlc/messaging/dist/chain/ChainManager.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/index.d.ts +5 -4
- package/.yalc/@node-dlc/messaging/dist/index.js +5 -4
- package/.yalc/@node-dlc/messaging/dist/index.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/CetAdaptorSignaturesV0.d.ts +42 -0
- package/.yalc/@node-dlc/messaging/dist/messages/CetAdaptorSignaturesV0.js +68 -0
- package/.yalc/@node-dlc/messaging/dist/messages/CetAdaptorSignaturesV0.js.map +1 -0
- package/.yalc/@node-dlc/messaging/dist/messages/CloseTLV.d.ts +38 -0
- package/.yalc/@node-dlc/messaging/dist/messages/CloseTLV.js +59 -0
- package/.yalc/@node-dlc/messaging/dist/messages/CloseTLV.js.map +1 -0
- package/.yalc/@node-dlc/messaging/dist/messages/ContractDescriptor.d.ts +11 -12
- package/.yalc/@node-dlc/messaging/dist/messages/ContractDescriptor.js +0 -1
- package/.yalc/@node-dlc/messaging/dist/messages/ContractDescriptor.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/ContractInfo.d.ts +10 -10
- package/.yalc/@node-dlc/messaging/dist/messages/ContractInfo.js +5 -1
- package/.yalc/@node-dlc/messaging/dist/messages/ContractInfo.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/DlcAccept.d.ts +15 -0
- package/.yalc/@node-dlc/messaging/dist/messages/DlcAccept.js +46 -5
- package/.yalc/@node-dlc/messaging/dist/messages/DlcAccept.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/DlcClose.js +6 -2
- package/.yalc/@node-dlc/messaging/dist/messages/DlcClose.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/DlcCloseMetadata.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/DlcInput.d.ts +56 -0
- package/.yalc/@node-dlc/messaging/dist/messages/DlcInput.js +135 -0
- package/.yalc/@node-dlc/messaging/dist/messages/DlcInput.js.map +1 -0
- package/.yalc/@node-dlc/messaging/dist/messages/DlcOffer.d.ts +16 -1
- package/.yalc/@node-dlc/messaging/dist/messages/DlcOffer.js +50 -5
- package/.yalc/@node-dlc/messaging/dist/messages/DlcOffer.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/DlcSign.js +11 -3
- package/.yalc/@node-dlc/messaging/dist/messages/DlcSign.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/EventDescriptor.d.ts +7 -6
- package/.yalc/@node-dlc/messaging/dist/messages/EventDescriptor.js +3 -0
- package/.yalc/@node-dlc/messaging/dist/messages/EventDescriptor.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/FundingInput.d.ts +7 -0
- package/.yalc/@node-dlc/messaging/dist/messages/FundingInput.js +31 -1
- package/.yalc/@node-dlc/messaging/dist/messages/FundingInput.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/FundingSignaturesV0.d.ts +34 -0
- package/.yalc/@node-dlc/messaging/dist/messages/FundingSignaturesV0.js +72 -0
- package/.yalc/@node-dlc/messaging/dist/messages/FundingSignaturesV0.js.map +1 -0
- package/.yalc/@node-dlc/messaging/dist/messages/NegotiationFields.d.ts +2 -2
- package/.yalc/@node-dlc/messaging/dist/messages/NegotiationFields.js +4 -0
- package/.yalc/@node-dlc/messaging/dist/messages/NegotiationFields.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/OracleAnnouncementV0.d.ts +47 -0
- package/.yalc/@node-dlc/messaging/dist/messages/OracleAnnouncementV0.js +76 -0
- package/.yalc/@node-dlc/messaging/dist/messages/OracleAnnouncementV0.js.map +1 -0
- package/.yalc/@node-dlc/messaging/dist/messages/OracleAttestationV0.d.ts +48 -0
- package/.yalc/@node-dlc/messaging/dist/messages/OracleAttestationV0.js +100 -0
- package/.yalc/@node-dlc/messaging/dist/messages/OracleAttestationV0.js.map +1 -0
- package/.yalc/@node-dlc/messaging/dist/messages/OracleEventContainerV0.d.ts +32 -0
- package/.yalc/@node-dlc/messaging/dist/messages/OracleEventContainerV0.js +67 -0
- package/.yalc/@node-dlc/messaging/dist/messages/OracleEventContainerV0.js.map +1 -0
- package/.yalc/@node-dlc/messaging/dist/messages/OracleEventV0.d.ts +54 -0
- package/.yalc/@node-dlc/messaging/dist/messages/OracleEventV0.js +100 -0
- package/.yalc/@node-dlc/messaging/dist/messages/OracleEventV0.js.map +1 -0
- package/.yalc/@node-dlc/messaging/dist/messages/OracleInfo.d.ts +8 -6
- package/.yalc/@node-dlc/messaging/dist/messages/OracleInfo.js +3 -0
- package/.yalc/@node-dlc/messaging/dist/messages/OracleInfo.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/OracleInfoV0.d.ts +15 -141
- package/.yalc/@node-dlc/messaging/dist/messages/OracleInfoV0.js +21 -350
- package/.yalc/@node-dlc/messaging/dist/messages/OracleInfoV0.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/OrderAccept.d.ts +3 -2
- package/.yalc/@node-dlc/messaging/dist/messages/OrderAccept.js +22 -7
- package/.yalc/@node-dlc/messaging/dist/messages/OrderAccept.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/OrderNegotiationFields.d.ts +48 -36
- package/.yalc/@node-dlc/messaging/dist/messages/OrderNegotiationFields.js +97 -50
- package/.yalc/@node-dlc/messaging/dist/messages/OrderNegotiationFields.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/OrderOffer.d.ts +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/OrderOffer.js +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/OrderOffer.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/OrderPositionInfo.d.ts +7 -13
- package/.yalc/@node-dlc/messaging/dist/messages/OrderPositionInfo.js +11 -25
- package/.yalc/@node-dlc/messaging/dist/messages/OrderPositionInfo.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/PayoutCurvePiece.js +5 -0
- package/.yalc/@node-dlc/messaging/dist/messages/PayoutCurvePiece.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/PayoutFunction.js +4 -1
- package/.yalc/@node-dlc/messaging/dist/messages/PayoutFunction.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/RoundingIntervals.js +1 -0
- package/.yalc/@node-dlc/messaging/dist/messages/RoundingIntervals.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/messages/RoundingIntervalsV0.d.ts +47 -0
- package/.yalc/@node-dlc/messaging/dist/messages/RoundingIntervalsV0.js +86 -0
- package/.yalc/@node-dlc/messaging/dist/messages/RoundingIntervalsV0.js.map +1 -0
- package/.yalc/@node-dlc/messaging/dist/serialize/F64.d.ts +0 -8
- package/.yalc/@node-dlc/messaging/dist/serialize/F64.js +0 -13
- package/.yalc/@node-dlc/messaging/dist/serialize/F64.js.map +1 -1
- package/.yalc/@node-dlc/messaging/dist/util.d.ts +1 -1
- package/.yalc/@node-dlc/messaging/dist/util.js +2 -0
- package/.yalc/@node-dlc/messaging/dist/util.js.map +1 -1
- package/.yalc/@node-dlc/messaging/lib/MessageType.ts +3 -1
- package/.yalc/@node-dlc/messaging/lib/chain/ChainManager.ts +1 -0
- package/.yalc/@node-dlc/messaging/lib/index.ts +5 -4
- package/.yalc/@node-dlc/messaging/lib/messages/ContractDescriptor.ts +15 -16
- package/.yalc/@node-dlc/messaging/lib/messages/ContractInfo.ts +17 -12
- package/.yalc/@node-dlc/messaging/lib/messages/DlcAccept.ts +50 -6
- package/.yalc/@node-dlc/messaging/lib/messages/DlcClose.ts +4 -1
- package/.yalc/@node-dlc/messaging/lib/messages/DlcCloseMetadata.ts +0 -3
- package/.yalc/@node-dlc/messaging/lib/messages/DlcInput.ts +167 -0
- package/.yalc/@node-dlc/messaging/lib/messages/DlcOffer.ts +67 -7
- package/.yalc/@node-dlc/messaging/lib/messages/DlcSign.ts +5 -0
- package/.yalc/@node-dlc/messaging/lib/messages/EventDescriptor.ts +12 -7
- package/.yalc/@node-dlc/messaging/lib/messages/FundingInput.ts +45 -1
- package/.yalc/@node-dlc/messaging/lib/messages/NegotiationFields.ts +6 -2
- package/.yalc/@node-dlc/messaging/lib/messages/NodeAnnouncementMessage.ts +2 -2
- package/.yalc/@node-dlc/messaging/lib/messages/OracleInfo.ts +15 -8
- package/.yalc/@node-dlc/messaging/lib/messages/OrderAccept.ts +28 -13
- package/.yalc/@node-dlc/messaging/lib/messages/OrderNegotiationFields.ts +127 -74
- package/.yalc/@node-dlc/messaging/lib/messages/OrderOffer.ts +2 -3
- package/.yalc/@node-dlc/messaging/lib/messages/OrderPositionInfo.ts +10 -33
- package/.yalc/@node-dlc/messaging/lib/messages/PayoutCurvePiece.ts +5 -0
- package/.yalc/@node-dlc/messaging/lib/messages/PayoutFunction.ts +2 -0
- package/.yalc/@node-dlc/messaging/lib/messages/RoundingIntervals.ts +1 -0
- package/.yalc/@node-dlc/messaging/lib/serialize/F64.ts +0 -15
- package/.yalc/@node-dlc/messaging/lib/serialize/readTlvs.ts +1 -1
- package/.yalc/@node-dlc/messaging/lib/util.ts +5 -1
- package/.yalc/@node-dlc/messaging/package.json +8 -8
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_3_of_3_test.json +76 -74
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_3_of_5_test.json +90 -88
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_and_numerical_3_of_5_test.json +162 -160
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_and_numerical_5_of_5_test.json +162 -160
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_and_numerical_with_diff_3_of_5_test.json +164 -162
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_and_numerical_with_diff_5_of_5_test.json +164 -162
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/enum_single_oracle_test.json +60 -58
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/single_oracle_numerical_hyperbola_test.json +71 -69
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/single_oracle_numerical_test.json +71 -69
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/three_of_five_oracle_numerical_with_diff_test.json +119 -117
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/three_of_three_oracle_numerical_test.json +95 -93
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/three_of_three_oracle_numerical_with_diff_test.json +97 -95
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/two_of_five_oracle_numerical_test.json +117 -115
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs/two_of_five_oracle_numerical_with_diff_test.json +119 -117
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_3_of_3_test.json +210 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_3_of_5_test.json +468 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_and_numerical_3_of_5_test.json +1517 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_and_numerical_5_of_5_test.json +545 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_and_numerical_with_diff_3_of_5_test.json +4761 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_and_numerical_with_diff_5_of_5_test.json +2169 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/enum_single_oracle_test.json +164 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/single_oracle_numerical_hyperbola_test.json +502 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/single_oracle_numerical_test.json +262 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/three_of_five_oracle_numerical_with_diff_test.json +4382 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/three_of_three_oracle_numerical_test.json +324 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/three_of_three_oracle_numerical_with_diff_test.json +652 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/two_of_five_oracle_numerical_test.json +1138 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250718_132453/two_of_five_oracle_numerical_with_diff_test.json +2222 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_3_of_3_test.json +212 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_3_of_5_test.json +470 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_and_numerical_3_of_5_test.json +1519 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_and_numerical_5_of_5_test.json +547 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_and_numerical_with_diff_3_of_5_test.json +4763 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_and_numerical_with_diff_5_of_5_test.json +2171 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/enum_single_oracle_test.json +166 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/single_oracle_numerical_hyperbola_test.json +504 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/single_oracle_numerical_test.json +264 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/three_of_five_oracle_numerical_with_diff_test.json +4384 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/three_of_three_oracle_numerical_test.json +326 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/three_of_three_oracle_numerical_with_diff_test.json +654 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/two_of_five_oracle_numerical_test.json +1140 -0
- package/.yalc/@node-dlc/messaging/test_vectors/dlcspecs_backup_20250719_185952/two_of_five_oracle_numerical_with_diff_test.json +2224 -0
- package/.yalc/@node-dlc/messaging/yalc.sig +1 -1
- package/CHANGELOG.md +58 -5
- package/README.md +48 -0
- package/dist/BitcoinDlcProvider.d.ts +34 -5
- package/dist/BitcoinDlcProvider.js +622 -155
- package/dist/BitcoinDlcProvider.js.map +1 -1
- package/dist/utils/Utils.js +5 -1
- package/dist/utils/Utils.js.map +1 -1
- package/lib/BitcoinDlcProvider.ts +899 -204
- package/lib/utils/Utils.ts +2 -0
- package/package.json +10 -10
- package/yalc.lock +22 -2
- package/.yalc/@node-dlc/messaging/.nyc_output/2cf48009-1094-4275-bb91-c164c932feb6.json +0 -1
- package/.yalc/@node-dlc/messaging/.nyc_output/processinfo/2cf48009-1094-4275-bb91-c164c932feb6.json +0 -1
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OrderAcceptContainer = exports.OrderAccept = void 0;
|
|
4
4
|
const bufio_1 = require("@node-dlc/bufio");
|
|
5
5
|
const MessageType_1 = require("../MessageType");
|
|
6
|
-
const getTlv_1 = require("../serialize/getTlv");
|
|
7
6
|
const OrderNegotiationFields_1 = require("./OrderNegotiationFields");
|
|
8
7
|
/**
|
|
9
8
|
* OrderAccept contains information about a node and indicates its
|
|
@@ -25,9 +24,11 @@ class OrderAccept {
|
|
|
25
24
|
static fromJSON(json) {
|
|
26
25
|
const instance = new OrderAccept();
|
|
27
26
|
instance.tempOrderId = Buffer.from(json.tempOrderId || json.temp_order_id, 'hex');
|
|
28
|
-
// Handle OrderNegotiationFields -
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
// Handle OrderNegotiationFields - optional field
|
|
28
|
+
if (json.negotiationFields || json.negotiation_fields) {
|
|
29
|
+
instance.negotiationFields =
|
|
30
|
+
json.negotiationFields || json.negotiation_fields;
|
|
31
|
+
}
|
|
31
32
|
return instance;
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
@@ -43,7 +44,14 @@ class OrderAccept {
|
|
|
43
44
|
throw new Error(`Invalid message type. Expected ${MessageType_1.MessageType.OrderAccept}, got ${type}`);
|
|
44
45
|
}
|
|
45
46
|
instance.tempOrderId = reader.readBytes(32);
|
|
46
|
-
|
|
47
|
+
// Check if negotiation_fields is present
|
|
48
|
+
const hasNegotiationFields = reader.readUInt8();
|
|
49
|
+
if (hasNegotiationFields === 0x01) {
|
|
50
|
+
// Read the remaining bytes as negotiationFields (not TLV format)
|
|
51
|
+
const remainingLength = buf.length - reader.position;
|
|
52
|
+
const remainingBytes = reader.readBytes(remainingLength);
|
|
53
|
+
instance.negotiationFields = OrderNegotiationFields_1.OrderNegotiationFields.deserialize(remainingBytes);
|
|
54
|
+
}
|
|
47
55
|
return instance;
|
|
48
56
|
}
|
|
49
57
|
/**
|
|
@@ -53,7 +61,7 @@ class OrderAccept {
|
|
|
53
61
|
return {
|
|
54
62
|
type: this.type,
|
|
55
63
|
tempOrderId: this.tempOrderId.toString('hex'),
|
|
56
|
-
negotiationFields: this.negotiationFields
|
|
64
|
+
negotiationFields: this.negotiationFields?.toJSON(),
|
|
57
65
|
};
|
|
58
66
|
}
|
|
59
67
|
/**
|
|
@@ -63,7 +71,14 @@ class OrderAccept {
|
|
|
63
71
|
const writer = new bufio_1.BufferWriter();
|
|
64
72
|
writer.writeUInt16BE(this.type);
|
|
65
73
|
writer.writeBytes(this.tempOrderId);
|
|
66
|
-
|
|
74
|
+
// negotiation_fields is optional
|
|
75
|
+
if (this.negotiationFields) {
|
|
76
|
+
writer.writeUInt8(0x01); // present
|
|
77
|
+
writer.writeBytes(this.negotiationFields.serialize());
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
writer.writeUInt8(0x00); // absent
|
|
81
|
+
}
|
|
67
82
|
return writer.toBuffer();
|
|
68
83
|
}
|
|
69
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderAccept.js","sourceRoot":"","sources":["../../lib/messages/OrderAccept.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;AAE7D,gDAA6C;
|
|
1
|
+
{"version":3,"file":"OrderAccept.js","sourceRoot":"","sources":["../../lib/messages/OrderAccept.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;AAE7D,gDAA6C;AAE7C,qEAIkC;AAElC;;;;GAIG;AACH,MAAa,WAAW;IAAxB;QA0DE;;WAEG;QACI,SAAI,GAAG,WA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DAAsD;QACtD,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACzC,sCAAsC;QACtC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YAC9B,MAAM,gBAAgB,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;YAC5C,MAAM,CAAC,YAAY,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;YAC7C,MAAM,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAC,GAAW;QACnC,MAAM,MAAM,GAAG,IAAI,oBAAY,CAAC,GAAG,CAAC,CAAC;QACrC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAC7C,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;QAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,EAAE,CAAC,EAAE,EAAE;YACrC,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;YAC1C,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;YACzD,MAAM,MAAM,GAAG,WAAW,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;YAClD,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;SAC7B;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AArDD,oDAqDC"}
|
|
@@ -1,69 +1,81 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { MessageType } from '../MessageType';
|
|
3
|
-
import { IDlcMessage } from './DlcMessage';
|
|
4
2
|
import { IOrderOfferJSON, OrderOffer } from './OrderOffer';
|
|
3
|
+
/**
|
|
4
|
+
* Order negotiation fields for order contract negotiation.
|
|
5
|
+
* Follows the same pattern as NegotiationFields with Single and Disjoint variants.
|
|
6
|
+
*/
|
|
5
7
|
export declare abstract class OrderNegotiationFields {
|
|
6
|
-
static deserialize(buf: Buffer):
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
static deserialize(buf: Buffer): OrderNegotiationFields;
|
|
9
|
+
/**
|
|
10
|
+
* Creates OrderNegotiationFields from JSON data
|
|
11
|
+
* @param json JSON object representing order negotiation fields
|
|
12
|
+
*/
|
|
13
|
+
static fromJSON(json: any): OrderNegotiationFields;
|
|
14
|
+
abstract variant: 'Single' | 'Disjoint';
|
|
15
|
+
abstract discriminator: number;
|
|
10
16
|
abstract serialize(): Buffer;
|
|
17
|
+
abstract toJSON(): IOrderNegotiationFieldsJSON;
|
|
11
18
|
}
|
|
12
19
|
/**
|
|
13
|
-
*
|
|
14
|
-
* offer which are taken into account during DLC construction.
|
|
20
|
+
* Order negotiation fields for contract based on a single event (basic/empty).
|
|
15
21
|
*/
|
|
16
|
-
export declare class
|
|
17
|
-
static type: MessageType;
|
|
22
|
+
export declare class SingleOrderNegotiationFields extends OrderNegotiationFields {
|
|
18
23
|
/**
|
|
19
|
-
*
|
|
20
|
-
* @param
|
|
24
|
+
* Creates a SingleOrderNegotiationFields from JSON data
|
|
25
|
+
* @param json JSON object representing single order negotiation fields
|
|
21
26
|
*/
|
|
22
|
-
static
|
|
27
|
+
static fromJSON(json: any): SingleOrderNegotiationFields;
|
|
23
28
|
/**
|
|
24
|
-
*
|
|
29
|
+
* Deserializes single order negotiation fields
|
|
30
|
+
* @param buf
|
|
25
31
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
static deserialize(buf: Buffer): SingleOrderNegotiationFields;
|
|
33
|
+
variant: "Single";
|
|
34
|
+
discriminator: number;
|
|
28
35
|
/**
|
|
29
|
-
* Converts
|
|
36
|
+
* Converts single order negotiation fields to JSON
|
|
30
37
|
*/
|
|
31
|
-
toJSON():
|
|
38
|
+
toJSON(): ISingleOrderNegotiationFieldsJSON;
|
|
32
39
|
/**
|
|
33
|
-
* Serializes the
|
|
40
|
+
* Serializes the single order negotiation fields into a Buffer
|
|
34
41
|
*/
|
|
35
42
|
serialize(): Buffer;
|
|
36
43
|
}
|
|
37
44
|
/**
|
|
38
|
-
*
|
|
39
|
-
* offer which are taken into account during DLC construction.
|
|
45
|
+
* Order negotiation fields for contract based on multiple events.
|
|
40
46
|
*/
|
|
41
|
-
export declare class
|
|
42
|
-
static type: MessageType;
|
|
47
|
+
export declare class DisjointOrderNegotiationFields extends OrderNegotiationFields {
|
|
43
48
|
/**
|
|
44
|
-
*
|
|
45
|
-
* @param
|
|
49
|
+
* Creates a DisjointOrderNegotiationFields from JSON data
|
|
50
|
+
* @param json JSON object representing disjoint order negotiation fields
|
|
46
51
|
*/
|
|
47
|
-
static
|
|
52
|
+
static fromJSON(json: any): DisjointOrderNegotiationFields;
|
|
48
53
|
/**
|
|
49
|
-
*
|
|
54
|
+
* Deserializes disjoint order negotiation fields
|
|
55
|
+
* @param buf
|
|
50
56
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
static deserialize(buf: Buffer): DisjointOrderNegotiationFields;
|
|
58
|
+
variant: "Disjoint";
|
|
59
|
+
discriminator: number;
|
|
53
60
|
orderOffer: OrderOffer;
|
|
54
61
|
/**
|
|
55
|
-
* Converts
|
|
62
|
+
* Converts disjoint order negotiation fields to JSON
|
|
56
63
|
*/
|
|
57
|
-
toJSON():
|
|
64
|
+
toJSON(): IDisjointOrderNegotiationFieldsJSON;
|
|
58
65
|
/**
|
|
59
|
-
* Serializes the
|
|
66
|
+
* Serializes the disjoint order negotiation fields into a Buffer
|
|
60
67
|
*/
|
|
61
68
|
serialize(): Buffer;
|
|
62
69
|
}
|
|
63
|
-
export
|
|
64
|
-
|
|
70
|
+
export type IOrderNegotiationFieldsJSON = ISingleOrderNegotiationFieldsJSON | IDisjointOrderNegotiationFieldsJSON;
|
|
71
|
+
export interface ISingleOrderNegotiationFieldsJSON {
|
|
72
|
+
variant: 'Single';
|
|
65
73
|
}
|
|
66
|
-
export interface
|
|
67
|
-
|
|
74
|
+
export interface IDisjointOrderNegotiationFieldsJSON {
|
|
75
|
+
variant: 'Disjoint';
|
|
68
76
|
orderOffer: IOrderOfferJSON;
|
|
69
77
|
}
|
|
78
|
+
export declare const OrderNegotiationFieldsV0: typeof SingleOrderNegotiationFields;
|
|
79
|
+
export declare const OrderNegotiationFieldsV1: typeof DisjointOrderNegotiationFields;
|
|
80
|
+
export type IOrderNegotiationFieldsV0JSON = ISingleOrderNegotiationFieldsJSON;
|
|
81
|
+
export type IOrderNegotiationFieldsV1JSON = IDisjointOrderNegotiationFieldsJSON;
|
|
@@ -1,114 +1,161 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrderNegotiationFieldsV1 = exports.OrderNegotiationFieldsV0 = exports.OrderNegotiationFields = void 0;
|
|
3
|
+
exports.OrderNegotiationFieldsV1 = exports.OrderNegotiationFieldsV0 = exports.DisjointOrderNegotiationFields = exports.SingleOrderNegotiationFields = exports.OrderNegotiationFields = void 0;
|
|
4
4
|
const bufio_1 = require("@node-dlc/bufio");
|
|
5
|
-
const MessageType_1 = require("../MessageType");
|
|
6
5
|
const OrderOffer_1 = require("./OrderOffer");
|
|
6
|
+
/**
|
|
7
|
+
* Order negotiation fields for order contract negotiation.
|
|
8
|
+
* Follows the same pattern as NegotiationFields with Single and Disjoint variants.
|
|
9
|
+
*/
|
|
7
10
|
class OrderNegotiationFields {
|
|
8
11
|
static deserialize(buf) {
|
|
9
12
|
const reader = new bufio_1.BufferReader(buf);
|
|
10
|
-
const
|
|
11
|
-
switch (
|
|
12
|
-
case
|
|
13
|
-
return
|
|
14
|
-
case
|
|
15
|
-
return
|
|
13
|
+
const discriminator = Number(reader.readBigSize());
|
|
14
|
+
switch (discriminator) {
|
|
15
|
+
case 0:
|
|
16
|
+
return SingleOrderNegotiationFields.deserialize(buf);
|
|
17
|
+
case 1:
|
|
18
|
+
return DisjointOrderNegotiationFields.deserialize(buf);
|
|
19
|
+
default:
|
|
20
|
+
throw new Error(`Invalid OrderNegotiationFields discriminator: ${discriminator}. Must be 0 (Single) or 1 (Disjoint)`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Creates OrderNegotiationFields from JSON data
|
|
25
|
+
* @param json JSON object representing order negotiation fields
|
|
26
|
+
*/
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
28
|
+
static fromJSON(json) {
|
|
29
|
+
if (!json || typeof json !== 'object') {
|
|
30
|
+
throw new Error('Invalid JSON input for OrderNegotiationFields');
|
|
31
|
+
}
|
|
32
|
+
const variant = json.variant;
|
|
33
|
+
switch (variant) {
|
|
34
|
+
case 'Single':
|
|
35
|
+
return SingleOrderNegotiationFields.fromJSON(json);
|
|
36
|
+
case 'Disjoint':
|
|
37
|
+
return DisjointOrderNegotiationFields.fromJSON(json);
|
|
16
38
|
default:
|
|
17
|
-
throw new Error(`
|
|
39
|
+
throw new Error(`Unknown order negotiation fields variant: ${variant}. Must be 'Single' or 'Disjoint'`);
|
|
18
40
|
}
|
|
19
41
|
}
|
|
20
42
|
}
|
|
21
43
|
exports.OrderNegotiationFields = OrderNegotiationFields;
|
|
22
44
|
/**
|
|
23
|
-
*
|
|
24
|
-
* offer which are taken into account during DLC construction.
|
|
45
|
+
* Order negotiation fields for contract based on a single event (basic/empty).
|
|
25
46
|
*/
|
|
26
|
-
class
|
|
47
|
+
class SingleOrderNegotiationFields extends OrderNegotiationFields {
|
|
27
48
|
constructor() {
|
|
28
49
|
super(...arguments);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*/
|
|
32
|
-
this.type = OrderNegotiationFieldsV0.type;
|
|
50
|
+
this.variant = 'Single';
|
|
51
|
+
this.discriminator = 0;
|
|
33
52
|
}
|
|
34
53
|
/**
|
|
35
|
-
*
|
|
54
|
+
* Creates a SingleOrderNegotiationFields from JSON data
|
|
55
|
+
* @param json JSON object representing single order negotiation fields
|
|
56
|
+
*/
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
58
|
+
static fromJSON(json) {
|
|
59
|
+
const instance = new SingleOrderNegotiationFields();
|
|
60
|
+
if (json.variant !== 'Single') {
|
|
61
|
+
throw new Error(`Invalid variant for SingleOrderNegotiationFields: expected 'Single', got ${json.variant}`);
|
|
62
|
+
}
|
|
63
|
+
// Single order negotiation fields are currently empty/basic
|
|
64
|
+
return instance;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Deserializes single order negotiation fields
|
|
36
68
|
* @param buf
|
|
37
69
|
*/
|
|
38
70
|
static deserialize(buf) {
|
|
39
|
-
const instance = new
|
|
71
|
+
const instance = new SingleOrderNegotiationFields();
|
|
40
72
|
const reader = new bufio_1.BufferReader(buf);
|
|
41
|
-
reader.readBigSize(); // read
|
|
42
|
-
|
|
73
|
+
reader.readBigSize(); // read discriminator (0)
|
|
74
|
+
// Single order negotiation fields are currently empty
|
|
43
75
|
return instance;
|
|
44
76
|
}
|
|
45
77
|
/**
|
|
46
|
-
* Converts
|
|
78
|
+
* Converts single order negotiation fields to JSON
|
|
47
79
|
*/
|
|
48
80
|
toJSON() {
|
|
49
81
|
return {
|
|
50
|
-
|
|
82
|
+
variant: this.variant,
|
|
51
83
|
};
|
|
52
84
|
}
|
|
53
85
|
/**
|
|
54
|
-
* Serializes the
|
|
86
|
+
* Serializes the single order negotiation fields into a Buffer
|
|
55
87
|
*/
|
|
56
88
|
serialize() {
|
|
57
89
|
const writer = new bufio_1.BufferWriter();
|
|
58
|
-
writer.writeBigSize(this.
|
|
59
|
-
|
|
90
|
+
writer.writeBigSize(this.discriminator);
|
|
91
|
+
// Single order negotiation fields are currently empty
|
|
60
92
|
return writer.toBuffer();
|
|
61
93
|
}
|
|
62
94
|
}
|
|
63
|
-
exports.
|
|
64
|
-
OrderNegotiationFieldsV0.type = MessageType_1.MessageType.OrderNegotiationFieldsV0;
|
|
95
|
+
exports.SingleOrderNegotiationFields = SingleOrderNegotiationFields;
|
|
65
96
|
/**
|
|
66
|
-
*
|
|
67
|
-
* offer which are taken into account during DLC construction.
|
|
97
|
+
* Order negotiation fields for contract based on multiple events.
|
|
68
98
|
*/
|
|
69
|
-
class
|
|
99
|
+
class DisjointOrderNegotiationFields extends OrderNegotiationFields {
|
|
70
100
|
constructor() {
|
|
71
101
|
super(...arguments);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
102
|
+
this.variant = 'Disjoint';
|
|
103
|
+
this.discriminator = 1;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Creates a DisjointOrderNegotiationFields from JSON data
|
|
107
|
+
* @param json JSON object representing disjoint order negotiation fields
|
|
108
|
+
*/
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
|
110
|
+
static fromJSON(json) {
|
|
111
|
+
const instance = new DisjointOrderNegotiationFields();
|
|
112
|
+
if (json.variant !== 'Disjoint') {
|
|
113
|
+
throw new Error(`Invalid variant for DisjointOrderNegotiationFields: expected 'Disjoint', got ${json.variant}`);
|
|
114
|
+
}
|
|
115
|
+
if (!json.orderOffer) {
|
|
116
|
+
throw new Error('DisjointOrderNegotiationFields requires orderOffer field');
|
|
117
|
+
}
|
|
118
|
+
instance.orderOffer = OrderOffer_1.OrderOffer.fromJSON
|
|
119
|
+
? OrderOffer_1.OrderOffer.fromJSON(json.orderOffer)
|
|
120
|
+
: OrderOffer_1.OrderOffer.deserialize(Buffer.from(json.orderOffer, 'hex'));
|
|
121
|
+
return instance;
|
|
76
122
|
}
|
|
77
123
|
/**
|
|
78
|
-
* Deserializes
|
|
124
|
+
* Deserializes disjoint order negotiation fields
|
|
79
125
|
* @param buf
|
|
80
126
|
*/
|
|
81
127
|
static deserialize(buf) {
|
|
82
|
-
const instance = new
|
|
128
|
+
const instance = new DisjointOrderNegotiationFields();
|
|
83
129
|
const reader = new bufio_1.BufferReader(buf);
|
|
84
|
-
reader.readBigSize(); // read
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
instance.orderOffer = OrderOffer_1.OrderOffer.deserialize(
|
|
130
|
+
reader.readBigSize(); // read discriminator (1)
|
|
131
|
+
const orderOfferLength = reader.readBigSize();
|
|
132
|
+
const orderOfferBuf = reader.readBytes(Number(orderOfferLength));
|
|
133
|
+
instance.orderOffer = OrderOffer_1.OrderOffer.deserialize(orderOfferBuf);
|
|
88
134
|
return instance;
|
|
89
135
|
}
|
|
90
136
|
/**
|
|
91
|
-
* Converts
|
|
137
|
+
* Converts disjoint order negotiation fields to JSON
|
|
92
138
|
*/
|
|
93
139
|
toJSON() {
|
|
94
140
|
return {
|
|
95
|
-
|
|
141
|
+
variant: this.variant,
|
|
96
142
|
orderOffer: this.orderOffer.toJSON(),
|
|
97
143
|
};
|
|
98
144
|
}
|
|
99
145
|
/**
|
|
100
|
-
* Serializes the
|
|
146
|
+
* Serializes the disjoint order negotiation fields into a Buffer
|
|
101
147
|
*/
|
|
102
148
|
serialize() {
|
|
103
149
|
const writer = new bufio_1.BufferWriter();
|
|
104
|
-
writer.writeBigSize(this.
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
writer.
|
|
108
|
-
writer.writeBytes(dataWriter.toBuffer());
|
|
150
|
+
writer.writeBigSize(this.discriminator);
|
|
151
|
+
const orderOfferData = this.orderOffer.serialize();
|
|
152
|
+
writer.writeBigSize(orderOfferData.length);
|
|
153
|
+
writer.writeBytes(orderOfferData);
|
|
109
154
|
return writer.toBuffer();
|
|
110
155
|
}
|
|
111
156
|
}
|
|
112
|
-
exports.
|
|
113
|
-
|
|
157
|
+
exports.DisjointOrderNegotiationFields = DisjointOrderNegotiationFields;
|
|
158
|
+
// Legacy exports for backward compatibility - map to new structure
|
|
159
|
+
exports.OrderNegotiationFieldsV0 = SingleOrderNegotiationFields; // V0 was basic/empty
|
|
160
|
+
exports.OrderNegotiationFieldsV1 = DisjointOrderNegotiationFields; // V1 had OrderOffer
|
|
114
161
|
//# sourceMappingURL=OrderNegotiationFields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderNegotiationFields.js","sourceRoot":"","sources":["../../lib/messages/OrderNegotiationFields.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;AAE7D,
|
|
1
|
+
{"version":3,"file":"OrderNegotiationFields.js","sourceRoot":"","sources":["../../lib/messages/OrderNegotiationFields.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;AAE7D,6CAA2D;AAE3D;;;GAGG;AACH,MAAsB,sBAAsB;IACnC,MAAM,CAAC,WAAW,CAAC,GAAW;QACnC,MAAM,MAAM,GAAG,IAAI,oBAAY,CAAC,GAAG,CAAC,CAAC;QACrC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;QAEnD,QAAQ,aAAa,EAAE;YACrB,KAAK,CAAC;gBACJ,OAAO,4BAA4B,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YACvD,KAAK,CAAC;gBACJ,OAAO,8BAA8B,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YACzD;gBACE,MAAM,IAAI,KAAK,CACb,iDAAiD,aAAa,sCAAsC,CACrG,CAAC;SACL;IACH,CAAC;IAED;;;OAGG;IACH,iHAAiH;IAC1G,MAAM,CAAC,QAAQ,CAAC,IAAS;QAC9B,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YACrC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;SAClE;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE7B,QAAQ,OAAO,EAAE;YACf,KAAK,QAAQ;gBACX,OAAO,4BAA4B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AC;IAMD;;OAEG;IACI,MAAM;QACX,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;SACrC,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,SAAS;QACd,MAAM,MAAM,GAAG,IAAI,oBAAY,EAAE,CAAC;QAClC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAExC,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;QACnD,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAC3C,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;QAElC,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;CACF;AAvED,wEAuEC;AAeD,mEAAmE;AACtD,QAAA,wBAAwB,GAAG,4BAA4B,CAAC,CAAC,qBAAqB;AAC9E,QAAA,wBAAwB,GAAG,8BAA8B,CAAC,CAAC,oBAAoB"}
|
|
@@ -69,7 +69,7 @@ export interface IOrderOfferJSON {
|
|
|
69
69
|
feeRatePerVb: number;
|
|
70
70
|
cetLocktime: number;
|
|
71
71
|
refundLocktime: number;
|
|
72
|
-
tlvs: (IOrderMetadataJSON | IOrderIrcInfoJSON | IOrderPositionInfoJSON | IBatchFundingGroupJSON |
|
|
72
|
+
tlvs: (IOrderMetadataJSON | IOrderIrcInfoJSON | IOrderPositionInfoJSON | IBatchFundingGroupJSON | unknown)[];
|
|
73
73
|
}
|
|
74
74
|
export declare class OrderOfferContainer {
|
|
75
75
|
private offers;
|
|
@@ -103,7 +103,7 @@ class OrderOffer {
|
|
|
103
103
|
case MessageType_1.MessageType.OrderIrcInfoV0:
|
|
104
104
|
instance.ircInfo = OrderIrcInfo_1.OrderIrcInfoV0.deserialize(buf);
|
|
105
105
|
break;
|
|
106
|
-
case MessageType_1.MessageType.
|
|
106
|
+
case MessageType_1.MessageType.OrderPositionInfo:
|
|
107
107
|
instance.positionInfo = OrderPositionInfo_1.OrderPositionInfo.deserialize(buf);
|
|
108
108
|
break;
|
|
109
109
|
case MessageType_1.MessageType.BatchFundingGroup:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderOffer.js","sourceRoot":"","sources":["../../lib/messages/OrderOffer.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;
|
|
1
|
+
{"version":3,"file":"OrderOffer.js","sourceRoot":"","sources":["../../lib/messages/OrderOffer.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;AAG7D,gDAA+D;AAC/D,gEAA6D;AAC7D,gDAA6C;AAC7C,kCAAmD;AACnD,2DAAgF;AAChF,iDAIwB;AAExB,iDAIwB;AACxB,mDAAiE;AACjE,2DAAgF;AAEhF,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAErC;;;;GAIG;AACH,MAAa,UAAU;IAAvB;QAuIE;;WAEG;QACI,SAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAE9B,qCAAqC;QAC9B,oBAAe,GAAW,8BAAgB,CAAC,CAAC,sCAAsC;IAyK3F,CAAC;IAnTC;;;OAGG;IACH,iHAAiH;IAC1G,MAAM,CAAC,QAAQ,CAAC,IAAS;QAC9B,MAAM,QAAQ,GAAG,IAAI,UAAU,EAAE,CAAC;QAElC,0CAA0C;QAC1C,QAAQ,CAAC,eAAe;YACtB,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,gBAAgB,IAAI,8BAAgB,CAAC;QACpE,QAAQ,CAAC,aAAa,GAAG,MAAM,CAAC,IAAI,CAClC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,EACjD,KAAK,CACN,CAAC;QACF,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QAC3E,QAAQ,CAAC,mBAAmB,GAAG,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-
export declare abstract class OrderPositionInfo {
|
|
6
|
-
static deserialize(buf: Buffer): OrderPositionInfo;
|
|
7
|
-
abstract type: number;
|
|
8
|
-
abstract toJSON(): IOrderPositionInfoJSON;
|
|
9
|
-
abstract serialize(): Buffer;
|
|
10
|
-
}
|
|
11
5
|
/**
|
|
12
|
-
*
|
|
6
|
+
* OrderPositionInfo message
|
|
13
7
|
*/
|
|
14
|
-
export declare class
|
|
8
|
+
export declare class OrderPositionInfo implements IDlcMessage {
|
|
15
9
|
static type: MessageType;
|
|
16
10
|
/**
|
|
17
|
-
* Deserializes an
|
|
11
|
+
* Deserializes an OrderPositionInfo message
|
|
18
12
|
* @param buf
|
|
19
13
|
*/
|
|
20
|
-
static deserialize(buf: Buffer):
|
|
14
|
+
static deserialize(buf: Buffer): OrderPositionInfo;
|
|
21
15
|
/**
|
|
22
|
-
* The type for
|
|
16
|
+
* The type for OrderPositionInfo message
|
|
23
17
|
*/
|
|
24
18
|
type: MessageType;
|
|
25
19
|
length: bigint;
|
|
@@ -31,11 +25,11 @@ export declare class OrderPositionInfoV0 extends OrderPositionInfo implements ID
|
|
|
31
25
|
price: bigint;
|
|
32
26
|
extraPrecision: number;
|
|
33
27
|
/**
|
|
34
|
-
* Converts
|
|
28
|
+
* Converts OrderPositionInfo to JSON
|
|
35
29
|
*/
|
|
36
30
|
toJSON(): IOrderPositionInfoJSON;
|
|
37
31
|
/**
|
|
38
|
-
* Serializes the
|
|
32
|
+
* Serializes the OrderPositionInfo message into a Buffer
|
|
39
33
|
*/
|
|
40
34
|
serialize(): Buffer;
|
|
41
35
|
}
|
|
@@ -1,31 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.OrderPositionInfo = void 0;
|
|
4
4
|
const bufio_1 = require("@node-dlc/bufio");
|
|
5
5
|
const MessageType_1 = require("../MessageType");
|
|
6
|
-
class OrderPositionInfo {
|
|
7
|
-
static deserialize(buf) {
|
|
8
|
-
const reader = new bufio_1.BufferReader(buf);
|
|
9
|
-
const type = Number(reader.readBigSize());
|
|
10
|
-
switch (type) {
|
|
11
|
-
case MessageType_1.MessageType.OrderPositionInfoV0:
|
|
12
|
-
return OrderPositionInfoV0.deserialize(buf);
|
|
13
|
-
default:
|
|
14
|
-
throw new Error(`Order cso info TLV type must be OrderPositionInfoV0`);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.OrderPositionInfo = OrderPositionInfo;
|
|
19
6
|
/**
|
|
20
|
-
*
|
|
7
|
+
* OrderPositionInfo message
|
|
21
8
|
*/
|
|
22
|
-
class
|
|
9
|
+
class OrderPositionInfo {
|
|
23
10
|
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
11
|
/**
|
|
26
|
-
* The type for
|
|
12
|
+
* The type for OrderPositionInfo message
|
|
27
13
|
*/
|
|
28
|
-
this.type =
|
|
14
|
+
this.type = OrderPositionInfo.type;
|
|
29
15
|
this.shiftForFees = 'neither';
|
|
30
16
|
this.fees = BigInt(0);
|
|
31
17
|
this.instrumentName = undefined;
|
|
@@ -35,11 +21,11 @@ class OrderPositionInfoV0 extends OrderPositionInfo {
|
|
|
35
21
|
this.extraPrecision = 0;
|
|
36
22
|
}
|
|
37
23
|
/**
|
|
38
|
-
* Deserializes an
|
|
24
|
+
* Deserializes an OrderPositionInfo message
|
|
39
25
|
* @param buf
|
|
40
26
|
*/
|
|
41
27
|
static deserialize(buf) {
|
|
42
|
-
const instance = new
|
|
28
|
+
const instance = new OrderPositionInfo();
|
|
43
29
|
const reader = new bufio_1.BufferReader(buf);
|
|
44
30
|
reader.readBigSize(); // read type
|
|
45
31
|
instance.length = reader.readBigSize();
|
|
@@ -81,7 +67,7 @@ class OrderPositionInfoV0 extends OrderPositionInfo {
|
|
|
81
67
|
return instance;
|
|
82
68
|
}
|
|
83
69
|
/**
|
|
84
|
-
* Converts
|
|
70
|
+
* Converts OrderPositionInfo to JSON
|
|
85
71
|
*/
|
|
86
72
|
toJSON() {
|
|
87
73
|
return {
|
|
@@ -95,7 +81,7 @@ class OrderPositionInfoV0 extends OrderPositionInfo {
|
|
|
95
81
|
};
|
|
96
82
|
}
|
|
97
83
|
/**
|
|
98
|
-
* Serializes the
|
|
84
|
+
* Serializes the OrderPositionInfo message into a Buffer
|
|
99
85
|
*/
|
|
100
86
|
serialize() {
|
|
101
87
|
const writer = new bufio_1.BufferWriter();
|
|
@@ -120,6 +106,6 @@ class OrderPositionInfoV0 extends OrderPositionInfo {
|
|
|
120
106
|
return writer.toBuffer();
|
|
121
107
|
}
|
|
122
108
|
}
|
|
123
|
-
exports.
|
|
124
|
-
|
|
109
|
+
exports.OrderPositionInfo = OrderPositionInfo;
|
|
110
|
+
OrderPositionInfo.type = MessageType_1.MessageType.OrderPositionInfo;
|
|
125
111
|
//# sourceMappingURL=OrderPositionInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderPositionInfo.js","sourceRoot":"","sources":["../../lib/messages/OrderPositionInfo.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;AAE7D,gDAA6C;AAK7C
|
|
1
|
+
{"version":3,"file":"OrderPositionInfo.js","sourceRoot":"","sources":["../../lib/messages/OrderPositionInfo.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;AAE7D,gDAA6C;AAK7C;;GAEG;AACH,MAAa,iBAAiB;IAA9B;QAqDE;;WAEG;QACI,SAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC;QAI9B,iBAAY,GAAa,SAAS,CAAC;QAEnC,SAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAEjB,mBAAc,GAAuB,SAAS,CAAC;QAE/C,iBAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAEzB,cAAS,GAA+B,SAAS,CAAC;QAElD,UAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,gDAAgD;QAEnE,mBAAc,GAAG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