/**
 * This module provides utility functions for interacting with the default
 * IPFS gateway in TypeScript.
 *
 * @since 0.1.1
 */
import { type Id } from './idv2.js';
import type { Op } from './typesv2.js';
type PublishEditProposalParams = {
    name: string;
    ops: Op[];
    author: string;
};
type PublishEditResult = {
    cid: string;
    editId: Id;
};
/**
 * Generates correct protobuf encoding for an Edit and uploads it to IPFS.
 *
 * @example
 * ```ts
 * import { IPFS } from '@graphprotocol/grc-20';
 *
 * const { cid, editId } = await IPFS.publishEdit({
 *   name: 'Edit name',
 *   ops: ops,
 *   author: '0x000000000000000000000000000000000000',
 * });
 * ```
 *
 * @param args arguments for publishing an edit to IPFS {@link PublishEditProposalParams}
 * @returns - {@link PublishEditResult}
 */
export declare function publishEdit(args: PublishEditProposalParams): Promise<PublishEditResult>;
type PublishImageParams = {
    blob: Blob;
} | {
    url: string;
};
export declare function uploadImage(params: PublishImageParams): Promise<{
    cid: `ipfs://${string}`;
    dimensions: {
        width: number;
        height: number;
    };
} | {
    cid: `ipfs://${string}`;
    dimensions?: undefined;
}>;
/**
 * Uploads a CSV file to IPFS and returns the CID. This CSV
 * file will be compressed using gzip before being uploaded.
 *
 * @example
 * ```ts
 * const file = Bun.file('cities.csv');
 * const fileText = await file.text();
 *
 * const cid = await Ipfs.uploadCSV(fileText);
 * ```
 *
 * @example
 * ```ts
 * import { Csv } from '@graphprotocol/grc-20';
 *
 * const csvString = Csv.stringify({
 *   data: Array.from({ length: 151_000 }, (_, i: number) => [i.toString(), (i * 2).toString(), (i * 3).toString()]),
 *   metadata: {
 *     filetype: 'CSV',
 *     columns: [
 *       {
 *         id: 'foo',
 *         type: 'TEXT',
 *       },
 *       {
 *         id: 'bar',
 *         type: 'NUMBER',
 *       },
 *       {
 *         id: 'baz',
 *         type: 'TEXT',
 *       },
 *     ],
 *   },
 * })
 *
 * const cid = await Ipfs.uploadCSV(csvString);
 * ```
 *
 * @param csvString The CSV to upload as a string
 * @returns IPFS CID representing the uploaded file prefixed with `ipfs://`
 */
export declare function uploadCSV(csvString: string): Promise<`ipfs://${string}`>;
export {};
//# sourceMappingURL=ipfsv2.d.ts.map