@lodestar/utils 1.14.0-dev.ae04197ccd → 1.14.0-dev.c86a669610

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ export declare const ETH_TO_GWEI: bigint;
2
+ export declare const GWEI_TO_WEI: bigint;
3
+ export declare const ETH_TO_WEI: bigint;
4
+ type EthNumeric = bigint;
5
+ /**
6
+ * Convert gwei to wei.
7
+ */
8
+ export declare function gweiToWei(gwei: EthNumeric): EthNumeric;
9
+ export {};
10
+ //# sourceMappingURL=ethConversion.d.ts.map
@@ -0,0 +1,10 @@
1
+ export const ETH_TO_GWEI = BigInt(10 ** 9);
2
+ export const GWEI_TO_WEI = BigInt(10 ** 9);
3
+ export const ETH_TO_WEI = ETH_TO_GWEI * GWEI_TO_WEI;
4
+ /**
5
+ * Convert gwei to wei.
6
+ */
7
+ export function gweiToWei(gwei) {
8
+ return gwei * GWEI_TO_WEI;
9
+ }
10
+ //# sourceMappingURL=ethConversion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ethConversion.js","sourceRoot":"","sources":["../src/ethConversion.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAC3C,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;AAIpD;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,IAAgB;IACxC,OAAO,IAAI,GAAG,WAAW,CAAC;AAC5B,CAAC"}
package/lib/index.d.ts CHANGED
@@ -19,4 +19,5 @@ export * from "./url.js";
19
19
  export * from "./verifyMerkleBranch.js";
20
20
  export * from "./promise.js";
21
21
  export * from "./waitFor.js";
22
+ export * from "./ethConversion.js";
22
23
  //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -19,4 +19,5 @@ export * from "./url.js";
19
19
  export * from "./verifyMerkleBranch.js";
20
20
  export * from "./promise.js";
21
21
  export * from "./waitFor.js";
22
+ export * from "./ethConversion.js";
22
23
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAC,KAAK,EAAoB,MAAM,YAAY,CAAC;AACpD,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAwB,OAAO,EAAC,MAAM,YAAY,CAAC;AAC1D,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAC,KAAK,EAAoB,MAAM,YAAY,CAAC;AACpD,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAwB,OAAO,EAAC,MAAM,YAAY,CAAC;AAC1D,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC"}
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/ChainSafe/lodestar/issues"
13
13
  },
14
- "version": "1.14.0-dev.ae04197ccd",
14
+ "version": "1.14.0-dev.c86a669610",
15
15
  "type": "module",
16
16
  "exports": "./lib/index.js",
17
17
  "files": [
@@ -58,5 +58,5 @@
58
58
  "beacon",
59
59
  "blockchain"
60
60
  ],
61
- "gitHead": "3e740f1b9b630e8ff1990c615ef3c8e2fd6646d7"
61
+ "gitHead": "71ae38dec92ea1649a41012eb1d4ce764f8c9fde"
62
62
  }