stateDiagram-v2
add: 👩💻 /space/content/add/blob 🤖
add: 🧾 { ok {} }
allocate: 🤖 /service/blob/allocate 🤖
allocate: 🧾 { ok { size 123 } }
wait: 🤖 /service/blob/receive 🤖
wait: 🧾 { ok {} }
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Type definition for the Blob. It has no inputs and two outputs | |
; `digest` and `size`. It is kind of like a rule without a body | |
(Blob : { :digest Bytes :size Int }) | |
(Site : { :url String :headers (Map :key string :value string) }) | |
;; ℹ️ Unlabelled parameter can be refereced by `.` | |
(Result :error : (:ok . :error .error)) | |
;; Composed task is rule that maps input to tasks and maps task outputs | |
;; to the output of the composed task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Multihash : Bytes) | |
(Blob : {:size Integer :digest Multihash }) | |
(blob/add | |
:input {:sub DID :blob Blob } | |
:address (memory/allocate | |
:space .input.sub | |
:blob .input.blob) | |
:content (http/put | |
:url .address.out.ok.url |
flowchart LR
Add[👩💻 store/add 🤖]
Allocate[🤖 blob/allocate 🤖]
Receive[🤖 blob/receive 🤖]
Write[🤖 blob/write 👩💻]
Close[🤖 blob/close 🤖]
Claim[🤖 assert/location 🌐]
Add --> Allocate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Account { | |
plan: AccountPlan | |
// ... | |
} | |
interface AccountPlan { | |
customer: AccountDID | |
request(): Plan | |
list(): Plan[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Account { | |
subscriptions: AccountSubscriptions | |
// ... | |
} | |
interface AccountSubscriptions { | |
customer: AccountDID | |
request(): Subscription | |
list(): Subscription[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as API from '@ucanto/interface' | |
/** | |
* @typedef {number} Integer | |
* @typedef {number} Float | |
* @typedef {Readonly<Uint8Array>} Bytes | |
* @typedef {string} UTF8 | |
* | |
* @typedef {String} Entity | |
* @typedef {Integer|Float|Bytes|UTF8} Attribute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ProviderDID = | |
| "did:web:web.storage" | |
| "did:web:nft.storage" | |
interface Principal { | |
did(): string | |
} | |
interface Space extends Principal { |
stateDiagram-v2
direction TB
state scope {
sig-->meta:
sig-->prf
sig-->iss
sig-->aud
sig-->tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) ipfs --upgrade-cidv0-in-output=true add --chunker=rabin-262141 --trickle=false --raw-leaves=false --cid-version=0 ../testdata/large_repeat_1GiB.zst | |
2) ipfs add --chunker=rabin-262141 --trickle=false --raw-leaves=false --cid-version=1 ../testdata/large_repeat_1GiB.zst | |
3) ipfs --upgrade-cidv0-in-output=true add --chunker=rabin-262141 --trickle=false --raw-leaves=true --cid-version=0 ../testdata/large_repeat_1GiB.zst | |
4) ipfs add --chunker=rabin-262141 --trickle=false --raw-leaves=true --cid-version=1 ../testdata/large_repeat_1GiB.zst | |
5) ipfs --upgrade-cidv0-in-output=true add --chunker=size-65535 --trickle=true --raw-leaves=false --cid-version=0 ../testdata/large_repeat_1GiB.zst | |
6) ipfs add --chunker=size-65535 --trickle=true --raw-leaves=false --cid-version=1 ../testdata/large_repeat_1GiB.zst | |
7) jsipfs add --chunker=size-65535 --trickle=true --raw-leaves=false --cid-version=1 ../testdata/large_repeat_1GiB.zst | |
8) ipfs --upgrade-cidv0-in-output=true add --chunker=size-262144 --trickle=true --raw-leaves=false - |
NewerOlder