EvmAccountTypeApi

class EvmAccountTypeApi(host: String, credentials: PortalCredentials, requests: PortalRequests)

API class for EVM Account Type functionality.

This class handles all EVM account type-related API calls including querying the account type status, building an authorization list, and building an authorization transaction for EIP-7702 upgrades.

The chainId (e.g. "eip155:11155111") is URL-encoded in the path segment so that the colon becomes %3A.

Parameters

host

The base URL of the API server.

credentials

Supplies the bearer token sent with each request.

requests

An instance of PortalRequests to handle HTTP requests.

Constructors

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

Constructs the API with a raw Client API Key.

constructor(host: String, credentials: PortalCredentials, requests: PortalRequests)

Functions

Link copied to clipboard
suspend fun buildAuthorizationList(chainId: String, subsidize: Boolean? = null): Result<BuildAuthorizationListResponse>

suspend fun buildAuthorizationList(chainId: String, subsidize: Boolean?, traceId: String?): Result<BuildAuthorizationListResponse>

Builds the authorization list for EIP-7702 upgrade.

Link copied to clipboard
suspend fun buildAuthorizationTransaction(chainId: String, signature: String, subsidize: Boolean? = null): Result<BuildAuthorizationTransactionResponse>

suspend fun buildAuthorizationTransaction(chainId: String, signature: String, subsidize: Boolean?, traceId: String?): Result<BuildAuthorizationTransactionResponse>

Builds the authorization transaction for EIP-7702 upgrade.

Link copied to clipboard

suspend fun getStatus(chainId: String, traceId: String?): Result<EvmAccountTypeResponse>

Gets the account type status for a given chain.