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 isDate

  • isDate(date: any): boolean

Static isObject

  • isObject(data: any): boolean

Static isString

  • isString(data: any): boolean

Static iteratorToHistoryList

Static iteratorToKVList

  • iteratorToKVList(iterator: CommonIterator): Promise<KV[]>

Static iteratorToList

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

    Parameters

    • iterator: CommonIterator

    Returns Promise<any[]>

Static normalizePayload

  • normalizePayload(value: any): any

Static serialize

  • serialize(value: any): Buffer

Generated using TypeDoc