Json RPC
Kaanch Network RPC Methods Documentation
This document provides a detailed overview of the various RPC methods available in the Kaanch Network. Each method purpose, required parameters, and example request/response formats are included to help developers interact with the Kaanch Network effectively.
Documentation for RPC Methods
Kaanch Network Testnet RPC #
Kaanch Network Mainnet RPC #
General Information
Each method requires an HTTPS POST request with a JSON body following the JSON-RPC 2.0 specification. The structure of the request includes:
jsonrpc
: The version of the JSON-RPC protocol, which should be "2.0".method
: The name of the method to be invoked.params
: An array of parameters to be passed to the method.id
: A unique identifier for the request.
Methods and Usage
eth_accounts
Description: Returns a list of accounts owned by the client.
Parameters: None.
Example Request:
Example Response:
eth_blockNumber
Description: Returns the number of the most recent block.
Parameters: None.
Example Request:
Example Response:
eth_chainId
Description: Returns the chain ID of the current network.
Parameters: None.
Example Request:
Example Response:
net_version
Description: Returns the current network ID.
Parameters: None.
Example Request:
Example Response:
net_listening
Description: Returns
true
if the client is actively listening for network connections.Parameters: None.
Example Request:
Example Response:
eth_estimateGas
Description: Estimates the gas needed to execute a transaction.
Parameters: Transaction object.
Example Request:
Example Response:
eth_gasPrice
Description: Returns the current price per gas in wei.
Parameters: None.
Example Request:
Example Response:
eth_getBalance
Description: Returns the balance of the account at the given address.
Parameters: Address, block number (optional).
Example Request:
Example Response:
eth_getTransactionCount
Description: Returns the number of transactions sent from an address.
Parameters: Address, block number (optional).
Example Request:
Example Response:
eth_sendRawTransaction
Description: Sends a raw transaction.
Parameters: Raw transaction data.
Example Request:
Example Response:
eth_getTransactionReceipt
Description: Returns the receipt of a transaction by transaction hash.
Parameters: Transaction hash.
Example Request:
Example Response:
eth_getTransactionByHash
Description: Returns the information about a transaction requested by transaction hash.
Parameters: Transaction hash.
Example Request:
Example Response:
eth_getTransactionHistory
Description: Returns the transaction history for a given address.
Parameters: Address, size of the result.
Example Request:
Example Response:
kaanch_getTransactionHistorybycontract
Description: Returns the transaction history for a given address and contract.
Parameters: Address, contract address, size of the result.
Example Request:
Example Response:
kaanch_toptokenholder
Description: Returns the top token holders for a given contract.
Parameters: Contract ID, size of the result.
Example Request:
Example Response:
kaanch_recenttrxnbycontract
Description: Returns the recent transactions for a given contract.
Parameters: Contract address, size of the result.
Example Request:
Example Response:
kaanch_tokenDetails
Description: Returns the details of a token.
Parameters: Contract address.
Example Request:
Example Response:
kaanch_alltokeninfo
Description: Returns the information of all tokens.
Parameters: None.
Example Request:
Example Response:
kaanch_verifiedToken
Description: Returns the verified tokens.
Parameters: None.
Example Request:
Example Response:
kaanch_tokenSend
Description: Sends tokens.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_TokenBalance
Description: Returns the token balance of an address.
Parameters: Wallet address, contract address.
Example Request:
Example Response:
kaanch_allBalance
Description: Returns the balance of all tokens for an address.
Parameters: Wallet address.
Example Request:
Example Response:
kaanch_Tokencheckblacklist
Description: Checks if an address is blacklisted for a token.
Parameters: Wallet address, contract address.
Example Request:
Example Response:
kaanch_tokenCreate
Description: Creates a new token.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_domainregister
Description: Registers a new domain.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_domainsetprimaryname
Description: Sets the primary name for a domain.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_domainnameupdate
Description: Updates a domain name.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_Stakingdata
Description: Returns staking data for an address.
Parameters: Wallet address.
Example Request:
Example Response:
kaanch_info
Description: Returns information for a wallet address.
Parameters: Wallet address.
Example Request:
Example Response:
kaanch_Validatordetails
Description: Returns the details of a validator.
Parameters: Validator address.
Example Request:
Example Response:
kaanch_Stakingdatafull
Description: Returns full staking data for an address.
Parameters: Wallet address.
Example Request:
Example Response:
kaanch_blockbyValidator
Description: Returns the block count by a validator.
Parameters: Validator address.
Example Request:
Example Response:
kaanch_ValidatorEligible
Description: Checks if a validator is eligible.
Parameters: Validator address.
Example Request:
Example Response:
kaanch_ValidatorCreate
Description: Creates a new validator.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_stake
Description: Stakes tokens.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_checkstakingreward
Description: Checks staking rewards.
Parameters: User address, validator address.
Example Request:
Example Response:
kaanch_claimstakingreward
Description: Claims staking rewards.
Parameters: Raw transaction data, validator address.
Example Request:
Example Response:
kaanch_unstake
Description: Unstakes tokens.
Parameters: Raw transaction data, validator address.
Example Request:
Example Response:
kaanch_TokenbyOwner
Description: Returns the tokens owned by an address.
Parameters: Address.
Example Request:
Example Response:
kaanch_allstake
Description: Returns all stakes for an address.
Parameters: Address.
Example Request:
Example Response:
kaanch_contractmetadata
Description: Returns the metadata of a contract.
Parameters: Contract address.
Example Request:
Example Response:
kaanch_tokendata
Description: Returns the data of a token.
Parameters: Contract address.
Example Request:
Example Response:
kaanch_Tokenaddblacklist
Description: Adds an address to the blacklist for a token.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_Tokenremoveblacklist
Description: Removes an address from the blacklist for a token.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_Tokenpause
Description: Pauses a token.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_Tokenunpause
Description: Unpauses a token.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_tokenOwnershipTransfer
Description: Transfers the ownership of a token.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_tokenmint
Description: Mints new tokens.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_tokenburn
Description: Burns tokens.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_validatorbyowner
Description: Returns the validator details by owner address.
Parameters: Owner address.
Example Request:
Example Response:
kaanch_updateValidator
Description: Updates a validator.
Parameters: Raw transaction data.
Example Request:
Example Response:
kaanch_checkbridge
Description: Checks the bridge status for an address.
Parameters: Wallet address.
Example Request:
Example Response:
exchange_cancelorder
Description: Cancels an order on the exchange.
Parameters: Order ID.
Example Request:
Example Response:
exchange_createorder
Description: Creates a new order on the exchange.
Parameters: Order object (details like asset pair, price, quantity, etc.).
Example Request:
Example Response:
exchange_balance
Description: Returns the balance of a user on the exchange.
Parameters: Wallet address.
Example Request:
Example Response:
exchange_allopenorder
Description: Returns all open orders on the exchange.
Parameters: None.
Example Request:
Example Response:
exchange_tradebyassetpair
Description: Returns trades for a given asset pair.
Parameters: Asset pair (e.g., ETH/USD).
Example Request:
Example Response:
exchange_balanceclaim
Description: Claims the balance for a user on the exchange.
Parameters: Wallet address.
Example Request:
Example Response:
exchange_usertradebyassetpair
Description: Returns trades for a user by asset pair.
Parameters: Wallet address, asset pair (e.g., ETH/USD).
Example Request:
Example Response:
exchange_usertrade
Description: Returns trades for a user.
Parameters: Wallet address.
Example Request:
Example Response:
exchange_userallopenorder
Description: Returns all open orders for a user.
Parameters: Wallet address.
Example Request:
Example Response:
exchange_useropenorderbyassetPair
Description: Returns open orders for a user by asset pair.
Parameters: Wallet address, asset pair (e.g., ETH/USD).
Example Request:
Example Response:
Last updated