@sip-protocol/sdk 0.6.25 → 0.6.26

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.js CHANGED
@@ -5638,8 +5638,8 @@ var OneClickClient = class {
5638
5638
  params.set("depositMemo", depositMemo);
5639
5639
  }
5640
5640
  const rawStatus = await this.get(`/v0/status?${params.toString()}`);
5641
- const settlementTxHash = rawStatus.settlementTxHash ?? rawStatus.destinationChainTxHashes?.[0]?.hash;
5642
- const depositTxHash = rawStatus.depositTxHash ?? rawStatus.originChainTxHashes?.[0]?.hash;
5641
+ const settlementTxHash = rawStatus.settlementTxHash ?? rawStatus.swapDetails?.destinationChainTxHashes?.[0]?.hash ?? rawStatus.destinationChainTxHashes?.[0]?.hash;
5642
+ const depositTxHash = rawStatus.depositTxHash ?? rawStatus.swapDetails?.originChainTxHashes?.[0]?.hash ?? rawStatus.originChainTxHashes?.[0]?.hash;
5643
5643
  return {
5644
5644
  ...rawStatus,
5645
5645
  settlementTxHash,
package/dist/index.mjs CHANGED
@@ -253,7 +253,7 @@ import {
253
253
  walletRegistry,
254
254
  withSecureBuffer,
255
255
  withSecureBufferSync
256
- } from "./chunk-EMOAOF5P.mjs";
256
+ } from "./chunk-ZEYNCEIE.mjs";
257
257
  import {
258
258
  CryptoError,
259
259
  EncryptionNotImplementedError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sip-protocol/sdk",
3
- "version": "0.6.25",
3
+ "version": "0.6.26",
4
4
  "description": "Core SDK for Shielded Intents Protocol - Privacy layer for cross-chain transactions",
5
5
  "author": "SIP Protocol <hello@sip-protocol.org>",
6
6
  "homepage": "https://sip-protocol.org",
@@ -173,16 +173,27 @@ export class OneClickClient {
173
173
  params.set('depositMemo', depositMemo)
174
174
  }
175
175
 
176
- const rawStatus = await this.get<OneClickStatusResponse>(`/v0/status?${params.toString()}`)
176
+ // Type for raw API response with nested swapDetails
177
+ interface RawStatusResponse extends OneClickStatusResponse {
178
+ swapDetails?: {
179
+ destinationChainTxHashes?: { hash: string; explorerUrl: string }[]
180
+ originChainTxHashes?: { hash: string; explorerUrl: string }[]
181
+ nearTxHashes?: string[]
182
+ }
183
+ }
184
+
185
+ const rawStatus = await this.get<RawStatusResponse>(`/v0/status?${params.toString()}`)
177
186
 
178
- // Normalize response: extract settlement tx hash from destinationChainTxHashes if available
179
- // The 1Click API returns destinationChainTxHashes array with {hash, explorerUrl} objects
187
+ // Normalize response: extract settlement tx hash from swapDetails.destinationChainTxHashes
188
+ // The 1Click API returns tx hashes nested inside swapDetails object
180
189
  const settlementTxHash = rawStatus.settlementTxHash
181
- ?? rawStatus.destinationChainTxHashes?.[0]?.hash
190
+ ?? rawStatus.swapDetails?.destinationChainTxHashes?.[0]?.hash
191
+ ?? rawStatus.destinationChainTxHashes?.[0]?.hash // fallback for flat response
182
192
 
183
- // Extract deposit tx hash from originChainTxHashes if not already present
193
+ // Extract deposit tx hash from swapDetails.originChainTxHashes if not already present
184
194
  const depositTxHash = rawStatus.depositTxHash
185
- ?? rawStatus.originChainTxHashes?.[0]?.hash
195
+ ?? rawStatus.swapDetails?.originChainTxHashes?.[0]?.hash
196
+ ?? rawStatus.originChainTxHashes?.[0]?.hash // fallback for flat response
186
197
 
187
198
  return {
188
199
  ...rawStatus,