Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add implementation links for w3-filecoin #100

Merged
merged 4 commits into from
Jan 22, 2024
Merged
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
50 changes: 48 additions & 2 deletions w3-filecoin.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ The issued receipt MUST have a `fx.fork` [effect] that links to the [`filecoin/s
}
```

##### Implementations

- `@web3-storage/capabilities` [`filecoin/offer` capability validator](https://github.com/web3-storage/w3up/blob/adb24424d1faf50daf2339b77c22fdd44faa236a/packages/capabilities/src/filecoin/storefront.js#L20)
- `@web3-storage/filecoin-api` [storefront `filecoin/offer` method](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/filecoin-api/src/storefront/service.js#L20)

#### `filecoin/accept`

This task is effectively a shortcut allowing an observer to find out the result of the [`filecoin/offer`] task chain without having to follow each step. The [Storefront] MUST issue a signed receipt with a [`DataAggregationProof`] result or an error.
Expand Down Expand Up @@ -298,6 +303,11 @@ This task is effectively a shortcut allowing an observer to find out the result
}
```

##### Implementations

- `@web3-storage/capabilities` [`filecoin/accept` capability validator](https://github.com/web3-storage/w3up/blob/adb24424d1faf50daf2339b77c22fdd44faa236a/packages/capabilities/src/filecoin/storefront.js#L82)
- `@web3-storage/filecoin-api` [storefront `filecoin/accept` method](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/filecoin-api/src/storefront/service.js#L123)

#### `filecoin/submit`

The task MUST be invoked by the [Storefront] which MAY be used to verify the offered content piece before propagating it through the pipeline.
Expand Down Expand Up @@ -365,6 +375,11 @@ If the added piece is invalid, the reason for the failure is also reported:
}
```

##### Implementations

- `@web3-storage/capabilities` [`filecoin/submit` capability validator](https://github.com/web3-storage/w3up/blob/adb24424d1faf50daf2339b77c22fdd44faa236a/packages/capabilities/src/filecoin/storefront.js#L50)
- `@web3-storage/filecoin-api` [storefront `filecoin/submit` method](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/filecoin-api/src/storefront/service.js#L82)

#### `filecoin/info`

An agent MAY invoke the `filecoin/info` capability to request known information about content piece in Filecoin. See [schema](#filecoininfo-schema).
Expand Down Expand Up @@ -455,6 +470,11 @@ An agent MAY invoke the `filecoin/info` capability to request known information
}
```

##### Implementations

- `@web3-storage/capabilities` [`filecoin/info` capability validator](https://github.com/web3-storage/w3up/blob/adb24424d1faf50daf2339b77c22fdd44faa236a/packages/capabilities/src/filecoin/storefront.js#L114)
- `@web3-storage/filecoin-api` [storefront `filecoin/info` method](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/filecoin-api/src/storefront/service.js#L239)

### _Aggregator_ Capabilities

#### `piece/offer`
Expand Down Expand Up @@ -506,6 +526,11 @@ An [Aggregator] MUST issue a signed receipt to acknowledge the received request.

See the [`piece/accept`] section for the subsequent task.

##### Implementations

- `@web3-storage/capabilities` [`piece/offer` capability validator](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/filecoin-client/src/aggregator.js#L22)
- `@web3-storage/filecoin-api` [aggregator `piece/offer` method](https://github.com/web3-storage/w3up/blob/main/packages/filecoin-api/src/aggregator/service.js#L19)

#### `piece/accept`

An [Aggregator] MUST issue a receipt for the [`piece/accept`] task for the offered piece that was included in an aggregate. The receipt MUST contain an [`InclusionProof`] in the result and an `fx.join` [effect] linking to [`aggregate/offer`] task, or an error detailing the reason.
Expand Down Expand Up @@ -542,6 +567,11 @@ An [Aggregator] MUST issue a receipt for the [`piece/accept`] task for the offer
}
```

##### Implementations

- `@web3-storage/capabilities` [`piece/accept` capability validator](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/filecoin-client/src/aggregator.js#L66)
- `@web3-storage/filecoin-api` [aggregator `piece/accept` method](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/filecoin-api/src/aggregator/service.js#L62)

### _Dealer_ Capabilities

#### `aggregate/offer`
Expand Down Expand Up @@ -611,7 +641,13 @@ The [Dealer] MUST issue a signed receipt to acknowledge the request. The issued

See the [`aggregate/accept`](#aggregateaccept) section for the subsequent task.

### `aggregate/accept`
##### Implementations

- `@web3-storage/capabilities` `aggregate/offer` [capability validator](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/capabilities/src/filecoin/dealer.js#L20)
- `@web3-storage/filecoin-api` [`piece/accept` method creates `aggregate/offer` delegation](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/filecoin-api/src/aggregator/service.js#L91)
- `@web3-storage/filecoin-api` [dealer service `aggregate/offer` method](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/filecoin-api/src/dealer/service.js#L14)

#### `aggregate/accept`

The [Dealer] MUST issue a receipt for the [`aggregate/accept`] task once it arranges deals with Storage Providers and they are live on the Filecoin chain. The receipt MUST either succeed with the [`DataAggregationProof`] or fail (with an `error` describing the problem with the `aggregate`).

Expand Down Expand Up @@ -670,6 +706,12 @@ If a deal fails due to an invalid piece, the issued receipt MUST contain `fx.for
}
```

##### Implementations

- `@web3-storage/capabilities` [`aggregate/accept` capability validator](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/capabilities/src/filecoin/dealer.js#L48)
- `@web3-storage/filecoin-api` [dealer `aggregate/offer` method ➡ `aggregate/accept` effect](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/filecoin-api/src/dealer/service.js#L69)
- `@web3-storage/filecoin-api` [dealer `aggregate/accept` method](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/filecoin-api/src/dealer/service.js#L92)

### _Deal Tracker_ Capabilities

#### `deal/info`
Expand Down Expand Up @@ -751,6 +793,11 @@ The invocation to the [Deal Tracker] MUST fail if the deal information for the a
}
```

##### Implementations

- `@web3-storage/capabilities` `deal/info` [capability validator](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/capabilities/src/filecoin/deal-tracker.js#L17)
- `@web3-storage/filecoin-api` [deal-tracker service `deal/info` method](https://github.com/web3-storage/w3up/blob/e34eed1fa3d6ef24ce2c01982764f2012dbf30d8/packages/filecoin-api/src/deal-tracker/service.js#L15)

## Schema

### Base types
Expand Down Expand Up @@ -784,7 +831,6 @@ type DealCapability union {
discriminantKey "can"
}


type PieceRef struct {
piece PieceLink
}
Expand Down