Network
getIdentity
Returns the identity pubkey for the current node
Parameters
This method does not require any parameters.
Response
Code Examples
Basic Request
Using web3.js
Using Python
Notes
- Returns the identity public key of the validator node you’re connected to
- Useful for identifying which node you’re communicating with
- The response is immediate as it reads from the node’s configuration
- Can be used to verify you’re connected to the expected node
Best Practices
- Use this method when troubleshooting node connectivity issues
- Compare returned identity with expected node identity for validation
- Handle network errors and retry when appropriate