verify library

Bundle signature verification primitives (Ed25519 over the canonical string), for tooling and tests. The client uses them automatically.

Classes

ImportedKey
A public key ready for verification.
SignatureInfo
Signature metadata of a bundle (from the /v1/bundle headers and body, or a live message).

Functions

base64UrlDecodeStrict(String input) → List<int>
Strict base64url decoding (padding optional). Throws FormatException for anything else.
canonicalString(String environmentId, int revision, String checksum, String bundleSha256Hex) → String
The string the edge signs for a bundle.
importPublicKeys(Iterable<Object?> jwks) → List<ImportedKey>
Imports the public Ed25519 JWKs of jwks; anything else (including private keys) is skipped.
isPublicEd25519Jwk(Object? v) → bool
True for a public Ed25519 JWK ({kty: OKP, crv: Ed25519, x} without a private d member).
rawMember(String text, String member) → String?
Returns the exact source text of the top-level member of the JSON object text, or null.
sha256Hex(String text) → String
Lowercase hex SHA-256 of the UTF-8 bytes of text.
verifyBundleText(List<ImportedKey> keys, SignatureInfo info, String bundleText) → Future<bool>
True when info carries a valid signature by one of keys over the canonical string for bundleText.