@bitgo/wasm-utxo 4.22.0 → 4.24.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/cjs/js/coinName.d.ts +1 -1
- package/dist/cjs/js/coinName.js +4 -0
- package/dist/cjs/js/testutils/AcidTest.js +10 -6
- package/dist/cjs/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/dist/esm/js/coinName.d.ts +1 -1
- package/dist/esm/js/coinName.js +4 -0
- package/dist/esm/js/testutils/AcidTest.js +10 -6
- package/dist/esm/js/wasm/wasm_utxo_bg.wasm +0 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const coinNames: readonly ["btc", "tbtc", "tbtc4", "tbtcsig", "tbtcbgsig", "tbtcreg", "bch", "tbch", "bcha", "tbcha", "btg", "tbtg", "bsv", "tbsv", "dash", "tdash", "doge", "tdoge", "ltc", "tltc", "zec", "tzec"];
|
|
1
|
+
export declare const coinNames: readonly ["btc", "tbtc", "tbtc4", "tbtcsig", "tbtcbgsig", "tbtcreg", "bch", "tbch", "bcha", "tbcha", "btg", "tbtg", "bsv", "tbsv", "dash", "tdash", "doge", "tdoge", "ltc", "tltc", "zec", "tzec", "pearl", "tpearl"];
|
|
2
2
|
export type CoinName = (typeof coinNames)[number];
|
|
3
3
|
export declare function getMainnet(name: CoinName): CoinName;
|
|
4
4
|
export declare function isMainnet(name: CoinName): boolean;
|
package/dist/cjs/js/coinName.js
CHANGED
|
@@ -30,6 +30,8 @@ exports.coinNames = [
|
|
|
30
30
|
"tltc",
|
|
31
31
|
"zec",
|
|
32
32
|
"tzec",
|
|
33
|
+
"pearl",
|
|
34
|
+
"tpearl",
|
|
33
35
|
];
|
|
34
36
|
function getMainnet(name) {
|
|
35
37
|
switch (name) {
|
|
@@ -55,6 +57,8 @@ function getMainnet(name) {
|
|
|
55
57
|
return "ltc";
|
|
56
58
|
case "tzec":
|
|
57
59
|
return "zec";
|
|
60
|
+
case "tpearl":
|
|
61
|
+
return "pearl";
|
|
58
62
|
default:
|
|
59
63
|
return name;
|
|
60
64
|
}
|
|
@@ -81,9 +81,9 @@ class AcidTest {
|
|
|
81
81
|
// Filter inputs based on network support
|
|
82
82
|
const inputs = index_js_1.inputScriptTypes
|
|
83
83
|
.filter((scriptType) => {
|
|
84
|
-
// p2shP2pk
|
|
84
|
+
// p2shP2pk requires legacy (P2SH) support
|
|
85
85
|
if (scriptType === "p2shP2pk")
|
|
86
|
-
return
|
|
86
|
+
return (0, index_js_1.supportsScriptType)(coin, "p2sh");
|
|
87
87
|
// Map input script types to output script types for support check
|
|
88
88
|
if (scriptType === "p2trMusig2KeyPath" || scriptType === "p2trMusig2ScriptPath") {
|
|
89
89
|
return (0, index_js_1.supportsScriptType)(coin, "p2trMusig2");
|
|
@@ -103,10 +103,14 @@ class AcidTest {
|
|
|
103
103
|
scriptType,
|
|
104
104
|
value: BigInt(900 + index * 100), // Deterministic amounts
|
|
105
105
|
}));
|
|
106
|
-
// Test other wallet output (with derivation info)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
// Test other wallet output (with derivation info) — only on legacy-supporting networks
|
|
107
|
+
if ((0, index_js_1.supportsScriptType)(coin, "p2sh")) {
|
|
108
|
+
outputs.push({ scriptType: "p2sh", value: BigInt(800), walletKeys: otherWalletKeys });
|
|
109
|
+
}
|
|
110
|
+
// Test non-wallet output (no derivation info) — only on legacy-supporting networks
|
|
111
|
+
if ((0, index_js_1.supportsScriptType)(coin, "p2sh")) {
|
|
112
|
+
outputs.push({ scriptType: "p2sh", value: BigInt(700), walletKeys: null });
|
|
113
|
+
}
|
|
110
114
|
// Test OP_RETURN output
|
|
111
115
|
outputs.push({ opReturn: "setec astronomy", value: BigInt(0) });
|
|
112
116
|
// Get private keys for signing
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const coinNames: readonly ["btc", "tbtc", "tbtc4", "tbtcsig", "tbtcbgsig", "tbtcreg", "bch", "tbch", "bcha", "tbcha", "btg", "tbtg", "bsv", "tbsv", "dash", "tdash", "doge", "tdoge", "ltc", "tltc", "zec", "tzec"];
|
|
1
|
+
export declare const coinNames: readonly ["btc", "tbtc", "tbtc4", "tbtcsig", "tbtcbgsig", "tbtcreg", "bch", "tbch", "bcha", "tbcha", "btg", "tbtg", "bsv", "tbsv", "dash", "tdash", "doge", "tdoge", "ltc", "tltc", "zec", "tzec", "pearl", "tpearl"];
|
|
2
2
|
export type CoinName = (typeof coinNames)[number];
|
|
3
3
|
export declare function getMainnet(name: CoinName): CoinName;
|
|
4
4
|
export declare function isMainnet(name: CoinName): boolean;
|
package/dist/esm/js/coinName.js
CHANGED
|
@@ -22,6 +22,8 @@ export const coinNames = [
|
|
|
22
22
|
"tltc",
|
|
23
23
|
"zec",
|
|
24
24
|
"tzec",
|
|
25
|
+
"pearl",
|
|
26
|
+
"tpearl",
|
|
25
27
|
];
|
|
26
28
|
export function getMainnet(name) {
|
|
27
29
|
switch (name) {
|
|
@@ -47,6 +49,8 @@ export function getMainnet(name) {
|
|
|
47
49
|
return "ltc";
|
|
48
50
|
case "tzec":
|
|
49
51
|
return "zec";
|
|
52
|
+
case "tpearl":
|
|
53
|
+
return "pearl";
|
|
50
54
|
default:
|
|
51
55
|
return name;
|
|
52
56
|
}
|
|
@@ -78,9 +78,9 @@ export class AcidTest {
|
|
|
78
78
|
// Filter inputs based on network support
|
|
79
79
|
const inputs = inputScriptTypes
|
|
80
80
|
.filter((scriptType) => {
|
|
81
|
-
// p2shP2pk
|
|
81
|
+
// p2shP2pk requires legacy (P2SH) support
|
|
82
82
|
if (scriptType === "p2shP2pk")
|
|
83
|
-
return
|
|
83
|
+
return supportsScriptType(coin, "p2sh");
|
|
84
84
|
// Map input script types to output script types for support check
|
|
85
85
|
if (scriptType === "p2trMusig2KeyPath" || scriptType === "p2trMusig2ScriptPath") {
|
|
86
86
|
return supportsScriptType(coin, "p2trMusig2");
|
|
@@ -100,10 +100,14 @@ export class AcidTest {
|
|
|
100
100
|
scriptType,
|
|
101
101
|
value: BigInt(900 + index * 100), // Deterministic amounts
|
|
102
102
|
}));
|
|
103
|
-
// Test other wallet output (with derivation info)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
// Test other wallet output (with derivation info) — only on legacy-supporting networks
|
|
104
|
+
if (supportsScriptType(coin, "p2sh")) {
|
|
105
|
+
outputs.push({ scriptType: "p2sh", value: BigInt(800), walletKeys: otherWalletKeys });
|
|
106
|
+
}
|
|
107
|
+
// Test non-wallet output (no derivation info) — only on legacy-supporting networks
|
|
108
|
+
if (supportsScriptType(coin, "p2sh")) {
|
|
109
|
+
outputs.push({ scriptType: "p2sh", value: BigInt(700), walletKeys: null });
|
|
110
|
+
}
|
|
107
111
|
// Test OP_RETURN output
|
|
108
112
|
outputs.push({ opReturn: "setec astronomy", value: BigInt(0) });
|
|
109
113
|
// Get private keys for signing
|
|
Binary file
|