@atomicfinance/types 4.0.2 → 4.1.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.
package/dist/bitcoin.js CHANGED
@@ -6,11 +6,11 @@ var AddressType;
6
6
  AddressType["LEGACY"] = "legacy";
7
7
  AddressType["P2SH_SEGWIT"] = "p2sh-segwit";
8
8
  AddressType["BECH32"] = "bech32";
9
- })(AddressType = exports.AddressType || (exports.AddressType = {}));
9
+ })(AddressType || (exports.AddressType = AddressType = {}));
10
10
  var SwapMode;
11
11
  (function (SwapMode) {
12
12
  SwapMode["P2SH"] = "p2sh";
13
13
  SwapMode["P2SH_SEGWIT"] = "p2shSegwit";
14
14
  SwapMode["P2WSH"] = "p2wsh";
15
- })(SwapMode = exports.SwapMode || (exports.SwapMode = {}));
15
+ })(SwapMode || (exports.SwapMode = SwapMode = {}));
16
16
  //# sourceMappingURL=bitcoin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bitcoin.js","sourceRoot":"","sources":["../lib/bitcoin.ts"],"names":[],"mappings":";;;AAsDA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,0CAA2B,CAAA;IAC3B,gCAAiB,CAAA;AACnB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AAED,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,sCAA0B,CAAA;IAC1B,2BAAe,CAAA;AACjB,CAAC,EAJW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAInB"}
1
+ {"version":3,"file":"bitcoin.js","sourceRoot":"","sources":["../lib/bitcoin.ts"],"names":[],"mappings":";;;AAsDA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,0CAA2B,CAAA;IAC3B,gCAAiB,CAAA;AACnB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAED,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,sCAA0B,CAAA;IAC1B,2BAAe,CAAA;AACjB,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB"}
package/dist/cfd.d.ts CHANGED
@@ -1509,19 +1509,6 @@ export interface SelectUtxosRequest {
1509
1509
  feeInfo?: CoinSelectionFeeInfomationField;
1510
1510
  }
1511
1511
  /** */
