/** * Purpose vocabulary and matching for purpose-bound grants. * * A grant carries one purpose from a controlled vocabulary, or a private term * `x-.`. A manifest tool may restrict the purposes it can be called * for with `allowed_purposes` patterns. Matching is by whole dot-separated * segments: * * - a pattern without a wildcard matches only the identical purpose; * - `prefix.*` matches any purpose that has `prefix` as its leading segments * and at least one more segment: `aml.cdd.*` matches `aml.cdd.onboarding` * but not `aml.cdd` itself and not `aml.cddx`. * * Every function returns a negative answer, never throws, for malformed input, * so a malformed pattern or purpose can only ever deny. The Python SDK * implements the same rules in `grantex.purpose`. */ /** The controlled purpose vocabulary. Private terms use `x-.`. */ export declare const PURPOSE_VOCABULARY: ReadonlySet; export declare const PRIVATE_PURPOSE_PREFIX = "x-"; /** Whether `value` is syntactically a purpose (no wildcard). */ export declare function isValidPurpose(value: unknown): value is string; /** Whether `value` is a vocabulary term or a well-formed private term. */ export declare function isKnownPurpose(value: unknown): value is string; /** Whether `purpose` matches one `allowed_purposes` `pattern`. False when either is malformed. */ export declare function purposeMatches(pattern: unknown, purpose: unknown): boolean; /** The first pattern in `patterns` that `purpose` matches, or undefined. */ export declare function matchPurpose(patterns: readonly unknown[] | undefined, purpose: unknown): string | undefined; //# sourceMappingURL=purpose.d.ts.map