The example verifies a personal-message signature. Supply the original message bytes as Base64, the serialized Sui signature as Base64, and the signer's address. Use TRANSACTION_DATA for a transaction signature.
Parameters
- messagestringREQUIRED
Base64-encoded message bytes
- signaturestringREQUIRED
Base64-encoded serialized Sui signature (scheme flag, signature bytes, and public key)
- intentScopestringREQUIRED
Intent scope: PERSONAL_MESSAGE or TRANSACTION_DATA
- authorstringREQUIRED
Sui address expected to have signed the message
Returns
- dataobject
GraphQL response data
- verifySignatureobject | null
Signature verification result, or null if verification fails with a GraphQL error
- successboolean
Whether the signature was verified successfully
Request
1curl --location 'https://docs-demo.sui-mainnet.quiknode.pro/graphql' \2--header 'Accept: application/json' \3--header 'Content-Type: application/json' \4--data '{5"query": "query($message: Base64!, $signature: Base64!, $intentScope: IntentScope!, $author: SuiAddress!) { verifySignature(message: $message, signature: $signature, intentScope: $intentScope, author: $author) { success } }",6"variables": {7"message": "UXVpY2tOb2RlIGRvY3VtZW50YXRpb24gc2lnbmF0dXJlIHZlcmlmaWNhdGlvbg==",8"signature": "AF0IRLakHGMIb/4Z04xTIQ8Z40s3q8kuILee9kNIATTrjh8Pk29n7p/v+XvpZ8Dk8GSJNQeD1bpIREItiucs/QnEzVIMCfSCS2EhNlK35E960HRrM8oNMYemNGx0oVJWQQ==",9"intentScope": "PERSONAL_MESSAGE",10"author": "0xd3c5931dc1e196d597e8a510473ea20ec9341faab00bc15a035a633a19df6e0d"11}12}'13
1curl --location 'https://docs-demo.sui-mainnet.quiknode.pro/graphql' \2--header 'Accept: application/json' \3--header 'Content-Type: application/json' \4--data '{5"query": "query($message: Base64!, $signature: Base64!, $intentScope: IntentScope!, $author: SuiAddress!) { verifySignature(message: $message, signature: $signature, intentScope: $intentScope, author: $author) { success } }",6"variables": {7"message": "UXVpY2tOb2RlIGRvY3VtZW50YXRpb24gc2lnbmF0dXJlIHZlcmlmaWNhdGlvbg==",8"signature": "AF0IRLakHGMIb/4Z04xTIQ8Z40s3q8kuILee9kNIATTrjh8Pk29n7p/v+XvpZ8Dk8GSJNQeD1bpIREItiucs/QnEzVIMCfSCS2EhNlK35E960HRrM8oNMYemNGx0oVJWQQ==",9"intentScope": "PERSONAL_MESSAGE",10"author": "0xd3c5931dc1e196d597e8a510473ea20ec9341faab00bc15a035a633a19df6e0d"11}12}'13
1const myHeaders = new Headers();2myHeaders.append("Accept", "application/json");3myHeaders.append("Content-Type", "application/json");45const raw = JSON.stringify({6"query": "query($message: Base64!, $signature: Base64!, $intentScope: IntentScope!, $author: SuiAddress!) { verifySignature(message: $message, signature: $signature, intentScope: $intentScope, author: $author) { success } }",7"variables": {8"message": "UXVpY2tOb2RlIGRvY3VtZW50YXRpb24gc2lnbmF0dXJlIHZlcmlmaWNhdGlvbg==",9"signature": "AF0IRLakHGMIb/4Z04xTIQ8Z40s3q8kuILee9kNIATTrjh8Pk29n7p/v+XvpZ8Dk8GSJNQeD1bpIREItiucs/QnEzVIMCfSCS2EhNlK35E960HRrM8oNMYemNGx0oVJWQQ==",10"intentScope": "PERSONAL_MESSAGE",11"author": "0xd3c5931dc1e196d597e8a510473ea20ec9341faab00bc15a035a633a19df6e0d"12}13});1415const requestOptions = {16method: "POST",17headers: myHeaders,18body: raw,19redirect: "follow"20};2122fetch("https://docs-demo.sui-mainnet.quiknode.pro/graphql", requestOptions)23.then((response) => response.text())24.then((result) => console.log(result))25.catch((error) => console.error(error));26
1const myHeaders = new Headers();2myHeaders.append("Accept", "application/json");3myHeaders.append("Content-Type", "application/json");45const raw = JSON.stringify({6"query": "query($message: Base64!, $signature: Base64!, $intentScope: IntentScope!, $author: SuiAddress!) { verifySignature(message: $message, signature: $signature, intentScope: $intentScope, author: $author) { success } }",7"variables": {8"message": "UXVpY2tOb2RlIGRvY3VtZW50YXRpb24gc2lnbmF0dXJlIHZlcmlmaWNhdGlvbg==",9"signature": "AF0IRLakHGMIb/4Z04xTIQ8Z40s3q8kuILee9kNIATTrjh8Pk29n7p/v+XvpZ8Dk8GSJNQeD1bpIREItiucs/QnEzVIMCfSCS2EhNlK35E960HRrM8oNMYemNGx0oVJWQQ==",10"intentScope": "PERSONAL_MESSAGE",11"author": "0xd3c5931dc1e196d597e8a510473ea20ec9341faab00bc15a035a633a19df6e0d"12}13});1415const requestOptions = {16method: "POST",17headers: myHeaders,18body: raw,19redirect: "follow"20};2122fetch("https://docs-demo.sui-mainnet.quiknode.pro/graphql", requestOptions)23.then((response) => response.text())24.then((result) => console.log(result))25.catch((error) => console.error(error));26
1import requests2import json34url = "https://docs-demo.sui-mainnet.quiknode.pro/graphql"56payload = json.dumps({7"query": "query($message: Base64!, $signature: Base64!, $intentScope: IntentScope!, $author: SuiAddress!) { verifySignature(message: $message, signature: $signature, intentScope: $intentScope, author: $author) { success } }",8"variables": {9"message": "UXVpY2tOb2RlIGRvY3VtZW50YXRpb24gc2lnbmF0dXJlIHZlcmlmaWNhdGlvbg==",10"signature": "AF0IRLakHGMIb/4Z04xTIQ8Z40s3q8kuILee9kNIATTrjh8Pk29n7p/v+XvpZ8Dk8GSJNQeD1bpIREItiucs/QnEzVIMCfSCS2EhNlK35E960HRrM8oNMYemNGx0oVJWQQ==",11"intentScope": "PERSONAL_MESSAGE",12"author": "0xd3c5931dc1e196d597e8a510473ea20ec9341faab00bc15a035a633a19df6e0d"13}14})15headers = {16'Accept': 'application/json',17'Content-Type': 'application/json'18}1920response = requests.request("POST", url, headers=headers, data=payload)2122print(response.text)23
1import requests2import json34url = "https://docs-demo.sui-mainnet.quiknode.pro/graphql"56payload = json.dumps({7"query": "query($message: Base64!, $signature: Base64!, $intentScope: IntentScope!, $author: SuiAddress!) { verifySignature(message: $message, signature: $signature, intentScope: $intentScope, author: $author) { success } }",8"variables": {9"message": "UXVpY2tOb2RlIGRvY3VtZW50YXRpb24gc2lnbmF0dXJlIHZlcmlmaWNhdGlvbg==",10"signature": "AF0IRLakHGMIb/4Z04xTIQ8Z40s3q8kuILee9kNIATTrjh8Pk29n7p/v+XvpZ8Dk8GSJNQeD1bpIREItiucs/QnEzVIMCfSCS2EhNlK35E960HRrM8oNMYemNGx0oVJWQQ==",11"intentScope": "PERSONAL_MESSAGE",12"author": "0xd3c5931dc1e196d597e8a510473ea20ec9341faab00bc15a035a633a19df6e0d"13}14})15headers = {16'Accept': 'application/json',17'Content-Type': 'application/json'18}1920response = requests.request("POST", url, headers=headers, data=payload)2122print(response.text)23
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.sui-mainnet.quiknode.pro/graphql")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Accept"] = "application/json"12request["Content-Type"] = "application/json"13request.body = JSON.dump({"query" => "query($message: Base64!, $signature: Base64!, $intentScope: IntentScope!, $author: SuiAddress!) { verifySignature(message: $message, signature: $signature, intentScope: $intentScope, author: $author) { success } }", "variables" => {"message" => "UXVpY2tOb2RlIGRvY3VtZW50YXRpb24gc2lnbmF0dXJlIHZlcmlmaWNhdGlvbg==", "signature" => "AF0IRLakHGMIb/4Z04xTIQ8Z40s3q8kuILee9kNIATTrjh8Pk29n7p/v+XvpZ8Dk8GSJNQeD1bpIREItiucs/QnEzVIMCfSCS2EhNlK35E960HRrM8oNMYemNGx0oVJWQQ==", "intentScope" => "PERSONAL_MESSAGE", "author" => "0xd3c5931dc1e196d597e8a510473ea20ec9341faab00bc15a035a633a19df6e0d"}})1415response = https.request(request)16puts response.read_body17
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.sui-mainnet.quiknode.pro/graphql")67https = Net::HTTP.new(url.host, url.port)8https.use_ssl = true910request = Net::HTTP::Post.new(url)11request["Accept"] = "application/json"12request["Content-Type"] = "application/json"13request.body = JSON.dump({"query" => "query($message: Base64!, $signature: Base64!, $intentScope: IntentScope!, $author: SuiAddress!) { verifySignature(message: $message, signature: $signature, intentScope: $intentScope, author: $author) { success } }", "variables" => {"message" => "UXVpY2tOb2RlIGRvY3VtZW50YXRpb24gc2lnbmF0dXJlIHZlcmlmaWNhdGlvbg==", "signature" => "AF0IRLakHGMIb/4Z04xTIQ8Z40s3q8kuILee9kNIATTrjh8Pk29n7p/v+XvpZ8Dk8GSJNQeD1bpIREItiucs/QnEzVIMCfSCS2EhNlK35E960HRrM8oNMYemNGx0oVJWQQ==", "intentScope" => "PERSONAL_MESSAGE", "author" => "0xd3c5931dc1e196d597e8a510473ea20ec9341faab00bc15a035a633a19df6e0d"}})1415response = https.request(request)16puts response.read_body17
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free