## Index

### Namespaces

- encoded
- node

### Type aliases

- AddResult
- Codec
- FileContent
- FileContentRaw
- IPFSPackage

### Variables

- DAG_NODE_DATA
- DEFAULT_CDN_URL

### Functions

- add
- cat
- catBuf
- catRaw
- dagGet
- dagPut
- dagPutLinks
- get
- ls
- nodeWithPkg
- pkgFromCDN
- set
- size

## Type aliases

### AddResult

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

- Defined in ipfs/types.ts:10

#### Type declaration

- ##### cid: CID

- ##### isFile: boolean

- ##### size: number

### Codec

Codec: string

- Defined in ipfs/types.ts:5

### FileContent

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

- Defined in ipfs/types.ts:7

### FileContentRaw

FileContentRaw: Uint8Array

- Defined in ipfs/types.ts:8

### IPFSPackage

IPFSPackage: { create: any }

- Defined in ipfs/types.ts:16

#### Type declaration

- ##### create:function

  - create(options?: Options): IPFS<{}>
  - - Defined in ipfs/types.ts:17

    #### Parameters

    - ##### Optional options: Options

    #### Returns IPFS<{}>

## Variables

### Const DAG_NODE_DATA

DAG_NODE_DATA: Uint8Array = ...

- Defined in ipfs/constants.ts:2

### Const DEFAULT_CDN_URL

DEFAULT_CDN_URL: "https://unpkg.com/ipfs-core@0.15.4/dist/index.min.js" = "https://unpkg.com/ipfs-core@0.15.4/dist/index.min.js"

- Defined in ipfs/config.ts:7

## Functions

### add

- add(content: ImportCandidate): Promise<AddResult>

- - Defined in ipfs/basic.ts:19

  #### Parameters

  - ##### content: ImportCandidate

  #### Returns Promise<AddResult>

### cat

- cat(cid: CID): Promise<string>

- - Defined in ipfs/basic.ts:49

  #### Parameters

  - ##### cid: CID

  #### Returns Promise<string>

### catBuf

- catBuf(cid: CID): Promise<Uint8Array>

- - Defined in ipfs/basic.ts:42

  #### Parameters

  - ##### cid: CID

  #### Returns Promise<Uint8Array>

### catRaw

- catRaw(cid: CID): Promise<Uint8Array[]>

- - Defined in ipfs/basic.ts:30

  #### Parameters

  - ##### cid: CID

  #### Returns Promise<Uint8Array[]>

### dagGet

- dagGet(cid: CID): Promise<PBNode>

- - Defined in ipfs/basic.ts:67

  #### Parameters

  - ##### cid: CID

  #### Returns Promise<PBNode>

### dagPut

- dagPut(node: PBNode): Promise<AddResult>

- - Defined in ipfs/basic.ts:77

  #### Parameters

  - ##### node: PBNode

  #### Returns Promise<AddResult>

### dagPutLinks

- dagPutLinks(links: PBLink[]): Promise<AddResult>

- - Defined in ipfs/basic.ts:106

  #### Parameters

  - ##### links: PBLink[]

  #### Returns Promise<AddResult>

### get

- get(): Promise<IPFS<{}>>

- - Defined in ipfs/config.ts:25

  Get the currently active IPFS node. Will automatically create one if none is active yet.

  #### Returns Promise<IPFS<{}>>

### ls

- ls(cid: CID): Promise<IPFSEntry[]>

- - Defined in ipfs/basic.ts:56

  #### Parameters

  - ##### cid: CID

  #### Returns Promise<IPFSEntry[]>

### nodeWithPkg

- nodeWithPkg(pkg: IPFSPackage): Promise<IPFS<{}>>

- - Defined in ipfs/config.ts:37

  Create an IPFS Node given a `IPFSPackage`, which you can get from `pkgFromCDN` or `pkgFromBundle`.

  #### Parameters

  - ##### pkg: IPFSPackage

  #### Returns Promise<IPFS<{}>>

### pkgFromCDN

- pkgFromCDN(cdn_url: string): Promise<IPFSPackage>

- - Defined in ipfs/config.ts:45

  Loads ipfs-core from a CDN. NOTE: Make sure to cache this URL with a service worker if you want to make your app available offline.

  #### Parameters

  - ##### cdn_url: string

  #### Returns Promise<IPFSPackage>

### set

- set(userIpfs: unknown): void

- - Defined in ipfs/config.ts:17

  Set the currently active IPFS node. The default is a node based on the ipfs-core package from a CDN (see `DEFAULT_CDN_URL`)

  #### Parameters

  - ##### userIpfs: unknown

  #### Returns void

### size

- size(cid: CID): Promise<number>

- - Defined in ipfs/basic.ts:111

  #### Parameters

  - ##### cid: CID

  #### Returns Promise<number>

Generated using TypeDoc