DelegationsApi

class DelegationsApi(host: String, apiKey: String, requests: PortalRequests)

API class for Delegations functionality.

This class handles all delegation-related API calls including approving delegations, revoking delegations, querying delegation status, and transferring tokens using delegated authority.

Unlike Blockaid (where the full request is the POST payload), delegation endpoints use path parameters (chain, token) in the URL and only a subset of fields in the POST body.

Parameters

host

The base URL of the API server.

apiKey

The API key used for authentication.

requests

An instance of PortalRequests to handle HTTP requests.

Constructors

Link copied to clipboard
constructor(host: String, apiKey: String, requests: PortalRequests)

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.