/// <reference types="node" />
import { PrivKey } from '@ts-bitcoin/core';
import { JWK } from 'jose';
import { DocV1Output } from '../lib/envelopes/doc/v1.js';
import { HashOutput } from '../lib/envelopes/hash/v1.js';
export type API_VERSIONS = '1' | '2';
export interface MintblueOptions {
    token: string;
    url?: string;
    version?: API_VERSIONS;
    userKeyAttributes?: UserKeyAttributes;
    SDKTokenPrefix?: string;
    ServerTokenPrefix?: string;
    keys?: Keys;
}
export interface UserKeyAttributes {
    masterKeyEncryptedWithKek: string;
    masterKeyEncryptedWithRecoveryKey: string;
    privateKeyEncryptedWithMasterKey: string;
    recoveryKeyEncryptedWithMasterKey: string;
    publicKeyHex: string;
    kekSalt: string;
    kekIterations: number;
}
export interface CreateTransactionOptions {
    /** ID of the project to publish to */
    project_id: string;
    /** metadata is indexed locally, but not published to the blockchain. Can be any key/value  */
    metadata?: {
        [key: string]: any;
    };
    /** Describes the actual content to be published to the blockchain. A transaction can contain one or multiple outputs of various types.   */
    outputs: Output[];
}
export type Output = DataOutput | PaymentOutput | ScriptOutput | FileOutput | EnvelopeOutput | PigiOutput | PeppolOutput | DocV1Output | HashOutput | UndefinedOutput;
export declare enum OutputType {
    data = "data",
    payment = "payment",
    script = "script",
    file = "file",
    pigi = "pigi",
    peppol = "peppol",
    docv1 = "docv1",
    hash = "hashv1",
    undefined = "undefined"
}
/** Output type for general data packets. Can optionally include encryption and/or digital signatures. */
export interface DataOutput {
    type: 'data';
    /** Data to publish */
    value: string | string[] | Buffer;
    /** Set to true to add digital signature */
    sign?: boolean;
    /** Set to true to encrypt value */
    encrypt?: boolean;
}
/** Output type for micropayments. */
export interface PaymentOutput {
    type: 'payment';
    /** Recipient's Paymail address or BSV address */
    to: string;
    /** Payment value. */
    satoshis: number;
}
/** Output type for advanced Bitcoin scripts. */
export interface ScriptOutput {
    type: 'script';
    /** Hex encoded Bitcoin script */
    value: string;
}
/** Output type for files. */
export interface FileOutput {
    type: 'file';
    /** File to publish */
    value: {
        contentType: string;
        content: Buffer;
    };
    /** Set to true to add digital signature */
    sign?: boolean;
    /** Set to true to encrypt value */
    encrypt?: boolean;
}
/** @ignore */
export interface EnvelopeOutput {
    type: 'env';
    value: any;
}
/** Output type for Peppol blockchain protocol. */
export interface PeppolOutput {
    type: 'peppol';
    /** Protocol version */
    version: 1;
    /** Content (AS4 payload) to publish encrypted to blockchain. */
    value: Buffer;
    /** Uncompressed public key in hex format or JWK format */
    pubKey: string | JWK;
    /** Optional key to add digital signature in JWK format */
    signingKey?: JWK;
    /** Optional extra data to publish in blockchain transaction */
    options?: {
        extra: Buffer;
    };
}
/** Output type for Pigi protocol. */
export interface PigiOutput {
    type: 'pigi';
    /** Protocol version */
    version: 1 | 2;
    options: {
        filename: string;
        mimetype: string;
    };
    /** Content (UBL payload) to publish encrypted to blockchain. */
    value: Uint8Array;
    /** Optional key to add digital signature in JWK format */
    signingKey?: JWK;
    /** @ignore */
    info?: any;
}
/** @ignore */
export interface UndefinedOutput {
    type: 'undefined';
    value?: string;
}
export interface CreateProjectOptions {
    /** Name of the project */
    name: string;
    /** Optional description */
    description?: string;
    /** Optional array of tags (can be any string) */
    tags?: string[];
    /** @ignore */
    default_key_id?: string;
}
export interface PaginationOptions {
    limit: number;
    offset: number;
}
export interface ListTransactionsOptions {
    project_id?: string;
    startDate?: Date;
    endDate?: Date;
    sort?: 'txid' | 'status' | 'block' | 'metadata' | 'privdata' | 'project_id' | 'user_id' | 'size' | 'created_at' | 'published_at' | 'confirmed_at';
    order?: 'asc' | 'desc';
    paginationOptions?: PaginationOptions;
}
export type ISOString = string;
export type ListTransactionsResult = Transaction[];
export interface Transaction {
    txid: string;
    status: TransactionStatus;
    block: number;
    metadata: null;
    privdata: Record<string, any>;
    project_id: string;
    user_id: string;
    size: number;
    created_at: ISOString;
    published_at: ISOString;
    confirmed_at: ISOString;
    count: string;
}
export type UpdateProjectOptions = CreateProjectOptions;
export interface Project {
    id: string;
    name: string;
    description: string;
    tags: string[];
    default_key_id: string;
    total_transactions_count: number;
    total_transactions_size: number;
    avg_transactions_size: number;
    account_id: string;
    user_id: string;
    date_created: Date;
    isProtected: boolean;
}
export interface CreatedTransaction {
    txid: string;
    rawtx: string;
}
export interface Keys {
    masterKey: CryptoKey;
    recoveryKey: CryptoKey;
    privateKey: PrivKey;
    publicKeyHex: string;
    kek: CryptoKey;
    additionalKeys: AdditionalKeys;
}
export type AdditionalKeys = Array<{
    info: string;
    kid: string;
    jwk: JWK;
    cryptoKey: CryptoKey;
}>;
export interface SerializedKeys {
    masterKey: string;
    recoveryKey: string;
    privateKey: string;
    publicKeyHex: string;
    kek: string;
}
export interface CreateAccesstokenOptions {
    name: string;
    expires_at?: Date;
    scopes?: Scope[];
}
export type Scope = 'account.read' | 'account.update' | 'account.delete' | 'billing.read' | 'billing.update' | 'invite.create' | 'invite.read' | 'invite.delete' | 'accesstoken.create' | 'accesstoken.delete' | 'key.create' | 'key.read' | 'key.update' | 'key.delete' | 'user.read' | 'user.update' | 'user.delete' | 'event.create' | 'transaction.create';
export declare enum TransactionStatus {
    pending = 0,
    queued = 1,
    published = 2,
    failed = 3,
    confirmed = 4
}
