Comprehensive documentation for NovaLayer's APIs and SDKs. Integrate seamlessly with your applications.
Interact directly with NovaLayer nodes for blockchain data and transaction submission.
/rpcStandard JSON-RPC endpoint for L2s
/statusGet network status and health
curl -X POST -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
https://rpc.testnet.novalayer.devA comprehensive TypeScript SDK for building dApps and interacting with NovaLayer programmatically.
nova.createL2()Deploy a new modular L2
nova.chain.getTransactions()Retrieve transactions for a chain
nova.validator.stake()Stake $NOVA tokens as a validator
import { NovaLayer } from '@novalayer/sdk';
const nova = new NovaLayer({
network: 'mainnet',
apiKey: 'nv_YOUR_API_KEY'
});
async function getLatestBlock() {
const blockNumber = await nova.chain.getBlockNumber('my-chain-id');
console.log('Latest block:', blockNumber);
}Query complex blockchain data efficiently using GraphQL.
/graphqlGraphQL endpoint for indexed data
query GetChainData {
chain(id: "my-chain-id") {
name
status
blocks(first: 10) {
id
timestamp
transactions {
count
}
}
}
}Subscribe to real-time blockchain events and updates.
/wsWebSocket endpoint for live events
const ws = new WebSocket('wss://ws.testnet.novalayer.dev');
ws.onopen = () => {
console.log('WebSocket connected');
ws.send(JSON.stringify({
type: 'subscribe',
event: 'newBlock',
chainId: 'my-chain-id'
}));
};
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('New block received:', data);
};Securely generate and manage your API keys for seamless integration with NovaLayer services.
Go to API Settings