Trading
class Trading(api: Api, signAndSendTransaction: LifiSignAndSendTransaction? = null, waitForConfirmation: LifiWaitForConfirmation? = null)
The main entry point for trading-related functionality in the Portal SDK.
This class provides access to various trading providers and their capabilities. Currently supports Lifi and 0x as trading providers.
Parameters
api
The Portal API instance to use for trading operations.
sign And Send Transaction
Closure that signs and submits an EVM transaction (injected by Portal), enabling the high-level lifi.tradeAsset bridging method.
wait For Confirmation
Closure that waits for on-chain confirmation (injected by Portal), enabling the high-level lifi.tradeAsset bridging method.
Constructors
Link copied to clipboard
constructor(api: Api, signAndSendTransaction: LifiSignAndSendTransaction? = null, waitForConfirmation: LifiWaitForConfirmation? = null)