Sui
sui.rpc.v2.SignatureVerificationService/VerifySignatureКредиты: 20
Verify a signature of a message or transaction
Параметры
| Имя | Тип | Описание |
|---|---|---|
| message | Bcs | The message to verify: PersonalMessage or TransactionData, selected by Bcs.name, with the BCS bytes in Bcs.value. |
| signature | UserSignature | The signature to verify. |
| address | string | When set, the address derived from the signature must match it. (необязательно) |
| jwks | ActiveJwk[] | JWKs used for zkLogin verification. When empty the current on-chain set is used. (необязательно) |
| check_address_aliases | bool | Requires address. The signature must come from a member of the AddressAliases set of that address. Check address_aliases_checked in the response: older servers ignore this field. (необязательно) |
Результат
Тип
VerifySignatureResponse
is_valid, reason (why verification failed) and address_aliases_checked.
Примеры кода
# the key of the endpoint goes in the x-token header; add -proto <file> when the node has no gRPC reflection
grpcurl \
-H 'x-token: 7c9e6679-7425-40de-944b-e07fc1f90ae7' \
-d '{
"message": {
"name": "TransactionData",
"value": "AAACACBfmzYh0HoOxS5FQyGBCQKCVrQsqz1b2yQPzaRNf5fNJwEAAAAAAAAAAA=="
},
"signature": {
"bcs": {
"value": "AIYbBfmzYh0HoOxS5FQyGBCQKCVrQsqz1b2yQPzaRNf5fNJwEAAAAAAAAAAA=="
}
},
"address": "0x5ac7c1d6b0a8b3a3e9f2c4d1e7b6a58f3c2d1e0f9a8b7c6d5e4f3a2b1c0d9e8f"
}' \
grpc-holy-burned-sky-sui-mainnet.rpcnode.dev:443 \
sui.rpc.v2.SignatureVerificationService/VerifySignature