YieldXyz

class YieldXyz(api: YieldXyzApi, portal: YieldXyzPortalDependency? = null)

YieldXyz provider implementation for discovering and managing yield opportunities.

Parameters

api

The low-level Yield.xyz API client.

portal

The Portal dependency used by high-level deposit/withdraw for signing, address resolution and confirmation. May be null when only the low-level API is used.

Constructors

Link copied to clipboard
constructor(api: YieldXyzApi, portal: YieldXyzPortalDependency? = null)

Functions

Link copied to clipboard
suspend fun deposit(params: YieldDepositParams, options: YieldSubmitOptions? = null): Result<YieldDepositResult>

High-level deposit: resolves the yield, builds enter transactions, signs and submits each transaction sequentially, waits for confirmation, and tracks each hash.

Link copied to clipboard

Discovers yield opportunities based on the provided parameters.

Link copied to clipboard

Enters a yield opportunity with the specified parameters.

Link copied to clipboard

Exits a yield opportunity with the specified parameters.

Link copied to clipboard

Retrieves yield balances for specified addresses and networks.

Link copied to clipboard

Retrieves historical yield actions with optional filtering.

Link copied to clipboard

Retrieves a single yield action transaction by its ID.

Link copied to clipboard

Returns the available validators for a native-staking yield.

Link copied to clipboard

Manages a yield opportunity with the specified parameters.

Link copied to clipboard
suspend fun track(transactionId: String, txHash: String): Result<Boolean>

Tracks a transaction by submitting its hash to the Yield.xyz integration.

Link copied to clipboard

High-level withdraw; same parameters and behavior as deposit.