Constructor
new NemFacade(network)
- Description:
Creates a NEM facade.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
network |
string | NemNetwork | NEM network or network name. |
Members
Address :Address
- Description:
Network address class type.
- Source:
Network address class type.
Type:
BIP32_CURVE_NAME :string
- Description:
BIP32 curve name.
- Source:
BIP32 curve name.
Type:
- string
KeyPair :KeyPair
- Description:
Network key pair class type.
- Source:
Network key pair class type.
Type:
Verifier :Verifier
- Description:
Network verifier class type.
- Source:
Network verifier class type.
Type:
deriveSharedKey
- Description:
Derives shared key from key pair and other party's public key.
- Source:
Derives shared key from key pair and other party's public key.
network :NemNetwork
- Description:
Underlying network.
- Source:
Underlying network.
Type:
- NemNetwork
transactionFactory :TransactionFactory
- Description:
Underlying transaction factory.
- Source:
Underlying transaction factory.
Type:
Methods
bip32Path(accountId) → {Array.<number>}
- Description:
Creates a network compatible BIP32 path for the specified account.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
accountId |
number | Id of the account for which to generate a BIP32 path. |
Returns:
BIP32 path for the specified account.
- Type
- Array.<number>
hashTransaction(transaction) → {Hash256}
- Description:
Hashes a NEM transaction.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
transaction |
nc.Transaction | Transaction object. |
Returns:
Transaction hash.
- Type
- Hash256
signTransaction(keyPair, transaction) → {Signature}
- Description:
Signs a NEM transaction.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
keyPair |
KeyPair | Key pair. |
transaction |
nc.Transaction | Transaction object. |
Returns:
Transaction signature.
- Type
- Signature
verifyTransaction(transaction, signature) → {boolean}
- Description:
Verifies a NEM transaction.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
transaction |
nc.Transaction | Transaction object. |
signature |
Signature | Signature to verify. |
Returns:
\c true if transaction signature is verified.
- Type
- boolean
(static) bip32NodeToKeyPair(bip32Node) → {KeyPair}
- Description:
Derives a NEM KeyPair from a BIP32 node.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
bip32Node |
Bip32Node | BIP32 node. |
Returns:
Derived key pair.
- Type
- KeyPair