RPC Documentation

Complete guide to QSN blockchain JSON-RPC 2.0 API. 177 methods.

Coming Soon

Mainnet

Chain ID: 99990
Symbol: QSN
Min Stake: 1000 QSN
Live

Pyuniq Testnet

RPC:https://node.qsnchain.com/testnet/
WS:wss://node.qsnchain.com/testnet/ws
Chain ID: 99991
Symbol: tQSN
Dev

Devnet

RPC:https://node.qsnchain.com/devnet/
WS:wss://node.qsnchain.com/devnet/ws
Chain ID: 99992
Min Stake: 0

All requests use JSON-RPC 2.0 format via HTTP POST:

json
{
  "jsonrpc": "2.0",
  "method": "method_name",
  "params": [param1, param2] or {key: value},
  "id": 1
}

Example curl request:

bash
curl -X POST https://node.qsnchain.com/testnet/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qsn_chainInfo","params":[],"id":1}'

What is delegation?

Delegation allows token holders to earn rewards by delegating tokens to validators without running a node.

1

Get staking information

First check current staking parameters:

bash
curl -X POST https://node.qsnchain.com/testnet/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qsn_getStakingInfo","params":[],"id":1}'
Response contains:
  • minStake - minimum amount (Testnet: 1000 tQSN)
  • apr - annual percentage rate
  • validators - number of validators
  • epochDuration - epoch length in blocks
2

Choose a validator

Get list of active validators:

bash
curl -X POST https://node.qsnchain.com/testnet/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qsn_getActiveValidators","params":[],"id":1}'
Selection criteria:
  • commission - validator commission (0-100%)
  • uptime - uptime (higher is better)
  • stake - total validator stake
3

Delegate tokens

Send tokens to stake with chosen validator:

bash
curl -X POST https://node.qsnchain.com/testnet/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "qsn_stake",
    "params": [{
      "from": "quant2YOUR_ADDRESS...",
      "validator": "quant2VALIDATOR_ADDRESS...",
      "amount": "1000000000000000000000"
    }],
    "id": 1
  }'
⚠️ Important:
  • Minimum: 1000 tQSN (Testnet) / 0 (Devnet)
  • amount in wei (18 decimals): 1000 tQSN = 1000000000000000000000
4

Check your stake

bash
curl -X POST https://node.qsnchain.com/testnet/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qsn_getMyStake","params":["quant2YOUR_ADDRESS..."],"id":1}'
5

Unstake tokens

To withdraw tokens from staking:

bash
curl -X POST https://node.qsnchain.com/testnet/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "qsn_unstake",
    "params": [{
      "from": "quant2YOUR_ADDRESS...",
      "validator": "quant2VALIDATOR_ADDRESS...",
      "amount": "1000000000000000000000"
    }],
    "id": 1
  }'
🔒 Unbonding period:

Mainnet/Testnet: 7 days. Devnet: instant.

What do you need to start?

Create a wallet with post-quantum keys and get test tokens to interact with the network.

1

Create wallet

Create a new wallet with post-quantum keys:

bash
curl -X POST https://node.qsnchain.com/testnet/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qsn_createWallet","params":[{}],"id":1}'
Response:
json
{
  "success": true,
  "quantAddress": "quant2abc123def456...",
  "evmAddress": "0x1234567890abcdef..."
}
💡 Tip:

Save both addresses! quantAddress for QSN, evmAddress for EVM compatibility.

2

Get test tokens

Use the faucet to get free test tokens:

bash
curl -X POST https://node.qsnchain.com/testnet/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qsn_faucet","params":["quant2YOUR_ADDRESS..."],"id":1}'
Limits:
  • 5 requests per hour per address
  • 10 tQSN per request
3

Check balance

bash
curl -X POST https://node.qsnchain.com/testnet/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qsn_getBalance","params":["quant2YOUR_ADDRESS..."],"id":1}'
Response:
json
{
  "balance": "0x8ac7230489e80000",
  "balanceFormatted": "10.0000 tQSN"
}
4

Convert addresses (optional)

If you have an EVM address, convert it to QSN format:

bash
curl -X POST https://node.qsnchain.com/testnet/ \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"qsn_getQuantAddress","params":["0xYOUR_EVM_ADDRESS..."],"id":1}'

Total 177 RPC methods available

Full documentation available on GitHub