Endpoint
All JSON-RPC calls use a single POST endpoint.
| Network | URL |
|---|
| Testnet | https://api.test.stablenet.network |
Every request follows the JSON-RPC 2.0 envelope:
{
"jsonrpc": "2.0",
"method": "<method_name>",
"params": [...],
"id": 1
}
Namespaces
| Namespace | Purpose | Public RPC |
|---|
eth | Blocks, transactions, state, gas | ✅ |
net | Network info | ✅ |
web3 | Utilities | ✅ |
txpool | Transaction pool inspection | ✅ |
istanbul | WBFT consensus validators | ✅ |
debug | Tracing, diagnostics | Node operators only |
personal | Account management | Disabled on public RPC |
admin | Node management | Disabled on public RPC |
eth Namespace
eth_blockNumber
Returns the current block number.
curl -X POST https://api.test.stablenet.network \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'
import { JsonRpcProvider } from "ethers";
const provider = new JsonRpcProvider("https://api.test.stablenet.network");
const blockNumber = await provider.getBlockNumber();
console.log(blockNumber);
import { createPublicClient, http } from "viem";
const client = createPublicClient({
transport: http("https://api.test.stablenet.network"),
});
const blockNumber = await client.getBlockNumber();
Response
{ "jsonrpc": "2.0", "id": 1, "result": "0x132d3" }
eth_getBalance
Returns the KRC balance of an account in wei.
Parameters
| # | Type | Description |
|---|
| 1 | address | Account address |
| 2 | BlockTag | "latest", "earliest", "pending", or block number (hex) |
curl -X POST https://api.test.stablenet.network \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xYourAddress", "latest"],
"id": 1
}'
const balance = await provider.getBalance("0xYourAddress");
console.log(ethers.formatEther(balance)); // in KRC
const balance = await client.getBalance({
address: "0xYourAddress",
});
Response
{ "jsonrpc": "2.0", "id": 1, "result": "0x1bc16d674ec80000" }
eth_call
Executes a read-only contract call. Does not submit a transaction or change state.
Parameters
| # | Type | Description |
|---|
| 1 | TransactionObject | {to, data, from?, value?, gas?} |
| 2 | BlockTag | Block to execute against |
curl -X POST https://api.test.stablenet.network \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"to": "0xContractAddress",
"data": "0x70a08231000000000000000000000000YourAddress"
},
"latest"
],
"id": 1
}'
const contract = new ethers.Contract(address, abi, provider);
const result = await contract.balanceOf("0xYourAddress");
const result = await client.readContract({
address: "0xContractAddress",
abi,
functionName: "balanceOf",
args: ["0xYourAddress"],
});
eth_estimateGas
Estimates the gas required for a transaction.
curl -X POST https://api.test.stablenet.network \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [
{
"from": "0xSenderAddress",
"to": "0xRecipientAddress",
"value": "0xde0b6b3a7640000"
}
],
"id": 1
}'
const gas = await provider.estimateGas({
from: "0xSenderAddress",
to: "0xRecipientAddress",
value: ethers.parseEther("1.0"),
});
const gas = await client.estimateGas({
account: "0xSenderAddress",
to: "0xRecipientAddress",
value: parseEther("1.0"),
});
eth_sendRawTransaction
Submits a signed transaction to the network.
StableNet enforces a minimum gas tip of 27,600 Gwei. Transactions with a lower maxPriorityFeePerGas will be rejected.
curl -X POST https://api.test.stablenet.network \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": ["0xSignedTxHex"],
"id": 1
}'
const wallet = new ethers.Wallet(privateKey, provider);
const tx = await wallet.sendTransaction({
to: "0xRecipient",
value: ethers.parseEther("1.0"),
maxPriorityFeePerGas: ethers.parseUnits("27600", "gwei"),
});
const receipt = await tx.wait();
import { createWalletClient, parseEther, parseGwei } from "viem";
const hash = await walletClient.sendTransaction({
to: "0xRecipient",
value: parseEther("1.0"),
maxPriorityFeePerGas: parseGwei("27600"),
});
eth_getTransactionReceipt
Returns the receipt of a confirmed transaction.
curl -X POST https://api.test.stablenet.network \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0xTxHash"],
"id": 1
}'
const receipt = await provider.getTransactionReceipt("0xTxHash");
console.log(receipt.status); // 1 = success, 0 = reverted
const receipt = await client.getTransactionReceipt({
hash: "0xTxHash",
});
istanbul Namespace
StableNet-specific methods for querying the Anzeon WBFT consensus state.
istanbul_getValidators
Returns the current validator set.
curl -X POST https://api.test.stablenet.network \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "istanbul_getValidators",
"params": ["latest"],
"id": 1
}'
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": ["0xValidator1Address", "0xValidator2Address"]
}
istanbul_status
Returns round and sealer statistics for recent blocks.
curl -X POST https://api.test.stablenet.network \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "istanbul_status",
"params": [],
"id": 1
}'
Fee Delegation Extensions
StableNet extends the standard API with fee delegation signing methods.
| Method | Description |
|---|
eth_signRawFeeDelegateTransaction | Appends a fee-payer signature to an already-signed transaction using an unlocked account |
personal_signRawFeeDelegateTransaction | Same, using password-based authentication |
The resulting signed transaction is submitted via eth_sendRawTransaction. Gas costs are paid by the fee payer, not the sender.
Quick Reference
| Method | Description |
|---|
eth_chainId | Chain ID (8283 testnet, 8282 mainnet) |
eth_blockNumber | Latest block number |
eth_getBalance | Account KRC balance |
eth_getCode | Contract bytecode |
eth_getStorageAt | Storage slot value |
eth_call | Read-only contract call |
eth_estimateGas | Gas estimation |
eth_sendRawTransaction | Submit signed transaction |
eth_getTransactionByHash | Transaction details |
eth_getTransactionReceipt | Transaction receipt |
eth_getBlockByNumber | Block by number |
eth_getBlockByHash | Block by hash |
eth_feeHistory | Historical fee data |
txpool_status | Pending/queued tx counts |
istanbul_getValidators | Current validator set |
istanbul_status | Consensus round stats |