import { API, Checksum256, Checksum256Type, Name, NameType, Action, AuthorityType, AssetType, PublicKeyType, UInt8, UInt16 } from '@wharfkit/antelope';
import { Contract } from './Contract';
import { ActionOptions, QueryParams } from '@wharfkit/contract';
import { Signer } from '../eosio/transaction';
import { TonomyUsername } from '../../../util/username';
export declare const GOVERNANCE_ACCOUNT_NAME: NameType;
export declare enum AccountTypeEnum {
    Person = 0,
    Organization = 1,
    App = 2,
    Gov = 3,
    Service = 4
}
type PersonDataRaw = {
    account_name: Name;
    status: UInt8;
    username_hash: Checksum256;
    password_salt: Checksum256;
};
export type PersonData = {
    accountName: Name;
    status: number;
    usernameHash: Checksum256;
    passwordSalt: Checksum256;
};
type AppData2Raw = {
    account_name: Name;
    json_data: string;
    username_hash: Checksum256;
    origin: string;
    version: UInt16;
};
export type AppData2 = {
    accountName: Name;
    usernameHash: Checksum256;
    origin: string;
    version: number;
    jsonData: string;
    appName: string;
    description: string;
    logoUrl: string;
    backgroundColor: string;
    accentColor: string;
};
export declare function createAppJsonDataString(appName: string, description: string, logoUrl: string, backgroundColor: string, accentColor: string): string;
export declare const RAM_PRICE: number;
export declare const RAM_FEE: number;
export declare const TOTAL_RAM_AVAILABLE: number;
/**
 * Converts bytes to tokens.
 *
 * @param bytes The number of bytes to convert.
 * @returns The converted value in tokens.
 */
export declare function bytesToTokens(bytes: number): string;
export declare class TonomyContract extends Contract {
    static atAccount(account?: NameType): Promise<TonomyContract>;
    static fromAbi(abi: any, account?: NameType): TonomyContract;
    actions: {
        buyRam: (data: {
            daoOwner: NameType;
            app: NameType;
            quant: AssetType;
        }, authorization?: ActionOptions) => Action;
        setResParams: (data: {
            ramPrice: number;
            totalRamAvailable: number;
            ramFee: number;
        }, authorization?: ActionOptions) => Action;
        newPerson: (data: {
            usernameHash: Checksum256Type;
            passwordKey: PublicKeyType;
            passwordSalt: Checksum256Type;
        }, authorization?: ActionOptions) => Action;
        updateActive: (data: {
            account: NameType;
            active: AuthorityType;
        }, authorization?: ActionOptions) => Action;
        updateKeyPer: (data: {
            account: NameType;
            permission_level: number;
            key: PublicKeyType;
            link_auth?: boolean;
        }, authorization?: ActionOptions) => Action;
        loginWithApp: (data: {
            account: NameType;
            app: NameType;
            parent: NameType;
            key: PublicKeyType;
        }, authorization?: ActionOptions) => Action;
        newApp: (data: {
            jsonData: string;
            usernameHash: Checksum256Type;
            origin: string;
            key: PublicKeyType;
        }, authorization?: ActionOptions) => Action;
        adminSetApp: (data: {
            accountName: NameType;
            jsonData: string;
            usernameHash: Checksum256Type;
            origin: string;
        }, authorization?: ActionOptions) => Action;
        deleteApp: (data: {
            accountName: NameType;
        }, authorization?: ActionOptions) => Action;
        eraseOldApps: (data?: {}, authorization?: ActionOptions) => Action;
    };
    buyRam(daoOwner: NameType, app: NameType, quant: AssetType, signer: Signer): Promise<API.v1.PushTransactionResponse>;
    setResourceParams(ramPrice: number, totalRamAvailable: number, ramFee: number, signer: Signer): Promise<API.v1.PushTransactionResponse>;
    newPerson(usernameHash: Checksum256Type, passwordKey: PublicKeyType, passwordSalt: Checksum256Type, signer: Signer): Promise<API.v1.PushTransactionResponse>;
    updateKeysPerson(account: NameType, keys: {
        BIOMETRIC?: PublicKeyType;
        PIN?: PublicKeyType;
        LOCAL?: PublicKeyType;
    }, signer: Signer): Promise<API.v1.PushTransactionResponse>;
    updateActive(account: NameType, active: AuthorityType, signer: Signer): Promise<API.v1.PushTransactionResponse>;
    newApp(appName: string, description: string, usernameHash: Checksum256Type, logoUrl: string, origin: string, backgroundColor: string, accentColor: string, key: PublicKeyType, signer: Signer): Promise<API.v1.PushTransactionResponse>;
    loginWithApp(account: NameType, app: NameType, parent: NameType, key: PublicKeyType, signer: Signer): Promise<API.v1.PushTransactionResponse>;
    getPersonData(account: NameType): Promise<PersonDataRaw>;
    getPersonDataByUsername(username: TonomyUsername): Promise<PersonDataRaw>;
    getAllAppData2(): Promise<AppData2Raw[]>;
    getAppData2(account: NameType): Promise<AppData2Raw>;
    getAppData2ByUsername(username: TonomyUsername): Promise<AppData2Raw>;
    getAppDataByOrigin(origin: string): Promise<AppData2Raw>;
    getPerson(account: TonomyUsername | NameType): Promise<PersonData>;
    getPeople(query?: QueryParams): Promise<PersonData[]>;
    getAllPeople(rowsPerAPIRequest?: number): Promise<PersonData[]>;
    getApp(account: TonomyUsername | Name | string): Promise<AppData2>;
    getAllApps(): Promise<AppData2[]>;
    adminSetApp(accountName: NameType, appName: string, description: string, usernameHash: Checksum256Type, logoUrl: string, origin: string, backgroundColor: string, accentColor: string, signer: Signer): Promise<API.v1.PushTransactionResponse>;
}
export declare const getTonomyContract: () => TonomyContract;
export declare function getAccountNameFromUsername(username: TonomyUsername): Promise<NameType>;
export {};
//# sourceMappingURL=TonomyContract.d.ts.map