UNPKG

486 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.nToHex = void 0;
4const index_js_1 = require("../u8a/index.js");
5const toU8a_js_1 = require("./toU8a.js");
6/**
7 * @name nToHex
8 * @summary Creates a hex value from a bigint object.
9 */
10function nToHex(value, { bitLength = -1, isLe = false, isNegative = false } = {}) {
11 return (0, index_js_1.u8aToHex)((0, toU8a_js_1.nToU8a)(value || 0, { bitLength, isLe, isNegative }));
12}
13exports.nToHex = nToHex;