Home Reference Source
import TransactionBuilder from 'bitsharesjs/lib/chain/src/TransactionBuilder.js'
public class | source

TransactionBuilder

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

operations: *[]

public
public
public

signatures: *[]

public
public
public
Private Members
private

Method Summary

Public Methods
public

add_operation(operation: *)

Typically one will use this.add_type_operation instead.

public

add_signer(private_key: *, public_key: *)

public

add_type_operation(name: *, operation: *)

public

broadcast(was_broadcast_callback: *): *

public

finalize(): *

Typically this is called automatically just prior to signing.

public
public

get_required_signatures(available_keys: *): *

public

get_type_operation(name: *, operation: *): undefined[]

public
public

id(): string

public

process_transaction(cwallet: *, signer_pubkeys: undefined, broadcast: boolean): *

This does it all: set fees, finalize, sign, and broadcast (if wanted).

public

propose(proposal_create_options: *): *

public

serialize(): *

public

set_expire_seconds(sec: *): *

optional: there is a deafult expiration

public

set_required_fees(asset_id: *, removeDuplicates: *): *

optional: the fees can be obtained from the witness node

public

sign(chain_id: *)

public

toObject(): *

public

Public Constructors

public constructor() source

Public Members

public expiration: number source

public operations: *[] source

public ref_block_num: number source

public ref_block_prefix: number source

public signatures: *[] source

public signed: boolean source

public signer_private_keys: *[] source

public tr_buffer: * source

Private Members

private _broadcast: * source

Public Methods

public add_operation(operation: *) source

Typically one will use this.add_type_operation instead.

Params:

NameTypeAttributeDescription
operation *

public add_signer(private_key: *, public_key: *) source

Params:

NameTypeAttributeDescription
private_key *
public_key *
  • optional

public add_type_operation(name: *, operation: *) source

Params:

NameTypeAttributeDescription
name *
operation *

public broadcast(was_broadcast_callback: *): * source

Params:

NameTypeAttributeDescription
was_broadcast_callback *

Return:

*

public finalize(): * source

Typically this is called automatically just prior to signing. Once finalized this transaction can not be changed.

Return:

*

public get_potential_signatures(): * source

Return:

*

public get_required_signatures(available_keys: *): * source

Params:

NameTypeAttributeDescription
available_keys *

Return:

*

public get_type_operation(name: *, operation: *): undefined[] source

Params:

NameTypeAttributeDescription
name *
operation *

Return:

undefined[]

public has_proposed_operation(): * source

Return:

*

public id(): string source

Return:

string

hex transaction ID

public process_transaction(cwallet: *, signer_pubkeys: undefined, broadcast: boolean): * source

This does it all: set fees, finalize, sign, and broadcast (if wanted).

Params:

NameTypeAttributeDescription
cwallet *
signer_pubkeys undefined
  • optional
  • default: undefined
broadcast boolean
  • optional
  • default: false

Return:

*

public propose(proposal_create_options: *): * source

Params:

NameTypeAttributeDescription
proposal_create_options *

Return:

*

public serialize(): * source

Return:

*

public set_expire_seconds(sec: *): * source

optional: there is a deafult expiration

Params:

NameTypeAttributeDescription
sec *

Return:

*

public set_required_fees(asset_id: *, removeDuplicates: *): * source

optional: the fees can be obtained from the witness node

Params:

NameTypeAttributeDescription
asset_id *
removeDuplicates *

Return:

*

public sign(chain_id: *) source

Params:

NameTypeAttributeDescription
chain_id *
  • optional

public toObject(): * source

Return:

*

public update_head_block(): * source

Return:

*