Interface SendEncryptedMessageArgs

The argument object for MessageApi.sendEncryptedMessage

The message that will be encrypted

Determine whether content is text or binary data. Defaults to true

The id of the recipient

The recipients public key in hex format.

The senders agreement key used for encryption

interface SendEncryptedMessageArgs {
    attachment?: Attachment;
    deadline?: number;
    feePlanck: string;
    message: string;
    messageIsText?: boolean;
    recipientId: string;
    recipientPublicKey: string;
    referencedTransactionFullHash?: string;
    senderAgreementKey: string;
    senderPrivateKey?: string;
    senderPublicKey: string;
    skipAdditionalSecurityCheck?: boolean;
}

Hierarchy

  • DefaultSendArgs
    • SendEncryptedMessageArgs

Properties

attachment?: Attachment

An optional attachment

deadline?: number

The deadline when after how many minutes the transaction will be discarded, if it was not processed, e.g. due to very low fee

feePlanck: string

The fee expressed in Planck

It's recommended to use util.Amount

message: string
messageIsText?: boolean
recipientId: string
recipientPublicKey: string
referencedTransactionFullHash?: string

Using this field allows to make a transaction dependent on other transactions.

senderAgreementKey: string
senderPrivateKey?: string

The senders private key, i.e. the crypto.SignKeys.signPrivateKey If the private key is not given, then the transaction method will return the unsigned byte string. The transaction won't be processed until the unsigned bytes are being signed and broadcasted using TransactionApi.signAndBroadcastTransaction

senderPublicKey: string

The senders public key, i.e. the crypto.SignKeys.publicKey

skipAdditionalSecurityCheck?: boolean

Setting this option to true, skips the additional security check, i.e. the verification of the unsigned transaction bytes, which detects tampered node responses. By default, the option is false. Usually, you won't use this option, but can be useful when a method cannot be verified, because the verification is not implemented yet.