@atomicfinance/types 4.2.7 → 4.3.0

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.
@@ -1,5 +1,5 @@
1
1
 
2
2
  
3
- > @atomicfinance/types@4.2.7 build /Users/matthewblack/code/github.com/AtomicFinance/bitcoin-abstraction-layer/packages/types
3
+ > @atomicfinance/types@4.3.0 build /Users/matthewblack/code/github.com/AtomicFinance/bitcoin-abstraction-layer/packages/types
4
4
  > ../../node_modules/.bin/tsc --project tsconfig.json
5
5
 
@@ -1,5 +1,5 @@
1
1
 
2
2
  
3
- > @atomicfinance/types@4.0.3 lint /Users/matthewblack/code/github.com/AtomicFinance/bitcoin-abstraction-layer/packages/types
3
+ > @atomicfinance/types@4.2.7 lint /Users/matthewblack/code/github.com/AtomicFinance/bitcoin-abstraction-layer/packages/types
4
4
  > ../../node_modules/.bin/eslint .
5
5
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atomicfinance/types
2
2
 
3
+ ## 4.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d041351: Add contractFlags parameter to DLC offer and transaction creation
8
+
9
+ ## 4.2.8
10
+
11
+ ### Patch Changes
12
+
13
+ - 82c2f2b: Lazy load ECC
14
+
3
15
  ## 4.2.7
4
16
 
5
17
  ### Patch Changes
package/dist/ddk.d.ts CHANGED
@@ -78,10 +78,10 @@ export interface DdkInterface {
78
78
  verifyCetAdaptorSigFromOracleInfo(adaptorSig: AdaptorSignature, cet: DdkTransaction, oracleInfo: Array<DdkOracleInfo>, pubkey: Buffer, fundingScriptPubkey: Buffer, totalCollateral: bigint, msgs: Array<Array<Buffer>>): boolean;
79
79
  verifyCetAdaptorSigsFromOracleInfo(adaptorSigs: Array<AdaptorSignature>, cets: Array<DdkTransaction>, oracleInfo: Array<DdkOracleInfo>, pubkey: Buffer, fundingScriptPubkey: Buffer, totalCollateral: bigint, msgs: Array<Array<Array<Buffer>>>): boolean;
80
80
  createCets(fundTxId: string, fundVout: number, localFinalScriptPubkey: Buffer, remoteFinalScriptPubkey: Buffer, outcomes: Array<Payout>, lockTime: number, localSerialId: bigint, remoteSerialId: bigint): Array<DdkTransaction>;
81
- createDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: number, feeRate: bigint, fundLockTime: number, cetLockTime: number, fundOutputSerialId: bigint): DdkDlcTransactions;
81
+ createDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: number, feeRate: bigint, fundLockTime: number, cetLockTime: number, fundOutputSerialId: bigint, contractFlags?: number): DdkDlcTransactions;
82
82
  createFundTxLockingScript(localFundPubkey: Buffer, remoteFundPubkey: Buffer): Buffer;
83
83
  createRefundTransaction(localFinalScriptPubkey: Buffer, remoteFinalScriptPubkey: Buffer, localAmount: bigint, remoteAmount: bigint, lockTime: number, fundTxId: string, fundVout: number): DdkTransaction;
84
- createSplicedDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: number, feeRate: bigint, fundLockTime: number, cetLockTime: number, fundOutputSerialId: bigint): DdkDlcTransactions;
84
+ createSplicedDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: number, feeRate: bigint, fundLockTime: number, cetLockTime: number, fundOutputSerialId: bigint, contractFlags?: number): DdkDlcTransactions;
85
85
  getChangeOutputAndFees(params: PartyParams, feeRate: bigint): ChangeOutputAndFees;
86
86
  getRawFundingTransactionInputSignature(fundingTransaction: DdkTransaction, privkey: Buffer, prevTxId: string, prevTxVout: number, value: bigint): Buffer;
87
87
  getTotalInputVsize(inputs: Array<TxInputInfo>): number;
@@ -105,10 +105,10 @@ export declare function createCetAdaptorSigsFromOracleInfo(cets: Array<DdkTransa
105
105
  export declare function verifyCetAdaptorSigFromOracleInfo(adaptorSig: AdaptorSignature, cet: DdkTransaction, oracleInfo: Array<DdkOracleInfo>, pubkey: Buffer, fundingScriptPubkey: Buffer, totalCollateral: bigint, msgs: Array<Array<Buffer>>): boolean;
106
106
  export declare function verifyCetAdaptorSigsFromOracleInfo(adaptorSigs: Array<AdaptorSignature>, cets: Array<DdkTransaction>, oracleInfo: Array<DdkOracleInfo>, pubkey: Buffer, fundingScriptPubkey: Buffer, totalCollateral: bigint, msgs: Array<Array<Array<Buffer>>>): boolean;
107
107
  export declare function createCets(fundTxId: string, fundVout: number, localFinalScriptPubkey: Buffer, remoteFinalScriptPubkey: Buffer, outcomes: Array<Payout>, lockTime: number, localSerialId: bigint, remoteSerialId: bigint): Array<DdkTransaction>;
108
- export declare function createDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: number, feeRate: bigint, fundLockTime: number, cetLockTime: number, fundOutputSerialId: bigint): DdkDlcTransactions;
108
+ export declare function createDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: number, feeRate: bigint, fundLockTime: number, cetLockTime: number, fundOutputSerialId: bigint, contractFlags?: number): DdkDlcTransactions;
109
109
  export declare function createFundTxLockingScript(localFundPubkey: Buffer, remoteFundPubkey: Buffer): Buffer;
