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 #
Copy https://full-testnet-rpc.kaanch.network
Kaanch Network Mainnet RPC #
Copy https://rpc.kaanch.network //not yet live
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.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": ["0xYourAccountAddress"]
}
eth_blockNumber
Description : Returns the number of the most recent block.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": "0xBlockNumberInHex"
}
eth_chainId
Description : Returns the chain ID of the current network.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": "0x16D"
}
net_version
Description : Returns the current network ID.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "net_version",
"params": [],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": "365"
}
net_listening
Description : Returns true
if the client is actively listening for network connections.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "net_listening",
"params": [],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": true
}
eth_estimateGas
Description : Estimates the gas needed to execute a transaction.
Parameters : Transaction object.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [{}],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": "0x5208"
}
eth_gasPrice
Description : Returns the current price per gas in wei.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": "0x12A05F200"
}
eth_getBalance
Description : Returns the balance of the account at the given address.
Parameters : Address, block number (optional).
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xAddress", "latest"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": "0xBalanceInHex"
}
eth_getTransactionCount
Description : Returns the number of transactions sent from an address.
Parameters : Address, block number (optional).
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": ["0xAddress", "latest"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": "0xCountInHex"
}
eth_sendRawTransaction
Description : Sends a raw transaction.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": "0xTransactionHash"
}
eth_getTransactionReceipt
Description : Returns the receipt of a transaction by transaction hash.
Parameters : Transaction hash.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0xTransactionHash"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* transaction receipt object */ }
}
eth_getTransactionByHash
Description : Returns the information about a transaction requested by transaction hash.
Parameters : Transaction hash.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0xTransactionHash"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* transaction object */ }
}
eth_getTransactionHistory
Description : Returns the transaction history for a given address.
Parameters : Address, size of the result.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "eth_getTransactionHistory",
"params": ["0xAddress", 10],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* transaction history array */ ]
}
kaanch_getTransactionHistorybycontract
Description : Returns the transaction history for a given address and contract.
Parameters : Address, contract address, size of the result.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_getTransactionHistorybycontract",
"params": ["0xAddress", "0xContractAddress", 10],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* transaction history array */ ]
}
kaanch_toptokenholder
Description : Returns the top token holders for a given contract.
Parameters : Contract ID, size of the result.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_toptokenholder",
"params": ["0xContractId", 10],
"id": 1
}
Example Response :
Copy
{
"jsonrpc": "2.0",
"id": 1,
"result": [ /* top token holders array */ ]
}
kaanch_recenttrxnbycontract
Description : Returns the recent transactions for a given contract.
Parameters : Contract address, size of the result.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_recenttrxnbycontract",
"params": ["0xContractAddress", 10],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* recent transactions array */ ]
}
kaanch_tokenDetails
Description : Returns the details of a token.
Parameters : Contract address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_tokenDetails",
"params": ["0xContractAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* token details object */ }
}
kaanch_alltokeninfo
Description : Returns the information of all tokens.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_alltokeninfo",
"params": [],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* all token info array */ ]
}
kaanch_verifiedToken
Description : Returns the verified tokens.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_verifiedToken",
"params": [],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* verified tokens array */ ]
}
kaanch_tokenSend
Description : Sends tokens.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_tokenSend",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_TokenBalance
Description : Returns the token balance of an address.
Parameters : Wallet address, contract address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_TokenBalance",
"params": ["0xWalletAddress", "0xContractAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": "0xTokenBalanceInHex"
}
kaanch_allBalance
Description : Returns the balance of all tokens for an address.
Parameters : Wallet address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_allBalance",
"params": ["0xWalletAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* all balances array */ ]
}
kaanch_Tokencheckblacklist
Description : Checks if an address is blacklisted for a token.
Parameters : Wallet address, contract address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_Tokencheckblacklist",
"params": ["0xWalletAddress", "0xContractAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* blacklist status */ }
}
kaanch_tokenCreate
Description : Creates a new token.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_tokenCreate",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_domainregister
Description : Registers a new domain.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_domainregister",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_domainsetprimaryname
Description : Sets the primary name for a domain.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_domainsetprimaryname",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_domainnameupdate
Description : Updates a domain name.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_domainnameupdate",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_Stakingdata
Description : Returns staking data for an address.
Parameters : Wallet address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_Stakingdata",
"params": ["0xWalletAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* staking data object */ }
}
kaanch_info
Description : Returns information for a wallet address.
Parameters : Wallet address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_info",
"params": ["0xWalletAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* information object */ }
}
kaanch_Validatordetails
Description : Returns the details of a validator.
Parameters : Validator address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_Validatordetails",
"params": ["0xValidatorAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* validator details object */ }
}
kaanch_Stakingdatafull
Description : Returns full staking data for an address.
Parameters : Wallet address.
Example Request :
Copy jsonCopy code{
"jsonrpc": "2.0",
"method": "kaanch_Stakingdatafull",
"params": ["0xWalletAddress"],
"id": 1
}
Example Response :
Copy jsonCopy code{
"jsonrpc": "2.0",
"id": 1,
"result": { /* full staking data object */ }
}
kaanch_blockbyValidator
Description : Returns the block count by a validator.
Parameters : Validator address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_blockbyValidator",
"params": ["0xValidatorAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* block count object */ }
}
kaanch_ValidatorEligible
Description : Checks if a validator is eligible.
Parameters : Validator address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_ValidatorEligible",
"params": ["0xValidatorAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* eligibility status */ }
}
kaanch_ValidatorCreate
Description : Creates a new validator.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_ValidatorCreate",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_stake
Description : Stakes tokens.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_stake",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_checkstakingreward
Description : Checks staking rewards.
Parameters : User address, validator address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_checkstakingreward",
"params": ["0xUserAddress", "0xValidatorAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* staking reward object */ }
}
kaanch_claimstakingreward
Description : Claims staking rewards.
Parameters : Raw transaction data, validator address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_claimstakingreward",
"params": ["0xRawTransactionData", "0xValidatorAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_unstake
Description : Unstakes tokens.
Parameters : Raw transaction data, validator address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_unstake",
"params": ["0xRawTransactionData", "0xValidatorAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_TokenbyOwner
Description : Returns the tokens owned by an address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_TokenbyOwner",
"params": ["0xAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* tokens owned array */ ]
}
kaanch_allstake
Description : Returns all stakes for an address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_allstake",
"params": ["0xAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* all stakes array */ ]
}
kaanch_contractmetadata
Description : Returns the metadata of a contract.
Parameters : Contract address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_contractmetadata",
"params": ["0xContractAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* contract metadata object */ }
}
kaanch_tokendata
Description : Returns the data of a token.
Parameters : Contract address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_tokendata",
"params": ["0xContractAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* token data object */ }
}
kaanch_Tokenaddblacklist
Description : Adds an address to the blacklist for a token.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_Tokenaddblacklist",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_Tokenremoveblacklist
Description : Removes an address from the blacklist for a token.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_Tokenremoveblacklist",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_Tokenpause
Description : Pauses a token.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_Tokenpause",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_Tokenunpause
Description : Unpauses a token.
Parameters : Raw transaction data.
Example Request :
Copy jsonCopy code{
"jsonrpc": "2.0",
"method": "kaanch_Tokenunpause",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy jsonCopy code{
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_tokenOwnershipTransfer
Description : Transfers the ownership of a token.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_tokenOwnershipTransfer",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_tokenmint
Description : Mints new tokens.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_tokenmint",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_tokenburn
Description : Burns tokens.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_tokenburn",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_validatorbyowner
Description : Returns the validator details by owner address.
Parameters : Owner address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_validatorbyowner",
"params": ["0xOwnerAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* validator details object */ }
}
kaanch_updateValidator
Description : Updates a validator.
Parameters : Raw transaction data.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_updateValidator",
"params": ["0xRawTransactionData"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
kaanch_checkbridge
Description : Checks the bridge status for an address.
Parameters : Wallet address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "kaanch_checkbridge",
"params": ["0xWalletAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* bridge status object */ }
}
exchange_cancelorder
Description : Cancels an order on the exchange.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "exchange_cancelorder",
"params": ["orderID"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
exchange_createorder
Description : Creates a new order on the exchange.
Parameters : Order object (details like asset pair, price, quantity, etc.).
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "exchange_createorder",
"params": [{ /* order details */ }],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
exchange_balance
Description : Returns the balance of a user on the exchange.
Parameters : Wallet address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "exchange_balance",
"params": ["0xWalletAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* balance object */ }
}
exchange_allopenorder
Description : Returns all open orders on the exchange.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "exchange_allopenorder",
"params": [],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* open orders array */ ]
}
exchange_tradebyassetpair
Description : Returns trades for a given asset pair.
Parameters : Asset pair (e.g., ETH/USD).
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "exchange_tradebyassetpair",
"params": ["ETH/USD"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* trades array */ ]
}
exchange_balanceclaim
Description : Claims the balance for a user on the exchange.
Parameters : Wallet address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "exchange_balanceclaim",
"params": ["0xWalletAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": { /* result object */ }
}
exchange_usertradebyassetpair
Description : Returns trades for a user by asset pair.
Parameters : Wallet address, asset pair (e.g., ETH/USD).
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "exchange_usertradebyassetpair",
"params": ["0xWalletAddress", "ETH/USD"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* user trades array */ ]
}
exchange_usertrade
Description : Returns trades for a user.
Parameters : Wallet address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "exchange_usertrade",
"params": ["0xWalletAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* user trades array */ ]
}
exchange_userallopenorder
Description : Returns all open orders for a user.
Parameters : Wallet address.
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "exchange_userallopenorder",
"params": ["0xWalletAddress"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* user open orders array */ ]
}
exchange_useropenorderbyassetPair
Description : Returns open orders for a user by asset pair.
Parameters : Wallet address, asset pair (e.g., ETH/USD).
Example Request :
Copy {
"jsonrpc": "2.0",
"method": "exchange_useropenorderbyassetPair",
"params": ["0xWalletAddress", "ETH/USD"],
"id": 1
}
Example Response :
Copy {
"jsonrpc": "2.0",
"id": 1,
"result": [ /* user open orders array */ ]
}
Last updated 5 months ago