dapp-client
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -1,2 +0,2 @@ | ||
import { GetTableRows, GetTableByScope, Package, Accountext } from "../types"; | ||
import { GetInfo, GetTableRows, GetTableByScope, Package, Accountext } from "../types"; | ||
import { HttpClient, Fetch } from "./HttpClient"; | ||
@@ -154,2 +154,14 @@ /** | ||
}): Promise<GetTableByScope>; | ||
/** | ||
* [GET /v1/chain/get_info](https://developers.eos.io/eosio-nodeos/reference#get_info) | ||
* | ||
* Returns an object containing various details about the blockchain. | ||
* | ||
* @returns {Promise<GetInfo>} table rows | ||
* @example | ||
* | ||
* const response = await rpc.get_info(); | ||
* console.log(response); | ||
*/ | ||
get_info(): Promise<GetInfo>; | ||
} |
@@ -175,4 +175,18 @@ "use strict"; | ||
} | ||
/** | ||
* [GET /v1/chain/get_info](https://developers.eos.io/eosio-nodeos/reference#get_info) | ||
* | ||
* Returns an object containing various details about the blockchain. | ||
* | ||
* @returns {Promise<GetInfo>} table rows | ||
* @example | ||
* | ||
* const response = await rpc.get_info(); | ||
* console.log(response); | ||
*/ | ||
get_info() { | ||
return this.post(endpoints_1.V1_GET_INFO); | ||
} | ||
} | ||
exports.DappClient = DappClient; | ||
//# sourceMappingURL=DappClient.js.map |
@@ -29,3 +29,3 @@ export declare type Fetch = (url: string | Request, init?: RequestInit) => Promise<Response>; | ||
*/ | ||
post<T>(path: string, body: any): Promise<T>; | ||
post<T>(path: string, body?: {}): Promise<T>; | ||
/** | ||
@@ -32,0 +32,0 @@ * get |
@@ -88,3 +88,3 @@ "use strict"; | ||
*/ | ||
post(path, body) { | ||
post(path, body = {}) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -91,0 +91,0 @@ let response; |
@@ -0,2 +1,3 @@ | ||
export declare const V1_GET_INFO = "/v1/chain/get_info"; | ||
export declare const V1_GET_TABLE_ROWS = "/v1/chain/get_table_rows"; | ||
export declare const V1_GET_TABLE_BY_SCOPE = "/v1/chain/get_table_by_scope"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// Chain | ||
exports.V1_GET_INFO = "/v1/chain/get_info"; | ||
exports.V1_GET_TABLE_ROWS = "/v1/chain/get_table_rows"; | ||
exports.V1_GET_TABLE_BY_SCOPE = "/v1/chain/get_table_by_scope"; | ||
//# sourceMappingURL=endpoints.js.map |
export { GetTableRows } from "./chain/get_table_rows"; | ||
export { GetTableByScope } from "./chain/get_table_by_scope"; | ||
export { GetInfo } from "./chain/get_info"; | ||
export * from "./dappservices"; | ||
@@ -4,0 +5,0 @@ export { Action } from "./eosio/action_trace"; |
{ | ||
"name": "dapp-client", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "DAPP JavaScript/TypeScript Client Library", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
71091
54
1337