import type { IKey } from '@activeledger/sdk';
import type { NodeStatus } from './APACTypes';
import type { ACDevNode, ACNode, AkashicBaseUrl, AkashicBaseUrlDev, AkashicPayBaseUrl, AkashicPayBaseUrlDev, Environment } from './constants';
import type { AkashicErrorCode } from './error';
export interface IBaseAcTransaction {
    $selfsign?: boolean;
    $sigs: any;
    $tx: IAcTxBody;
}
interface IAcTxBody {
    $entry?: string;
    $contract: string;
    $namespace: string;
    $i: any;
    $o?: any;
    $r?: any;
    _dbIndex?: number;
    $expire?: string;
    metadata?: IMetadata;
}
export interface IMetadata {
    initiatedToNonL2?: string;
    identifier?: string;
    feesEstimate?: string;
}
export type Otk = Required<IKey>;
export interface HTTPResponse<ResponseDataT = unknown> {
    data: ResponseDataT;
    status: number;
}
export interface IHttpClient {
    post: <ResponseDataT = unknown>(url: string, payload: unknown) => Promise<HTTPResponse<ResponseDataT>>;
    get: <ResponseDataT = unknown>(url: string) => Promise<HTTPResponse<ResponseDataT>>;
}
export declare enum TronSymbol {
    Tron = "TRX",
    Tron_Shasta = "TRX-SHASTA"
}
export declare enum EthereumSymbol {
    Ethereum_Mainnet = "ETH",
    Ethereum_Sepolia = "SEP"
}
export declare const NetworkSymbol: {
    Ethereum_Mainnet: EthereumSymbol.Ethereum_Mainnet;
    Ethereum_Sepolia: EthereumSymbol.Ethereum_Sepolia;
    Tron: TronSymbol.Tron;
    Tron_Shasta: TronSymbol.Tron_Shasta;
};
export type NetworkSymbol = TronSymbol | EthereumSymbol;
export declare const MainNets: (TronSymbol | EthereumSymbol)[];
export declare const TestNets: (TronSymbol | EthereumSymbol)[];
export declare enum TokenSymbol {
    USDT = "USDT",
    TETHER = "Tether"
}
export declare enum Currency {
    USDT = "USDT",
    TRX = "TRX",
    ETH = "ETH",
    CHF = "CHF",
    CNY = "CNY",
    EUR = "EUR",
    HKD = "HKD",
    IDR = "IDR",
    INR = "INR",
    JPY = "JPY",
    KHR = "KHR",
    KRW = "KRW",
    MYR = "MYR",
    PHP = "PHP",
    SGD = "SGD",
    THB = "THB",
    TWD = "TWD",
    USD = "USD",
    VND = "VND"
}
export interface IGetTransactions {
    page?: number;
    limit?: number;
    startDate?: Date;
    endDate?: Date;
    layer?: TransactionLayer;
    status?: TransactionStatus;
    type?: TransactionType;
    hideSmallTransactions?: boolean;
}
export interface IDepositAddress {
    address: string;
    identifier: string;
    referenceId?: string;
    requestedAmount?: string;
    requestedCurrency?: Currency;
    network?: NetworkSymbol;
    token?: TokenSymbol;
    exchangeRate?: string;
    amount?: string;
    expires?: string;
}
export interface IBalance {
    readonly networkSymbol: NetworkSymbol;
    readonly tokenSymbol?: TokenSymbol;
    readonly balance: string;
}
export interface IGetExchangeRatesResult {
    [key: string]: string;
}
export interface ILookForL2AddressResult {
    readonly l2Address?: string;
    readonly alias?: string;
}
export interface IPayoutResponse {
    error?: AkashicErrorCode;
    l2Hash?: string;
}
export interface IGetByOwnerAndIdentifier {
    identifier: string;
    coinSymbol: NetworkSymbol;
}
export interface IGetKeysByOwnerAndIdentifier {
    identifier: string;
}
export interface ICreateDepositOrder {
    identity: string;
    expires: number;
    referenceId: string;
    identifier: string;
    toAddress?: string;
    coinSymbol?: NetworkSymbol;
    signature: string;
}
interface IDepositRequest {
    readonly id: string;
    readonly requestedValue?: {
        amount: string;
        currency: Currency;
    };
    readonly exchangeRate?: string;
}
interface IUserInfo {
    identity: string;
    walletType: string;
}
export interface ITransaction {
    readonly fromAddress: string;
    readonly toAddress: string;
    readonly layer: TransactionLayer;
    readonly initiatedAt: string;
    readonly confirmededAt: string;
    readonly amount: string;
    readonly coinSymbol: NetworkSymbol;
    readonly status: TransactionStatus;
    readonly txHash?: string;
    readonly feesPaid?: string;
    readonly l2TxnHash?: string;
    readonly tokenSymbol?: TokenSymbol;
    readonly internalFee?: IInternalFee;
    readonly identifier?: string;
    readonly referenceId?: string;
    readonly depositRequest?: IDepositRequest;
    readonly receiverInfo?: IUserInfo;
    readonly senderInfo?: IUserInfo;
    readonly feeIsDelegated?: boolean;
}
export declare enum TransactionLayer {
    L1 = "L1Transaction",
    L2 = "L2Transaction"
}
export declare enum TransactionStatus {
    PENDING = "Pending",
    CONFIRMED = "Confirmed",
    FAILED = "Failed"
}
export declare enum TransactionResult {
    SUCCESS = "Success",
    FAILURE = "Failure"
}
export declare enum TransactionType {
    DEPOSIT = "Deposit",
    WITHDRAWAL = "Withdrawal"
}
export interface IInternalFee {
    deposit?: string;
    withdraw?: string;
}
export type ACNodeT<Env extends Environment> = Env extends Environment.Production ? ACNode : ACDevNode;
export type AkashicUrlT<Env extends Environment> = Env extends Environment.Production ? typeof AkashicBaseUrl : typeof AkashicBaseUrlDev;
export type AkashicPayUrlT<Env extends Environment> = Env extends Environment.Production ? typeof AkashicPayBaseUrl : typeof AkashicPayBaseUrlDev;
export type APConstructorArgs<Env extends Environment = Environment.Production> = {
    environment?: Env;
    targetNode?: Env extends Environment.Production ? ACNode : ACDevNode;
    apiSecret?: string;
};
type OTKPair = {
    l2Address: string;
} & ({
    recoveryPhrase: string;
} | {
    privateKey: string;
});
export type APInitialisationArgs = OTKPair;
export type APBuilderArgs<Env extends Environment = Environment.Production> = APConstructorArgs<Env> & APInitialisationArgs;
export interface NodeResponsiveness<Env extends Environment> extends NodeStatus {
    ping: number;
    node: ACNodeT<Env>;
}
export {};
