@sodax/sdk 1.1.0-beta-rc2 → 1.1.0-beta-rc3
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 +21 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -5
- package/dist/index.d.ts +20 -5
- package/dist/index.mjs +21 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -13423,6 +13423,27 @@ var SwapService = class {
|
|
|
13423
13423
|
};
|
|
13424
13424
|
}
|
|
13425
13425
|
}
|
|
13426
|
+
/**
|
|
13427
|
+
* Gets the submit tx extra data for an intent
|
|
13428
|
+
* NOTE: Currently this is only required when source chain is Solana
|
|
13429
|
+
* @param {GetIntentSubmitTxExtraDataParams} params - The txHash or intent parameters
|
|
13430
|
+
* @param {Hash} params.txHash - The transaction hash on Hub chain
|
|
13431
|
+
* @param {Intent} params.intent - The intent
|
|
13432
|
+
* @returns {Promise<SubmitTxExtraData>} The submit tx extra data
|
|
13433
|
+
*/
|
|
13434
|
+
async getIntentSubmitTxExtraData(params) {
|
|
13435
|
+
let intent;
|
|
13436
|
+
if ("txHash" in params) {
|
|
13437
|
+
intent = await this.getIntent(params.txHash);
|
|
13438
|
+
} else {
|
|
13439
|
+
intent = params.intent;
|
|
13440
|
+
}
|
|
13441
|
+
const txData = EvmSolverService.encodeCreateIntent(intent, this.config.intentsContract);
|
|
13442
|
+
return {
|
|
13443
|
+
address: intent.creator,
|
|
13444
|
+
payload: txData.data
|
|
13445
|
+
};
|
|
13446
|
+
}
|
|
13426
13447
|
/**
|
|
13427
13448
|
* Gets an intent from a transaction hash (on Hub chain)
|
|
13428
13449
|
* @param {Hash} txHash - The transaction hash on Hub chain
|