Skip to content

TransactionBuilder Class v1.0 Spec

Gabriel Cardona edited this page Jun 18, 2018 · 1 revision

TransactionBuilder

constructor

Arguments

  1. network: String. Default: bitcoincash

Return Value

  1. transactionBuilder: TransactionBuilder

addInput

Arguments

  1. txHash: String
  2. vout: Number
  3. sequence: Number. Default: 4294967295
  4. prevOutScript: Buffer

Return Value

  • None

addOutput

Arguments

  1. scriptPubKey: Buffer | String (if P2PKH)

Return Value

  • None

sign(vin, keyPair, redeemScript, hashType = this.hashTypes.SIGHASH_ALL, value) {

Arguments

  1. vin: Number
  2. keyPair: ECPair
  3. redeemScript: Buffer
  4. hashType: Number
  5. value: Number

Return Value

  • None

build

Arguments

  • None

Return Value

  • None

toHex

Arguments

  • None

Return Value

  • hex: String