Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

Properties

Protected brokerBaseUrl

brokerBaseUrl: string

Protected config

Protected hancockSocket

hancockSocket: HancockSocket

Protected platform

Protected signerFn

signerFn: HancockSignerFn

Protected walletApiBaseUrl

walletApiBaseUrl: string

Methods

send

  • Send a raw transaction to the {{platform}} network (It is assumed that the "from" address which will sign the transaction is stored in the node)

    Parameters

    Returns Promise<HancockSendTxResponse>

    The result of the transaction

sendSigned

sendToSignProvider

  • Send a raw transaction to one of the sign providers registered in hancock

    Parameters

    • rawTx: DltRawTransaction

      A raw transaction which will be signed by the sign provider

    • provider: string

      The sign provider alias which will receive the raw transaction

    • Optional callback: HancockCallBackOptions

      Information about callback url to get feedback of the transaction status

    Returns Promise<HancockSignResponse>

    The result of the request

sign

  • Sign a raw transaction with a given private key

    Parameters

    • rawTx: DltRawTransaction | string

      A raw transaction which will be signed by the sign provider

    • privateKey: string

      The private key with which the raw transaction will be signed

    Returns string

    The signed transaction

signAndSend

subscribe

  • Create a websocket subscription to watch transactions in the network

    Parameters

    • Default value addresses: string[] = []

      An array of address that will be added to the watch list

    • Default value consumer: string = ""

      A consumer plugin previously configured in hancock that will handle each received event

    • Default value status: HancockSocketStatus = "mined"

      The status of transactions which we want to subscribe, it can take two diferent values: 'mined' and 'pending'

    Returns HancockSocket

    An event emmiter that will fire the watched transaction events

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc