Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MessageApi

The Message API

Hierarchy

  • MessageApi

Index

Properties

sendEncryptedTextMessage

sendEncryptedTextMessage: function

Broadcasts an encrypted text message to the network/blockchain It's analogous to sendTextMessage but encrypts the message priorly

param

The text message to be encrypted and sent

param

The recipients Id, not RS Address

param

The senders key set for encryption and signing

param

The optional deadline (in minutes) for the transaction to be confirmed, 1440 minutes maximum

param

The optional fee (expressed in Burst) for the message, default is 0.1 Burst.

returns

The Transaction Id

Type declaration

    • (message: string, recipientId: string, recipientPublicKey: string, senderKeys: Keys, deadline?: number, fee?: number): Promise<TransactionId>
    • Parameters

      • message: string
      • recipientId: string
      • recipientPublicKey: string
      • senderKeys: Keys
      • Optional deadline: number
      • Optional fee: number

      Returns Promise<TransactionId>

sendTextMessage

sendTextMessage: function

Broadcasts a text message to the network/blockchain

The message will be broadcasted in two steps.

  1. Send the message with public key to the network
  2. Take the returned unsigned message and sign it, i.e. the private key won't be transmitted.
param

The text message to be sent

param

The recipients Id, not RS Address

param

The senders public key for sending an unsigned message

param

The senders private key to sign the message

param

The optional deadline (in minutes) for the transaction to be confirmed, 1440 minutes maximum

param

The optional fee (expressed in Burst) for the message, default is 0.1 Burst.

returns

The Transaction Id

Type declaration

    • (message: string, recipientId: string, senderPublicKey: string, senderPrivateKey: string, deadline?: number, fee?: number): Promise<TransactionId>
    • Parameters

      • message: string
      • recipientId: string
      • senderPublicKey: string
      • senderPrivateKey: string
      • Optional deadline: number
      • Optional fee: number

      Returns Promise<TransactionId>

Generated using TypeDoc