web3-types
Advanced tools
Comparing version 0.1.1-alpha.0 to 0.1.1-alpha.1
export * from './error_types'; | ||
export * from './eth_execution_api'; | ||
export * from './apis/eth_execution_api'; | ||
export * from './apis/web3_eth_execution_api'; | ||
export * from './apis/web3_net_api'; | ||
export * from './apis/eth_personal_api'; | ||
export * from './eth_types'; | ||
@@ -4,0 +7,0 @@ export * from './json_rpc_types'; |
@@ -18,3 +18,6 @@ "use strict"; | ||
__exportStar(require("./error_types"), exports); | ||
__exportStar(require("./eth_execution_api"), exports); | ||
__exportStar(require("./apis/eth_execution_api"), exports); | ||
__exportStar(require("./apis/web3_eth_execution_api"), exports); | ||
__exportStar(require("./apis/web3_net_api"), exports); | ||
__exportStar(require("./apis/eth_personal_api"), exports); | ||
__exportStar(require("./eth_types"), exports); | ||
@@ -21,0 +24,0 @@ __exportStar(require("./json_rpc_types"), exports); |
import { JsonRpcId, JsonRpcIdentifier } from './json_rpc_types'; | ||
export declare type Web3APISpec = Record<string, (...params: any) => any>; | ||
export declare type Web3APIMethod<T extends Web3APISpec> = string & keyof T; | ||
export declare type Web3APIParams<API extends Web3APISpec, Method extends Web3APIMethod<API>> = Parameters<API[Method]>; | ||
export declare type Web3APISpec = Record<string, (...params: any) => any> | unknown; | ||
export declare type Web3APIMethod<T extends Web3APISpec> = string & keyof Exclude<T, unknown>; | ||
export declare type Web3APIParams<API extends Web3APISpec, Method extends Web3APIMethod<API>> = API extends Exclude<Web3APISpec, unknown> ? Parameters<API[Method]> : unknown; | ||
export interface Web3APIRequest<API extends Web3APISpec, Method extends Web3APIMethod<API>> { | ||
@@ -13,3 +13,3 @@ method: Method; | ||
} | ||
export declare type Web3APIReturnType<API extends Web3APISpec, Method extends Web3APIMethod<API>> = ReturnType<API[Method]>; | ||
export declare type Web3APIReturnType<API extends Web3APISpec, Method extends Web3APIMethod<API>> = API extends Record<string, (...params: any) => any> ? ReturnType<API[Method]> : any; | ||
//# sourceMappingURL=web3_api_types.d.ts.map |
/// <reference types="node" /> | ||
import { Socket } from 'net'; | ||
import { Web3Error } from './error_types'; | ||
import { EthExecutionAPI } from './eth_execution_api'; | ||
import { EthExecutionAPI } from './apis/eth_execution_api'; | ||
import { JsonRpcNotification, JsonRpcPayload, JsonRpcResponse, JsonRpcResponseWithError, JsonRpcResponseWithResult, JsonRpcResult, JsonRpcSubscriptionResult } from './json_rpc_types'; | ||
@@ -6,0 +6,0 @@ import { Web3APISpec, Web3APIMethod, Web3APIReturnType, Web3APIPayload } from './web3_api_types'; |
{ | ||
"name": "web3-types", | ||
"version": "0.1.1-alpha.0", | ||
"version": "0.1.1-alpha.1", | ||
"description": "Provide the common data structures and interfaces for web3 modules.", | ||
@@ -25,3 +25,3 @@ "main": "dist/index.js", | ||
"test:unit": "jest --config=./test/unit/jest.config.js --passWithNoTests", | ||
"test:integration": "jest --config=./test/integration/jest.config.js --runInBand --passWithNoTests" | ||
"test:integration": "jest --config=./test/integration/jest.config.js --passWithNoTests" | ||
}, | ||
@@ -43,3 +43,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "766ebd976ef71458eaebf7a6108b268881e30552" | ||
"gitHead": "a754e3a965c30f42a6e639df27462650062833ee" | ||
} |
@@ -17,5 +17,15 @@ <p align="center"> | ||
###### Get it from the NPM Registry | ||
## Installation | ||
You can install the package either using [NPM](https://www.npmjs.com/package/web3-types) or using [Yarn](https://yarnpkg.com/package/web3-types) | ||
### Using NPM | ||
```bash | ||
npm install web3-types | ||
``` | ||
### Using Yarn | ||
```bash | ||
yarn add web3-types | ||
@@ -22,0 +32,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80733
59
915
64