TransactionFactory

TransactionFactory

Factory for creating NEM transactions.

Constructor

new TransactionFactory(network, typeRuleOverrides)

Description:
  • Creates a factory for the specified network.

Source:
Parameters:
Name Type Description
network Network

NEM network.

typeRuleOverrides Map.<string, function()> | undefined

Type rule overrides.

Members

ruleNames

Description:
  • Gets rule names with registered hints.

Source:

Gets rule names with registered hints.

ruleNames

Description:
  • Gets rule names with registered hints.

Source:

Gets rule names with registered hints.

Methods

create(transactionDescriptor, autosort) → {nc.Transaction}

Description:
  • Creates a transaction from a transaction descriptor.

Source:
Parameters:
Name Type Default Description
transactionDescriptor object

Transaction descriptor.

autosort boolean true

When set (default), descriptor arrays requiring ordering will be automatically sorted. When unset, descriptor arrays will be presumed to be already sorted.

Returns:

Newly created transaction.

Type
nc.Transaction

create(transactionDescriptor, autosort) → {sc.Transaction}

Description:
  • Creates a transaction from a transaction descriptor.

Source:
Parameters:
Name Type Default Description
transactionDescriptor object

Transaction descriptor.

autosort boolean true

When set (default), descriptor arrays requiring ordering will be automatically sorted. When unset, descriptor arrays will be presumed to be already sorted.

Returns:

Newly created transaction.

Type
sc.Transaction

createEmbedded(transactionDescriptor, autosort) → {sc.EmbeddedTransaction}

Description:
  • Creates an embedded transaction from a transaction descriptor.

Source:
Parameters:
Name Type Default Description
transactionDescriptor object

Transaction descriptor.

autosort boolean true

When set (default), descriptor arrays requiring ordering will be automatically sorted. When unset, descriptor arrays will be presumed to be already sorted.

Returns:

Newly created transaction.

Type
sc.EmbeddedTransaction

(static) attachSignature(transaction, signature) → {string}

Description:
  • Attaches a signature to a transaction.

Source:
Parameters:
Name Type Description
transaction nc.Transaction

Transaction object.

signature Signature

Signature to attach.

Returns:

JSON transaction payload.

Type
string

(static) attachSignature(transaction, signature) → {string}

Description:
  • Attaches a signature to a transaction.

Source:
Parameters:
Name Type Description
transaction sc.Transaction

Transaction object.

signature Signature

Signature to attach.

Returns:

JSON transaction payload.

Type
string

(static) lookupTransactionName(transactionType, transactionVersion) → {string}

Description:
  • Looks up the friendly name for the specified transaction.

Source:
Parameters:
Name Type Description
transactionType nc.TransactionType

Transaction type.

transactionVersion number

Transaction version.

Returns:

Transaction friendly name.

Type
string

(static) lookupTransactionName(transactionType, transactionVersion) → {string}

Description:
  • Looks up the friendly name for the specified transaction.

Source:
Parameters:
Name Type Description
transactionType sc.TransactionType

Transaction type.

transactionVersion number

Transaction version.

Returns:

Transaction friendly name.

Type
string

(static) toNonVerifiableTransaction(transaction) → {nc.NonVerifiableTransaction}

Description:
  • Converts a transaction to a non-verifiable transaction.

Source:
Parameters:
Name Type Description
transaction nc.Transaction | nc.NonVerifiableTransaction

Transaction object.

Returns:

Non-verifiable transaction object.

Type
nc.NonVerifiableTransaction

TransactionFactory

Factory for creating Symbol transactions.

Constructor

new TransactionFactory(network, typeRuleOverrides)

Description:
  • Creates a factory for the specified network.

Source:
Parameters:
Name Type Description
network Network

Symbol network.

typeRuleOverrides Map.<string, function()> | undefined

Type rule overrides.

Members

ruleNames

Description:
  • Gets rule names with registered hints.

Source:

Gets rule names with registered hints.

ruleNames

Description:
  • Gets rule names with registered hints.

Source:

Gets rule names with registered hints.

Methods

create(transactionDescriptor, autosort) → {nc.Transaction}

Description:
  • Creates a transaction from a transaction descriptor.

Source:
Parameters:
Name Type Default Description
transactionDescriptor object

Transaction descriptor.

autosort boolean true

When set (default), descriptor arrays requiring ordering will be automatically sorted. When unset, descriptor arrays will be presumed to be already sorted.

Returns:

Newly created transaction.

Type
nc.Transaction

create(transactionDescriptor, autosort) → {sc.Transaction}

Description:
  • Creates a transaction from a transaction descriptor.

Source:
Parameters:
Name Type Default Description
transactionDescriptor object

Transaction descriptor.

autosort boolean true

When set (default), descriptor arrays requiring ordering will be automatically sorted. When unset, descriptor arrays will be presumed to be already sorted.

Returns:

Newly created transaction.

Type
sc.Transaction

createEmbedded(transactionDescriptor, autosort) → {sc.EmbeddedTransaction}

Description:
  • Creates an embedded transaction from a transaction descriptor.

Source:
Parameters:
Name Type Default Description
transactionDescriptor object

Transaction descriptor.

autosort boolean true

When set (default), descriptor arrays requiring ordering will be automatically sorted. When unset, descriptor arrays will be presumed to be already sorted.

Returns:

Newly created transaction.

Type
sc.EmbeddedTransaction

(static) attachSignature(transaction, signature) → {string}

Description:
  • Attaches a signature to a transaction.

Source:
Parameters:
Name Type Description
transaction nc.Transaction

Transaction object.

signature Signature

Signature to attach.

Returns:

JSON transaction payload.

Type
string

(static) attachSignature(transaction, signature) → {string}

Description:
  • Attaches a signature to a transaction.

Source:
Parameters:
Name Type Description
transaction sc.Transaction

Transaction object.

signature Signature

Signature to attach.

Returns:

JSON transaction payload.

Type
string

(static) lookupTransactionName(transactionType, transactionVersion) → {string}

Description:
  • Looks up the friendly name for the specified transaction.

Source:
Parameters:
Name Type Description
transactionType nc.TransactionType

Transaction type.

transactionVersion number

Transaction version.

Returns:

Transaction friendly name.

Type
string

(static) lookupTransactionName(transactionType, transactionVersion) → {string}

Description:
  • Looks up the friendly name for the specified transaction.

Source:
Parameters:
Name Type Description
transactionType sc.TransactionType

Transaction type.

transactionVersion number

Transaction version.

Returns:

Transaction friendly name.

Type
string

(static) toNonVerifiableTransaction(transaction) → {nc.NonVerifiableTransaction}

Description:
  • Converts a transaction to a non-verifiable transaction.

Source:
Parameters:
Name Type Description
transaction nc.Transaction | nc.NonVerifiableTransaction

Transaction object.

Returns:

Non-verifiable transaction object.

Type
nc.NonVerifiableTransaction