Introduction
Viction provides a JSON-RPC API that allows applications to interact with the blockchain. The API is compatible with Ethereum’s JSON-RPC specification, making it easy to integrate existing Ethereum tools and libraries.API Namespaces
The Viction RPC API is organized into the following namespaces:eth
Ethereum-compatible methods for querying blockchain data, managing accounts, and sending transactions
net
Network-related methods for checking connectivity and network version
web3
Web3 utility methods including client version and SHA3 hashing
personal
Account management methods for creating, importing, and managing wallets
debug
Debugging and diagnostic methods for transaction tracing and state inspection
Connection Methods
Viction nodes support multiple connection methods:HTTP/HTTPS
WebSocket
IPC (Inter-Process Communication)
Request Format
All JSON-RPC requests follow this structure:Protocol version (always “2.0”)
The RPC method to call (e.g., “eth_blockNumber”)
Array of method parameters (can be empty)
Request identifier for matching responses
Response Format
Successful responses:The result of the method call (type varies by method)
Error object if the request failed
Data Encoding
Hexadecimal Encoding
All numeric values and binary data are encoded as hexadecimal strings with the0x prefix:
- Quantities (integers): Encoded as hex, no leading zeros (except
0x0)- Example:
1207→0x4b7
- Example:
- Data (byte arrays): Encoded as hex, even length, two hex digits per byte
- Example:
[1, 2, 3]→0x010203
- Example:
Addresses
Ethereum-style addresses are 20-byte hex strings:Block Identifiers
Block numbers can be specified as:- Hex number:
0x4b7(specific block) - “latest”: Most recent block
- “earliest”: Genesis block
- “pending”: Pending block being mined
Rate Limiting
API Compatibility
Viction’s RPC API is compatible with:- Ethereum JSON-RPC specification
- Web3.js library
- Ethers.js library
- Other Ethereum-compatible tools
Next Steps
Ethereum Methods
Explore the eth namespace for blockchain queries
Account Management
Learn about personal namespace methods