@btc-vision/transaction 1.2.1 → 1.2.2
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/browser/_version.d.ts +1 -1
- package/browser/index.js +1 -1
- package/browser/transaction/ContractAddress.d.ts +1 -0
- package/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/transaction/ContractAddress.d.ts +1 -0
- package/build/transaction/ContractAddress.js +4 -1
- package/package.json +1 -1
- package/src/_version.ts +1 -1
- package/src/transaction/ContractAddress.ts +5 -1
package/build/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.2.
|
|
1
|
+
export declare const version = "1.2.2";
|
package/build/_version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.2.
|
|
1
|
+
export const version = '1.2.2';
|
|
@@ -4,9 +4,12 @@ class ContractAddressBase {
|
|
|
4
4
|
this.deriver = new Secp256k1PointDeriver();
|
|
5
5
|
}
|
|
6
6
|
generateHybridKeyFromHash(input) {
|
|
7
|
-
const p = this.deriver.findOrDeriveValidPoint(
|
|
7
|
+
const p = this.deriver.findOrDeriveValidPoint(this.cloneBuffer(input), false);
|
|
8
8
|
const y = this.deriver.getCanonicalY(p.y1, p.y2);
|
|
9
9
|
return Buffer.from(this.deriver.getHybridPublicKey(p.x, y));
|
|
10
10
|
}
|
|
11
|
+
cloneBuffer(buffer) {
|
|
12
|
+
return Buffer.from(buffer);
|
|
13
|
+
}
|
|
11
14
|
}
|
|
12
15
|
export const ContractAddress = new ContractAddressBase();
|
package/package.json
CHANGED
package/src/_version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.2.
|
|
1
|
+
export const version = '1.2.2';
|
|
@@ -4,10 +4,14 @@ class ContractAddressBase {
|
|
|
4
4
|
private readonly deriver: Secp256k1PointDeriver = new Secp256k1PointDeriver();
|
|
5
5
|
|
|
6
6
|
public generateHybridKeyFromHash(input: Buffer): Buffer {
|
|
7
|
-
const p = this.deriver.findOrDeriveValidPoint(
|
|
7
|
+
const p = this.deriver.findOrDeriveValidPoint(this.cloneBuffer(input), false);
|
|
8
8
|
const y = this.deriver.getCanonicalY(p.y1, p.y2);
|
|
9
9
|
return Buffer.from(this.deriver.getHybridPublicKey(p.x, y));
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
private cloneBuffer(buffer: Buffer): Buffer {
|
|
13
|
+
return Buffer.from(buffer);
|
|
14
|
+
}
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
export const ContractAddress = new ContractAddressBase();
|