Actions11
Overview
The node provides functionality to verify a cryptographic signature on the Solana blockchain network. Specifically, it checks whether a given signature is valid for a provided message and public key. This operation is useful in scenarios where you need to confirm the authenticity and integrity of messages signed by a Solana wallet or application.
Practical examples include:
- Verifying that a user has signed a message to prove ownership of a Solana address.
- Confirming the validity of off-chain signed data before processing transactions or granting access.
- Ensuring that messages received from external sources are authentic and untampered.
Properties
Name | Meaning |
---|---|
Message | The original message string that was signed and needs verification. |
Signature | The base58 encoded signature to verify against the message. |
Public Key | The base58 encoded public key corresponding to the private key that created the signature. |
Output
The output JSON contains the following fields:
success
: A boolean indicating if the verification process completed successfully.isValid
: A boolean indicating whether the signature is valid for the given message and public key.operation
: The name of the operation performed, here always"verifySignature"
.
Example output:
{
"success": true,
"isValid": true,
"operation": "verifySignature"
}
This node does not output binary data.
Dependencies
- Requires an active connection to the Solana network via an RPC URL.
- Needs credentials containing a private key and RPC URL to instantiate the Solana connection.
- Uses the
tweetnacl
library for cryptographic signature verification. - Uses
bs58
encoding/decoding for handling base58 strings (common in Solana keys and signatures).
Troubleshooting
- Missing Inputs: If the message, signature, or public key is missing, the node throws an error stating all three are required.
- Invalid Base58 Encoding: If the signature or public key is not properly base58 encoded, decoding will fail, causing errors.
- Invalid Signature: If the signature does not match the message and public key, the output will indicate
isValid: false
but this is not an error—just a failed verification. - Credential Issues: If no credentials are provided or the private key is invalid, the node will throw an error about missing credentials.
- Network Errors: Since the node connects to the Solana RPC endpoint, network issues or incorrect RPC URLs can cause failures.
To resolve common errors:
- Ensure all required inputs are provided and correctly formatted.
- Verify that the signature and public key are valid base58 strings.
- Check that the RPC URL and private key credentials are correctly configured.
- Use try/catch or enable "Continue On Fail" to handle individual item errors gracefully.