@orangecheck/pledge-core / checkPledgeCreateScope
Function: checkPledgeCreateScope()
function checkPledgeCreateScope(pledge: PledgeEnvelope, delegation: DelegationLookupResult): ScopeCheckResult;
Defined in: pledge-core/src/delegation.ts:50
Find the first pledge:create(...) scope in the delegation and verify the
pledge satisfies all its constraints. SPEC §7.3.
Returns ok with the matched raw scope string, or err with E_DELEGATION_SCOPE_VIOLATED naming the failed constraint.
Parameters
| Parameter | Type |
|---|---|
pledge | PledgeEnvelope |
delegation | DelegationLookupResult |