Skip to content

RPC API Reference

Soqucoin's JSON-RPC interface is compatible with Dogecoin Core RPC. All standard Bitcoin/Dogecoin RPC methods work as expected.

Connection

# Using soqucoin-cli
soqucoin-cli <method> [params...]

# Using curl
curl -u rpcuser:rpcpassword -d '{"method":"getblockchaininfo","params":[]}' http://127.0.0.1:28332/

Blockchain

Method Description
getblockchaininfo Chain state, sync progress, current height
getblockcount Current block height
getblockhash <height> Block hash at given height
getblock <hash> Block details by hash
getbestblockhash Hash of the chain tip
gettxout <txid> <n> Details about an unspent transaction output
verifychain Verify blockchain database integrity

Mining

Method Description
getmininginfo Current mining state (difficulty, hashrate, block reward)
getnetworkhashps Estimated network hashrate
getblocktemplate Block template for mining software
submitblock <hex> Submit a solved block
getauxblock AuxPoW block template (for merge mining)
submitauxblock <hash> <hex> Submit an AuxPoW solution
generatetoaddress <n> <addr> Generate blocks to address (regtest only)

Network

Method Description
getnetworkinfo Network protocol info (version, connections)
getpeerinfo Details about connected peers
getconnectioncount Number of active peer connections
addnode <ip> <add/remove> Manually add or remove a peer

Wallet

Method Description
getbalance Total confirmed balance
getnewaddress Generate a new receiving address
sendtoaddress <addr> <amount> Send SOQ to an address
listtransactions Recent transaction history
listunspent List unspent transaction outputs
dumpprivkey <addr> Export private key for an address
importprivkey <key> Import a private key

Utility

Method Description
validateaddress <addr> Check if an address is valid
estimatesmartfee <nblocks> Estimate fee rate for confirmation within N blocks
estimatefee <nblocks> Deprecated; use estimatesmartfee
uptime Node uptime in seconds
stop Shut down the node

USDSOQ (stablecoin)

Available where USDSOQ is active (stagenet and regtest; not mainnet). Mint, burn, freeze, and authority operations require authorized keys.

Method Description
getusdsoqstatus Activation state, circulating supply, and supply-invariant status
getusdsoqauthority Current authority key set and threshold
verifyusdsoqauthority <signatures> Verify authority signatures against the current authority set
usdsoqgenkeys Generate an ML-DSA-44 authority keypair
usdsoqsetauthority Set or update the authority key set
usdsoqrotatekeys <threshold> Rotate the authority keys
usdsoqmint <amount> Mint new USDSOQ (authority)
usdsoqburn <amount> Burn or redeem USDSOQ (authority)
usdsoqfreeze <txid> <vout> Freeze a USDSOQ output (compliance)
usdsoqunfreeze <txid> <vout> Unfreeze a previously frozen output
usdsoqsigntx <opcode_tag> Sign a USDSOQ authority transaction

See USDSOQ for the consensus rules these operate under.

Privacy (SoquObscura, in development)

These drive the confidential-transaction subsystem, which is under active development and not active on mainnet. Interfaces may change.

Method Description
getprivacystatus Confidential-transaction subsystem status
getprivacyparams Active privacy parameters (commitment and proof settings)
getdecoyoutputs Fetch decoy outputs for ring construction
createshieldtx Build a shielding transaction (transparent to confidential)
createunshieldtx <txid> <vout> <amount> <spend_key_hex> Build an unshielding transaction (confidential to transparent)

See SoquObscura.

Post-quantum keys (PAT / ML-DSA)

Method Description
generatedilithiumkey Generate an ML-DSA-44 (Dilithium) keypair
signdilithiummessage <privatekey> <message> Sign a message with an ML-DSA-44 private key

Examples

Check Sync Status

$ soqucoin-cli getblockchaininfo
{
  "chain": "main",
  "blocks": 42150,
  "headers": 42150,
  "bestblockhash": "a1b2c3...",
  "difficulty": 1234.567,
  "verificationprogress": 1.0
}

Get Block Reward Info

$ soqucoin-cli getmininginfo
{
  "blocks": 42150,
  "difficulty": 1234.567,
  "networkhashps": 2450000000,
  "pooledtx": 3
}

Generate Test Blocks (Regtest)

$ soqucoin-cli -regtest generatetoaddress 10 $(soqucoin-cli -regtest getnewaddress)
[
  "hash1...",
  "hash2...",
  ...
]

Error Codes

Code Meaning
-1 General error
-3 Type error (unexpected argument type)
-5 Invalid address or key
-6 Insufficient funds
-13 Wallet is locked
-28 Still loading (node syncing)