toip.tools

function · Browser and Node

delegate

Issues a child of the chain's leaf, signed by the leaf's subject. The child starts as a copy of the leaf, tightened and extended. If it doesn't narrow, nothing is signed and the problems come back.

@toip-tools/mandatesView source
TypeScriptImport
import { delegate } from "@toip-tools/mandates";

Declaration

TypeScriptSignature
delegate(parentChain: Mandate[], delegator: Identity, clock: Clock, o: DelegateOptions): Promise<{
    mandate: Mandate;
} | {
    problems: Reason[];
}>;

Parameters

parentChainrequired
Mandate[]
delegatorrequired
Identity
clockrequired
Clock
orequired
DelegateOptions

Returns

Promise<{ mandate: Mandate; } | { problems: Reason[]; }>