UNPKG

incubed

Version:

Typescript-version of the incubed client

1,242 lines 91.2 kB
/*********************************************************** * This file is part of the Slock.it IoT Layer. * * The Slock.it IoT Layer contains: * * - USN (Universal Sharing Network) * * - INCUBED (Trustless INcentivized remote Node Network) * ************************************************************ * Copyright (C) 2016 - 2018 Slock.it GmbH * * All Rights Reserved. * ************************************************************ * You may use, distribute and modify this code under the * * terms of the license contract you have concluded with * * Slock.it GmbH. * * For information about liability, maintenance etc. also * * refer to the contract concluded with Slock.it GmbH. * ************************************************************ * For more information, please refer to https://slock.it * * For questions, please contact info@slock.it * ***********************************************************/ import Client from './client/Client'; import EthAPI from './modules/eth/api'; import * as validateOb from './util/validate'; export default Client; export declare const eth: typeof EthAPI; import * as _util from './util/util'; export declare const util: typeof _util; export declare type IN3Client = Client; import * as _cbor from './util/cbor'; export declare const cbor: typeof _cbor; import * as _serialize from './modules/eth/serialize'; export declare const serialize: typeof _serialize; import * as _header from './modules/eth/header'; export declare const header: typeof _header; import * as _storage from './modules/eth/storage'; export declare const storage: typeof _storage; import * as _transport from './util/transport'; export declare const transport: typeof _transport; import * as _chainData from './modules/eth/chainData'; export declare const chainData: typeof _chainData; import * as _nodeList from './client/serverList'; export declare const createRandomIndexes: typeof _nodeList.createRandomIndexes; import * as types from './types/types'; export declare type RPCRequest = types.RPCRequest; export declare type AccountProof = types.AccountProof; export declare type IN3Config = types.IN3Config; export declare type IN3NodeConfig = types.IN3NodeConfig; export declare type IN3NodeWeight = types.IN3NodeWeight; export declare type IN3RPCRequestConfig = types.IN3RPCRequestConfig; export declare type IN3ResponseConfig = types.IN3ResponseConfig; export declare type LogProof = types.LogProof; export declare type Proof = types.Proof; export declare type AuraValidatoryProof = types.AuraValidatoryProof; export declare type RPCResponse = types.RPCResponse; export declare type Signature = types.Signature; export declare type Transport = _transport.Transport; export declare type ServerList = types.ServerList; export declare type BlockData = _serialize.BlockData; export declare type LogData = _serialize.LogData; export declare type ReceiptData = _serialize.ReceiptData; export declare type TransactionData = _serialize.TransactionData; export declare type IN3RPCConfig = types.IN3RPCConfig; export declare type IN3RPCHandlerConfig = types.IN3RPCHandlerConfig; export declare type ChainSpec = types.ChainSpec; export declare const AxiosTransport: typeof _transport.AxiosTransport; export declare const typeDefs: { IN3NodeWeight: { description: string; type: string; properties: { weight: { description: string; type: string; example: number; }; responseCount: { description: string; type: string; example: number; }; avgResponseTime: { description: string; type: string; example: number; }; pricePerRequest: { description: string; type: string; }; lastRequest: { description: string; type: string; example: number; }; blacklistedUntil: { description: string; type: string; example: number; }; }; }; IN3NodeConfig: { description: string; type: string; required: string[]; properties: { index: { description: string; type: string; example: number; }; address: { description: string; type: string; format: string; example: string; }; timeout: { description: string; type: string; example: number; }; url: { description: string; type: string; example: string; }; chainIds: { description: string; example: string[]; type: string; items: { type: string; format: string; }; }; deposit: { description: string; type: string; example: number; }; capacity: { description: string; type: string; example: number; }; props: { description: string; type: string; example: number; }; }; }; IN3RPCRequestConfig: { description: string; required: string[]; properties: { chainId: { description: string; type: string; example: string; format: string; }; includeCode: { description: string; type: string; example: boolean; }; verifiedHashes: { description: string; type: string; items: { type: string; format: string; }; }; latestBlock: { description: string; type: string; example: number; }; useRef: { description: string; type: string; }; useBinary: { description: string; type: string; }; useFullProof: { description: string; type: string; }; finality: { description: string; type: string; }; verification: { description: string; type: string; enum: string[]; example: string; }; clientSignature: { description: string; }; signatures: { description: string; type: string; example: string[]; items: { type: string; format: string; }; }; }; }; Signature: { description: string; type: string; required: string[]; properties: { address: { type: string; description: string; format: string; example: string; }; block: { type: string; description: string; example: number; }; blockHash: { type: string; description: string; example: string; format: string; }; msgHash: { type: string; description: string; format: string; example: string; }; r: { type: string; description: string; format: string; example: string; }; s: { type: string; description: string; format: string; example: string; }; v: { type: string; description: string; format: string; example: number; }; }; }; IN3ResponseConfig: { type: string; description: string; properties: { proof: { description: string; type: string; required: string[]; properties: { type: { description: string; type: string; enum: string[]; example: string; }; block: { type: string; description: string; example: string; }; finalityBlocks: { type: string; description: string; example: string[]; }; transactions: { type: string; description: string; example: any[]; }; uncles: { type: string; description: string; example: any[]; }; merkleProof: { type: string; description: string; exmaple: string[]; items: { type: string; pattern: string; }; }; merkleProofPrev: { type: string; description: string; exmaple: string[]; items: { type: string; pattern: string; }; }; txProof: { type: string; description: string; items: { type: string; pattern: string; }; }; logProof: { description: string; type: string; additionalProperties: { type: string; required: string[]; properties: { number: { description: string; type: string; }; block: { description: string; type: string; example: string; }; allReceipts: { description: string; type: string; }; receipts: { description: string; type: string; additionalProperties: { type: string; required: string[]; properties: { txHash: { type: string; description: string; }; txIndex: { type: string; description: string; }; txProof: { type: string; description: string; items: { type: string; pattern: string; }; }; proof: { type: string; description: string; items: { type: string; pattern: string; }; }; }; }; }; }; }; }; accounts: { type: string; description: string; additionalProperties: { type: string; description: string; required: string[]; properties: { accountProof: { type: string; description: string; items: { type: string; pattern: string; }; }; address: { type: string; description: string; pattern: string; }; balance: { type: string; description: string; pattern: string; }; codeHash: { type: string; description: string; pattern: string; }; code: { type: string; description: string; pattern: string; }; nonce: { type: string; description: string; pattern: string; }; storageHash: { type: string; description: string; pattern: string; }; storageProof: { type: string; description: string; items: { type: string; required: string[]; properties: { key: { type: string; description: string; pattern: string; }; proof: { type: string; description: string; items: { type: string; pattern: string; }; }; value: { type: string; description: string; pattern: string; }; }; }; }; }; }; }; txIndex: { type: string; description: string; example: number; }; signatures: { type: string; description: string; items: { description: string; type: string; required: string[]; properties: { address: { type: string; description: string; format: string; example: string; }; block: { type: string; description: string; example: number; }; blockHash: { type: string; description: string; example: string; format: string; }; msgHash: { type: string; description: string; format: string; example: string; }; r: { type: string; description: string; format: string; example: string; }; s: { type: string; description: string; format: string; example: string; }; v: { type: string; description: string; format: string; example: number; }; }; }; }; }; }; lastNodeList: { description: string; type: string; example: number; }; lastValidatorChange: { description: string; type: string; }; currentBlock: { description: string; type: string; example: number; }; }; }; ChainSpec: { type: string; description: string; properties: { engine: { description: string; type: string; }; validatorContract: { description: string; type: string; }; validatorList: { description: string; type: string; }; }; }; IN3Config: { description: string; type: string; required: string[]; properties: { cacheTimeout: { type: string; description: string; }; nodeLimit: { description: string; type: string; example: number; }; keepIn3: { description: string; type: string; example: boolean; }; format: { description: string; type: string; enum: string[]; example: string; }; key: { description: string; example: string; }; autoConfig: { description: string; type: string; example: boolean; }; retryWithoutProof: { description: string; type: string; example: boolean; }; maxAttempts: { description: string; type: string; example: number; }; includeCode: { description: string; type: string; example: boolean; }; maxCodeCache: { description: string; type: string; example: number; }; maxBlockCache: { description: string; type: string; example: number; }; verifiedHashes: { description: string; type: string; items: { type: string; format: string; }; }; proof: { description: string; type: string; enum: string[]; example: boolean; }; signatureCount: { description: string; type: string; example: number; }; minDeposit: { type: string; description: string; example: number; }; replaceLatestBlock: { description: string; type: string; example: number; }; requestCount: { type: string; min: number; default: number; description: string; example: number; }; finality: { type: string; min: number; max: number; default: number; description: string; example: number; }; timeout: { type: string; min: number; default: number; description: string; example: number; }; chainId: { type: string; pattern: string; description: string; example: string; }; chainRegistry: { type: string; pattern: string; description: string; example: string; }; mainChain: { type: string; pattern: string; description: string; example: string; }; autoUpdateList: { type: string; description: string; example: boolean; }; cacheStorage: { description: string; }; loggerUrl: { type: string; description: string; }; rpc: { type: string; description: string; }; servers: { type: string; description: string; additionalProperties: { type: string; properties: { verifier: { type: string; description: string; }; name: { type: string; description: string; }; chainSpec: { description: string; type: string; properties: { engine: { description: string; type: string; }; validatorContract: { description: string; type: string; }; validatorList: { description: string; type: string; }; }; }; initAddresses: { description: string; type: string; example: string[]; items: { type: string; }; }; lastBlock: { type: string; description: string; example: number; }; contract: { type: string; description: string; example: string; }; needsUpdate: { type: string; description: string; }; contractChain: { type: string; description: string; example: string; }; nodeList: { description: string; type: string; items: { description: string; type: string; required: string[]; properties: { index: { description: string; type: string; example: number; }; address: { description: string; type: string; format: string; example: string; }; timeout: { description: string; type: string; example: number; }; url: { description: string; type: string; example: string; }; chainIds: { description: string; example: string[]; type: string; items: { type: string; format: string; }; }; deposit: { description: string; type: string; example: number; }; capacity: { description: string; type: string; example: number; }; props: { description: string; type: string; example: number; }; }; }; }; nodeAuthorities: { description: string; type: string; example: string[]; items: { type: string; }; }; weights: { description: string; type: string; additionalProperties: { description: string; type: string; properties: { weight: { description: string; type: string; example: number; }; responseCount: { description: string; type: string; example: number; }; avgResponseTime: { description: string; type: string; example: number; }; pricePerRequest: { description: string; type: string; }; lastRequest: { description: string; type: string; example: number; }; blacklistedUntil: { description: string; type: string; example: number; }; }; }; }; }; }; }; }; }; RPCRequest: { type: string; description: string; required: string[]; properties: { jsonrpc: { description: string; type: string; enum: string[]; }; method: { description: string; type: string; example: string; }; id: { description: string; type: string[]; example: number; }; params: { description: string; type: string; example: string[]; }; in3: { description: string; required: string[]; properties: { chainId: { description: string; type: string; example: string; format: string; }; includeCode: { description: string; type: string; example: boolean; }; verifiedHashes: { description: string; type: string; items: { type: string; format: string; }; }; latestBlock: { description: string; type: string; example: number; }; useRef: { description: string; type: string; }; useBinary: { description: string; type: string; }; useFullProof: { description: string; type: string; }; finality: { description: string; type: string; }; verification: { description: string; type: string; enum: string[]; example: string; }; clientSignature: { description: string; }; signatures: { description: string; type: string; example: string[]; items: { type: string; format: string; }; }; }; }; }; }; RPCResponse: { type: string; description: string; required: string[]; properties: { jsonrpc: { description: string; type: string; enum: string[]; }; id: { description: string; type: string[]; example: number; }; error: { description: string; type: string; }; result: { description: string; example: string; }; in3: { description: string; type: string; properties: { proof: { description: string; type: string; required: string[]; properties: { type: { description: string; type: string; enum: string[]; example: string; }; block: { type: string; description: string; example: string; }; finalityBlocks: { type: string; description: string; example: string[]; }; transactions: { type: string; description: string; example: any[]; }; uncles: { type: string; description: string; example: any[]; }; merkleProof: { type: string; description: string; exmaple: string[]; items: { type: string; pattern: string; }; }; merkleProofPrev: { type: string; description: string; exmaple: string[]; items: { type: string; pattern: string; }; }; txProof: { type: string; description: string; items: { type: string; pattern: string; }; }; logProof: { description: string; type: string; additionalProperties: { type: string; required: string[]; properties: { number: { description: string; type: string; }; block: { description: string; type: string; example: string; }; allReceipts: { description: string; type: string; }; receipts: { description: string; type: string; additionalProperties: { type: string; required: string[]; properties: { txHash: { type: string; description: string; }; txIndex: { type: string; description: string; }; txProof: { type: string; description: string; items: { type: string; pattern: string; }; }; proof: { type: string; description: string; items: { type: string; pattern: string; }; }; }; }; }; }; }; }; accounts: { type: string; description: string; additionalProperties: { type: string; description: string; required: string[]; properties: { accountProof: { type: string; description: string; items: { type: string; pattern: string; }; }; address: { type: string; description: string; pattern: string; }; balance: { type: string; description: string; pattern: string; }; codeHash: { type: string; description: string; pattern: string; }; code: { type: string; description: string; pattern: string; }; nonce: { type: string; description: string; pattern: string; }; storageHash: { type: string; description: string; pattern: string; }; storageProof: { type: string; description: string; items: { type: string; required: string[]; properties: { key: { type: string; description: string; pattern: string; }; proof: { type: string; description: string; items: { type: string; pattern: string; }; }; value: { type: string; description: string; pattern: string; }; }; }; }; }; }; }; txIndex: { type: string; description: string; example: number; }; signatures: { type: string; description: string; items: { description: string; type: string; required: string[]; properties: { address: { type: string; description: string; format: string; example: string; }; block: { type: string; description: string; example: number; }; blockHash: { type: string; description: string; example: string; format: string; }; msgHash: { type: string; description: string; format: string; example: string; }; r: { type: string; description: string; format: string; example: string; }; s: { type: string; description: string; format: string; example: string; }; v: { type: string; description: string; format: string; example: number; }; }; }; }; }; }; lastNodeList: { description: string; type: string; example: number; }; lastValidatorChange: { description: string; type: string; }; currentBlock: { description: string; type