Skip to content

Commit

Permalink
Merge pull request #360 from blockfrost/feat/filecoin
Browse files Browse the repository at this point in the history
feat: filecoin support
  • Loading branch information
slowbackspace authored Dec 1, 2024
2 parents 011f6e4 + 6ee3e2a commit 7111ea2
Show file tree
Hide file tree
Showing 13 changed files with 513 additions and 33 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
"delegators",
"drep",
"dreps",
"filecoin",
"ipfs",
"IPFS",
"libc",
"Lovelaces",
"Merkle",
"Milkomeda",
"mirs",
"Mithril",
Expand All @@ -36,6 +38,7 @@
"Ogmios",
"openapi",
"overusage",
"podsi",
"redoc",
"redocly",
"tbody",
Expand Down
26 changes: 25 additions & 1 deletion blockfrost-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5455,14 +5455,24 @@ paths:
tags:
- IPFS » Pins
summary: Pin an object
description: Pinning is necessary to avoid regular garbage collection (deletion) of IPFS objects. Non-pinned objects are regularly being removed without prior notice. Pinned objects are counted in your user storage quota.
description: |
Pinning is necessary to avoid regular garbage collection (deletion) of IPFS objects. Non-pinned objects are regularly being removed without prior notice. Pinned objects are counted in your user storage quota.
**Note:** If the object was pinned to Filecoin (using `filecoin=true`), it cannot be removed or unpinned due to Filecoin's immutable and persistent storage guarantees. Please ensure careful consideration when pinning objects to Filecoin, as the action is irreversible.
parameters:
- in: path
required: true
name: IPFS_path
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. Objects pinned to Filecoin cannot be unpinned due to its long-term storage guarantees.
x-codeSamples:
- lang: Shell
label: cURL
Expand Down Expand Up @@ -5491,9 +5501,13 @@ paths:
- 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 @@ -5598,12 +5612,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 @@ -5681,12 +5699,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 All @@ -5712,6 +5734,8 @@ paths:
<p>
<span class="hosted">Hosted</span> Endpoint only available for hosted variant.
</p>
**Note:** If the object was pinned to Filecoin (using `filecoin=true`), it cannot be removed or unpinned due to Filecoin's immutable and persistent storage guarantees. Please ensure careful consideration when pinning objects to Filecoin, as the action is irreversible.
parameters:
- in: path
required: true
Expand Down
39 changes: 37 additions & 2 deletions docs/blockfrost-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5708,17 +5708,33 @@ paths:
tags:
- IPFS » Pins
summary: Pin an object
description: >-
description: >
Pinning is necessary to avoid regular garbage collection (deletion) of
IPFS objects. Non-pinned objects are regularly being removed without
prior notice. Pinned objects are counted in your user storage quota.
**Note:** If the object was pinned to Filecoin (using `filecoin=true`),
it cannot be removed or unpinned due to Filecoin's immutable and
persistent storage guarantees. Please ensure careful consideration when
pinning objects to Filecoin, as the action is irreversible.
parameters:
- in: path
required: true
name: IPFS_path
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. Objects
pinned to Filecoin cannot be unpinned due to its long-term storage
guarantees.
x-codeSamples:
- lang: Shell
label: cURL
Expand Down Expand Up @@ -5747,9 +5763,13 @@ paths:
- 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 @@ -5863,12 +5883,16 @@ paths:
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 @@ -5957,12 +5981,16 @@ paths:
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 All @@ -5982,12 +6010,19 @@ paths:
tags:
- IPFS » Pins
summary: Remove a IPFS pin
description: |
description: >
Remove pinned objects from local storage
<p>
<span class="hosted">Hosted</span> Endpoint only available for hosted variant.
</p>
**Note:** If the object was pinned to Filecoin (using `filecoin=true`),
it cannot be removed or unpinned due to Filecoin's immutable and
persistent storage guarantees. Please ensure careful consideration when
pinning objects to Filecoin, as the action is irreversible.
parameters:
- in: path
required: true
Expand Down
2 changes: 1 addition & 1 deletion json-schema.json

Large diffs are not rendered by default.

Loading

0 comments on commit 7111ea2

Please sign in to comment.