export class BasicSignature {
    /**
     * 从decoder中读取数据
     * @param {any} decoder
     * @returns {{
     *   id: string,
     *   type: number,
     *   secretKeysId: string,
     *   signatory: string,
     *   content: string,
     *   light: boolean
     * }}
     */
    static fromDecoder(decoder: any): {
        id: string;
        type: number;
        secretKeysId: string;
        signatory: string;
        content: string;
        light: boolean;
    };
    /**
     * 构造方法
     * @param {{
        *   id?: string,  // 签名id
        *   light?: boolean, // 是否为轻签名
        *   type: number, // 签名方法
        *   content: string, // 签名hash
        *   signatory: string, // 签名人
        *   secretKeysId: string, // 签名使用的密钥id
        *   verify?: number, //是否验证成功
        * }} options
    */
    constructor(options: {
        id?: string;
        light?: boolean;
        type: number;
        content: string;
        signatory: string;
        secretKeysId: string;
        verify?: number;
    });
    id: string;
    light: boolean;
    type: number;
    secretKeysId: string;
    signatory: string;
    content: string;
    verify: number;
    /**
     *
     * @param {any} encoder
     */
    toEncoder(encoder: any): void;
    /**
     * 打印signature信息
     * @returns {string}
     */
    toString(): string;
}
export class Signature extends BasicSignature {
    /**
     *
     * @param {any} decoder
     * @returns {Signature}
     */
    static fromDecoder(decoder: any): Signature;
    /**
     *
     * @param {Item} item
     * @param {Doc} doc
     * @returns {Array<Signature> | null}
     */
    static sign(item: Item, doc: Doc): Array<Signature> | null;
    /**
     *
     * @param {Item} item
     * @param {Doc} doc
     * @param {Array<Signature | null> | null} signature
     * @param {number} offset
     * @returns {Array<boolean | Promise<boolean>> | boolean}
     */
    static verify(item: Item, doc: Doc, signature: Array<Signature | null> | null, offset: number): Array<boolean | Promise<boolean>> | boolean;
}
export class IntegrateSignature extends BasicSignature {
    /**
     * @type {Map<string, IntegrateSignature>}
     */
    static signaturePool: Map<string, IntegrateSignature>;
    /**
     *
     * @param {any} decoder
     * @returns {IntegrateSignature}
     */
    static fromDecoder(decoder: any): IntegrateSignature;
    /**
     * 检测一个聚合签名是否可以绑定给一个item
     * @param {Item} item
     * @param {IntegrateSignature | null | undefined} signature
     */
    static isSuitable(item: Item, signature: IntegrateSignature | null | undefined): boolean;
    /**
     *
     * @param {Item} item
     * @param {Doc} doc
     * @returns {IntegrateSignature | null}
     */
    static sign(item: Item, doc: Doc): IntegrateSignature | null;
    /**
     *
     * @param {Item} item
     * @param {Doc} doc
     * @param {IntegrateSignature | null | undefined} signature
     * @returns {boolean | Promise<boolean>}
     */
    static verify(item: Item, doc: Doc, signature: IntegrateSignature | null | undefined): boolean | Promise<boolean>;
    /**
     * 构造方法
     * @param {{
     *   id?: string,  // 签名id
     *   type: number, // 签名方法
     *   content: string, // 签名hash
     *   signatory: string, // 签名人
     *   ids: Array<ID> // 签名items IDs
     *   secretKeysId: string, // 签名使用的密钥id
     *   verify?: number, //是否验证成功
     * }} options
     */
    constructor(options: {
        id?: string;
        type: number;
        content: string;
        signatory: string;
        ids: Array<ID>;
        secretKeysId: string;
        verify?: number;
    });
    ids: ID[];
    getIdsByString(): string;
}
export class DeleteSignature extends Signature {
    /**
     *
     * @param {Item} item
     * @param {Doc} doc
     * @param {Array<Signature | null>} signature
     * @param {number} offset
     * @returns {Array<boolean | Promise<boolean>> | boolean}
     */
    static verify(item: Item, doc: Doc, signature: Array<Signature | null>, offset: number): Array<boolean | Promise<boolean>> | boolean;
}
import { Item } from "../../structs/Item";
import { Doc } from "../Doc";
import { ID } from "../ID";
