Options
All
  • Public
  • Public/Protected
  • All
Menu

The Transform class is a helper to provide data transformation to and from the formats required by hyperledger fabric.

Hierarchy

  • Transform

Index

Properties

Static logger

logger: LoggerInstance = Helpers.getLoggerInstance('Transform', 'info')

Methods

Static bufferToDate

  • bufferToDate(buffer: Buffer): Date | undefined
  • bufferToDate

    static
    memberof

    Transform

    Parameters

    • buffer: Buffer

    Returns Date | undefined

Static bufferToObject

  • bufferToObject(buffer: Buffer): any | string
  • parse string to object

    static
    memberof

    Transform

    Parameters

    • buffer: Buffer

    Returns any | string

Static bufferToString

  • bufferToString(buffer: Buffer): string | undefined

Static iteratorToHistoryList

Static iteratorToKVList

  • iteratorToKVList(iterator: Iterator): Promise<KV[]>
  • Transform iterator to array of objects

    Parameters

    • iterator: Iterator

    Returns Promise<KV[]>

Static iteratorToList

  • iteratorToList(iterator: Iterator): Promise<any[]>
  • Transform iterator to array of objects

    Parameters

    • iterator: Iterator

    Returns Promise<any[]>

Static normalizePayload

  • normalizePayload(value: any): any

Static serialize

  • serialize(value: any): Buffer

Generated using TypeDoc