/// <reference types="node" />
import type { IAnchoringResult } from "./models/IAnchoringResult";
import type { IChannelCreateOptions } from "./models/IChannelCreateOptions";
import type { IChannelDetails } from "./models/IChannelDetails";
import type { IChannelOptions } from "./models/IChannelOptions";
import type { IFetchResult } from "./models/IFetchResult";
export declare class IotaAnchoringChannel {
    static readonly DEFAULT_NODE = "https://chrysalis-nodes.iota.org";
    private readonly _channelID;
    private readonly _node;
    private _seed;
    private readonly _isPrivate;
    private readonly _encrypted;
    private readonly _channelAddress;
    private readonly _announceMsgID;
    private readonly _keyLoadMsgID;
    private _subscriber;
    private _authorPubKey;
    private _subscriberPubKey;
    private constructor();
    /**
     *  Returns the channelID ('channelAddress:announce_msg_id')
     *
     *  @returns channel ID
     */
    get channelID(): string;
    /**
     *  Returns the channel's address
     *
     *  @returns channel address
     */
    get channelAddr(): string;
    /**
     *  Returns the channel's first anchorage ID
     *
     *  @returns anchorageID
     */
    get firstAnchorageID(): string;
    /**
     *  Returns the channel's node
     *
     *  @returns node
     */
    get node(): string;
    /**
     *  Returns the channel's publisher seed
     *
     *  @returns seed
     */
    get seed(): string;
    /**
     *  Returns the channel's author Public Key
     *
     *  @returns the Author's Public key
     */
    get authorPubKey(): string;
    /**
     *  Returns the channel's subscriber Public Key
     *
     *  @returns the subscriber's Public key
     */
    get subscriberPubKey(): string;
    /**
     *  Returns whether the channel is encrypted or not
     *
     *  @returns boolean
     */
    get encrypted(): boolean;
    /**
     *  Returns whether the channel is private or not
     *
     *  @returns boolean
     */
    get isPrivate(): boolean;
    /**
     * Creates a new Anchoring Channel
     *
     * @param seed Author's seed
     * @param options  The options
     * @param options.node The node used to create the channel
     * @returns The anchoring channel details
     */
    static create(seed: string, options?: IChannelCreateOptions): Promise<IChannelDetails>;
    /**
     * Instantiates an existing Anchoring Channel from a Channel ID
     *
     * @param channelID in the form of 'channel_address:announce_msg_id'
     * @param options Channel options
     * @returns reference to the channel
     */
    static fromID(channelID: string, options?: IChannelOptions): IotaAnchoringChannel;
    /**
     *  Creates a new IotaAnchoringChannel and subscribes to it using the Author's seed
     *
     *  i.e. Author === Subscriber
     *  A new Seed is automatically generated
     *
     * @param options The channel creation options
     * @returns The Anchoring Channel
     */
    static bindNew(options?: IChannelCreateOptions): Promise<IotaAnchoringChannel>;
    private static getClient;
    /**
     * Binds the channel so that the subscriber is instantiated using the seed passed as parameter
     *
     * @param seed The Subscriber (publisher) seed
     * @param psk The Subscriber preshared key
     * @returns a Reference to the channel
     */
    bind(seed: string, psk?: string): Promise<IotaAnchoringChannel>;
    /**
     * Anchors a message to the anchoring channel
     *
     * @param message Message to be anchored
     * @param anchorageID The anchorage to be used
     * @returns The result of the operation
     */
    anchor(message: Buffer, anchorageID: string): Promise<IAnchoringResult>;
    /**
     * Fetches a previously anchored message
     *
     * @param anchorageID The anchorage point
     * @param messageID  The expected ID of the anchored message
     * @returns The fetch result
     */
    fetch(anchorageID: string, messageID?: string): Promise<IFetchResult>;
    /**
     * Fetches the next message anchored to the channel
     *
     * @returns The fetch result or undefined if no more messages can be fetched
     */
    fetchNext(): Promise<IFetchResult | undefined>;
    /**
     * Receives a previously anchored message
     * provided its anchorage has already been seen on the channel
     *
     * @param messageID  The ID of the message
     * @param anchorageID The expected ID of message's anchorage
     * @returns The message received and associated metadata
     */
    receive(messageID: string, anchorageID?: string): Promise<IFetchResult>;
}
