NemFacade⚓︎
- NemFacade
- Facade used to interact with NEM blockchain.
Constructors⚓︎
new NemFacade()⚓︎
Creates a NEM facade.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
network |
string | Network |
NEM network or network name. |
Returns⚓︎
NemFacade
Properties⚓︎
| Property | Modifier | Type | Description |
|---|---|---|---|
network |
public |
Network |
Underlying network. |
transactionFactory |
public |
TransactionFactory |
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⚓︎
- NemFacade.static
- Gets class type.
Returns⚓︎
typeof NemFacade
Class type.
Methods⚓︎
bip32Path()⚓︎
- NemFacade.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.
createAccount()⚓︎
- NemFacade.createAccount
- Creates a NEM account from a private key.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
privateKey |
PrivateKey |
Account private key. |
Returns⚓︎
NEM account.
createPublicAccount()⚓︎
- NemFacade.createPublicAccount
- Creates a NEM public account from a public key.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
publicKey |
PublicKey |
Account public key. |
Returns⚓︎
NEM public account.
createTransactionFromTypedDescriptor()⚓︎
createTransactionFromTypedDescriptor(
typedDescriptor,
signerPublicKey,
fee,
deadlineSeconds): Transaction
- NemFacade.createTransactionFromTypedDescriptor
- Creates a transaction from a (typed) transaction descriptor.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
typedDescriptor |
object |
Transaction (typed) descriptor. |
signerPublicKey |
PublicKey |
Signer public key. |
fee |
bigint |
Transaction fee. |
deadlineSeconds |
number |
Approximate seconds from now for deadline. |
Returns⚓︎
Created transaction.
extractSigningPayload()⚓︎
- NemFacade.extractSigningPayload
- Gets the payload to sign given a NEM transaction.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
transaction |
Transaction |
Transaction object. |
Returns⚓︎
Uint8Array
Verifiable data to sign.
hashTransaction()⚓︎
- NemFacade.hashTransaction
- Hashes a NEM transaction.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
transaction |
Transaction |
Transaction object. |
Returns⚓︎
Transaction hash.
now()⚓︎
- NemFacade.now
- Creates a network timestamp representing the current time.
Returns⚓︎
Network timestamp representing the current time.
signTransaction()⚓︎
- NemFacade.signTransaction
- Signs a NEM transaction.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
keyPair |
KeyPair |
Key pair. |
transaction |
Transaction |
Transaction object. |
Returns⚓︎
Transaction signature.
verifyTransaction()⚓︎
- NemFacade.verifyTransaction
- Verifies a NEM transaction.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
transaction |
Transaction |
Transaction object. |
signature |
Signature |
Signature to verify. |
Returns⚓︎
boolean
true if transaction signature is verified.
bip32NodeToKeyPair()⚓︎
- NemFacade.bip32NodeToKeyPair
- Derives a NEM KeyPair from a BIP32 node.
Parameters⚓︎
| Parameter | Type | Description |
|---|---|---|
bip32Node |
Bip32Node |
BIP32 node. |
Returns⚓︎
Derived key pair.