# BufferReader | Stacks.js 1.4.1 Library Reference
Documentation for Stacks.js 1.4.1 Library Reference

### Hierarchy

- BufferReader

## Index

### Constructors

- constructor

### Properties

- smartBuffer

### Accessors

- internalBuffer
- readOffset

### Methods

- readBigUInt64BE
- readBigUIntBE
- readBigUIntLE
- readBuffer
- readString
- readUInt16BE
- readUInt32BE
- readUInt8
- readUInt8Enum
- fromBuffer

## Constructors

### constructor

- new BufferReader(options?: Buffer | SmartBufferOptions): BufferReader

- - Defined in packages/transactions/src/bufferReader.ts:51

  #### Parameters

  - ##### Optional options: Buffer | SmartBufferOptions

  #### Returns BufferReader

## Properties

### smartBuffer

smartBuffer: SmartBuffer

- Defined in packages/transactions/src/bufferReader.ts:47

## Accessors

### internalBuffer

- get internalBuffer(): Buffer

- - Defined in packages/transactions/src/bufferReader.ts:107

  #### Returns Buffer

### readOffset

- get readOffset(): number
- set readOffset(val: number): void

- - Defined in packages/transactions/src/bufferReader.ts:99

  #### Returns number

- - Defined in packages/transactions/src/bufferReader.ts:103

  #### Parameters

  - ##### val: number

  #### Returns void

## Methods

### readBigUInt64BE

- readBigUInt64BE(): bigint

- - Defined in packages/transactions/src/bufferReader.ts:91

  #### Returns bigint

### readBigUIntBE

- readBigUIntBE(length: number): bigint

- - Defined in packages/transactions/src/bufferReader.ts:84

  #### Parameters

  - ##### length: number

  #### Returns bigint

### readBigUIntLE

- readBigUIntLE(length: number): bigint

- - Defined in packages/transactions/src/bufferReader.ts:77

  #### Parameters

  - ##### length: number

  #### Returns bigint

### readBuffer

- readBuffer(length: number): Buffer

- - Defined in packages/transactions/src/bufferReader.ts:61

  #### Parameters

  - ##### length: number

  #### Returns Buffer

### readString

- readString(arg?: number | BufferEncoding, encoding?: BufferEncoding): string

- - Defined in packages/transactions/src/bufferReader.ts:95

  #### Parameters

  - ##### Optional arg: number | BufferEncoding

  - ##### Optional encoding: BufferEncoding

  #### Returns string

### readUInt16BE

- readUInt16BE(): number

- - Defined in packages/transactions/src/bufferReader.ts:73

  #### Returns number

### readUInt32BE

- readUInt32BE(offset?: number): number

- - Defined in packages/transactions/src/bufferReader.ts:65

  #### Parameters

  - ##### Optional offset: number

  #### Returns number

### readUInt8

- readUInt8(): number

- - Defined in packages/transactions/src/bufferReader.ts:69

  #### Returns number

### readUInt8Enum

- readUInt8Enum<T, TEnumValue>(enumVariable: {[ key in string]: TEnumValue }, invalidEnumErrorFormatter: (val: number) => Error): TEnumValue

- - Defined in packages/transactions/src/bufferReader.ts:111

  #### Type parameters

  - #### T: string

  - #### TEnumValue: number

  #### Parameters

  - ##### enumVariable: {[ key in string]: TEnumValue }

  - ##### invalidEnumErrorFormatter: (val: number) => Error

    - - (val: number): Error

      - #### Parameters

        - ##### val: number

        #### Returns Error

  #### Returns TEnumValue

### Static fromBuffer

- fromBuffer(buffer: Buffer): BufferReader

- - Defined in packages/transactions/src/bufferReader.ts:49

  #### Parameters

  - ##### buffer: Buffer

  #### Returns BufferReader

Generated using TypeDoc