kubo-rpc-client
Version:
A client library for the Kubo RPC API
24 lines (20 loc) • 541 B
text/typescript
import { createPatch, type ObjectPatchAPI } from './patch/index.js'
import type { Codecs } from '../index.js'
import type { HTTPRPCClient } from '../lib/core.js'
import type { CID } from 'multiformats/cid'
export interface StatResult {
Hash: CID
NumLinks: number
BlockSize: number
LinksSize: number
DataSize: number
CumulativeSize: number
}
export interface ObjectAPI {
patch: ObjectPatchAPI
}
export function createObject (client: HTTPRPCClient, codecs: Codecs): ObjectAPI {
return {
patch: createPatch(client)
}
}