@sodax/wallet-sdk-core 1.3.1-beta-rc2 → 1.3.1-beta
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/index.cjs +13 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +13 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1020,7 +1020,7 @@ var spokeChainConfig = {
|
|
|
1020
1020
|
},
|
|
1021
1021
|
[BITCOIN_MAINNET_CHAIN_ID]: {
|
|
1022
1022
|
addresses: {
|
|
1023
|
-
assetManager: "
|
|
1023
|
+
assetManager: "bc1pxguu2r4p9jcxp3gj7dh4r4jd9qzccwpyap3nj5nlapy28s76lhrqw522fz"
|
|
1024
1024
|
},
|
|
1025
1025
|
chain: baseChainInfo[BITCOIN_MAINNET_CHAIN_ID],
|
|
1026
1026
|
bnUSD: "no",
|
|
@@ -1048,9 +1048,9 @@ var spokeChainConfig = {
|
|
|
1048
1048
|
xChainId: BITCOIN_MAINNET_CHAIN_ID
|
|
1049
1049
|
}
|
|
1050
1050
|
},
|
|
1051
|
-
radfiApiUrl: "https://
|
|
1051
|
+
radfiApiUrl: "https://api.radfi.co/api",
|
|
1052
1052
|
radfiApiKey: "",
|
|
1053
|
-
radfiUmsUrl: "https://
|
|
1053
|
+
radfiUmsUrl: "https://ums.radfi.co/api",
|
|
1054
1054
|
network: "MAINNET",
|
|
1055
1055
|
rpcUrl: "https://mempool.space/api"
|
|
1056
1056
|
},
|
|
@@ -2025,6 +2025,8 @@ function detectBitcoinAddressType(address) {
|
|
|
2025
2025
|
return "P2TR";
|
|
2026
2026
|
if (address.startsWith("bc1") || address.startsWith("tb1"))
|
|
2027
2027
|
return "P2WPKH";
|
|
2028
|
+
if (address.startsWith("3") || address.startsWith("2"))
|
|
2029
|
+
return "P2SH";
|
|
2028
2030
|
if (address.startsWith("1") || address.startsWith("m") || address.startsWith("n"))
|
|
2029
2031
|
return "P2PKH";
|
|
2030
2032
|
throw new Error(`Unknown Bitcoin address type: ${address}`);
|
|
@@ -2888,6 +2890,14 @@ var BitcoinWalletProvider = class {
|
|
|
2888
2890
|
pubkey: keyPair.publicKey,
|
|
2889
2891
|
network: this.network
|
|
2890
2892
|
});
|
|
2893
|
+
case "P2SH":
|
|
2894
|
+
return bitcoin.payments.p2sh({
|
|
2895
|
+
redeem: bitcoin.payments.p2wpkh({
|
|
2896
|
+
pubkey: keyPair.publicKey,
|
|
2897
|
+
network: this.network
|
|
2898
|
+
}),
|
|
2899
|
+
network: this.network
|
|
2900
|
+
});
|
|
2891
2901
|
case "P2WPKH":
|
|
2892
2902
|
return bitcoin.payments.p2wpkh({
|
|
2893
2903
|
pubkey: keyPair.publicKey,
|