Skip to content

Commit

Permalink
feat: docs for DirectoryEntryLinkCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Mar 28, 2023
1 parent 44aced8 commit 50e5fa5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/upload-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ await Upload.add(conf, rootCID, carCIDs)
- [Types](#types)
- [`CARFile`](#carfile)
- [`CARMetadata`](#carmetadata)
- [`DirectoryEntryLinkCallback`](#directoryentrylinkcallback)
- [`InvocationConfig`](#invocationconfig)
- [`ShardStoredCallback`](#shardstoredcallback)
- [Contributing](#contributing)
Expand All @@ -174,6 +175,7 @@ function uploadDirectory(
retries?: number
signal?: AbortSignal
onShardStored?: ShardStoredCallback
onDirectoryEntryLink?: DirectoryEntryLinkCallback
shardSize?: number
concurrentRequests?: number
} = {}
Expand Down Expand Up @@ -466,6 +468,14 @@ export interface CARMetadata {
}
```

### `DirectoryEntryLinkCallback`

Callback for every DAG encoded directory entry, including the root. It includes the CID, name (full path) and DAG size in bytes.

```ts
type DirectoryEntryLinkCallback = (link: DirectoryEntryLink) => void
```

### `InvocationConfig`

This is the configuration for the UCAN invocation. It's values can be obtained from an `Agent`. See [Create an Agent](#create-an-agent) for an example. It is an object with `issuer` and `proofs`:
Expand Down

0 comments on commit 50e5fa5

Please sign in to comment.