@btc-vision/transaction 1.2.7 → 1.2.8

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.
@@ -48,6 +48,9 @@ export class SharedInteractionTransaction extends TransactionBuilder {
48
48
  generateSecret() {
49
49
  if (!this.to)
50
50
  throw new Error('To address is required');
51
+ if (this.to.startsWith('0x')) {
52
+ throw new Error(`Legacy not support at this time. Reserved for future use.`);
53
+ }
51
54
  return address.fromBech32(this.to).data;
52
55
  }
53
56
  scriptSignerXOnlyPubKey() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@btc-vision/transaction",
3
3
  "type": "module",
4
- "version": "1.2.7",
4
+ "version": "1.2.8",
5
5
  "author": "BlobMaster41",
6
6
  "description": "OPNet transaction library allows you to create and sign transactions for the OPNet network.",
7
7
  "engines": {
@@ -89,7 +89,7 @@
89
89
  "dependencies": {
90
90
  "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
91
91
  "@bitcoinerlab/secp256k1": "^1.1.1",
92
- "@btc-vision/bitcoin": "^6.3.3",
92
+ "@btc-vision/bitcoin": "^6.3.4",
93
93
  "@btc-vision/bitcoin-rpc": "^1.0.0",
94
94
  "@btc-vision/logger": "^1.0.6",
95
95
  "@eslint/js": "^9.14.0",
@@ -119,6 +119,10 @@ export abstract class SharedInteractionTransaction<
119
119
  protected generateSecret(): Buffer {
120
120
  if (!this.to) throw new Error('To address is required');
121
121
 
122
+ if (this.to.startsWith('0x')) {
123
+ throw new Error(`Legacy not support at this time. Reserved for future use.`);
124
+ }
125
+
122
126
  return address.fromBech32(this.to).data;
123
127
  }
124
128