Class ThirdwebApiClient
public class ThirdwebApiClient
- Inheritance
-
ThirdwebApiClient
- Inherited Members
Constructors
ThirdwebApiClient(ThirdwebHttpClientWrapper)
public ThirdwebApiClient(ThirdwebHttpClientWrapper httpClient)
Parameters
httpClient
ThirdwebHttpClientWrapper
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(Body17)
Swap or Bridge Tokens
public virtual Task<Response42> BridgeSwapAsync(Body17 body)
Parameters
body
Body17
Returns
- Task<Response42>
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(Body17, CancellationToken)
Swap or Bridge Tokens
public virtual Task<Response42> BridgeSwapAsync(Body17 body, CancellationToken cancellationToken)
Parameters
body
Body17cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response42>
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(Body18)
Chat
public virtual Task<Response44> ChatAsync(Body18 body)
Parameters
body
Body18
Returns
- Task<Response44>
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(Body18, CancellationToken)
Chat
public virtual Task<Response44> ChatAsync(Body18 body, CancellationToken cancellationToken)
Parameters
body
Body18cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response44>
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
body
Body2
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
body
Body2cancellationToken
CancellationTokenA 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<Response41> ConvertFiatToCryptoAsync(From from, string fromAmount, int chainId, string to)
Parameters
from
FromThe fiat currency symbol
fromAmount
stringThe amount of fiat currency to convert
chainId
intThe blockchain network identifier
to
stringThe token address on the specified chain to convert to
Returns
- Task<Response41>
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<Response41> ConvertFiatToCryptoAsync(From from, string fromAmount, int chainId, string to, CancellationToken cancellationToken)
Parameters
from
FromThe fiat currency symbol
fromAmount
stringThe amount of fiat currency to convert
chainId
intThe blockchain network identifier
to
stringThe token address on the specified chain to convert to
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response41>
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(Body12)
Create Payment
public virtual Task<Response28> CreatePaymentAsync(Body12 body)
Parameters
body
Body12
Returns
- Task<Response28>
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(Body12, CancellationToken)
Create Payment
public virtual Task<Response28> CreatePaymentAsync(Body12 body, CancellationToken cancellationToken)
Parameters
body
Body12cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response28>
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(Body4)
Create Server Wallet
public virtual Task<Response7> CreateServerWalletAsync(Body4 body)
Parameters
body
Body4
Returns
- Task<Response7>
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(Body4, CancellationToken)
Create Server Wallet
public virtual Task<Response7> CreateServerWalletAsync(Body4 body, CancellationToken cancellationToken)
Parameters
body
Body4cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response7>
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.
CreateTokenAsync(Body16)
Create Token
public virtual Task<Response37> CreateTokenAsync(Body16 body)
Parameters
body
Body16
Returns
- Task<Response37>
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(Body16, CancellationToken)
Create Token
public virtual Task<Response37> CreateTokenAsync(Body16 body, CancellationToken cancellationToken)
Parameters
body
Body16cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response37>
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(Body3)
Create User Wallet
public virtual Task<Response5> CreateUserWalletAsync(Body3 body)
Parameters
body
Body3
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(Body3, CancellationToken)
Create User Wallet
public virtual Task<Response5> CreateUserWalletAsync(Body3 body, CancellationToken cancellationToken)
Parameters
body
Body3cancellationToken
CancellationTokenA 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(Body8)
Deploy Contract
public virtual Task<Response16> DeployContractAsync(Body8 body)
Parameters
body
Body8
Returns
- Task<Response16>
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(Body8, CancellationToken)
Deploy Contract
public virtual Task<Response16> DeployContractAsync(Body8 body, CancellationToken cancellationToken)
Parameters
body
Body8cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response16>
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.
FacilitatorSettleAsync(Body15)
x402 - Settle payment
public virtual Task<Response35> FacilitatorSettleAsync(Body15 body)
Parameters
body
Body15
Returns
- Task<Response35>
Settlement successful
Remarks
Settle an x402 payment. Compatible with any standard x402 middleware.
Exceptions
- ApiException
A server side error occurred.
FacilitatorSettleAsync(Body15, CancellationToken)
x402 - Settle payment
public virtual Task<Response35> FacilitatorSettleAsync(Body15 body, CancellationToken cancellationToken)
Parameters
body
Body15cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response35>
Settlement successful
Remarks
Settle an x402 payment. Compatible with any standard x402 middleware.
Exceptions
- ApiException
A server side error occurred.
FacilitatorSupportedAsync()
x402 - Supported payment methods
public virtual Task<Response36> FacilitatorSupportedAsync()
Returns
- Task<Response36>
Supported payment kinds
Remarks
List supported x402 payment methods. Compatible with any standard x402 middleware.
Exceptions
- ApiException
A server side error occurred.
FacilitatorSupportedAsync(CancellationToken)
x402 - Supported payment methods
public virtual Task<Response36> FacilitatorSupportedAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response36>
Supported payment kinds
Remarks
List supported x402 payment methods. Compatible with any standard x402 middleware.
Exceptions
- ApiException
A server side error occurred.
FacilitatorVerifyAsync(Body14)
x402 - Verify payment
public virtual Task<Response34> FacilitatorVerifyAsync(Body14 body)
Parameters
body
Body14
Returns
- Task<Response34>
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.
FacilitatorVerifyAsync(Body14, CancellationToken)
x402 - Verify payment
public virtual Task<Response34> FacilitatorVerifyAsync(Body14 body, CancellationToken cancellationToken)
Parameters
body
Body14cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response34>
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.
GetBridgeChainsAsync()
List Supported Chains
public virtual Task<Response40> GetBridgeChainsAsync()
Returns
- Task<Response40>
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<Response40> GetBridgeChainsAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response40>
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.
GetContractEventsAsync(int, string, string, string, string, string, string, int?, int?, int?, int?, double?, double?, SortOrder4?)
Get Events
public virtual Task<Response21> 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
chainId
intThe blockchain network identifier where the contract is deployed.
address
stringThe smart contract address or ENS name.
signature
stringFilter by event signature hash, e.g., '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' for Transfer event
filterTopic0
stringFilter by event topic 0 (event signature hash)
filterTopic1
stringFilter by event topic 1
filterTopic2
stringFilter by event topic 2
filterTopic3
stringFilter by event topic 3
filterBlockTimestampGte
int?Filter by block timestamp (Unix timestamp) greater than or equal to this value
filterBlockTimestampLte
int?Filter by block timestamp (Unix timestamp) less than or equal to this value
filterBlockNumberGte
int?Filter by block number greater than or equal to this value
filterBlockNumberLte
int?Filter by block number less than or equal to this value
page
double?Current page number
limit
double?Number of items per page
sortOrder
SortOrder4?Sort order: 'asc' for ascending, 'desc' for descending
Returns
- Task<Response21>
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<Response21> 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
chainId
intThe blockchain network identifier where the contract is deployed.
address
stringThe smart contract address or ENS name.
signature
stringFilter by event signature hash, e.g., '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' for Transfer event
filterTopic0
stringFilter by event topic 0 (event signature hash)
filterTopic1
stringFilter by event topic 1
filterTopic2
stringFilter by event topic 2
filterTopic3
stringFilter by event topic 3
filterBlockTimestampGte
int?Filter by block timestamp (Unix timestamp) greater than or equal to this value
filterBlockTimestampLte
int?Filter by block timestamp (Unix timestamp) less than or equal to this value
filterBlockNumberGte
int?Filter by block number greater than or equal to this value
filterBlockNumberLte
int?Filter by block number less than or equal to this value
page
double?Current page number
limit
double?Number of items per page
sortOrder
SortOrder4?Sort order: 'asc' for ascending, 'desc' for descending
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response21>
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<Response22> GetContractMetadataAsync(int chainId, string address)
Parameters
chainId
intThe blockchain network identifier where the contract is deployed.
address
stringThe smart contract address or ENS name.
Returns
- Task<Response22>
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<Response22> GetContractMetadataAsync(int chainId, string address, CancellationToken cancellationToken)
Parameters
chainId
intThe blockchain network identifier where the contract is deployed.
address
stringThe smart contract address or ENS name.
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response22>
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<Response23> GetContractSignaturesAsync(int chainId, string address)
Parameters
chainId
intThe blockchain network identifier where the contract is deployed.
address
stringThe smart contract address or ENS name.
Returns
- Task<Response23>
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<Response23> GetContractSignaturesAsync(int chainId, string address, CancellationToken cancellationToken)
Parameters
chainId
intThe blockchain network identifier where the contract is deployed.
address
stringThe smart contract address or ENS name.
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response23>
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<Response20> 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
chainId
intThe blockchain network identifier where the contract is deployed.
address
stringThe smart contract address or ENS name.
filterFromAddress
stringFilter by transaction sender address
filterToAddress
stringFilter by transaction recipient address
filterBlockTimestampGte
int?Filter by block timestamp (Unix timestamp) greater than or equal to this value
filterBlockTimestampLte
int?Filter by block timestamp (Unix timestamp) less than or equal to this value
filterBlockNumberGte
int?Filter by block number greater than or equal to this value
filterBlockNumberLte
int?Filter by block number less than or equal to this value
filterValueGt
stringFilter by transaction value (in wei) greater than this value
filterFunctionSelector
stringFilter by function selector (4-byte method ID), e.g., '0xa9059cbb' for ERC-20 transfer
page
double?Current page number
limit
double?Number of items per page
sortOrder
SortOrder3?Sort order: 'asc' for ascending, 'desc' for descending
Returns
- Task<Response20>
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<Response20> 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
chainId
intThe blockchain network identifier where the contract is deployed.
address
stringThe smart contract address or ENS name.
filterFromAddress
stringFilter by transaction sender address
filterToAddress
stringFilter by transaction recipient address
filterBlockTimestampGte
int?Filter by block timestamp (Unix timestamp) greater than or equal to this value
filterBlockTimestampLte
int?Filter by block timestamp (Unix timestamp) less than or equal to this value
filterBlockNumberGte
int?Filter by block number greater than or equal to this value
filterBlockNumberLte
int?Filter by block number less than or equal to this value
filterValueGt
stringFilter by transaction value (in wei) greater than this value
filterFunctionSelector
stringFilter by function selector (4-byte method ID), e.g., '0xa9059cbb' for ERC-20 transfer
page
double?Current page number
limit
double?Number of items per page
sortOrder
SortOrder3?Sort order: 'asc' for ascending, 'desc' for descending
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response20>
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<Response3> GetMyWalletAsync()
Returns
- Task<Response3>
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<Response3> GetMyWalletAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response3>
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<Response31> GetPaymentHistoryAsync(string id)
Parameters
id
string
Returns
- Task<Response31>
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<Response31> GetPaymentHistoryAsync(string id, CancellationToken cancellationToken)
Parameters
id
stringcancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response31>
Payment history retrieved successfully
Remarks
Get payment history for a specific payment link
Exceptions
- ApiException
A server side error occurred.
GetTokenOwnersAsync(int, string, string, int?, int?)
Get Owners
public virtual Task<Response39> GetTokenOwnersAsync(int chainId, string address, string tokenId, int? limit, int? page)
Parameters
chainId
intThe blockchain network identifier. Common values include: 1 (Ethereum), 8453 (Base), 137 (Polygon), 56 (BSC), 43114 (Avalanche), 42161 (Arbitrum), 10 (Optimism).
address
stringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
tokenId
stringOptional token ID for NFT owners. If provided, returns owners of the specific NFT token.
limit
int?Number of owners to return per page (1-100).
page
int?Page number for pagination, starting from 1.
Returns
- Task<Response39>
Token owners retrieved successfully. Returns owners with pagination information. For ERC-20 tokens,
amount
represents token balance. For NFTs,amount
represents 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<Response39> GetTokenOwnersAsync(int chainId, string address, string tokenId, int? limit, int? page, CancellationToken cancellationToken)
Parameters
chainId
intThe blockchain network identifier. Common values include: 1 (Ethereum), 8453 (Base), 137 (Polygon), 56 (BSC), 43114 (Avalanche), 42161 (Arbitrum), 10 (Optimism).
address
stringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
tokenId
stringOptional token ID for NFT owners. If provided, returns owners of the specific NFT token.
limit
int?Number of owners to return per page (1-100).
page
int?Page number for pagination, starting from 1.
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response39>
Token owners retrieved successfully. Returns owners with pagination information. For ERC-20 tokens,
amount
represents token balance. For NFTs,amount
represents 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<Response24> GetTransactionByIdAsync(string transactionId)
Parameters
transactionId
stringUnique identifier of the transaction to retrieve.
Returns
- Task<Response24>
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<Response24> GetTransactionByIdAsync(string transactionId, CancellationToken cancellationToken)
Parameters
transactionId
stringUnique identifier of the transaction to retrieve.
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response24>
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<Response8> GetWalletBalanceAsync(string address, IEnumerable<int> chainId, string tokenAddress)
Parameters
address
stringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainId
IEnumerable<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
tokenAddress
stringThe token contract address. Omit for native token (ETH, MATIC, etc.).
Returns
- Task<Response8>
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<Response8> GetWalletBalanceAsync(string address, IEnumerable<int> chainId, string tokenAddress, CancellationToken cancellationToken)
Parameters
address
stringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainId
IEnumerable<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
tokenAddress
stringThe token contract address. Omit for native token (ETH, MATIC, etc.).
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response8>
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<Response11> GetWalletNFTsAsync(string address, IEnumerable<int> chainId, IEnumerable<string> contractAddresses, int? limit, int? page)
Parameters
address
stringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainId
IEnumerable<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
contractAddresses
IEnumerable<string>NFT contract addresses to filter by. If provided, only NFTs with these addresses will be returned.
limit
int?The number of NFTs to return per chain (default: 20, max: 500).
page
int?The page number for pagination (default: 1, max: 20).
Returns
- Task<Response11>
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<Response11> GetWalletNFTsAsync(string address, IEnumerable<int> chainId, IEnumerable<string> contractAddresses, int? limit, int? page, CancellationToken cancellationToken)
Parameters
address
stringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainId
IEnumerable<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
contractAddresses
IEnumerable<string>NFT contract addresses to filter by. If provided, only NFTs with these addresses will be returned.
limit
int?The number of NFTs to return per chain (default: 20, max: 500).
page
int?The page number for pagination (default: 1, max: 20).
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response11>
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<Response10> 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
address
stringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainId
IEnumerable<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
tokenAddresses
IEnumerable<string>Token addresses to filter by. If provided, only tokens with these addresses will be returned.
limit
int?The number of tokens to return per chain (default: 20, max: 500).
page
int?The page number for pagination (default: 1, max: 20).
metadata
Metadata?Whether to include token metadata (default: true).
resolveMetadataLinks
ResolveMetadataLinks?Whether to resolve metadata links to fetch additional token information (default: true).
includeSpam
IncludeSpam?Whether to include tokens marked as spam (default: false).
includeNative
IncludeNative?Whether to include native tokens (e.g., ETH, MATIC) in the results (default: true).
sortBy
SortBy?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).
sortOrder
SortOrder2?Sort order: 'asc' for ascending, 'desc' for descending (default: desc).
includeWithoutPrice
IncludeWithoutPrice?Whether to include tokens without price data (default: true).
Returns
- Task<Response10>
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<Response10> 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
address
stringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
chainId
IEnumerable<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
tokenAddresses
IEnumerable<string>Token addresses to filter by. If provided, only tokens with these addresses will be returned.
limit
int?The number of tokens to return per chain (default: 20, max: 500).
page
int?The page number for pagination (default: 1, max: 20).
metadata
Metadata?Whether to include token metadata (default: true).
resolveMetadataLinks
ResolveMetadataLinks?Whether to resolve metadata links to fetch additional token information (default: true).
includeSpam
IncludeSpam?Whether to include tokens marked as spam (default: false).
includeNative
IncludeNative?Whether to include native tokens (e.g., ETH, MATIC) in the results (default: true).
sortBy
SortBy?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).
sortOrder
SortOrder2?Sort order: 'asc' for ascending, 'desc' for descending (default: desc).
includeWithoutPrice
IncludeWithoutPrice?Whether to include tokens without price data (default: true).
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response10>
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<Response9> 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
address
stringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
filterBlockTimestampGte
int?Filter by block timestamp (Unix timestamp) greater than or equal to this value
filterBlockTimestampLte
int?Filter by block timestamp (Unix timestamp) less than or equal to this value
filterBlockNumberGte
int?Filter by block number greater than or equal to this value
filterBlockNumberLte
int?Filter by block number less than or equal to this value
filterValueGt
stringFilter by transaction value (in wei) greater than this value
filterFunctionSelector
stringFilter by function selector (4-byte method ID), e.g., '0xa9059cbb' for ERC-20 transfer
page
double?Current page number
limit
double?Number of items per page
sortOrder
SortOrder?Sort order: 'asc' for ascending, 'desc' for descending
chainId
IEnumerable<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<Response9>
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<Response9> 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
address
stringA valid Ethereum address (0x-prefixed hex string) or ENS name (e.g., vitalik.eth).
filterBlockTimestampGte
int?Filter by block timestamp (Unix timestamp) greater than or equal to this value
filterBlockTimestampLte
int?Filter by block timestamp (Unix timestamp) less than or equal to this value
filterBlockNumberGte
int?Filter by block number greater than or equal to this value
filterBlockNumberLte
int?Filter by block number less than or equal to this value
filterValueGt
stringFilter by transaction value (in wei) greater than this value
filterFunctionSelector
stringFilter by function selector (4-byte method ID), e.g., '0xa9059cbb' for ERC-20 transfer
page
double?Current page number
limit
double?Number of items per page
sortOrder
SortOrder?Sort order: 'asc' for ascending, 'desc' for descending
chainId
IEnumerable<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
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response9>
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
body
Body
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
body
BodycancellationToken
CancellationTokenA 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.
ListContractsAsync(int?, int?)
List Contracts
public virtual Task<Response15> ListContractsAsync(int? limit, int? page)
Parameters
limit
int?The number of contracts to return (default: 20, max: 100).
page
int?The page number for pagination (default: 1).
Returns
- Task<Response15>
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<Response15> ListContractsAsync(int? limit, int? page, CancellationToken cancellationToken)
Parameters
limit
int?The number of contracts to return (default: 20, max: 100).
page
int?The page number for pagination (default: 1).
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response15>
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.
ListServerWalletsAsync(double?, double?)
List Server Wallets
public virtual Task<Response6> ListServerWalletsAsync(double? limit, double? page)
Parameters
Returns
- Task<Response6>
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<Response6> ListServerWalletsAsync(double? limit, double? page, CancellationToken cancellationToken)
Parameters
limit
double?page
double?cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response6>
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.
ListTokensAsync(int?, int?, int?, string, string, string)
List Tokens
public virtual Task<Response38> ListTokensAsync(int? limit, int? page, int? chainId, string tokenAddress, string symbol, string name)
Parameters
limit
int?Number of tokens to return per page (1-100).
page
int?Page number for pagination, starting from 1.
chainId
int?Limit tokens to a specific chain.
tokenAddress
stringGet a specific token by contract address
symbol
stringLimit tokens to a specific symbol.
name
stringLimit tokens to a specific name.
Returns
- Task<Response38>
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<Response38> ListTokensAsync(int? limit, int? page, int? chainId, string tokenAddress, string symbol, string name, CancellationToken cancellationToken)
Parameters
limit
int?Number of tokens to return per page (1-100).
page
int?Page number for pagination, starting from 1.
chainId
int?Limit tokens to a specific chain.
tokenAddress
stringGet a specific token by contract address
symbol
stringLimit tokens to a specific symbol.
name
stringLimit tokens to a specific name.
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response38>
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<Response25> ListTransactionsAsync(string from, int? limit, int? page)
Parameters
from
stringFilter transactions by sender wallet address or ENS name.
limit
int?Number of transactions to return per page (1-100).
page
int?Page number for pagination, starting from 1.
Returns
- Task<Response25>
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<Response25> ListTransactionsAsync(string from, int? limit, int? page, CancellationToken cancellationToken)
Parameters
from
stringFilter transactions by sender wallet address or ENS name.
limit
int?Number of transactions to return per page (1-100).
page
int?Page number for pagination, starting from 1.
cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response25>
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<Response4> ListUserWalletsAsync(double? limit, double? page, string email, string phone, string address, string externalWalletAddress, string id)
Parameters
limit
double?page
double?email
stringphone
stringaddress
stringexternalWalletAddress
stringid
string
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<Response4> ListUserWalletsAsync(double? limit, double? page, string email, string phone, string address, string externalWalletAddress, string id, CancellationToken cancellationToken)
Parameters
limit
double?page
double?email
stringphone
stringaddress
stringexternalWalletAddress
stringid
stringcancellationToken
CancellationTokenA 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
cancellationToken
CancellationTokenA 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(object)
MCP Server
public virtual Task<object> McpServerAsync(object body)
Parameters
body
object
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(object, CancellationToken)
MCP Server
public virtual Task<object> McpServerAsync(object body, CancellationToken cancellationToken)
Parameters
body
objectcancellationToken
CancellationTokenA 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, Body13)
Complete Payment
public virtual Task<Response29> PaymentsPurchaseAsync(string id, Body13 body)
Parameters
Returns
- Task<Response29>
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, Body13, CancellationToken)
Complete Payment
public virtual Task<Response29> PaymentsPurchaseAsync(string id, Body13 body, CancellationToken cancellationToken)
Parameters
id
stringbody
Body13cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response29>
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(Body9)
Read Contract
public virtual Task<Response17> ReadContractAsync(Body9 body)
Parameters
body
Body9
Returns
- Task<Response17>
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(Body9, CancellationToken)
Read Contract
public virtual Task<Response17> ReadContractAsync(Body9 body, CancellationToken cancellationToken)
Parameters
body
Body9cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response17>
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
response
HttpResponseMessageheaders
IReadOnlyDictionary<string, IEnumerable<string>>cancellationToken
CancellationToken
Returns
Type Parameters
T
SendTokensAsync(Body7)
Send Tokens
public virtual Task<Response14> SendTokensAsync(Body7 body)
Parameters
body
Body7
Returns
- Task<Response14>
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(Body7, CancellationToken)
Send Tokens
public virtual Task<Response14> SendTokensAsync(Body7 body, CancellationToken cancellationToken)
Parameters
body
Body7cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response14>
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(Body11)
Send Transactions
public virtual Task<Response26> SendTransactionsAsync(Body11 body)
Parameters
body
Body11
Returns
- Task<Response26>
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(Body11, CancellationToken)
Send Transactions
public virtual Task<Response26> SendTransactionsAsync(Body11 body, CancellationToken cancellationToken)
Parameters
body
Body11cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response26>
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.
SignMessageAsync(Body5)
Sign Message
public virtual Task<Response12> SignMessageAsync(Body5 body)
Parameters
body
Body5
Returns
- Task<Response12>
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(Body5, CancellationToken)
Sign Message
public virtual Task<Response12> SignMessageAsync(Body5 body, CancellationToken cancellationToken)
Parameters
body
Body5cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response12>
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.
SignTypedDataAsync(Body6)
Sign Typed Data
public virtual Task<Response13> SignTypedDataAsync(Body6 body)
Parameters
body
Body6
Returns
- Task<Response13>
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(Body6, CancellationToken)
Sign Typed Data
public virtual Task<Response13> SignTypedDataAsync(Body6 body, CancellationToken cancellationToken)
Parameters
body
Body6cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response13>
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
provider
ProviderThe OAuth provider to use
redirectUrl
UriURL to redirect the user to after OAuth completion
clientId
stringClient 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
provider
ProviderThe OAuth provider to use
redirectUrl
UriURL to redirect the user to after OAuth completion
clientId
stringClient ID (alternative to x-client-id header for standard OAuth flows)
cancellationToken
CancellationTokenA 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.
WriteContractAsync(Body10)
Write Contract
public virtual Task<Response18> WriteContractAsync(Body10 body)
Parameters
body
Body10
Returns
- Task<Response18>
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(Body10, CancellationToken)
Write Contract
public virtual Task<Response18> WriteContractAsync(Body10 body, CancellationToken cancellationToken)
Parameters
body
Body10cancellationToken
CancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<Response18>
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.