toip.tools

interface · Browser and Node

ExplainOptions

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

Declaration

TypeScriptinterface
interface ExplainOptions {
  /** A person's or an agent's name for a DID. Default: the DID. */
  name?: (did: string) => string;
  /** How to show a value of an attribute, e.g. units of USDC. Default: as is. */
  units?: (u: Units, attr: string) => string;
  /** A phrase for a dimension, e.g. spendPerTx → "per payment". Default: the dimension's name. */
  label?: (dimension: string) => string | undefined;
  /** What is being decided, e.g. "this payment". Default: "this action". */
  noun?: string;
}

Properties

nameoptional
((did: string) => string) | undefined

A person's or an agent's name for a DID. Default: the DID.

unitsoptional
((u: Units, attr: string) => string) | undefined

How to show a value of an attribute, e.g. units of USDC. Default: as is.

labeloptional
((dimension: string) => string | undefined) | undefined

A phrase for a dimension, e.g. spendPerTx → "per payment". Default: the dimension's name.

nounoptional
string | undefined

What is being decided, e.g. "this payment". Default: "this action".