## Index

### Namespaces

- api
- arrbufs
- base64
- blob

### Type aliases

- Maybe
- Opaque
- Result

### Variables

- UCANS_STORAGE_KEY
- USERNAME_STORAGE_KEY
- VERSION
- WASM_WNFS_VERSION
- isBrowser

### Functions

- arrContains
- assertBrowser
- asyncWaterfall
- authenticatedUserDomain
- authenticatedUsername
- decodeCID
- encodeCID
- hasProp
- isBlob
- isBool
- isDefined
- isJust
- isNum
- isObject
- isString
- isValue
- mapObj
- mapObjAsync
- notNull
- removeKeyFromObj
- updateOrRemoveKeyFromObj

## Type aliases

### Maybe

Maybe<T>: T | null

- Defined in common/types.ts:1

#### Type parameters

- #### T

### Opaque

Opaque<K, T>: T & { __TYPE__: K }

- Defined in common/types.ts:4

#### Type parameters

- #### K

- #### T

### Result

Result<T, E>: { ok: true; value: T } | { error: E; ok: false }

- Defined in common/types.ts:6

#### Type parameters

- #### T

- #### E = Error

## Variables

### Const UCANS_STORAGE_KEY

UCANS_STORAGE_KEY: "webnative.auth_ucans" = "webnative.auth_ucans"

- Defined in common/index.ts:16

### Const USERNAME_STORAGE_KEY

USERNAME_STORAGE_KEY: "webnative.auth_username" = "webnative.auth_username"

- Defined in common/index.ts:17

### Const VERSION

VERSION: "0.34.2" = "0.34.2"

- Defined in common/version.ts:1

### Const WASM_WNFS_VERSION

WASM_WNFS_VERSION: "0.1.7" = "0.1.7"

- Defined in common/version.ts:2

### Const isBrowser

isBrowser: boolean = ...

- Defined in common/browser.ts:1

## Functions

### arrContains

- arrContains<T>(arr: T[], val: T): boolean

- - Defined in common/util.ts:48

  #### Type parameters

  - #### T

  #### Parameters

  - ##### arr: T[]

  - ##### val: T

  #### Returns boolean

### assertBrowser

- assertBrowser(method: string): void

- - Defined in common/browser.ts:3

  #### Parameters

  - ##### method: string

  #### Returns void

### asyncWaterfall

- asyncWaterfall<T>(val: T, operations: ((val: T) => Promise<T>)[]): Promise<T>

- - Defined in common/util.ts:52

  #### Type parameters

  - #### T

  #### Parameters

  - ##### val: T

  - ##### operations: ((val: T) => Promise<T>)[]

  #### Returns Promise<T>

### authenticatedUserDomain

- authenticatedUserDomain(__namedParameters?: { withFiles?: boolean }): Promise<string | null>

- - Defined in common/index.ts:31

  The user domain of the authenticated user.

  #### Parameters

  - ##### __namedParameters: { withFiles?: boolean } = {}

    - ##### Optional withFiles?: boolean

  #### Returns Promise<string | null>

### authenticatedUsername

- authenticatedUsername(): Promise<string | null>

- - Defined in common/index.ts:23

  Retrieve the authenticated username.

  #### Returns Promise<string | null>

### decodeCID

- decodeCID(val: string | object | CID): CID

- - Defined in common/cid.ts:9

  Decode a possibly string-encoded CID. Passing an already decoded CID instance works too.

  throws

    Throws an error if a CID cannot be decoded!

  #### Parameters

  - ##### val: string | object | CID

  #### Returns CID

### encodeCID

- encodeCID(cid: string | CID): string

- - Defined in common/cid.ts:24

  Encode a CID as a string.

  #### Parameters

  - ##### cid: string | CID

  #### Returns string

### hasProp

- hasProp<K>(data: unknown, prop: K): data is Record<K, unknown>