1512
- export interface UtxoJsonData {
1513
- txid: string;
1514
- vout: number;
1515
- amount: bigint;
1516
- asset?: string;
1517
- descriptor?: string;
1518
- }
1519
- /** */
1520
- export interface TargetAmountMapData {
1521
- asset: string;
1522
- amount: bigint;
1523
- }
1524
- /** */
1525
1512
  export interface SelectUtxosResponse {
1526
1513
  utxos: UtxoJsonData[];
1527
1514
  selectedAmount?: bigint;
package/dist/cfd.js CHANGED
@@ -1,5 +1,3 @@
1
1
  "use strict";
2
- /* eslint-disable max-len */
3
- /* eslint-disable indent */
4
2
  Object.defineProperty(exports, "__esModule", { value: true });
5
3
  //# sourceMappingURL=cfd.js.map
package/dist/cfd.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cfd.js","sourceRoot":"","sources":["../lib/cfd.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,2BAA2B"}
1
+ {"version":3,"file":"cfd.js","sourceRoot":"","sources":["../lib/cfd.ts"],"names":[],"mappings":""}
package/dist/ddk.d.ts ADDED
@@ -0,0 +1,121 @@
1
+ export interface AdaptorSignature {
2
+ signature: Buffer;
3
+ proof: Buffer;
4
+ }
5
+ export interface ChangeOutputAndFees {
6
+ changeOutput: TxOutput;
7
+ fundFee: bigint;
8
+ cetFee: bigint;
9
+ }
10
+ export interface DdkDlcInputInfo {
11
+ fundTx: DdkTransaction;
12
+ fundVout: number;
13
+ localFundPubkey: Buffer;
14
+ remoteFundPubkey: Buffer;
15
+ fundAmount: bigint;
16
+ maxWitnessLen: number;
17
+ inputSerialId: bigint;
18
+ contractId: Buffer;
19
+ }
20
+ export interface DlcOutcome {
21
+ localPayout: bigint;
22
+ remotePayout: bigint;
23
+ }
24
+ export interface DdkDlcTransactions {
25
+ fund: DdkTransaction;
26
+ cets: Array<DdkTransaction>;
27
+ refund: DdkTransaction;
28
+ fundingScriptPubkey: Buffer;
29
+ }
30
+ export interface DdkOracleInfo {
31
+ publicKey: Buffer;
32
+ nonces: Array<Buffer>;
33
+ }
34
+ export interface PartyParams {
35
+ fundPubkey: Buffer;
36
+ changeScriptPubkey: Buffer;
37
+ changeSerialId: bigint;
38
+ payoutScriptPubkey: Buffer;
39
+ payoutSerialId: bigint;
40
+ inputs: Array<TxInputInfo>;
41
+ inputAmount: bigint;
42
+ collateral: bigint;
43
+ dlcInputs: Array<DdkDlcInputInfo>;
44
+ }
45
+ export interface Payout {
46
+ offer: bigint;
47
+ accept: bigint;
48
+ }
49
+ export interface DdkTransaction {
50
+ version: number;
51
+ lockTime: number;
52
+ inputs: Array<TxInput>;
53
+ outputs: Array<TxOutput>;
54
+ rawBytes: Buffer;
55
+ }
56
+ export interface TxInput {
57
+ txid: string;
58
+ vout: number;
59
+ scriptSig: Buffer;
60
+ sequence: number;
61
+ witness: Array<Buffer>;
62
+ }
63
+ export interface TxInputInfo {
64
+ txid: string;
65
+ vout: number;
66
+ scriptSig: Buffer;
67
+ maxWitnessLength: number;
68
+ serialId: bigint;
69
+ }
70
+ export interface TxOutput {
71
+ value: bigint;
72
+ scriptPubkey: Buffer;
73
+ }
74
+ export interface DdkInterface {
75
+ createCet(localOutput: TxOutput, localPayoutSerialId: bigint, remoteOutput: TxOutput, remotePayoutSerialId: bigint, fundTxId: string, fundVout: number, lockTime: number): DdkTransaction;
76
+ createCetAdaptorSignatureFromOracleInfo(cet: DdkTransaction, oracleInfo: DdkOracleInfo, fundingSk: Buffer, fundingScriptPubkey: Buffer, totalCollateral: bigint, msgs: Array<Buffer>): AdaptorSignature;
77
+ createCetAdaptorSigsFromOracleInfo(cets: Array<DdkTransaction>, oracleInfo: Array<DdkOracleInfo>, fundingSecretKey: Buffer, fundingScriptPubkey: Buffer, fundOutputValue: bigint, msgs: Array<Array<Array<Buffer>>>): Array<AdaptorSignature>;
78
+ verifyCetAdaptorSigFromOracleInfo(adaptorSig: AdaptorSignature, cet: DdkTransaction, oracleInfo: Array<DdkOracleInfo>, pubkey: Buffer, fundingScriptPubkey: Buffer, totalCollateral: bigint, msgs: Array<Array<Buffer>>): boolean;
79
+ verifyCetAdaptorSigsFromOracleInfo(adaptorSigs: Array<AdaptorSignature>, cets: Array<DdkTransaction>, oracleInfo: Array<DdkOracleInfo>, pubkey: Buffer, fundingScriptPubkey: Buffer, totalCollateral: bigint, msgs: Array<Array<Array<Buffer>>>): boolean;
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;
82
+ createFundTxLockingScript(localFundPubkey: Buffer, remoteFundPubkey: Buffer): Buffer;
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;
85
+ getChangeOutputAndFees(params: PartyParams, feeRate: bigint): ChangeOutputAndFees;
86
+ getRawFundingTransactionInputSignature(fundingTransaction: DdkTransaction, privkey: Buffer, prevTxId: string, prevTxVout: number, value: bigint): Buffer;
87
+ getTotalInputVsize(inputs: Array<TxInputInfo>): number;
88
+ isDustOutput(output: TxOutput): boolean;
89
+ signFundTransactionInput(fundTransaction: DdkTransaction, privkey: Buffer, prevTxId: string, prevTxVout: number, value: bigint): DdkTransaction;
90
+ verifyFundTxSignature(fundTx: DdkTransaction, signature: Buffer, pubkey: Buffer, txid: string, vout: number, inputAmount: bigint): boolean;
91
+ signCet(cet: DdkTransaction, adaptorSignature: Buffer, oracleSignatures: Array<Buffer>, fundingSecretKey: Buffer, otherPubkey: Buffer, fundingScriptPubkey: Buffer, fundOutputValue: bigint): DdkTransaction;
92
+ convertMnemonicToSeed(mnemonic: string, passphrase?: string | null): Buffer;
93
+ createXprivFromParentPath(xpriv: Buffer, baseDerivationPath: string, network: string, path: string): Buffer;
94
+ getXpubFromXpriv(xpriv: Buffer, network: string): Buffer;
95
+ version(): string;
96
+ addSignatureToTransaction(tx: DdkTransaction, signature: Buffer, pubkey: Buffer, inputIndex: number): DdkTransaction;
97
+ signMultiSigInput(tx: DdkTransaction, dlcInput: DdkDlcInputInfo, localPrivkey: Buffer, remoteSignature: Buffer): DdkTransaction;
98
+ }
99
+ export declare function createCet(localOutput: TxOutput, localPayoutSerialId: bigint, remoteOutput: TxOutput, remotePayoutSerialId: bigint, fundTxId: string, fundVout: number, lockTime: number): DdkTransaction;
100
+ export declare function createCetAdaptorSignatureFromOracleInfo(cet: DdkTransaction, oracleInfo: DdkOracleInfo, fundingSk: Buffer, fundingScriptPubkey: Buffer, totalCollateral: bigint, msgs: Array<Buffer>): AdaptorSignature;
101
+ export declare function createCetAdaptorSigsFromOracleInfo(cets: Array<DdkTransaction>, oracleInfo: Array<DdkOracleInfo>, fundingSecretKey: Buffer, fundingScriptPubkey: Buffer, fundOutputValue: bigint, msgs: Array<Array<Array<Buffer>>>): Array<AdaptorSignature>;
102
+ export declare function verifyCetAdaptorSigFromOracleInfo(adaptorSig: AdaptorSignature, cet: DdkTransaction, oracleInfo: Array<DdkOracleInfo>, pubkey: Buffer, fundingScriptPubkey: Buffer, totalCollateral: bigint, msgs: Array<Array<Buffer>>): boolean;
103
+ 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;
104
+ export declare function createCets(fundTxId: string, fundVout: number, localFinalScriptPubkey: Buffer, remoteFinalScriptPubkey: Buffer, outcomes: Array<Payout>, lockTime: number, localSerialId: bigint, remoteSerialId: bigint): Array<DdkTransaction>;
105
+ export declare function createDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: number, feeRate: bigint, fundLockTime: number, cetLockTime: number, fundOutputSerialId: bigint): DdkDlcTransactions;
106
+ export declare function createFundTxLockingScript(localFundPubkey: Buffer, remoteFundPubkey: Buffer): Buffer;
107
+ export declare function createRefundTransaction(localFinalScriptPubkey: Buffer, remoteFinalScriptPubkey: Buffer, localAmount: bigint, remoteAmount: bigint, lockTime: number, fundTxId: string, fundVout: number): DdkTransaction;
108
+ export declare function createSplicedDlcTransactions(outcomes: Array<Payout>, localParams: PartyParams, remoteParams: PartyParams, refundLocktime: number, feeRate: bigint, fundLockTime: number, cetLockTime: number, fundOutputSerialId: bigint): DdkDlcTransactions;
109
+ export declare function getChangeOutputAndFees(params: PartyParams, feeRate: bigint): ChangeOutputAndFees;
110
+ export declare function getRawFundingTransactionInputSignature(fundingTransaction: DdkTransaction, privkey: Buffer, prevTxId: string, prevTxVout: number, value: bigint): Buffer;
111
+ export declare function getTotalInputVsize(inputs: Array<TxInputInfo>): number;
112
+ export declare function isDustOutput(output: TxOutput): boolean;
113
+ export declare function signFundTransactionInput(fundTransaction: DdkTransaction, privkey: Buffer, prevTxId: string, prevTxVout: number, value: bigint): DdkTransaction;
114
+ export declare function verifyFundTxSignature(fundTx: DdkTransaction, signature: Buffer, pubkey: Buffer, txid: string, vout: number, inputAmount: bigint): boolean;
115
+ export declare function version(): string;
116
+ export declare function signCet(cet: DdkTransaction, adaptorSignature: Buffer, oracleSignatures: Array<Buffer>, fundingSecretKey: Buffer, otherPubkey: Buffer, fundingScriptPubkey: Buffer, fundOutputValue: bigint): DdkTransaction;
117
+ export declare function convertMnemonicToSeed(mnemonic: string, passphrase?: string | null): Buffer;
118
+ export declare function createXprivFromParentPath(xpriv: Buffer, baseDerivationPath: string, network: string, path: string): Buffer;
119
+ export declare function getXpubFromXpriv(xpriv: Buffer, network: string): Buffer;
120
+ export declare function addSignatureToTransaction(tx: DdkTransaction, signature: Buffer, pubkey: Buffer, inputIndex: number): DdkTransaction;
121
+ export declare function signMultiSigInput(tx: DdkTransaction, dlcInput: DdkDlcInputInfo, localPrivkey: Buffer, remoteSignature: Buffer): DdkTransaction;
package/dist/ddk.js ADDED
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ /* auto-generated by NAPI-RS */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=ddk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ddk.js","sourceRoot":"","sources":["../lib/ddk.ts"],"names":[],"mappings":";AAAA,+BAA+B"}
package/dist/dlc.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Tx } from '@node-dlc/bitcoin';
3
2
  import { CetAdaptorSignatures, ContractInfo, DlcAccept, DlcClose, DlcCloseMetadata, DlcOffer, DlcSign, DlcTransactions, FundingInput, OracleAttestation } from '@node-dlc/messaging';
