Get account and storage proofs
curl --request POST \
--url https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getProof",
"params": [
"0x000000000000000000000000000000000000B5D5",
[
"0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d"
],
"finalized"
]
}
'import requests
url = "https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getProof",
"params": ["0x000000000000000000000000000000000000B5D5", ["0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d"], "finalized"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'eth_getProof',
params: [
'0x000000000000000000000000000000000000B5D5',
['0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d'],
'finalized'
]
})
};
fetch('https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'eth_getProof',
'params' => [
'0x000000000000000000000000000000000000B5D5',
[
'0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d'
],
'finalized'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"eth_getProof\",\n \"params\": [\n \"0x000000000000000000000000000000000000B5D5\",\n [\n \"0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d\"\n ],\n \"finalized\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"eth_getProof\",\n \"params\": [\n \"0x000000000000000000000000000000000000B5D5\",\n [\n \"0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d\"\n ],\n \"finalized\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"eth_getProof\",\n \"params\": [\n \"0x000000000000000000000000000000000000B5D5\",\n [\n \"0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d\"\n ],\n \"finalized\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 123,
"result": {
"address": "<string>",
"balance": "<string>",
"nonce": "<string>",
"codeHash": "<string>",
"storageHash": "<string>",
"accountProof": [
"<string>"
],
"storageProof": [
{
"key": "<string>",
"value": "<string>",
"proof": [
"<string>"
]
}
]
}
}State
Get account and storage proofs
Returns EIP-1186 account and storage proofs against the selected block state root. Proof availability depends on the node retaining that state. The balance field is the native EVM account balance, not the default ALT20 balance returned by Alta eth_getBalance. To prove an ALT20 balance, query the token contract and its balance storage slot. Verify proofs against a trusted finalized header. See https://eips.ethereum.org/EIPS/eip-1186 for the standard response fields.
POST
/
eth_getProof
Get account and storage proofs
curl --request POST \
--url https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getProof",
"params": [
"0x000000000000000000000000000000000000B5D5",
[
"0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d"
],
"finalized"
]
}
'import requests
url = "https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof"
payload = {
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getProof",
"params": ["0x000000000000000000000000000000000000B5D5", ["0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d"], "finalized"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'eth_getProof',
params: [
'0x000000000000000000000000000000000000B5D5',
['0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d'],
'finalized'
]
})
};
fetch('https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jsonrpc' => '2.0',
'id' => 1,
'method' => 'eth_getProof',
'params' => [
'0x000000000000000000000000000000000000B5D5',
[
'0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d'
],
'finalized'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof"
payload := strings.NewReader("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"eth_getProof\",\n \"params\": [\n \"0x000000000000000000000000000000000000B5D5\",\n [\n \"0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d\"\n ],\n \"finalized\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof")
.header("Content-Type", "application/json")
.body("{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"eth_getProof\",\n \"params\": [\n \"0x000000000000000000000000000000000000B5D5\",\n [\n \"0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d\"\n ],\n \"finalized\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rpc-testnet.metalntwx.com/v1/{endpointId}/eth_getProof")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"eth_getProof\",\n \"params\": [\n \"0x000000000000000000000000000000000000B5D5\",\n [\n \"0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d\"\n ],\n \"finalized\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"jsonrpc": "2.0",
"id": 123,
"result": {
"address": "<string>",
"balance": "<string>",
"nonce": "<string>",
"codeHash": "<string>",
"storageHash": "<string>",
"accountProof": [
"<string>"
],
"storageProof": [
{
"key": "<string>",
"value": "<string>",
"proof": [
"<string>"
]
}
]
}
}Body
application/json