chaingate
Version:
Multi-chain cryptocurrency SDK for TypeScript — unified API for Bitcoin, Ethereum, Litecoin, Dogecoin, Bitcoin Cash, Polygon, Arbitrum, and any EVM-compatible chain. Create wallets, query balances, send transactions, and manage tokens and NFTs across UTXO
2,310 lines • 71 kB
TypeScript
export type ClientOptions = {
baseUrl: 'https://api.chaingate.dev' | (string & {});
};
export type EvmAddressBalanceParams = {
address: string;
};
export type EvmAddressBalanceResponse = {
/**
* The queried address
*/
address: string;
/**
* Confirmed balance in native units
*/
confirmed: string;
/**
* Unconfirmed balance in native units
*/
unconfirmed: string;
/**
* Confirmed balance in wei
*/
confirmedWei: string;
};
export type EvmAddressHistoryParams = {
address: string;
page?: string | null;
};
export type EvmAddressHistoryResponse = {
/**
* Current page number
*/
page: number;
transactions: Array<{
/**
* Transaction hash
*/
txHash: string;
/**
* Block height
*/
blockHeight: number;
/**
* Transaction index within the block
*/
transactionIndex: number;
/**
* Block timestamp (unix seconds)
*/
timestamp: number;
/**
* Sender address
*/
from: string;
/**
* Recipient address (null for contract creations)
*/
to?: string | null;
/**
* Native value transferred (in ETH)
*/
value: string;
/**
* Gas used by this transaction
*/
gasUsed?: string | null;
/**
* All decoded contract events in this transaction
*/
events: Array<{
/**
* Solidity event name (Transfer, Approval, ApprovalForAll, TransferSingle, TransferBatch, Deposit, Withdrawal)
*/
type: string;
/**
* Contract address that emitted the event
*/
contract: string;
/**
* Log index within the transaction receipt
*/
logIndex: number;
/**
* Decoded event parameters
*/
details: {
[key: string]: string;
};
}>;
/**
* Actions relevant to the queried address: native currency transfers (contract="native", logIndex=-1) followed by contract events, enriched with token metadata
*/
actions: Array<{
/**
* Action type relative to the queried address (transfer_in, transfer_out, transfer, mint, burn, approval, approval_for_all, wrap, unwrap)
*/
type: string;
/**
* Contract address that emitted the event, or "native" for native currency transfers (ETH, MATIC, etc.)
*/
contract: string;
/**
* Log index within the transaction receipt (-1 for native transfers)
*/
logIndex: number;
/**
* Decoded event parameters
*/
details: {
[key: string]: string;
};
/**
* Token metadata for the contract
*/
token: {
/**
* Token name
*/
name?: string | null;
/**
* Token symbol
*/
symbol?: string | null;
/**
* Token decimals
*/
decimals?: number | null;
/**
* Token logo URL
*/
logoUrl?: string | null;
};
}>;
}>;
};
export type EvmAddressTokenBalancesParams = {
/**
* EVM address to query token balances for
*/
address: string;
};
export type EvmAddressTokenBalancesResponse = {
/**
* The queried address
*/
address: string;
/**
* The network name
*/
network: string;
/**
* List of token balances with non-zero balance
*/
tokens: Array<EvmTokenBalanceItem>;
};
export type EvmAddressTxCountParams = {
address: string;
};
export type EvmAddressTxCountResponse = {
/**
* Number of transactions sent from this address
*/
transactionCount: string;
};
export type EvmBlockByHashParams = {
blockHash: string;
};
export type EvmBlockResponse = {
/**
* Block number
*/
height: number;
/**
* Block hash
*/
hash: string;
/**
* Parent block hash
*/
parentHash: string;
/**
* Block timestamp (unix)
*/
timestamp: number;
/**
* Block nonce
*/
nonce?: string | null;
/**
* Block difficulty
*/
difficulty?: string | null;
/**
* Gas limit
*/
gasLimit: string;
/**
* Gas used
*/
gasUsed: string;
/**
* Miner address
*/
miner: string;
/**
* Number of transactions
*/
transactionCount: number;
/**
* Base fee per gas in wei
*/
baseFeePerGas?: string | null;
/**
* State root hash
*/
stateRoot: string;
/**
* Receipts root hash
*/
receiptsRoot: string;
/**
* SHA3 of uncles data
*/
sha3Uncles: string;
/**
* Block extra data
*/
extraData: string;
};
export type EvmBlockByHeightParams = {
blockHeight: string;
};
export type EvmBlockByHeightResponse = {
/**
* Block number
*/
height: number;
/**
* Block hash
*/
hash: string;
/**
* Parent block hash
*/
parentHash: string;
/**
* Block timestamp (unix)
*/
timestamp: number;
/**
* Block nonce
*/
nonce?: string | null;
/**
* Block difficulty
*/
difficulty?: string | null;
/**
* Gas limit
*/
gasLimit: string;
/**
* Gas used
*/
gasUsed: string;
/**
* Miner address
*/
miner: string;
/**
* Number of transactions
*/
transactionCount: number;
/**
* Base fee per gas in wei
*/
baseFeePerGas?: string | null;
/**
* State root hash
*/
stateRoot: string;
/**
* Receipts root hash
*/
receiptsRoot: string;
/**
* SHA3 of uncles data
*/
sha3Uncles: string;
/**
* Block extra data
*/
extraData: string;
};
export type EvmBroadcastTxBody = {
transactionRaw: string;
};
export type EvmBroadcastTxResponse = {
/**
* Transaction hash
*/
transactionId: string;
};
export type EvmCallContractBody = {
/**
* ABI-encoded function call data
*/
data: string;
/**
* Target contract address
*/
contract: string;
/**
* Optional gas limit for the call (capped server-side)
*/
gas?: string | null;
};
export type EvmCallContractResponse = {
/**
* Hex-encoded return value of the contract call
*/
result: string;
};
export type EvmEstimateGasParams = {
addressFrom: string;
addressTo: string;
nonce: string;
amount: string;
data?: string | null;
};
export type EvmEstimateGasResponse = {
/**
* Estimated gas units
*/
estimatedGas: string;
};
export type EvmFeeRateResponse = {
/**
* Low priority fee estimate
*/
low: EvmFeeGradeSchema;
/**
* Normal priority fee estimate
*/
normal: EvmFeeGradeSchema;
/**
* High priority fee estimate
*/
high: EvmFeeGradeSchema;
/**
* Maximum priority fee estimate
*/
maximum: EvmFeeGradeSchema;
};
export type EvmLatestBlockResponse = {
/**
* Block height
*/
height: number;
/**
* Block hash
*/
hash: string;
/**
* Block timestamp (unix)
*/
timestamp: number;
/**
* Base fee per gas in wei
*/
baseFeePerGas?: string | null;
/**
* Gas used
*/
gasUsed: string;
/**
* Gas limit
*/
gasLimit: string;
/**
* Number of transactions
*/
transactionCount: number;
};
/**
* SVG image data
*/
export type EvmNetworkLogoResponse = string;
export type EvmNetworkStatusResponse = {
/**
* Average block time in seconds
*/
blockTimeSecs: number;
/**
* Average block time in milliseconds
*/
blockTimeMs: number;
/**
* Network gas usage ratio (0-1)
*/
networkOccupation: number;
/**
* Whether the network supports EIP-1559
*/
supportsEIP1559: boolean;
/**
* Typical gas cost for a simple transfer in native units
*/
typicalTransactionCost: string;
/**
* Current base fee in native units (e.g. ETH)
*/
currentBaseFee?: string | null;
/**
* Predicted next base fee in native units (e.g. ETH)
*/
predictedBaseFee?: string | null;
/**
* Current base fee in Gwei
*/
currentBaseFeeGWei?: string | null;
/**
* Predicted next base fee in Gwei
*/
predictedBaseFeeGWei?: string | null;
/**
* Predicted priority fee tips
*/
predictedTips: Array<{
/**
* Expected confirmation time
*/
expectedConfirmationTimeSecs: number;
/**
* Predicted tip in native units (e.g. ETH)
*/
predictedTip: string;
/**
* Predicted tip in Gwei
*/
predictedTipGWei: string;
}>;
};
export type EvmNftAnimationParams = {
/**
* NFT contract address
*/
contractAddress: string;
/**
* Token ID
*/
tokenId: string;
};
/**
* Binary animation/video data (MP4, WEBM, GLB, HTML, etc.)
*/
export type EvmNftAnimationResponse = string;
export type EvmNftImageParams = {
/**
* NFT contract address
*/
contractAddress: string;
/**
* Token ID
*/
tokenId: string;
};
/**
* Binary image data (PNG, SVG, GIF, WEBP, etc.)
*/
export type EvmNftImageResponse = string;
export type EvmNftMetadataParams = {
/**
* NFT contract address
*/
contractAddress: string;
/**
* Token ID
*/
tokenId: string;
};
export type EvmNftMetadataResponse = {
/**
* NFT contract address
*/
contractAddress: string;
/**
* Token ID
*/
tokenId: string;
/**
* Raw tokenURI from the contract
*/
tokenURI?: string | null;
/**
* Decoded metadata from the tokenURI (null if unresolvable)
*/
metadata?: {
/**
* NFT name
*/
name?: string | null;
/**
* NFT description
*/
description?: string | null;
/**
* ChainGate proxy URL to fetch the NFT image directly (resolves IPFS/data: URIs transparently)
*/
image?: string | null;
/**
* Original image URL from the metadata JSON (may be IPFS, data: URI, or HTTPS)
*/
imageOriginal?: string | null;
/**
* ChainGate proxy URL to fetch the NFT animation/video directly (resolves IPFS/data: URIs transparently)
*/
animationUrl?: string | null;
/**
* Original animation_url from the metadata JSON (may be IPFS, data: URI, or HTTPS)
*/
animationUrlOriginal?: string | null;
/**
* External link
*/
externalUrl?: string | null;
/**
* NFT attributes/traits
*/
attributes?: Array<unknown> | null;
} | null;
};
export type EvmNonceParams = {
address: string;
};
export type EvmNonceResponse = {
/**
* Next nonce to use when sending a transaction
*/
nonce: string;
};
export type EvmOwnedTokensParams = {
/**
* ERC-721 contract address
*/
contractAddress: string;
/**
* Wallet address to check ownership for
*/
address: string;
};
export type EvmOwnedTokensResponse = {
/**
* The ERC-721 contract address
*/
contractAddress: string;
/**
* The queried wallet address
*/
wallet: string;
/**
* Token standard (ERC-20, ERC-721, ERC-1155, or unknown)
*/
standard: string;
/**
* Raw balance (token count for ERC-721)
*/
balance: string;
/**
* Human-readable balance (divided by 10^decimals)
*/
balanceFormatted?: string | null;
/**
* Owned NFT tokens with tokenURIs
*/
ownedTokens: Array<EvmOwnedTokenItem>;
/**
* Token metadata
*/
token: {
/**
* Token name
*/
name?: string | null;
/**
* Token symbol
*/
symbol?: string | null;
/**
* Token decimals
*/
decimals?: number | null;
/**
* Token logo URL
*/
logoUrl?: string | null;
};
};
export type EvmTokenDataParams = {
/**
* Token contract address
*/
contractAddress: string;
};
export type EvmTokenDataResponse = {
/**
* Token contract address (checksummed to lowercase)
*/
contractAddress: string;
/**
* Detected token standard (ERC-20, ERC-721, ERC-1155, or unknown)
*/
standard: string;
/**
* Token name
*/
name?: string | null;
/**
* Token symbol
*/
symbol?: string | null;
/**
* Token decimals
*/
decimals?: number | null;
/**
* Total supply in smallest unit (raw)
*/
totalSupply?: string | null;
/**
* Total supply in human-readable units (divided by 10^decimals)
*/
totalSupplyFormatted?: string | null;
/**
* Whether the contract implements ERC-165 interface detection
*/
supportsERC165: boolean;
/**
* Token logo URL (proxied from TrustWallet when available)
*/
logoUrl?: string | null;
};
export type EvmTokenLogoParams = {
/**
* ERC-20 token contract address
*/
address: string;
};
/**
* Binary image data (PNG or SVG)
*/
export type EvmTokenLogoResponse = string;
export type EvmTxDetailsParams = {
transactionId: string;
};
export type EvmTxDetailsResponse = {
/**
* Transaction hash
*/
txHash: string;
transfers: Array<{
/**
* Transfer amount in native units
*/
amount: string;
/**
* Sender address
*/
from: string;
/**
* Receiver address
*/
to: string;
}>;
/**
* Block number
*/
blockHeight: number;
/**
* Block hash
*/
blockHash?: string | null;
/**
* Index of the transaction in the block
*/
transactionIndex?: number | null;
/**
* Block timestamp (unix)
*/
timestamp: number;
/**
* Transaction status (1 = success, 0 = failure, null = pending)
*/
status?: number | null;
/**
* Transaction type (0 = legacy, 2 = EIP-1559)
*/
type?: number | null;
/**
* Sender nonce
*/
nonce: number;
/**
* Transaction value in native units
*/
amount: string;
/**
* Gas limit
*/
gas: string;
/**
* Gas actually used
*/
gasUsed?: string | null;
/**
* DEPRECATED: Gas price in native units (legacy txs). Use gasPriceGwei instead
*/
gasPrice?: string | null;
/**
* DEPRECATED: Effective gas price in native units. Use effectiveGasPriceGwei instead
*/
effectiveGasPrice?: string | null;
/**
* DEPRECATED: Max fee per gas in native units (EIP-1559). Use maxFeePerGasGwei instead
*/
maxFeePerGas?: string | null;
/**
* DEPRECATED: Max priority fee in native units (EIP-1559). Use maxPriorityFeePerGasGwei instead
*/
maxPriorityFeePerGas?: string | null;
/**
* Gas price in Gwei (legacy txs)
*/
gasPriceGwei?: string | null;
/**
* Effective gas price in Gwei
*/
effectiveGasPriceGwei?: string | null;
/**
* Max fee per gas in Gwei (EIP-1559)
*/
maxFeePerGasGwei?: string | null;
/**
* Max priority fee in Gwei (EIP-1559)
*/
maxPriorityFeePerGasGwei?: string | null;
/**
* Sender address
*/
from: string;
/**
* Receiver address
*/
to: string;
/**
* Transaction input data
*/
data: string;
/**
* Decoded contract events for this transaction
*/
events: Array<{
/**
* Solidity event name (Transfer, Approval, ApprovalForAll, TransferSingle, TransferBatch, Deposit, Withdrawal)
*/
type: string;
/**
* Contract address that emitted the event
*/
contract: string;
/**
* Log index within the transaction receipt
*/
logIndex: number;
/**
* Decoded event parameters
*/
details: {
[key: string]: string;
};
}>;
};
/**
* SVG image data
*/
export type GlobalNetworkLogoResponse = string;
export type MarketsResponse = {
crypto: Array<{
/**
* Network identifier
*/
id: string;
/**
* Network name
*/
name: string;
/**
* Network symbol
*/
symbol: string;
/**
* Whether the network has its own native token (false for L2s that use another chain's token, e.g. Arbitrum uses ETH)
*/
hasOwnToken: boolean;
nativeToken: {
/**
* Token symbol
*/
symbol: string;
/**
* Token name
*/
name: string;
/**
* Price in USD
*/
rateUsd: string;
/**
* 24h trading volume of the native token in USD
*/
vol24h: string;
/**
* Market capitalization of the native token in USD
*/
marketCap: string;
};
}>;
fiat: Array<{
/**
* Currency symbol (lowercase)
*/
symbol: string;
/**
* Exchange rate to USD
*/
rateUsd: string;
}>;
};
export type NetworksInfoResponse = Array<{
/**
* Network identifier
*/
id: string;
/**
* Network name
*/
name: string;
/**
* Network symbol
*/
symbol: string;
/**
* Chain type
*/
type: 'evm' | 'utxo';
/**
* Whether this is a testnet
*/
isTestnet: boolean;
/**
* Whether the network has its own native token (false for L2s that use another chain's token, e.g. Arbitrum uses ETH)
*/
hasOwnToken: boolean;
/**
* Native token info (null for testnets)
*/
nativeToken?: {
/**
* Native token symbol
*/
symbol: string;
/**
* Native token name
*/
name: string;
/**
* Price in USD
*/
rateUsd: string;
/**
* 24h trading volume of the native token in USD
*/
vol24h: string;
/**
* Market capitalization of the native token in USD
*/
marketCap: string;
} | null;
/**
* URL to network logo
*/
logoUrl: string;
/**
* Average block time in seconds
*/
blockTimeSecs: number;
/**
* Average block time in milliseconds
*/
blockTimeMs: number;
/**
* Network gas usage ratio (0-1)
*/
networkOccupation: number;
/**
* Whether the network supports EIP-1559
*/
supportsEIP1559: boolean;
/**
* Current base fee in Gwei
*/
currentBaseFeeGWei?: string | null;
/**
* Predicted next base fee in Gwei
*/
predictedBaseFeeGWei?: string | null;
predictedTips: Array<{
/**
* Expected confirmation time in seconds
*/
expectedConfirmationTimeSecs: number;
/**
* Predicted tip in Gwei
*/
predictedTipGWei: string;
}>;
}>;
export type JsonRpcBody = {
/**
* JSON-RPC protocol version
*/
jsonrpc: '1.0' | '2.0';
/**
* RPC method name
*/
method: string;
/**
* Method parameters
*/
params: Array<unknown>;
/**
* Request identifier
*/
id: string | number | unknown;
};
export type JsonRpcResponse = {
/**
* JSON-RPC protocol version
*/
jsonrpc: string;
/**
* Request identifier
*/
id: string | number | unknown;
/**
* Method result (present on success)
*/
result?: unknown;
/**
* Error details (present on failure)
*/
error?: {
code: number;
message: string;
} | null;
};
export type UtxoAddressBalanceParams = {
address: string;
};
export type UtxoAddressBalanceResponse = {
/**
* The queried address
*/
address: string;
/**
* Confirmed balance in native units
*/
confirmed: string;
/**
* Unconfirmed balance in native units
*/
unconfirmed: string;
/**
* Confirmed balance in satoshis
*/
confirmedSat: string;
};
export type UtxoAddressHistoryParams = {
address: string;
page?: string | null;
};
export type UtxoAddressHistoryResponse = {
/**
* Current page number
*/
page: number;
transactions: Array<{
/**
* Block height
*/
height: number;
/**
* Transaction ID
*/
txid: string;
/**
* Amount in satoshis
*/
amount: string;
/**
* Address balance after transaction
*/
addressBalance: string;
}>;
};
export type UtxoBlockByHashParams = {
blockHash: string;
};
export type UtxoBlockResponse = {
/**
* Block hash
*/
hash: string;
/**
* Block height
*/
height: number;
/**
* Block timestamp (unix)
*/
timestamp: number;
/**
* Number of transactions
*/
transactionCount: number;
/**
* Block size in bytes
*/
size: number;
/**
* Block weight
*/
weight: number;
/**
* Block version
*/
version: number;
/**
* Merkle root hash
*/
merkleRoot: string;
/**
* Mining difficulty
*/
difficulty: number;
/**
* Number of confirmations
*/
confirmations: number;
/**
* Previous block hash
*/
previousBlockHash?: string | null;
/**
* Next block hash
*/
nextBlockHash?: string | null;
};
export type UtxoBlockByHeightParams = {
blockHeight: string;
};
export type UtxoBlockByHeightResponse = {
/**
* Block hash
*/
hash: string;
/**
* Block height
*/
height: number;
/**
* Block timestamp (unix)
*/
timestamp: number;
/**
* Number of transactions
*/
transactionCount: number;
/**
* Block size in bytes
*/
size: number;
/**
* Block weight
*/
weight: number;
/**
* Block version
*/
version: number;
/**
* Merkle root hash
*/
merkleRoot: string;
/**
* Mining difficulty
*/
difficulty: number;
/**
* Number of confirmations
*/
confirmations: number;
/**
* Previous block hash
*/
previousBlockHash?: string | null;
/**
* Next block hash
*/
nextBlockHash?: string | null;
};
export type UtxoBroadcastTxBody = {
transactionRaw: string;
};
export type UtxoBroadcastTxResponse = {
/**
* Transaction ID
*/
txId: string;
};
export type UtxoEstimateSizeBody = {
from: Array<{
address: string;
signatures?: number | null;
pubKeys?: number | null;
}>;
to: Array<string>;
};
export type UtxoEstimateSizeResponse = {
/**
* Estimated transaction size in bytes
*/
bytes: number;
};
export type UtxoFeeRateResponse = {
low: {
/**
* Fee per KB in satoshis
*/
feePerKb: string;
/**
* Expected confirmation time
*/
confirmationTimeSecs: number;
};
normal: {
/**
* Fee per KB in satoshis
*/
feePerKb: string;
/**
* Expected confirmation time
*/
confirmationTimeSecs: number;
};
high: {
/**
* Fee per KB in satoshis
*/
feePerKb: string;
/**
* Expected confirmation time
*/
confirmationTimeSecs: number;
};
maximum: {
/**
* Fee per KB in satoshis
*/
feePerKb: string;
/**
* Expected confirmation time
*/
confirmationTimeSecs: number;
};
};
export type UtxoLatestBlockResponse = {
/**
* Block height
*/
height: number;
/**
* Block hash
*/
hash: string;
/**
* Block timestamp (unix)
*/
timestamp: number;
/**
* Mining difficulty
*/
difficulty: number;
/**
* Median time of the last 11 blocks
*/
medianTime: number;
};
/**
* SVG image data
*/
export type UtxoNetworkLogoResponse = string;
export type UtxoMempoolParams = {
page?: string | null;
};
export type UtxoMempoolResponseSchema = {
/**
* Timestamp of last mempool update
*/
lastUpdateTimestamp: number;
/**
* Current page number
*/
page: number;
/**
* Transaction IDs in the mempool
*/
transactions: Array<string>;
/**
* Last available page number
*/
lastPage: number;
};
export type UtxoTxDetailsParams = {
transactionId: string;
};
export type UtxoTxDetailsResponse = {
/**
* Transaction ID
*/
txid: string;
/**
* Block height (null if unconfirmed)
*/
blockHeight?: number | null;
/**
* Block hash (null if unconfirmed)
*/
blockHash?: string | null;
/**
* Block timestamp (unix, null if unconfirmed)
*/
timestamp?: number | null;
/**
* Number of confirmations (0 if unconfirmed)
*/
confirmations: number;
/**
* Transaction version
*/
version: number;
/**
* Transaction locktime
*/
locktime: number;
inputs: Array<{
/**
* Input address
*/
address?: string | null;
/**
* Input amount in native units
*/
amount: string;
/**
* Previous transaction ID
*/
txId?: string | null;
/**
* Output index in previous transaction
*/
n?: number | null;
/**
* Script pubkey hex
*/
script?: string | null;
/**
* Script signature hex
*/
scriptSig?: string | null;
}>;
outputs: Array<{
/**
* Output address
*/
address: string;
/**
* Output amount in native units
*/
amount: string;
/**
* Output index
*/
n: number;
/**
* Script pubkey hex
*/
script: string;
}>;
/**
* Transaction size in bytes
*/
sizeBytes: number;
/**
* Transaction fee in native units
*/
fee: string;
/**
* Fee per kilobyte in native units
*/
feePerKb: string;
/**
* Raw transaction hex
*/
rawTransaction: string;
};
export type UtxosByAddressParams = {
address: string;
page?: string | null;
};
export type UtxosByAddressResponse = {
/**
* The queried address
*/
address: string;
/**
* Current page number
*/
page: number;
utxos: Array<{
/**
* Transaction ID
*/
txid: string;
/**
* Output index
*/
n: number;
/**
* Amount in native units
*/
amount: string;
/**
* Block height where UTXO was created
*/
height: number;
/**
* Script pubkey hex
*/
script: string;
}>;
};
export type EvmOwnedToken = {
/**
* NFT token ID
*/
id: string;
/**
* Raw tokenURI from the contract (null if not implemented). Use /nft/metadata to decode.
*/
uri?: string | null;
};
export type EvmTokenBalanceItem = {
/**
* Token contract address
*/
contractAddress: string;
/**
* Token standard (ERC-20, ERC-721, ERC-1155, or unknown)
*/
standard: string;
/**
* Raw balance (in smallest unit for ERC-20, count for ERC-721)
*/
balance: string;
/**
* Human-readable balance (divided by 10^decimals)
*/
balanceFormatted?: string | null;
/**
* Owned NFT tokens with tokenURIs. Only present for ERC-721/1155.
*/
ownedTokens?: Array<EvmOwnedToken> | null;
/**
* Token metadata (from TrustWallet or on-chain)
*/
token: {
/**
* Token name
*/
name?: string | null;
/**
* Token symbol
*/
symbol?: string | null;
/**
* Token decimals
*/
decimals?: number | null;
/**
* Token logo URL
*/
logoUrl?: string | null;
};
};
export type EvmFeeGradeSchema = {
/**
* DEPRECATED: Max fee per gas in native units (e.g. ETH). Use maxFeePerGasGwei instead
*/
maxFeePerGas?: string | null;
/**
* DEPRECATED: Max priority fee per gas in native units (e.g. ETH). Use maxPriorityFeePerGasGwei instead
*/
maxPriorityFeePerGas?: string | null;
/**
* DEPRECATED: Gas price in native units (legacy networks). Use gasPriceGwei instead
*/
gasPrice?: string | null;
confirmationTimeSecs: number;
/**
* Max fee per gas in Gwei
*/
maxFeePerGasGwei?: string | null;
/**
* Max priority fee per gas in Gwei
*/
maxPriorityFeePerGasGwei?: string | null;
/**
* Gas price in Gwei (legacy networks)
*/
gasPriceGwei?: string | null;
};
export type EvmOwnedTokenItem = {
/**
* Token ID
*/
id: string;
/**
* Raw tokenURI from the contract (null if not implemented). Use /nft/metadata to decode.
*/
uri?: string | null;
};
export type GetEvmNetworkAddressBalanceData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query: {
address: string;
};
url: '/evm/{network}/addressBalance';
};
export type GetEvmNetworkAddressBalanceErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkAddressBalanceError = GetEvmNetworkAddressBalanceErrors[keyof GetEvmNetworkAddressBalanceErrors];
export type GetEvmNetworkAddressBalanceResponses = {
/**
* Successful response
*/
200: EvmAddressBalanceResponse;
};
export type GetEvmNetworkAddressBalanceResponse = GetEvmNetworkAddressBalanceResponses[keyof GetEvmNetworkAddressBalanceResponses];
export type GetEvmNetworkAddressHistoryData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query: {
address: string;
page?: string;
};
url: '/evm/{network}/addressHistory';
};
export type GetEvmNetworkAddressHistoryErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkAddressHistoryError = GetEvmNetworkAddressHistoryErrors[keyof GetEvmNetworkAddressHistoryErrors];
export type GetEvmNetworkAddressHistoryResponses = {
/**
* Successful response
*/
200: EvmAddressHistoryResponse;
};
export type GetEvmNetworkAddressHistoryResponse = GetEvmNetworkAddressHistoryResponses[keyof GetEvmNetworkAddressHistoryResponses];
export type GetEvmNetworkAddressTokenBalancesData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query: {
/**
* EVM address to query token balances for
*/
address: string;
};
url: '/evm/{network}/addressTokenBalances';
};
export type GetEvmNetworkAddressTokenBalancesErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkAddressTokenBalancesError = GetEvmNetworkAddressTokenBalancesErrors[keyof GetEvmNetworkAddressTokenBalancesErrors];
export type GetEvmNetworkAddressTokenBalancesResponses = {
/**
* Successful response
*/
200: EvmAddressTokenBalancesResponse;
};
export type GetEvmNetworkAddressTokenBalancesResponse = GetEvmNetworkAddressTokenBalancesResponses[keyof GetEvmNetworkAddressTokenBalancesResponses];
export type GetEvmNetworkAddressTransactionCountData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query: {
address: string;
};
url: '/evm/{network}/addressTransactionCount';
};
export type GetEvmNetworkAddressTransactionCountErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkAddressTransactionCountError = GetEvmNetworkAddressTransactionCountErrors[keyof GetEvmNetworkAddressTransactionCountErrors];
export type GetEvmNetworkAddressTransactionCountResponses = {
/**
* Successful response
*/
200: EvmAddressTxCountResponse;
};
export type GetEvmNetworkAddressTransactionCountResponse = GetEvmNetworkAddressTransactionCountResponses[keyof GetEvmNetworkAddressTransactionCountResponses];
export type GetEvmNetworkBlockByHashData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query: {
blockHash: string;
};
url: '/evm/{network}/blockByHash';
};
export type GetEvmNetworkBlockByHashErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkBlockByHashError = GetEvmNetworkBlockByHashErrors[keyof GetEvmNetworkBlockByHashErrors];
export type GetEvmNetworkBlockByHashResponses = {
/**
* Successful response
*/
200: EvmBlockResponse;
};
export type GetEvmNetworkBlockByHashResponse = GetEvmNetworkBlockByHashResponses[keyof GetEvmNetworkBlockByHashResponses];
export type GetEvmNetworkBlockByHeightData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query: {
blockHeight: string;
};
url: '/evm/{network}/blockByHeight';
};
export type GetEvmNetworkBlockByHeightErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkBlockByHeightError = GetEvmNetworkBlockByHeightErrors[keyof GetEvmNetworkBlockByHeightErrors];
export type GetEvmNetworkBlockByHeightResponses = {
/**
* Successful response
*/
200: EvmBlockByHeightResponse;
};
export type GetEvmNetworkBlockByHeightResponse = GetEvmNetworkBlockByHeightResponses[keyof GetEvmNetworkBlockByHeightResponses];
export type PostEvmNetworkBroadcastTransactionData = {
body?: EvmBroadcastTxBody;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query?: never;
url: '/evm/{network}/broadcastTransaction';
};
export type PostEvmNetworkBroadcastTransactionErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type PostEvmNetworkBroadcastTransactionError = PostEvmNetworkBroadcastTransactionErrors[keyof PostEvmNetworkBroadcastTransactionErrors];
export type PostEvmNetworkBroadcastTransactionResponses = {
/**
* Successful response
*/
200: EvmBroadcastTxResponse;
};
export type PostEvmNetworkBroadcastTransactionResponse = PostEvmNetworkBroadcastTransactionResponses[keyof PostEvmNetworkBroadcastTransactionResponses];
export type PostEvmNetworkCallSmartContractFunctionData = {
body?: EvmCallContractBody;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query?: never;
url: '/evm/{network}/callSmartContractFunction';
};
export type PostEvmNetworkCallSmartContractFunctionErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type PostEvmNetworkCallSmartContractFunctionError = PostEvmNetworkCallSmartContractFunctionErrors[keyof PostEvmNetworkCallSmartContractFunctionErrors];
export type PostEvmNetworkCallSmartContractFunctionResponses = {
/**
* Successful response
*/
200: EvmCallContractResponse;
};
export type PostEvmNetworkCallSmartContractFunctionResponse = PostEvmNetworkCallSmartContractFunctionResponses[keyof PostEvmNetworkCallSmartContractFunctionResponses];
export type GetEvmNetworkEstimateGasData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query: {
addressFrom: string;
addressTo: string;
nonce: string;
amount: string;
data?: string;
};
url: '/evm/{network}/estimateGas';
};
export type GetEvmNetworkEstimateGasErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkEstimateGasError = GetEvmNetworkEstimateGasErrors[keyof GetEvmNetworkEstimateGasErrors];
export type GetEvmNetworkEstimateGasResponses = {
/**
* Successful response
*/
200: EvmEstimateGasResponse;
};
export type GetEvmNetworkEstimateGasResponse = GetEvmNetworkEstimateGasResponses[keyof GetEvmNetworkEstimateGasResponses];
export type GetEvmNetworkFeeRateData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query?: never;
url: '/evm/{network}/feeRate';
};
export type GetEvmNetworkFeeRateErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkFeeRateError = GetEvmNetworkFeeRateErrors[keyof GetEvmNetworkFeeRateErrors];
export type GetEvmNetworkFeeRateResponses = {
/**
* Successful response
*/
200: EvmFeeRateResponse;
};
export type GetEvmNetworkFeeRateResponse = GetEvmNetworkFeeRateResponses[keyof GetEvmNetworkFeeRateResponses];
export type GetEvmNetworkLatestBlockData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query?: never;
url: '/evm/{network}/latestBlock';
};
export type GetEvmNetworkLatestBlockErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkLatestBlockError = GetEvmNetworkLatestBlockErrors[keyof GetEvmNetworkLatestBlockErrors];
export type GetEvmNetworkLatestBlockResponses = {
/**
* Successful response
*/
200: EvmLatestBlockResponse;
};
export type GetEvmNetworkLatestBlockResponse = GetEvmNetworkLatestBlockResponses[keyof GetEvmNetworkLatestBlockResponses];
export type GetEvmNetworkLogoData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query?: never;
url: '/evm/{network}/logo';
};
export type GetEvmNetworkLogoErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkLogoError = GetEvmNetworkLogoErrors[keyof GetEvmNetworkLogoErrors];
export type GetEvmNetworkLogoResponses = {
/**
* Successful response
*/
200: EvmNetworkLogoResponse;
};
export type GetEvmNetworkLogoResponse = GetEvmNetworkLogoResponses[keyof GetEvmNetworkLogoResponses];
export type GetEvmNetworkNetworkStatusData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query?: never;
url: '/evm/{network}/networkStatus';
};
export type GetEvmNetworkNetworkStatusErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkNetworkStatusError = GetEvmNetworkNetworkStatusErrors[keyof GetEvmNetworkNetworkStatusErrors];
export type GetEvmNetworkNetworkStatusResponses = {
/**
* Successful response
*/
200: EvmNetworkStatusResponse;
};
export type GetEvmNetworkNetworkStatusResponse = GetEvmNetworkNetworkStatusResponses[keyof GetEvmNetworkNetworkStatusResponses];
export type GetEvmNetworkNonceData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query: {
address: string;
};
url: '/evm/{network}/nonce';
};
export type GetEvmNetworkNonceErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkNonceError = GetEvmNetworkNonceErrors[keyof GetEvmNetworkNonceErrors];
export type GetEvmNetworkNonceResponses = {
/**
* Successful response
*/
200: EvmNonceResponse;
};
export type GetEvmNetworkNonceResponse = GetEvmNetworkNonceResponses[keyof GetEvmNetworkNonceResponses];
export type GetEvmNetworkOwnedTokensData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query: {
/**
* ERC-721 contract address
*/
contractAddress: string;
/**
* Wallet address to check ownership for
*/
address: string;
};
url: '/evm/{network}/ownedTokens';
};
export type GetEvmNetworkOwnedTokensErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkOwnedTokensError = GetEvmNetworkOwnedTokensErrors[keyof GetEvmNetworkOwnedTokensErrors];
export type GetEvmNetworkOwnedTokensResponses = {
/**
* Successful response
*/
200: EvmOwnedTokensResponse;
};
export type GetEvmNetworkOwnedTokensResponse = GetEvmNetworkOwnedTokensResponses[keyof GetEvmNetworkOwnedTokensResponses];
export type GetEvmNetworkTokenDataData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query: {
/**
* Token contract address
*/
contractAddress: string;
};
url: '/evm/{network}/tokenData';
};
export type GetEvmNetworkTokenDataErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkTokenDataError = GetEvmNetworkTokenDataErrors[keyof GetEvmNetworkTokenDataErrors];
export type GetEvmNetworkTokenDataResponses = {
/**
* Successful response
*/
200: EvmTokenDataResponse;
};
export type GetEvmNetworkTokenDataResponse = GetEvmNetworkTokenDataResponses[keyof GetEvmNetworkTokenDataResponses];
export type GetEvmNetworkTokenLogoData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query: {
/**
* ERC-20 token contract address
*/
address: string;
};
url: '/evm/{network}/tokenLogo';
};
export type GetEvmNetworkTokenLogoErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkTokenLogoError = GetEvmNetworkTokenLogoErrors[keyof GetEvmNetworkTokenLogoErrors];
export type GetEvmNetworkTokenLogoResponses = {
/**
* Successful response
*/
200: EvmTokenLogoResponse;
};
export type GetEvmNetworkTokenLogoResponse = GetEvmNetworkTokenLogoResponses[keyof GetEvmNetworkTokenLogoResponses];
export type GetEvmNetworkTransactionDetailsData = {
body?: never;
path: {
/**
* Blockchain network identifier
*/
network: 'ethereum' | 'avalanche';
};
query: {
transactionId: string;
};
url: '/evm/{network}/transactionDetails';
};
export type GetEvmNetworkTransactionDetailsErrors = {
/**
* Bad Request
*/
400: {
error?: string;
};
/**
* Unauthorized — invalid API key
*/
401: {
error?: string;
};
/**
* Too Many Requests
*/
429: {
error?: string;
};
/**
* Internal Server Error
*/
500: {
error?: string;
};
};
export type GetEvmNetworkTransactionDetailsError = GetEvmNetworkTransactionDetailsErrors[keyof GetEvmNetworkTransactionDetailsErrors];
export type GetEvmNetworkTransactionDetailsResponses = {
/**
* Successful response
*/
200: EvmTxDetailsResponse;
};
export type GetEvmNetworkTransactionDetailsResponse = GetEvmNetworkTransactionDetailsResponses[keyof GetEvmNetworkTransactionDetailsResponses];
export type GetEvmNetworkNftMetadataData = {
body?: never;
path: {