@silentswap/sdk 0.1.51 → 0.1.53

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/bridge.js CHANGED
@@ -349,6 +349,7 @@ export async function fetchDebridgeOrder(params, signal) {
349
349
  * Note: DLN does not support same-chain swaps via create-tx endpoint
350
350
  */
351
351
  async function fetchDebridgeSingleChainOrder(params, signal) {
352
+ console.log('fetchDebridgeSingleChainOrder');
352
353
  // Build query parameters for single-chain swap endpoint
353
354
  const queryParams = new URLSearchParams({
354
355
  chainId: params.srcChainId.toString(),
@@ -33,7 +33,7 @@ export declare const SB58_ADDR_SOL_PROGRAM_SYSTEM = "111111111111111111111111111
33
33
  export declare const SB58_ADDR_SOL_RELAY_LINK_RECIPIENT = "CbKGgVKLJFb8bBrf58DnAkdryX6ubewVytn7X957YwNr";
34
34
  export declare const SB58_ADDR_SOL_DEAD = "1nc1nerator11111111111111111111111111111111";
35
35
  export declare const SBTC_ADDR_BITCOIN_NATIVE = "bc1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmql8k8";
36
- export declare const SBTC_ADDR_BTC_RELAY_LINK_RECIPIENT = "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4";
36
+ export declare const SBTC_ADDR_BTC_RELAY_LINK_RECIPIENT = "bc1q4vxn43l44h30nkluqfxd9eckf45vr2awz38lwa";
37
37
  export declare const S0X_ADDR_TRON_NATIVE: "T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb";
38
38
  export declare const SB58_ADDR_TRON_DEAD = "TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy";
39
39
  export declare const N_RELAY_CHAIN_ID_SOLANA = 792703809;
package/dist/constants.js CHANGED
@@ -60,7 +60,7 @@ export const SB58_ADDR_SOL_DEAD = '1nc1nerator11111111111111111111111111111111';
60
60
  export const SBTC_ADDR_BITCOIN_NATIVE = 'bc1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmql8k8';
61
61
  // Valid Bitcoin recipient address for relay.link quote estimation (BIP-173 test vector P2WPKH)
62
62
  // relay.link rejects the phony zero address (SBTC_ADDR_BITCOIN_NATIVE) as recipient — use this fallback
63
- export const SBTC_ADDR_BTC_RELAY_LINK_RECIPIENT = 'bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4';
63
+ export const SBTC_ADDR_BTC_RELAY_LINK_RECIPIENT = 'bc1q4vxn43l44h30nkluqfxd9eckf45vr2awz38lwa';
64
64
  // Tron constants
65
65
  // Tron native token (TRX) pseudo-address used by Relay/deBridge for native TRX.
66
66
  // Note: despite the historic "dead" naming, this is the canonical Tron native placeholder.
@@ -386,8 +386,9 @@ forceProvider, tradeType = 'EXACT_INPUT', dstAmount) {
386
386
  relayUserAddress = userAddress;
387
387
  }
388
388
  else {
389
- // If we can't determine Bitcoin address, throw error (Bitcoin requires valid address)
390
- throw new Error('Bitcoin address required for Bitcoin source chain');
389
+ // Fallback to Bitcoin dead address for estimation
390
+ console.warn('Bitcoin address required for Bitcoin source chain, using Bitcoin dead address');
391
+ relayUserAddress = SBTC_ADDR_BTC_RELAY_LINK_RECIPIENT;
391
392
  }
392
393
  }
393
394
  else if (isSrcSolana) {
@@ -529,6 +530,10 @@ forceProvider, tradeType = 'EXACT_INPUT', dstAmount) {
529
530
  // For EVM destinations when source is Bitcoin, relay.link requires:
530
531
  // - user to be the Bitcoin address (source chain)
531
532
  // - recipient to be the EVM address (destination chain)
533
+ // - useDepositAddress: false to use PSBT flow instead of deposit-address mode
534
+ // - topupGas: false to skip gas topup
535
+ relayParams.useDepositAddress = false;
536
+ relayParams.topupGas = false;
532
537
  if (recipientAddress && recipientAddress.startsWith('0x')) {
533
538
  // Use provided EVM recipient address
534
539
  relayParams.recipient = recipientAddress;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@silentswap/sdk",
3
3
  "type": "module",
4
- "version": "0.1.51",
4
+ "version": "0.1.53",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
7
7
  "files": [