4
3
  import { TxOutRequest } from './common';
package/dist/dlc.js CHANGED
@@ -1,5 +1,3 @@
1
1
  "use strict";
2
- /* eslint-disable max-len */
3
- /* eslint-disable indent */
4
2
  Object.defineProperty(exports, "__esModule", { value: true });
5
3
  //# 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":";AAAA,4BAA4B;AAC5B,2BAA2B"}
1
+ {"version":3,"file":"dlc.js","sourceRoot":"","sources":["../lib/dlc.ts"],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -28,6 +28,7 @@ interface IClient {
28
28
  export * from './cfd';
29
29
  export * from './common';
30
30
  export * from './dlc';
31
+ export * from './ddk';
31
32
  export { default as Amount } from './models/Amount';
32
33
  export { default as Input, InputSupplementationMode, DlcInputInfo, } from './models/Input';
33
34
  export { default as OracleInfo } from './models/OracleInfo';
package/dist/index.js CHANGED
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
37
  };
@@ -43,6 +53,7 @@ Object.defineProperty(exports, "TxStatus", { enumerable: true, get: function ()
43
53
  __exportStar(require("./cfd"), exports);
44
54
  __exportStar(require("./common"), exports);
45
55
  __exportStar(require("./dlc"), exports);
56
+ __exportStar(require("./ddk"), exports);
46
57
  var Amount_1 = require("./models/Amount");
47
58
  Object.defineProperty(exports, "Amount", { enumerable: true, get: function () { return __importDefault(Amount_1).default; } });
48
59
  var Input_1 = require("./models/Input");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAqC;AAgDnC,oBAhDK,sBAAS,CAgDL;AA9CX,uCAAoC;AAoDlC,wFApDO,iBAAO,OAoDP;AAnDT,mDAAqC;AA6DnC,0BAAO;AAvDT,+DAAiD;AAsD/C,kDAAmB;AApDrB,+CAAsD;AA+CpD,yFA/CoB,sBAAQ,OA+CpB;AAzBV,wCAAsB;AACtB,2CAAyB;AACzB,wCAAsB;AACtB,0CAAoD;AAA3C,iHAAA,OAAO,OAAU;AAC1B,wCAIwB;AAHtB,+GAAA,OAAO,OAAS;AAChB,iHAAA,wBAAwB,OAAA;AAG1B,kDAA4D;AAAnD,yHAAA,OAAO,OAAc;AAC9B,4CAAsD;AAA7C,mHAAA,OAAO,OAAW;AAC3B,0CAAoD;AAA3C,iHAAA,OAAO,OAAU;AAC1B,sCAAgD;AAAvC,6GAAA,OAAO,OAAQ;AACxB,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAqC;AAiDnC,oBAjDK,sBAAS,CAiDL;AA/CX,uCAAoC;AAqDlC,wFArDO,iBAAO,OAqDP;AApDT,mDAAqC;AA8DnC,0BAAO;AAxDT,+DAAiD;AAuD/C,kDAAmB;AArDrB,+CAAsD;AAgDpD,yFAhDoB,sBAAQ,OAgDpB;AA1BV,wCAAsB;AACtB,2CAAyB;AACzB,wCAAsB;AACtB,wCAAsB;AACtB,0CAAoD;AAA3C,iHAAA,OAAO,OAAU;AAC1B,wCAIwB;AAHtB,+GAAA,OAAO,OAAS;AAChB,iHAAA,wBAAwB,OAAA;AAG1B,kDAA4D;AAAnD,yHAAA,OAAO,OAAc;AAC9B,4CAAsD;AAA7C,mHAAA,OAAO,OAAW;AAC3B,0CAAoD;AAA3C,iHAAA,OAAO,OAAU;AAC1B,sCAAgD;AAAvC,6GAAA,OAAO,OAAQ;AACxB,2CAAyB"}
package/dist/jsonrpc.d.ts CHANGED
@@ -40,15 +40,6 @@ export interface AddressInfo {
40
40
  hdkeypath: string;
41
41
  }
42
42
  export type AddressGrouping = string[][];
43
- export interface ReceivedByAddress {
44
- involvesWatchonly: boolean;
45
- address: string;
46
- account: string;
47
- amount: number;
48
- confirmations: number;
49
- label: string;
50
- txids: string[];
51
- }
52
43
  export interface Block {
53
44
  hash: string;
54
45
  confirmations: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Amount.js","sourceRoot":"","sources":["../../lib/models/Amount.ts"],"names":[],"mappings":";;AAAA,+CAA+C;AAC/C,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEnC,MAAqB,MAAM;IAIzB,YAAoB,QAAgB;QAClC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;QACtC,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAC5D,CAAC;IAED,8CAA8C;IACvC,MAAM,CAAC,WAAW,CAAC,OAAe;QACvC,OAAO,IAAI,MAAM,CAAC,OAAO,GAAG,gBAAgB,CAAC,CAAC;IAChD,CAAC;IAED,8CAA8C;IACvC,MAAM,CAAC,YAAY,CAAC,QAAgB;QACzC,OAAO,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;IAED,mCAAmC;IAC5B,gBAAgB;QACrB,OAAO,IAAI,CAAC,SAAS,GAAG,gBAAgB,CAAC;IAC3C,CAAC;IAED,mCAAmC;IAC5B,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7B,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IACvD,CAAC;IAED,0EAA0E;IAC1E,6CAA6C;IACtC,WAAW,CAAC,MAAc;QAC/B,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IACvD,CAAC;IAED,MAAM;QACJ,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE;YAC7B,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAgB;QAC9B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAChC,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAC/C,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE;YACjC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,gBAAgB,EAAE,MAAM,CAAC,SAAS,CAAC,gBAAgB;SACpD,CAAC,CAAC;IACL,CAAC;IAED,8DAA8D;IAC9D,MAAM,CAAC,OAAO,CAAC,GAAW,EAAE,KAAU;QACpC,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACrD,CAAC;CACF;AA1ED,yBA0EC"}
@@ -4,8 +4,8 @@ import Utxo from './Utxo';
4
4
  * Input supplementation modes for DLC operations
5
5
  */
6
6
  export declare enum InputSupplementationMode {
7
- None = "none",
8
- Optional = "optional",
7
+ None = "none",// Use exactly these inputs, no supplementation
8
+ Optional = "optional",// Try to supplement, fallback if fails
9
9
  Required = "required"
10
10
  }
11
11
  /**
@@ -14,7 +14,7 @@ var InputSupplementationMode;
14
14
  InputSupplementationMode["None"] = "none";
15
15
  InputSupplementationMode["Optional"] = "optional";
16
16
  InputSupplementationMode["Required"] = "required";
17
- })(InputSupplementationMode = exports.InputSupplementationMode || (exports.InputSupplementationMode = {}));
17
+ })(InputSupplementationMode || (exports.InputSupplementationMode = InputSupplementationMode = {}));
18
18
  /**
19
19
  * Class for interfacing with inputs/utxos in Liquality Chainify
20
20
  * https://github.com/liquality/chainify
@@ -73,6 +73,7 @@ class Input {
73
73
  inputSerialId: this.inputSerialId,
74
74
  toJSON: Utxo_1.default.prototype.toJSON,
75
75
  toInput: Utxo_1.default.prototype.toInput,
76
+ toTxInputInfo: Utxo_1.default.prototype.toTxInputInfo,
76
77
  };
77
78
  }
78
79
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../lib/models/Input.ts"],"names":[],"mappings":";;;;;;AACA,sDAA8B;AAC9B,kDAA0B;AAE1B;;GAEG;AACH,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IAClC,yCAAa,CAAA;IACb,iDAAqB,CAAA;IACrB,iDAAqB,CAAA;AACvB,CAAC,EAJW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAInC;AAWD;;;;;;;;;;;;;;;GAeG;AACH,MAAqB,KAAK;IACxB,YACW,IAAY,EACZ,IAAY,EACZ,OAAe,EACf,MAAc,EAAE,SAAS;IACzB,KAAa,EAAE,UAAU;IACzB,cAAuB,EACvB,gBAAyB,EACzB,YAAqB,EACrB,aAAsB,EACtB,YAAqB,EACrB,KAAc,EACd,aAAsB,EACtB,SAAmB,EACnB,QAAkB,EAClB,IAAc,EACd,QAAuB;QAfvB,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAQ;QACf,WAAM,GAAN,MAAM,CAAQ;QACd,UAAK,GAAL,KAAK,CAAQ;QACb,mBAAc,GAAd,cAAc,CAAS;QACvB,qBAA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,4 @@
1
+ import { TxInputInfo } from '../ddk';
1
2
  import Amount, { AmountJSON } from './Amount';
2
3
  import Input from './Input';
3
4
  /**
@@ -14,6 +15,7 @@ export default class Utxo {
14
15
  readonly inputSerialId?: bigint | number;
15
16
  constructor(txid: string, vout: number, amount: Amount, address: string, maxWitnessLength: number, derivationPath?: string, inputSerialId?: bigint | number);
16
17
  toInput(): Input;
18
+ toTxInputInfo(): TxInputInfo;
17
19
  toJSON(): UtxoJSON;
18
20
  static fromJSON(json: UtxoJSON): Utxo;
19
21
  static reviver(key: string, value: any): any;
@@ -29,6 +29,15 @@ class Utxo {
29
29
  undefined, // safe
30
30
  undefined);
31
31
  }
32
+ toTxInputInfo() {
33
+ return {
34
+ txid: this.txid,
35
+ vout: this.vout,
36
+ scriptSig: Buffer.alloc(0),
37
+ maxWitnessLength: this.maxWitnessLength,
38
+ serialId: this.inputSerialId ? BigInt(this.inputSerialId) : undefined,
39
+ };
40
+ }
32
41
  toJSON() {
33
42
  return Object.assign({}, this, {
34
43
  txid: this.txid,
@@ -1 +1 @@
1
- {"version":3,"file":"Utxo.js","sourceRoot":"","sources":["../../lib/models/Utxo.ts"],"names":[],"mappings":";;;;;AAAA,sDAA8C;AAC9C,oDAA4B;AAE5B;;;GAGG;AACH,MAAqB,IAAI;IACvB,YACW,IAAY,EACZ,IAAY,EACZ,MAAc,EACd,OAAe,EACf,gBAAwB,EACxB,cAAuB,EACvB,aAA+B;QAN/B,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAQ;QACd,YAAO,GAAP,OAAO,CAAQ;QACf,qBAAgB,GAAhB,gBAAgB,CAAQ;QACxB,mBAAc,GAAd,cAAc,CAAS;QACvB,kBAAa,GAAb,aAAa,CAAkB;IACvC,CAAC;IAEG,OAAO;QACZ,OAAO,IAAI,eAAK,CACd,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,OA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AAC;IAED,8DAA8D;IAC9D,MAAM,CAAC,OAAO,CAAC,GAAW,EAAE,KAAU;QACpC,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACnD,CAAC;CACF;AAtED,uBAsEC"}
@@ -6,5 +6,5 @@ var TxStatus;
6
6
  TxStatus["Pending"] = "PENDING";
7
7
  TxStatus["Failed"] = "FAILED";
8
8
  TxStatus["Success"] = "SUCCESS";
9
- })(TxStatus = exports.TxStatus || (exports.TxStatus = {}));
9
+ })(TxStatus || (exports.TxStatus = TxStatus = {}));
10
10
  //# sourceMappingURL=transaction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.js","sourceRoot":"","sources":["../lib/transaction.ts"],"names":[],"mappings":";;;AAwBA,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,6BAAiB,CAAA;IACjB,+BAAmB,CAAA;AACrB,CAAC,EAJW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAInB"}
1
+ {"version":3,"file":"transaction.js","sourceRoot":"","sources":["../lib/transaction.ts"],"names":[],"mappings":";;;AAwBA,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,6BAAiB,CAAA;IACjB,+BAAmB,CAAA;AACrB,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB"}
package/lib/cfd.ts CHANGED
@@ -1,6 +1,3 @@
1
- /* eslint-disable max-len */
2
- /* eslint-disable indent */
3
-
4
1
  import { TxInRequest, TxOutRequest } from './common';
5
2
 
6
3
  export interface CfdProvider {
@@ -1881,21 +1878,6 @@ export interface SelectUtxosRequest {
1881
1878
  feeInfo?: CoinSelectionFeeInfomationField;
1882
1879
  }
1883
1880
 
1884
- /** */
1885
- export interface UtxoJsonData {
1886
- txid: string;
1887
- vout: number;
1888
- amount: bigint;
1889
- asset?: string;
1890
- descriptor?: string;
1891
- }
1892
-
1893
- /** */
1894
- export interface TargetAmountMapData {
1895
- asset: string;
1896
- amount: bigint;
1897
- }
1898
-
1899
1881
  /** */
1900
1882
  export interface SelectUtxosResponse {
1901
1883
  utxos: UtxoJsonData[];