UNPKG

@signumjs/core

Version:

Principal package with functions and models for building Signum Network applications.

27 lines (26 loc) 804 B
/** @ignore */ /** @internal */ import BigNumber from 'bignumber.js'; /** * Class to easily implement reading data sequentially. Expects hexstring * with big-endian bytes and methods return only positive values. Throws error * * @internal */ export default class ByteBuffer { private needle; private readonly transactionBytes; private readonly hexTransactionBytes; constructor(hexString: string); /** If setValue is undefined, returns the current needle position. * Else, sets current needle to that value. */ position(setValue?: number): number | undefined; length(): number; readByte(): number; readShort(): number; readInt(): number; readLong(): BigNumber; readHexString(nBytes: number): string; readString(nBytes: number): string; }