WcVerify class
Stateless Verify helpers: JWT shape, ES256 verification, claim decoding, and the origin/scam decision.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
decodeClaims(
String jwt) → WcAttestationClaims - Decode an attestation JWT's claims (its middle segment) without verifying.
-
statusForClaims(
WcAttestationClaims claims, {required String origin}) → WcVerifyStatus -
Decide the validation status for already-decoded
claimsagainst the peer's declaredorigin: SCAM if flagged, VALID if the origins match, otherwise INVALID. (Signature validity is assumed already checked.) -
validate(
String jwt, {required BigInt qx, required BigInt qy, required String origin}) → WcVerifyStatus -
Verify
jwtagainst (qx,qy) and, if valid, decide its status against the declaredorigin. INVALID on a bad signature. -
verifyJwt(
String jwt, {required BigInt qx, required BigInt qy}) → bool -
Verify an ES256
jwt's signature against the Verify key (qx,qy): P-256 ECDSA over SHA-256(header.claims), the 64-byter||ssignature. Returns false on any malformation - never throws.
Constants
- defaultPublicKeyUrl → const String