UNPKG

@daml/hub-react

Version:

Daml React functions for Daml Hub

29 lines (28 loc) 1.02 kB
/// <reference types="react" /> import { PartyToken } from '../party-token/PartyToken'; /** * A set of different possible errors that could occur during parties.json validation */ export declare enum PartiesInputErrors { InvalidPartiesError = 0, InvalidPartyDetailError = 1, LedgerMismatchError = 2, ExpiredTokenError = 3, MissingPublicParty = 4, EmptyPartiesList = 5 } /** * A custom error class to contain PartiesInputErrors */ export declare class InvalidPartiesError extends Error { type: PartiesInputErrors; constructor(message: string, type: PartiesInputErrors); } export declare function convertPartiesJson(partiesJson: string, publicPartyId: string, validateFile?: boolean): PartyToken[]; type PartiesInputProps = { partiesJson?: string; validateFile?: boolean; onPartiesLoad: (credentials: PartyToken[], error?: string) => void; }; export declare const PartiesInput: ({ partiesJson, validateFile, onPartiesLoad, }: PartiesInputProps) => JSX.Element; export {};