starknet_specVersion RPC Method
Parameters
This method does not accept any parameters
Returns
result
string
The semantic versioning specification (Semver) of Starknet's JSON-RPC spec being used
Request
# Note: You can specify Starknet version in the URL path # Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.6 curl --location 'https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data '{ "id": 1, "jsonrpc": "2.0", "method": "starknet_specVersion", "params": [] }'
// Note: You can specify Starknet version in the URL path // Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.6 const myHeaders = new Headers(); myHeaders.append("accept", "application/json"); myHeaders.append("content-type", "application/json"); const raw = JSON.stringify({ "id": 1, "jsonrpc": "2.0", "method": "starknet_specVersion", "params": [] }); const requestOptions = { method: "POST", headers: myHeaders, body: raw, redirect: "follow" }; fetch("https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8", requestOptions) .then((response) => response.text()) .then((result) => console.log(result)) .catch((error) => console.error(error));
# Note: You can specify Starknet version in the URL path # Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.6 import requests import json url = "https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8" payload = json.dumps({ "id": 1, "jsonrpc": "2.0", "method": "starknet_specVersion", "params": [] }) headers = { 'accept': 'application/json', 'content-type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
# Note: You can specify Starknet version in the URL path # Example: /rpc/v0_8 for version 0.8, /rpc/v0_6 for version 0.6 require "uri" require "json" require "net/http" url = URI("https://docs-demo.strk-mainnet.quiknode.pro/rpc/v0_8") http = Net::HTTP.new(url.host, url.port); request = Net::HTTP::Post.new(url) request["accept"] = "application/json" request["content-type"] = "application/json" request.body = JSON.dump({ "id": 1, "jsonrpc": "2.0", "method": "starknet_specVersion", "params": [] }) response = http.request(request) puts response.read_body
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free