import type { VerifiedGrant, VerifyGrantTokenOptions, GrantTokenPayload } from './types.js'; /** Claim holding Grantex's grant record fields (spec/grant-token-0.6.md). */ export declare const GRANT_CLAIM = "urn:grantex:grant"; /** * Legacy claim aliases and the standard claims that replace them. Reading an * alias is deprecated; set legacyClaims: false to require standard claims. */ export declare const LEGACY_CLAIM_ALIASES: Readonly>; /** @internal Forget which legacy-alias warnings were emitted. Intended for tests. */ export declare function clearLegacyClaimWarnings(): void; /** * Signature algorithms a grant token may use. Each maps to one key type (RSA * for RS256, EC P-256 for ES256), and JOSE only selects a JWK Set key of that * type, published for that algorithm, under the token's `kid`. `none`, the * HMAC family and every other algorithm are refused. */ export declare const GRANT_TOKEN_ALGORITHMS: readonly ['RS256', 'ES256']; export type GrantTokenAlgorithm = (typeof GRANT_TOKEN_ALGORITHMS)[number]; /** @internal Clear process-level JWKS resolvers. Intended for deterministic tests. */ export declare function clearRemoteJwksCache(): void; /** * Verify a Grantex grant token locally using JWKS retrieved from the configured URI. * The signature must be RS256 or ES256 (`GRANT_TOKEN_ALGORITHMS`); `options.algorithms` * can narrow that list but never widen it. * * @throws {GrantexTokenError} if the token is invalid, expired, or missing required scopes. */ export declare function verifyGrantToken(token: string, options: VerifyGrantTokenOptions): Promise; /** * Decode a grant token (without re-verifying the signature) and map it to * a VerifiedGrant shape. Used by GrantsClient.verify() to fill fields the * API summary response may omit. * * @internal */ export declare function mapOnlineVerifyToVerifiedGrant(token: string): VerifiedGrant; /** * Map grant claims to a `VerifiedGrant`: standard claims first, legacy aliases * where the standard claim is absent (unless `legacyClaims` is false). Used * for `/v1/grants/verify` responses, which carry the aliases by design, so it * emits no deprecation warning. * * @throws {GrantexTokenError} a required claim is missing, a claim is malformed, * or a standard claim and its alias disagree. */ export declare function claimsToVerifiedGrant(payload: GrantTokenPayload | Record, options?: { legacyClaims?: boolean; }): VerifiedGrant; //# sourceMappingURL=verify.d.ts.map