- [Vasco Santos], [Protocol Labs]
- [Vasco Santos], [Protocol Labs]
A plan specifies limits and restrictions on usage. Different plans have different limits and different price points. Accounts select a plan so that they can be billed the correct amount each period.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC2119.
Capability can be invoked to get information about the plan that the account is currently signed up for.
did:mailto:web.mail:alice
invokesplan/get
capability provided bydid:web:web3.storage
{
"iss": "did:mailto:web.mail:alice",
"aud": "did:web:web3.storage",
"att": [
{
"with": "did:mailto:web.mail:alice",
"can": "plan/get"
}
],
"prf": [],
"sig": "..."
}
{
"ran": "bafy...planGet",
"out": {
"error": {
"name": "PlanNotFound"
}
}
}
{
"ran": "bafy...planGet",
"out": {
"ok": {
"product": "did:web:starter.web3.storage",
"updatedAt": "2024-01-05T06:56:26.074Z"
}
}
}
Capability can be invoked to change a billing plan of an account.
did:mailto:web.mail:alice
invokesplan/set
capability provided bydid:web:web3.storage
{
"iss": "did:mailto:web.mail:alice",
"aud": "did:web:web3.storage",
"att": [
{
"with": "did:mailto:web.mail:alice",
"can": "plan/set",
"nb": {
"product": "did:web:starter.web3.storage"
}
}
],
"prf": [],
"sig": "..."
}
{
"ran": "bafy...planSet",
"out": {
"error": {
"name": "AccountNotFound"
}
}
}
{
"ran": "bafy...planSet",
"out": {
"ok": {}
}
}