Options
All
  • Public
  • Public/Protected
  • All
Menu

kyokan-plasma-client

Index

Type aliases

NumberLike

NumberLike: string | number | BN

Type alias for any type that can be converted to a BN. See https://github.com/indutny/bn.js for a full list of supported inputs to this type.

Variables

Const ZERO_ADDRESS

ZERO_ADDRESS: "0x0000000000000000000000000000000000000000" = "0x0000000000000000000000000000000000000000"

Functions

addressesEqual

  • addressesEqual(a: string, b: string): boolean
  • Parameters

    • a: string
    • b: string

    Returns boolean

blockFromWire

  • Parameters

    Returns Block

confirmedTransactionFromWire

ethSign

  • ethSign(hash: Buffer, privateKey: Buffer): Buffer
  • Parameters

    • hash: Buffer
    • privateKey: Buffer

    Returns Buffer

fromBNWire

  • Parameters

    Returns BN

gethKeccak256

  • gethKeccak256(hash: Buffer): Buffer
  • Parameters

    • hash: Buffer

    Returns Buffer

inputFromWire

  • Parameters

    Returns Input

inputToWire

  • Parameters

    Returns InputWire

keccak256

  • keccak256(buf: Buffer): Buffer
  • Parameters

    • buf: Buffer

    Returns Buffer

outpointFromConfirmedTxWire

outputFromWire

outputToWire

parseHex

  • parseHex(hex: string): Buffer
  • Parameters

    • hex: string

    Returns Buffer

pify

  • pify<T>(actor: function): Promise<T>
  • Type parameters

    • T

    Parameters

    • actor: function
        • (cb: function): void
        • Parameters

          • cb: function
              • (err: any, arg?: T): void
              • Parameters

                • err: any
                • Optional arg: T

                Returns void

          Returns void

    Returns Promise<T>

selectUTXOs

  • Parameters

    Returns Outpoint[]

sendResponseFromWire

sha256

  • sha256(buf: Buffer): Buffer
  • Parameters

    • buf: Buffer

    Returns Buffer

sign

  • sign(hash: Buffer, privateKey: Buffer): Buffer
  • Parameters

    • hash: Buffer
    • privateKey: Buffer

    Returns Buffer

tmSHA256

  • tmSHA256(bufs: Buffer[]): Buffer
  • Parameters

    • bufs: Buffer[]

    Returns Buffer

toBNWire

  • toBNWire(num: BN | number): BNWire
  • Parameters

    • num: BN | number

    Returns BNWire

toBig

  • Parameters

    Returns BN

toBuffer

  • toBuffer(num: NumberLike, bufLen?: number): Buffer
  • Parameters

    • num: NumberLike
    • Default value bufLen: number = 32

    Returns Buffer

toHex

  • toHex(buf: Buffer): string
  • Parameters

    • buf: Buffer

    Returns string

transactionBodyFromWire

transactionBodyToWire

transactionFromWire

transactionToWire

Generated using TypeDoc