import { JWKInterface } from "arweave/node/lib/wallet"; import { Struct } from "superstruct"; import winston from "winston"; import { BigNumber } from "../../utils"; export declare class ArweaveClient { private arweaveJWT; private logger; private client; private gatewayUrl; constructor(arweaveJWT: JWKInterface, logger: winston.Logger, gatewayURL?: string, protocol?: string, port?: number); /** * Stores an arbitrary record in the Arweave network. The record is stored as a JSON string and uses * JSON.stringify to convert the record to a string. The record has all of its big numbers converted * to strings for convenience. * @param value The value to store * @param topicTag An optional topic tag to add to the transaction * @returns The transaction ID of the stored value * @ */ set(value: Record, topicTag?: string | undefined): Promise; /** * Retrieves a record from the Arweave network. The record is expected to be a JSON string and is * parsed using JSON.parse. All numeric strings are converted to big numbers for convenience. * @param transactionID The transaction ID of the record to retrieve * @param structValidator An optional struct validator to validate the retrieved value. If the value does not match the struct, null is returned. * @returns The record if it exists, otherwise null */ get(transactionID: string, validator: Struct): Promise; /** * Retrieves a list of records from the Arweave network that have a specific tag. * The records are expected to be a JSON string and are pre-filtered by the Across * protocol tag, the content-type tag, and this client's address. Furthermore, the * records are expected to be an array of the given type and will be discarded if * they do not match the given validator. * @param tag The tag to filter all the transactions by * @param validator The validator to validate the retrieved values * @param originQueryAddress An optional flag to override the originating address for the query. By default, * the address of the RL Arweave storage wallet is used. * @returns The records if they exist, otherwise an empty array */ getByTopic(tag: string, validator: Struct, originQueryAddress?: string): Promise<{ data: T; hash: string; }[]>; /** * Retrieves the metadata of a transaction * @param transactionID The transaction ID of the record to retrieve * @returns The metadata of the transaction if it exists, otherwise null */ getMetadata(transactionID: string): Promise | null>; /** * Returns the address of the signer of the JWT * @returns The address of the signer in this client */ getAddress(): Promise; /** * The balance of the signer * @returns The balance of the signer in winston units */ getBalance(): Promise; } //# sourceMappingURL=ArweaveClient.d.ts.map