UNPKG

kubo-rpc-client

Version:
46 lines 1.59 kB
import { isMultiaddr } from '@multiformats/multiaddr'; import { createKuboRPCClient } from "./client.js"; import { HTTP } from "./lib/http.js"; export function create(options = {}) { if (typeof options === 'string' || isMultiaddr(options) || options instanceof URL) { options = { url: options }; } return createKuboRPCClient(options); } export { create as createKuboRPCClient }; export { CID } from 'multiformats/cid'; export { multiaddr } from '@multiformats/multiaddr'; export * from "./lib/glob-source.js"; export function urlSource(url, options) { return { path: decodeURIComponent(new URL(url).pathname.split('/').pop() ?? ''), content: readURLContent(url, options) }; } export async function* readURLContent(url, options) { const response = await HTTP.get(url, options); yield* response.iterator(); } export * from "./bitswap/index.js"; export * from "./block/index.js"; export * from "./bootstrap/index.js"; export * from "./config/index.js"; export * from "./dag/index.js"; export * from "./dht/index.js"; export * from "./diag/index.js"; export * from "./files/index.js"; export * from "./key/index.js"; export * from "./log/index.js"; export * from "./name/index.js"; export * from "./object/index.js"; export * from "./pin/index.js"; export * from "./pubsub/index.js"; export * from "./refs/index.js"; export * from "./repo/index.js"; export * from "./routing/index.js"; export * from "./stats/index.js"; export * from "./swarm/index.js"; export * from "./provide/index.js"; //# sourceMappingURL=index.js.map