UNPKG

@allaccessone/fetch-node-details

Version:

Fetches the node details from allaccessone nodelist smart contract

70 lines (69 loc) 1.76 kB
import { AbiType, StateMutabilityType } from "web3-utils"; export interface INodePub { X: string; Y: string; } export interface INodeDetails { currentEpoch: string; nodeListAddress: string; torusNodeEndpoints: string[]; torusNodePub: INodePub[]; torusIndexes: number[]; updated: boolean; } export interface INodeEndpoint { declaredIp: string; pubKx: string; pubKy: string; } export declare const ETHEREUM_NETWORK: { readonly ROPSTEN: "ropsten"; readonly MAINNET: "mainnet"; readonly POLYGON: "polygon"; readonly MUMBAI: "mumbai"; readonly LOCAL: "local"; readonly TESTNET: "testnet"; }; export declare const NETWORK_PROVIDER_URL: { readonly ROPSTEN: "ropsten"; readonly MAINNET: "mainnet"; readonly MUMBAI: "https://matic-mumbai.chainstacklabs.com"; readonly LOCAL: "http://localhost:8545"; readonly TESTNET: "https://eth.allaccess.one"; }; export declare type ETHEREUM_NETWORK_TYPE = typeof ETHEREUM_NETWORK[keyof typeof ETHEREUM_NETWORK]; export declare type NodeDetailManagerParams = { network?: ETHEREUM_NETWORK_TYPE; proxyAddress?: string; }; export declare const abi: ({ constant: boolean; inputs: { internalType: string; name: string; type: string; }[]; name: string; outputs: { internalType: string; name: string; type: string; }[]; payable: boolean; stateMutability: StateMutabilityType; type: AbiType; } | { constant: boolean; inputs: { name: string; type: string; }[]; name: string; outputs: { name: string; type: string; }[]; payable: boolean; stateMutability: StateMutabilityType; type: AbiType; })[];