跳转到主要内容
POST
/
getGenesisHash
curl --request POST \
  --url https://mainnet.helius-rpc.com/ \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "getGenesisHash"
}'
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": "GH7ome3EiwEr7tu9JuTh2dpYWBJK3z69Xm1ZE3MEE6JC"
}

Authorizations

api-key
string
query
required

您的Helius API密钥。您可以在仪表板中免费获取一个。

Body

application/json
jsonrpc
enum<string>
default:2.0

JSON-RPC协议版本。

Available options:
2.0
Example:

"2.0"

id
string
default:1

请求的唯一标识符。

Example:

"1"

method
enum<string>
default:getGenesisHash

要调用的RPC方法名称。

Available options:
getGenesisHash
Example:

"getGenesisHash"

Response

成功检索到创世哈希。

jsonrpc
enum<string>

JSON-RPC协议版本。

Available options:
2.0
Example:

"2.0"

id
string

与请求匹配的标识符。

Example:

"1"

result
string

唯一的创世哈希(base-58 编码),用于加密识别此特定的 Solana 区块链网络(在主网、测试网、开发网中不同)。

Example:

"GH7ome3EiwEr7tu9JuTh2dpYWBJK3z69Xm1ZE3MEE6JC"

I