API Documentation
This document provides detailed information on the 0xGassless API, including available functions, methods, parameters, and example code snippets. The 0xGassless API allows developers to interact seamlessly with the platform to manage gasless transactions, configure modules, and more.
Overview
The 0xGassless API is designed to facilitate integration with the 0xGassless ecosystem, enabling developers to leverage gasless transactions and other features. This API documentation covers the primary methods and their usage.
Functions and Methods
initialize
Initializes the 0xGassless SDK with the provided configuration.
Parameters:
config
(Object): Configuration object containing necessary parameters.
Example:
sendTransaction
Sends a gasless transaction through the 0xGassless network.
Parameters:
transaction
(Object): The transaction object containing the necessary details.to
(String): The recipient address.value
(String): The amount of value to send.data
(String): The data payload for the transaction.
Example:
getTransactionStatus
Retrieves the status of a specific transaction.
Parameters:
transactionHash
(String): The hash of the transaction to query.
Example:
getBalance
Fetches the balance of an account.
Parameters:
address
(String): The address of the account to query.
Example:
Parameters
Configuration Parameters
network (String): The blockchain network to use (e.g.,
base
,ropsten
).rpcUrl (String): The RPC URL for connecting to the blockchain.
bundlerUrl (String): The URL of the 0xGassless bundler service.
paymasterUrl (String): The URL of the 0xGassless Paymaster service.
privateKey (String): The private key of the account to use for signing transactions.
Transaction Parameters
to (String): The recipient address of the transaction.
value (String): The amount of value to send (in wei).
data (String): The data payload for the transaction.
Example Code Snippets
Initializing the SDK
Sending a Transaction
Checking Transaction Status
Fetching Account Balance
Additional Resources
For more detailed examples and advanced usage, refer to the 0xGassless SDK documentation.