@orbs-network/contracts-js
Version:
Provides easy to use JS (TS) interfaces to interact with the Orbs Ethereum contracts
16 lines • 725 B
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.weiOrbsFromFullOrbs = exports.fullOrbsFromWeiOrbs = void 0;
var web3_1 = __importDefault(require("web3"));
function fullOrbsFromWeiOrbs(weiOrbsString) {
return parseFloat(web3_1.default.utils.fromWei(weiOrbsString, "ether"));
}
exports.fullOrbsFromWeiOrbs = fullOrbsFromWeiOrbs;
function weiOrbsFromFullOrbs(fullOrbs) {
return BigInt(web3_1.default.utils.toWei(fullOrbs.toString(), "ether"));
}
exports.weiOrbsFromFullOrbs = weiOrbsFromFullOrbs;
//# sourceMappingURL=cryptoUnitConverter.js.map
;