Skip to content

Commit 6108421

Browse files
authored
fix: make NewProofPruner generic properly (#87)
`any` is not a wildcard on an instantiated type.
1 parent cfa6420 commit 6108421

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

validator/proof_pruning.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
// attestor must be the verifier of the service that issued the ucan/attest
2323
// delegations in the proof pool (e.g. the upload-service in the storacha
2424
// network).
25-
func NewProofPruner(attestor principal.Verifier, cap CapabilityParser[any]) delegation.ProofPruner {
25+
func NewProofPruner[Caveats any](attestor principal.Verifier, cap CapabilityParser[Caveats]) delegation.ProofPruner {
2626
return func(issuer ucan.Signer, audience ucan.Principal, capabilities []ucan.Capability[ucan.CaveatBuilder], options ...delegation.Option) (delegation.Proofs, error) {
2727
draft, err := delegation.Delegate(issuer, audience, capabilities, options...)
2828
if err != nil {

0 commit comments

Comments
 (0)