Verify Signature
Verifies a signature (including ZkLogin) against a message and optional address.
Service
sui.rpc.v2.SignatureVerificationService
Parity
Direct
This method has a direct mapping from the JSON-RPC method sui_verifyZkLoginSignature.
Request
Parameters
The request requires a message, signature details, and optionally an address to verify against:
{
"message": {
"name": "PersonalMessage",
"value": "SGVsbG8sIFN1aSE="
},
"signature": {
"scheme": "ED25519",
"signature": "BASE64_ENCODED_SIGNATURE",
"public_key": "BASE64_ENCODED_PUBLIC_KEY"
},
"address": "0xOPTIONAL_VERIFY_AGAINST_THIS_ADDRESS"
}
Parameter Details:
message.name: Type of message (e.g., "PersonalMessage", "TransactionData")message.value: Base64-encoded message bytessignature.scheme: Signature scheme ("ED25519", "SECP256K1", "SECP256R1", etc.)signature.signature: Base64-encoded signature bytessignature.public_key: Base64-encoded public key bytesaddress: (Optional) Sui address to verify the signature belongs to
Example (grpcurl)
grpcurl -H "x-api-key: YOUR_API_KEY" \
-d '{
"message": {
"name": "PersonalMessage",
"value": "SGVsbG8sIFN1aSE="
},
"signature": {
"scheme": "ED25519",
"signature": "YOUR_BASE64_SIGNATURE",
"public_key": "YOUR_BASE64_PUBLIC_KEY"
},
"address": "0xYOUR_ADDRESS"
}' \
grpc.surflux.dev:443 \
sui.rpc.v2.SignatureVerificationService/VerifySignature
Response
The response indicates whether the signature is valid and provides details if invalid.
Response Fields
| Field | Type | Description |
|---|---|---|
is_valid | bool | Whether the signature is cryptographically valid |
reason | string | Explanation if signature is invalid (e.g., "Invalid public key", "Signature mismatch") |
Example Response
{
"is_valid": true,
"reason": ""
}
Or if invalid:
{
"is_valid": false,
"reason": "Signature verification failed: public key does not match address"
}
info
For full field definitions and supported signature schemes, refer to the Sui Protobuf definitions.
Supported Signature Schemes
- ED25519 - Edwards-curve Digital Signature Algorithm
- SECP256K1 - Used by Bitcoin and Ethereum
- SECP256R1 - NIST P-256 curve
- MULTISIG - Multi-signature verification
- ZKLOGIN - Zero-knowledge login signatures