@orangecheck/pledge-core / parsePledgeCreateScope
Function: parsePledgeCreateScope()
function parsePledgeCreateScope(scope: string): Record<string, string> | null;
Defined in: pledge-core/src/delegation.ts:90
Parse a single scope string. Returns the constraint map iff the scope's
product:verb is pledge:create; null for any other scope (caller skips
those). Tolerates whitespace inside parens; rejects malformed syntax by
returning null (the scope is treated as non-matching rather than
surfacing a parse error — matches OC Agent's permissive scope mode).
Parameters
| Parameter | Type |
|---|---|
scope | string |
Returns
Record<string, string> | null