UNPKG

@toruslabs/constants

Version:
63 lines (62 loc) 1.8 kB
import { BUILD_ENV, KEY_TYPE, SIG_TYPE, TORUS_LEGACY_NETWORK, TORUS_SAPPHIRE_NETWORK } from "./constants"; export interface JRPCResponse<T> { id: number; jsonrpc: "2.0"; result?: T; error?: { code: number; message: string; data?: unknown; }; } export interface INodePub { X: string; Y: string; } export interface INodeDetails { currentEpoch: string; torusNodeEndpoints: string[]; torusNodePub: INodePub[]; torusIndexes: number[]; updated?: boolean; torusNodeSSSEndpoints?: string[]; torusNodeRSSEndpoints?: string[]; torusNodeTSSEndpoints?: string[]; } export type TORUS_LEGACY_NETWORK_TYPE = (typeof TORUS_LEGACY_NETWORK)[keyof typeof TORUS_LEGACY_NETWORK]; export type TORUS_SAPPHIRE_NETWORK_TYPE = (typeof TORUS_SAPPHIRE_NETWORK)[keyof typeof TORUS_SAPPHIRE_NETWORK]; export type BUILD_ENV_TYPE = (typeof BUILD_ENV)[keyof typeof BUILD_ENV]; export type TORUS_NETWORK_TYPE = TORUS_LEGACY_NETWORK_TYPE | TORUS_SAPPHIRE_NETWORK_TYPE; export type WEB3AUTH_KEY_TYPE = (typeof KEY_TYPE)[keyof typeof KEY_TYPE]; export type WEB3AUTH_SIG_TYPE = (typeof SIG_TYPE)[keyof typeof SIG_TYPE]; export type NODE = { address: string; node_index: string; epoch: string; public_key: { X: string; Y: string; }; }; export interface NodeLookupResponse { nodes: NODE[]; } export interface ILegacyNetworkMigrationInfo { networkIdentifier: string; networkMigratedTo: TORUS_SAPPHIRE_NETWORK_TYPE; } export declare const abi: { inputs: { internalType: string; name: string; type: string; }[]; name: string; outputs: { internalType: string; name: string; type: string; }[]; stateMutability: string; type: string; }[];