Skip to content

Commit 097c0c4

Browse files
authored
feat: add selector for extracting location commitment from blob/replica/transfer receipt (#75)
Adds the selector constant for extracting extracting location commitment from blob/replica/transfer receipt. refs storacha/piri#358 (comment)
1 parent c1b7ce6 commit 097c0c4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

capabilities/blob/replica/allocate.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import (
1515

1616
const AllocateAbility = "blob/replica/allocate"
1717

18+
// AllocateSiteSelector is the selector for extracting the location commitment
19+
// link for a new site from a "blob/replica/transfer" receipt.
20+
const AllocateSiteSelector = ".out.ok.site"
21+
1822
var _ ipld.Builder = (*AllocateCaveats)(nil)
1923

2024
type AllocateCaveats struct {
@@ -33,8 +37,8 @@ type AllocateOk struct {
3337
// Size is the number of bytes allocated for a Blob.
3438
Size uint64
3539
// Site resolves to an additional location for the blob.
36-
// The selector MUST be ".out.ok.site" and it links to a receipt of a
37-
// "blob/replica/transfer" task.
40+
// The selector MUST be ".out.ok.site" i.e. [AllocateSiteSelector] and it
41+
// links to a receipt of a "blob/replica/transfer" task.
3842
Site types.Promise
3943
}
4044

0 commit comments

Comments
 (0)