Skip to main content

ResQ.Blockchain.INeoClient

INeoClient.VerifyLocationAttestationAsync(LocationAttestation, CancellationToken) Method

Verifies a location attestation signature on the blockchain.
System.Threading.Tasks.Task<bool> VerifyLocationAttestationAsync(ResQ.Blockchain.LocationAttestation attestation, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

attestation LocationAttestation The location attestation to verify. cancellationToken System.Threading.CancellationToken Cancellation token for the operation.

Returns

System.Threading.Tasks.Task<System.Boolean>
True if the attestation signature is valid and matches the drone’s registered public key; false otherwise.

Exceptions

System.OperationCanceledException
Thrown when the operation is cancelled.

Example

var isValid = await neoClient.VerifyLocationAttestationAsync(attestation);
if (isValid)
{
    Console.WriteLine("Location attestation verified");
}
else
{
    Console.WriteLine("WARNING: Invalid attestation signature!");
}

Remarks

This method verifies that the location data was signed by the legitimate drone and has not been tampered with. It checks the signature against the drone’s public key stored on the blockchain.