VerifySignature - Sui

VerifySignature. Verifies a user signature against a message or transaction.

VerifySignature - sui [Value: 20CU]
Verifies a user signature (including multisig, zkLogin and passkey) against a personal message or transaction data.
gRPC: sui.rpc.v2.SignatureVerificationService/VerifySignature
Use cases

Use cases

  • Sign-in with Sui wallet
  • Verify off-chain messages
  • Validate zkLogin signatures
Constraints

Constraints

  • Message bcs.name must be set
  • PersonalMessage or TransactionData only
  • zkLogin uses on-chain JWKs by default
Get started
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
grpcurl \
  -H "x-drpc-key: {API-KEY}" \
  -H "x-drpc-chain: sui" \
  -d '{
  "message": {
    "name": "PersonalMessage",
    "value": "<BASE64_MESSAGE_BCS>"
  },
  "signature": {
    "bcs": { "value": "<BASE64_USER_SIGNATURE>" }
  },
  "address": "0x94096a6a54129234237759c66e6ef1037224fb3102a0ae29d33b490281c8e4d5"
}' \
  grpc.drpc.live:443 \
  sui.rpc.v2.SignatureVerificationService/VerifySignature
Copy
Response
200
{
  "is_valid": true
}
Copy

Request params

Parametersobject
object
messageobject
Required. The message to verify against. Supported message types are `PersonalMessage` and `TransactionData`.
object
namestring
Required. Type of the message: `PersonalMessage` or `TransactionData`.
valuestring
Bytes of the BCS-serialized message (base64).
signatureobject
Required. The `UserSignature` to verify.
addressstring
Optional. If set, the address derived from the signature must match it.
jwksarray_of_objects
Optional. JWKs to use for zkLogin verification. If empty, the current on-chain JWKs are used.
check_address_aliasesboolean
Optional. If true, `address` is required and the signer must be a member of the address's `AddressAliases` set.

Response

200
Verifies a user signature (including multisig, zkLogin and passkey) against a personal message or transaction data.

Response params

object
is_validboolean
Whether the signature is valid for the given parameters.
reasonstring
Why verification failed, if `is_valid` is `false`.
address_aliases_checkedboolean
True when the server applied `check_address_aliases`.