@ckb-lumos/base
Advanced tools
Comparing version 0.17.0-rc8 to 0.17.0-rc9
@@ -18,3 +18,3 @@ import { Hash, HexNumber, HexString, PackedSince } from "./primitive"; | ||
export type HashType = "type" | "data"; | ||
export type HashType = "type" | "data" | "data1"; | ||
export interface Script { | ||
@@ -21,0 +21,0 @@ code_hash: Hash; |
@@ -54,4 +54,3 @@ const blake2b = require("blake2b"); | ||
function readBigUInt64LE(hex) { | ||
const buf = Buffer.from(hex.slice(2), "hex"); | ||
return buf.readBigUInt64LE(); | ||
return readBigUInt64LECompatible(hex).toBigInt(); | ||
} | ||
@@ -96,7 +95,3 @@ | ||
function readBigUInt128LE(leHex) { | ||
if (leHex.length < 34 || !leHex.startsWith("0x")) { | ||
throw new Error(`leHex format error`); | ||
} | ||
const buf = Buffer.from(leHex.slice(2, 34), "hex"); | ||
return (buf.readBigUInt64LE(8) << BigInt(64)) + buf.readBigUInt64LE(0); | ||
return readBigUInt128LECompatible(leHex).toBigInt(); | ||
} | ||
@@ -103,0 +98,0 @@ |
{ | ||
"name": "@ckb-lumos/base", | ||
"version": "0.17.0-rc8", | ||
"version": "0.17.0-rc9", | ||
"description": "Base data structures and utilities used in lumos", | ||
@@ -40,3 +40,3 @@ "author": "Xuejie Xiao <xxuejie@gmail.com>", | ||
"@ckb-lumos/bi": "^0.17.0-rc8", | ||
"@ckb-lumos/toolkit": "^0.17.0-rc8", | ||
"@ckb-lumos/toolkit": "0.17.0-rc9", | ||
"@types/lodash.isequal": "^4.5.5", | ||
@@ -50,3 +50,3 @@ "blake2b": "^2.1.3", | ||
}, | ||
"gitHead": "2489e45e67fad85feb01e6a9793bcc150c30b8a3" | ||
"gitHead": "71099f8ae75d1cc4c005f5e7f25d127df2ee387b" | ||
} |
91421
2682
+ Added@ckb-lumos/toolkit@0.17.0-rc9(transitive)
- Removed@ckb-lumos/toolkit@0.17.0(transitive)