toip.tools

interface · Browser and Node

DecideInput

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

Declaration

TypeScriptinterface
interface DecideInput {
  chain: Mandate[];
  /** The DID that is acting. For a counterparty, the TSP sender of the presentation. */
  presenter: string;
  action: Action;
  /** What the leaf has spent per period. Required when the leaf has a budget that applies. */
  state?: SpendStatement;
  approvals?: Approval[];
  usedApprovals?: (id: string) => boolean;
  status: StatusResolver;
  requirements?: Requirements;
  facts?: { rootCredentials?: Credential[]; passport?: Credential };
  clock: Clock;
}

Properties

chainrequired
Mandate[]
presenterrequired
string

The DID that is acting. For a counterparty, the TSP sender of the presentation.

actionrequired
Action
stateoptional
SpendStatement | undefined

What the leaf has spent per period. Required when the leaf has a budget that applies.

approvalsoptional
Approval[] | undefined
usedApprovalsoptional
((id: string) => boolean) | undefined
statusrequired
StatusResolver
requirementsoptional
Requirements | undefined
factsoptional
{ rootCredentials?: Credential[]; passport?: Credential; } | undefined
clockrequired
Clock