Class ThirdwebApiClient
public class ThirdwebApiClient
- Inheritance
-
ThirdwebApiClient
- Inherited Members
Constructors
ThirdwebApiClient(ThirdwebHttpClientWrapper)
public ThirdwebApiClient(ThirdwebHttpClientWrapper httpClient)
Parameters
httpClientThirdwebHttpClientWrapper
Properties
BaseUrl
public string BaseUrl { get; set; }
Property Value
JsonSerializerSettings
protected JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
- JsonSerializerSettings
ReadResponseAsString
public bool ReadResponseAsString { get; set; }
Property Value
Methods
BridgeSwapAsync(Body19)
Swap or Bridge Tokens
public virtual Task<Response47> BridgeSwapAsync(Body19 body)
Parameters
bodyBody19
Returns
- Task<Response47>
Swap completed successfully. Returns the transaction used for the swap.
Remarks
Swap one token for another using the optimal route available. You can specify a tokenIn amount (if exact='input') or tokenOut amount (if exact='output'), but not both. The corresponding output or input amount will be returned as the quote.
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.
BridgeSwapAsync(Body19, CancellationToken)
Swap or Bridge Tokens
public virtual Task<Response47> BridgeSwapAsync(Body19 body, CancellationToken cancellationToken)
Parameters
bodyBody19cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response47>
Swap completed successfully. Returns the transaction used for the swap.
Remarks
Swap one token for another using the optimal route available. You can specify a tokenIn amount (if exact='input') or tokenOut amount (if exact='output'), but not both. The corresponding output or input amount will be returned as the quote.
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.
ChatAsync(Body24)
Chat
public virtual Task<Response58> ChatAsync(Body24 body)
Parameters
bodyBody24
Returns
- Task<Response58>
AI assistant response or SSE stream when stream=true
Remarks
Thirdweb AI chat completion API (BETA).
Send natural language queries to interact with any EVM chain, read data, prepare transactions, swap tokens, deploy contracts, payments and more.
Compatible with standard OpenAI API chat completion format, can be used raw or with any popular AI library.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
ChatAsync(Body24, CancellationToken)
Chat
public virtual Task<Response58> ChatAsync(Body24 body, CancellationToken cancellationToken)
Parameters
bodyBody24cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response58>
AI assistant response or SSE stream when stream=true
Remarks
Thirdweb AI chat completion API (BETA).
Send natural language queries to interact with any EVM chain, read data, prepare transactions, swap tokens, deploy contracts, payments and more.
Compatible with standard OpenAI API chat completion format, can be used raw or with any popular AI library.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
CompleteAuthenticationAsync(Body2)
Complete Auth
public virtual Task<Response2> CompleteAuthenticationAsync(Body2 body)
Parameters
bodyBody2
Returns
Remarks
Complete the authentication flow and receive your wallet credentials. After initiating authentication, use this endpoint to submit the required verification data.
Completion Methods:
- SMS/Email - Submit the verification code you received
- Passkey - Provide the WebAuthn signature response
- SIWE - Submit your signed Ethereum message
- Guest - Create an ephemeral guest wallet
- Custom (JWT, auth-payload) - Send your JWT token or custom payload
Response:
- isNewUser - Whether this is a new wallet creation
- token - JWT token for authenticated API requests
- type - The authentication method used
- walletAddress - Your new or existing wallet address
Next step - Verify your token:
javascript <br />// Verify the token and get complete wallet details (server-side) <br />fetch('/v1/wallets/me', { <br /> headers: { <br /> 'Authorization': 'Bearer ' + token, <br /> 'x-secret-key': 'your-secret-key' <br /> } <br />}) <br />.then(response => response.json()) <br />.then(data => { <br /> console.log('Wallet verified:', data.result.address); <br /> console.log('Auth profiles:', data.result.profiles); <br />}); <br />
Authentication: Requires x-client-id header for frontend usage or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
CompleteAuthenticationAsync(Body2, CancellationToken)
Complete Auth
public virtual Task<Response2> CompleteAuthenticationAsync(Body2 body, CancellationToken cancellationToken)
Parameters
bodyBody2cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Remarks
Complete the authentication flow and receive your wallet credentials. After initiating authentication, use this endpoint to submit the required verification data.
Completion Methods:
- SMS/Email - Submit the verification code you received
- Passkey - Provide the WebAuthn signature response
- SIWE - Submit your signed Ethereum message
- Guest - Create an ephemeral guest wallet
- Custom (JWT, auth-payload) - Send your JWT token or custom payload
Response:
- isNewUser - Whether this is a new wallet creation
- token - JWT token for authenticated API requests
- type - The authentication method used
- walletAddress - Your new or existing wallet address
Next step - Verify your token:
javascript <br />// Verify the token and get complete wallet details (server-side) <br />fetch('/v1/wallets/me', { <br /> headers: { <br /> 'Authorization': 'Bearer ' + token, <br /> 'x-secret-key': 'your-secret-key' <br /> } <br />}) <br />.then(response => response.json()) <br />.then(data => { <br /> console.log('Wallet verified:', data.result.address); <br /> console.log('Auth profiles:', data.result.profiles); <br />}); <br />
Authentication: Requires x-client-id header for frontend usage or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
ConvertFiatToCryptoAsync(From, string, int, string)
Convert Fiat to Crypto
public virtual Task<Response46> ConvertFiatToCryptoAsync(From from, string fromAmount, int chainId, string to)
Parameters
fromFromThe fiat currency symbol
fromAmountstringThe amount of fiat currency to convert
chainIdintThe blockchain network identifier
tostringThe token address on the specified chain to convert to
Returns
- Task<Response46>
Conversion completed successfully. Returns the amount of crypto tokens equivalent to the specified fiat amount.
Remarks
Convert fiat currency amount to cryptocurrency token amount. Supports multiple fiat currencies based on available price data for the specific token. Returns the equivalent amount of crypto tokens for the specified fiat amount based on current market prices. If price data is not available for the requested currency, the API will return a 404 error.
Native Tokens: To get the price of native tokens (like ETH on Ethereum), use the address 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE. For example, to get the price of ETH on Ethereum Mainnet (chainId: 1), pass to=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
ConvertFiatToCryptoAsync(From, string, int, string, CancellationToken)
Convert Fiat to Crypto
public virtual Task<Response46> ConvertFiatToCryptoAsync(From from, string fromAmount, int chainId, string to, CancellationToken cancellationToken)
Parameters
fromFromThe fiat currency symbol
fromAmountstringThe amount of fiat currency to convert
chainIdintThe blockchain network identifier
tostringThe token address on the specified chain to convert to
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response46>
Conversion completed successfully. Returns the amount of crypto tokens equivalent to the specified fiat amount.
Remarks
Convert fiat currency amount to cryptocurrency token amount. Supports multiple fiat currencies based on available price data for the specific token. Returns the equivalent amount of crypto tokens for the specified fiat amount based on current market prices. If price data is not available for the requested currency, the API will return a 404 error.
Native Tokens: To get the price of native tokens (like ETH on Ethereum), use the address 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE. For example, to get the price of ETH on Ethereum Mainnet (chainId: 1), pass to=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
CreatePaymentAsync(Body14)
Create Payment
public virtual Task<Response30> CreatePaymentAsync(Body14 body)
Parameters
bodyBody14
Returns
- Task<Response30>
Payment created successfully. Returns the ID and link to complete the payment.
Remarks
Create a payment to be executed. Users can complete the payment via hosted UI (link is returned), a transaction execution referencing the product ID, or embedded widgets with the product ID.
Authentication: This endpoint requires project authentication.
Exceptions
- ApiException
A server side error occurred.
CreatePaymentAsync(Body14, CancellationToken)
Create Payment
public virtual Task<Response30> CreatePaymentAsync(Body14 body, CancellationToken cancellationToken)
Parameters
bodyBody14cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response30>
Payment created successfully. Returns the ID and link to complete the payment.
Remarks
Create a payment to be executed. Users can complete the payment via hosted UI (link is returned), a transaction execution referencing the product ID, or embedded widgets with the product ID.
Authentication: This endpoint requires project authentication.
Exceptions
- ApiException
A server side error occurred.
CreateServerWalletAsync(Body6)
Create Server Wallet
public virtual Task<Response9> CreateServerWalletAsync(Body6 body)
Parameters
bodyBody6
Returns
- Task<Response9>
Server wallet created or connected successfully. Returns wallet addresses for subsequent operations.
Remarks
Creates a server wallet from a unique identifier. If the wallet already exists, it will return the existing wallet.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
CreateServerWalletAsync(Body6, CancellationToken)
Create Server Wallet
public virtual Task<Response9> CreateServerWalletAsync(Body6 body, CancellationToken cancellationToken)
Parameters
bodyBody6cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response9>
Server wallet created or connected successfully. Returns wallet addresses for subsequent operations.
Remarks
Creates a server wallet from a unique identifier. If the wallet already exists, it will return the existing wallet.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
CreateSolanaWalletAsync(Body20)
Create Solana Wallet
public virtual Task<Response50> CreateSolanaWalletAsync(Body20 body)
Parameters
bodyBody20
Returns
- Task<Response50>
Solana wallet retrieved for the provided label.
Remarks
Create a new Solana wallet or return the existing wallet for a given label. Labels must be unique within your project.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
CreateSolanaWalletAsync(Body20, CancellationToken)
Create Solana Wallet
public virtual Task<Response50> CreateSolanaWalletAsync(Body20 body, CancellationToken cancellationToken)
Parameters
bodyBody20cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response50>
Solana wallet retrieved for the provided label.
Remarks
Create a new Solana wallet or return the existing wallet for a given label. Labels must be unique within your project.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
CreateTokenAsync(Body18)
Create Token
public virtual Task<Response41> CreateTokenAsync(Body18 body)
Parameters
bodyBody18
Returns
- Task<Response41>
The token is being deployed. Returns the predicted token address.
Remarks
Create a new ERC20 token with the provided metadata and starting price. The token is immediately available for purchase using thirdweb Payments.
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.
CreateTokenAsync(Body18, CancellationToken)
Create Token
public virtual Task<Response41> CreateTokenAsync(Body18 body, CancellationToken cancellationToken)
Parameters
bodyBody18cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response41>
The token is being deployed. Returns the predicted token address.
Remarks
Create a new ERC20 token with the provided metadata and starting price. The token is immediately available for purchase using thirdweb Payments.
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.
CreateUserWalletAsync(Body5)
Create User Wallet
public virtual Task<Response7> CreateUserWalletAsync(Body5 body)
Parameters
bodyBody5
Returns
Remarks
Create a user wallet with a wallet based on their authentication strategy. This endpoint creates a wallet in advance that can be claimed later when the user authenticates.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
CreateUserWalletAsync(Body5, CancellationToken)
Create User Wallet
public virtual Task<Response7> CreateUserWalletAsync(Body5 body, CancellationToken cancellationToken)
Parameters
bodyBody5cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Remarks
Create a user wallet with a wallet based on their authentication strategy. This endpoint creates a wallet in advance that can be claimed later when the user authenticates.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
DeployContractAsync(Body10)
Deploy Contract
public virtual Task<Response18> DeployContractAsync(Body10 body)
Parameters
bodyBody10
Returns
- Task<Response18>
Contract deployed successfully
Remarks
Deploy a new smart contract to a blockchain network using raw bytecode. This endpoint allows you to deploy contracts by providing the contract bytecode, ABI, constructor parameters, and optional salt for deterministic deployment.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
DeployContractAsync(Body10, CancellationToken)
Deploy Contract
public virtual Task<Response18> DeployContractAsync(Body10 body, CancellationToken cancellationToken)
Parameters
bodyBody10cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response18>
Contract deployed successfully
Remarks
Deploy a new smart contract to a blockchain network using raw bytecode. This endpoint allows you to deploy contracts by providing the contract bytecode, ABI, constructor parameters, and optional salt for deterministic deployment.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
FetchWithPaymentAsync(string, Uri, Method, string, string, int?, object)
x402 - Fetch with payment
public virtual Task FetchWithPaymentAsync(string from, Uri url, Method method, string maxValue, string asset, int? chainId, object body)
Parameters
Returns
- Task
Returns the final result from the API call
Remarks
Fetch any given url. If the url returns HTTP 402 payment required, this endpoint handles payment with the authenticated wallet.
Optionally pass a 'from' query parameter with the authenticated wallet address (server or user wallet) to complete the payment.
If no 'from' parameter is passed, the default project wallet address will be used.
- Works with any x402 compatible endpoint.
- Automatically selects a compatible payment method.
- Signs the appropriate payment payload.
- Sends the payment to the url.
- Returns the final result from the url called.
Request body and headers are always passed through to the url called.
Authentication: This endpoint requires wallet authentication for the payment. For frontend usage, include x-client-id and Authorization: Bearer <jwt> headers. For backend usage, include x-secret-key header.
Exceptions
- ApiException
A server side error occurred.
FetchWithPaymentAsync(string, Uri, Method, string, string, int?, object, CancellationToken)
x402 - Fetch with payment
public virtual Task FetchWithPaymentAsync(string from, Uri url, Method method, string maxValue, string asset, int? chainId, object body, CancellationToken cancellationToken)
Parameters
fromstringurlUrimethodMethodmaxValuestringassetstringchainIdint?bodyobjectcancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
Returns the final result from the API call
Remarks
Fetch any given url. If the url returns HTTP 402 payment required, this endpoint handles payment with the authenticated wallet.
Optionally pass a 'from' query parameter with the authenticated wallet address (server or user wallet) to complete the payment.
If no 'from' parameter is passed, the default project wallet address will be used.
- Works with any x402 compatible endpoint.
- Automatically selects a compatible payment method.
- Signs the appropriate payment payload.
- Sends the payment to the url.
- Returns the final result from the url called.
Request body and headers are always passed through to the url called.
Authentication: This endpoint requires wallet authentication for the payment. For frontend usage, include x-client-id and Authorization: Bearer <jwt> headers. For backend usage, include x-secret-key header.
Exceptions
- ApiException
A server side error occurred.
GetBridgeChainsAsync()
List Supported Chains
public virtual Task<Response44> GetBridgeChainsAsync()
Returns
- Task<Response44>
Successfully retrieved supported bridge chains.
Remarks
List all blockchain networks available for cross-chain bridging. Each chain includes metadata and native currency details.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetBridgeChainsAsync(CancellationToken)
List Supported Chains
public virtual Task<Response44> GetBridgeChainsAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response44>
Successfully retrieved supported bridge chains.
Remarks
List all blockchain networks available for cross-chain bridging. Each chain includes metadata and native currency details.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetBridgeSupportedRoutesAsync(int?, int?, int?, int?, string, string, int?)
List Supported Routes
public virtual Task<Response45> GetBridgeSupportedRoutesAsync(int? limit, int? page, int? originChainId, int? destinationChainId, string originTokenAddress, string destinationTokenAddress, int? maxSteps)
Parameters
limitint?Maximum number of routes to return (1-100).
pageint?Page number for pagination, starting at 1.
originChainIdint?Filter routes by the origin chain ID.
destinationChainIdint?Filter routes by the destination chain ID.
originTokenAddressstringFilter routes by origin token address.
destinationTokenAddressstringFilter routes by destination token address.
maxStepsint?Maximum number of bridge steps allowed in the route.
Returns
- Task<Response45>
Successfully retrieved supported bridge routes.
Remarks
List supported bridge routes with simple pagination and optional chain or token filters.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetBridgeSupportedRoutesAsync(int?, int?, int?, int?, string, string, int?, CancellationToken)
List Supported Routes
public virtual Task<Response45> GetBridgeSupportedRoutesAsync(int? limit, int? page, int? originChainId, int? destinationChainId, string originTokenAddress, string destinationTokenAddress, int? maxSteps, CancellationToken cancellationToken)
Parameters
limitint?Maximum number of routes to return (1-100).
pageint?Page number for pagination, starting at 1.
originChainIdint?Filter routes by the origin chain ID.
destinationChainIdint?Filter routes by the destination chain ID.
originTokenAddressstringFilter routes by origin token address.
destinationTokenAddressstringFilter routes by destination token address.
maxStepsint?Maximum number of bridge steps allowed in the route.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response45>
Successfully retrieved supported bridge routes.
Remarks
List supported bridge routes with simple pagination and optional chain or token filters.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetContractEventsAsync(int, string, string, string, string, string, string, int?, int?, int?, int?, double?, double?, SortOrder4?)
Get Events
public virtual Task<Response23> GetContractEventsAsync(int chainId, string address, string signature, string filterTopic0, string filterTopic1, string filterTopic2, string filterTopic3, int? filterBlockTimestampGte, int? filterBlockTimestampLte, int? filterBlockNumberGte, int? filterBlockNumberLte, double? page, double? limit, SortOrder4? sortOrder)
Parameters
chainIdintThe blockchain network identifier where the contract is deployed.
addressstringThe smart contract address or ENS name.
signaturestringFilter by event signature hash, e.g., '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' for Transfer event
filterTopic0stringFilter by event topic 0 (event signature hash)
filterTopic1stringFilter by event topic 1
filterTopic2stringFilter by event topic 2
filterTopic3stringFilter by event topic 3
filterBlockTimestampGteint?Filter by block timestamp (Unix timestamp) greater than or equal to this value
filterBlockTimestampLteint?Filter by block timestamp (Unix timestamp) less than or equal to this value
filterBlockNumberGteint?Filter by block number greater than or equal to this value
filterBlockNumberLteint?Filter by block number less than or equal to this value
pagedouble?Current page number
limitdouble?Number of items per page
sortOrderSortOrder4?Sort order: 'asc' for ascending, 'desc' for descending
Returns
- Task<Response23>
Contract events retrieved successfully. Returns event data with metadata including pagination information. Includes decoded event parameters when ABI is available.
Remarks
Retrieves events emitted by a specific smart contract address on a specific blockchain network. This endpoint provides comprehensive event data including block information, transaction details, event topics, and optional ABI decoding. Results can be filtered, paginated, and sorted to meet specific requirements.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetContractEventsAsync(int, string, string, string, string, string, string, int?, int?, int?, int?, double?, double?, SortOrder4?, CancellationToken)
Get Events
public virtual Task<Response23> GetContractEventsAsync(int chainId, string address, string signature, string filterTopic0, string filterTopic1, string filterTopic2, string filterTopic3, int? filterBlockTimestampGte, int? filterBlockTimestampLte, int? filterBlockNumberGte, int? filterBlockNumberLte, double? page, double? limit, SortOrder4? sortOrder, CancellationToken cancellationToken)
Parameters
chainIdintThe blockchain network identifier where the contract is deployed.
addressstringThe smart contract address or ENS name.
signaturestringFilter by event signature hash, e.g., '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' for Transfer event
filterTopic0stringFilter by event topic 0 (event signature hash)
filterTopic1stringFilter by event topic 1
filterTopic2stringFilter by event topic 2
filterTopic3stringFilter by event topic 3
filterBlockTimestampGteint?Filter by block timestamp (Unix timestamp) greater than or equal to this value
filterBlockTimestampLteint?Filter by block timestamp (Unix timestamp) less than or equal to this value
filterBlockNumberGteint?Filter by block number greater than or equal to this value
filterBlockNumberLteint?Filter by block number less than or equal to this value
pagedouble?Current page number
limitdouble?Number of items per page
sortOrderSortOrder4?Sort order: 'asc' for ascending, 'desc' for descending
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response23>
Contract events retrieved successfully. Returns event data with metadata including pagination information. Includes decoded event parameters when ABI is available.
Remarks
Retrieves events emitted by a specific smart contract address on a specific blockchain network. This endpoint provides comprehensive event data including block information, transaction details, event topics, and optional ABI decoding. Results can be filtered, paginated, and sorted to meet specific requirements.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetContractMetadataAsync(int, string)
Get Metadata
public virtual Task<Response24> GetContractMetadataAsync(int chainId, string address)
Parameters
chainIdintThe blockchain network identifier where the contract is deployed.
addressstringThe smart contract address or ENS name.
Returns
- Task<Response24>
Successfully retrieved contract metadata
Remarks
Retrieves detailed metadata for a specific smart contract from the thirdweb contract metadata service. This includes compilation information, ABI, documentation, and other contract-related metadata. Note: Source code is excluded from the response to keep it lightweight and suitable for programmatic access.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Metadata Source: The metadata is fetched from the thirdweb contract metadata service and includes detailed Solidity compilation information, contract ABI, and developer documentation.
Exceptions
- ApiException
A server side error occurred.
GetContractMetadataAsync(int, string, CancellationToken)
Get Metadata
public virtual Task<Response24> GetContractMetadataAsync(int chainId, string address, CancellationToken cancellationToken)
Parameters
chainIdintThe blockchain network identifier where the contract is deployed.
addressstringThe smart contract address or ENS name.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response24>
Successfully retrieved contract metadata
Remarks
Retrieves detailed metadata for a specific smart contract from the thirdweb contract metadata service. This includes compilation information, ABI, documentation, and other contract-related metadata. Note: Source code is excluded from the response to keep it lightweight and suitable for programmatic access.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Metadata Source: The metadata is fetched from the thirdweb contract metadata service and includes detailed Solidity compilation information, contract ABI, and developer documentation.
Exceptions
- ApiException
A server side error occurred.
GetContractSignaturesAsync(int, string)
Get Signatures
public virtual Task<Response25> GetContractSignaturesAsync(int chainId, string address)
Parameters
chainIdintThe blockchain network identifier where the contract is deployed.
addressstringThe smart contract address or ENS name.
Returns
- Task<Response25>
Successfully retrieved contract signatures
Remarks
Retrieves human-readable ABI signatures for a specific smart contract. This endpoint fetches the contract metadata from the thirdweb service, extracts the ABI, and converts it into an array of human-readable function and event signatures that can be used directly with contract interaction methods.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Usage: The returned signatures can be used directly in contract read/write operations or event filtering. Each signature follows the standard Solidity format and includes function parameters, return types, state mutability, and event indexing information.
Exceptions
- ApiException
A server side error occurred.
GetContractSignaturesAsync(int, string, CancellationToken)
Get Signatures
public virtual Task<Response25> GetContractSignaturesAsync(int chainId, string address, CancellationToken cancellationToken)
Parameters
chainIdintThe blockchain network identifier where the contract is deployed.
addressstringThe smart contract address or ENS name.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response25>
Successfully retrieved contract signatures
Remarks
Retrieves human-readable ABI signatures for a specific smart contract. This endpoint fetches the contract metadata from the thirdweb service, extracts the ABI, and converts it into an array of human-readable function and event signatures that can be used directly with contract interaction methods.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Usage: The returned signatures can be used directly in contract read/write operations or event filtering. Each signature follows the standard Solidity format and includes function parameters, return types, state mutability, and event indexing information.
Exceptions
- ApiException
A server side error occurred.
GetContractTransactionsAsync(int, string, string, string, int?, int?, int?, int?, string, string, double?, double?, SortOrder3?)
Get Transactions
public virtual Task<Response22> GetContractTransactionsAsync(int chainId, string address, string filterFromAddress, string filterToAddress, int? filterBlockTimestampGte, int? filterBlockTimestampLte, int? filterBlockNumberGte, int? filterBlockNumberLte, string filterValueGt, string filterFunctionSelector, double? page, double? limit, SortOrder3? sortOrder)
Parameters
chainIdintThe blockchain network identifier where the contract is deployed.
addressstringThe smart contract address or ENS name.
filterFromAddressstringFilter by transaction sender address
filterToAddressstringFilter by transaction recipient address
filterBlockTimestampGteint?Filter by block timestamp (Unix timestamp) greater than or equal to this value
filterBlockTimestampLteint?Filter by block timestamp (Unix timestamp) less than or equal to this value
filterBlockNumberGteint?Filter by block number greater than or equal to this value
filterBlockNumberLteint?Filter by block number less than or equal to this value
filterValueGtstringFilter by transaction value (in wei) greater than this value
filterFunctionSelectorstringFilter by function selector (4-byte method ID), e.g., '0xa9059cbb' for ERC-20 transfer
pagedouble?Current page number
limitdouble?Number of items per page
sortOrderSortOrder3?Sort order: 'asc' for ascending, 'desc' for descending
Returns
- Task<Response22>
Contract transactions retrieved successfully. Returns transaction data with metadata including pagination information. Includes decoded function calls when ABI is available.
Remarks
Retrieves transactions for a specific smart contract address on a specific blockchain network. This endpoint provides comprehensive transaction data including block information, gas details, transaction status, and function calls. Results can be filtered, paginated, and sorted to meet specific requirements.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetContractTransactionsAsync(int, string, string, string, int?, int?, int?, int?, string, string, double?, double?, SortOrder3?, CancellationToken)
Get Transactions
public virtual Task<Response22> GetContractTransactionsAsync(int chainId, string address, string filterFromAddress, string filterToAddress, int? filterBlockTimestampGte, int? filterBlockTimestampLte, int? filterBlockNumberGte, int? filterBlockNumberLte, string filterValueGt, string filterFunctionSelector, double? page, double? limit, SortOrder3? sortOrder, CancellationToken cancellationToken)
Parameters
chainIdintThe blockchain network identifier where the contract is deployed.
addressstringThe smart contract address or ENS name.
filterFromAddressstringFilter by transaction sender address
filterToAddressstringFilter by transaction recipient address
filterBlockTimestampGteint?Filter by block timestamp (Unix timestamp) greater than or equal to this value
filterBlockTimestampLteint?Filter by block timestamp (Unix timestamp) less than or equal to this value
filterBlockNumberGteint?Filter by block number greater than or equal to this value
filterBlockNumberLteint?Filter by block number less than or equal to this value
filterValueGtstringFilter by transaction value (in wei) greater than this value
filterFunctionSelectorstringFilter by function selector (4-byte method ID), e.g., '0xa9059cbb' for ERC-20 transfer
pagedouble?Current page number
limitdouble?Number of items per page
sortOrderSortOrder3?Sort order: 'asc' for ascending, 'desc' for descending
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response22>
Contract transactions retrieved successfully. Returns transaction data with metadata including pagination information. Includes decoded function calls when ABI is available.
Remarks
Retrieves transactions for a specific smart contract address on a specific blockchain network. This endpoint provides comprehensive transaction data including block information, gas details, transaction status, and function calls. Results can be filtered, paginated, and sorted to meet specific requirements.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetMyWalletAsync()
Get My Wallet
public virtual Task<Response5> GetMyWalletAsync()
Returns
- Task<Response5>
Wallet retrieved successfully. Returns comprehensive user information including wallet addresses, public key, and linked wallets.
Remarks
Retrieve the authenticated user's wallet information including wallet addresses and linked authentication wallets. This endpoint provides comprehensive user data for the currently authenticated session.
Returns:
- Primary wallet address
- Smart wallet address (if available)
- Wallet creation timestamp
- Public key in hexadecimal format (if available)
- All linked authentication profiles (email, phone, OAuth providers)
Authentication: Requires Authorization: Bearer <jwt> header with a valid user authentication token.
Exceptions
- ApiException
A server side error occurred.
GetMyWalletAsync(CancellationToken)
Get My Wallet
public virtual Task<Response5> GetMyWalletAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response5>
Wallet retrieved successfully. Returns comprehensive user information including wallet addresses, public key, and linked wallets.
Remarks
Retrieve the authenticated user's wallet information including wallet addresses and linked authentication wallets. This endpoint provides comprehensive user data for the currently authenticated session.
Returns:
- Primary wallet address
- Smart wallet address (if available)
- Wallet creation timestamp
- Public key in hexadecimal format (if available)
- All linked authentication profiles (email, phone, OAuth providers)
Authentication: Requires Authorization: Bearer <jwt> header with a valid user authentication token.
Exceptions
- ApiException
A server side error occurred.
GetPaymentHistoryAsync(string)
Get Payment History
public virtual Task<Response33> GetPaymentHistoryAsync(string id)
Parameters
idstring
Returns
- Task<Response33>
Payment history retrieved successfully
Remarks
Get payment history for a specific payment link
Exceptions
- ApiException
A server side error occurred.
GetPaymentHistoryAsync(string, CancellationToken)
Get Payment History
public virtual Task<Response33> GetPaymentHistoryAsync(string id, CancellationToken cancellationToken)
Parameters
idstringcancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response33>
Payment history retrieved successfully
Remarks
Get payment history for a specific payment link
Exceptions
- ApiException
A server side error occurred.
GetSolanaTransactionAsync(string)
Get Solana Transaction
public virtual Task<Response57> GetSolanaTransactionAsync(string transactionId)
Parameters
transactionIdstringIdentifier returned when the transaction was queued.
Returns
- Task<Response57>
Transaction status retrieved successfully.
Remarks
Retrieve the status and details of a queued Solana transaction using the identifier returned when the transaction was submitted.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
GetSolanaTransactionAsync(string, CancellationToken)
Get Solana Transaction
public virtual Task<Response57> GetSolanaTransactionAsync(string transactionId, CancellationToken cancellationToken)
Parameters
transactionIdstringIdentifier returned when the transaction was queued.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response57>
Transaction status retrieved successfully.
Remarks
Retrieve the status and details of a queued Solana transaction using the identifier returned when the transaction was submitted.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
GetTokenOwnersAsync(int, string, string, int?, int?)
Get Owners
public virtual Task<Response43> GetTokenOwnersAsync(int chainId, string address, string tokenId, int? limit, int? page)
Parameters
chainIdintThe blockchain network identifier. Common values include: 1 (Ethereum), 8453 (Base), 137 (Polygon), 56 (BSC), 43114 (Avalanche), 42161 (Arbitrum), 10 (Optimism).
addressstringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
tokenIdstringOptional token ID for NFT owners. If provided, returns owners of the specific NFT token.
limitint?Number of owners to return per page (1-100).
pageint?Page number for pagination, starting from 1.
Returns
- Task<Response43>
Token owners retrieved successfully. Returns owners with pagination information. For ERC-20 tokens,
amountrepresents token balance. For NFTs,amountrepresents quantity owned (usually '1' for ERC-721, can be >1 for ERC-1155).
Remarks
Retrieves a paginated list of owners for a given token contract on a specific chain. Supports ERC-20 tokens, ERC-721 NFTs, and ERC-1155 tokens:
- ERC-20: No tokenId provided - returns token holders with balances
- NFT Collection: No tokenId provided - returns all owners of any token in the collection
- Specific NFT: tokenId provided - returns owner(s) of that specific token ID
The token standard is automatically detected using ERC165 interface detection when needed.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetTokenOwnersAsync(int, string, string, int?, int?, CancellationToken)
Get Owners
public virtual Task<Response43> GetTokenOwnersAsync(int chainId, string address, string tokenId, int? limit, int? page, CancellationToken cancellationToken)
Parameters
chainIdintThe blockchain network identifier. Common values include: 1 (Ethereum), 8453 (Base), 137 (Polygon), 56 (BSC), 43114 (Avalanche), 42161 (Arbitrum), 10 (Optimism).
addressstringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
tokenIdstringOptional token ID for NFT owners. If provided, returns owners of the specific NFT token.
limitint?Number of owners to return per page (1-100).
pageint?Page number for pagination, starting from 1.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response43>
Token owners retrieved successfully. Returns owners with pagination information. For ERC-20 tokens,
amountrepresents token balance. For NFTs,amountrepresents quantity owned (usually '1' for ERC-721, can be >1 for ERC-1155).
Remarks
Retrieves a paginated list of owners for a given token contract on a specific chain. Supports ERC-20 tokens, ERC-721 NFTs, and ERC-1155 tokens:
- ERC-20: No tokenId provided - returns token holders with balances
- NFT Collection: No tokenId provided - returns all owners of any token in the collection
- Specific NFT: tokenId provided - returns owner(s) of that specific token ID
The token standard is automatically detected using ERC165 interface detection when needed.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetTransactionByIdAsync(string)
Get Transaction
public virtual Task<Response26> GetTransactionByIdAsync(string transactionId)
Parameters
transactionIdstringUnique identifier of the transaction to retrieve.
Returns
- Task<Response26>
Transaction details retrieved successfully. Returns comprehensive transaction information including status, blockchain details, and execution metadata.
Remarks
Retrieves detailed information about a specific transaction using its unique identifier. Returns comprehensive transaction data including execution status, blockchain details, and any associated metadata.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetTransactionByIdAsync(string, CancellationToken)
Get Transaction
public virtual Task<Response26> GetTransactionByIdAsync(string transactionId, CancellationToken cancellationToken)
Parameters
transactionIdstringUnique identifier of the transaction to retrieve.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response26>
Transaction details retrieved successfully. Returns comprehensive transaction information including status, blockchain details, and execution metadata.
Remarks
Retrieves detailed information about a specific transaction using its unique identifier. Returns comprehensive transaction data including execution status, blockchain details, and any associated metadata.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetWalletBalanceAsync(string, IEnumerable<int>, string)
Get Balance
public virtual Task<Response10> GetWalletBalanceAsync(string address, IEnumerable<int> chainId, string tokenAddress)
Parameters
addressstringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainIdIEnumerable<int>Chain ID(s) to request balance data for. You can specify multiple chain IDs by repeating the parameter, up to a maximum of 50. Example: ?chainId=1&chainId=137
tokenAddressstringThe token contract address. Omit for native token (ETH, MATIC, etc.).
Returns
- Task<Response10>
Wallet native balances retrieved successfully. Returns detailed native token balance information for each chain including token metadata and formatted values.
Remarks
Get native or ERC20 token balance for a wallet address. Can retrieve live balances for any ERC20 token on a signle chain, or native token balances across multiple chains.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetWalletBalanceAsync(string, IEnumerable<int>, string, CancellationToken)
Get Balance
public virtual Task<Response10> GetWalletBalanceAsync(string address, IEnumerable<int> chainId, string tokenAddress, CancellationToken cancellationToken)
Parameters
addressstringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainIdIEnumerable<int>Chain ID(s) to request balance data for. You can specify multiple chain IDs by repeating the parameter, up to a maximum of 50. Example: ?chainId=1&chainId=137
tokenAddressstringThe token contract address. Omit for native token (ETH, MATIC, etc.).
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response10>
Wallet native balances retrieved successfully. Returns detailed native token balance information for each chain including token metadata and formatted values.
Remarks
Get native or ERC20 token balance for a wallet address. Can retrieve live balances for any ERC20 token on a signle chain, or native token balances across multiple chains.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetWalletNFTsAsync(string, IEnumerable<int>, IEnumerable<string>, int?, int?)
Get NFTs
public virtual Task<Response13> GetWalletNFTsAsync(string address, IEnumerable<int> chainId, IEnumerable<string> contractAddresses, int? limit, int? page)
Parameters
addressstringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainIdIEnumerable<int>Chain ID(s) to request NFT data for. You can specify multiple chain IDs by repeating the parameter, up to a maximum of 50. Example: ?chainId=1&chainId=137
contractAddressesIEnumerable<string>NFT contract addresses to filter by. If provided, only NFTs with these addresses will be returned.
limitint?The number of NFTs to return per chain (default: 20, max: 500).
pageint?The page number for pagination (default: 1, max: 20).
Returns
- Task<Response13>
Wallet NFTs retrieved successfully. Returns NFT data with metadata including pagination information and chain details. Includes NFT metadata, attributes, and collection information when available.
Remarks
Retrieves NFTs for a specific wallet address across one or more blockchain networks. This endpoint provides comprehensive NFT data including metadata, attributes, and collection information. Results can be filtered by chain and paginated to meet specific requirements.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetWalletNFTsAsync(string, IEnumerable<int>, IEnumerable<string>, int?, int?, CancellationToken)
Get NFTs
public virtual Task<Response13> GetWalletNFTsAsync(string address, IEnumerable<int> chainId, IEnumerable<string> contractAddresses, int? limit, int? page, CancellationToken cancellationToken)
Parameters
addressstringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainIdIEnumerable<int>Chain ID(s) to request NFT data for. You can specify multiple chain IDs by repeating the parameter, up to a maximum of 50. Example: ?chainId=1&chainId=137
contractAddressesIEnumerable<string>NFT contract addresses to filter by. If provided, only NFTs with these addresses will be returned.
limitint?The number of NFTs to return per chain (default: 20, max: 500).
pageint?The page number for pagination (default: 1, max: 20).
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response13>
Wallet NFTs retrieved successfully. Returns NFT data with metadata including pagination information and chain details. Includes NFT metadata, attributes, and collection information when available.
Remarks
Retrieves NFTs for a specific wallet address across one or more blockchain networks. This endpoint provides comprehensive NFT data including metadata, attributes, and collection information. Results can be filtered by chain and paginated to meet specific requirements.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetWalletTokensAsync(string, IEnumerable<int>, IEnumerable<string>, int?, int?, Metadata?, ResolveMetadataLinks?, IncludeSpam?, IncludeNative?, SortBy?, SortOrder2?, IncludeWithoutPrice?)
Get Tokens
public virtual Task<Response12> GetWalletTokensAsync(string address, IEnumerable<int> chainId, IEnumerable<string> tokenAddresses, int? limit, int? page, Metadata? metadata, ResolveMetadataLinks? resolveMetadataLinks, IncludeSpam? includeSpam, IncludeNative? includeNative, SortBy? sortBy, SortOrder2? sortOrder, IncludeWithoutPrice? includeWithoutPrice)
Parameters
addressstringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainIdIEnumerable<int>Chain ID(s) to request token data for. You can specify multiple chain IDs by repeating the parameter, up to a maximum of 50. Example: ?chainId=1&chainId=137
tokenAddressesIEnumerable<string>Token addresses to filter by. If provided, only tokens with these addresses will be returned.
limitint?The number of tokens to return per chain (default: 20, max: 500).
pageint?The page number for pagination (default: 1, max: 20).
metadataMetadata?Whether to include token metadata (default: true).
resolveMetadataLinksResolveMetadataLinks?Whether to resolve metadata links to fetch additional token information (default: true).
includeSpamIncludeSpam?Whether to include tokens marked as spam (default: false).
includeNativeIncludeNative?Whether to include native tokens (e.g., ETH, MATIC) in the results (default: true).
sortBySortBy?Field to sort tokens by: 'balance' for token balance, 'token_address' for token address, 'token_price' for token price, 'usd_value' for USD value (default: usd_value).
sortOrderSortOrder2?Sort order: 'asc' for ascending, 'desc' for descending (default: desc).
includeWithoutPriceIncludeWithoutPrice?Whether to include tokens without price data (default: true).
Returns
- Task<Response12>
Wallet tokens retrieved successfully. Returns token data with metadata including pagination information and chain details. Includes token balances, metadata, and price information when available. Results are sorted by the specified criteria (default: USD value descending) and filtered according to the provided parameters.
Remarks
Retrieves token balances for a specific wallet address across one or more blockchain networks. This endpoint provides comprehensive token data including ERC-20 tokens with their balances, metadata, and price information. Results can be filtered by chain, sorted by balance or USD value, and customized to include/exclude spam tokens, native tokens, and tokens without price data. Supports pagination and metadata resolution options.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetWalletTokensAsync(string, IEnumerable<int>, IEnumerable<string>, int?, int?, Metadata?, ResolveMetadataLinks?, IncludeSpam?, IncludeNative?, SortBy?, SortOrder2?, IncludeWithoutPrice?, CancellationToken)
Get Tokens
public virtual Task<Response12> GetWalletTokensAsync(string address, IEnumerable<int> chainId, IEnumerable<string> tokenAddresses, int? limit, int? page, Metadata? metadata, ResolveMetadataLinks? resolveMetadataLinks, IncludeSpam? includeSpam, IncludeNative? includeNative, SortBy? sortBy, SortOrder2? sortOrder, IncludeWithoutPrice? includeWithoutPrice, CancellationToken cancellationToken)
Parameters
addressstringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainIdIEnumerable<int>Chain ID(s) to request token data for. You can specify multiple chain IDs by repeating the parameter, up to a maximum of 50. Example: ?chainId=1&chainId=137
tokenAddressesIEnumerable<string>Token addresses to filter by. If provided, only tokens with these addresses will be returned.
limitint?The number of tokens to return per chain (default: 20, max: 500).
pageint?The page number for pagination (default: 1, max: 20).
metadataMetadata?Whether to include token metadata (default: true).
resolveMetadataLinksResolveMetadataLinks?Whether to resolve metadata links to fetch additional token information (default: true).
includeSpamIncludeSpam?Whether to include tokens marked as spam (default: false).
includeNativeIncludeNative?Whether to include native tokens (e.g., ETH, MATIC) in the results (default: true).
sortBySortBy?Field to sort tokens by: 'balance' for token balance, 'token_address' for token address, 'token_price' for token price, 'usd_value' for USD value (default: usd_value).
sortOrderSortOrder2?Sort order: 'asc' for ascending, 'desc' for descending (default: desc).
includeWithoutPriceIncludeWithoutPrice?Whether to include tokens without price data (default: true).
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response12>
Wallet tokens retrieved successfully. Returns token data with metadata including pagination information and chain details. Includes token balances, metadata, and price information when available. Results are sorted by the specified criteria (default: USD value descending) and filtered according to the provided parameters.
Remarks
Retrieves token balances for a specific wallet address across one or more blockchain networks. This endpoint provides comprehensive token data including ERC-20 tokens with their balances, metadata, and price information. Results can be filtered by chain, sorted by balance or USD value, and customized to include/exclude spam tokens, native tokens, and tokens without price data. Supports pagination and metadata resolution options.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetWalletTransactionsAsync(string, int?, int?, int?, int?, string, string, double?, double?, SortOrder?, IEnumerable<int>)
Get Transactions
public virtual Task<Response11> GetWalletTransactionsAsync(string address, int? filterBlockTimestampGte, int? filterBlockTimestampLte, int? filterBlockNumberGte, int? filterBlockNumberLte, string filterValueGt, string filterFunctionSelector, double? page, double? limit, SortOrder? sortOrder, IEnumerable<int> chainId)
Parameters
addressstringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
filterBlockTimestampGteint?Filter by block timestamp (Unix timestamp) greater than or equal to this value
filterBlockTimestampLteint?Filter by block timestamp (Unix timestamp) less than or equal to this value
filterBlockNumberGteint?Filter by block number greater than or equal to this value
filterBlockNumberLteint?Filter by block number less than or equal to this value
filterValueGtstringFilter by transaction value (in wei) greater than this value
filterFunctionSelectorstringFilter by function selector (4-byte method ID), e.g., '0xa9059cbb' for ERC-20 transfer
pagedouble?Current page number
limitdouble?Number of items per page
sortOrderSortOrder?Sort order: 'asc' for ascending, 'desc' for descending
chainIdIEnumerable<int>Chain ID(s) to request transaction data for. You can specify multiple chain IDs by repeating the parameter, up to a maximum of 50. Example: ?chainId=1&chainId=137
Returns
- Task<Response11>
Wallet transactions retrieved successfully. Returns transaction data with metadata including pagination information and chain details. Includes decoded function calls when ABI is available.
Remarks
Retrieves transactions for a specific wallet address across one or more blockchain networks. This endpoint provides comprehensive transaction data including both incoming and outgoing transactions, with block information, gas details, transaction status, and function calls. Results can be filtered, paginated, and sorted to meet specific requirements.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
GetWalletTransactionsAsync(string, int?, int?, int?, int?, string, string, double?, double?, SortOrder?, IEnumerable<int>, CancellationToken)
Get Transactions
public virtual Task<Response11> GetWalletTransactionsAsync(string address, int? filterBlockTimestampGte, int? filterBlockTimestampLte, int? filterBlockNumberGte, int? filterBlockNumberLte, string filterValueGt, string filterFunctionSelector, double? page, double? limit, SortOrder? sortOrder, IEnumerable<int> chainId, CancellationToken cancellationToken)
Parameters
addressstringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
filterBlockTimestampGteint?Filter by block timestamp (Unix timestamp) greater than or equal to this value
filterBlockTimestampLteint?Filter by block timestamp (Unix timestamp) less than or equal to this value
filterBlockNumberGteint?Filter by block number greater than or equal to this value
filterBlockNumberLteint?Filter by block number less than or equal to this value
filterValueGtstringFilter by transaction value (in wei) greater than this value
filterFunctionSelectorstringFilter by function selector (4-byte method ID), e.g., '0xa9059cbb' for ERC-20 transfer
pagedouble?Current page number
limitdouble?Number of items per page
sortOrderSortOrder?Sort order: 'asc' for ascending, 'desc' for descending
chainIdIEnumerable<int>Chain ID(s) to request transaction data for. You can specify multiple chain IDs by repeating the parameter, up to a maximum of 50. Example: ?chainId=1&chainId=137
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response11>
Wallet transactions retrieved successfully. Returns transaction data with metadata including pagination information and chain details. Includes decoded function calls when ABI is available.
Remarks
Retrieves transactions for a specific wallet address across one or more blockchain networks. This endpoint provides comprehensive transaction data including both incoming and outgoing transactions, with block information, gas details, transaction status, and function calls. Results can be filtered, paginated, and sorted to meet specific requirements.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
InitiateAuthenticationAsync(Body)
Initiate Auth
public virtual Task<Response> InitiateAuthenticationAsync(Body body)
Parameters
bodyBody
Returns
- Task<Response>
Authentication initiated successfully. Use the returned challenge data to complete authentication.
Remarks
Start any authentication flow in one unified endpoint. This endpoint supports all authentication methods including SMS, email, OAuth, passkey, and SIWE (Sign-In with Ethereum).
Supported Methods:
- SMS - Send verification code to phone number
- Email - Send verification code to email address
- Passkey - Generate WebAuthn challenge for biometric authentication
- SIWE - Generate Sign-In with Ethereum payload
Flow:
1. Choose your authentication method
2. Provide method-specific parameters
3. Receive challenge data to complete authentication
4. Use the /complete endpoint to finish the process
OAuth:
The OAuth method uses a dedicated /auth/social endpoint instead of this one:
GET /auth/social?provider=google&redirectUrl=...
Custom (JWT, auth-payload) and Guest:
For custom authentication (JWT, auth-payload) and for guest authentication, you can skip this step and use the /auth/complete endpoint directly.
Authentication: Requires x-client-id header for frontend usage or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
InitiateAuthenticationAsync(Body, CancellationToken)
Initiate Auth
public virtual Task<Response> InitiateAuthenticationAsync(Body body, CancellationToken cancellationToken)
Parameters
bodyBodycancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response>
Authentication initiated successfully. Use the returned challenge data to complete authentication.
Remarks
Start any authentication flow in one unified endpoint. This endpoint supports all authentication methods including SMS, email, OAuth, passkey, and SIWE (Sign-In with Ethereum).
Supported Methods:
- SMS - Send verification code to phone number
- Email - Send verification code to email address
- Passkey - Generate WebAuthn challenge for biometric authentication
- SIWE - Generate Sign-In with Ethereum payload
Flow:
1. Choose your authentication method
2. Provide method-specific parameters
3. Receive challenge data to complete authentication
4. Use the /complete endpoint to finish the process
OAuth:
The OAuth method uses a dedicated /auth/social endpoint instead of this one:
GET /auth/social?provider=google&redirectUrl=...
Custom (JWT, auth-payload) and Guest:
For custom authentication (JWT, auth-payload) and for guest authentication, you can skip this step and use the /auth/complete endpoint directly.
Authentication: Requires x-client-id header for frontend usage or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
LinkAuthenticationAsync(Body3)
Link Auth
public virtual Task<Response3> LinkAuthenticationAsync(Body3 body)
Parameters
bodyBody3
Returns
- Task<Response3>
Authentication method linked successfully. The response contains the updated list of linked authentication profiles.
Remarks
Link an additional authentication method or external wallet to the currently authenticated user. Provide the authentication token from another completed login (for example, a SIWE wallet or OAuth account) and this endpoint will associate it with the user's existing wallet.
Usage:
1. Complete an authentication flow using /auth/complete to obtain the new authentication token
2. Call this endpoint with the token you want to link
3. Receive the full list of linked authentication profiles for the wallet
Authentication: Requires both client authentication (x-client-id or x-secret-key) and a wallet access token via Authorization: Bearer <jwt>.
Exceptions
- ApiException
A server side error occurred.
LinkAuthenticationAsync(Body3, CancellationToken)
Link Auth
public virtual Task<Response3> LinkAuthenticationAsync(Body3 body, CancellationToken cancellationToken)
Parameters
bodyBody3cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response3>
Authentication method linked successfully. The response contains the updated list of linked authentication profiles.
Remarks
Link an additional authentication method or external wallet to the currently authenticated user. Provide the authentication token from another completed login (for example, a SIWE wallet or OAuth account) and this endpoint will associate it with the user's existing wallet.
Usage:
1. Complete an authentication flow using /auth/complete to obtain the new authentication token
2. Call this endpoint with the token you want to link
3. Receive the full list of linked authentication profiles for the wallet
Authentication: Requires both client authentication (x-client-id or x-secret-key) and a wallet access token via Authorization: Bearer <jwt>.
Exceptions
- ApiException
A server side error occurred.
ListContractsAsync(int?, int?)
List Contracts
public virtual Task<Response17> ListContractsAsync(int? limit, int? page)
Parameters
limitint?The number of contracts to return (default: 20, max: 100).
pageint?The page number for pagination (default: 1).
Returns
- Task<Response17>
Successfully retrieved list of contracts
Remarks
Retrieves a list of all smart contracts imported by the authenticated client on the thirdweb dashboard. This endpoint provides access to contracts that have been added to your dashboard for management and interaction. Results include contract metadata, deployment information, and import timestamps.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Note: For detailed contract metadata including compilation information, ABI, and source code, use the dedicated metadata endpoint: GET /v1/contracts/{chainId}/{address}/metadata.
Exceptions
- ApiException
A server side error occurred.
ListContractsAsync(int?, int?, CancellationToken)
List Contracts
public virtual Task<Response17> ListContractsAsync(int? limit, int? page, CancellationToken cancellationToken)
Parameters
limitint?The number of contracts to return (default: 20, max: 100).
pageint?The page number for pagination (default: 1).
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response17>
Successfully retrieved list of contracts
Remarks
Retrieves a list of all smart contracts imported by the authenticated client on the thirdweb dashboard. This endpoint provides access to contracts that have been added to your dashboard for management and interaction. Results include contract metadata, deployment information, and import timestamps.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Note: For detailed contract metadata including compilation information, ABI, and source code, use the dedicated metadata endpoint: GET /v1/contracts/{chainId}/{address}/metadata.
Exceptions
- ApiException
A server side error occurred.
ListPayableServicesAsync(double?, double?, string, SortBy2?, SortOrder5?)
x402 - Discover resources
public virtual Task<Response40> ListPayableServicesAsync(double? limit, double? offset, string query, SortBy2? sortBy, SortOrder5? sortOrder)
Parameters
limitdouble?offsetdouble?querystringsortBySortBy2?sortOrderSortOrder5?
Returns
- Task<Response40>
List of discovered x402 resources
Remarks
Discover payable x402 compatible services and HTTP endpoints that can be paid for using the fetchWithPayment tool. Use this tool to browse services, APIs and endpoints to find what you need for your tasks. Each item has a resource url that you can call with the fetchWithPayment tool.Price is in the base units of the asset. For example, if the price is 1000000 and the asset is USDC (which is the default and has 6 decimals), the price is 1 USDC.Examples: if network is eip155:8453, asset is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, max amount required is 10000, resource is https://api.example.com/paid-api, then you should interpret that as "the api.example.com/paid-api service costs 0.01 USDC per call".
Exceptions
- ApiException
A server side error occurred.
ListPayableServicesAsync(double?, double?, string, SortBy2?, SortOrder5?, CancellationToken)
x402 - Discover resources
public virtual Task<Response40> ListPayableServicesAsync(double? limit, double? offset, string query, SortBy2? sortBy, SortOrder5? sortOrder, CancellationToken cancellationToken)
Parameters
limitdouble?offsetdouble?querystringsortBySortBy2?sortOrderSortOrder5?cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response40>
List of discovered x402 resources
Remarks
Discover payable x402 compatible services and HTTP endpoints that can be paid for using the fetchWithPayment tool. Use this tool to browse services, APIs and endpoints to find what you need for your tasks. Each item has a resource url that you can call with the fetchWithPayment tool.Price is in the base units of the asset. For example, if the price is 1000000 and the asset is USDC (which is the default and has 6 decimals), the price is 1 USDC.Examples: if network is eip155:8453, asset is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, max amount required is 10000, resource is https://api.example.com/paid-api, then you should interpret that as "the api.example.com/paid-api service costs 0.01 USDC per call".
Exceptions
- ApiException
A server side error occurred.
ListServerWalletsAsync(double?, double?)
List Server Wallets
public virtual Task<Response8> ListServerWalletsAsync(double? limit, double? page)
Parameters
Returns
- Task<Response8>
Returns a list of server wallet addresses, smart wallet addresses, and auth details.
Remarks
Get all server wallet details with pagination for your project.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
ListServerWalletsAsync(double?, double?, CancellationToken)
List Server Wallets
public virtual Task<Response8> ListServerWalletsAsync(double? limit, double? page, CancellationToken cancellationToken)
Parameters
limitdouble?pagedouble?cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response8>
Returns a list of server wallet addresses, smart wallet addresses, and auth details.
Remarks
Get all server wallet details with pagination for your project.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
ListSolanaWalletsAsync(int?, int?)
List Solana Wallets
public virtual Task<Response49> ListSolanaWalletsAsync(int? page, int? limit)
Parameters
pageint?Page number for paginated results. Starts at 1.
limitint?Maximum number of wallets to return per page.
Returns
- Task<Response49>
Successfully retrieved Solana wallets with pagination metadata.
Remarks
List all Solana wallets created for your project. Supports pagination with page and limit parameters.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
ListSolanaWalletsAsync(int?, int?, CancellationToken)
List Solana Wallets
public virtual Task<Response49> ListSolanaWalletsAsync(int? page, int? limit, CancellationToken cancellationToken)
Parameters
pageint?Page number for paginated results. Starts at 1.
limitint?Maximum number of wallets to return per page.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response49>
Successfully retrieved Solana wallets with pagination metadata.
Remarks
List all Solana wallets created for your project. Supports pagination with page and limit parameters.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
ListTokensAsync(int?, int?, int?, string, string, string)
List Tokens
public virtual Task<Response42> ListTokensAsync(int? limit, int? page, int? chainId, string tokenAddress, string symbol, string name)
Parameters
limitint?Number of tokens to return per page (1-100).
pageint?Page number for pagination, starting from 1.
chainIdint?Limit tokens to a specific chain.
tokenAddressstringGet a specific token by contract address
symbolstringLimit tokens to a specific symbol.
namestringLimit tokens to a specific name.
Returns
- Task<Response42>
Tokens returned successfully.
Remarks
Lists or search existing tokens based on the provided filters. Supports querying by chain ID, token address, symbol, and/or name.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
ListTokensAsync(int?, int?, int?, string, string, string, CancellationToken)
List Tokens
public virtual Task<Response42> ListTokensAsync(int? limit, int? page, int? chainId, string tokenAddress, string symbol, string name, CancellationToken cancellationToken)
Parameters
limitint?Number of tokens to return per page (1-100).
pageint?Page number for pagination, starting from 1.
chainIdint?Limit tokens to a specific chain.
tokenAddressstringGet a specific token by contract address
symbolstringLimit tokens to a specific symbol.
namestringLimit tokens to a specific name.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response42>
Tokens returned successfully.
Remarks
Lists or search existing tokens based on the provided filters. Supports querying by chain ID, token address, symbol, and/or name.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
ListTransactionsAsync(string, int?, int?)
List Transactions
public virtual Task<Response27> ListTransactionsAsync(string from, int? limit, int? page)
Parameters
fromstringFilter transactions by sender wallet address or ENS name.
limitint?Number of transactions to return per page (1-100).
pageint?Page number for pagination, starting from 1.
Returns
- Task<Response27>
Transactions retrieved successfully. Returns a paginated list of transactions with metadata including creation and confirmation timestamps.
Remarks
Retrieves a paginated list of transactions associated with the authenticated client. Results are sorted by creation date in descending order (most recent first). Supports filtering by wallet address and pagination controls.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
ListTransactionsAsync(string, int?, int?, CancellationToken)
List Transactions
public virtual Task<Response27> ListTransactionsAsync(string from, int? limit, int? page, CancellationToken cancellationToken)
Parameters
fromstringFilter transactions by sender wallet address or ENS name.
limitint?Number of transactions to return per page (1-100).
pageint?Page number for pagination, starting from 1.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response27>
Transactions retrieved successfully. Returns a paginated list of transactions with metadata including creation and confirmation timestamps.
Remarks
Retrieves a paginated list of transactions associated with the authenticated client. Results are sorted by creation date in descending order (most recent first). Supports filtering by wallet address and pagination controls.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
ListUserWalletsAsync(double?, double?, string, string, string, string, string)
List User Wallets
public virtual Task<Response6> ListUserWalletsAsync(double? limit, double? page, string email, string phone, string address, string externalWalletAddress, string id)
Parameters
limitdouble?pagedouble?emailstringphonestringaddressstringexternalWalletAddressstringidstring
Returns
Remarks
Get all user wallet details with filtering and pagination for your project.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
ListUserWalletsAsync(double?, double?, string, string, string, string, string, CancellationToken)
List User Wallets
public virtual Task<Response6> ListUserWalletsAsync(double? limit, double? page, string email, string phone, string address, string externalWalletAddress, string id, CancellationToken cancellationToken)
Parameters
limitdouble?pagedouble?emailstringphonestringaddressstringexternalWalletAddressstringidstringcancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Remarks
Get all user wallet details with filtering and pagination for your project.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
LlmsTxtAsync()
llms.txt
public virtual Task<string> LlmsTxtAsync()
Returns
Remarks
The full openAPI reference for the thirdweb API in LLMs.txt format. Useful for AI assistants to understand the API and its capabilities. No authentication is required. Copy paste the contents of https://api.thirdweb.com/llms.txt into your source code to make your AI assistant understand the API and its capabilities.
Exceptions
- ApiException
A server side error occurred.
LlmsTxtAsync(CancellationToken)
llms.txt
public virtual Task<string> LlmsTxtAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Remarks
The full openAPI reference for the thirdweb API in LLMs.txt format. Useful for AI assistants to understand the API and its capabilities. No authentication is required. Copy paste the contents of https://api.thirdweb.com/llms.txt into your source code to make your AI assistant understand the API and its capabilities.
Exceptions
- ApiException
A server side error occurred.
McpServerAsync(string, object)
MCP Server
public virtual Task<object> McpServerAsync(string tools, object body)
Parameters
toolsstringComma-separated list of tools to request. Maps to the operationId of the OpenAPI endpoint. Example: ?tools=getWalletBalance,fetchWithPayment. If not provided, all tools will be returned.
bodyobject
Returns
Remarks
Model Context Protocol (MCP) server endpoint that exposes all thirdweb API endpoints as MCP tools. This allows LLMs and AI assistants to interact with the thirdweb API through the standardized MCP protocol.
Add this MCP server to any MCP client:
json <br />{ <br /> "mcpServers": { <br /> "thirdweb-api": { <br /> "url": "https://api.thirdweb.com/mcp?secretKey=YOUR_SECRET_KEY_HERE" <br /> } <br /> } <br />} <br />
Exceptions
- ApiException
A server side error occurred.
McpServerAsync(string, object, CancellationToken)
MCP Server
public virtual Task<object> McpServerAsync(string tools, object body, CancellationToken cancellationToken)
Parameters
toolsstringComma-separated list of tools to request. Maps to the operationId of the OpenAPI endpoint. Example: ?tools=getWalletBalance,fetchWithPayment. If not provided, all tools will be returned.
bodyobjectcancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Remarks
Model Context Protocol (MCP) server endpoint that exposes all thirdweb API endpoints as MCP tools. This allows LLMs and AI assistants to interact with the thirdweb API through the standardized MCP protocol.
Add this MCP server to any MCP client:
json <br />{ <br /> "mcpServers": { <br /> "thirdweb-api": { <br /> "url": "https://api.thirdweb.com/mcp?secretKey=YOUR_SECRET_KEY_HERE" <br /> } <br /> } <br />} <br />
Exceptions
- ApiException
A server side error occurred.
PaymentsPurchaseAsync(string, Body15)
Complete Payment
public virtual Task<Response31> PaymentsPurchaseAsync(string id, Body15 body)
Parameters
Returns
- Task<Response31>
Product purchased successfully. Returns the transaction used for the purchase.
Remarks
Completes a payment using its default token and amount. If the user does not have sufficient funds in the product's default payment token a 402 status will be returned containing a link and raw quote for purchase fulfillment.
Authentication: This endpoint requires project authentication.
Exceptions
- ApiException
A server side error occurred.
PaymentsPurchaseAsync(string, Body15, CancellationToken)
Complete Payment
public virtual Task<Response31> PaymentsPurchaseAsync(string id, Body15 body, CancellationToken cancellationToken)
Parameters
idstringbodyBody15cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response31>
Product purchased successfully. Returns the transaction used for the purchase.
Remarks
Completes a payment using its default token and amount. If the user does not have sufficient funds in the product's default payment token a 402 status will be returned containing a link and raw quote for purchase fulfillment.
Authentication: This endpoint requires project authentication.
Exceptions
- ApiException
A server side error occurred.
ReadContractAsync(Body11)
Read Contract
public virtual Task<Response19> ReadContractAsync(Body11 body)
Parameters
bodyBody11
Returns
- Task<Response19>
Contract read operations completed successfully. Returns an array of results corresponding to each input call, including both successful and failed operations.
Remarks
Executes multiple read-only contract method calls in a single batch request. This endpoint allows efficient batch reading from multiple contracts on the same chain, significantly reducing the number of HTTP requests needed. Each call specifies the contract address, method signature, and optional parameters. Results are returned in the same order as the input calls, with individual success/failure status for each operation.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
ReadContractAsync(Body11, CancellationToken)
Read Contract
public virtual Task<Response19> ReadContractAsync(Body11 body, CancellationToken cancellationToken)
Parameters
bodyBody11cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response19>
Contract read operations completed successfully. Returns an array of results corresponding to each input call, including both successful and failed operations.
Remarks
Executes multiple read-only contract method calls in a single batch request. This endpoint allows efficient batch reading from multiple contracts on the same chain, significantly reducing the number of HTTP requests needed. Each call specifies the contract address, method signature, and optional parameters. Results are returned in the same order as the input calls, with individual success/failure status for each operation.
Authentication: Pass x-client-id header for frontend usage from allowlisted origins or x-secret-key for backend usage.
Exceptions
- ApiException
A server side error occurred.
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
protected virtual Task<ThirdwebApiClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T
SendSolanaTokensAsync(Body22)
Send Solana Tokens
public virtual Task<Response53> SendSolanaTokensAsync(Body22 body)
Parameters
bodyBody22
Returns
- Task<Response53>
Transfer queued successfully. Returns the transaction identifier for status polling.
Remarks
Transfer native SOL or SPL tokens on Solana. Automatically handles token account creation for SPL tokens if needed.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
SendSolanaTokensAsync(Body22, CancellationToken)
Send Solana Tokens
public virtual Task<Response53> SendSolanaTokensAsync(Body22 body, CancellationToken cancellationToken)
Parameters
bodyBody22cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response53>
Transfer queued successfully. Returns the transaction identifier for status polling.
Remarks
Transfer native SOL or SPL tokens on Solana. Automatically handles token account creation for SPL tokens if needed.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
SendSolanaTransactionAsync(Body23)
Send Solana Transaction
public virtual Task<Response55> SendSolanaTransactionAsync(Body23 body)
Parameters
bodyBody23
Returns
- Task<Response55>
Transaction queued successfully. Returns the transaction identifier for status polling.
Remarks
Submit a Solana transaction composed of one or more instructions. Transactions are queued and processed asynchronously.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
SendSolanaTransactionAsync(Body23, CancellationToken)
Send Solana Transaction
public virtual Task<Response55> SendSolanaTransactionAsync(Body23 body, CancellationToken cancellationToken)
Parameters
bodyBody23cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response55>
Transaction queued successfully. Returns the transaction identifier for status polling.
Remarks
Submit a Solana transaction composed of one or more instructions. Transactions are queued and processed asynchronously.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
SendTokensAsync(Body9)
Send Tokens
public virtual Task<Response16> SendTokensAsync(Body9 body)
Parameters
bodyBody9
Returns
- Task<Response16>
Tokens sent successfully. Returns transaction IDs for tracking and monitoring.
Remarks
Send tokens to multiple recipients in a single transaction batch. Supports native tokens (ETH, MATIC, etc.), ERC20 tokens, ERC721 NFTs, and ERC1155 tokens. The token type is automatically determined based on the provided parameters and ERC165 interface detection:
- Native Token: No tokenAddress provided
- ERC20: tokenAddress provided, no tokenId
- ERC721/ERC1155: tokenAddress and tokenId provided. Auto detects contract type:
- ERC721: quantity must be '1'
- ERC1155: any quantity allowed (including '1')
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.
SendTokensAsync(Body9, CancellationToken)
Send Tokens
public virtual Task<Response16> SendTokensAsync(Body9 body, CancellationToken cancellationToken)
Parameters
bodyBody9cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response16>
Tokens sent successfully. Returns transaction IDs for tracking and monitoring.
Remarks
Send tokens to multiple recipients in a single transaction batch. Supports native tokens (ETH, MATIC, etc.), ERC20 tokens, ERC721 NFTs, and ERC1155 tokens. The token type is automatically determined based on the provided parameters and ERC165 interface detection:
- Native Token: No tokenAddress provided
- ERC20: tokenAddress provided, no tokenId
- ERC721/ERC1155: tokenAddress and tokenId provided. Auto detects contract type:
- ERC721: quantity must be '1'
- ERC1155: any quantity allowed (including '1')
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.
SendTransactionsAsync(Body13)
Send Transactions
public virtual Task<Response28> SendTransactionsAsync(Body13 body)
Parameters
bodyBody13
Returns
- Task<Response28>
Encoded transactions submitted successfully. Returns the transaction IDs for tracking and monitoring.
Remarks
Submits pre-encoded blockchain transactions with custom data payloads. This endpoint is for low-level transaction submission where you have already encoded the transaction data. For smart contract method calls, use /v1/contracts/write. For native token transfers, use /v1/wallets/send.
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.
SendTransactionsAsync(Body13, CancellationToken)
Send Transactions
public virtual Task<Response28> SendTransactionsAsync(Body13 body, CancellationToken cancellationToken)
Parameters
bodyBody13cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response28>
Encoded transactions submitted successfully. Returns the transaction IDs for tracking and monitoring.
Remarks
Submits pre-encoded blockchain transactions with custom data payloads. This endpoint is for low-level transaction submission where you have already encoded the transaction data. For smart contract method calls, use /v1/contracts/write. For native token transfers, use /v1/wallets/send.
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.
SettleX402PaymentAsync(Body17)
x402 - Settle payment
public virtual Task<Response37> SettleX402PaymentAsync(Body17 body)
Parameters
bodyBody17
Returns
- Task<Response37>
Settlement successful
Remarks
Settle an x402 payment. Compatible with any standard x402 middleware.
Exceptions
- ApiException
A server side error occurred.
SettleX402PaymentAsync(Body17, CancellationToken)
x402 - Settle payment
public virtual Task<Response37> SettleX402PaymentAsync(Body17 body, CancellationToken cancellationToken)
Parameters
bodyBody17cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response37>
Settlement successful
Remarks
Settle an x402 payment. Compatible with any standard x402 middleware.
Exceptions
- ApiException
A server side error occurred.
SignMessageAsync(Body7)
Sign Message
public virtual Task<Response14> SignMessageAsync(Body7 body)
Parameters
bodyBody7
Returns
- Task<Response14>
Message signed successfully. Returns the cryptographic signature that can be used for verification.
Remarks
Signs an arbitrary message using the specified wallet. This endpoint supports both text and hexadecimal message formats. The signing is performed using thirdweb Engine with smart wallet support for gasless transactions.
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.
SignMessageAsync(Body7, CancellationToken)
Sign Message
public virtual Task<Response14> SignMessageAsync(Body7 body, CancellationToken cancellationToken)
Parameters
bodyBody7cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response14>
Message signed successfully. Returns the cryptographic signature that can be used for verification.
Remarks
Signs an arbitrary message using the specified wallet. This endpoint supports both text and hexadecimal message formats. The signing is performed using thirdweb Engine with smart wallet support for gasless transactions.
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.
SignSolanaMessageAsync(Body21)
Sign Solana Message
public virtual Task<Response52> SignSolanaMessageAsync(Body21 body)
Parameters
bodyBody21
Returns
- Task<Response52>
Message signed successfully. Returns the base58 signature.
Remarks
Sign an arbitrary message with a Solana wallet. Supports both text and hexadecimal message formats with automatic format detection.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
SignSolanaMessageAsync(Body21, CancellationToken)
Sign Solana Message
public virtual Task<Response52> SignSolanaMessageAsync(Body21 body, CancellationToken cancellationToken)
Parameters
bodyBody21cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response52>
Message signed successfully. Returns the base58 signature.
Remarks
Sign an arbitrary message with a Solana wallet. Supports both text and hexadecimal message formats with automatic format detection.
Authentication: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly.
Exceptions
- ApiException
A server side error occurred.
SignTypedDataAsync(Body8)
Sign Typed Data
public virtual Task<Response15> SignTypedDataAsync(Body8 body)
Parameters
bodyBody8
Returns
- Task<Response15>
Typed data signed successfully. Returns the EIP-712 compliant signature that can be used for on-chain verification.
Remarks
Signs structured data according to the EIP-712 standard using the specified wallet. This is commonly used for secure message signing in DeFi protocols, NFT marketplaces, and other dApps that require structured data verification. The typed data includes domain separation and type definitions for enhanced security.
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.
SignTypedDataAsync(Body8, CancellationToken)
Sign Typed Data
public virtual Task<Response15> SignTypedDataAsync(Body8 body, CancellationToken cancellationToken)
Parameters
bodyBody8cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response15>
Typed data signed successfully. Returns the EIP-712 compliant signature that can be used for on-chain verification.
Remarks
Signs structured data according to the EIP-712 standard using the specified wallet. This is commonly used for secure message signing in DeFi protocols, NFT marketplaces, and other dApps that require structured data verification. The typed data includes domain separation and type definitions for enhanced security.
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.
SocialAuthenticationAsync(Provider, Uri, string)
Social Auth
public virtual Task SocialAuthenticationAsync(Provider provider, Uri redirectUrl, string clientId)
Parameters
providerProviderThe OAuth provider to use
redirectUrlUriURL to redirect the user to after OAuth completion
clientIdstringClient ID (alternative to x-client-id header for standard OAuth flows)
Returns
Remarks
Complete OAuth authentication with social providers in a single step. Unlike other auth methods that require separate initiate/complete calls, OAuth is handled entirely through redirects.
OAuth Flow (Self-Contained):
1. Redirect your user to this endpoint with provider and redirectUrl
2. User completes OAuth flow with the provider
3. User is redirected back to your redirectUrl with wallet credentials
Why OAuth is different: OAuth providers handle the challenge/response flow externally, so no separate /complete step is needed.
Example:
Redirect user to: GET /v1/auth/social?provider=google&redirectUrl=https://myapp.com/auth/callback
Callback Handling:
After OAuth completion, user arrives at your redirectUrl with an authResult query parameter:
<br />https://myapp.com/auth/callback?authResult=%7B%22storedToken%22%3A%7B%22authDetails%22%3A%7B...%7D%2C%22cookieString%22%3A%22eyJ...%22%7D%7D <br />
Extract JWT token in your callback:
javascript <br />// Parse the authResult from URL <br />const urlParams = new URLSearchParams(window.location.search); <br />const authResultString = urlParams.get('authResult'); <br />const authResult = JSON.parse(authResultString!); <br /> <br />// Extract the JWT token <br />const token = authResult.storedToken.cookieString; <br />
Verify and use the JWT token:
javascript <br />// Use the JWT token for authenticated requests <br />fetch('/v1/wallets/me', { <br /> headers: { <br /> 'Authorization': 'Bearer ' + token, <br /> 'x-secret-key': 'your-secret-key' <br /> } <br />}) <br />.then(response => response.json()) <br />.then(data => { <br /> console.log('Wallet verified:', data.result.address); <br /> console.log('Auth profiles:', data.result.profiles); <br />}); <br />
Authentication Options:
Choose one of two ways to provide your client credentials:
Option 1: Query Parameter (Recommended for OAuth flows)
<br />GET /v1/auth/social?provider=google&redirectUrl=https://myapp.com/callback&clientId=your_client_id <br />
Option 2: Header (Alternative)
<br />GET /v1/auth/social?provider=google&redirectUrl=https://myapp.com/callback <br />Headers: x-client-id: your_client_id <br />
Exceptions
- ApiException
A server side error occurred.
SocialAuthenticationAsync(Provider, Uri, string, CancellationToken)
Social Auth
public virtual Task SocialAuthenticationAsync(Provider provider, Uri redirectUrl, string clientId, CancellationToken cancellationToken)
Parameters
providerProviderThe OAuth provider to use
redirectUrlUriURL to redirect the user to after OAuth completion
clientIdstringClient ID (alternative to x-client-id header for standard OAuth flows)
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Remarks
Complete OAuth authentication with social providers in a single step. Unlike other auth methods that require separate initiate/complete calls, OAuth is handled entirely through redirects.
OAuth Flow (Self-Contained):
1. Redirect your user to this endpoint with provider and redirectUrl
2. User completes OAuth flow with the provider
3. User is redirected back to your redirectUrl with wallet credentials
Why OAuth is different: OAuth providers handle the challenge/response flow externally, so no separate /complete step is needed.
Example:
Redirect user to: GET /v1/auth/social?provider=google&redirectUrl=https://myapp.com/auth/callback
Callback Handling:
After OAuth completion, user arrives at your redirectUrl with an authResult query parameter:
<br />https://myapp.com/auth/callback?authResult=%7B%22storedToken%22%3A%7B%22authDetails%22%3A%7B...%7D%2C%22cookieString%22%3A%22eyJ...%22%7D%7D <br />
Extract JWT token in your callback:
javascript <br />// Parse the authResult from URL <br />const urlParams = new URLSearchParams(window.location.search); <br />const authResultString = urlParams.get('authResult'); <br />const authResult = JSON.parse(authResultString!); <br /> <br />// Extract the JWT token <br />const token = authResult.storedToken.cookieString; <br />
Verify and use the JWT token:
javascript <br />// Use the JWT token for authenticated requests <br />fetch('/v1/wallets/me', { <br /> headers: { <br /> 'Authorization': 'Bearer ' + token, <br /> 'x-secret-key': 'your-secret-key' <br /> } <br />}) <br />.then(response => response.json()) <br />.then(data => { <br /> console.log('Wallet verified:', data.result.address); <br /> console.log('Auth profiles:', data.result.profiles); <br />}); <br />
Authentication Options:
Choose one of two ways to provide your client credentials:
Option 1: Query Parameter (Recommended for OAuth flows)
<br />GET /v1/auth/social?provider=google&redirectUrl=https://myapp.com/callback&clientId=your_client_id <br />
Option 2: Header (Alternative)
<br />GET /v1/auth/social?provider=google&redirectUrl=https://myapp.com/callback <br />Headers: x-client-id: your_client_id <br />
Exceptions
- ApiException
A server side error occurred.
SupportedX402PaymentsAsync(string, int?)
x402 - Supported payment methods
public virtual Task<Response38> SupportedX402PaymentsAsync(string tokenAddress, int? chainId)
Parameters
tokenAddressstringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainIdint?The blockchain network identifier. Common values include: 1 (Ethereum), 8453 (Base), 137 (Polygon), 56 (BSC), 43114 (Avalanche), 42161 (Arbitrum), 10 (Optimism).
Returns
- Task<Response38>
Supported payment kinds
Remarks
List supported x402 payment methods, optionally filtered by token address and chainId. Compatible with any standard x402 middleware.
Exceptions
- ApiException
A server side error occurred.
SupportedX402PaymentsAsync(string, int?, CancellationToken)
x402 - Supported payment methods
public virtual Task<Response38> SupportedX402PaymentsAsync(string tokenAddress, int? chainId, CancellationToken cancellationToken)
Parameters
tokenAddressstringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainIdint?The blockchain network identifier. Common values include: 1 (Ethereum), 8453 (Base), 137 (Polygon), 56 (BSC), 43114 (Avalanche), 42161 (Arbitrum), 10 (Optimism).
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response38>
Supported payment kinds
Remarks
List supported x402 payment methods, optionally filtered by token address and chainId. Compatible with any standard x402 middleware.
Exceptions
- ApiException
A server side error occurred.
UnlinkAuthenticationAsync(Body4)
Unlink Auth
public virtual Task<Response4> UnlinkAuthenticationAsync(Body4 body)
Parameters
bodyBody4
Returns
- Task<Response4>
Authentication method unlinked successfully. The response contains the updated list of linked authentication profiles.
Remarks
Disconnect an authentication method or external wallet from the currently authenticated user. Provide the identifiers for the provider you want to remove (for example, an email address or wallet address) and this endpoint will detach it from the user's account.
Usage:
1. Choose the provider type you want to disconnect (email, phone, siwe, oauth, etc.)
2. Supply the provider-specific identifiers in the request body
3. Receive the updated list of linked authentication profiles
Authentication: Requires both client authentication (x-client-id or x-secret-key) and a wallet access token via Authorization: Bearer <jwt>.
Exceptions
- ApiException
A server side error occurred.
UnlinkAuthenticationAsync(Body4, CancellationToken)
Unlink Auth
public virtual Task<Response4> UnlinkAuthenticationAsync(Body4 body, CancellationToken cancellationToken)
Parameters
bodyBody4cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response4>
Authentication method unlinked successfully. The response contains the updated list of linked authentication profiles.
Remarks
Disconnect an authentication method or external wallet from the currently authenticated user. Provide the identifiers for the provider you want to remove (for example, an email address or wallet address) and this endpoint will detach it from the user's account.
Usage:
1. Choose the provider type you want to disconnect (email, phone, siwe, oauth, etc.)
2. Supply the provider-specific identifiers in the request body
3. Receive the updated list of linked authentication profiles
Authentication: Requires both client authentication (x-client-id or x-secret-key) and a wallet access token via Authorization: Bearer <jwt>.
Exceptions
- ApiException
A server side error occurred.
VerifyX402PaymentAsync(Body16)
x402 - Verify payment
public virtual Task<Response36> VerifyX402PaymentAsync(Body16 body)
Parameters
bodyBody16
Returns
- Task<Response36>
Verification successful
Remarks
Verify an x402 payment payload against the provided payment requirements. Compatible with any standard x402 middleware.
Exceptions
- ApiException
A server side error occurred.
VerifyX402PaymentAsync(Body16, CancellationToken)
x402 - Verify payment
public virtual Task<Response36> VerifyX402PaymentAsync(Body16 body, CancellationToken cancellationToken)
Parameters
bodyBody16cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response36>
Verification successful
Remarks
Verify an x402 payment payload against the provided payment requirements. Compatible with any standard x402 middleware.
Exceptions
- ApiException
A server side error occurred.
WriteContractAsync(Body12)
Write Contract
public virtual Task<Response20> WriteContractAsync(Body12 body)
Parameters
bodyBody12
Returns
- Task<Response20>
Contract write operations submitted successfully. Returns transaction IDs for tracking and monitoring.
Remarks
Executes write operations (transactions) on smart contracts. This is a convenience endpoint that simplifies contract interaction by accepting method signatures and parameters directly, without requiring manual transaction encoding. All calls are executed against the same contract address and chain, making it ideal for batch operations.
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.
WriteContractAsync(Body12, CancellationToken)
Write Contract
public virtual Task<Response20> WriteContractAsync(Body12 body, CancellationToken cancellationToken)
Parameters
bodyBody12cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response20>
Contract write operations submitted successfully. Returns transaction IDs for tracking and monitoring.
Remarks
Executes write operations (transactions) on smart contracts. This is a convenience endpoint that simplifies contract interaction by accepting method signatures and parameters directly, without requiring manual transaction encoding. All calls are executed against the same contract address and chain, making it ideal for batch operations.
Authentication: This endpoint requires project authentication and wallet authentication. For backend usage, use x-secret-key header. For frontend usage, use x-client-id + Authorization: Bearer <jwt> headers.
Exceptions
- ApiException
A server side error occurred.