Alph APIs v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Happy to code Alph APIs
License: Github
Alph JSON-RPC v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
A collection holding all the Alph JSON RPC API calls
Base URLs:
web3
API for web3 request
clientRequest
Code samples
curl --request POST \
--url https://rpc.alph.network/clientVersion \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "web3_clientVersion",
"params": [],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//clientVersion");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/clientVersion"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"web3_clientVersion\",\"params\":[],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/clientVersion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"web3_clientVersion\",\"params\":[],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"web3_clientVersion\",\"params\":[],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//clientVersion", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/clientVersion")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"web3_clientVersion\",\"params\":[],\"id\":1}")
.asString();
POST /clientVersion
Returns the current client version.
Parameters
none
Returns
String
- The current client version
Body parameter
{
"jsonrpc": "2.0",
"method": "web3_clientVersion",
"params": [],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | clientVersionRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
sha3Request
Code samples
curl --request POST \
--url https://rpc.alph.network/sha3 \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"web3_sha3","params":["0x68656c6c6f20776f726c64"],"id":64}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "web3_sha3",
"params": [
"0x68656c6c6f20776f726c64"
],
"id": 64
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//sha3");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/sha3"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"web3_sha3\",\"params\":[\"0x68656c6c6f20776f726c64\"],\"id\":64}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/sha3")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"web3_sha3\",\"params\":[\"0x68656c6c6f20776f726c64\"],\"id\":64}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"web3_sha3\",\"params\":[\"0x68656c6c6f20776f726c64\"],\"id\":64}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//sha3", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/sha3")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"web3_sha3\",\"params\":[\"0x68656c6c6f20776f726c64\"],\"id\":64}")
.asString();
POST /sha3
Returns Keccak-256 (not the standardized SHA3-256) of the given data.
Parameters
DATA
- the data to convert into a SHA3 hash
params:
[ "0x68656c6c6f20776f726c64" ]
Returns
DATA
- The SHA3 result of the given string.
Body parameter
{
"jsonrpc": "2.0",
"method": "web3_sha3",
"params": [
"0x68656c6c6f20776f726c64"
],
"id": 64
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | sha3request | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
net
API for network request
versionRequest
Code samples
curl --request POST \
--url https://rpc.alph.network/version \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":67}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "net_version",
"params": [],
"id": 67
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//version");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/version"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"net_version\",\"params\":[],\"id\":67}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/version")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"net_version\",\"params\":[],\"id\":67}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"net_version\",\"params\":[],\"id\":67}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//version", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/version")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"net_version\",\"params\":[],\"id\":67}")
.asString();
POST /version
Returns the current network id.
Parameters
none
Returns
-
String
- The current network id.-
"8738"
: Alph Mainnet
-
Body parameter
{
"jsonrpc": "2.0",
"method": "net_version",
"params": [],
"id": 67
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | versionrequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
listeningRequest
Code samples
curl --request POST \
--url https://rpc.alph.network/listening \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":67}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "net_listening",
"params": [],
"id": 67
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//listening");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/listening"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"net_listening\",\"params\":[],\"id\":67}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/listening")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"net_listening\",\"params\":[],\"id\":67}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"net_listening\",\"params\":[],\"id\":67}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//listening", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/listening")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"net_listening\",\"params\":[],\"id\":67}")
.asString();
POST /listening
Returns true
if client is actively listening for network connections.
Parameters
none
Returns
Boolean
-true
when listening, otherwisefalse
.
Body parameter
{
"jsonrpc": "2.0",
"method": "net_listening",
"params": [],
"id": 67
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | listeningrequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
peerCountRequest
Code samples
curl --request POST \
--url https://rpc.alph.network/peerCount \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":74}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "net_peerCount",
"params": [],
"id": 74
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//peerCount");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/peerCount"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"net_peerCount\",\"params\":[],\"id\":74}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/peerCount")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"net_peerCount\",\"params\":[],\"id\":74}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"net_peerCount\",\"params\":[],\"id\":74}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//peerCount", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/peerCount")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"net_peerCount\",\"params\":[],\"id\":74}")
.asString();
POST /peerCount
Returns number of peers currently connected to the client.
Parameters
none
Returns
QUANTITY
- integer of the number of connected peers.
Body parameter
{
"jsonrpc": "2.0",
"method": "net_peerCount",
"params": [],
"id": 74
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | peerCountRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
eth
API for eth information
protocolVersionRequest
Code samples
curl --request POST \
--url https://rpc.alph.network/protocolVersion \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_protocolVersion","params":[],"id":67}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_protocolVersion",
"params": [],
"id": 67
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//protocolVersion");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/protocolVersion"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_protocolVersion\",\"params\":[],\"id\":67}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/protocolVersion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_protocolVersion\",\"params\":[],\"id\":67}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_protocolVersion\",\"params\":[],\"id\":67}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//protocolVersion", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/protocolVersion")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_protocolVersion\",\"params\":[],\"id\":67}")
.asString();
POST /protocolVersion
Returns the current ethereum protocol version.
Parameters
none
Returns
String
- The current ethereum protocol version
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_protocolVersion",
"params": [],
"id": 67
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | protocolVersionRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
syncingrequest
Code samples
curl --request POST \
--url https://rpc.alph.network/syncing \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//syncing");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/syncing"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_syncing\",\"params\":[],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/syncing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_syncing\",\"params\":[],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_syncing\",\"params\":[],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//syncing", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/syncing")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_syncing\",\"params\":[],\"id\":1}")
.asString();
POST /syncing
Returns an object with data about the sync status or false.
Parameters
none
Returns
-
Object|Boolean
, An object with sync status data or FALSE, when not syncing:-
startingBlock
:QUANTITY
- The block at which the import started (will only be reset, after the sync reached his head) -
currentBlock
:QUANTITY
- The current block, same as eth_blockNumber -
highestBlock
:QUANTITY
- The estimated highest block
-
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | syncingrequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
coinbase
Code samples
curl --request POST \
--url https://rpc.alph.network/coinbase \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":64}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_coinbase",
"params": [],
"id": 64
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//coinbase");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/coinbase"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_coinbase\",\"params\":[],\"id\":64}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/coinbase")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_coinbase\",\"params\":[],\"id\":64}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_coinbase\",\"params\":[],\"id\":64}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//coinbase", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/coinbase")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_coinbase\",\"params\":[],\"id\":64}")
.asString();
POST /coinbase
Returns the client coinbase address. Parameters none Returns
DATA
, 20 bytes - the current coinbase address.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_coinbase",
"params": [],
"id": 64
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | coinbaserequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful operation | None |
500 | Internal Server Error | Internal Server Error | None |
gasPrice
Code samples
curl --request POST \
--url https://rpc.alph.network/gasPrice \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":73}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 73
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//gasPrice");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/gasPrice"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_gasPrice\",\"params\":[],\"id\":73}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/gasPrice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_gasPrice\",\"params\":[],\"id\":73}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_gasPrice\",\"params\":[],\"id\":73}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//gasPrice", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/gasPrice")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_gasPrice\",\"params\":[],\"id\":73}")
.asString();
POST /gasPrice
Returns the current price per gas in wei. Parameters none Returns
QUANTITY
- integer of the current gas price in wei.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 73
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | gasPriceRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful operation | None |
500 | Internal Server Error | Internal Server Error | None |
accounts
Code samples
curl --request POST \
--url https://rpc.alph.network/accounts \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//accounts");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/accounts"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_accounts\",\"params\":[],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_accounts\",\"params\":[],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_accounts\",\"params\":[],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//accounts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/accounts")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_accounts\",\"params\":[],\"id\":1}")
.asString();
POST /accounts
Returns a list of addresses owned by client.
Parameters
none
Returns
Array of DATA
, 20 Bytes - addresses owned by the client
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | accountsrequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful operation | None |
500 | Internal Server Error | Internal Server Error | None |
blockNumber
Code samples
curl --request POST \
--url https://rpc.alph.network/blockNumber \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 83
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//blockNumber");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/blockNumber"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":83}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/blockNumber")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":83}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":83}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//blockNumber", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/blockNumber")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":83}")
.asString();
POST /blockNumber
Returns the number of most recent block. Parameters none Returns
QUANTITY
- integer of the current block number the client is on.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 83
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | blockNumberRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful operation | None |
500 | Internal Server Error | Internal Server Error | None |
getBalance
Code samples
curl --request POST \
--url https://rpc.alph.network/getBalance \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x2b5634c42055806a59e9107ed44d43c426e58258","latest"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": [
"0x2b5634c42055806a59e9107ed44d43c426e58258",
"latest"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getBalance");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/getBalance"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBalance\",\"params\":[\"0x2b5634c42055806a59e9107ed44d43c426e58258\",\"latest\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/getBalance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBalance\",\"params\":[\"0x2b5634c42055806a59e9107ed44d43c426e58258\",\"latest\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBalance\",\"params\":[\"0x2b5634c42055806a59e9107ed44d43c426e58258\",\"latest\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getBalance", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/getBalance")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBalance\",\"params\":[\"0x2b5634c42055806a59e9107ed44d43c426e58258\",\"latest\"],\"id\":1}")
.asString();
POST /getBalance
Returns the balance of the account of given address.
Parameters
DATA
, 20 Bytes - address to check for balance.QUANTITY|TAG
- integer block number, or the string "latest", "earliest" or "pending", see the default block parameter
' 0x2b5634c42055806a59e9107ed44d43c426e58258',
'latest'
] ```
**Returns**
- `QUANTITY` - integer of the current balance in wei.
> Body parameter
```json
{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": [
"0x2b5634c42055806a59e9107ed44d43c426e58258",
"latest"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getBalanceRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful operation | None |
500 | Internal Server Error | Internal Server Error | None |
getStorageAt
Code samples
curl --request POST \
--url https://rpc.alph.network/getStorageAt \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getStorageAt","params":["0x295a70b2de5e3953354a6a8344e616ed314d7251","0x0","latest"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": [
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getStorageAt");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/getStorageAt"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getStorageAt\",\"params\":[\"0x295a70b2de5e3953354a6a8344e616ed314d7251\",\"0x0\",\"latest\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/getStorageAt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getStorageAt\",\"params\":[\"0x295a70b2de5e3953354a6a8344e616ed314d7251\",\"0x0\",\"latest\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getStorageAt\",\"params\":[\"0x295a70b2de5e3953354a6a8344e616ed314d7251\",\"0x0\",\"latest\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getStorageAt", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/getStorageAt")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getStorageAt\",\"params\":[\"0x295a70b2de5e3953354a6a8344e616ed314d7251\",\"0x0\",\"latest\"],\"id\":1}")
.asString();
POST /getStorageAt
Returns the balance of the account of given address.
Parameters
-
DATA
, 20 Bytes - address to check for balance. -
QUANTITY|TAG
- integer block number, or the string "latest", "earliest" or "pending", see the default block parameter
params: [
'0x2b5634c42055806a59e9107ed44d43c426e58258',
'latest'
]
Returns
QUANTITY
- integer of the current balance in wei.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": [
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getStorageAtRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getTransactionCount
Code samples
curl --request POST \
--url https://rpc.alph.network/getTransactionCount \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0xbf1dcb735e512b731abd3404c15df6431bd03d42","latest"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": [
"0xbf1dcb735e512b731abd3404c15df6431bd03d42",
"latest"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getTransactionCount");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/getTransactionCount"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionCount\",\"params\":[\"0xbf1dcb735e512b731abd3404c15df6431bd03d42\",\"latest\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/getTransactionCount")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionCount\",\"params\":[\"0xbf1dcb735e512b731abd3404c15df6431bd03d42\",\"latest\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionCount\",\"params\":[\"0xbf1dcb735e512b731abd3404c15df6431bd03d42\",\"latest\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getTransactionCount", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/getTransactionCount")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionCount\",\"params\":[\"0xbf1dcb735e512b731abd3404c15df6431bd03d42\",\"latest\"],\"id\":1}")
.asString();
POST /getTransactionCount
Returns the number of transactions sent from an address.
Parameters
DATA
, 20 Bytes - address.QUANTITY|TAG
- integer block number, or the string"latest"
,"earliest"
or"pending"
, see the default block parameter
params: [
'0x407d73d8a49eeb85d32cf465507dd71d507100c1',
'latest' // state at the latest block
]
Returns
QUANTITY
- integer of the number of transactions send from this address.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": [
"0xbf1dcb735e512b731abd3404c15df6431bd03d42",
"latest"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getTransactionCountRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getBlockTransactionCountByHash
Code samples
curl --request POST \
--url https://rpc.alph.network/getBlockTransactionCountByHash \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0xc8b967161c671ce952a3d50987a78d64157fb5a8e1724804b87d3e9b11e3aa34"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": [
"0xc8b967161c671ce952a3d50987a78d64157fb5a8e1724804b87d3e9b11e3aa34"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getBlockTransactionCountByHash");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/getBlockTransactionCountByHash"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockTransactionCountByHash\",\"params\":[\"0xc8b967161c671ce952a3d50987a78d64157fb5a8e1724804b87d3e9b11e3aa34\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/getBlockTransactionCountByHash")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockTransactionCountByHash\",\"params\":[\"0xc8b967161c671ce952a3d50987a78d64157fb5a8e1724804b87d3e9b11e3aa34\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockTransactionCountByHash\",\"params\":[\"0xc8b967161c671ce952a3d50987a78d64157fb5a8e1724804b87d3e9b11e3aa34\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getBlockTransactionCountByHash", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/getBlockTransactionCountByHash")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockTransactionCountByHash\",\"params\":[\"0xc8b967161c671ce952a3d50987a78d64157fb5a8e1724804b87d3e9b11e3aa34\"],\"id\":1}")
.asString();
POST /getBlockTransactionCountByHash
Returns the number of transactions in a block from a block matching the given block hash.
Parameters
DATA
, 32 Bytes - hash of a block
params: [
'0xc8b967161c671ce952a3d50987a78d64157fb5a8e1724804b87d3e9b11e3aa34'
]
Returns
QUANTITY
- integer of the number of transactions in this block.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": [
"0xc8b967161c671ce952a3d50987a78d64157fb5a8e1724804b87d3e9b11e3aa34"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getBlockTransactionCountByHashRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getBlockTransactionCountByNumber
Code samples
curl --request POST \
--url https://rpc.alph.network/getBlockTransactionCountByNumber \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params":["0x52A8CA"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": [
"0x52A8CA"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getBlockTransactionCountByNumber");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/getBlockTransactionCountByNumber"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockTransactionCountByNumber\",\"params\":[\"0x52A8CA\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/getBlockTransactionCountByNumber")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockTransactionCountByNumber\",\"params\":[\"0x52A8CA\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockTransactionCountByNumber\",\"params\":[\"0x52A8CA\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getBlockTransactionCountByNumber", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/getBlockTransactionCountByNumber")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockTransactionCountByNumber\",\"params\":[\"0x52A8CA\"],\"id\":1}")
.asString();
POST /getBlockTransactionCountByNumber
Returns the number of transactions in a block matching the given block number.
Parameters
QUANTITY|TAG
- integer of a block number, or the string"earliest"
,"latest"
or"pending"
, as in the default block parameter.
params: [
'0x85', // 232
]
Returns
QUANTITY
- integer of the number of transactions in this block.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": [
"0x52A8CA"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getBlockTransactionCountByNumberRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getCode
Code samples
curl --request POST \
--url https://rpc.alph.network/getCode \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getCode","params":["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b","0x2"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": [
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getCode");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/getCode"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCode\",\"params\":[\"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\",\"0x2\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/getCode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCode\",\"params\":[\"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\",\"0x2\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCode\",\"params\":[\"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\",\"0x2\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getCode", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/getCode")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCode\",\"params\":[\"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\",\"0x2\"],\"id\":1}")
.asString();
POST /getCode
Returns code at a given address.
Parameters
-
DATA
, 20 Bytes - address -
QUANTITY|TAG
- integer block number, or the string"latest"
,"earliest"
or"pending"
, see the default block parameter
params: [
'0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b',
'0x2' // 2
]
Returns
DATA
- the code from the given address.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": [
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getCodeRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful operation | None |
500 | Internal Server Error | Internal Server Error | None |
sign
Code samples
curl --request POST \
--url https://rpc.alph.network/sign \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_sign","params":["0x9b2055d370f73ec7d8a03e965129118dc8f5bf83","0xdeadbeaf"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_sign",
"params": [
"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83",
"0xdeadbeaf"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//sign");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/sign"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_sign\",\"params\":[\"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83\",\"0xdeadbeaf\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/sign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_sign\",\"params\":[\"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83\",\"0xdeadbeaf\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_sign\",\"params\":[\"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83\",\"0xdeadbeaf\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//sign", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/sign")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_sign\",\"params\":[\"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83\",\"0xdeadbeaf\"],\"id\":1}")
.asString();
POST /sign
The sign method calculates an Ethereum specific signature with: sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)))
.
By adding a prefix to the message makes the calculated signature recognisable as an Ethereum specific signature. This prevents misuse where a malicious DApp can sign arbitrary data (e.g. transaction) and use the signature to impersonate the victim.
Note: the address to sign with must be unlocked.
Parameters
-
DATA
, 20 Bytes - address -
DATA
, N Bytes - message to sign
Returns
DATA
: Signature
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_sign",
"params": [
"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83",
"0xdeadbeaf"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | signrequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
sendTransaction
Code samples
curl --request POST \
--url https://rpc.alph.network/sendTransaction \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from":"0xb60e8dd61c5d32be8058bb8eb970870f07233155","to":"0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas":"0x76c0","gasPrice":"0x9184e72a000","value":"0x9184e72a","data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_sendTransaction",
"params": [
{
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//sendTransaction");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/sendTransaction"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_sendTransaction\",\"params\":[{\"from\":\"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\"to\":\"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\"gas\":\"0x76c0\",\"gasPrice\":\"0x9184e72a000\",\"value\":\"0x9184e72a\",\"data\":\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"}],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/sendTransaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_sendTransaction\",\"params\":[{\"from\":\"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\"to\":\"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\"gas\":\"0x76c0\",\"gasPrice\":\"0x9184e72a000\",\"value\":\"0x9184e72a\",\"data\":\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"}],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_sendTransaction\",\"params\":[{\"from\":\"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\"to\":\"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\"gas\":\"0x76c0\",\"gasPrice\":\"0x9184e72a000\",\"value\":\"0x9184e72a\",\"data\":\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"}],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//sendTransaction", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/sendTransaction")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_sendTransaction\",\"params\":[{\"from\":\"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\"to\":\"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\"gas\":\"0x76c0\",\"gasPrice\":\"0x9184e72a000\",\"value\":\"0x9184e72a\",\"data\":\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"}],\"id\":1}")
.asString();
POST /sendTransaction
Creates new message call transaction or a contract creation, if the data field contains code.
Parameters
Object
- The transaction object
-
from
:DATA
, 20 Bytes - The address the transaction is send from. -
to
:DATA
, 20 Bytes - (optional when creating new contract) The address the transaction is directed to. -
gas
:QUANTITY
- (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas. -
gasPrice
:QUANTITY
- (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas -
value
:QUANTITY
- (optional) Integer of the value sent with this transaction -
data
:DATA
- The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see Ethereum Contract ABI -
nonce
:QUANTITY
- (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.
params: [{
"from": " 0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"to": " 0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x76c0", // 30400
"gasPrice": "0x9184e72a000", // 10000000000000
"value": "0x9184e72a", // 2441406250
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}]
Returns
DATA
, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.
Use eth_getTransactionReceipt
to get the contract address, after the transaction was mined, when you created a contract.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_sendTransaction",
"params": [
{
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | sendTransactionRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
sendRawTransaction
Code samples
curl --request POST \
--url https://rpc.alph.network/sendRawTransaction \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": [
"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//sendRawTransaction");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/sendRawTransaction"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_sendRawTransaction\",\"params\":[\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/sendRawTransaction")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_sendRawTransaction\",\"params\":[\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_sendRawTransaction\",\"params\":[\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//sendRawTransaction", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//sendRawTransaction")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_sendRawTransaction\",\"params\":[\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"],\"id\":1}")
.asString();
POST /sendRawTransaction
Creates new message call transaction or a contract creation for signed transactions.
Parameters
DATA
, The signed transaction data.
params: ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"]
Returns
DATA
, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.
Use eth_getTransactionReceipt
to get the contract address, after the transaction was mined, when you created a contract.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": [
"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | sendRawTransactionRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
call
Code samples
curl --request POST \
--url https://rpc.alph.network//call \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_call","params":[{"from":"0xb60e8dd61c5d32be8058bb8eb970870f07233155","to":"0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas":"0x76c0","gasPrice":"0x9184e72a000","value":"0x9184e72a","data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"},"latest"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
},
"latest"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//call");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network//call"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_call\",\"params\":[{\"from\":\"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\"to\":\"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\"gas\":\"0x76c0\",\"gasPrice\":\"0x9184e72a000\",\"value\":\"0x9184e72a\",\"data\":\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"},\"latest\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/call")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_call\",\"params\":[{\"from\":\"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\"to\":\"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\"gas\":\"0x76c0\",\"gasPrice\":\"0x9184e72a000\",\"value\":\"0x9184e72a\",\"data\":\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"},\"latest\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_call\",\"params\":[{\"from\":\"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\"to\":\"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\"gas\":\"0x76c0\",\"gasPrice\":\"0x9184e72a000\",\"value\":\"0x9184e72a\",\"data\":\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"},\"latest\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//call", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network/call")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_call\",\"params\":[{\"from\":\"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\"to\":\"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\"gas\":\"0x76c0\",\"gasPrice\":\"0x9184e72a000\",\"value\":\"0x9184e72a\",\"data\":\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"},\"latest\"],\"id\":1}")
.asString();
POST /call
Executes a new message call immediately without creating a transaction on the block chain.
Parameters
Object
[required]- The transaction call object
-
from
:DATA
, 20 Bytes - (optional) The address the transaction is sent from. -
to
:DATA
, 20 Bytes - The address the transaction is directed to. -
gas
:QUANTITY
- (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions. -
gasPrice
:QUANTITY
- (optional) Integer of the gasPrice used for each paid gas -
value
:QUANTITY
- (optional) Integer of the value sent with this transaction -
data
:DATA
- (optional) Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI -
QUANTITY|TAG
- integer block number, or the string"latest"
,"earliest"
or"pending"
, see the default block parameter
Returns
DATA
- the return value of executed contract.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
},
"latest"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | callrequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
estimateGas
Code samples
curl --request POST \
--url https://rpc.alph.network/estimateGas \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{"from":"0xb60e8dd61c5d32be8058bb8eb970870f07233155","to":"0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas":"0x76c0","gasPrice":"0x9184e72a000","value":"0x9184e72a","data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [
{
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//estimateGas");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network/estimateGas"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_estimateGas\",\"params\":[{\"from\":\"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\"to\":\"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\"gas\":\"0x76c0\",\"gasPrice\":\"0x9184e72a000\",\"value\":\"0x9184e72a\",\"data\":\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"}],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network/estimateGas")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_estimateGas\",\"params\":[{\"from\":\"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\"to\":\"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\"gas\":\"0x76c0\",\"gasPrice\":\"0x9184e72a000\",\"value\":\"0x9184e72a\",\"data\":\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"}],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_estimateGas\",\"params\":[{\"from\":\"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\"to\":\"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\"gas\":\"0x76c0\",\"gasPrice\":\"0x9184e72a000\",\"value\":\"0x9184e72a\",\"data\":\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"}],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//estimateGas", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//estimateGas")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_estimateGas\",\"params\":[{\"from\":\"0xb60e8dd61c5d32be8058bb8eb970870f07233155\",\"to\":\"0xd46e8dd67c5d32be8058bb8eb970870f07244567\",\"gas\":\"0x76c0\",\"gasPrice\":\"0x9184e72a000\",\"value\":\"0x9184e72a\",\"data\":\"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675\"}],\"id\":1}")
.asString();
POST /estimateGas
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
Parameters
See eth_call
parameters, expect that all properties are optional. If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to executed the call/transaction when the amount of gas is higher than the pending block gas limit.
Returns
QUANTITY
- the amount of gas used.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [
{
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | estimateGasRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getBlockByHash
Code samples
curl --request POST \
--url https://rpc.alph.network//getBlockByHash \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0x9326145f8a2c8c00bbe13afc7d7f3d9c868b5ef39d89f2f4e9390e9720298624",true],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": [
"0x9326145f8a2c8c00bbe13afc7d7f3d9c868b5ef39d89f2f4e9390e9720298624",
true
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getBlockByHash");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network//getBlockByHash"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByHash\",\"params\":[\"0x9326145f8a2c8c00bbe13afc7d7f3d9c868b5ef39d89f2f4e9390e9720298624\",true],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network//getBlockByHash")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByHash\",\"params\":[\"0x9326145f8a2c8c00bbe13afc7d7f3d9c868b5ef39d89f2f4e9390e9720298624\",true],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByHash\",\"params\":[\"0x9326145f8a2c8c00bbe13afc7d7f3d9c868b5ef39d89f2f4e9390e9720298624\",true],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getBlockByHash", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//getBlockByHash")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByHash\",\"params\":[\"0x9326145f8a2c8c00bbe13afc7d7f3d9c868b5ef39d89f2f4e9390e9720298624\",true],\"id\":1}")
.asString();
POST /getBlockByHash
Returns information about a block by hash.
Parameters
BLOCKHASH
[required] - a string representing a BLOCKHASHBoolean
[required] - If true it returns the full transaction objects, if false only the hashes of the transactions.
params: [
'0x9326145f8a2c8c00bbe13afc7d7f3d9c868b5ef39d89f2f4e9390e9720298624',
true
]
Returns
Object
- A block object, or null when no block was found:
-
number
:QUANTITY
- the block number. null when its pending block. -
hash
:DATA
, 32 Bytes - hash of the block.null
when its pending block. -
parentHash
:DATA
, 32 Bytes - hash of the parent block. -
nonce
:DATA
, 8 Bytes - hash of the generated proof-of-work.null
when its pending block. -
sha3Uncles
:DATA
, 32 Bytes - SHA3 of the uncles data in the block. -
logsBloom
:DATA
, 256 Bytes - the bloom filter for the logs of the block.null
when its pending block. -
transactionsRoot
:DATA
, 32 Bytes - the root of the transaction trie of the block. -
stateRoot
:DATA
, 32 Bytes - the root of the final state trie of the block. -
receiptsRoot
:DATA
, 32 Bytes - the root of the receipts trie of the block. -
miner
:DATA
, 20 Bytes - the address of the beneficiary to whom the mining rewards were given. -
difficulty
:QUANTITY
- integer of the difficulty for this block. -
totalDifficulty
:QUANTITY
- integer of the total difficulty of the chain until this block. -
extraData
:DATA
- the "extra data" field of this block. -
size
:QUANTITY
- integer the size of this block in bytes. -
gasLimit
:QUANTITY
- the maximum gas allowed in this block. -
gasUsed
:QUANTITY
- the total used gas by all transactions in this block. -
timestamp
:QUANTITY
- the unix timestamp for when the block was collated. -
transactions
:Array
- Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter. -
uncles
:Array
- Array of uncle hashes.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": [
"0x9326145f8a2c8c00bbe13afc7d7f3d9c868b5ef39d89f2f4e9390e9720298624",
true
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getBlockByHashRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getBlockByNumber
Code samples
curl --request POST \
--url https://rpc.alph.network//getBlockByNumber \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x0",true],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": [
"0x0",
true
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getBlockByNumber");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network//getBlockByNumber"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",true],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network//getBlockByNumber")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",true],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",true],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getBlockByNumber", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//getBlockByNumber")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x0\",true],\"id\":1}")
.asString();
POST /getBlockByNumber
Returns information about a block by block number.
Parameters
BLOCKNUMBER
[required] - a hex code of an integer representing the BLOCKNUMBER or one of the following special params:
-
latest
: get block data of the latest block -
pending
: get block data of pending block -
earliest
: get the genesis block
FULLTX
[required] - a boolean value specified whether you want to get transactions list or not
params: [
'0x0',
true
]
Returns
RETURN VALUE
- block data of the givenBLOCKNUMBER
See eth_getBlockByHash
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": [
"0x0",
true
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getBlockByNumberRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getBlockSignersByNumber
Code samples
curl --request POST \
--url https://rpc.alph.network//getBlockSignersByNumber \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getBlockSignersByNumber","params":["0xA61F98"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBlockSignersByNumber",
"params": [
"0xA61F98"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getBlockSignersByNumber");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network//getBlockSignersByNumber"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockSignersByNumber\",\"params\":[\"0xA61F98\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network//getBlockSignersByNumber")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockSignersByNumber\",\"params\":[\"0xA61F98\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockSignersByNumber\",\"params\":[\"0xA61F98\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getBlockSignersByNumber", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//getBlockSignersByNumber")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockSignersByNumber\",\"params\":[\"0xA61F98\"],\"id\":1}")
.asString();
POST /getBlockSignersByNumber
Returns the signers set of the block of given BLOCKNUMBER
.
Parameters
BLOCKNUMBER
[required] - a hex code of an integer representing the BLOCKNUMBER
or one of the following special params:
-
latest
: get block data of the latest block -
pending
: get block data of pending block -
earliest
: get the genesis block
params: [
'0xA61F98'
]
Returns
SIGNERS
- signers set of the block of givenBLOCKNUMBER
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getBlockSignersByNumber",
"params": [
"0xA61F98"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getBlockSignersByNumberRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getBlockSignersByHash
Code samples
curl --request POST \
--url https://rpc.alph.network//getBlockSignersByHash \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getBlockSignersByHash","params":["0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBlockSignersByHash",
"params": [
"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getBlockSignersByHash");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network//getBlockSignersByHash"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockSignersByHash\",\"params\":[\"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network//getBlockSignersByHash")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockSignersByHash\",\"params\":[\"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockSignersByHash\",\"params\":[\"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getBlockSignersByHash", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//getBlockSignersByHash")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockSignersByHash\",\"params\":[\"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f\"],\"id\":1}")
.asString();
POST /getBlockSignersByHash
Returns the signers set of the block of given BLOCKHASH
.
Parameters
BLOCKHASH
[required] - a string representing aBLOCKHASH
params: [
'0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f'
]
Returns
SIGNERS
- signers set of the block of givenBLOCKHASH
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getBlockSignersByHash",
"params": [
"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getBlockSignersByHashRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getBlockFinalityByNumber
Code samples
curl --request POST \
--url https://rpc.alph.network//getBlockFinalityByNumber \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getBlockFinalityByNumber","params":["0xA61F98"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBlockFinalityByNumber",
"params": [
"0xA61F98"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getBlockFinalityByNumber");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network//getBlockFinalityByNumber"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockFinalityByNumber\",\"params\":[\"0xA61F98\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network//getBlockFinalityByNumber")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockFinalityByNumber\",\"params\":[\"0xA61F98\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockFinalityByNumber\",\"params\":[\"0xA61F98\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getBlockFinalityByNumber", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//getBlockFinalityByNumber")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockFinalityByNumber\",\"params\":[\"0xA61F98\"],\"id\":1}")
.asString();
POST /getBlockFinalityByNumber
Returns the the finality of the block of given BLOCKNUMBER.
Parameters
-
BLOCKNUMBER
[required] - a hex code of an integer representing theBLOCKNUMBER
or one of the following special params:-
latest
: get block data of the latest block -
pending
: get block data of pending block -
earliest
: get the genesis block
-
params: [
'0xA61F98'
]
Returns
BLOCK_FINALITY
- integer of the the finality of the block of givenBLOCKNUMBER
.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getBlockFinalityByNumber",
"params": [
"0xA61F98"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getBlockFinalityByNumberRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getBlockFinalityByHash
Code samples
curl --request POST \
--url https://rpc.alph.network//getBlockFinalityByHash \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getBlockFinalityByHash","params":["0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getBlockFinalityByHash",
"params": [
"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getBlockFinalityByHash");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network//getBlockFinalityByHash"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockFinalityByHash\",\"params\":[\"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network//getBlockFinalityByHash")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockFinalityByHash\",\"params\":[\"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockFinalityByHash\",\"params\":[\"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getBlockFinalityByHash", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//getBlockFinalityByHash")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockFinalityByHash\",\"params\":[\"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f\"],\"id\":1}")
.asString();
POST /getBlockFinalityByHash
Returns the the finality of the block of given BLOCKHASH
.
Parameters
BLOCKHASH
[required] - a string representing a BLOCKHASH
params: [
'0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f'
]
Returns
BLOCK_FINALITY
- integer of the the finality of the block of givenBLOCKHASH
.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getBlockFinalityByHash",
"params": [
"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getBlockFinalityByHashRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getCandidates
Code samples
curl --request POST \
--url https://rpc.alph.network//getCandidates \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getCandidates","params":["latest"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getCandidates",
"params": [
"latest"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getCandidates");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network//getCandidates"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCandidates\",\"params\":[\"latest\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network//getCandidates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCandidates\",\"params\":[\"latest\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCandidates\",\"params\":[\"latest\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getCandidates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//getCandidates")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCandidates\",\"params\":[\"latest\"],\"id\":1}")
.asString();
POST /getCandidates
Returns the statuses of all candidates at a specific epoch
Parameters
-
EPOCH_NUMBER
[required] - a hex code of an integer representing theEPOCH_NUMBER
or the following special param:latest
: get the status of candidate at the current time
params: [
'latest'
]
Returns
-
EPOCH
- the epoch number of the query of this request -
CANDIDATES
- list of candidates along with their statuses and capacities-
STATUS
- a string representing status of the corresponding candidate -
MASTERNODE
- if the candidate is a masternode -
SLASHED
- if the candidate is slashed -
PROPOSED
- if the candidate is proposed, have not been a masternode yet -
empty string
- if it's not a candidate
-
-
CAPACITY
- capacity of the corresponding candidate -
SUCCESS
- true if the request is successful, otherwise it's false
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getCandidates",
"params": [
"latest"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getCandidatesRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getCandidateStatus
Code samples
curl --request POST \
--url https://rpc.alph.network//getCandidateStatus \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getCandidateStatus","params":["0x1d50df657b6dce50bac634bf18e2d986d807e940","latest"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getCandidateStatus",
"params": [
"0x1d50df657b6dce50bac634bf18e2d986d807e940",
"latest"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getCandidateStatus");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network//getCandidateStatus"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCandidateStatus\",\"params\":[\"0x1d50df657b6dce50bac634bf18e2d986d807e940\",\"latest\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network//getCandidateStatus")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCandidateStatus\",\"params\":[\"0x1d50df657b6dce50bac634bf18e2d986d807e940\",\"latest\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCandidateStatus\",\"params\":[\"0x1d50df657b6dce50bac634bf18e2d986d807e940\",\"latest\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getCandidateStatus", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//getCandidateStatus")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getCandidateStatus\",\"params\":[\"0x1d50df657b6dce50bac634bf18e2d986d807e940\",\"latest\"],\"id\":1}")
.asString();
POST /getCandidateStatus
Returns the status of the candidate of given COINBASE_ADDRESS
at a specific epoch
Parameters
-
COINBASE_ADDRESS
[required] - a string representing aCOINBASE_ADDRESS
(length: 40, start with 0x ) -
EPOCH_NUMBER
[required] - a hex code of an integer representing theEPOCH_NUMBER
or the following special param:latest
: get the status of candidate at the current time
params: [
'0x1d50df657b6dce50bac634bf18e2d986d807e940',
'latest'
]
Returns
-
STATUS
- a string representing status of the candicate of givenCOINBASE_ADDRESS
-
MASTERNODE
- if the candidate is a masternode -
SLASHED
- if the candidate is slashed -
PROPOSED
- if the candidate is proposed, have not been a masternode yet -
empty string
- if it's not a candidate
-
-
CAPACITY
- capacity of the candidate -
EPOCH
- the epoch number of the query of this request -
SUCCESS
- true if the request is successful, otherwise it's false
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getCandidateStatus",
"params": [
"0x1d50df657b6dce50bac634bf18e2d986d807e940",
"latest"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getCandidateStatusRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getTransactionByHash
Code samples
curl --request POST \
--url https://rpc.alph.network//getTransactionByHash \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0xd83b26e101dd6480764bade90fc283407919f60b7e65ff83fbf6cdc92f1138a1"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": [
"0xd83b26e101dd6480764bade90fc283407919f60b7e65ff83fbf6cdc92f1138a1"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getTransactionByHash");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network//getTransactionByHash"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByHash\",\"params\":[\"0xd83b26e101dd6480764bade90fc283407919f60b7e65ff83fbf6cdc92f1138a1\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network//getTransactionByHash")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByHash\",\"params\":[\"0xd83b26e101dd6480764bade90fc283407919f60b7e65ff83fbf6cdc92f1138a1\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByHash\",\"params\":[\"0xd83b26e101dd6480764bade90fc283407919f60b7e65ff83fbf6cdc92f1138a1\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getTransactionByHash", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//getTransactionByHash")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByHash\",\"params\":[\"0xd83b26e101dd6480764bade90fc283407919f60b7e65ff83fbf6cdc92f1138a1\"],\"id\":1}")
.asString();
POST /getTransactionByHash
Returns the information about a transaction requested by transaction hash.
Parameters
DATA
, 32 Bytes - hash of a transaction
params: [
"0xd83b26e101dd6480764bade90fc283407919f60b7e65ff83fbf6cdc92f1138a1"
]
Returns
Object
- A transaction object, or null when no transaction was found:
-
hash
:DATA
, 32 Bytes - hash of the transaction. -
nonce
:QUANTITY
- the number of transactions made by the sender prior to this one. -
blockHash
:DATA
, 32 Bytes - hash of the block where this transaction was in.null
when its pending. -
blockNumber
:QUANTITY
- block number where this transaction was in.null
when its pending. -
transactionIndex
:QUANTITY
- integer of the transactions index position in the block.null
when its pending. -
from
:DATA
, 20 Bytes - address of the sender. -
to
:DATA
, 20 Bytes - address of the receiver.null
when its a contract creation transaction. -
value
:QUANTITY
- value transferred in Wei. -
gasPrice
:QUANTITY
- gas price provided by the sender in Wei. -
gas
:QUANTITY
- gas provided by the sender. -
input
:DATA
- the data send along with the transaction.
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": [
"0xd83b26e101dd6480764bade90fc283407919f60b7e65ff83fbf6cdc92f1138a1"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getTransactionByHashRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getTransactionByBlockHashAndIndex
Code samples
curl --request POST \
--url https://rpc.alph.network//getTransactionByBlockHashAndIndex \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":["0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7","0x0"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockHashAndIndex",
"params": [
"0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7",
"0x0"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getTransactionByBlockHashAndIndex");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network//getTransactionByBlockHashAndIndex"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByBlockHashAndIndex\",\"params\":[\"0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7\",\"0x0\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network//getTransactionByBlockHashAndIndex")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByBlockHashAndIndex\",\"params\":[\"0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7\",\"0x0\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByBlockHashAndIndex\",\"params\":[\"0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7\",\"0x0\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getTransactionByBlockHashAndIndex", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//getTransactionByBlockHashAndIndex")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByBlockHashAndIndex\",\"params\":[\"0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7\",\"0x0\"],\"id\":1}")
.asString();
POST /getTransactionByBlockHashAndIndex
Returns information about a transaction by block hash and transaction index position. Parameters
DATA
, 32 Bytes - hash of a block.QUANTITY
- integer of the transaction index position.
params: [
'0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7',
'0x0' // 0
]
Returns
See eth_getTransactionByHash
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockHashAndIndex",
"params": [
"0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7",
"0x0"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getTransactionByBlockHashAndIndexRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getTransactionByBlockNumberAndIndex
Code samples
curl --request POST \
--url https://rpc.alph.network//getTransactionByBlockNumberAndIndex \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params":["0x52A96E","0x1"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockNumberAndIndex",
"params": [
"0x52A96E",
"0x1"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getTransactionByBlockNumberAndIndex");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network//getTransactionByBlockNumberAndIndex"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByBlockNumberAndIndex\",\"params\":[\"0x52A96E\",\"0x1\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network//getTransactionByBlockNumberAndIndex")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByBlockNumberAndIndex\",\"params\":[\"0x52A96E\",\"0x1\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByBlockNumberAndIndex\",\"params\":[\"0x52A96E\",\"0x1\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getTransactionByBlockNumberAndIndex", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//getTransactionByBlockNumberAndIndex")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByBlockNumberAndIndex\",\"params\":[\"0x52A96E\",\"0x1\"],\"id\":1}")
.asString();
POST /getTransactionByBlockNumberAndIndex
Returns information about a transaction by block number and transaction index position.
Parameters
QUANTITY|TAG
- a block number, or the string"earliest"
,"latest"
or"pending"
, as in the default block parameter.QUANTITY
- the transaction index position.
params: [
'0x29c', // 668
'0x0' // 0
]
Returns
See eth_getTransactionByHash
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockNumberAndIndex",
"params": [
"0x52A96E",
"0x1"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getTransactionByBlockNumberAndIndexRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
getTransactionReceipt
Code samples
curl --request POST \
--url https://rpc.alph.network//getTransactionReceipt \
--header 'content-type: application/json' \
--data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f"],"id":1}'
var data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f"
],
"id": 1
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://rpc.alph.network//getTransactionReceipt");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rpc.alph.network//getTransactionReceipt"
payload := strings.NewReader("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionReceipt\",\"params\":[\"0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f\"],\"id\":1}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
require 'uri'
require 'net/http'
url = URI("https://rpc.alph.network//getTransactionReceipt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionReceipt\",\"params\":[\"0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f\"],\"id\":1}"
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("rpc.alph.network")
payload = "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionReceipt\",\"params\":[\"0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f\"],\"id\":1}"
headers = { 'content-type': "application/json" }
conn.request("POST", "//getTransactionReceipt", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
HttpResponse response = Unirest.post("https://rpc.alph.network//getTransactionReceipt")
.header("content-type", "application/json")
.body("{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionReceipt\",\"params\":[\"0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f\"],\"id\":1}")
.asString();
POST /getTransactionReceipt
Returns the receipt of a transaction by transaction hash.
Note: That the receipt is not available for pending transactions.
Parameters
-
DATA
, 32 Bytes - hash of a transactionparams: [ '0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238' ]
Returns
Object
- A transaction receipt object, or null
when no receipt was found:
-
transactionHash
:DATA
, 32 Bytes - hash of the transaction. -
transactionIndex
:QUANTITY
- integer of the transactions index position in the block. -
blockHash
:DATA
, 32 Bytes - hash of the block where this transaction was in. -
blockNumber
:QUANTITY
- block number where this transaction was in. -
cumulativeGasUsed
:QUANTITY
- The total amount of gas used when this transaction was executed in the block. -
gasUsed
:QUANTITY
- The amount of gas used by this specific transaction alone. -
contractAddress
:DATA
, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwisenull
. -
logs
:Array
- Array of log objects, which this transaction generated. -
logsBloom
:DATA
, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs.
It also returns either :
-
root
:DATA
32 bytes of post-transaction stateroot (pre Byzantium) -
status
:QUANTITY
either1
(success) or0
(failure)
Body parameter
{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f"
],
"id": 1
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | getTransactionReceiptRequest | true | none |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful Operation | None |
500 | Internal Server Error | Internal Server Error | None |
Schemas
clientVersionRequest
{
"jsonrpc": "2.0",
"method": "web3_clientVersion",
"params": [],
"id": 1
}
clientVersionRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
sha3request
{
"jsonrpc": "2.0",
"method": "web3_sha3",
"params": [
"0x68656c6c6f20776f726c64"
],
"id": 64
}
sha3request
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
versionrequest
{
"jsonrpc": "2.0",
"method": "net_version",
"params": [],
"id": 67
}
versionrequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
listeningrequest
{
"jsonrpc": "2.0",
"method": "net_listening",
"params": [],
"id": 67
}
listeningrequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
peerCountRequest
{
"jsonrpc": "2.0",
"method": "net_peerCount",
"params": [],
"id": 74
}
peerCountRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
protocolVersionRequest
{
"jsonrpc": "2.0",
"method": "eth_protocolVersion",
"params": [],
"id": 67
}
protocolVersionRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
syncingrequest
{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 1
}
syncingrequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
coinbaserequest
{
"jsonrpc": "2.0",
"method": "eth_coinbase",
"params": [],
"id": 64
}
coinbaserequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
gasPriceRequest
{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 73
}
gasPriceRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
accountsrequest
{
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 1
}
accountsrequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
blockNumberRequest
{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 83
}
blockNumberRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getBalanceRequest
{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": [
"0x2b5634c42055806a59e9107ed44d43c426e58258",
"latest"
],
"id": 1
}
getBalanceRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getStorageAtRequest
{
"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": [
"0x295a70b2de5e3953354a6a8344e616ed314d7251",
"0x0",
"latest"
],
"id": 1
}
getStorageAtRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getTransactionCountRequest
{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": [
"0xbf1dcb735e512b731abd3404c15df6431bd03d42",
"latest"
],
"id": 1
}
getTransactionCountRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getBlockTransactionCountByHashRequest
{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": [
"0xc8b967161c671ce952a3d50987a78d64157fb5a8e1724804b87d3e9b11e3aa34"
],
"id": 1
}
getBlockTransactionCountByHashRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getBlockTransactionCountByNumberRequest
{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": [
"0x52A8CA"
],
"id": 1
}
getBlockTransactionCountByNumberRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getCodeRequest
{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": [
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x2"
],
"id": 1
}
getCodeRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
signrequest
{
"jsonrpc": "2.0",
"method": "eth_sign",
"params": [
"0x9b2055d370f73ec7d8a03e965129118dc8f5bf83",
"0xdeadbeaf"
],
"id": 1
}
signrequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
sendTransactionRequest
{
"jsonrpc": "2.0",
"method": "eth_sendTransaction",
"params": [
{
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}
],
"id": 1
}
sendTransactionRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [Param] | true | none | none |
id | integer(int32) | true | none | none |
Param
{
"from": 1.0393608864131634e+48,
"to": 1.2127714812045434e+48,
"gas": 30400,
"gasPrice": 10000000000000,
"value": 2441406250,
"data": 4.537516814050981e+98
}
Param
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
from | string | true | none | none |
to | string | true | none | none |
gas | string | true | none | none |
gasPrice | string | true | none | none |
value | string | true | none | none |
data | string | true | none | none |
sendRawTransactionRequest
{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": [
"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
],
"id": 1
}
sendRawTransactionRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
callrequest
{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
},
"latest"
],
"id": 1
}
callrequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [Param1] | true | none | none |
id | integer(int32) | true | none | none |
Param1
{
"from": "",
"to": "",
"gas": "",
"gasPrice": "",
"value": "",
"data": ""
}
Param1
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
from | string | false | none | none |
to | string | false | none | none |
gas | string | false | none | none |
gasPrice | string | false | none | none |
value | string | false | none | none |
data | string | false | none | none |
estimateGasRequest
{
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [
{
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}
],
"id": 1
}
estimateGasRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getBlockByHashRequest
{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": [
"0x9326145f8a2c8c00bbe13afc7d7f3d9c868b5ef39d89f2f4e9390e9720298624",
true
],
"id": 1
}
getBlockByHashRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getBlockByNumberRequest
{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": [
"0x0",
true
],
"id": 1
}
getBlockByNumberRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getBlockSignersByNumberRequest
{
"jsonrpc": "2.0",
"method": "eth_getBlockSignersByNumber",
"params": [
"0xA61F98"
],
"id": 1
}
getBlockSignersByNumberRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getBlockSignersByHashRequest
{
"jsonrpc": "2.0",
"method": "eth_getBlockSignersByHash",
"params": [
"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f"
],
"id": 1
}
getBlockSignersByHashRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getBlockFinalityByNumberRequest
{
"jsonrpc": "2.0",
"method": "eth_getBlockFinalityByNumber",
"params": [
"0xA61F98"
],
"id": 1
}
getBlockFinalityByNumberRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getBlockFinalityByHashRequest
{
"jsonrpc": "2.0",
"method": "eth_getBlockFinalityByHash",
"params": [
"0x605777ee60ef3ccf21e079fa1b091b0196cf1a2c1dd7c088dd5b1ab03f680b6f"
],
"id": 1
}
getBlockFinalityByHashRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getTransactionByHashRequest
{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": [
"0xd83b26e101dd6480764bade90fc283407919f60b7e65ff83fbf6cdc92f1138a1"
],
"id": 1
}
getTransactionByHashRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getTransactionByBlockHashAndIndexRequest
{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockHashAndIndex",
"params": [
"0x3c82bc62179602b67318c013c10f99011037c49cba84e31ffe6e465a21c521a7",
"0x0"
],
"id": 1
}
getTransactionByBlockHashAndIndexRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getTransactionByBlockNumberAndIndexRequest
{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockNumberAndIndex",
"params": [
"0x52A96E",
"0x1"
],
"id": 1
}
getTransactionByBlockNumberAndIndexRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getTransactionReceiptRequest
{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0xa3ece39ae137617669c6933b7578b94e705e765683f260fcfe30eaa41932610f"
],
"id": 1
}
getTransactionReceiptRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getCandidatesRequest
{
"jsonrpc": "2.0",
"method": "eth_getCandidates",
"params": [
"latest"
],
"id": 1
}
getCandidateStatusRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |
getCandidateStatusRequest
{
"jsonrpc": "2.0",
"method": "eth_getCandidateStatus",
"params": [
"0x1d50df657b6dce50bac634bf18e2d986d807e940",
"latest"
],
"id": 1
}
getCandidateStatusRequest
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jsonrpc | string | true | none | none |
method | string | true | none | none |
params | [string] | true | none | none |
id | integer(int32) | true | none | none |