Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ storacha up recipies.txt
- [`storacha proof ls`](#storacha-proof-ls)
- Key management
- [`storacha key create`](#storacha-key-create)
- UCAN-HTTP Bridge
- [`storacha bridge generate-tokens`](#storacha-bridge-generate-tokens)
- Advanced usage
- [`storacha can blob add`](#storacha-can-blob-add-path)
- [`storacha can blob ls`](#storacha-can-blob-ls)
Expand Down Expand Up @@ -216,17 +214,6 @@ Print a new key pair. Does not change your current signing key

- `--json` Export as dag-json

### `storacha bridge generate-tokens`

Generate tokens that can be used as the `X-Auth-Secret` and `Authorization` headers required to use the UCAN-HTTP bridge.

See the [UCAN Bridge specification](https://github.com/storacha/specs/blob/main/w3-ucan-bridge.md) for more information
on how these are expected to be used.

- `--can` One or more abilities to delegate.
- `--expiration` Unix timestamp (in seconds) when the delegation is no longer valid. Zero indicates no expiration.
- `--json` If set, output JSON suitable to splat into the `headers` field of a `fetch` request.

### `storacha can blob add [path]`

Store a blob file to the service.
Expand Down
15 changes: 0 additions & 15 deletions packages/cli/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
Account,
Space,
Coupon,
Bridge,
accessClaim,
addSpace,
listSpaces,
Expand Down Expand Up @@ -342,20 +341,6 @@ cli
)
.action(Coupon.issue)

cli
.command('bridge generate-tokens <did>')
.option('-c, --can', 'One or more abilities to delegate.')
.option(
'-e, --expiration',
'Unix timestamp (in seconds) when the delegation is no longer valid. Zero indicates no expiration.',
0
)
.option(
'-j, --json',
'If set, output JSON suitable to spread into the `headers` field of a `fetch` request.'
)
.action(Bridge.generateTokens)

cli
.command('delegation create <audience-did>')
.describe(
Expand Down
68 changes: 0 additions & 68 deletions packages/cli/bridge.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import * as ucanto from '@ucanto/core'
import { ed25519 } from '@ucanto/principal'
import chalk from 'chalk'
export * as Coupon from './coupon.js'
export * as Bridge from './bridge.js'
export { Account, Space }
import ago from 's-ago'

Expand Down
11 changes: 0 additions & 11 deletions packages/cli/test/bin.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1466,17 +1466,6 @@ export const testKey = {
}),
}

export const testBridge = {
'storacha bridge generate-tokens': test(async (assert, context) => {
const spaceDID = await loginAndCreateSpace(context)
const res = await storacha
.args(['bridge', 'generate-tokens', spaceDID])
.join()
assert.match(res.output, /X-Auth-Secret header: u/)
assert.match(res.output, /Authorization header: u/)
}),
}

/**
* @param {Test.Context} context
* @param {object} options
Expand Down