Skip to content

Commit

Permalink
feat: podsi and filecoin support
Browse files Browse the repository at this point in the history
  • Loading branch information
slowbackspace committed Aug 20, 2024
1 parent 7cbe0cf commit ef8af8e
Show file tree
Hide file tree
Showing 13 changed files with 1,049 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
"delegators",
"drep",
"dreps",
"filecoin",
"ipfs",
"IPFS",
"libc",
"Lovelaces",
"Merkle",
"Milkomeda",
"mirs",
"Mithril",
Expand All @@ -23,6 +25,7 @@
"Ogmios",
"openapi",
"overusage",
"podsi",
"redoc",
"redocly",
"tbody",
Expand Down
149 changes: 149 additions & 0 deletions blockfrost-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5391,6 +5391,13 @@ paths:
schema:
type: string
description: Path to the IPFS object
- in: query
name: filecoin
schema:
type: boolean
required: false
description: |
If set to true, the object will be pinned to Filecoin as well. If not specified, the object will only be pinned to IPFS.
responses:
'200':
description: Returns pinned object
Expand All @@ -5409,9 +5416,13 @@ paths:
- queued|pinned|unpinned|failed|gc
example: queued
description: State of the pin action
filecoin:
type: boolean
description: Whether filecoin was used to pin the resource.
required:
- ipfs_hash
- state
- filecoin
'400':
$ref: '#/components/responses/400'
'403':
Expand Down Expand Up @@ -5506,12 +5517,16 @@ paths:
pinned item has been garbage collected due to account being over storage quota or after it has
been moved to `unpinned` state by removing the object pin.
example: pinned
filecoin:
type: boolean
description: Whether filecoin was used to pin the resource.
required:
- time_created
- time_pinned
- ipfs_hash
- size
- state
- filecoin
'400':
$ref: '#/components/responses/400'
'403':
Expand Down Expand Up @@ -5579,12 +5594,16 @@ paths:
When object is unpinned (i.e. after `/ipfs/pin/remove/{IPFS_path}`) it is marked for garbage collection.
State `gc` means that a previously `unpinned` item has been garbage collected due to account being over storage quota.
example: pinned
filecoin:
type: boolean
description: Whether filecoin was used to pin the resource.
required:
- time_created
- time_pinned
- ipfs_hash
- size
- state
- filecoin
'400':
$ref: '#/components/responses/400'
'403':
Expand Down Expand Up @@ -5650,6 +5669,136 @@ paths:
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
/ipfs/pin/podsi/{IPFS_path}:
servers:
- url: https://ipfs.blockfrost.io/api/v0
get:
tags:
- IPFS » Pins
summary: Get Proof of Data Segment Inclusion (PoDSI)
description: |
Retrieve the Proof of Data Segment Inclusion (PoDSI) for a specific IPFS object.
<p>
<span class="hosted">Hosted</span> Endpoint only available for hosted variant.
</p>
parameters:
- in: path
required: true
name: IPFS_path
schema:
type: string
description: The path to the IPFS object
responses:
'200':
description: Returns the Proof of Data Segment Inclusion (PoDSI)
content:
application/json:
schema:
type: object
properties:
dealInfo:
type: array
items:
type: object
properties:
dealId:
type: integer
description: The ID of the storage deal
storageProvider:
type: string
description: The storage provider's ID
proof:
type: object
properties:
verifierData:
type: object
properties:
commPc:
type: string
description: The piece commitment (commPc)
sizePc:
type: string
description: The size of the piece commitment
required:
- commPc
- sizePc
inclusionProof:
type: object
properties:
proofIndex:
type: object
properties:
index:
type: string
description: The proof index
path:
type: array
items:
type: string
description: The Merkle proof path
required:
- index
- path
proofSubtree:
type: object
properties:
index:
type: string
description: The subtree proof index
path:
type: array
items:
type: string
description: The Merkle proof path for the subtree
required:
- index
- path
required:
- proofIndex
- proofSubtree
indexRecord:
type: object
properties:
checksum:
type: string
description: The checksum of the index record
proofIndex:
type: string
description: The proof index
proofSubtree:
type: integer
description: The size of the proof subtree
size:
type: integer
description: The size of the record
required:
- checksum
- proofIndex
- proofSubtree
- size
required:
- verifierData
- inclusionProof
- indexRecord
required:
- dealId
- storageProvider
- proof
required:
- dealInfo
'400':
$ref: '#/components/responses/400'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'418':
$ref: '#/components/responses/418'
'429':
$ref: '#/components/responses/429'
'500':
$ref: '#/components/responses/500'
/metrics:
get:
tags:
Expand Down
2 changes: 1 addition & 1 deletion json-schema.json

Large diffs are not rendered by default.

Loading

0 comments on commit ef8af8e

Please sign in to comment.