@allbridge/bridge-core-sdk
    Preparing search index...

    Interface LifiIntentsService

    LI.FI Intents (Messenger.LIFI_INTENTS) quotes and orders.

    Send flow (EVM and Solana source chains):

    1. getQuote (or getAmountToBeReceived / getAmountToSend with Messenger.LIFI_INTENTS) to show the expected amounts, the Allbridge fee and the ETA.
    2. EVM: bridge.checkAllowance / bridge.rawTxBuilder.approve with Messenger.LIFI_INTENTS: the spender is sourceToken.lifiIntents.bridgeAddress. A native source token and a Solana source need no approval. Approve before creating the order: the order is short-lived.
    3. buildSendTransaction (or bridge.rawTxBuilder.send with Messenger.LIFI_INTENTS): creates the order and returns the transaction to sign: the LifiIntentsBridge call on EVM, a VersionedTransaction of the lifi-intents-bridge program on Solana (the sender is the fee payer).
    4. Sign and send the transaction at once (see LifiIntentsOrder.validUntil), before order.fillDeadline (a Solana transaction also carries a fresh blockhash, valid for about a minute).
    5. getTransferStatus(sourceChainSymbol, txId) once the Core API has indexed the transfer.
    interface LifiIntentsService {
        buildSendTransaction(
            params: LifiIntentsSendParams,
        ): Promise<LifiIntentsSendTransaction>;
        createOrder(
            params: LifiIntentsCreateOrderParams,
        ): Promise<LifiIntentsOrder>;
        getQuote(params: LifiIntentsQuoteParams): Promise<LifiIntentsQuote>;
    }
    Index

    Methods