@yubing744/rooch-sdk
Version:
25 lines (24 loc) • 603 B
JavaScript
import { BinarySerializer } from "../serde/binarySerializer";
class BcsSerializer extends BinarySerializer {
serializeU32AsUleb128(value) {
const valueArray = [];
while (value >>> 7 != 0) {
valueArray.push(value & 127 | 128);
value = value >>> 7;
}
valueArray.push(value);
this.serialize(new Uint8Array(valueArray));
}
serializeLen(value) {
this.serializeU32AsUleb128(value);
}
serializeVariantIndex(value) {
this.serializeU32AsUleb128(value);
}
sortMapEntries(_offsets) {
}
}
export {
BcsSerializer
};
//# sourceMappingURL=bcsSerializer.js.map