Options
All
  • Public
  • Public/Protected
  • All
Menu
description

Abstraction layer for the creation of digital signatures using dHealth Network Accounts and ellyptic curve cryptography. This class contains methods to sign transactions that can be broadcast using nodes from dHealth Network.

since

v0.4.0

Hierarchy

  • SignerService

Index

Constructors

  • new SignerService(configService: ConfigService<Record<string, unknown>, false>): SignerService

Properties

configService: ConfigService<Record<string, unknown>, false>
generationHash: string

Contains the generation hash used during signature creation. This field is used as an identifier of the network.

This field is filled from the configuration file config/network.ts.

access

protected

var

{string}

signerAccount: Account

Memory store for the private account that is used to sign transactions with the SignerService.signTransaction method.

This property is private and is used in the internal execution handler SignerService.signTransaction.

CAUTION: this instance contains a copy of the signer private key and must therefore be handled with care.

access

private

var

{Account}

Methods

  • getSignerPublicAccount(): PublicAccount
  • Method that returns the public account instance that is used to sign transactions using this service.

    access

    public

    Returns PublicAccount

    The public account that corresponds to the account used to sign transactions.

  • getSignerPublicKey(): string
  • Method that returns the public key of the account that is used to sign transactions using this service.

    access

    public

    Returns string

    The public key that corresponds to the account used to sign transactions.

  • signTransaction(transaction: Transaction): SignedTransaction
  • Method that executes the creation of a transaction signature using @dhealth/sdk's Account class.

    This signature algorithm is currently only compatible with accounts that are not multi-signature accounts. A further iteration shall permit the creation of co-signatures as well.

    access

    public

    Parameters

    • transaction: Transaction

      The prepared transaction that must be signed.

    Returns SignedTransaction

    The created signed transaction that was signed using SignerService.signerAccount.

Generated using TypeDoc