Class: SerialBuffer

Hierarchy

  • SerialBuffer

Index

Constructors

Properties

Methods

Constructors

constructor

+ new SerialBuffer(__namedParameters: object): SerialBuffer

Parameters:

Name Type Default Description
__namedParameters object {} as
{ textEncoder?: TextEncoder, textDecoder?: TextDecoder, array?: Uint8Array } array: null if serializing, or binary data to deserialize textEncoder: TextEncoder instance to use. Pass in null if running in a browser textDecoder: TextDecider instance to use. Pass in null if running in a browser

Returns: SerialBuffer

Properties

array

array: Uint8Array


length

length: number


readPos

readPos: number = 0


textDecoder

textDecoder: TextDecoder


textEncoder

textEncoder: TextEncoder

Methods

asUint8Array

asUint8Array(): Uint8Array

Returns: Uint8Array


get

get(): number

Returns: number


getAsset

getAsset(): string

Returns: string


getBytes

getBytes(): Uint8Array

Returns: Uint8Array


getFloat32

getFloat32(): number

Returns: number


getFloat64

getFloat64(): number

Returns: number


getName

getName(): string

Returns: string


getPrivateKey

getPrivateKey(): string

Returns: string


getPublicKey

getPublicKey(): string

Returns: string


getSignature

getSignature(): string

Returns: string


getString

getString(): string

Returns: string


getSymbol

getSymbol(): object

Returns: object


getSymbolCode

getSymbolCode(): string

Returns: string


getUint16

getUint16(): number

Returns: number


getUint32

getUint32(): number

Returns: number


getUint64AsNumber

getUint64AsNumber(): number

Returns: number


getUint8Array

getUint8Array(len: number): Uint8Array

Parameters:

Name Type
len number

Returns: Uint8Array


getVarint32

getVarint32(): number

Returns: number


getVaruint32

getVaruint32(): number

Returns: number


haveReadData

haveReadData(): boolean

Returns: boolean


push

push(...v: number[]): void

Parameters:

Name Type
...v number[]

Returns: void


pushArray

pushArray(v: number[] | Uint8Array): void

Parameters:

Name Type
v number[] | Uint8Array

Returns: void


pushAsset

pushAsset(s: string): void

Parameters:

Name Type
s string

Returns: void


pushBytes

pushBytes(v: number[] | Uint8Array): void

Parameters:

Name Type
v number[] | Uint8Array

Returns: void


pushFloat32

pushFloat32(v: number): void

Parameters:

Name Type
v number

Returns: void


pushFloat64

pushFloat64(v: number): void

Parameters:

Name Type
v number

Returns: void


pushName

pushName(s: string): void

Parameters:

Name Type
s string

Returns: void


pushNumberAsUint64

pushNumberAsUint64(v: number): void

Parameters:

Name Type
v number

Returns: void


pushPrivateKey

pushPrivateKey(s: string): void

Parameters:

Name Type
s string

Returns: void


pushPublicKey

pushPublicKey(s: string): void

Parameters:

Name Type
s string

Returns: void


pushSignature

pushSignature(s: string): void

Parameters:

Name Type
s string

Returns: void


pushString

pushString(v: string): void

Parameters:

Name Type
v string

Returns: void


pushSymbol

pushSymbol(__namedParameters: object): void

Parameters:

Name Type
__namedParameters object

Returns: void


pushSymbolCode

pushSymbolCode(name: string): void

Parameters:

Name Type
name string

Returns: void


pushUint16

pushUint16(v: number): void

Parameters:

Name Type
v number

Returns: void


pushUint32

pushUint32(v: number): void

Parameters:

Name Type
v number

Returns: void


pushUint8ArrayChecked

pushUint8ArrayChecked(v: Uint8Array, len: number): void

Parameters:

Name Type
v Uint8Array
len number

Returns: void


pushVarint32

pushVarint32(v: number): void

Parameters:

Name Type
v number

Returns: void


pushVaruint32

pushVaruint32(v: number): void

Parameters:

Name Type
v number

Returns: void


reserve

reserve(size: number): void

Parameters:

Name Type
size number

Returns: void


restartRead

restartRead(): void

Returns: void


skip

skip(len: number): void

Parameters:

Name Type
len number

Returns: void