Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Memory

Wasm Memory wrapper to perform JS side raw memory access.

Hierarchy

  • Memory

Index

Constructors

constructor

  • new Memory(memory: Memory): Memory

Properties

memory

memory: Memory

wasm32

wasm32: boolean = true

Methods

loadCString

  • loadCString(ptr: Pointer): string
  • Load null-terminated C-string from ptr.

    Parameters

    Returns string

loadF32

loadF64

loadI32

loadI64

loadPointer

loadRawBytes

  • loadRawBytes(ptr: Pointer, numBytes: number): Uint8Array
  • Load raw bytes from ptr.

    Parameters

    • ptr: Pointer

      The head address

    • numBytes: number

      The number

    Returns Uint8Array

loadTVMBytes

  • loadTVMBytes(ptr: Pointer): Uint8Array
  • Load TVMByteArray from ptr.

    Parameters

    • ptr: Pointer

      The address of the header.

    Returns Uint8Array

loadU16

loadU32

loadU8

loadUSize

sizeofPtr

  • sizeofPtr(): number

storeRawBytes

  • storeRawBytes(ptr: Pointer, bytes: Uint8Array): void
  • Store raw bytes to the ptr.

    Parameters

    • ptr: Pointer

      The head address.

    • bytes: Uint8Array

      The bytes content.

    Returns void

Generated using TypeDoc