@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.cjs
CHANGED
|
@@ -1048,7 +1048,7 @@ var spokeChainConfig = {
|
|
|
1048
1048
|
},
|
|
1049
1049
|
[BITCOIN_MAINNET_CHAIN_ID]: {
|
|
1050
1050
|
addresses: {
|
|
1051
|
-
assetManager: "
|
|
1051
|
+
assetManager: "bc1pxguu2r4p9jcxp3gj7dh4r4jd9qzccwpyap3nj5nlapy28s76lhrqw522fz"
|
|
1052
1052
|
},
|
|
1053
1053
|
chain: baseChainInfo[BITCOIN_MAINNET_CHAIN_ID],
|
|
1054
1054
|
bnUSD: "no",
|
|
@@ -1076,9 +1076,9 @@ var spokeChainConfig = {
|
|
|
1076
1076
|
xChainId: BITCOIN_MAINNET_CHAIN_ID
|
|
1077
1077
|
}
|
|
1078
1078
|
},
|
|
1079
|
-
radfiApiUrl: "https://
|
|
1079
|
+
radfiApiUrl: "https://api.radfi.co/api",
|
|
1080
1080
|
radfiApiKey: "",
|
|
1081
|
-
radfiUmsUrl: "https://
|
|
1081
|
+
radfiUmsUrl: "https://ums.radfi.co/api",
|
|
1082
1082
|
network: "MAINNET",
|
|
1083
1083
|
rpcUrl: "https://mempool.space/api"
|
|
1084
1084
|
},
|
|
@@ -2053,6 +2053,8 @@ function detectBitcoinAddressType(address) {
|
|
|
2053
2053
|
return "P2TR";
|
|
2054
2054
|
if (address.startsWith("bc1") || address.startsWith("tb1"))
|
|
2055
2055
|
return "P2WPKH";
|
|
2056
|
+
if (address.startsWith("3") || address.startsWith("2"))
|
|
2057
|
+
return "P2SH";
|
|
2056
2058
|
if (address.startsWith("1") || address.startsWith("m") || address.startsWith("n"))
|
|
2057
2059
|
return "P2PKH";
|
|
2058
2060
|
throw new Error(`Unknown Bitcoin address type: ${address}`);
|
|
@@ -2916,6 +2918,14 @@ var BitcoinWalletProvider = class {
|
|
|
2916
2918
|
pubkey: keyPair.publicKey,
|
|
2917
2919
|
network: this.network
|
|
2918
2920
|
});
|
|
2921
|
+
case "P2SH":
|
|
2922
|
+
return bitcoin__namespace.payments.p2sh({
|
|
2923
|
+
redeem: bitcoin__namespace.payments.p2wpkh({
|
|
2924
|
+
pubkey: keyPair.publicKey,
|
|
2925
|
+
network: this.network
|
|
2926
|
+
}),
|
|
2927
|
+
network: this.network
|
|
2928
|
+
});
|
|
2919
2929
|
case "P2WPKH":
|
|
2920
2930
|
return bitcoin__namespace.payments.p2wpkh({
|
|
2921
2931
|
pubkey: keyPair.publicKey,
|