- - Defined in common/type-checks.ts:1

  #### Type parameters

  - #### K: PropertyKey

  #### Parameters

  - ##### data: unknown

  - ##### prop: K

  #### Returns data is Record<K, unknown>

### isBlob

- isBlob(val: unknown): val is Blob

- - Defined in common/type-checks.ts:35

  #### Parameters

  - ##### val: unknown

  #### Returns val is Blob

### isBool

- isBool(val: unknown): val is boolean

- - Defined in common/type-checks.ts:19

  #### Parameters

  - ##### val: unknown

  #### Returns val is boolean

### isDefined

- isDefined<T>(val: undefined | T): val is T

- - Defined in common/type-checks.ts:5

  #### Type parameters

  - #### T

  #### Parameters

  - ##### val: undefined | T

  #### Returns val is T

### isJust

- isJust<T>(val: null | T): val is T

- - Defined in common/type-checks.ts:13

  #### Type parameters

  - #### T

  #### Parameters

  - ##### val: null | T

  #### Returns val is T

### isNum

- isNum(val: unknown): val is number

- - Defined in common/type-checks.ts:23

  #### Parameters

  - ##### val: unknown

  #### Returns val is number

### isObject

- isObject<T>(val: unknown): val is Record<string, T>

- - Defined in common/type-checks.ts:31

  #### Type parameters

  - #### T

  #### Parameters

  - ##### val: unknown

  #### Returns val is Record<string, T>

### isString

- isString(val: unknown): val is string

- - Defined in common/type-checks.ts:27

  #### Parameters

  - ##### val: unknown

  #### Returns val is string

### isValue

- isValue<T>(val: undefined | null | T): val is T

- - Defined in common/type-checks.ts:15

  #### Type parameters

  - #### T

  #### Parameters

  - ##### val: undefined | null | T

  #### Returns val is T

### mapObj

- mapObj<T, S>(obj: {}, fn: (val: T, key: string) => S): {}

- - Defined in common/util.ts:24

  #### Type parameters

  - #### T

  - #### S

  #### Parameters

  - ##### obj: {}

    - ##### [key: string]: T

  - ##### fn: (val: T, key: string) => S

    - - (val: T, key: string): S

      - #### Parameters

        - ##### val: T

        - ##### key: string

        #### Returns S

  #### Returns {}

  - ##### [key: string]: S

### mapObjAsync

- mapObjAsync<T, S>(obj: {}, fn: (val: T, key: string) => Promise<S>): Promise<{}>

- - Defined in common/util.ts:35

  #### Type parameters

  - #### T

  - #### S

  #### Parameters

  - ##### obj: {}

    - ##### [key: string]: T

  - ##### fn: (val: T, key: string) => Promise<S>

    - - (val: T, key: string): Promise<S>

      - #### Parameters

        - ##### val: T

        - ##### key: string

        #### Returns Promise<S>

  #### Returns Promise<{}>

### notNull

- notNull<T>(val: null | T): val is T

- - Defined in common/type-checks.ts:9

  #### Type parameters

  - #### T

  #### Parameters

  - ##### val: null | T

  #### Returns val is T

### removeKeyFromObj

- removeKeyFromObj<T>(obj: {}, key: string): {}

- - Defined in common/util.ts:3

  #### Type parameters

  - #### T

  #### Parameters

  - ##### obj: {}

    - ##### [key: string]: T

  - ##### key: string

  #### Returns {}

  - ##### [key: string]: T

### updateOrRemoveKeyFromObj

- updateOrRemoveKeyFromObj<T>(obj: {}, key: string, val: Maybe<T>): {}

- - Defined in common/util.ts:11

  #### Type parameters

  - #### T

  #### Parameters

  - ##### obj: {}

    - ##### [key: string]: T

  - ##### key: string

  - ##### val: Maybe<T>

  #### Returns {}

  - ##### [key: string]: T

Generated using TypeDoc