@atomicfinance/bitcoin-ddk-provider 4.1.13 → 4.2.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 +1 -1
- package/CHANGELOG.md +27 -0
- package/dist/BitcoinDdkProvider.d.ts +3 -23
- package/dist/BitcoinDdkProvider.js +154 -355
- package/dist/BitcoinDdkProvider.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/Utils.d.ts +66 -1
- package/dist/utils/Utils.js +255 -0
- package/dist/utils/Utils.js.map +1 -1
- package/lib/BitcoinDdkProvider.ts +280 -456
- package/lib/index.ts +1 -0
- package/lib/utils/Utils.ts +332 -0
- package/package.json +5 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @atomicfinance/bitcoin-ddk-provider@4.
|
|
3
|
+
> @atomicfinance/bitcoin-ddk-provider@4.2.0 build /Users/matthewblack/code/github.com/AtomicFinance/bitcoin-abstraction-layer/packages/bitcoin-ddk-provider
|
|
4
4
|
> ../../node_modules/.bin/tsc --project tsconfig.json
|
|
5
5
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @atomicfinance/bitcoin-ddk-provider
|
|
2
2
|
|
|
3
|
+
## 4.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8d13721: Fix lexographic ordering dlc input pubkeys
|
|
8
|
+
- Updated dependencies [8d13721]
|
|
9
|
+
- @atomicfinance/bitcoin-utils@4.2.1
|
|
10
|
+
- @atomicfinance/provider@4.2.1
|
|
11
|
+
- @atomicfinance/types@4.2.1
|
|
12
|
+
- @atomicfinance/utils@4.2.1
|
|
13
|
+
|
|
14
|
+
## 4.2.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- ec43a60: Implement DDK DLC splicing support + util refactor
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- b718514: Refactor funding input sorting
|
|
23
|
+
- Updated dependencies [ec43a60]
|
|
24
|
+
- Updated dependencies [b718514]
|
|
25
|
+
- @atomicfinance/bitcoin-utils@4.2.0
|
|
26
|
+
- @atomicfinance/provider@4.2.0
|
|
27
|
+
- @atomicfinance/types@4.2.0
|
|
28
|
+
- @atomicfinance/utils@4.2.0
|
|
29
|
+
|
|
3
30
|
## 4.1.13
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -8,26 +8,6 @@ export default class BitcoinDdkProvider extends Provider {
|
|
|
8
8
|
private _ddk;
|
|
9
9
|
constructor(network: BitcoinNetwork, ddkLib: DdkInterface);
|
|
10
10
|
DdkLoaded(): Promise<void>;
|
|
11
|
-
/**
|
|
12
|
-
* Helper function to ensure we have a Buffer object
|
|
13
|
-
* Handles cases where Buffer objects have been serialized/deserialized
|
|
14
|
-
*/
|
|
15
|
-
private ensureBuffer;
|
|
16
|
-
/**
|
|
17
|
-
* Detect if signature is in compact format (64 bytes) or DER format
|
|
18
|
-
* and convert compact to DER if needed, adding SIGHASH_ALL flag
|
|
19
|
-
*/
|
|
20
|
-
private ensureDerSignature;
|
|
21
|
-
/**
|
|
22
|
-
* Detect if signature is in DER format and convert to compact format (64 bytes)
|
|
23
|
-
* by extracting r and s values, removing SIGHASH flag if present
|
|
24
|
-
*/
|
|
25
|
-
private ensureCompactSignature;
|
|
26
|
-
/**
|
|
27
|
-
* Compute contract ID from fund transaction ID, output index, and temporary contract ID
|
|
28
|
-
* Matches the Rust implementation in rust-dlc
|
|
29
|
-
*/
|
|
30
|
-
private computeContractId;
|
|
31
11
|
/**
|
|
32
12
|
* Create refund signature using PSBT method instead of DDK
|
|
33
13
|
*/
|
|
@@ -84,8 +64,8 @@ export default class BitcoinDdkProvider extends Provider {
|
|
|
84
64
|
private getFundOutputValueSats;
|
|
85
65
|
private CreateCetAdaptorAndRefundSigs;
|
|
86
66
|
private VerifyCetAdaptorAndRefundSigs;
|
|
87
|
-
private
|
|
88
|
-
private
|
|
67
|
+
private CreateFundingSigs;
|
|
68
|
+
private VerifyFundingSigs;
|
|
89
69
|
/**
|
|
90
70
|
* Get sighash for funding transaction inputs
|
|
91
71
|
* @param dlcOffer DLC Offer
|
|
@@ -115,7 +95,7 @@ export default class BitcoinDdkProvider extends Provider {
|
|
|
115
95
|
private CreateFundingScript;
|
|
116
96
|
private CreateFundingTx;
|
|
117
97
|
FindOutcomeIndexFromPolynomialPayoutCurvePiece(dlcOffer: DlcOffer, contractDescriptor: NumericalDescriptor, contractOraclePairIndex: number, polynomialPayoutCurvePiece: PolynomialPayoutCurvePiece, oracleAttestation: OracleAttestation, outcome: bigint): Promise<FindOutcomeResponse>;
|
|
118
|
-
FindOutcomeIndexFromHyperbolaPayoutCurvePiece(
|
|
98
|
+
FindOutcomeIndexFromHyperbolaPayoutCurvePiece(dlcOffer: DlcOffer, contractDescriptor: NumericalDescriptor, contractOraclePairIndex: number, hyperbolaPayoutCurvePiece: HyperbolaPayoutCurvePiece, oracleAttestation: OracleAttestation, outcome: bigint): Promise<FindOutcomeResponse>;
|
|
119
99
|
FindOutcomeIndex(dlcOffer: DlcOffer, oracleAttestation: OracleAttestation): Promise<FindOutcomeResponse>;
|
|
120
100
|
ValidateEvent(dlcOffer: DlcOffer, oracleAttestation: OracleAttestation): void;
|
|
121
101
|
FindAndSignCet(dlcOffer: DlcOffer, dlcAccept: DlcAccept, dlcSign: DlcSign, dlcTxs: DlcTransactions, oracleAttestation: OracleAttestation, isOfferer?: boolean): Promise<Tx>;
|