@sodax/wallet-sdk-core 1.3.1-beta-rc3 → 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 CHANGED
@@ -1076,7 +1076,7 @@ var spokeChainConfig = {
1076
1076
  xChainId: BITCOIN_MAINNET_CHAIN_ID
1077
1077
  }
1078
1078
  },
1079
- radfiApiUrl: "https://api.canary.radfi.co/api",
1079
+ radfiApiUrl: "https://api.radfi.co/api",
1080
1080
  radfiApiKey: "",
1081
1081
  radfiUmsUrl: "https://ums.radfi.co/api",
1082
1082
  network: "MAINNET",
@@ -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,