import { AccountId, H256 } from "@polkadot/types/interfaces";
import Big from "big.js";
import { ApiPromise } from "@polkadot/api";
import type { Struct } from "@polkadot/types";
import { Network } from "bitcoinjs-lib";
import { StorageKey } from "@polkadot/types/primitive/StorageKey";
import { Codec } from "@polkadot/types/types";
import { BitcoinUnit } from "@interlay/monetary-js";
import { Moment } from "@polkadot/types/interfaces";
import { Option } from "@polkadot/types/codec";
import { Bytes } from "@polkadot/types-codec";
import { InterbtcPrimitivesRedeemRedeemRequest, InterbtcPrimitivesReplaceReplaceRequest, InterbtcPrimitivesRefundRefundRequest, InterbtcPrimitivesIssueIssueRequest, BitcoinAddress, VaultRegistrySystemVault, VaultRegistryWallet, InterbtcPrimitivesVaultId, InterbtcPrimitivesVaultCurrencyPair, InterbtcPrimitivesCurrencyId } from "@polkadot/types/lookup";
import { WalletExt, SystemVaultExt } from "../types/vault";
import { Issue, Redeem, RefundRequestExt, ReplaceRequestExt } from "../types/requestTypes";
import { SignedFixedPoint, UnsignedFixedPoint } from "../interfaces";
import { CollateralCurrency, CurrencyIdLiteral, WrappedCurrency } from "../types";
import { VaultsAPI } from "../parachain";
/**
 * Converts endianness of a Uint8Array
 * @param bytes Uint8Array, to be converted LE<>BE
 */
export declare function reverseEndianness(bytes: Uint8Array): Uint8Array;
/**
 * Remove the `0x` hex prefix if present
 * @param str
 */
export declare function stripHexPrefix(str: string): string;
/**
 * Ensure the `0x` hex prefix is present
 * @param str
 **/
export declare function addHexPrefix(str: string): string;
/**
 * Ensure a hash value is an encoded H256
 * @param api The polkadot API promise used to encode if necessary
 * @param hash The either H256 or string encoded hash
 **/
export declare function ensureHashEncoded(api: ApiPromise, hash: H256 | string): H256;
/**
 * Reverse the endianness of the given hex string
 * @dev Will remove `0x` prefix if present
 * @param hex
 */
export declare function reverseEndiannessHex(hex: string): string;
/**
 * Converts a Uint8Array to string
 * @dev Will remove `0x` prefix if present
 * @param bytes
 */
export declare function uint8ArrayToString(bytes: Uint8Array): string;
export declare function decodeFixedPointType(x: SignedFixedPoint | UnsignedFixedPoint): Big;
/**
 * Convert Bytes to a string. Will remove `0x` prefix if present.
 * @param bytes Bytes to decode
 * @returns the decoded string
 */
export declare function decodeBytesAsString(bytes: Bytes): string;
export declare function encodeUnsignedFixedPoint(api: ApiPromise, x: Big): UnsignedFixedPoint;
export declare function storageKeyToNthInner<T extends Codec>(s: StorageKey<T[]>, n?: number): T;
export interface DecodedRequest extends Struct {
    readonly btc_address: BitcoinAddress;
}
export interface DecodedRequestExt extends Omit<DecodedRequest, "btc_address"> {
    btc_address: string;
}
export declare function parseWallet(wallet: VaultRegistryWallet, network: Network): WalletExt;
export declare function parseSystemVault(vault: VaultRegistrySystemVault, wrappedCurrency: WrappedCurrency, collateralCurrency: CollateralCurrency): SystemVaultExt<BitcoinUnit>;
export declare function newAccountId(api: ApiPromise, accountId: string): AccountId;
export declare function newVaultId(api: ApiPromise, accountId: string, collateralCurrency: CollateralCurrency, wrappedCurrency: WrappedCurrency): InterbtcPrimitivesVaultId;
export declare function newVaultCurrencyPair(api: ApiPromise, collateralCurrency: CollateralCurrency, wrappedCurrency: WrappedCurrency): InterbtcPrimitivesVaultCurrencyPair;
export declare function newCurrencyId(api: ApiPromise, currency: CurrencyIdLiteral): InterbtcPrimitivesCurrencyId;
export declare function parseRefundRequest(req: InterbtcPrimitivesRefundRefundRequest, network: Network, wrappedCurrency: WrappedCurrency): RefundRequestExt;
export declare function parseReplaceRequest(vaultsAPI: VaultsAPI, req: InterbtcPrimitivesReplaceReplaceRequest, network: Network, wrappedCurrency: WrappedCurrency, id: H256 | string): Promise<ReplaceRequestExt>;
export declare function parseIssueRequest(vaultsAPI: VaultsAPI, req: InterbtcPrimitivesIssueIssueRequest, network: Network, id: H256 | string): Promise<Issue>;
export declare function parseRedeemRequest(vaultsAPI: VaultsAPI, req: InterbtcPrimitivesRedeemRedeemRequest, network: Network, id: H256 | string): Promise<Redeem>;
export declare function convertMoment(moment: Moment): Date;
export declare function unwrapRawExchangeRate(option: Option<UnsignedFixedPoint>): UnsignedFixedPoint | undefined;
export declare function encodeVaultId(id: InterbtcPrimitivesVaultId): string;
export declare function decodeVaultId(api: ApiPromise, id: string): InterbtcPrimitivesVaultId;
export declare function queryNominationsMap(map: Map<InterbtcPrimitivesVaultId, number>, vaultId: InterbtcPrimitivesVaultId): number | undefined;
