@btc-vision/transaction 1.0.39 → 1.0.40
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/build/_version.d.ts +1 -1
- package/build/_version.js +1 -1
- package/build/metadata/contracts/wBTC.js +1 -1
- package/build/tests/deployReg.js +1 -2
- package/build/tests/factory/createPairReg.js +2 -2
- package/package.json +2 -2
- package/src/_version.ts +1 -1
- package/src/metadata/contracts/wBTC.ts +1 -1
- package/browser/bytecode/Compressor.d.ts +0 -6
- package/build/bytecode/Compressor.d.ts +0 -6
- package/build/bytecode/Compressor.js +0 -13
- package/bytecode/factory.wasm +0 -0
- package/bytecode/moto.wasm +0 -0
- package/bytecode/pool.wasm +0 -0
- package/bytecode/wbtc.wasm +0 -0
- package/src/bytecode/Compressor.ts +0 -27
package/build/_version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "1.0.
|
|
1
|
+
export declare const version = "1.0.40";
|
package/build/_version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.0.
|
|
1
|
+
export const version = '1.0.40';
|
|
@@ -16,7 +16,7 @@ export class wBTC extends ContractBaseMetadata {
|
|
|
16
16
|
case networks.bitcoin.bech32:
|
|
17
17
|
return 'unknown';
|
|
18
18
|
case networks.regtest.bech32:
|
|
19
|
-
return '
|
|
19
|
+
return 'bcrt1qxeyh0pacdtkqmlna9n254fztp3ptadkkfu6efl';
|
|
20
20
|
case networks.testnet.bech32:
|
|
21
21
|
return 'tb1qj58a6yf4pez426nqvf8wyu6ssggcajw8kr44vy';
|
|
22
22
|
default:
|
package/build/tests/deployReg.js
CHANGED
|
@@ -37,8 +37,7 @@ if (!utxos) {
|
|
|
37
37
|
throw new Error('No UTXOs found');
|
|
38
38
|
}
|
|
39
39
|
shuffleArray(utxos);
|
|
40
|
-
|
|
41
|
-
const bytecode = fs.readFileSync('./bytecode/wbtc.wasm');
|
|
40
|
+
const bytecode = fs.readFileSync('./bytecode/moto.wasm');
|
|
42
41
|
for (let utxo of utxos) {
|
|
43
42
|
const deploymentParameters = {
|
|
44
43
|
from: wallet.p2wpkh,
|
|
@@ -14,8 +14,8 @@ const utxoManager = new OPNetLimitedProvider('http://localhost:9001');
|
|
|
14
14
|
const factory = new TransactionFactory();
|
|
15
15
|
const abiCoder = new ABICoder();
|
|
16
16
|
const stakeSelector = Number(`0x` + abiCoder.encodeSelector('createPool'));
|
|
17
|
-
const MOTO_CONTRACT = '
|
|
18
|
-
const FACTORY_CONTRACT = '
|
|
17
|
+
const MOTO_CONTRACT = 'bcrt1q6zk8yjz2l2mzhy0xa645jzsuh44gg3re8qr5zj';
|
|
18
|
+
const FACTORY_CONTRACT = 'bcrt1q65enkl69g8ysh5tg9v7g35dmxzuy34egjftz6w';
|
|
19
19
|
function generateCalldata() {
|
|
20
20
|
const addCalldata = new BinaryWriter();
|
|
21
21
|
addCalldata.writeSelector(stakeSelector);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"author": "BlobMaster41",
|
|
5
5
|
"description": "OPNet transaction library allows you to create and sign transactions for the OPNet network.",
|
|
6
6
|
"engines": {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"dependencies": {
|
|
92
92
|
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
93
93
|
"@bitcoinerlab/secp256k1": "^1.1.1",
|
|
94
|
-
"@btc-vision/bsi-binary": "^1.0.
|
|
94
|
+
"@btc-vision/bsi-binary": "^1.0.25",
|
|
95
95
|
"@btc-vision/bsi-bitcoin-rpc": "^1.0.20",
|
|
96
96
|
"@btc-vision/bsi-common": "^1.0.14",
|
|
97
97
|
"@btc-vision/logger": "^1.0.2",
|
package/src/_version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '1.0.
|
|
1
|
+
export const version = '1.0.40';
|
|
@@ -34,7 +34,7 @@ export class wBTC extends ContractBaseMetadata {
|
|
|
34
34
|
case networks.bitcoin.bech32:
|
|
35
35
|
return 'unknown';
|
|
36
36
|
case networks.regtest.bech32:
|
|
37
|
-
return '
|
|
37
|
+
return 'bcrt1qxeyh0pacdtkqmlna9n254fztp3ptadkkfu6efl';
|
|
38
38
|
case networks.testnet.bech32:
|
|
39
39
|
return 'tb1qj58a6yf4pez426nqvf8wyu6ssggcajw8kr44vy';
|
|
40
40
|
default:
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import zlib from 'zlib';
|
|
2
|
-
export class Compressor {
|
|
3
|
-
static zlibOptions = {
|
|
4
|
-
level: 9,
|
|
5
|
-
maxOutputLength: 1024 * 1024 * 16,
|
|
6
|
-
};
|
|
7
|
-
static compress(data) {
|
|
8
|
-
return zlib.gzipSync(data, Compressor.zlibOptions);
|
|
9
|
-
}
|
|
10
|
-
static decompress(data) {
|
|
11
|
-
return zlib.gunzipSync(data, Compressor.zlibOptions);
|
|
12
|
-
}
|
|
13
|
-
}
|
package/bytecode/factory.wasm
DELETED
|
Binary file
|
package/bytecode/moto.wasm
DELETED
|
Binary file
|
package/bytecode/pool.wasm
DELETED
|
Binary file
|
package/bytecode/wbtc.wasm
DELETED
|
Binary file
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import zlib, { ZlibOptions } from 'zlib';
|
|
2
|
-
|
|
3
|
-
/** Compressor class for compressing and decompressing data. */
|
|
4
|
-
export class Compressor {
|
|
5
|
-
private static readonly zlibOptions: ZlibOptions = {
|
|
6
|
-
level: 9,
|
|
7
|
-
maxOutputLength: 1024 * 1024 * 16, // 16mb, limit it to 16mb.
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Compresses the data using gzip.
|
|
12
|
-
* @param {Uint8Array | Buffer} data The data to compress.
|
|
13
|
-
* @returns {Buffer} The compressed data.
|
|
14
|
-
*/
|
|
15
|
-
public static compress(data: Uint8Array | Buffer): Buffer {
|
|
16
|
-
return zlib.gzipSync(data, Compressor.zlibOptions);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Decompresses the data using gunzip.
|
|
21
|
-
* @param {Uint8Array | Buffer} data The data to decompress.
|
|
22
|
-
* @returns {Buffer} The decompressed data.
|
|
23
|
-
*/
|
|
24
|
-
public static decompress(data: Uint8Array | Buffer): Buffer {
|
|
25
|
-
return zlib.gunzipSync(data, Compressor.zlibOptions);
|
|
26
|
-
}
|
|
27
|
-
}
|