Developer Platform API Methods
API Methods of Developer Platform
Client Methods
Client.init(config)
: Initializes the client with an API key, blockchain network (Cronos EVM or ZK EVM), and an optional provider.Client.getApiKey()
: Returns the configured API key.Client.getProvider()
: Returns the configured provider URL (if available).Client.getChainId()
: Returns the chain ID based on the configured network.
Wallet Methods
Wallet.create()
: Creates a new wallet and returns the address, private key, and mnemonic.Wallet.balance(address)
: Fetches the native token balance for a specified address.
Token Methods
Token.getNativeTokenBalance(address)
: Fetches the native token balance of a wallet address.Token.getERC20TokenBalance(address, contractAddress)
: Fetches the ERC20 token balance of a wallet for a specific contract.Token.transfer(payload)
: Sends a token transfer transaction.Token.wrap(payload)
: Sends a token wrapping transaction.Token.swap(payload)
: Sends a token swapping transaction.
Transaction Methods
Transaction.getTransactionsByAddress(address)
: Fetches transactions associated with a wallet address.Transaction.getTransactionByHash(txHash)
: Fetches transaction details by its hash.Transaction.getTransactionStatus(txHash)
: Fetches the status of a transaction by its hash.
Contract Methods
Contract.getContractABI(contractAddress)
: Fetches the ABI of a smart contract using its contract address.
Block Methods
Block.getBlockByTag(blockTag)
: Fetches block data using a block tag (e.g., 'latest', 'earliest') or block number.
Last updated