diff --git a/toolkit/client/client.go b/toolkit/client/client.go index 346c9fe..470c12b 100644 --- a/toolkit/client/client.go +++ b/toolkit/client/client.go @@ -3,6 +3,7 @@ package client import ( "context" "fmt" + "iter" "github.com/ipfs/go-cid" "github.com/libp2p/go-libp2p/core/crypto" @@ -35,6 +36,16 @@ func NewClient(privKey crypto.PrivKey, requester DelegationRequester) (*Client, }, nil } +// AddBundle adds a delegation.Bundle to the client's pool. +func (c *Client) AddBundle(bundle *delegation.Bundle) { + c.pool.AddBundle(bundle) +} + +// AddBundles adds a sequence of delegation.Bundles to the client's pool. +func (c *Client) AddBundles(bundles iter.Seq[*delegation.Bundle]) { + c.pool.AddBundles(bundles) +} + // PrepareInvoke returns an invocation, bundled in a container.Writer with the necessary proofs. func (c *Client) PrepareInvoke(ctx context.Context, cmd command.Command, subject did.DID, opts ...invocation.Option) (container.Writer, error) { proof, err := c.findProof(ctx, cmd, subject)