Skip to content

Commit a94de1a

Browse files
committed
fix: revert capability receipt changes
1 parent c85fee1 commit a94de1a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

rfc/account-usage-get-capability.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ type AccountUsageGetFailure {
133133
}
134134
135135
type AccountUsageGetSuccess {
136-
total Int
137-
providers Record<ProviderDID, ProviderUsage> # keys MUST be sorted
136+
total Int
137+
spaces Record<SpaceDID, SpaceUsage> # keys MUST be sorted
138138
}
139139
140-
type ProviderUsage {
141-
total Int
142-
spaces Record<SpaceDID, UsageData> # keys MUST be sorted
140+
type SpaceUsage {
141+
total Int
142+
providers Record<ProviderDID, UsageData> # keys MUST be sorted
143143
}
144144
145145
# UsageData is already defined and used by `usage/report`
@@ -173,19 +173,19 @@ type DID = string
173173
174174
```
175175

176-
In all responses, the keys of the `providers` field in `AccountUsageGetSuccess` and the `spaces` field in `ProviderUsage` **MUST be sorted lexicographically** by their respective key (ProviderDID, SpaceDID). This ensures that the same query produces the same output each time.
176+
In all responses, the keys of the `spaces` field in `AccountUsageGetSuccess` and the `providers` field in `SpaceUsage` **MUST be sorted lexicographically** by their respective key (SpaceDID, ProviderDID). This ensures that the same query produces the same output each time.
177177

178178

179179
> example:
180180
181181
```json
182182
{
183183
"total": 5356848797,
184-
"providers": {
185-
"did:web:web3.storage": {
184+
"spaces": {
185+
"did:key:z6MkuxVKbEvYzXw89c9ESd3xoZ988MFrCgqT5JF5wtBvuYWe": {
186186
"total": 5356848797,
187-
"spaces" {
188-
"did:key:z6MkuxVKbEvYzXw89c9ESd3xoZ988MFrCgqT5JF5wtBvuYWe": {
187+
"providers": {
188+
"did:web:web3.storage": {
189189
"provider": "did:web:web3.storage",
190190
"space": "did:key:z6MkuxVKbEvYzXw89c9ESd3xoZ988MFrCgqT5JF5wtBvuYWe",
191191
"period": {

0 commit comments

Comments
 (0)