import { IClient } from '@/types'; import { SendMessage, SubscribeToChannel, UnsubscribeFromChannel, ViewAllMessageChannelsResponse, ViewAllMessagesResponse, ViewMyRestrictedAddressesResponse, ViewMyTaggedAddressesResponse } from './types'; /** * @class Messages * @subcategory Methods */ export declare class Messages { private _client; constructor(client: IClient); /** * View all messages that the wallet contains * @returns {Promise} */ viewAllMessages(): Promise; /** * View all message channels the wallet is subscribed to * @returns {Promise} */ viewAllMessageChannels(): Promise; /** * Subscribe to a certain message channel * @example * client.messages.subscribeToChannel({channel_name: 'MU3GOZ2FMGHJLM5TTAJDQ5SNAHHRBC!'}) * @param params * @param {string} params.channel_name The channel name to subscribe to, it must end with '!' or have an '~' in the name * @returns {Promise} */ subscribeToChannel({ channel_name }: SubscribeToChannel): Promise; /** * Unsubscribe from a certain message channel * @example * client.messages.unsubscribeFromChannel({channel_name: 'MU3GOZ2FMGHJLM5TTAJDQ5SNAHHRBC!'}) * @param params * @param {string} params.channel_name The channel name to unsubscribe from, must end with '!' or have an '~' in the name * @returns {Promise} */ unsubscribeFromChannel({ channel_name, }: UnsubscribeFromChannel): Promise; /** * Creates and broadcasts a message transaction to the network for a channel this wallet owns * @example * client.messages.sendMessage({ channel: 'MU3GOZ2FMGHJLM5TTAJDQ5SNAHHRBC!', ipfs_hash: 'QmTqu3Lk3gmTsQVtjU7rYYM37EAW4xNmbuEAp2Mjr4AV7E', expire_time: 60 }) * @param params * @param {string} params.channel_name Name of the channel that you want to send a message with (message channel, administrator asset), if a non administrator asset name is given, the administrator '!' will be added to it * @param {string} params.ipfs_hash The IPFS hash of the message * @param {number=} params.expire_time UTC timestamp of when the message expires * @returns {Promise} Array of a transaction id */ sendMessage({ channel_name, ipfs_hash, expire_time, }: SendMessage): Promise; /** * View all addresses this wallet owns that have been tagged * @returns {Promise} */ viewMyTaggedAddresses(): Promise; /** * View all addresses this wallet owns that have been restricted * @returns {Promise} */ viewMyRestrictedAddresses(): Promise; /** * Delete current database of messages * @returns {Promise} */ clearMessages(): Promise; }