Type alias WalletTemplateEntity

WalletTemplateEntity: {
    description?: string;
    name?: string;
    scripts?: string[];
    variables?: {
        [variableId: string]: WalletTemplateVariable;
    };
}

An object describing the configuration for a particular entity within an wallet template.

Type declaration

  • Optional description?: string

    An optionally multi-line, free-form, human-readable description for this entity (for use in user interfaces). If displayed, this description should use a monospace font to properly render ASCII diagrams.

  • Optional name?: string

    A single-line, Title Case, human-readable name for this entity for use in user interfaces and error messages, e.g.: Trusted Third-Party.

  • Optional scripts?: string[]

    An array of the identifiers of each script the entity must be capable of generating, e.g. each of the unlocking scripts this entity might use.

    Provided the necessary variables, any entity can construct any script, but this option allows us to hint to more advanced wallets which scripts to recommend to users. (Especially when many scripts require inter-entity communication initiated by a user.)

    If not provided, this property is assumed to include all scripts in the template.

  • Optional variables?: {
        [variableId: string]: WalletTemplateVariable;
    }

    A map of variables that must be provided by this entity for use in the template's scripts. Some variables are required before locking script generation, while some variables can or must be resolved only before unlocking script generation.

    Object keys are used as variable identifiers, and by convention, should use snake_case.

Generated using TypeDoc