Don't export object literal because the docs cannot yet render them, moved type to types file

This commit is contained in:
Fabio Berger 2018-07-19 17:46:24 +02:00
parent 9ab6ab1bf9
commit 34df5af295
4 changed files with 13 additions and 10 deletions

View File

@ -9,6 +9,9 @@
{
"note": "Add `getNodeTypeAsync` method",
"pr": 812
},
{
"notes": "Stop exporting uniqueVersionIds object"
}
]
},

View File

@ -1,3 +1,3 @@
export { Web3Wrapper, uniqueVersionIds, NodeType } from './web3_wrapper';
export { Web3WrapperErrors } from './types';
export { Web3Wrapper } from './web3_wrapper';
export { Web3WrapperErrors, NodeType } from './types';
export { marshaller } from './marshaller';

View File

@ -57,3 +57,9 @@ export interface TxDataRPC extends CallTxDataBaseRPC {
export interface CallDataRPC extends CallTxDataBaseRPC {
from?: string;
}
// NodeType represents the type of the backing Ethereum node.
export enum NodeType {
Geth = 'GETH',
Ganache = 'GANACHE',
}

View File

@ -22,24 +22,18 @@ import {
import * as _ from 'lodash';
import { marshaller } from './marshaller';
import { BlockWithoutTransactionDataRPC, BlockWithTransactionDataRPC, Web3WrapperErrors } from './types';
import { BlockWithoutTransactionDataRPC, BlockWithTransactionDataRPC, NodeType, Web3WrapperErrors } from './types';
import { utils } from './utils';
const BASE_TEN = 10;
// These are unique identifiers contained in the response of the
// web3_clientVersion call.
export const uniqueVersionIds = {
const uniqueVersionIds = {
geth: 'Geth',
ganache: 'EthereumJS TestRPC',
};
// NodeType represents the type of the backing Ethereum node.
export enum NodeType {
Geth = 'GETH',
Ganache = 'GANACHE',
}
/**
* An alternative to the Web3.js library that provides a consistent, clean, promise-based interface.
*/