import type { HTTPRPCOptions } from '../index.js'; import type { HTTPRPCClient } from '../lib/core.js'; import type { PeerId } from '@libp2p/interface'; import type { CID } from 'multiformats/cid'; export interface BitswapStats { provideBufLen: number; wantlist: CID[]; peers: PeerId[]; blocksReceived: bigint; dataReceived: bigint; blocksSent: bigint; dataSent: bigint; dupBlksReceived: bigint; dupDataReceived: bigint; } export interface BitswapAPI { /** * Show diagnostic information on the bitswap agent. * Note: `bitswap.stat` and `stats.bitswap` can be used interchangeably. * * @example * ```js * const stats = await ipfs.bitswap.stat() * console.log(stats) * ``` */ stat(options?: HTTPRPCOptions): Promise; /** * Returns the wantlist for your node * * @example * ```js * const list = await ipfs.bitswap.wantlist() * console.log(list) * // [ CID('QmHash') ] * ``` */ wantlist(options?: HTTPRPCOptions): Promise; /** * Returns the wantlist for a connected peer * * @example * ```js * const list = await ipfs.bitswap.wantlistForPeer(peerId) * console.log(list) * // [ CID('QmHash') ] * ``` */ wantlistForPeer(peerId: PeerId, options?: HTTPRPCOptions): Promise; } export declare function createBitswap(client: HTTPRPCClient): BitswapAPI; //# sourceMappingURL=index.d.ts.map