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.

signAndSendTransaction

Closure that signs and submits an EVM transaction (injected by Portal), enabling the high-level lifi.tradeAsset bridging method.

waitForConfirmation

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)

Properties

Link copied to clipboard
val lifi: Lifi

Access to Lifi trading provider functionality.

Link copied to clipboard

Access to 0x trading provider functionality.