Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Transaction

Minter transaction.

Hierarchy

  • Transaction

Constructors

constructor

Properties

Protected _action

_action: Action = null

Protected _chain

_chain: Chain = null

Protected Optional _from

_from: Address = null

Protected Optional _senderPublicKey

_senderPublicKey: PublicKey = null

chainId

chainId: Buffer

data

data: Buffer

gasCoin

gasCoin: Buffer

gasPrice

gasPrice: Buffer

nonce

nonce: Buffer

payload

payload: Buffer

raw

raw: Buffer[]

serviceData

serviceData: Buffer

signature

signature: TransactionSignature = null

signatureData

signatureData: Buffer

signatureType

signatureType: Buffer

type

type: Buffer

Methods

getAction

  • Returns Action

getChainId

  • getChainId(): number
  • returns chain ID

    Returns number

getRaw

  • getRaw(): Buffer[]
  • Returns Buffer[]

getSenderAddress

  • Returns the sender's address

    Returns Address

getSenderPublicKey

  • returns the public key of the sender

    Returns PublicKey

getSignature

hash

  • hash(includeSignature?: boolean): Buffer
  • Computes a sha3-256 hash of the serialized tx

    Parameters

    • includeSignature: boolean = true

      Whether or not to include the signature

    Returns Buffer

isSignatureTypeMulti

  • isSignatureTypeMulti(): boolean
  • Returns boolean

isSignatureTypeSingle

  • isSignatureTypeSingle(): boolean
  • Returns boolean

isSigned

  • isSigned(): boolean
  • Returns boolean

isValidSignature

  • isValidSignature(): boolean
  • Determines if the signature is valid Side effect - setting up _senderPublicKey field

    Returns boolean

serialize

  • serialize(): Buffer
  • Returns the rlp encoding of the transaction

    Returns Buffer

sign

  • Parameters

    • keyPair: KeyPair
    • multiSigAddress: string = null

      Mx or 0x prefixed string

    Returns SignedTransaction

signAsync

toJSON

  • toJSON(labels?: boolean): string[] | object
  • Returns the transaction in JSON format

    Parameters

    • labels: boolean = false

    Returns string[] | object

toString

  • toString(): string
  • Returns string

validate

  • validate(): boolean
  • validate(stringError: false): boolean
  • validate(stringError: "true"): string
  • Validates the signature and checks to see if it has enough gas.

    Returns boolean

  • Parameters

    • stringError: false

    Returns boolean

  • Parameters

    • stringError: "true"

    Returns string

Static rlpSchema

  • Returns RlpSchemaField[]

Generated using TypeDoc