UNPKG

dingojs

Version:

A simple but feature filled interface between Filecoin's Lotus client and JS.

30 lines 695 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const network_1 = require("./network"); class Core { constructor(rpc, tokenStr, id) { this.bundle = { endpoint: rpc, tokenStr: tokenStr, id: id || 1 }; } setRpc(rpc) { this.bundle.endpoint = rpc; } readRpc() { return this.bundle.endpoint; } setId(id) { this.bundle.id = id; } readId() { return this.bundle.id; } /** @internal */ postSimpleJson(simpleMethod) { return network_1.postJson(simpleMethod, this.bundle); } } exports.default = Core; //# sourceMappingURL=core.js.map