Introduction
Guides
Components
- Appchain
- Buy
- Checkout
- Earn
- Fund
- Identity
- Mint
- <Signature />
- Swap
- Token
- <Transaction />
- Wallet
API
- Mint
- Swap
- Token
- Wallet
Utilities
- Config
- Earn
- Fund
- Identity
- Mint
- Token
- Wallet
Contribution
Types
API types
Glossary of Types in APIs.
APIError
Copy
Ask AI
type APIError = {
code: string; // The Error code
error: string; // The Error long message
message: string; // The Error short message
};
BuildPayTransactionParams
Copy
Ask AI
type BuildPayTransactionParams = {
address: Address; // The address of the wallet paying
chainId: number; // The Chain ID of the payment Network (only Base is supported)
chargeId: string; // The ID of the Commerce Charge to be paid
};
BuildPayTransactionResponse
Copy
Ask AI
type BuildPayTransactionResponse = PayTransaction | APIError;
BuildSwapTransaction
Copy
Ask AI
type BuildSwapTransaction = {
approveTransaction?: Transaction; // ERC20 approve transaction which allows token holders to authorize spending
fee: Fee; // The fee for the swap
quote: SwapQuote; // The quote for the swap
transaction: Transaction; // The object developers should pass into Wagmi's signTransaction
warning?: QuoteWarning; // The warning associated with the swap
};
BuildSwapTransactionParams
Copy
Ask AI
type BuildSwapTransactionParams = GetSwapQuoteParams & {
fromAddress: Address; // The address of the user
};
BuildSwapTransactionResponse
Copy
Ask AI
type BuildSwapTransactionResponse = BuildSwapTransaction | APIError;
GetSwapQuoteParams
Copy
Ask AI
type GetSwapQuoteParams = {
amount: string; // The amount to be swapped
amountReference?: string; // The reference amount for the swap
from: Token; // The source token for the swap
isAmountInDecimals?: boolean; // Whether the amount is in decimals
maxSlippage?: string; // The slippage of the swap
to: Token; // The destination token for the swap
useAggregator: boolean; // Whether to use a DEX aggregator
};
GetSwapQuoteResponse
Copy
Ask AI
type GetSwapQuoteResponse = SwapQuote | APIError;
GetTokensOptions
Copy
Ask AI
type GetTokensOptions = {
limit?: string; // The maximum number of tokens to return (default: 50)
page?: string; // The page number to return (default: 1)
search?: string; // A string to search for in the token name, symbol or address
};
GetTokensResponse
Copy
Ask AI
type GetTokensResponse = Token[] | APIError;
GetTokenDetailsParams
Copy
Ask AI
type GetTokenDetailsParams = {
contractAddress: Address;
tokenId?: string;
};
GetTokenDetailsResponse
Copy
Ask AI
type GetTokenDetailsResponse = TokenDetails | APIError;
GetMintDetailsParams
Copy
Ask AI
type GetMintDetailsParams = {
contractAddress: Address;
takerAddress?: Address;
tokenId?: string;
};
GetMintDetailsResponse
Copy
Ask AI
type GetMintDetailsResponse = MintDetails | APIError;
BuildMintTransactionParams
Copy
Ask AI
type BuildMintTransactionParams = {
mintAddress: Address;
takerAddress: Address;
tokenId?: string;
quantity: number;
network?: string;
};
BuildMintTransactionResponse
Copy
Ask AI
type BuildMintTransactionResponse = MintTransaction | APIError;
GetPortfoliosParams
Copy
Ask AI
type GetPortfoliosParams = {
addresses: Address[] | null | undefined;
};
GetPortfoliosResponse
Copy
Ask AI
type GetPortfoliosResponse = {
portfolios: Portfolio[];
};
Was this page helpful?
On this page
- APIError
- BuildPayTransactionParams
- BuildPayTransactionResponse
- BuildSwapTransaction
- BuildSwapTransactionParams
- BuildSwapTransactionResponse
- GetSwapQuoteParams
- GetSwapQuoteResponse
- GetTokensOptions
- GetTokensResponse
- GetTokenDetailsParams
- GetTokenDetailsResponse
- GetMintDetailsParams
- GetMintDetailsResponse
- BuildMintTransactionParams
- BuildMintTransactionResponse
- GetPortfoliosParams
- GetPortfoliosResponse
Assistant
Responses are generated using AI and may contain mistakes.