Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace ipfs

Index

Type aliases

AddResult

AddResult: { cid: CID; isFile: boolean; size: number }

Type declaration

  • cid: CID
  • isFile: boolean
  • size: number

CID

CID: string

CIDObj

CIDObj: { codec: Codec; multibaseName: MultibaseName; version: number; toString: any; toV1: any }

Type declaration

Codec

Codec: string

DAGLink

DAGLink: { Hash: CIDObj; Name: string; Tsize: number }

Type declaration

  • Hash: CIDObj
  • Name: string
  • Tsize: number

DAGNode

DAGNode: { Links: DAGLink[]; addLink: (link: DAGLink) => void; rmLink: (name: string) => void; size: number; toDAGLink: (opt?: { name?: string }) => Promise<DAGLink>; toJSON: () => Record<string, unknown> }

Type declaration

  • Links: DAGLink[]
  • addLink: (link: DAGLink) => void
  • rmLink: (name: string) => void
      • (name: string): void
      • Parameters

        • name: string

        Returns void

  • size: number
  • toDAGLink: (opt?: { name?: string }) => Promise<DAGLink>
      • (opt?: { name?: string }): Promise<DAGLink>
      • Parameters

        • Optional opt: { name?: string }
          • Optional name?: string

        Returns Promise<DAGLink>

  • toJSON: () => Record<string, unknown>
      • (): Record<string, unknown>
      • Returns Record<string, unknown>

FileContent

FileContent: Record<string, unknown> | Buffer | Blob | string | number | boolean

FileContentRaw

FileContentRaw: Buffer

FileMode

FileMode: number

IPFS

IPFS: { dag: DagAPI; files: FilesAPI; object: ObjectAPI; pin: PinAPI; swarm: SwarmAPI; add: any; cat: any; dns: any; ls: any }

Type declaration

MultibaseName

MultibaseName: string

ObjStat

ObjStat: { BlockSize: number; CumulativeSize: number; DataSize: number; Hash: string; LinksSize: number; NumLinks: number }

Type declaration

  • BlockSize: number
  • CumulativeSize: number
  • DataSize: number
  • Hash: string
  • LinksSize: number
  • NumLinks: number

RawDAGLink

RawDAGLink: { Hash: CIDObj; Name: string; Tsize: number }

Type declaration

  • Hash: CIDObj
  • Name: string
  • Tsize: number

RawDAGNode

RawDAGNode: { remainderPath: string; value: { Data: Uint8Array; Links: RawDAGLink[]; _serializedSize: number; _size: number } }

Type declaration

  • remainderPath: string
  • value: { Data: Uint8Array; Links: RawDAGLink[]; _serializedSize: number; _size: number }
    • Data: Uint8Array
    • Links: RawDAGLink[]
    • _serializedSize: number
    • _size: number

SwarmAPI

SwarmAPI: { connect: (address: string) => Promise<unknown> }

Type declaration

  • connect: (address: string) => Promise<unknown>
      • (address: string): Promise<unknown>
      • Parameters

        • address: string

        Returns Promise<unknown>

UnixFSFile

UnixFSFile: { cid: CIDObj; mode?: FileMode; mtime?: number; name?: string; path: string; size: number; type?: string }

Type declaration

  • cid: CIDObj
  • Optional mode?: FileMode
  • Optional mtime?: number
  • Optional name?: string
  • path: string
  • size: number
  • Optional type?: string

Variables

Const DAG_NODE_DATA

DAG_NODE_DATA: Buffer = ...

Functions

Const add

Const attemptPin

  • attemptPin(cid: string): Promise<void>

Const cat

  • cat(cid: string): Promise<string>

Const catBuf

  • catBuf(cid: string): Promise<Buffer>

Const catRaw

  • catRaw(cid: string): Promise<Buffer[]>

Const dagGet

  • dagGet(cid: string): Promise<DAGNode>

Const dagPut

Const dagPutLinks

Const get

  • get(): Promise<IPFS>

iframe

  • iframe(): Promise<MessagePort>

Const ls

Const set

  • set(userIpfs: unknown): void

Const size

  • size(cid: string): Promise<number>

Generated using TypeDoc