Skip to content

SymbolTransactionFactory⚓︎

SymbolTransactionFactory
Factory for creating Symbol transactions.

Constructors⚓︎

new SymbolTransactionFactory()⚓︎

new SymbolTransactionFactory(network, typeRuleOverrides?): TransactionFactory

Creates a factory for the specified network.

Parameters⚓︎

Parameter Type Description
network Network Symbol network.
typeRuleOverrides? Map<string, Function> Type rule overrides.

Returns⚓︎

TransactionFactory

Accessors⚓︎

ruleNames⚓︎

Get Signature⚓︎

get ruleNames(): string[]
SymbolTransactionFactory.ruleNames
Gets rule names with registered hints.
Returns⚓︎

string[]

Rule names with registered hints.


static⚓︎

Get Signature⚓︎

get static(): typeof default
SymbolTransactionFactory.static
Gets class type.
Returns⚓︎

typeof default

Class type.

Methods⚓︎

create()⚓︎

create(transactionDescriptor, autosort?): Transaction
SymbolTransactionFactory.create
Creates a transaction from a transaction descriptor.

Parameters⚓︎

Parameter Type Description
transactionDescriptor object Transaction descriptor.
autosort? boolean When set (default), descriptor arrays requiring ordering will be automatically sorted. When unset, descriptor arrays will be presumed to be already sorted.

Returns⚓︎

Transaction

Newly created transaction.


createEmbedded()⚓︎

createEmbedded(transactionDescriptor, autosort?): EmbeddedTransaction
SymbolTransactionFactory.createEmbedded
Creates an embedded transaction from a transaction descriptor.

Parameters⚓︎

Parameter Type Description
transactionDescriptor object Transaction descriptor.
autosort? boolean When set (default), descriptor arrays requiring ordering will be automatically sorted. When unset, descriptor arrays will be presumed to be already sorted.

Returns⚓︎

EmbeddedTransaction

Newly created transaction.


attachSignature()⚓︎

static attachSignature(transaction, signature): string
SymbolTransactionFactory.attachSignature
Attaches a signature to a transaction.

Parameters⚓︎

Parameter Type Description
transaction Transaction Transaction object.
signature Signature Signature to attach.

Returns⚓︎

string

JSON transaction payload.


deserialize()⚓︎

static deserialize(payload): Transaction
SymbolTransactionFactory.deserialize
Deserializes a transaction from a binary payload.

Parameters⚓︎

Parameter Type Description
payload Uint8Array Binary payload.

Returns⚓︎

Transaction

Deserialized transaction.


deserializeEmbedded()⚓︎

static deserializeEmbedded(payload): EmbeddedTransaction
SymbolTransactionFactory.deserializeEmbedded
Deserializes an embedded transaction from a binary payload.

Parameters⚓︎

Parameter Type Description
payload Uint8Array Binary payload.

Returns⚓︎

EmbeddedTransaction

Deserialized embedded transaction.


lookupTransactionName()⚓︎

static lookupTransactionName(transactionType, transactionVersion): string
SymbolTransactionFactory.lookupTransactionName
Looks up the friendly name for the specified transaction.

Parameters⚓︎

Parameter Type Description
transactionType TransactionType Transaction type.
transactionVersion number Transaction version.

Returns⚓︎

string

Transaction friendly name.