Options
All
  • Public
  • Public/Protected
  • All
Menu

Module abi

Index

Functions

Functions

Const decode

  • decode<T>(types: Try<T, [], NarrowRaw<T>>, buffer: Uint8Array): Mapper<OutputTypeMap, T>
  • Decode an ABI encoded buffer with the specified types.

    Type parameters

    • T: string[]

    Parameters

    • types: Try<T, [], NarrowRaw<T>>

      The types to decode the buffer with.

    • buffer: Uint8Array

      The buffer to decode.

    Returns Mapper<OutputTypeMap, T>

    The decoded values as array.

Const encode

  • encode<T>(types: Try<T, [], NarrowRaw<T>>, values: Mapper<InputTypeMap, T>): Uint8Array
  • Encode the data with the provided types.

    Type parameters

    • T: string[]

    Parameters

    • types: Try<T, [], NarrowRaw<T>>

      The types to encode.

    • values: Mapper<InputTypeMap, T>

      The values to encode. This array must have the same length as the types array.

    Returns Uint8Array

    The ABI encoded buffer.

Generated using TypeDoc