Delegations

Delegations provider implementation.

This class provides access to token delegation capabilities via the Portal API, enabling cross-chain delegation management for both EVM and Solana ecosystems.

Overview

The Delegations provider supports:

  • Approve: Grant a delegate address permission to transfer tokens on your behalf

  • Revoke: Remove a delegate's permission to transfer your tokens

  • Get Status: Query current delegation state, balances, and active delegations

  • Transfer From: Execute a transfer using previously approved delegated authority

Usage Example

// Approve a delegation
val request = ApproveDelegationRequest(
chain = "eip155:11155111",
token = "USDC",
delegateAddress = "0x...",
amount = "1.0"
)
val result = portal.delegations.approve(request)
result.onSuccess { response ->
// Sign the returned transactions sequentially
response.transactions?.forEach { tx -> /* sign EVM tx */}
response.encodedTransactions?.forEach { tx -> /* sign Solana tx */}
}

Constructors

Link copied to clipboard
constructor(api: DelegationsApi)

Functions

Link copied to clipboard

Approves a delegation for a specified token on a given chain.

Link copied to clipboard

Retrieves the delegation status for a specified token and delegate address.

Link copied to clipboard

Revokes a delegation for a specified token on a given chain.

Link copied to clipboard

Transfers tokens from one address to another using delegated authority.