AptosAptos Network's breakthrough technology and seamless user experience are now available on QuickNode.

Start building today!     

Contents

getIdentity RPC Method

The API credit value for this method is 1 . To learn more about API credits and each method's value, visit the API Credits page.

Parameters:

  1. None

Returns:

  1. result - The result will be a JSON object with the following fields:

    identity - The public key identity of the current node as base-58 encoded string

Code Examples:

require "uri"
require "json"
require "net/http"

url = URI("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getIdentity"
})

response = https.request(request)
puts response.read_body
Ready to get started? Create a free account