UNPKG

@signumjs/core

Version:

Principal package with functions and models for building Signum Network applications.

56 lines 1.43 kB
"use strict"; /** * Original work Copyright (c) 2018 PoC-Consortium * Modified work Copyright (c) 2019 Burst Apps Team */ Object.defineProperty(exports, "__esModule", { value: true }); exports.AttachmentEncryptedMessage = exports.AttachmentMessage = exports.Attachment = void 0; /** * Attachment class * * The attachment class is used to appended to transaction where appropriate. * It is a super class for Message and EncryptedMessage. * */ class Attachment { type; constructor(type) { this.type = type; } } exports.Attachment = Attachment; /** * Message class * * The Message class is used to model a plain message attached to a transaction. * */ class AttachmentMessage extends Attachment { messageIsText; message; constructor(data) { super('message'); this.messageIsText = data.messageIsText; this.message = data.message; } } exports.AttachmentMessage = AttachmentMessage; /** * EncryptedMessage class * * The EncryptedMessage class is a model for a encrypted message attached to a transaction. * */ class AttachmentEncryptedMessage extends Attachment { data; nonce; isText; constructor(data) { super('encrypted_message'); this.data = data.data; this.nonce = data.nonce; this.isText = data.isText; } } exports.AttachmentEncryptedMessage = AttachmentEncryptedMessage; //# sourceMappingURL=attachment.js.map