///
///
import type { DataItemCreateOptions, Signer } from "arbundles";
import type BigNumber from "bignumber.js";
import type { Readable } from "stream";
import type Api from "./api";
import type Fund from "./fund";
import type { Provenance } from "./provenance";
import type { Transaction } from "./transactions";
import type { Arbundles, CreateAndUploadOptions, Token, FundResponse, IrysTransaction, IrysTransactionCreateOptions, IrysTransactonCtor, UploadReceipt, UploadReceiptData, UploadResponse, WithdrawalResponse, Network } from "./types";
import type Uploader from "./upload";
import Utils from "./utils";
import Query from "@irys/query";
import type { Approval } from "./approval";
export default abstract class Irys {
api: Api;
utils: Utils;
uploader: Uploader;
funder: Fund;
_address: string | undefined;
token: string;
tokenConfig: Token;
provenance: Provenance;
transactions: Transaction;
approval: Approval;
protected _readyPromise: Promise | undefined;
url: URL;
arbundles: Arbundles;
IrysTransaction: IrysTransactonCtor;
static VERSION: string;
debug: boolean;
constructor({ url, network, arbundles }: {
url?: string;
network?: Network;
arbundles: Arbundles;
});
get address(): string;
set address(address: string);
get signer(): Signer;
get search(): InstanceType["search"];
query(queryOpts?: ConstructorParameters[0]): Query;
withdrawBalance(amount: BigNumber.Value | "all"): Promise;
withdrawAll(): Promise;
/**
* Gets the balance for the loaded wallet
* @returns balance (in winston)
*/
getLoadedBalance(): Promise;
/**
* Gets the balance for the specified address
* @param address address to query for
* @returns the balance (in winston)
*/
getBalance(address: string): Promise;
/**
* Sends amount atomic units to the specified bundler
* @param amount amount to send in atomic units
* @returns details about the fund transaction
*/
fund(amount: BigNumber.Value, multiplier?: number): Promise;
/**
* Calculates the price for [bytes] bytes for the loaded token and Irys node.
* @param bytes
* @returns
*/
getPrice(bytes: number): Promise;
verifyReceipt(receipt: UploadReceiptData): Promise;
/**
* Create a new IrysTransactions (flex token arbundles dataItem)
* @param data
* @param opts - dataItemCreateOptions
* @returns - a new IrysTransaction instance
*/
createTransaction(data: string | Buffer, opts?: IrysTransactionCreateOptions): IrysTransaction;
/**
* Returns the signer for the loaded token
*/
getSigner(): Signer;
upload(data: string | Buffer | Readable, opts?: CreateAndUploadOptions): Promise;
/**
* @deprecated - use upload instead
*/
uploadWithReceipt(data: string | Buffer | Readable, opts?: DataItemCreateOptions): Promise;
ready(): Promise;
get transaction(): {
fromRaw(rawTransaction: Uint8Array): IrysTransaction;
};
}