SymbolFacade⚓︎
- SymbolFacade
- Facade used to interact with Symbol blockchain.
Constructors⚓︎
new SymbolFacade()⚓︎
Creates a Symbol facade.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
network |
string | Network |
Symbol network or network name. |
Returns⚓︎
SymbolFacade
Properties⚓︎
| Property | Modifier | Type | Description |
|---|---|---|---|
network |
public |
Network |
Underlying network. |
transactionFactory |
public |
SymbolTransactionFactory |
Underlying transaction factory. |
Address |
static |
typeof Address |
Network address class type. |
BIP32_CURVE_NAME |
static |
string |
BIP32 curve name. |
deriveSharedKey |
static |
(keyPair: KeyPair, otherPublicKey: PublicKey) => SharedKey256 |
Derives shared key from key pair and other party's public key. |
KeyPair |
static |
typeof KeyPair |
Network key pair class type. |
Verifier |
static |
typeof Verifier |
Network verifier class type. |
Accessors⚓︎
static⚓︎
Get Signature⚓︎
- SymbolFacade.static
- Gets class type.
Returns⚓︎
typeof SymbolFacade
Class type.
Methods⚓︎
bip32Path()⚓︎
- SymbolFacade.bip32Path
- Creates a network compatible BIP32 path for the specified account.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
accountId |
number |
Id of the account for which to generate a BIP32 path. |
Returns⚓︎
number[]
BIP32 path for the specified account.
cosignTransaction()⚓︎
- SymbolFacade.cosignTransaction
- Cosigns a Symbol transaction.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
keyPair |
KeyPair |
Key pair of the cosignatory. |
transaction |
Transaction |
Transaction object. |
detached? |
boolean |
\c true if resulting cosignature is appropriate for network propagation. \c false if resulting cosignature is appropriate for attaching to an aggregate. |
Returns⚓︎
| Cosignature
| DetachedCosignature
Signed cosignature.
createAccount()⚓︎
- SymbolFacade.createAccount
- Creates a Symbol account from a private key.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
privateKey |
PrivateKey |
Account private key. |
Returns⚓︎
Symbol account.
createEmbeddedTransactionFromTypedDescriptor()⚓︎
- SymbolFacade.createEmbeddedTransactionFromTypedDescriptor
- Creates an embedded transaction from a (typed) transaction descriptor.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
typedDescriptor |
object |
Transaction (typed) descriptor. |
signerPublicKey |
PublicKey |
Signer public key. |
Returns⚓︎
Created embedded transaction.
createPublicAccount()⚓︎
- SymbolFacade.createPublicAccount
- Creates a Symbol public account from a public key.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
publicKey |
PublicKey |
Account public key. |
Returns⚓︎
Symbol public account.
createTransactionFromTypedDescriptor()⚓︎
createTransactionFromTypedDescriptor(
typedDescriptor,
signerPublicKey,
feeMultiplier,
deadlineSeconds,
cosignatureCount?): Transaction
- SymbolFacade.createTransactionFromTypedDescriptor
- Creates a transaction from a (typed) transaction descriptor.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
typedDescriptor |
object |
Transaction (typed) descriptor. |
signerPublicKey |
PublicKey |
Signer public key. |
feeMultiplier |
number |
Fee multiplier. |
deadlineSeconds |
number |
Approximate seconds from now for deadline. |
cosignatureCount? |
number |
Number of cosignature spaces to reserve. |
Returns⚓︎
Created transaction.
extractSigningPayload()⚓︎
- SymbolFacade.extractSigningPayload
- Gets the payload to sign given a Symbol transaction.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
transaction |
Transaction |
Transaction object. |
Returns⚓︎
Uint8Array
Verifiable data to sign.
hashTransaction()⚓︎
- SymbolFacade.hashTransaction
- Hashes a Symbol transaction.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
transaction |
Transaction |
Transaction object. |
Returns⚓︎
Transaction hash.
now()⚓︎
- SymbolFacade.now
- Creates a network timestamp representing the current time.
Returns⚓︎
Network timestamp representing the current time.
signTransaction()⚓︎
- SymbolFacade.signTransaction
- Signs a Symbol transaction.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
keyPair |
KeyPair |
Key pair. |
transaction |
Transaction |
Transaction object. |
Returns⚓︎
Transaction signature.
verifyTransaction()⚓︎
- SymbolFacade.verifyTransaction
- Verifies a Symbol transaction.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
transaction |
Transaction |
Transaction object. |
signature |
Signature |
Signature to verify. |
Returns⚓︎
boolean
\c true if transaction signature is verified.
bip32NodeToKeyPair()⚓︎
- SymbolFacade.bip32NodeToKeyPair
- Derives a Symbol KeyPair from a BIP32 node.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
bip32Node |
Bip32Node |
BIP32 node. |
Returns⚓︎
Derived key pair.
cosignTransactionHash()⚓︎
static cosignTransactionHash(
keyPair,
transactionHash,
detached?):
| Cosignature
| DetachedCosignature
- SymbolFacade.cosignTransactionHash
- Cosigns a Symbol transaction hash.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
keyPair |
KeyPair |
Key pair of the cosignatory. |
transactionHash |
Hash256 |
Transaction hash. |
detached? |
boolean |
\c true if resulting cosignature is appropriate for network propagation. \c false if resulting cosignature is appropriate for attaching to an aggregate. |
Returns⚓︎
| Cosignature
| DetachedCosignature
Signed cosignature.
hashEmbeddedTransactions()⚓︎
- SymbolFacade.hashEmbeddedTransactions
- Hashes embedded transactions of an aggregate transaction.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
embeddedTransactions |
EmbeddedTransaction[] |
Embedded transactions to hash. |
Returns⚓︎
Aggregate transactions hash.