@sodax/sdk 1.0.1-beta-rc1 → 1.0.1-beta-rc2

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.d.cts CHANGED
@@ -8587,6 +8587,19 @@ declare class SwapService {
8587
8587
  * @returns {Promise<IntentState>} The intent state
8588
8588
  */
8589
8589
  getFilledIntent(txHash: Hash$1): Promise<IntentState>;
8590
+ /**
8591
+ * Get the intent delivery info about solved intent from the Relayer API.
8592
+ * Packet data contains info about the intent execution on the destination chain.
8593
+ * @param {SpokeChainId} chainId - The destination spoke chain ID
8594
+ * @param {string} fillTxHash - The fill transaction hash (received from getStatus when status is 3 - SOLVED)
8595
+ * @param {number} timeout - The timeout in milliseconds (default: 120 seconds)
8596
+ * @returns {Promise<Result<PacketData, IntentError<'RELAY_TIMEOUT'>>>} A Result containing either the packet data or an IntentError with code 'RELAY_TIMEOUT'
8597
+ */
8598
+ getSolvedIntentPacket({ chainId, fillTxHash, timeout, }: {
8599
+ chainId: SpokeChainId;
8600
+ fillTxHash: string;
8601
+ timeout?: number;
8602
+ }): Promise<Result<PacketData, IntentError<'RELAY_TIMEOUT'>>>;
8590
8603
  /**
8591
8604
  * Gets the keccak256 hash of an intent. Hash serves as the intent id on Hub chain.
8592
8605
  * @param {Intent} intent - The intent
package/dist/index.d.ts CHANGED
@@ -8587,6 +8587,19 @@ declare class SwapService {
8587
8587
  * @returns {Promise<IntentState>} The intent state
8588
8588
  */
8589
8589
  getFilledIntent(txHash: Hash$1): Promise<IntentState>;
8590
+ /**
8591
+ * Get the intent delivery info about solved intent from the Relayer API.
8592
+ * Packet data contains info about the intent execution on the destination chain.
8593
+ * @param {SpokeChainId} chainId - The destination spoke chain ID
8594
+ * @param {string} fillTxHash - The fill transaction hash (received from getStatus when status is 3 - SOLVED)
8595
+ * @param {number} timeout - The timeout in milliseconds (default: 120 seconds)
8596
+ * @returns {Promise<Result<PacketData, IntentError<'RELAY_TIMEOUT'>>>} A Result containing either the packet data or an IntentError with code 'RELAY_TIMEOUT'
8597
+ */
8598
+ getSolvedIntentPacket({ chainId, fillTxHash, timeout, }: {
8599
+ chainId: SpokeChainId;
8600
+ fillTxHash: string;
8601
+ timeout?: number;
8602
+ }): Promise<Result<PacketData, IntentError<'RELAY_TIMEOUT'>>>;
8590
8603
  /**
8591
8604
  * Gets the keccak256 hash of an intent. Hash serves as the intent id on Hub chain.
8592
8605
  * @param {Intent} intent - The intent
package/dist/index.mjs CHANGED
@@ -13049,6 +13049,26 @@ var SwapService = class {
13049
13049
  getFilledIntent(txHash) {
13050
13050
  return EvmSolverService.getFilledIntent(txHash, this.config, this.hubProvider);
13051
13051
  }
13052
+ /**
13053
+ * Get the intent delivery info about solved intent from the Relayer API.
13054
+ * Packet data contains info about the intent execution on the destination chain.
13055
+ * @param {SpokeChainId} chainId - The destination spoke chain ID
13056
+ * @param {string} fillTxHash - The fill transaction hash (received from getStatus when status is 3 - SOLVED)
13057
+ * @param {number} timeout - The timeout in milliseconds (default: 120 seconds)
13058
+ * @returns {Promise<Result<PacketData, IntentError<'RELAY_TIMEOUT'>>>} A Result containing either the packet data or an IntentError with code 'RELAY_TIMEOUT'
13059
+ */
13060
+ async getSolvedIntentPacket({
13061
+ chainId,
13062
+ fillTxHash,
13063
+ timeout = DEFAULT_RELAY_TX_TIMEOUT
13064
+ }) {
13065
+ return waitUntilIntentExecuted({
13066
+ intentRelayChainId: getIntentRelayChainId(chainId).toString(),
13067
+ spokeTxHash: fillTxHash,
13068
+ timeout,
13069
+ apiUrl: this.config.relayerApiEndpoint
13070
+ });
13071
+ }
13052
13072
  /**
13053
13073
  * Gets the keccak256 hash of an intent. Hash serves as the intent id on Hub chain.
13054
13074
  * @param {Intent} intent - The intent