@atomicfinance/bitcoin-wallet-provider 4.1.0 → 4.1.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.
- package/.turbo/turbo-build.log +4 -5
- package/CHANGELOG.md +14 -0
- package/package.json +6 -6
- package/.turbo/turbo-lint$colon$fix.log +0 -5
- package/.turbo/turbo-lint.log +0 -5
- package/.turbo/turbo-test.log +0 -0
- package/.yalc/@node-dlc/core/.nyc_output/687a3c14-9765-45fd-a1fe-f7db3d56fee4.json +0 -1
- package/.yalc/@node-dlc/core/.nyc_output/processinfo/687a3c14-9765-45fd-a1fe-f7db3d56fee4.json +0 -1
- package/.yalc/@node-dlc/core/.nyc_output/processinfo/index.json +0 -1
- package/.yalc/@node-dlc/core/README.md +0 -11
- package/.yalc/@node-dlc/core/__tests__/core.spec.ts +0 -7
- package/.yalc/@node-dlc/core/__tests__/dlc/CETCalculator.spec.ts +0 -1029
- package/.yalc/@node-dlc/core/__tests__/dlc/CoinSelect.spec.ts +0 -179
- package/.yalc/@node-dlc/core/__tests__/dlc/PolynomialPayoutCurve.spec.ts +0 -345
- package/.yalc/@node-dlc/core/__tests__/dlc/TxBuilder.spec.ts +0 -424
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/Builder.spec.ts +0 -492
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/CoveredCall.spec.ts +0 -112
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/CsoInfo.spec.ts +0 -1124
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/LongCall.spec.ts +0 -55
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/LongPut.spec.ts +0 -55
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/OptionInfo.spec.ts +0 -226
- package/.yalc/@node-dlc/core/__tests__/dlc/finance/ShortPut.spec.ts +0 -62
- package/.yalc/@node-dlc/core/__tests__/tsconfig.json +0 -8
- package/.yalc/@node-dlc/core/__tests__/utils/precision.spec.ts +0 -40
- package/.yalc/@node-dlc/core/coverage/lcov-report/base.css +0 -224
- package/.yalc/@node-dlc/core/coverage/lcov-report/block-navigation.js +0 -79
- package/.yalc/@node-dlc/core/coverage/lcov-report/favicon.png +0 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/index.html +0 -171
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/AsyncProcessingQueue.ts.html +0 -269
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/Base32.ts.html +0 -86
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/BigIntUtils.ts.html +0 -86
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/BitField.ts.html +0 -86
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/ChannelId.ts.html +0 -86
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/LinkedList.ts.html +0 -413
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/LinkedListNode.ts.html +0 -122
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/Queue.ts.html +0 -188
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/ShortChannelId.ts.html +0 -86
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/ShortChannelIdUtils.ts.html +0 -107
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/CETCalculator.ts.html +0 -1430
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/CoinSelect.ts.html +0 -431
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/HyperbolaPayoutCurve.ts.html +0 -644
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/PolynomialPayoutCurve.ts.html +0 -878
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/TxBuilder.ts.html +0 -1088
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/TxFinalizer.ts.html +0 -731
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/Builder.ts.html +0 -2270
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/CoveredCall.ts.html +0 -410
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/CsoInfo.ts.html +0 -1574
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/LinearPayout.ts.html +0 -362
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/LongCall.ts.html +0 -302
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/LongPut.ts.html +0 -302
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/OptionInfo.ts.html +0 -626
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/ShortPut.ts.html +0 -305
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/finance/index.html +0 -216
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/dlc/index.html +0 -186
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/index.html +0 -261
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/index.ts.html +0 -278
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/ChannelId.ts.html +0 -242
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/ChannelKeys.ts.html +0 -407
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/CommitmentNumber.ts.html +0 -362
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/CommitmentSecret.ts.html +0 -203
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/CommitmentSecretStore.ts.html +0 -332
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/Htlc.ts.html +0 -236
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/HtlcDirection.ts.html +0 -131
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/ScriptFactory.ts.html +0 -530
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/TxFactory.ts.html +0 -1094
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/lightning/index.html +0 -231
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/utils/BigIntUtils.ts.html +0 -272
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/utils/Precision.ts.html +0 -149
- package/.yalc/@node-dlc/core/coverage/lcov-report/lib/utils/index.html +0 -126
- package/.yalc/@node-dlc/core/coverage/lcov-report/prettify.css +0 -1
- package/.yalc/@node-dlc/core/coverage/lcov-report/prettify.js +0 -2
- package/.yalc/@node-dlc/core/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/.yalc/@node-dlc/core/coverage/lcov-report/sorter.js +0 -170
- package/.yalc/@node-dlc/core/coverage/lcov.info +0 -2426
- package/.yalc/@node-dlc/core/dist/AsyncProcessingQueue.d.ts +0 -22
- package/.yalc/@node-dlc/core/dist/AsyncProcessingQueue.js +0 -55
- package/.yalc/@node-dlc/core/dist/AsyncProcessingQueue.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/Base32.d.ts +0 -1
- package/.yalc/@node-dlc/core/dist/Base32.js +0 -7
- package/.yalc/@node-dlc/core/dist/Base32.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/BigIntUtils.d.ts +0 -1
- package/.yalc/@node-dlc/core/dist/BigIntUtils.js +0 -8
- package/.yalc/@node-dlc/core/dist/BigIntUtils.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/BitField.d.ts +0 -1
- package/.yalc/@node-dlc/core/dist/BitField.js +0 -7
- package/.yalc/@node-dlc/core/dist/BitField.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/ChannelId.d.ts +0 -1
- package/.yalc/@node-dlc/core/dist/ChannelId.js +0 -7
- package/.yalc/@node-dlc/core/dist/ChannelId.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/LinkedList.d.ts +0 -30
- package/.yalc/@node-dlc/core/dist/LinkedList.js +0 -104
- package/.yalc/@node-dlc/core/dist/LinkedList.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/LinkedListNode.d.ts +0 -9
- package/.yalc/@node-dlc/core/dist/LinkedListNode.js +0 -15
- package/.yalc/@node-dlc/core/dist/LinkedListNode.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/Queue.d.ts +0 -22
- package/.yalc/@node-dlc/core/dist/Queue.js +0 -38
- package/.yalc/@node-dlc/core/dist/Queue.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/ShortChannelId.d.ts +0 -1
- package/.yalc/@node-dlc/core/dist/ShortChannelId.js +0 -7
- package/.yalc/@node-dlc/core/dist/ShortChannelId.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/ShortChannelIdUtils.d.ts +0 -1
- package/.yalc/@node-dlc/core/dist/ShortChannelIdUtils.js +0 -12
- package/.yalc/@node-dlc/core/dist/ShortChannelIdUtils.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/CETCalculator.d.ts +0 -50
- package/.yalc/@node-dlc/core/dist/dlc/CETCalculator.js +0 -332
- package/.yalc/@node-dlc/core/dist/dlc/CETCalculator.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/CoinSelect.d.ts +0 -23
- package/.yalc/@node-dlc/core/dist/dlc/CoinSelect.js +0 -77
- package/.yalc/@node-dlc/core/dist/dlc/CoinSelect.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/HyperbolaPayoutCurve.d.ts +0 -20
- package/.yalc/@node-dlc/core/dist/dlc/HyperbolaPayoutCurve.js +0 -117
- package/.yalc/@node-dlc/core/dist/dlc/HyperbolaPayoutCurve.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/PayoutCurve.d.ts +0 -5
- package/.yalc/@node-dlc/core/dist/dlc/PayoutCurve.js +0 -3
- package/.yalc/@node-dlc/core/dist/dlc/PayoutCurve.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/PolynomialPayoutCurve.d.ts +0 -52
- package/.yalc/@node-dlc/core/dist/dlc/PolynomialPayoutCurve.js +0 -173
- package/.yalc/@node-dlc/core/dist/dlc/PolynomialPayoutCurve.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/TxBuilder.d.ts +0 -55
- package/.yalc/@node-dlc/core/dist/dlc/TxBuilder.js +0 -217
- package/.yalc/@node-dlc/core/dist/dlc/TxBuilder.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/TxFinalizer.d.ts +0 -40
- package/.yalc/@node-dlc/core/dist/dlc/TxFinalizer.js +0 -146
- package/.yalc/@node-dlc/core/dist/dlc/TxFinalizer.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/finance/Builder.d.ts +0 -193
- package/.yalc/@node-dlc/core/dist/dlc/finance/Builder.js +0 -422
- package/.yalc/@node-dlc/core/dist/dlc/finance/Builder.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/finance/CoveredCall.d.ts +0 -13
- package/.yalc/@node-dlc/core/dist/dlc/finance/CoveredCall.js +0 -67
- package/.yalc/@node-dlc/core/dist/dlc/finance/CoveredCall.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/finance/CsoInfo.d.ts +0 -114
- package/.yalc/@node-dlc/core/dist/dlc/finance/CsoInfo.js +0 -290
- package/.yalc/@node-dlc/core/dist/dlc/finance/CsoInfo.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/finance/LinearPayout.d.ts +0 -6
- package/.yalc/@node-dlc/core/dist/dlc/finance/LinearPayout.js +0 -79
- package/.yalc/@node-dlc/core/dist/dlc/finance/LinearPayout.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/finance/LongCall.d.ts +0 -13
- package/.yalc/@node-dlc/core/dist/dlc/finance/LongCall.js +0 -47
- package/.yalc/@node-dlc/core/dist/dlc/finance/LongCall.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/finance/LongPut.d.ts +0 -13
- package/.yalc/@node-dlc/core/dist/dlc/finance/LongPut.js +0 -47
- package/.yalc/@node-dlc/core/dist/dlc/finance/LongPut.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/finance/OptionInfo.d.ts +0 -20
- package/.yalc/@node-dlc/core/dist/dlc/finance/OptionInfo.js +0 -101
- package/.yalc/@node-dlc/core/dist/dlc/finance/OptionInfo.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/dlc/finance/ShortPut.d.ts +0 -12
- package/.yalc/@node-dlc/core/dist/dlc/finance/ShortPut.js +0 -46
- package/.yalc/@node-dlc/core/dist/dlc/finance/ShortPut.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/index.d.ts +0 -39
- package/.yalc/@node-dlc/core/dist/index.js +0 -78
- package/.yalc/@node-dlc/core/dist/index.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/lightning/ChannelId.d.ts +0 -31
- package/.yalc/@node-dlc/core/dist/lightning/ChannelId.js +0 -52
- package/.yalc/@node-dlc/core/dist/lightning/ChannelId.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/lightning/ChannelKeys.d.ts +0 -55
- package/.yalc/@node-dlc/core/dist/lightning/ChannelKeys.js +0 -105
- package/.yalc/@node-dlc/core/dist/lightning/ChannelKeys.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentNumber.d.ts +0 -55
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentNumber.js +0 -76
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentNumber.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentSecret.d.ts +0 -26
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentSecret.js +0 -44
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentSecret.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentSecretStore.d.ts +0 -41
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentSecretStore.js +0 -79
- package/.yalc/@node-dlc/core/dist/lightning/CommitmentSecretStore.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/lightning/Htlc.d.ts +0 -46
- package/.yalc/@node-dlc/core/dist/lightning/Htlc.js +0 -46
- package/.yalc/@node-dlc/core/dist/lightning/Htlc.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/lightning/HtlcDirection.d.ts +0 -16
- package/.yalc/@node-dlc/core/dist/lightning/HtlcDirection.js +0 -21
- package/.yalc/@node-dlc/core/dist/lightning/HtlcDirection.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/lightning/ScriptFactory.d.ts +0 -76
- package/.yalc/@node-dlc/core/dist/lightning/ScriptFactory.js +0 -102
- package/.yalc/@node-dlc/core/dist/lightning/ScriptFactory.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/lightning/TxFactory.d.ts +0 -83
- package/.yalc/@node-dlc/core/dist/lightning/TxFactory.js +0 -222
- package/.yalc/@node-dlc/core/dist/lightning/TxFactory.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/utils/BigIntUtils.d.ts +0 -9
- package/.yalc/@node-dlc/core/dist/utils/BigIntUtils.js +0 -59
- package/.yalc/@node-dlc/core/dist/utils/BigIntUtils.js.map +0 -1
- package/.yalc/@node-dlc/core/dist/utils/Precision.d.ts +0 -13
- package/.yalc/@node-dlc/core/dist/utils/Precision.js +0 -28
- package/.yalc/@node-dlc/core/dist/utils/Precision.js.map +0 -1
- package/.yalc/@node-dlc/core/lib/AsyncProcessingQueue.ts +0 -63
- package/.yalc/@node-dlc/core/lib/Base32.ts +0 -2
- package/.yalc/@node-dlc/core/lib/BigIntUtils.ts +0 -2
- package/.yalc/@node-dlc/core/lib/BitField.ts +0 -2
- package/.yalc/@node-dlc/core/lib/ChannelId.ts +0 -2
- package/.yalc/@node-dlc/core/lib/LinkedList.ts +0 -111
- package/.yalc/@node-dlc/core/lib/LinkedListNode.ts +0 -14
- package/.yalc/@node-dlc/core/lib/Queue.ts +0 -36
- package/.yalc/@node-dlc/core/lib/ShortChannelId.ts +0 -2
- package/.yalc/@node-dlc/core/lib/ShortChannelIdUtils.ts +0 -9
- package/.yalc/@node-dlc/core/lib/dlc/CETCalculator.ts +0 -450
- package/.yalc/@node-dlc/core/lib/dlc/CoinSelect.ts +0 -117
- package/.yalc/@node-dlc/core/lib/dlc/HyperbolaPayoutCurve.ts +0 -188
- package/.yalc/@node-dlc/core/lib/dlc/PayoutCurve.ts +0 -6
- package/.yalc/@node-dlc/core/lib/dlc/PolynomialPayoutCurve.ts +0 -266
- package/.yalc/@node-dlc/core/lib/dlc/TxBuilder.ts +0 -336
- package/.yalc/@node-dlc/core/lib/dlc/TxFinalizer.ts +0 -217
- package/.yalc/@node-dlc/core/lib/dlc/finance/Builder.ts +0 -730
- package/.yalc/@node-dlc/core/lib/dlc/finance/CoveredCall.ts +0 -110
- package/.yalc/@node-dlc/core/lib/dlc/finance/CsoInfo.ts +0 -498
- package/.yalc/@node-dlc/core/lib/dlc/finance/LinearPayout.ts +0 -94
- package/.yalc/@node-dlc/core/lib/dlc/finance/LongCall.ts +0 -74
- package/.yalc/@node-dlc/core/lib/dlc/finance/LongPut.ts +0 -74
- package/.yalc/@node-dlc/core/lib/dlc/finance/OptionInfo.ts +0 -182
- package/.yalc/@node-dlc/core/lib/dlc/finance/ShortPut.ts +0 -75
- package/.yalc/@node-dlc/core/lib/index.ts +0 -66
- package/.yalc/@node-dlc/core/lib/lightning/ChannelId.ts +0 -54
- package/.yalc/@node-dlc/core/lib/lightning/ChannelKeys.ts +0 -109
- package/.yalc/@node-dlc/core/lib/lightning/CommitmentNumber.ts +0 -94
- package/.yalc/@node-dlc/core/lib/lightning/CommitmentSecret.ts +0 -41
- package/.yalc/@node-dlc/core/lib/lightning/CommitmentSecretStore.ts +0 -84
- package/.yalc/@node-dlc/core/lib/lightning/Htlc.ts +0 -52
- package/.yalc/@node-dlc/core/lib/lightning/HtlcDirection.ts +0 -17
- package/.yalc/@node-dlc/core/lib/lightning/ScriptFactory.ts +0 -150
- package/.yalc/@node-dlc/core/lib/lightning/TxFactory.ts +0 -338
- package/.yalc/@node-dlc/core/lib/utils/BigIntUtils.ts +0 -64
- package/.yalc/@node-dlc/core/lib/utils/Precision.ts +0 -23
- package/.yalc/@node-dlc/core/package.json +0 -38
- package/.yalc/@node-dlc/core/tsconfig.json +0 -8
- package/.yalc/@node-dlc/core/yalc.sig +0 -1
- package/yalc.lock +0 -10
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
|
-
/**
|
|
4
|
-
* Serializes execution of events. This class is constructed with
|
|
5
|
-
* a delegate function that is executed for each item that is enqueued.
|
|
6
|
-
*/
|
|
7
|
-
export declare class AsyncProcessingQueue<T> extends EventEmitter {
|
|
8
|
-
private _fn;
|
|
9
|
-
private _queue;
|
|
10
|
-
private _flushHandle;
|
|
11
|
-
constructor(fn: (...args: T[]) => Promise<void>);
|
|
12
|
-
/**
|
|
13
|
-
* Adds a new item to the processing queue
|
|
14
|
-
*/
|
|
15
|
-
enqueue(value: T): void;
|
|
16
|
-
/**
|
|
17
|
-
* Gets the number of pending items in the processor queue
|
|
18
|
-
* @type {number}
|
|
19
|
-
*/
|
|
20
|
-
get size(): number;
|
|
21
|
-
private _flush;
|
|
22
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AsyncProcessingQueue = void 0;
|
|
4
|
-
const events_1 = require("events");
|
|
5
|
-
const Queue_1 = require("./Queue");
|
|
6
|
-
/**
|
|
7
|
-
* Serializes execution of events. This class is constructed with
|
|
8
|
-
* a delegate function that is executed for each item that is enqueued.
|
|
9
|
-
*/
|
|
10
|
-
class AsyncProcessingQueue extends events_1.EventEmitter {
|
|
11
|
-
constructor(fn) {
|
|
12
|
-
super();
|
|
13
|
-
this._fn = fn;
|
|
14
|
-
this._queue = new Queue_1.Queue();
|
|
15
|
-
this._flush = this._flush.bind(this);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Adds a new item to the processing queue
|
|
19
|
-
*/
|
|
20
|
-
enqueue(value) {
|
|
21
|
-
this._queue.enqueue(value);
|
|
22
|
-
// Postpone flushing until end of event loop to allow multiple operations
|
|
23
|
-
// to enqueue. This handle will be cleared once flushing has completed.
|
|
24
|
-
if (!this._flushHandle)
|
|
25
|
-
this._flushHandle = setImmediate(this._flush);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Gets the number of pending items in the processor queue
|
|
29
|
-
* @type {number}
|
|
30
|
-
*/
|
|
31
|
-
get size() {
|
|
32
|
-
return this._queue.length;
|
|
33
|
-
}
|
|
34
|
-
async _flush() {
|
|
35
|
-
// emit that flushing is starting
|
|
36
|
-
this.emit('flushing');
|
|
37
|
-
// process all items on the queue, even items that
|
|
38
|
-
// are added to the queue while flushing is occuring
|
|
39
|
-
while (this._queue.length > 0) {
|
|
40
|
-
try {
|
|
41
|
-
const value = this._queue.dequeue();
|
|
42
|
-
await this._fn(value);
|
|
43
|
-
}
|
|
44
|
-
catch (ex) {
|
|
45
|
-
this.emit('error', ex);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
// emit flushing has completed
|
|
49
|
-
this.emit('flushed');
|
|
50
|
-
// clear flush handle so that next enqueue will trigger a flush
|
|
51
|
-
this._flushHandle = undefined;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.AsyncProcessingQueue = AsyncProcessingQueue;
|
|
55
|
-
//# sourceMappingURL=AsyncProcessingQueue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncProcessingQueue.js","sourceRoot":"","sources":["../lib/AsyncProcessingQueue.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AAEtC,mCAAgC;AAEhC;;;GAGG;AACH,MAAa,oBAAwB,SAAQ,qBAAY;IAOvD,YAAY,EAAmC;QAC7C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,IAAI,CAAC,MAAM,GAAG,IAAI,aAAK,EAAE,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED;;OAEG;IACI,OAAO,CAAC,KAAQ;QACrB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAE3B,yEAAyE;QACzE,uEAAuE;QACvE,IAAI,CAAC,IAAI,CAAC,YAAY;YAAE,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxE,CAAC;IAED;;;OAGG;IACH,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAC5B,CAAC;IAEO,KAAK,CAAC,MAAM;QAClB,iCAAiC;QACjC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAEtB,kDAAkD;QAClD,oDAAoD;QACpD,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YAC7B,IAAI;gBACF,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpC,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;aACvB;YAAC,OAAO,EAAE,EAAE;gBACX,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;aACxB;SACF;QAED,8BAA8B;QAC9B,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAErB,+DAA+D;QAC/D,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;IAChC,CAAC;CACF;AAtDD,oDAsDC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Base32 } from '@node-dlc/common';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Base32 = void 0;
|
|
4
|
-
// Re-export Base32 from common package to maintain backward compatibility
|
|
5
|
-
var common_1 = require("@node-dlc/common");
|
|
6
|
-
Object.defineProperty(exports, "Base32", { enumerable: true, get: function () { return common_1.Base32; } });
|
|
7
|
-
//# sourceMappingURL=Base32.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Base32.js","sourceRoot":"","sources":["../lib/Base32.ts"],"names":[],"mappings":";;;AAAA,0EAA0E;AAC1E,2CAA0C;AAAjC,gGAAA,MAAM,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { bigintToBuffer, calcBytes } from '@node-dlc/common';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.calcBytes = exports.bigintToBuffer = void 0;
|
|
4
|
-
// Re-export BigIntUtils functions from common package to maintain backward compatibility
|
|
5
|
-
var common_1 = require("@node-dlc/common");
|
|
6
|
-
Object.defineProperty(exports, "bigintToBuffer", { enumerable: true, get: function () { return common_1.bigintToBuffer; } });
|
|
7
|
-
Object.defineProperty(exports, "calcBytes", { enumerable: true, get: function () { return common_1.calcBytes; } });
|
|
8
|
-
//# sourceMappingURL=BigIntUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BigIntUtils.js","sourceRoot":"","sources":["../lib/BigIntUtils.ts"],"names":[],"mappings":";;;AAAA,yFAAyF;AACzF,2CAA6D;AAApD,wGAAA,cAAc,OAAA;AAAE,mGAAA,SAAS,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BitField } from '@node-dlc/common';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BitField = void 0;
|
|
4
|
-
// Re-export BitField from common package to maintain backward compatibility
|
|
5
|
-
var common_1 = require("@node-dlc/common");
|
|
6
|
-
Object.defineProperty(exports, "BitField", { enumerable: true, get: function () { return common_1.BitField; } });
|
|
7
|
-
//# sourceMappingURL=BitField.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BitField.js","sourceRoot":"","sources":["../lib/BitField.ts"],"names":[],"mappings":";;;AAAA,4EAA4E;AAC5E,2CAA4C;AAAnC,kGAAA,QAAQ,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ChannelId } from '@node-dlc/common';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ChannelId = void 0;
|
|
4
|
-
// Re-export ChannelId from common package to maintain backward compatibility
|
|
5
|
-
var common_1 = require("@node-dlc/common");
|
|
6
|
-
Object.defineProperty(exports, "ChannelId", { enumerable: true, get: function () { return common_1.ChannelId; } });
|
|
7
|
-
//# sourceMappingURL=ChannelId.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelId.js","sourceRoot":"","sources":["../lib/ChannelId.ts"],"names":[],"mappings":";;;AAAA,6EAA6E;AAC7E,2CAA6C;AAApC,mGAAA,SAAS,OAAA"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { LinkedListNode } from './LinkedListNode';
|
|
2
|
-
/**
|
|
3
|
-
* Implementation of a doubly linked-list that maintains both head and tail.
|
|
4
|
-
* Tail maintenance allows for O(1) insertions at tail
|
|
5
|
-
*/
|
|
6
|
-
export declare class LinkedList<T> {
|
|
7
|
-
length: number;
|
|
8
|
-
head: LinkedListNode<T>;
|
|
9
|
-
tail: LinkedListNode<T>;
|
|
10
|
-
/**
|
|
11
|
-
* Adds a node to the end of a linked List
|
|
12
|
-
* @param T value
|
|
13
|
-
* @returns {LinkedListNode}
|
|
14
|
-
*/
|
|
15
|
-
add(value: T): LinkedListNode<T>;
|
|
16
|
-
/**
|
|
17
|
-
* Finds the node at a specific position
|
|
18
|
-
*/
|
|
19
|
-
valueAt(index: number): T;
|
|
20
|
-
/**
|
|
21
|
-
* Finds the node for the index or throws an out of range exception
|
|
22
|
-
*/
|
|
23
|
-
nodeAt(index: number): LinkedListNode<T>;
|
|
24
|
-
/**
|
|
25
|
-
* Removes the node at the index and returns its value.
|
|
26
|
-
* Head or tail removal is an O(1) operation. For removal of other indexes
|
|
27
|
-
* is at worst O(N).
|
|
28
|
-
*/
|
|
29
|
-
remove(index: number): T;
|
|
30
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LinkedList = void 0;
|
|
4
|
-
const LinkedListNode_1 = require("./LinkedListNode");
|
|
5
|
-
/**
|
|
6
|
-
* Implementation of a doubly linked-list that maintains both head and tail.
|
|
7
|
-
* Tail maintenance allows for O(1) insertions at tail
|
|
8
|
-
*/
|
|
9
|
-
class LinkedList {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.length = 0;
|
|
12
|
-
this.head = null;
|
|
13
|
-
this.tail = null;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Adds a node to the end of a linked List
|
|
17
|
-
* @param T value
|
|
18
|
-
* @returns {LinkedListNode}
|
|
19
|
-
*/
|
|
20
|
-
add(value) {
|
|
21
|
-
const node = new LinkedListNode_1.LinkedListNode(value);
|
|
22
|
-
// when empty list
|
|
23
|
-
if (!this.head) {
|
|
24
|
-
this.head = node;
|
|
25
|
-
this.tail = node;
|
|
26
|
-
this.length++;
|
|
27
|
-
return node;
|
|
28
|
-
}
|
|
29
|
-
// non-empty, append to tail
|
|
30
|
-
node.prev = this.tail;
|
|
31
|
-
this.tail.next = node;
|
|
32
|
-
this.tail = node;
|
|
33
|
-
this.length++;
|
|
34
|
-
return node;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Finds the node at a specific position
|
|
38
|
-
*/
|
|
39
|
-
valueAt(index) {
|
|
40
|
-
const node = this.nodeAt(index);
|
|
41
|
-
if (node)
|
|
42
|
-
return node.value;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Finds the node for the index or throws an out of range exception
|
|
46
|
-
*/
|
|
47
|
-
nodeAt(index) {
|
|
48
|
-
// error when index out of range
|
|
49
|
-
if (index < 0 || index > this.length) {
|
|
50
|
-
throw new RangeError('Index out of range');
|
|
51
|
-
}
|
|
52
|
-
// seek until index is found
|
|
53
|
-
let currentNode = this.head;
|
|
54
|
-
let count = 0;
|
|
55
|
-
while (count < index) {
|
|
56
|
-
currentNode = currentNode.next;
|
|
57
|
-
count++;
|
|
58
|
-
}
|
|
59
|
-
return currentNode;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Removes the node at the index and returns its value.
|
|
63
|
-
* Head or tail removal is an O(1) operation. For removal of other indexes
|
|
64
|
-
* is at worst O(N).
|
|
65
|
-
*/
|
|
66
|
-
remove(index) {
|
|
67
|
-
// error when index out of range
|
|
68
|
-
if (index < 0 || index > this.length) {
|
|
69
|
-
throw new RangeError('Index out of range');
|
|
70
|
-
}
|
|
71
|
-
let removeNode;
|
|
72
|
-
let prevNode = null;
|
|
73
|
-
let nextNode = null;
|
|
74
|
-
// first node simply removes the node at the tip
|
|
75
|
-
if (index === 0) {
|
|
76
|
-
removeNode = this.head;
|
|
77
|
-
nextNode = this.head.next;
|
|
78
|
-
// adjust head
|
|
79
|
-
this.head = nextNode;
|
|
80
|
-
}
|
|
81
|
-
// last node, update the tail and mark next as null
|
|
82
|
-
if (index === this.length - 1) {
|
|
83
|
-
removeNode = this.tail;
|
|
84
|
-
prevNode = this.tail.prev;
|
|
85
|
-
// adjust tail
|
|
86
|
-
this.tail = prevNode;
|
|
87
|
-
}
|
|
88
|
-
// middle node
|
|
89
|
-
if (!removeNode) {
|
|
90
|
-
removeNode = this.nodeAt(index);
|
|
91
|
-
prevNode = removeNode.prev;
|
|
92
|
-
nextNode = removeNode.next;
|
|
93
|
-
}
|
|
94
|
-
// splice out the node afer null checking
|
|
95
|
-
if (prevNode)
|
|
96
|
-
prevNode.next = nextNode;
|
|
97
|
-
if (nextNode)
|
|
98
|
-
nextNode.prev = prevNode;
|
|
99
|
-
this.length--;
|
|
100
|
-
return removeNode.value;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
exports.LinkedList = LinkedList;
|
|
104
|
-
//# sourceMappingURL=LinkedList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkedList.js","sourceRoot":"","sources":["../lib/LinkedList.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LinkedListNode = void 0;
|
|
4
|
-
class LinkedListNode {
|
|
5
|
-
/**
|
|
6
|
-
* Creates a linked list node with the specified data
|
|
7
|
-
*/
|
|
8
|
-
constructor(value) {
|
|
9
|
-
this.value = value;
|
|
10
|
-
this.prev = null;
|
|
11
|
-
this.next = null;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.LinkedListNode = LinkedListNode;
|
|
15
|
-
//# sourceMappingURL=LinkedListNode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkedListNode.js","sourceRoot":"","sources":["../lib/LinkedListNode.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IAKzB;;OAEG;IACH,YAAY,KAAQ;QAClB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAbD,wCAaC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FIFO queue implemented with O(1) enqueue and dequeue operations
|
|
3
|
-
*/
|
|
4
|
-
export declare class Queue<T> {
|
|
5
|
-
private _list;
|
|
6
|
-
/**
|
|
7
|
-
* Peak the tip value
|
|
8
|
-
*/
|
|
9
|
-
peak(): T;
|
|
10
|
-
/**
|
|
11
|
-
* Returns the length of the queue
|
|
12
|
-
*/
|
|
13
|
-
get length(): number;
|
|
14
|
-
/**
|
|
15
|
-
* Enqueue a value
|
|
16
|
-
*/
|
|
17
|
-
enqueue(value: T): void;
|
|
18
|
-
/**
|
|
19
|
-
* Dequeue top most value
|
|
20
|
-
*/
|
|
21
|
-
dequeue(): T;
|
|
22
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Queue = void 0;
|
|
4
|
-
const LinkedList_1 = require("./LinkedList");
|
|
5
|
-
/**
|
|
6
|
-
* FIFO queue implemented with O(1) enqueue and dequeue operations
|
|
7
|
-
*/
|
|
8
|
-
class Queue {
|
|
9
|
-
constructor() {
|
|
10
|
-
this._list = new LinkedList_1.LinkedList();
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Peak the tip value
|
|
14
|
-
*/
|
|
15
|
-
peak() {
|
|
16
|
-
return this._list.head && this._list.head.value;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Returns the length of the queue
|
|
20
|
-
*/
|
|
21
|
-
get length() {
|
|
22
|
-
return this._list.length;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Enqueue a value
|
|
26
|
-
*/
|
|
27
|
-
enqueue(value) {
|
|
28
|
-
this._list.add(value);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Dequeue top most value
|
|
32
|
-
*/
|
|
33
|
-
dequeue() {
|
|
34
|
-
return this._list.remove(0);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.Queue = Queue;
|
|
38
|
-
//# sourceMappingURL=Queue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Queue.js","sourceRoot":"","sources":["../lib/Queue.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAE1C;;GAEG;AACH,MAAa,KAAK;IAAlB;QACU,UAAK,GAAkB,IAAI,uBAAU,EAAK,CAAC;IA6BrD,CAAC;IA3BC;;OAEG;IACI,IAAI;QACT,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,OAAO,CAAC,KAAQ;QACrB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;IAED;;OAEG;IACI,OAAO;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;CACF;AA9BD,sBA8BC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { ShortChannelId } from '@node-dlc/common';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ShortChannelId = void 0;
|
|
4
|
-
// Re-export ShortChannelId from common package to maintain backward compatibility
|
|
5
|
-
var common_1 = require("@node-dlc/common");
|
|
6
|
-
Object.defineProperty(exports, "ShortChannelId", { enumerable: true, get: function () { return common_1.ShortChannelId; } });
|
|
7
|
-
//# sourceMappingURL=ShortChannelId.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShortChannelId.js","sourceRoot":"","sources":["../lib/ShortChannelId.ts"],"names":[],"mappings":";;;AAAA,kFAAkF;AAClF,2CAAkD;AAAzC,wGAAA,cAAc,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { shortChannelIdFromBuffer, shortChannelIdFromNumber, shortChannelIdFromString, shortChannelIdToBuffer, shortChannelIdToNumber, shortChannelIdToString, } from '@node-dlc/common';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shortChannelIdToString = exports.shortChannelIdToNumber = exports.shortChannelIdToBuffer = exports.shortChannelIdFromString = exports.shortChannelIdFromNumber = exports.shortChannelIdFromBuffer = void 0;
|
|
4
|
-
// Re-export ShortChannelId utilities from common package to maintain backward compatibility
|
|
5
|
-
var common_1 = require("@node-dlc/common");
|
|
6
|
-
Object.defineProperty(exports, "shortChannelIdFromBuffer", { enumerable: true, get: function () { return common_1.shortChannelIdFromBuffer; } });
|
|
7
|
-
Object.defineProperty(exports, "shortChannelIdFromNumber", { enumerable: true, get: function () { return common_1.shortChannelIdFromNumber; } });
|
|
8
|
-
Object.defineProperty(exports, "shortChannelIdFromString", { enumerable: true, get: function () { return common_1.shortChannelIdFromString; } });
|
|
9
|
-
Object.defineProperty(exports, "shortChannelIdToBuffer", { enumerable: true, get: function () { return common_1.shortChannelIdToBuffer; } });
|
|
10
|
-
Object.defineProperty(exports, "shortChannelIdToNumber", { enumerable: true, get: function () { return common_1.shortChannelIdToNumber; } });
|
|
11
|
-
Object.defineProperty(exports, "shortChannelIdToString", { enumerable: true, get: function () { return common_1.shortChannelIdToString; } });
|
|
12
|
-
//# sourceMappingURL=ShortChannelIdUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShortChannelIdUtils.js","sourceRoot":"","sources":["../lib/ShortChannelIdUtils.ts"],"names":[],"mappings":";;;AAAA,4FAA4F;AAC5F,2CAO0B;AANxB,kHAAA,wBAAwB,OAAA;AACxB,kHAAA,wBAAwB,OAAA;AACxB,kHAAA,wBAAwB,OAAA;AACxB,gHAAA,sBAAsB,OAAA;AACtB,gHAAA,sBAAsB,OAAA;AACtB,gHAAA,sBAAsB,OAAA"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import BigNumber from 'bignumber.js';
|
|
2
|
-
import { HyperbolaPayoutCurve } from './HyperbolaPayoutCurve';
|
|
3
|
-
import { PolynomialPayoutCurve } from './PolynomialPayoutCurve';
|
|
4
|
-
export declare function zipWithIndex<T>(arr: T[]): [T, number][];
|
|
5
|
-
export declare function dropUntil<T>(data: T[], check: (_: T) => boolean): T[];
|
|
6
|
-
export declare function decompose(num: bigint, base: number, numDigits: number): number[];
|
|
7
|
-
export declare function separatePrefix(start: bigint, end: bigint, base: number, numDigits: number): {
|
|
8
|
-
prefixDigits: number[];
|
|
9
|
-
startDigits: number[];
|
|
10
|
-
endDigits: number[];
|
|
11
|
-
};
|
|
12
|
-
export declare function frontGroupings(digits: number[], base: number): number[][];
|
|
13
|
-
export declare function backGroupings(digits: number[], base: number): number[][];
|
|
14
|
-
export declare function middleGroupings(firstDigitStart: number, firstDigitEnd: number): number[][];
|
|
15
|
-
export declare function groupByIgnoringDigits(start: bigint, end: bigint, base: number, numDigits: number): number[][];
|
|
16
|
-
export interface RoundingInterval {
|
|
17
|
-
beginInterval: bigint;
|
|
18
|
-
roundingMod: bigint;
|
|
19
|
-
}
|
|
20
|
-
export type CETPayout = {
|
|
21
|
-
indexFrom: bigint;
|
|
22
|
-
indexTo: bigint;
|
|
23
|
-
payout: bigint;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Performs optimized evaluation and rounding for strictly monotonic hyperbolas on intervals (from, to)
|
|
27
|
-
* e.g. hyperbolas with the form b = c = 0
|
|
28
|
-
*
|
|
29
|
-
* The next start of a payout range is determined by finding the outcome at the next mid-rounding payout.
|
|
30
|
-
* Uses an inverse function of the hyperbola to find the outcome.
|
|
31
|
-
*
|
|
32
|
-
* Optimizes rounding from O(to - from) to O(totalCollateral / rounding)
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* Evaluates and rounds a payout_function equivalent to:
|
|
36
|
-
*
|
|
37
|
-
* payout_function_v0
|
|
38
|
-
* num_pieces: 1
|
|
39
|
-
* endpoint_0: from
|
|
40
|
-
* endpoint_payout_0: fromPayout
|
|
41
|
-
* extra_precision_0: 0
|
|
42
|
-
* payout_curve_piece: HyperbolaPayoutCurve
|
|
43
|
-
* endpoint_1: to
|
|
44
|
-
* endpoint_payout_1: toPayout
|
|
45
|
-
*/
|
|
46
|
-
export declare function splitIntoRanges(from: bigint, to: bigint, fromPayout: bigint, // endpoint_payout
|
|
47
|
-
toPayout: bigint, // endpoint_payout
|
|
48
|
-
totalCollateral: bigint, curve: HyperbolaPayoutCurve | PolynomialPayoutCurve, roundingIntervals: RoundingInterval[]): CETPayout[];
|
|
49
|
-
export declare const mergePayouts: (payouts: CETPayout[]) => CETPayout[];
|
|
50
|
-
export declare function roundPayout(payout: BigNumber, rounding: bigint): bigint;
|