@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.cjs +20 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.mjs +20 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -13077,6 +13077,26 @@ var SwapService = class {
|
|
|
13077
13077
|
getFilledIntent(txHash) {
|
|
13078
13078
|
return EvmSolverService.getFilledIntent(txHash, this.config, this.hubProvider);
|
|
13079
13079
|
}
|
|
13080
|
+
/**
|
|
13081
|
+
* Get the intent delivery info about solved intent from the Relayer API.
|
|
13082
|
+
* Packet data contains info about the intent execution on the destination chain.
|
|
13083
|
+
* @param {SpokeChainId} chainId - The destination spoke chain ID
|
|
13084
|
+
* @param {string} fillTxHash - The fill transaction hash (received from getStatus when status is 3 - SOLVED)
|
|
13085
|
+
* @param {number} timeout - The timeout in milliseconds (default: 120 seconds)
|
|
13086
|
+
* @returns {Promise<Result<PacketData, IntentError<'RELAY_TIMEOUT'>>>} A Result containing either the packet data or an IntentError with code 'RELAY_TIMEOUT'
|
|
13087
|
+
*/
|
|
13088
|
+
async getSolvedIntentPacket({
|
|
13089
|
+
chainId,
|
|
13090
|
+
fillTxHash,
|
|
13091
|
+
timeout = DEFAULT_RELAY_TX_TIMEOUT
|
|
13092
|
+
}) {
|
|
13093
|
+
return waitUntilIntentExecuted({
|
|
13094
|
+
intentRelayChainId: types.getIntentRelayChainId(chainId).toString(),
|
|
13095
|
+
spokeTxHash: fillTxHash,
|
|
13096
|
+
timeout,
|
|
13097
|
+
apiUrl: this.config.relayerApiEndpoint
|
|
13098
|
+
});
|
|
13099
|
+
}
|
|
13080
13100
|
/**
|
|
13081
13101
|
* Gets the keccak256 hash of an intent. Hash serves as the intent id on Hub chain.
|
|
13082
13102
|
* @param {Intent} intent - The intent
|