UNPKG

@yubing744/rooch-sdk

Version:
18 lines (17 loc) 406 B
const BIG_128Fs = BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"); const BIG_128 = BigInt(128); class U256 { constructor(value) { this.value = value; } serialize(se) { const low = BigInt(this.value.toString()) & BIG_128Fs; const high = BigInt(this.value.toString()) >> BIG_128; se.serializeU128(low); se.serializeU128(high); } } export { U256 }; //# sourceMappingURL=u256.js.map