@atomicfinance/types 3.0.1 → 3.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.
@@ -1 +1 @@
1
- @atomicfinance/types:build: cache hit, replaying output 15f1fd9cd6dc01c6
1
+ @atomicfinance/types:build: cache hit, replaying output cf2600d21225f556
@@ -1 +1 @@
1
- @atomicfinance/types:test: cache hit, replaying output dac90c2ce87ac6df
1
+ @atomicfinance/types:test: cache hit, replaying output 6da1e22192ad7eee
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atomicfinance/types
2
2
 
3
+ ## 3.1.1
4
+
5
+ ## 3.1.0
6
+
7
+ ### Minor Changes
8
+
9
+ - c60033b: Fix DLC Input Ordering
10
+
3
11
  ## 3.0.1
4
12
 
5
13
  ## 3.0.0
@@ -54,6 +54,7 @@ class Input {
54
54
  address: this.address,
55
55
  derivationPath: this.derivationPath,
56
56
  maxWitnessLength: this.maxWitnessLength ? this.maxWitnessLength : 108,
57
+ inputSerialId: this.inputSerialId,
57
58
  toJSON: Utxo_1.default.prototype.toJSON,
58
59
  toInput: Utxo_1.default.prototype.toInput,
59
60
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../lib/models/Input.ts"],"names":[],"mappings":";;;;;AACA,sDAA8B;AAC9B,kDAA0B;AAE1B;;;;;;;;;;;;;GAaG;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;QAdd,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAQ;QACf,WAAM,GAAN,MAA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MAAM,EAAE;YACtB,MAAM,GAAG,gBAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC1C;QAED,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM;YACN,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG;YACrE,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,MAAM,EAAE,cAAI,CAAC,SAAS,CAAC,MAAM;YAC7B,OAAO,EAAE,cAAI,CAAC,SAAS,CAAC,OAAO;SAChC,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAa;QAC3B,MAAM,MAAM,GAAW,gBAAM,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEvD,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,MAAM,CAAC,gBAAgB,EAAE;YACjC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;SAC/B,CAAC;IACJ,CAAC;CACF;AApDD,wBAoDC"}
@@ -11,7 +11,8 @@ export default class Utxo {
11
11
  readonly address: string;
12
12
  readonly derivationPath: string;
13
13
  readonly maxWitnessLength: number;
14
- constructor(txid: string, vout: number, amount: Amount, address: string, derivationPath: string, maxWitnessLength: number);
14
+ readonly inputSerialId?: bigint | number;
15
+ constructor(txid: string, vout: number, amount: Amount, address: string, derivationPath: string, maxWitnessLength: number, inputSerialId?: bigint | number);
15
16
  toInput(): Input;
16
17
  toJSON(): UtxoJSON;
17
18
  static fromJSON(json: UtxoJSON): Utxo;
@@ -24,4 +25,5 @@ export interface UtxoJSON {
24
25
  address: string;
25
26
  derivationPath: string;
26
27
  maxWitnessLength: number;
28
+ inputSerialId?: bigint | number;
27
29
  }
@@ -10,13 +10,14 @@ const Input_1 = __importDefault(require("./Input"));
10
10
  * https://github.com/atomicfinance/cfd-dlc-js.git#v0.0.18
11
11
  */
12
12
  class Utxo {
13
- constructor(txid, vout, amount, address, derivationPath, maxWitnessLength) {
13
+ constructor(txid, vout, amount, address, derivationPath, maxWitnessLength, inputSerialId) {
14
14
  this.txid = txid;
15
15
  this.vout = vout;
16
16
  this.amount = amount;
17
17
  this.address = address;
18
18
  this.derivationPath = derivationPath;
19
19
  this.maxWitnessLength = maxWitnessLength;
20
+ this.inputSerialId = inputSerialId;
20
21
  }
21
22
  toInput() {
22
23
  return {
@@ -27,6 +28,7 @@ class Utxo {
27
28
  value: this.amount.GetSatoshiAmount(),
28
29
  derivationPath: this.derivationPath,
29
30
  maxWitnessLength: this.maxWitnessLength,
31
+ inputSerialId: BigInt(this.inputSerialId),
30
32
  toUtxo: Input_1.default.prototype.toUtxo,
31
33
  };
32
34
  }
@@ -38,6 +40,7 @@ class Utxo {
38
40
  address: this.address,
39
41
  derivationPath: this.derivationPath,
40
42
  maxWitnessLength: this.maxWitnessLength,
43
+ inputSerialId: this.inputSerialId,
41
44
  });
42
45
  }
43
46
  static fromJSON(json) {
@@ -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,cAAsB,EACtB,gBAAwB;QALxB,SAAI,GAAJ,IAAI,CAAQ;QACZ,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAQ;QACd,YAAO,GAAP,OAAO,CAAQ;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B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YAC5B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,aAAa,EAAE,IAAI,CAAC,aAAa;SAClC,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAc;QAC5B,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE;YAC/B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,gBAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;YACpC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;SACxC,CAAC,CAAC;IACL,CAAC;IAED,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;AApDD,uBAoDC"}
@@ -50,6 +50,7 @@ export default class Input {
50
50
  address: this.address,
51
51
  derivationPath: this.derivationPath,
52
52
  maxWitnessLength: this.maxWitnessLength ? this.maxWitnessLength : 108,
53
+ inputSerialId: this.inputSerialId,
53
54
  toJSON: Utxo.prototype.toJSON,
54
55
  toInput: Utxo.prototype.toInput,
55
56
  };
@@ -13,6 +13,7 @@ export default class Utxo {
13
13
  readonly address: string,
14
14
  readonly derivationPath: string,
15
15
  readonly maxWitnessLength: number,
16
+ readonly inputSerialId?: bigint | number,
16
17
  ) {}
17
18
 
18
19
  public toInput(): Input {
@@ -24,6 +25,7 @@ export default class Utxo {
24
25
  value: this.amount.GetSatoshiAmount(),
25
26
  derivationPath: this.derivationPath,
26
27
  maxWitnessLength: this.maxWitnessLength,
28
+ inputSerialId: BigInt(this.inputSerialId),
27
29
  toUtxo: Input.prototype.toUtxo,
28
30
  };
29
31
  }
@@ -36,6 +38,7 @@ export default class Utxo {
36
38
  address: this.address,
37
39
  derivationPath: this.derivationPath,
38
40
  maxWitnessLength: this.maxWitnessLength,
41
+ inputSerialId: this.inputSerialId,
39
42
  });
40
43
  }
41
44
 
@@ -63,4 +66,5 @@ export interface UtxoJSON {
63
66
  address: string;
64
67
  derivationPath: string;
65
68
  maxWitnessLength: number;
69
+ inputSerialId?: bigint | number;
66
70
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atomicfinance/types",
3
3
  "umdName": "Types",
4
- "version": "3.0.1",
4
+ "version": "3.1.1",
5
5
  "description": "Bitcoin Abstraction Layer Types",
6
6
  "author": "Atomic Finance <info@atomic.finance>",
7
7
  "homepage": "",
@@ -15,7 +15,7 @@
15
15
  "lint:fix": "../../node_modules/.bin/eslint --fix --ignore-path ../../.eslintignore -c ../../.eslintrc.js ."
16
16
  },
17
17
  "dependencies": {
18
- "@node-dlc/messaging": "0.19.1",
18
+ "@node-dlc/messaging": "0.20.1",
19
19
  "@node-lightning/bitcoin": "0.26.1",
20
20
  "@node-lightning/noise": "0.26.1",
21
21
  "lodash": "^4.17.20"