SpoinkNET RPC Documentation
Welcome to the SpoinkNET RPC Documentation. This guide provides detailed information on how to interact with the SpoinkNET blockchain through our Remote Procedure Call (RPC) interface.
Overview
SpoinkNET is a decentralized blockchain platform that supports high-speed transactions, scalable solutions, and innovative decentralized finance (DeFi) applications. The SpoinkNET RPC provides programmatic access to the blockchain, allowing developers to integrate and interact with the network seamlessly.
RPC Endpoint
This is the endpoint you will use to make RPC calls to the SpoinkNET blockchain.
Supported Methods
Here are some of the key RPC methods supported by the SpoinkNET endpoint:
1. eth_blockNumber
Returns the number of the most recent block.
Request:
{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": "0x123456",
"id": 1
}
2. eth_getBlockByNumber
Returns the block matching the given block number.
Request:
{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["0x123456", true],
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": {
"difficulty": "0x1",
"extraData": "0x",
"gasLimit": "0x7a1200",
"gasUsed": "0x0",
"hash": "0xabc123",
"logsBloom": "0x",
"miner": "0x1234567890abcdef",
"mixHash": "0x",
"nonce": "0x",
"number": "0x123456",
"parentHash": "0x",
"receiptsRoot": "0x",
"sha3Uncles": "0x",
"size": "0x",
"stateRoot": "0x",
"timestamp": "0x",
"totalDifficulty": "0x",
"transactions": [],
"transactionsRoot": "0x",
"uncles": []
},
"id": 1
}
3. eth_getTransactionByHash
Returns the transaction matching the given transaction hash.
Request:
{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0x1234567890abcdef"],
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": {
"blockHash": "0x",
"blockNumber": "0x123456",
"from": "0x1234567890abcdef",
"gas": "0x5208",
"gasPrice": "0x4a817c800",
"hash": "0x1234567890abcdef",
"input": "0x",
"nonce": "0x15",
"to": "0xabcdef1234567890",
"transactionIndex": "0x0",
"value": "0x0",
"v": "0x1b",
"r": "0x",
"s": "0x"
},
"id": 1
}
4. eth_sendTransaction
Sends a transaction to the network.
Request:
{
"jsonrpc": "2.0",
"method": "eth_sendTransaction",
"params": [{
"from": "0x1234567890abcdef",
"to": "0xabcdef1234567890",
"gas": "0x5208",
"gasPrice": "0x4a817c800",
"value": "0x1"
}],
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": "0xabcdef1234567890",
"id": 1
}
Authentication
The SpoinkNET RPC does not require authentication for standard requests since the RPC URL is already using basic auth. Ensure that your application handles any required authentication as per your network's security policies.
Contact
For any issues, questions, or support related to the SpoinkNET RPC, please contact SpoinkOSDevs.
SpoinkNET - The Future of Decentralized Finance
Join SpoinkNET Today!