110
110
  export declare function createRefundTransaction(localFinalScriptPubkey: Buffer, remoteFinalScriptPubkey: Buffer, localAmount: bigint, remoteAmount: bigint, lockTime: number, fundTxId: string, fundVout: number): DdkTransaction;
111
- export declare function createSplicedDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: number, feeRate: bigint, fundLockTime: number, cetLockTime: number, fundOutputSerialId: bigint): DdkDlcTransactions;
111
+ export declare function createSplicedDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: number, feeRate: bigint, fundLockTime: number, cetLockTime: number, fundOutputSerialId: bigint, contractFlags?: number): DdkDlcTransactions;
112
112
  export declare function getChangeOutputAndFees(params: PartyParams, feeRate: bigint): ChangeOutputAndFees;
113
113
  export declare function getRawFundingTransactionInputSignature(fundingTransaction: DdkTransaction, privkey: Buffer, prevTxId: string, prevTxVout: number, value: bigint): Buffer;
114
114
  export declare function getTotalInputVsize(inputs: Array<TxInputInfo>): number;
package/dist/dlc.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export declare const CONTRACT_FLAG_REFUND_TO_ACCEPTER = 1;
1
2
  import { Tx } from '@node-dlc/bitcoin';
2
3
  import { CetAdaptorSignatures, ContractInfo, DlcAccept, DlcClose, DlcCloseMetadata, DlcOffer, DlcSign, DlcTransactions, FundingInput, OracleAttestation } from '@node-dlc/messaging';
3
4
  import { TxOutRequest } from './common';
@@ -35,7 +36,7 @@ export interface DlcProvider {
35
36
  * @param refundLocktime The nLockTime to be put on the refund transaction
36
37
  * @returns {Promise<DlcOffer>}
37
38
  */
38
- createDlcOffer(contractInfo: ContractInfo, offerCollateralSatoshis: bigint, feeRatePerVb: bigint, cetLocktime: number, refundLocktime: number, fixedInputs?: Input[], inputSupplementationMode?: InputSupplementationMode): Promise<DlcOffer>;
39
+ createDlcOffer(contractInfo: ContractInfo, offerCollateralSatoshis: bigint, feeRatePerVb: bigint, cetLocktime: number, refundLocktime: number, fixedInputs?: Input[], inputSupplementationMode?: InputSupplementationMode, contractFlags?: number): Promise<DlcOffer>;
39
40
  /**
40
41
  * Accept DLC Offer
41
42
  * @param _dlcOffer Dlc Offer Message
package/dist/dlc.js CHANGED
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CONTRACT_FLAG_REFUND_TO_ACCEPTER = void 0;
4
+ exports.CONTRACT_FLAG_REFUND_TO_ACCEPTER = 0x01;
3
5
  //# sourceMappingURL=dlc.js.map
package/dist/dlc.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dlc.js","sourceRoot":"","sources":["../lib/dlc.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"dlc.js","sourceRoot":"","sources":["../lib/dlc.ts"],"names":[],"mappings":";;;AAAa,QAAA,gCAAgC,GAAG,IAAI,CAAC"}
package/lib/ddk.ts CHANGED
@@ -155,6 +155,7 @@ export interface DdkInterface {
155
155
  fundLockTime: number,
156
156
  cetLockTime: number,
157
157
  fundOutputSerialId: bigint,
158
+ contractFlags?: number,
158
159
  ): DdkDlcTransactions;
159
160
 
160
161
  createFundTxLockingScript(
@@ -181,6 +182,7 @@ export interface DdkInterface {
181
182
  fundLockTime: number,
182
183
  cetLockTime: number,
183
184
  fundOutputSerialId: bigint,
185
+ contractFlags?: number,
184
186
  ): DdkDlcTransactions;
185
187
 
186
188
  getChangeOutputAndFees(
@@ -330,6 +332,7 @@ export declare function createDlcTransactions(
330
332
  fundLockTime: number,
331
333
  cetLockTime: number,
332
334
  fundOutputSerialId: bigint,
335
+ contractFlags?: number,
333
336
  ): DdkDlcTransactions;
334
337
 
335
338
  export declare function createFundTxLockingScript(
@@ -356,6 +359,7 @@ export declare function createSplicedDlcTransactions(
356
359
  fundLockTime: number,
357
360
  cetLockTime: number,
358
361
  fundOutputSerialId: bigint,
362
+ contractFlags?: number,
359
363
  ): DdkDlcTransactions;
360
364
 
361
365
  export declare function getChangeOutputAndFees(
package/lib/dlc.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export const CONTRACT_FLAG_REFUND_TO_ACCEPTER = 0x01;
2
+
1
3
  import { Tx } from '@node-dlc/bitcoin';
2
4
  import {
3
5
  CetAdaptorSignatures,
@@ -71,6 +73,7 @@ export interface DlcProvider {
71
73
  refundLocktime: number,
72
74
  fixedInputs?: Input[],
73
75
  inputSupplementationMode?: InputSupplementationMode,
76
+ contractFlags?: number,
74
77
  ): Promise<DlcOffer>;
75
78
 
76
79
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atomicfinance/types",
3
3
  "umdName": "Types",
4
- "version": "4.2.7",
4
+ "version": "4.3.0",
5
5
  "description": "Bitcoin Abstraction Layer Types",
6
6
  "author": "Atomic Finance <info@atomic.finance>",
7
7
  "homepage": "",