Class NemFacade

Facade used to interact with NEM blockchain.

Constructors

  • Creates a NEM facade.

    Parameters

    • network: string | Network

      NEM network or network name.

    Returns NemFacade

Properties

network: Network

Underlying network.

transactionFactory: TransactionFactory

Underlying transaction factory.

Address: typeof Address

Network address class type.

BIP32_CURVE_NAME: string

BIP32 curve name.

KeyPair: typeof KeyPair

Network key pair class type.

Verifier: typeof Verifier

Network verifier class type.

deriveSharedKey: ((keyPair, otherPublicKey) => SharedKey256)

Derives shared key from key pair and other party's public key.

Type declaration

Returns

Shared encryption key.

Accessors

  • get static(): typeof NemFacade
  • Gets class type.

    Returns typeof NemFacade

    Class type.

Methods

  • Creates a network compatible BIP32 path for the specified account.

    Parameters

    • accountId: number

      Id of the account for which to generate a BIP32 path.

    Returns number[]

    BIP32 path for the specified account.

  • Creates a NEM account from a private key.

    Parameters

    Returns NemAccount

    NEM account.

  • Creates a NEM public account from a public key.

    Parameters

    Returns NemPublicAccount

    NEM public account.

  • Creates a transaction from a (typed) transaction descriptor.

    Parameters

    • typedDescriptor: object

      Transaction (typed) descriptor.

    • signerPublicKey: PublicKey

      Signer public key.

    • fee: bigint

      Transaction fee.

    • deadlineSeconds: number

      Approximate seconds from now for deadline.

    Returns models.Transaction

    Created transaction.

  • Gets the payload to sign given a NEM transaction.

    Parameters

    Returns Uint8Array

    Verifiable data to sign.

  • Hashes a NEM transaction.

    Parameters

    Returns Hash256

    Transaction hash.

  • Creates a network timestamp representing the current time.

    Returns NetworkTimestamp

    Network timestamp representing the current time.

  • Signs a NEM transaction.

    Parameters

    Returns Signature

    Transaction signature.

  • Verifies a NEM transaction.

    Parameters

    Returns boolean

    \c true if transaction signature is verified.

  • Derives a NEM KeyPair from a BIP32 node.

    Parameters

    • bip32Node: Bip32Node

      BIP32 node.

    Returns KeyPair

    Derived key pair.