Overview
Nexis Network is fully compatible with the Ethereum JSON-RPC API, based on the Optimism stack. This means you can use standard Ethereum tools and libraries to interact with Nexis. Endpoints:- Mainnet: https://rpc.nex-t1.ai
- Testnet: https://testnet-rpc.nex-t1.ai
- WebSocket (Testnet): wss://testnet-ws.nex-t1.ai
- Full Ethereum JSON-RPC compatibility
- Optimism-specific methods for L2 functionality
- WebSocket support for real-time event subscriptions
- Archive node support for historical state queries
- Debug and trace methods for development
Standard Ethereum Methods
eth_blockNumber
Get the latest block number. Parameters: None Returns:- QUANTITY- Integer block number (hex-encoded)
eth_getBalance
Get the balance of an account. Parameters:- DATA, 20 bytes - Address to check
- QUANTITY|TAG- Block number (hex), or “latest”, “earliest”, “pending”
- QUANTITY- Balance in wei (hex-encoded)
eth_getBlockByNumber
Get block information by block number. Parameters:- QUANTITY|TAG- Block number or “latest”, “earliest”, “pending”
- BOOLEAN- If true, returns full transaction objects; if false, only hashes
- Object- Block object with fields:- number- Block number
- hash- Block hash
- parentHash- Parent block hash
- timestamp- Block timestamp (Unix)
- transactions- Array of transaction hashes or objects
- gasUsed- Gas used in this block
- gasLimit- Gas limit for this block
- And more…
 
eth_getTransactionByHash
Get transaction information by transaction hash. Parameters:- DATA, 32 bytes - Transaction hash
- Object- Transaction object or- nullif not found
eth_getTransactionReceipt
Get transaction receipt (result of execution). Parameters:- DATA, 32 bytes - Transaction hash
- Object- Receipt object with:- status- 1 for success, 0 for failure
- blockNumber- Block number
- gasUsed- Gas used by this transaction
- logs- Array of log objects (events)
- contractAddress- Address of created contract (if applicable)
 
eth_sendRawTransaction
Submit a signed transaction to the network. Parameters:- DATA- Signed transaction data (RLP-encoded)
- DATA, 32 bytes - Transaction hash
eth_call
Execute a contract function call without creating a transaction (read-only). Parameters:- Object- Transaction call object:- to- Contract address
- data- Encoded function call data
- (optional) from,gas,gasPrice,value
 
- QUANTITY|TAG- Block number or “latest”
- DATA- Return value of the executed contract method
eth_estimateGas
Estimate gas required for a transaction. Parameters:- Object- Transaction object (same as eth_call)
- QUANTITY- Estimated gas amount
eth_gasPrice
Get current gas price. Parameters: None Returns:- QUANTITY- Current gas price in wei
JavaScript
eth_getTransactionCount
Get the number of transactions sent from an address (nonce). Parameters:- DATA, 20 bytes - Address
- QUANTITY|TAG- Block number or “latest”, “pending”
- QUANTITY- Transaction count (nonce)
JavaScript
eth_getLogs
Get logs matching a filter. Parameters:- Object- Filter options:- fromBlock- Starting block (number or “latest”)
- toBlock- Ending block
- address- Contract address(es)
- topics- Array of topics (event signatures)
 
- Array- Log objects
eth_chainId
Get the chain ID of the network. Parameters: None Returns:- QUANTITY- Chain ID
JavaScript
Optimism-Specific Methods
Nexis Network inherits Optimism functionality for L2 operations.optimism_syncStatus
Get sync status of the node. Parameters: None Returns:- Object- Sync status information
cURL
optimism_outputAtBlock
Get the output root at a specific L2 block. Parameters:- QUANTITY- L2 block number
- Object- Output information
cURL
WebSocket Methods
eth_subscribe
Subscribe to real-time events. Subscription Types:- newHeads- New block headers
- logs- New logs matching a filter
- newPendingTransactions- New pending transactions
- syncing- Sync status changes
eth_unsubscribe
Unsubscribe from a subscription. Parameters:- DATA- Subscription ID
- BOOLEAN- True if successful
Debug and Trace Methods
Available on archive nodes for development and debugging.debug_traceTransaction
Get detailed execution trace of a transaction. Parameters:- DATA- Transaction hash
- Object- Tracer options
- Object- Trace result
cURL
debug_traceBlockByNumber
Trace all transactions in a block. Parameters:- QUANTITY- Block number
- Object- Tracer options
- Array- Array of trace results
Admin Methods
Administrative methods for node operators.admin_startSequencer
Start the sequencer (for Nexis node operators). Parameters: None Returns:- BOOLEAN- Success status
admin_stopSequencer
Stop the sequencer. Parameters: None Returns:- BOOLEAN- Success status
Error Codes
Standard JSON-RPC error codes:| Code | Message | Description | 
|---|---|---|
| -32700 | Parse error | Invalid JSON | 
| -32600 | Invalid request | Missing required fields | 
| -32601 | Method not found | RPC method doesn’t exist | 
| -32602 | Invalid params | Invalid method parameters | 
| -32603 | Internal error | Server error | 
| -32000 | Server error | Generic execution error | 
| -32001 | Resource not found | Requested resource doesn’t exist | 
| -32002 | Resource unavailable | Resource temporarily unavailable | 
| -32003 | Transaction rejected | Transaction failed validation | 
| -32004 | Method not supported | Method not implemented | 
| -32005 | Limit exceeded | Request exceeds limits | 
Rate Limits
| Tier | Requests/Second | Burst | WebSocket Connections | 
|---|---|---|---|
| Free | 100 | 200 | 10 per IP | 
| Pro | 1,000 | 2,000 | 50 per IP | 
| Enterprise | Custom | Custom | Custom | 
Best Practices
Connection Management
Connection Management
- Reuse HTTP connections with keep-alive
- Use WebSocket for real-time subscriptions
- Implement connection pooling for high throughput
- Handle reconnection with exponential backoff
Error Handling
Error Handling
- Always check for error field in responses
- Implement retry logic for transient errors
- Log errors with request context
- Handle rate limits gracefully
Performance Optimization
Performance Optimization
- Batch requests when possible (eth_batch)
- Cache responses for immutable data (old blocks)
- Use appropriate block tags (latest vs finalized)
- Filter logs efficiently with precise topics
Security
Security
- Use HTTPS endpoints only
- Never expose API keys in client code
- Validate all user input before RPC calls
- Implement request signing for write operations