@silentswap/sdk 0.1.46 → 0.1.47

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
@@ -243,7 +243,7 @@ function mapDebridgeStatus(status) {
243
243
  * Fetch a relay.link quote with detailed response
244
244
  */
245
245
  export async function fetchRelayQuote(params, signal) {
246
- const response = await fetch('https://api.relay.link/quote', {
246
+ const response = await fetch('https://api.relay.link/quote/v2', {
247
247
  method: 'POST',
248
248
  headers: {
249
249
  'Content-Type': 'application/json',
package/dist/chain.d.ts CHANGED
@@ -56,6 +56,7 @@ export declare function createPublicClientWithRpc(chainId: number, chain?: Chain
56
56
  export declare function waitForTransactionConfirmation(hash: Hex, publicClient: PublicClient, timeoutMs?: number): Promise<{
57
57
  status: 'success' | 'failed';
58
58
  transactionHash: Hex;
59
+ reason?: 'reverted' | 'timeout' | 'error';
59
60
  }>;
60
61
  /**
61
62
  * Execute a transaction with confirmation waiting
package/dist/chain.js CHANGED
@@ -208,6 +208,7 @@ export async function waitForTransactionConfirmation(hash, publicClient, timeout
208
208
  ]);
209
209
  return {
210
210
  status: receipt.status === 'success' ? 'success' : 'failed',
211
+ reason: receipt.status === 'success' ? undefined : 'reverted',
211
212
  transactionHash: hash,
212
213
  };
213
214
  }
@@ -220,9 +221,10 @@ export async function waitForTransactionConfirmation(hash, publicClient, timeout
220
221
  isTimeout,
221
222
  });
222
223
  // Return failed status instead of throwing to allow callers to handle gracefully
223
- // Callers can check the status and proceed with status checks if needed
224
+ // Callers can check reason to distinguish timeout from on-chain revert
224
225
  return {
225
226
  status: 'failed',
227
+ reason: isTimeout ? 'timeout' : 'error',
226
228
  transactionHash: hash,
227
229
  };
228
230
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@silentswap/sdk",
3
3
  "type": "module",
4
- "version": "0.1.46",
4
+ "version": "0.1.47",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
7
7
  "files": [