From eb31dd1f3bc06d08c32191436ca497973605f213 Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Wed, 18 Sep 2024 10:07:19 +0100 Subject: [PATCH] refactor: repo URL and IPLD Builder interface --- README.md | 53 ++++++---- client/connection.go | 12 +-- core/car/car.go | 4 +- core/car/car_test.go | 2 +- core/dag/blockstore/blockstore.go | 2 +- core/delegation/datamodel/archive_test.go | 8 +- core/delegation/delegate.go | 12 +-- core/delegation/delegation.go | 20 ++-- core/delegation/proofs.go | 6 +- core/invocation/invocation.go | 8 +- core/invocation/ran/ran.go | 8 +- core/ipld/block/block.go | 4 +- core/ipld/hash/sha256/sha256.go | 2 +- core/ipld/lib.go | 6 +- core/ipld/rebind_test.go | 2 +- core/message/datamodel/agentmessage_test.go | 8 +- core/message/message.go | 16 +-- core/receipt/datamodel/receipt_test.go | 8 +- core/receipt/receipt.go | 32 +++--- core/result/failure/datamodel/failure.go | 4 +- core/result/failure/faillure.go | 18 ++-- core/result/result.go | 6 +- core/result/result_test.go | 2 +- core/schema/did.go | 4 +- core/schema/did_test.go | 2 +- core/schema/link.go | 6 +- core/schema/link_test.go | 6 +- core/schema/literal.go | 2 +- core/schema/mapped.go | 2 +- core/schema/mapped_test.go | 6 +- core/schema/or.go | 2 +- core/schema/schema.go | 6 +- core/schema/struct.go | 6 +- core/schema/struct_test.go | 2 +- core/schema/uri.go | 2 +- core/schema/uri_test.go | 2 +- go.mod | 78 +++++++++----- go.sum | 111 ++++++++++++++++++++ principal/absentee/absentee.go | 6 +- principal/absentee/absentee_test.go | 4 +- principal/ed25519/signer/signer.go | 8 +- principal/ed25519/verifier/verifier.go | 6 +- principal/lib.go | 2 +- principal/multiformat/multiformat_test.go | 2 +- principal/rsa/signer/signer.go | 10 +- principal/rsa/signer/signer_test.go | 2 +- principal/rsa/verifier/verifier.go | 8 +- principal/signer/signer.go | 8 +- principal/verifier/verifier.go | 6 +- server/error.go | 14 +-- server/handler.go | 16 +-- server/options.go | 12 +-- server/server.go | 34 +++--- server/server_test.go | 34 +++--- server/transaction/transaction.go | 6 +- testing/fixtures/fixtures.go | 2 +- transport/car/codec.go | 10 +- transport/car/request/request.go | 12 +-- transport/car/response/response.go | 12 +-- transport/codec.go | 2 +- transport/http.go | 2 +- transport/http/channel.go | 2 +- transport/http/error.go | 2 +- transport/http/response.go | 2 +- ucan/caveats.go | 2 +- ucan/crypto/signer.go | 2 +- ucan/datamodel/payload/payload.go | 2 +- ucan/formatter/formatter.go | 6 +- ucan/lib.go | 16 +-- ucan/ucan.go | 6 +- ucan/view.go | 6 +- validator/authorization.go | 4 +- validator/capability.go | 10 +- validator/datamodel/attestation.go | 4 +- validator/error.go | 16 +-- validator/lib.go | 18 ++-- validator/lib_test.go | 36 +++---- validator/session_test.go | 22 ++-- 78 files changed, 500 insertions(+), 354 deletions(-) diff --git a/README.md b/README.md index 874e74c..d750319 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Ucanto UCAN RPC in Golang. ## Install ```console -go get github.com/storacha-network/go-ucanto +go get github.com/storacha/go-ucanto ``` ## Usage @@ -35,18 +35,27 @@ audience := servicePrincipal type StoreAddCaveats struct { Link ipld.Link - Size uint64 + Size int } -func (c *StoreAddCaveats) Build() (datamodel.Node, error) { - n := bindnode.Wrap(c, typ) - return n.Representation(), nil +func (c StoreAddCaveats) ToIPLD() (datamodel.Node, error) { + return ipld.WrapWithRecovery(&c, StoreAddType()) +} + +func StoreAddType() ipldschema.Type { + ts, _ := ipldprime.LoadSchemaBytes([]byte(` + type StoreAdd struct { + link Link + size Int + } + `)) + return ts.TypeByName("StoreAdd") } capability := ucan.NewCapability( "store/add", did.Parse("did:key:z6MkwDuRThQcyWjqNsK54yKAmzfsiH6BTkASyiucThMtHt1T").String(), - &StoreAddCaveats{ + StoreAddCaveats{ // TODO }, ) @@ -104,14 +113,8 @@ type TestEcho struct { Echo string } -func (c *TestEcho) Build() (ipld.Node, error) { - np := basicnode.Prototype.Any - nb := np.NewBuilder() - ma, _ := nb.BeginMap(1) - ma.AssembleKey().AssignString("echo") - ma.AssembleValue().AssignString(c.Echo) - ma.Finish() - return nb.Build(), nil +func (c TestEcho) ToIPLD() (ipld.Node, error) { + return ipld.WrapWithRecovery(&c, EchoType()) } func EchoType() ipldschema.Type { @@ -128,16 +131,22 @@ func createServer(signer principal.Signer) (server.ServerView, error) { testecho := validator.NewCapability( "test/echo", schema.DIDString(), - schema.Struct[*TestEcho](EchoType()), + schema.Struct[TestEcho](EchoType(), nil), + validator.DefaultDerives, ) return server.NewServer( signer, // Handler definitions - server.WithServiceMethod(testecho.Can(), server.Provide(testecho, func(cap ucan.Capability[*TestEcho], inv invocation.Invocation, ctx server.InvocationContext) (transaction.Transaction[*TestEcho, ipld.Builder], error) { - r := result.Ok[*TestEcho, ipld.Builder](&TestEcho{Echo: cap.Nb().Echo}) - return transaction.NewTransaction(r), nil - })), + server.WithServiceMethod( + testecho.Can(), + server.Provide( + testecho, + func(cap ucan.Capability[TestEcho], inv invocation.Invocation, ctx server.InvocationContext) (TestEcho, receipt.Effects, error) { + return TestEcho{Echo: cap.Nb().Echo}, nil, nil + }, + ), + ), ) } @@ -172,15 +181,15 @@ func main() { ## API -[pkg.go.dev Reference](https://pkg.go.dev/github.com/storacha-network/go-ucanto) +[pkg.go.dev Reference](https://pkg.go.dev/github.com/storacha/go-ucanto) ## Related -* [Ucanto in Javascript](https://github.com/storacha-network/ucanto) +* [Ucanto in Javascript](https://github.com/storacha/ucanto) ## Contributing -Feel free to join in. All welcome. Please [open an issue](https://github.com/storacha-network/go-ucanto/issues)! +Feel free to join in. All welcome. Please [open an issue](https://github.com/storacha/go-ucanto/issues)! ## License diff --git a/client/connection.go b/client/connection.go index 6eb4f54..e43fb94 100644 --- a/client/connection.go +++ b/client/connection.go @@ -6,12 +6,12 @@ import ( "hash" "iter" - "github.com/storacha-network/go-ucanto/core/invocation" - "github.com/storacha-network/go-ucanto/core/ipld/block" - "github.com/storacha-network/go-ucanto/core/message" - "github.com/storacha-network/go-ucanto/transport" - "github.com/storacha-network/go-ucanto/transport/car" - "github.com/storacha-network/go-ucanto/ucan" + "github.com/storacha/go-ucanto/core/invocation" + "github.com/storacha/go-ucanto/core/ipld/block" + "github.com/storacha/go-ucanto/core/message" + "github.com/storacha/go-ucanto/transport" + "github.com/storacha/go-ucanto/transport/car" + "github.com/storacha/go-ucanto/ucan" ) type Connection interface { diff --git a/core/car/car.go b/core/car/car.go index 95911f4..7eeb06e 100644 --- a/core/car/car.go +++ b/core/car/car.go @@ -12,8 +12,8 @@ import ( "github.com/ipld/go-car/util" cidlink "github.com/ipld/go-ipld-prime/linking/cid" "github.com/multiformats/go-varint" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/ipld/block" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/ipld/block" ) // ContentType is the value the HTTP Content-Type header should have for CARs. diff --git a/core/car/car_test.go b/core/car/car_test.go index 080de0b..48c9c9e 100644 --- a/core/car/car_test.go +++ b/core/car/car_test.go @@ -8,7 +8,7 @@ import ( "github.com/ipfs/go-cid" cidlink "github.com/ipld/go-ipld-prime/linking/cid" - "github.com/storacha-network/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/ipld" ) type fixture struct { diff --git a/core/dag/blockstore/blockstore.go b/core/dag/blockstore/blockstore.go index b058356..6248cf9 100644 --- a/core/dag/blockstore/blockstore.go +++ b/core/dag/blockstore/blockstore.go @@ -5,7 +5,7 @@ import ( "iter" "sync" - "github.com/storacha-network/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/ipld" ) type BlockReader interface { diff --git a/core/delegation/datamodel/archive_test.go b/core/delegation/datamodel/archive_test.go index 1bfa868..c42035b 100644 --- a/core/delegation/datamodel/archive_test.go +++ b/core/delegation/datamodel/archive_test.go @@ -5,10 +5,10 @@ import ( "github.com/ipfs/go-cid" cidlink "github.com/ipld/go-ipld-prime/linking/cid" - adm "github.com/storacha-network/go-ucanto/core/delegation/datamodel" - "github.com/storacha-network/go-ucanto/core/ipld/block" - "github.com/storacha-network/go-ucanto/core/ipld/codec/cbor" - "github.com/storacha-network/go-ucanto/core/ipld/hash/sha256" + adm "github.com/storacha/go-ucanto/core/delegation/datamodel" + "github.com/storacha/go-ucanto/core/ipld/block" + "github.com/storacha/go-ucanto/core/ipld/codec/cbor" + "github.com/storacha/go-ucanto/core/ipld/hash/sha256" ) func TestEncodeDecode(t *testing.T) { diff --git a/core/delegation/delegate.go b/core/delegation/delegate.go index a4a7866..711a5c4 100644 --- a/core/delegation/delegate.go +++ b/core/delegation/delegate.go @@ -3,12 +3,12 @@ package delegation import ( "fmt" - "github.com/storacha-network/go-ucanto/core/dag/blockstore" - "github.com/storacha-network/go-ucanto/core/ipld/block" - "github.com/storacha-network/go-ucanto/core/ipld/codec/cbor" - "github.com/storacha-network/go-ucanto/core/ipld/hash/sha256" - "github.com/storacha-network/go-ucanto/ucan" - udm "github.com/storacha-network/go-ucanto/ucan/datamodel/ucan" + "github.com/storacha/go-ucanto/core/dag/blockstore" + "github.com/storacha/go-ucanto/core/ipld/block" + "github.com/storacha/go-ucanto/core/ipld/codec/cbor" + "github.com/storacha/go-ucanto/core/ipld/hash/sha256" + "github.com/storacha/go-ucanto/ucan" + udm "github.com/storacha/go-ucanto/ucan/datamodel/ucan" ) // Option is an option configuring a UCAN delegation. diff --git a/core/delegation/delegation.go b/core/delegation/delegation.go index 7a58e48..182b637 100644 --- a/core/delegation/delegation.go +++ b/core/delegation/delegation.go @@ -7,16 +7,16 @@ import ( "iter" "sync" - "github.com/storacha-network/go-ucanto/core/car" - "github.com/storacha-network/go-ucanto/core/dag/blockstore" - adm "github.com/storacha-network/go-ucanto/core/delegation/datamodel" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/ipld/block" - "github.com/storacha-network/go-ucanto/core/ipld/codec/cbor" - "github.com/storacha-network/go-ucanto/core/ipld/hash/sha256" - "github.com/storacha-network/go-ucanto/ucan" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" - udm "github.com/storacha-network/go-ucanto/ucan/datamodel/ucan" + "github.com/storacha/go-ucanto/core/car" + "github.com/storacha/go-ucanto/core/dag/blockstore" + adm "github.com/storacha/go-ucanto/core/delegation/datamodel" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/ipld/block" + "github.com/storacha/go-ucanto/core/ipld/codec/cbor" + "github.com/storacha/go-ucanto/core/ipld/hash/sha256" + "github.com/storacha/go-ucanto/ucan" + "github.com/storacha/go-ucanto/ucan/crypto/signature" + udm "github.com/storacha/go-ucanto/ucan/datamodel/ucan" ) // Delagation is a materialized view of a UCAN delegation, which can be encoded diff --git a/core/delegation/proofs.go b/core/delegation/proofs.go index 788b455..76b6bfc 100644 --- a/core/delegation/proofs.go +++ b/core/delegation/proofs.go @@ -1,9 +1,9 @@ package delegation import ( - "github.com/storacha-network/go-ucanto/core/dag/blockstore" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/ucan" + "github.com/storacha/go-ucanto/core/dag/blockstore" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/ucan" ) type Proof struct { diff --git a/core/invocation/invocation.go b/core/invocation/invocation.go index 5340709..ed37fb5 100644 --- a/core/invocation/invocation.go +++ b/core/invocation/invocation.go @@ -1,10 +1,10 @@ package invocation import ( - "github.com/storacha-network/go-ucanto/core/dag/blockstore" - "github.com/storacha-network/go-ucanto/core/delegation" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/ucan" + "github.com/storacha/go-ucanto/core/dag/blockstore" + "github.com/storacha/go-ucanto/core/delegation" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/ucan" ) // Invocation represents a UCAN that can be presented to a service provider to diff --git a/core/invocation/ran/ran.go b/core/invocation/ran/ran.go index d5e5631..a46bfe1 100644 --- a/core/invocation/ran/ran.go +++ b/core/invocation/ran/ran.go @@ -1,10 +1,10 @@ package ran import ( - "github.com/storacha-network/go-ucanto/core/dag/blockstore" - "github.com/storacha-network/go-ucanto/core/invocation" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/ucan" + "github.com/storacha/go-ucanto/core/dag/blockstore" + "github.com/storacha/go-ucanto/core/invocation" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/ucan" ) type Ran struct { diff --git a/core/ipld/block/block.go b/core/ipld/block/block.go index c32190b..3234c3e 100644 --- a/core/ipld/block/block.go +++ b/core/ipld/block/block.go @@ -8,8 +8,8 @@ import ( "github.com/ipld/go-ipld-prime" cidlink "github.com/ipld/go-ipld-prime/linking/cid" "github.com/ipld/go-ipld-prime/schema" - "github.com/storacha-network/go-ucanto/core/ipld/codec" - "github.com/storacha-network/go-ucanto/core/ipld/hash" + "github.com/storacha/go-ucanto/core/ipld/codec" + "github.com/storacha/go-ucanto/core/ipld/hash" ) type Block interface { diff --git a/core/ipld/hash/sha256/sha256.go b/core/ipld/hash/sha256/sha256.go index cbcf19a..11c93b2 100644 --- a/core/ipld/hash/sha256/sha256.go +++ b/core/ipld/hash/sha256/sha256.go @@ -4,7 +4,7 @@ import ( "crypto/sha256" "github.com/multiformats/go-multihash" - "github.com/storacha-network/go-ucanto/core/ipld/hash" + "github.com/storacha/go-ucanto/core/ipld/hash" ) // sha2-256 diff --git a/core/ipld/lib.go b/core/ipld/lib.go index 8d62df4..e04f88d 100644 --- a/core/ipld/lib.go +++ b/core/ipld/lib.go @@ -6,17 +6,17 @@ import ( "github.com/ipld/go-ipld-prime" "github.com/ipld/go-ipld-prime/node/bindnode" "github.com/ipld/go-ipld-prime/schema" - "github.com/storacha-network/go-ucanto/core/ipld/block" + "github.com/storacha/go-ucanto/core/ipld/block" ) type Link = ipld.Link type Block = block.Block type Node = ipld.Node -// Builder can be modeled as an IPLD data and provides a `Build` method to +// Builder can be modeled as an IPLD data and provides a `ToIPLD` method to // build itself into a `datamodel.Node`. type Builder interface { - Build() (Node, error) + ToIPLD() (Node, error) } // WrapWithRecovery behaves like bindnode.Wrap but converts panics into errors diff --git a/core/ipld/rebind_test.go b/core/ipld/rebind_test.go index 5f502b4..de02f0e 100644 --- a/core/ipld/rebind_test.go +++ b/core/ipld/rebind_test.go @@ -8,7 +8,7 @@ import ( "github.com/ipld/go-ipld-prime" "github.com/ipld/go-ipld-prime/datamodel" cidlink "github.com/ipld/go-ipld-prime/linking/cid" - "github.com/storacha-network/go-ucanto/core/ipld/codec/cbor" + "github.com/storacha/go-ucanto/core/ipld/codec/cbor" ) func TestRebind(t *testing.T) { diff --git a/core/message/datamodel/agentmessage_test.go b/core/message/datamodel/agentmessage_test.go index bfa898b..665e614 100644 --- a/core/message/datamodel/agentmessage_test.go +++ b/core/message/datamodel/agentmessage_test.go @@ -6,10 +6,10 @@ import ( "github.com/ipfs/go-cid" "github.com/ipld/go-ipld-prime" cidlink "github.com/ipld/go-ipld-prime/linking/cid" - "github.com/storacha-network/go-ucanto/core/ipld/block" - "github.com/storacha-network/go-ucanto/core/ipld/codec/cbor" - "github.com/storacha-network/go-ucanto/core/ipld/hash/sha256" - mdm "github.com/storacha-network/go-ucanto/core/message/datamodel" + "github.com/storacha/go-ucanto/core/ipld/block" + "github.com/storacha/go-ucanto/core/ipld/codec/cbor" + "github.com/storacha/go-ucanto/core/ipld/hash/sha256" + mdm "github.com/storacha/go-ucanto/core/message/datamodel" ) func TestEncodeDecode(t *testing.T) { diff --git a/core/message/message.go b/core/message/message.go index 74d0d2a..2167488 100644 --- a/core/message/message.go +++ b/core/message/message.go @@ -4,14 +4,14 @@ import ( "fmt" "iter" - "github.com/storacha-network/go-ucanto/core/dag/blockstore" - "github.com/storacha-network/go-ucanto/core/invocation" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/ipld/block" - "github.com/storacha-network/go-ucanto/core/ipld/codec/cbor" - "github.com/storacha-network/go-ucanto/core/ipld/hash/sha256" - mdm "github.com/storacha-network/go-ucanto/core/message/datamodel" - "github.com/storacha-network/go-ucanto/core/receipt" + "github.com/storacha/go-ucanto/core/dag/blockstore" + "github.com/storacha/go-ucanto/core/invocation" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/ipld/block" + "github.com/storacha/go-ucanto/core/ipld/codec/cbor" + "github.com/storacha/go-ucanto/core/ipld/hash/sha256" + mdm "github.com/storacha/go-ucanto/core/message/datamodel" + "github.com/storacha/go-ucanto/core/receipt" ) type AgentMessage interface { diff --git a/core/receipt/datamodel/receipt_test.go b/core/receipt/datamodel/receipt_test.go index 603a80f..9480a9b 100644 --- a/core/receipt/datamodel/receipt_test.go +++ b/core/receipt/datamodel/receipt_test.go @@ -5,10 +5,10 @@ import ( "github.com/ipfs/go-cid" cidlink "github.com/ipld/go-ipld-prime/linking/cid" - "github.com/storacha-network/go-ucanto/core/ipld/block" - "github.com/storacha-network/go-ucanto/core/ipld/codec/cbor" - "github.com/storacha-network/go-ucanto/core/ipld/hash/sha256" - rdm "github.com/storacha-network/go-ucanto/core/receipt/datamodel" + "github.com/storacha/go-ucanto/core/ipld/block" + "github.com/storacha/go-ucanto/core/ipld/codec/cbor" + "github.com/storacha/go-ucanto/core/ipld/hash/sha256" + rdm "github.com/storacha/go-ucanto/core/receipt/datamodel" ) type resultOk struct { diff --git a/core/receipt/receipt.go b/core/receipt/receipt.go index a4a95bf..836ff78 100644 --- a/core/receipt/receipt.go +++ b/core/receipt/receipt.go @@ -8,20 +8,20 @@ import ( "github.com/ipld/go-ipld-prime/datamodel" "github.com/ipld/go-ipld-prime/schema" - "github.com/storacha-network/go-ucanto/core/dag/blockstore" - "github.com/storacha-network/go-ucanto/core/delegation" - "github.com/storacha-network/go-ucanto/core/invocation" - "github.com/storacha-network/go-ucanto/core/invocation/ran" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/ipld/block" - "github.com/storacha-network/go-ucanto/core/ipld/codec/cbor" - "github.com/storacha-network/go-ucanto/core/ipld/hash/sha256" - "github.com/storacha-network/go-ucanto/core/iterable" - rdm "github.com/storacha-network/go-ucanto/core/receipt/datamodel" - "github.com/storacha-network/go-ucanto/core/result" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/ucan" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" + "github.com/storacha/go-ucanto/core/dag/blockstore" + "github.com/storacha/go-ucanto/core/delegation" + "github.com/storacha/go-ucanto/core/invocation" + "github.com/storacha/go-ucanto/core/invocation/ran" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/ipld/block" + "github.com/storacha/go-ucanto/core/ipld/codec/cbor" + "github.com/storacha/go-ucanto/core/ipld/hash/sha256" + "github.com/storacha/go-ucanto/core/iterable" + rdm "github.com/storacha/go-ucanto/core/receipt/datamodel" + "github.com/storacha/go-ucanto/core/result" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/ucan" + "github.com/storacha/go-ucanto/ucan/crypto/signature" ) type Effects interface { @@ -281,9 +281,9 @@ func Issue[O, X ipld.Builder](issuer ucan.Signer, out result.Result[O, X], ran r } nodeResult, err := result.MapResultR1(out, func(b O) (ipld.Node, error) { - return b.Build() + return b.ToIPLD() }, func(b X) (ipld.Node, error) { - return b.Build() + return b.ToIPLD() }) if err != nil { return nil, err diff --git a/core/result/failure/datamodel/failure.go b/core/result/failure/datamodel/failure.go index 7c18e56..613983c 100644 --- a/core/result/failure/datamodel/failure.go +++ b/core/result/failure/datamodel/failure.go @@ -7,7 +7,7 @@ import ( "github.com/ipld/go-ipld-prime" "github.com/ipld/go-ipld-prime/schema" - ucanipld "github.com/storacha-network/go-ucanto/core/ipld" + ucanipld "github.com/storacha/go-ucanto/core/ipld" ) //go:embed failure.ipldsch @@ -20,7 +20,7 @@ type FailureModel struct { Stack *string } -func (f *FailureModel) Build() (ipld.Node, error) { +func (f *FailureModel) ToIPLD() (ipld.Node, error) { return ucanipld.WrapWithRecovery(f, typ) } diff --git a/core/result/failure/faillure.go b/core/result/failure/faillure.go index b999973..4472995 100644 --- a/core/result/failure/faillure.go +++ b/core/result/failure/faillure.go @@ -5,8 +5,8 @@ import ( "runtime" "github.com/pkg/errors" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/result/failure/datamodel" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/result/failure/datamodel" ) // Named is an error that you can read a name from @@ -68,8 +68,8 @@ func NamedWithCurrentStackTrace(name string) NamedWithStackTrace { } type failure struct { - model datamodel.FailureModel - build func() (ipld.Node, error) + model datamodel.FailureModel + toIPLD func() (ipld.Node, error) } func (f failure) Name() string { @@ -88,11 +88,11 @@ func (f failure) Stack() string { return *f.model.Stack } -func (f failure) Build() (ipld.Node, error) { - if f.build != nil { - return f.build() +func (f failure) ToIPLD() (ipld.Node, error) { + if f.toIPLD != nil { + return f.toIPLD() } - return f.model.Build() + return f.model.ToIPLD() } func FromError(err error) IPLDBuilderFailure { @@ -107,7 +107,7 @@ func FromError(err error) IPLDBuilderFailure { } fail := failure{model: model} if builder, ok := err.(ipld.Builder); ok { - fail.build = builder.Build + fail.toIPLD = builder.ToIPLD } return fail } diff --git a/core/result/result.go b/core/result/result.go index 829becd..8d9e96f 100644 --- a/core/result/result.go +++ b/core/result/result.go @@ -1,9 +1,9 @@ package result import ( - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/result/failure" - "github.com/storacha-network/go-ucanto/core/result/failure/datamodel" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/core/result/failure/datamodel" ) // Result is a golang compatible generic result type diff --git a/core/result/result_test.go b/core/result/result_test.go index 964f746..b23c874 100644 --- a/core/result/result_test.go +++ b/core/result/result_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/storacha-network/go-ucanto/core/result" + "github.com/storacha/go-ucanto/core/result" "github.com/stretchr/testify/require" ) diff --git a/core/schema/did.go b/core/schema/did.go index 1a6c03e..a2547fd 100644 --- a/core/schema/did.go +++ b/core/schema/did.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/storacha-network/go-ucanto/core/result/failure" - "github.com/storacha-network/go-ucanto/did" + "github.com/storacha/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/did" ) type didConfig struct { diff --git a/core/schema/did_test.go b/core/schema/did_test.go index 54cdae6..b3c40b0 100644 --- a/core/schema/did_test.go +++ b/core/schema/did_test.go @@ -3,7 +3,7 @@ package schema import ( "testing" - "github.com/storacha-network/go-ucanto/did" + "github.com/storacha/go-ucanto/did" "github.com/stretchr/testify/require" ) diff --git a/core/schema/link.go b/core/schema/link.go index 8d84437..69b87d2 100644 --- a/core/schema/link.go +++ b/core/schema/link.go @@ -7,8 +7,8 @@ import ( cidlink "github.com/ipld/go-ipld-prime/linking/cid" "github.com/multiformats/go-base32" mh "github.com/multiformats/go-multihash" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/result/failure" ) type linkReader struct { @@ -22,7 +22,7 @@ func (lr linkReader) Read(input any) (ipld.Link, failure.Failure) { if !asNode { // If input is not an IPLD node, can it be converted to one? if builder, ok := input.(ipld.Builder); ok { - n, err := builder.Build() + n, err := builder.ToIPLD() if err != nil { return nil, NewSchemaError(err.Error()) } diff --git a/core/schema/link_test.go b/core/schema/link_test.go index e9ad3b5..7904349 100644 --- a/core/schema/link_test.go +++ b/core/schema/link_test.go @@ -12,9 +12,9 @@ import ( basicnode "github.com/ipld/go-ipld-prime/node/basic" "github.com/multiformats/go-base32" mh "github.com/multiformats/go-multihash" - "github.com/storacha-network/go-ucanto/core/iterable" - "github.com/storacha-network/go-ucanto/core/schema" - "github.com/storacha-network/go-ucanto/testing/helpers" + "github.com/storacha/go-ucanto/core/iterable" + "github.com/storacha/go-ucanto/core/schema" + "github.com/storacha/go-ucanto/testing/helpers" "github.com/stretchr/testify/require" ) diff --git a/core/schema/literal.go b/core/schema/literal.go index a63fdf0..69ecbff 100644 --- a/core/schema/literal.go +++ b/core/schema/literal.go @@ -3,7 +3,7 @@ package schema import ( "fmt" - "github.com/storacha-network/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/core/result/failure" ) func Literal(expected string) Reader[string, string] { diff --git a/core/schema/mapped.go b/core/schema/mapped.go index abdff7a..2df504e 100644 --- a/core/schema/mapped.go +++ b/core/schema/mapped.go @@ -1,6 +1,6 @@ package schema -import "github.com/storacha-network/go-ucanto/core/result/failure" +import "github.com/storacha/go-ucanto/core/result/failure" type mapped[I, O, O2 any] struct { reader Reader[I, O] diff --git a/core/schema/mapped_test.go b/core/schema/mapped_test.go index 153dff1..5e5d866 100644 --- a/core/schema/mapped_test.go +++ b/core/schema/mapped_test.go @@ -7,9 +7,9 @@ import ( "github.com/ipld/go-ipld-prime" "github.com/ipld/go-ipld-prime/node/basicnode" - "github.com/storacha-network/go-ucanto/core/result/failure" - "github.com/storacha-network/go-ucanto/core/schema" - "github.com/storacha-network/go-ucanto/testing/helpers" + "github.com/storacha/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/core/schema" + "github.com/storacha/go-ucanto/testing/helpers" "github.com/stretchr/testify/require" ) diff --git a/core/schema/or.go b/core/schema/or.go index 8d837dd..a638baf 100644 --- a/core/schema/or.go +++ b/core/schema/or.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/storacha-network/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/core/result/failure" ) type unionError struct { diff --git a/core/schema/schema.go b/core/schema/schema.go index 8eb5cbc..088ba0a 100644 --- a/core/schema/schema.go +++ b/core/schema/schema.go @@ -2,8 +2,8 @@ package schema import ( "github.com/ipld/go-ipld-prime/node/basicnode" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/result/failure" ) type Reader[I, O any] interface { @@ -30,7 +30,7 @@ func (se schemaerr) Error() string { return se.message } -func (se schemaerr) Build() (ipld.Node, error) { +func (se schemaerr) ToIPLD() (ipld.Node, error) { np := basicnode.Prototype.Any nb := np.NewBuilder() ma, err := nb.BeginMap(2) diff --git a/core/schema/struct.go b/core/schema/struct.go index 69b99e2..0e6347c 100644 --- a/core/schema/struct.go +++ b/core/schema/struct.go @@ -2,8 +2,8 @@ package schema import ( "github.com/ipld/go-ipld-prime/schema" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/result/failure" "github.com/ucan-wg/go-ucan/capability/policy" ) @@ -18,7 +18,7 @@ func (s strukt[T]) Read(input any) (T, failure.Failure) { if !ok { // If input is not an IPLD node, can it be converted to one? if builder, ok := input.(ipld.Builder); ok { - n, err := builder.Build() + n, err := builder.ToIPLD() if err != nil { return bind, NewSchemaError(err.Error()) } diff --git a/core/schema/struct_test.go b/core/schema/struct_test.go index 614da3f..7049897 100644 --- a/core/schema/struct_test.go +++ b/core/schema/struct_test.go @@ -6,7 +6,7 @@ import ( "github.com/ipld/go-ipld-prime" "github.com/ipld/go-ipld-prime/node/basicnode" - "github.com/storacha-network/go-ucanto/testing/helpers" + "github.com/storacha/go-ucanto/testing/helpers" "github.com/stretchr/testify/require" ) diff --git a/core/schema/uri.go b/core/schema/uri.go index ed65e40..67c686d 100644 --- a/core/schema/uri.go +++ b/core/schema/uri.go @@ -4,7 +4,7 @@ import ( "fmt" "net/url" - "github.com/storacha-network/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/core/result/failure" ) type uriConfig struct { diff --git a/core/schema/uri_test.go b/core/schema/uri_test.go index 35407ee..63a4818 100644 --- a/core/schema/uri_test.go +++ b/core/schema/uri_test.go @@ -5,7 +5,7 @@ import ( "regexp" "testing" - "github.com/storacha-network/go-ucanto/core/schema" + "github.com/storacha/go-ucanto/core/schema" "github.com/stretchr/testify/require" ) diff --git a/go.mod b/go.mod index 989d9d9..5f87126 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/storacha-network/go-ucanto +module github.com/storacha/go-ucanto go 1.23 @@ -7,6 +7,7 @@ require ( github.com/ipfs/go-ipld-cbor v0.1.0 github.com/ipld/go-car v0.6.2 github.com/ipld/go-ipld-prime v0.21.0 + github.com/multiformats/go-base32 v0.1.0 github.com/multiformats/go-multibase v0.2.0 github.com/multiformats/go-multihash v0.2.3 github.com/multiformats/go-varint v0.0.7 @@ -24,60 +25,85 @@ require ( github.com/pion/datachannel v1.5.9 // indirect github.com/pion/logging v0.2.2 // indirect github.com/pion/sctp v1.8.33 // indirect - github.com/pion/webrtc/v3 v3.3.2 // indirect - github.com/prometheus/client_golang v1.20.3 // indirect + github.com/pion/webrtc/v3 v3.3.3 // indirect + github.com/prometheus/client_golang v1.20.4 // indirect github.com/quic-go/quic-go v0.47.0 // indirect github.com/quic-go/webtransport-go v0.8.0 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect - golang.org/x/net v0.28.0 // indirect + golang.org/x/net v0.29.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) require ( github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/uuid v1.3.1 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/google/pprof v0.0.0-20230821062121-407c9e7a662f // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/ipfs/bbloom v0.0.4 // indirect github.com/ipfs/go-block-format v0.2.0 // indirect - github.com/ipfs/go-blockservice v0.5.0 // indirect + github.com/ipfs/go-blockservice v0.5.2 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect - github.com/ipfs/go-ipfs-blockstore v1.2.0 // indirect - github.com/ipfs/go-ipfs-ds-help v1.1.0 // indirect - github.com/ipfs/go-ipfs-exchange-interface v0.2.0 // indirect - github.com/ipfs/go-ipfs-util v0.0.2 // indirect - github.com/ipfs/go-ipld-format v0.5.0 // indirect + github.com/ipfs/go-ipfs-blockstore v1.3.1 // indirect + github.com/ipfs/go-ipfs-ds-help v1.1.1 // indirect + github.com/ipfs/go-ipfs-exchange-interface v0.2.1 // indirect + github.com/ipfs/go-ipfs-util v0.0.3 // indirect + github.com/ipfs/go-ipld-format v0.6.0 // indirect github.com/ipfs/go-ipld-legacy v0.2.1 // indirect github.com/ipfs/go-log v1.0.5 // indirect github.com/ipfs/go-log/v2 v2.5.1 // indirect github.com/ipfs/go-merkledag v0.11.0 // indirect github.com/ipfs/go-metrics-interface v0.0.1 // indirect - github.com/ipfs/go-verifcid v0.0.2 // indirect + github.com/ipfs/go-verifcid v0.0.3 // indirect github.com/ipld/go-codec-dagpb v1.6.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect - github.com/mattn/go-isatty v0.0.17 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mr-tron/base58 v1.2.0 // indirect - github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.2.0 // indirect + github.com/onsi/ginkgo/v2 v2.12.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pion/dtls/v2 v2.2.12 // indirect + github.com/pion/ice/v2 v2.3.35 // indirect + github.com/pion/interceptor v0.1.29 // indirect + github.com/pion/mdns v0.0.12 // indirect + github.com/pion/randutil v0.1.0 // indirect + github.com/pion/rtcp v1.2.14 // indirect + github.com/pion/rtp v1.8.7 // indirect + github.com/pion/sdp/v3 v3.0.9 // indirect + github.com/pion/srtp/v2 v2.0.20 // indirect + github.com/pion/stun v0.6.1 // indirect + github.com/pion/transport/v2 v2.2.10 // indirect + github.com/pion/turn/v2 v2.1.6 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/polydawn/refmt v0.89.0 // indirect + github.com/quic-go/qpack v0.5.1 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/whyrusleeping/cbor-gen v0.0.0-20230818171029-f91ae536ca25 // indirect - go.opentelemetry.io/otel v1.13.0 // indirect - go.opentelemetry.io/otel/trace v1.13.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.9.0 // indirect - go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.26.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + github.com/whyrusleeping/cbor-gen v0.1.2 // indirect + github.com/wlynxg/anet v0.0.3 // indirect + go.opentelemetry.io/otel v1.30.0 // indirect + go.opentelemetry.io/otel/metric v1.30.0 // indirect + go.opentelemetry.io/otel/trace v1.30.0 // indirect + go.uber.org/atomic v1.11.0 // indirect + go.uber.org/mock v0.4.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.27.0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/text v0.18.0 // indirect + golang.org/x/tools v0.25.0 // indirect + golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.3.0 // indirect diff --git a/go.sum b/go.sum index 75ac23c..f66b0f1 100644 --- a/go.sum +++ b/go.sum @@ -7,6 +7,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -25,6 +26,8 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= @@ -46,12 +49,16 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= @@ -64,6 +71,8 @@ github.com/ipfs/go-block-format v0.2.0 h1:ZqrkxBA2ICbDRbK8KJs/u0O3dlp6gmAuuXUJNi github.com/ipfs/go-block-format v0.2.0/go.mod h1:+jpL11nFx5A/SPpsoBn6Bzkra/zaArfSmsknbPMYgzM= github.com/ipfs/go-blockservice v0.5.0 h1:B2mwhhhVQl2ntW2EIpaWPwSCxSuqr5fFA93Ms4bYLEY= github.com/ipfs/go-blockservice v0.5.0/go.mod h1:W6brZ5k20AehbmERplmERn8o2Ni3ZZubvAxaIUeaT6w= +github.com/ipfs/go-blockservice v0.5.2 h1:in9Bc+QcXwd1apOVM7Un9t8tixPKdaHQFdLSUM1Xgk8= +github.com/ipfs/go-blockservice v0.5.2/go.mod h1:VpMblFEqG67A/H2sHKAemeH9vlURVavlysbdUI632yk= github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= @@ -78,6 +87,8 @@ github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ipfs-blockstore v1.2.0 h1:n3WTeJ4LdICWs/0VSfjHrlqpPpl6MZ+ySd3j8qz0ykw= github.com/ipfs/go-ipfs-blockstore v1.2.0/go.mod h1:eh8eTFLiINYNSNawfZOC7HOxNTxpB1PFuA5E1m/7exE= +github.com/ipfs/go-ipfs-blockstore v1.3.1 h1:cEI9ci7V0sRNivqaOr0elDsamxXFxJMMMy7PTTDQNsQ= +github.com/ipfs/go-ipfs-blockstore v1.3.1/go.mod h1:KgtZyc9fq+P2xJUiCAzbRdhhqJHvsw8u2Dlqy2MyRTE= github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ= github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= @@ -85,8 +96,12 @@ github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1I github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-ds-help v1.1.0 h1:yLE2w9RAsl31LtfMt91tRZcrx+e61O5mDxFRR994w4Q= github.com/ipfs/go-ipfs-ds-help v1.1.0/go.mod h1:YR5+6EaebOhfcqVCyqemItCLthrpVNot+rsOU/5IatU= +github.com/ipfs/go-ipfs-ds-help v1.1.1 h1:B5UJOH52IbcfS56+Ul+sv8jnIV10lbjLF5eOO0C66Nw= +github.com/ipfs/go-ipfs-ds-help v1.1.1/go.mod h1:75vrVCkSdSFidJscs8n4W+77AtTpCIAdDGAwjitJMIo= github.com/ipfs/go-ipfs-exchange-interface v0.2.0 h1:8lMSJmKogZYNo2jjhUs0izT+dck05pqUw4mWNW9Pw6Y= github.com/ipfs/go-ipfs-exchange-interface v0.2.0/go.mod h1:z6+RhJuDQbqKguVyslSOuVDhqF9JtTrO3eptSAiW2/Y= +github.com/ipfs/go-ipfs-exchange-interface v0.2.1 h1:jMzo2VhLKSHbVe+mHNzYgs95n0+t0Q69GQ5WhRDZV/s= +github.com/ipfs/go-ipfs-exchange-interface v0.2.1/go.mod h1:MUsYn6rKbG6CTtsDp+lKJPmVt3ZrCViNyH3rfPGsZ2E= github.com/ipfs/go-ipfs-exchange-offline v0.3.0 h1:c/Dg8GDPzixGd0MC8Jh6mjOwU57uYokgWRFidfvEkuA= github.com/ipfs/go-ipfs-exchange-offline v0.3.0/go.mod h1:MOdJ9DChbb5u37M1IcbrRB02e++Z7521fMxqCNRrz9s= github.com/ipfs/go-ipfs-pq v0.0.2 h1:e1vOOW6MuOwG2lqxcLA+wEn93i/9laCY8sXAw76jFOY= @@ -96,11 +111,15 @@ github.com/ipfs/go-ipfs-routing v0.3.0/go.mod h1:dKqtTFIql7e1zYsEuWLyuOU+E0WJWW8 github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= +github.com/ipfs/go-ipfs-util v0.0.3 h1:2RFdGez6bu2ZlZdI+rWfIdbQb1KudQp3VGwPtdNCmE0= +github.com/ipfs/go-ipfs-util v0.0.3/go.mod h1:LHzG1a0Ig4G+iZ26UUOMjHd+lfM84LZCrn17xAKWBvs= github.com/ipfs/go-ipld-cbor v0.1.0 h1:dx0nS0kILVivGhfWuB6dUpMa/LAwElHPw1yOGYopoYs= github.com/ipfs/go-ipld-cbor v0.1.0/go.mod h1:U2aYlmVrJr2wsUBU67K4KgepApSZddGRDWBYR0H4sCk= github.com/ipfs/go-ipld-format v0.3.0/go.mod h1:co/SdBE8h99968X0hViiw1MNlh6fvxxnHpvVLnH7jSM= github.com/ipfs/go-ipld-format v0.5.0 h1:WyEle9K96MSrvr47zZHKKcDxJ/vlpET6PSiQsAFO+Ds= github.com/ipfs/go-ipld-format v0.5.0/go.mod h1:ImdZqJQaEouMjCvqCe0ORUS+uoBmf7Hf+EO/jh+nk3M= +github.com/ipfs/go-ipld-format v0.6.0 h1:VEJlA2kQ3LqFSIm5Vu6eIlSxD/Ze90xtc4Meten1F5U= +github.com/ipfs/go-ipld-format v0.6.0/go.mod h1:g4QVMTn3marU3qXchwjpKPKgJv+zF+OlaKMyhJ4LHPg= github.com/ipfs/go-ipld-legacy v0.2.1 h1:mDFtrBpmU7b//LzLSypVrXsD8QxkEWxu5qVxN99/+tk= github.com/ipfs/go-ipld-legacy v0.2.1/go.mod h1:782MOUghNzMO2DER0FlBR94mllfdCJCkTtDtPM51otM= github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= @@ -117,6 +136,8 @@ github.com/ipfs/go-peertaskqueue v0.8.0 h1:JyNO144tfu9bx6Hpo119zvbEL9iQ760FHOiJY github.com/ipfs/go-peertaskqueue v0.8.0/go.mod h1:cz8hEnnARq4Du5TGqiWKgMr/BOSQ5XOgMOh1K5YYKKM= github.com/ipfs/go-verifcid v0.0.2 h1:XPnUv0XmdH+ZIhLGKg6U2vaPaRDXb9urMyNVCE7uvTs= github.com/ipfs/go-verifcid v0.0.2/go.mod h1:40cD9x1y4OWnFXbLNJYRe7MpNvWlMn3LZAG5Wb4xnPU= +github.com/ipfs/go-verifcid v0.0.3 h1:gmRKccqhWDocCRkC+a59g5QW7uJw5bpX9HWBevXa0zs= +github.com/ipfs/go-verifcid v0.0.3/go.mod h1:gcCtGniVzelKrbk9ooUSX/pM3xlH73fZZJDzQJRvOUw= github.com/ipld/go-car v0.6.2 h1:Hlnl3Awgnq8icK+ze3iRghk805lu8YNq3wlREDTF2qc= github.com/ipld/go-car v0.6.2/go.mod h1:oEGXdwp6bmxJCZ+rARSkDliTeYnVzv3++eXajZ+Bmr8= github.com/ipld/go-codec-dagpb v1.6.0 h1:9nYazfyu9B1p3NAgfVdpRco3Fs2nFC72DqVsMj6rOcc= @@ -173,6 +194,8 @@ github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= @@ -222,10 +245,13 @@ github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pion/datachannel v1.5.9 h1:LpIWAOYPyDrXtU+BW7X0Yt/vGtYxtXQ8ql7dFfYUVZA= github.com/pion/datachannel v1.5.9/go.mod h1:kDUuk4CU4Uxp82NH4LQZbISULkX/HtzKa4P7ldf9izE= +github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= github.com/pion/dtls/v2 v2.2.12 h1:KP7H5/c1EiVAAKUmXyCzPiQe5+bCJrpOeKg/L05dunk= github.com/pion/dtls/v2 v2.2.12/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE= github.com/pion/ice/v2 v2.3.34 h1:Ic1ppYCj4tUOcPAp76U6F3fVrlSw8A9JtRXLqw6BbUM= github.com/pion/ice/v2 v2.3.34/go.mod h1:mBF7lnigdqgtB+YHkaY/Y6s6tsyRyo4u4rPGRuOjUBQ= +github.com/pion/ice/v2 v2.3.35 h1:KrmahHoP3VXv40Sd12usQzjKKFNFY0pidsRup7It+RI= +github.com/pion/ice/v2 v2.3.35/go.mod h1:mBF7lnigdqgtB+YHkaY/Y6s6tsyRyo4u4rPGRuOjUBQ= github.com/pion/interceptor v0.1.29 h1:39fsnlP1U8gw2JzOFWdfCU82vHvhW9o0rZnZF56wF+M= github.com/pion/interceptor v0.1.29/go.mod h1:ri+LGNjRUc5xUNtDEPzfdkmSqISixVTBF/z/Zms/6T4= github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= @@ -234,8 +260,10 @@ github.com/pion/mdns v0.0.12 h1:CiMYlY+O0azojWDmxdNr7ADGrnZ+V6Ilfner+6mSVK8= github.com/pion/mdns v0.0.12/go.mod h1:VExJjv8to/6Wqm1FXK+Ii/Z9tsVk/F5sD/N70cnYFbk= github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA= github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= +github.com/pion/rtcp v1.2.12/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= github.com/pion/rtcp v1.2.14 h1:KCkGV3vJ+4DAJmvP0vaQShsb0xkRfWkO540Gy102KyE= github.com/pion/rtcp v1.2.14/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= +github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= github.com/pion/rtp v1.8.7 h1:qslKkG8qxvQ7hqaxkmL7Pl0XcUm+/Er7nMnu6Vq+ZxM= github.com/pion/rtp v1.8.7/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= github.com/pion/sctp v1.8.33 h1:dSE4wX6uTJBcNm8+YlMg7lw1wqyKHggsP5uKbdj+NZw= @@ -246,12 +274,20 @@ github.com/pion/srtp/v2 v2.0.20 h1:HNNny4s+OUmG280ETrCdgFndp4ufx3/uy85EawYEhTk= github.com/pion/srtp/v2 v2.0.20/go.mod h1:0KJQjA99A6/a0DOVTu1PhDSw0CXF2jTkqOoMg3ODqdA= github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4= github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8= +github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= +github.com/pion/transport/v2 v2.2.3/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= +github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= github.com/pion/transport/v2 v2.2.10 h1:ucLBLE8nuxiHfvkFKnkDQRYWYfp8ejf4YBOPfaQpw6Q= github.com/pion/transport/v2 v2.2.10/go.mod h1:sq1kSLWs+cHW9E+2fJP95QudkzbK7wscs8yYgQToO5E= +github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= +github.com/pion/turn/v2 v2.1.3/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= github.com/pion/turn/v2 v2.1.6 h1:Xr2niVsiPTB0FPtt+yAWKFUkU1eotQbGgpTIld4x1Gc= github.com/pion/turn/v2 v2.1.6/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= github.com/pion/webrtc/v3 v3.3.2 h1:9Cjt3n90UVG1am1JZ3I7qdIosc7F2rVBeJdhlfqn9R4= github.com/pion/webrtc/v3 v3.3.2/go.mod h1:hVmrDJvwhEertRWObeb1xzulzHGeVUoPlWvxdGzcfU0= +github.com/pion/webrtc/v3 v3.3.3 h1:Qnh7O8CGvYfxjSZK10N0eFy8u5tzfwaNnEL0ltc/ZcU= +github.com/pion/webrtc/v3 v3.3.3/go.mod h1:9ssmnlmII7ZZtExYe7QXwh1xl6SiynZ9O4ABq+7YXwk= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -261,6 +297,8 @@ github.com/polydawn/refmt v0.89.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4 github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw= github.com/prometheus/client_golang v1.20.3 h1:oPksm4K8B+Vt35tUhw6GbSNSgVlVSBH0qELP/7u83l4= github.com/prometheus/client_golang v1.20.3/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= @@ -274,8 +312,11 @@ github.com/quic-go/quic-go v0.47.0/go.mod h1:3bCapYsJvXGZcipOHuu7plYtaV6tnF+z7wI github.com/quic-go/webtransport-go v0.8.0 h1:HxSrwun11U+LlmwpgM1kEqIqH90IT4N8auv/cD7QFJg= github.com/quic-go/webtransport-go v0.8.0/go.mod h1:N99tjprW432Ut5ONql/aUhSLT0YVSlwHohQsuac9WaM= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs= @@ -285,9 +326,17 @@ github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3 github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ucan-wg/go-ucan v0.0.0-20240916120445-37f52863156c h1:A1pMNIlHPnJ6KROqNc6SKg7QlSiQA6umiEoy89Os4cM= @@ -299,34 +348,50 @@ github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSD github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/whyrusleeping/cbor-gen v0.0.0-20230818171029-f91ae536ca25 h1:yVYDLoN2gmB3OdBXFW8e1UwgVbmCvNlnAKhvHPaNARI= github.com/whyrusleeping/cbor-gen v0.0.0-20230818171029-f91ae536ca25/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.1.2 h1:WQFlrPhpcQl+M2/3dP5cvlTLWPVsL6LGBb9jJt6l/cA= +github.com/whyrusleeping/cbor-gen v0.1.2/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so= github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= github.com/wlynxg/anet v0.0.3 h1:PvR53psxFXstc12jelG6f1Lv4MWqE0tI76/hHGjh9rg= github.com/wlynxg/anet v0.0.3/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y= go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= +go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY= go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds= +go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= +go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -335,8 +400,14 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -344,6 +415,8 @@ golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKG golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -354,12 +427,22 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -371,16 +454,40 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -392,6 +499,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -400,6 +509,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/principal/absentee/absentee.go b/principal/absentee/absentee.go index 7b030cc..9d8b0b6 100644 --- a/principal/absentee/absentee.go +++ b/principal/absentee/absentee.go @@ -1,9 +1,9 @@ package absentee import ( - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/ucan" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/ucan" + "github.com/storacha/go-ucanto/ucan/crypto/signature" ) type absentee struct { diff --git a/principal/absentee/absentee_test.go b/principal/absentee/absentee_test.go index dd40dfa..2bf331c 100644 --- a/principal/absentee/absentee_test.go +++ b/principal/absentee/absentee_test.go @@ -3,8 +3,8 @@ package absentee import ( "testing" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/ucan/crypto/signature" "github.com/stretchr/testify/require" ) diff --git a/principal/ed25519/signer/signer.go b/principal/ed25519/signer/signer.go index c5fd065..dbea234 100644 --- a/principal/ed25519/signer/signer.go +++ b/principal/ed25519/signer/signer.go @@ -8,10 +8,10 @@ import ( "github.com/multiformats/go-multibase" "github.com/multiformats/go-varint" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/principal" - "github.com/storacha-network/go-ucanto/principal/ed25519/verifier" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/principal" + "github.com/storacha/go-ucanto/principal/ed25519/verifier" + "github.com/storacha/go-ucanto/ucan/crypto/signature" ) const Code = 0x1300 diff --git a/principal/ed25519/verifier/verifier.go b/principal/ed25519/verifier/verifier.go index 69f4aed..19e825d 100644 --- a/principal/ed25519/verifier/verifier.go +++ b/principal/ed25519/verifier/verifier.go @@ -6,9 +6,9 @@ import ( "fmt" "github.com/multiformats/go-varint" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/principal" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/principal" + "github.com/storacha/go-ucanto/ucan/crypto/signature" ) const Code = 0xed diff --git a/principal/lib.go b/principal/lib.go index 0b0d19e..054e74e 100644 --- a/principal/lib.go +++ b/principal/lib.go @@ -1,7 +1,7 @@ package principal import ( - "github.com/storacha-network/go-ucanto/ucan" + "github.com/storacha/go-ucanto/ucan" ) // Signer is the principal that can issue UCANs (and sign payloads). While it's diff --git a/principal/multiformat/multiformat_test.go b/principal/multiformat/multiformat_test.go index 9b78c71..186c346 100644 --- a/principal/multiformat/multiformat_test.go +++ b/principal/multiformat/multiformat_test.go @@ -3,7 +3,7 @@ package multiformat import ( "testing" - "github.com/storacha-network/go-ucanto/testing/helpers" + "github.com/storacha/go-ucanto/testing/helpers" "github.com/stretchr/testify/require" ) diff --git a/principal/rsa/signer/signer.go b/principal/rsa/signer/signer.go index 0ff99af..61c05bc 100644 --- a/principal/rsa/signer/signer.go +++ b/principal/rsa/signer/signer.go @@ -9,11 +9,11 @@ import ( "fmt" "github.com/multiformats/go-multibase" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/principal" - "github.com/storacha-network/go-ucanto/principal/multiformat" - "github.com/storacha-network/go-ucanto/principal/rsa/verifier" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/principal" + "github.com/storacha/go-ucanto/principal/multiformat" + "github.com/storacha/go-ucanto/principal/rsa/verifier" + "github.com/storacha/go-ucanto/ucan/crypto/signature" ) const Code = 0x1300 diff --git a/principal/rsa/signer/signer_test.go b/principal/rsa/signer/signer_test.go index 4578f4a..c3f8b70 100644 --- a/principal/rsa/signer/signer_test.go +++ b/principal/rsa/signer/signer_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/storacha-network/go-ucanto/testing/helpers" + "github.com/storacha/go-ucanto/testing/helpers" "github.com/stretchr/testify/require" ) diff --git a/principal/rsa/verifier/verifier.go b/principal/rsa/verifier/verifier.go index 3413675..cec6680 100644 --- a/principal/rsa/verifier/verifier.go +++ b/principal/rsa/verifier/verifier.go @@ -7,10 +7,10 @@ import ( "crypto/x509" "fmt" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/principal" - "github.com/storacha-network/go-ucanto/principal/multiformat" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/principal" + "github.com/storacha/go-ucanto/principal/multiformat" + "github.com/storacha/go-ucanto/ucan/crypto/signature" ) const Code = 0x1205 diff --git a/principal/signer/signer.go b/principal/signer/signer.go index 7b1f2c7..d6419ec 100644 --- a/principal/signer/signer.go +++ b/principal/signer/signer.go @@ -4,10 +4,10 @@ import ( "fmt" "strings" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/principal" - "github.com/storacha-network/go-ucanto/principal/verifier" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/principal" + "github.com/storacha/go-ucanto/principal/verifier" + "github.com/storacha/go-ucanto/ucan/crypto/signature" ) type Unwrapper interface { diff --git a/principal/verifier/verifier.go b/principal/verifier/verifier.go index 41beeeb..b2614e8 100644 --- a/principal/verifier/verifier.go +++ b/principal/verifier/verifier.go @@ -4,9 +4,9 @@ import ( "fmt" "strings" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/principal" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/principal" + "github.com/storacha/go-ucanto/ucan/crypto/signature" ) type Unwrapper interface { diff --git a/server/error.go b/server/error.go index 1f01c49..8b4d0df 100644 --- a/server/error.go +++ b/server/error.go @@ -3,10 +3,10 @@ package server import ( "fmt" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/result/failure" - sdm "github.com/storacha-network/go-ucanto/server/datamodel" - "github.com/storacha-network/go-ucanto/ucan" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/result/failure" + sdm "github.com/storacha/go-ucanto/server/datamodel" + "github.com/storacha/go-ucanto/ucan" ) type HandlerNotFoundError[Caveats any] interface { @@ -30,7 +30,7 @@ func (h handlerNotFoundError[C]) Name() string { return "HandlerNotFoundError" } -func (h handlerNotFoundError[C]) Build() (ipld.Node, error) { +func (h handlerNotFoundError[C]) ToIPLD() (ipld.Node, error) { name := h.Name() mdl := sdm.HandlerNotFoundErrorModel{ @@ -85,7 +85,7 @@ func (h handlerExecutionError[C]) Stack() string { return stack } -func (h handlerExecutionError[C]) Build() (ipld.Node, error) { +func (h handlerExecutionError[C]) ToIPLD() (ipld.Node, error) { name := h.Name() stack := h.Stack() @@ -142,7 +142,7 @@ func (i invocationCapabilityError) Name() string { return "InvocationCapabilityError" } -func (i invocationCapabilityError) Build() (ipld.Node, error) { +func (i invocationCapabilityError) ToIPLD() (ipld.Node, error) { name := i.Name() var capmdls []sdm.CapabilityModel for _, cap := range i.Capabilities() { diff --git a/server/handler.go b/server/handler.go index 821bee9..9b85a56 100644 --- a/server/handler.go +++ b/server/handler.go @@ -1,14 +1,14 @@ package server import ( - "github.com/storacha-network/go-ucanto/core/invocation" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/receipt" - "github.com/storacha-network/go-ucanto/core/result" - "github.com/storacha-network/go-ucanto/core/result/failure" - "github.com/storacha-network/go-ucanto/server/transaction" - "github.com/storacha-network/go-ucanto/ucan" - "github.com/storacha-network/go-ucanto/validator" + "github.com/storacha/go-ucanto/core/invocation" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/receipt" + "github.com/storacha/go-ucanto/core/result" + "github.com/storacha/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/server/transaction" + "github.com/storacha/go-ucanto/ucan" + "github.com/storacha/go-ucanto/validator" ) type HandlerFunc[C any, O ipld.Builder] func(capability ucan.Capability[C], invocation invocation.Invocation, context InvocationContext) (out O, fx receipt.Effects, err error) diff --git a/server/options.go b/server/options.go index 86ddb30..4398215 100644 --- a/server/options.go +++ b/server/options.go @@ -1,12 +1,12 @@ package server import ( - "github.com/storacha-network/go-ucanto/core/invocation" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/result" - "github.com/storacha-network/go-ucanto/server/transaction" - "github.com/storacha-network/go-ucanto/transport" - "github.com/storacha-network/go-ucanto/validator" + "github.com/storacha/go-ucanto/core/invocation" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/result" + "github.com/storacha/go-ucanto/server/transaction" + "github.com/storacha/go-ucanto/transport" + "github.com/storacha/go-ucanto/validator" ) // Option is an option configuring a ucanto server. diff --git a/server/server.go b/server/server.go index 38b73c4..44ff969 100644 --- a/server/server.go +++ b/server/server.go @@ -7,23 +7,23 @@ import ( "strings" "sync" - "github.com/storacha-network/go-ucanto/core/dag/blockstore" - "github.com/storacha-network/go-ucanto/core/delegation" - "github.com/storacha-network/go-ucanto/core/invocation" - "github.com/storacha-network/go-ucanto/core/invocation/ran" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/message" - "github.com/storacha-network/go-ucanto/core/receipt" - "github.com/storacha-network/go-ucanto/core/result" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/principal" - "github.com/storacha-network/go-ucanto/principal/ed25519/verifier" - "github.com/storacha-network/go-ucanto/server/transaction" - "github.com/storacha-network/go-ucanto/transport" - "github.com/storacha-network/go-ucanto/transport/car" - thttp "github.com/storacha-network/go-ucanto/transport/http" - "github.com/storacha-network/go-ucanto/ucan" - "github.com/storacha-network/go-ucanto/validator" + "github.com/storacha/go-ucanto/core/dag/blockstore" + "github.com/storacha/go-ucanto/core/delegation" + "github.com/storacha/go-ucanto/core/invocation" + "github.com/storacha/go-ucanto/core/invocation/ran" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/message" + "github.com/storacha/go-ucanto/core/receipt" + "github.com/storacha/go-ucanto/core/result" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/principal" + "github.com/storacha/go-ucanto/principal/ed25519/verifier" + "github.com/storacha/go-ucanto/server/transaction" + "github.com/storacha/go-ucanto/transport" + "github.com/storacha/go-ucanto/transport/car" + thttp "github.com/storacha/go-ucanto/transport/http" + "github.com/storacha/go-ucanto/ucan" + "github.com/storacha/go-ucanto/validator" ) // InvocationContext is the context provided to service methods. diff --git a/server/server_test.go b/server/server_test.go index 9e973b9..61ecb88 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -12,21 +12,21 @@ import ( cidlink "github.com/ipld/go-ipld-prime/linking/cid" "github.com/ipld/go-ipld-prime/node/basicnode" ipldschema "github.com/ipld/go-ipld-prime/schema" - "github.com/storacha-network/go-ucanto/client" - "github.com/storacha-network/go-ucanto/core/delegation" - "github.com/storacha-network/go-ucanto/core/invocation" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/receipt" - "github.com/storacha-network/go-ucanto/core/result" - fdm "github.com/storacha-network/go-ucanto/core/result/failure/datamodel" - "github.com/storacha-network/go-ucanto/core/schema" - "github.com/storacha-network/go-ucanto/testing/fixtures" - "github.com/storacha-network/go-ucanto/testing/helpers" - "github.com/storacha-network/go-ucanto/transport/car/request" - "github.com/storacha-network/go-ucanto/transport/car/response" - thttp "github.com/storacha-network/go-ucanto/transport/http" - "github.com/storacha-network/go-ucanto/ucan" - "github.com/storacha-network/go-ucanto/validator" + "github.com/storacha/go-ucanto/client" + "github.com/storacha/go-ucanto/core/delegation" + "github.com/storacha/go-ucanto/core/invocation" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/receipt" + "github.com/storacha/go-ucanto/core/result" + fdm "github.com/storacha/go-ucanto/core/result/failure/datamodel" + "github.com/storacha/go-ucanto/core/schema" + "github.com/storacha/go-ucanto/testing/fixtures" + "github.com/storacha/go-ucanto/testing/helpers" + "github.com/storacha/go-ucanto/transport/car/request" + "github.com/storacha/go-ucanto/transport/car/response" + thttp "github.com/storacha/go-ucanto/transport/http" + "github.com/storacha/go-ucanto/ucan" + "github.com/storacha/go-ucanto/validator" "github.com/stretchr/testify/require" ) @@ -34,7 +34,7 @@ type uploadAddCaveats struct { Root ipld.Link } -func (c uploadAddCaveats) Build() (ipld.Node, error) { +func (c uploadAddCaveats) ToIPLD() (ipld.Node, error) { np := basicnode.Prototype.Any nb := np.NewBuilder() ma, _ := nb.BeginMap(1) @@ -60,7 +60,7 @@ type uploadAddSuccess struct { Status string } -func (ok uploadAddSuccess) Build() (ipld.Node, error) { +func (ok uploadAddSuccess) ToIPLD() (ipld.Node, error) { np := basicnode.Prototype.Any nb := np.NewBuilder() ma, _ := nb.BeginMap(2) diff --git a/server/transaction/transaction.go b/server/transaction/transaction.go index 4bb699d..d4ad2f5 100644 --- a/server/transaction/transaction.go +++ b/server/transaction/transaction.go @@ -1,9 +1,9 @@ package transaction import ( - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/receipt" - "github.com/storacha-network/go-ucanto/core/result" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/receipt" + "github.com/storacha/go-ucanto/core/result" ) // Transaction defines a result & effect pair, used by provider that wishes to diff --git a/testing/fixtures/fixtures.go b/testing/fixtures/fixtures.go index a4bd7ea..2a38f3f 100644 --- a/testing/fixtures/fixtures.go +++ b/testing/fixtures/fixtures.go @@ -1,6 +1,6 @@ package fixtures -import "github.com/storacha-network/go-ucanto/principal/ed25519/signer" +import "github.com/storacha/go-ucanto/principal/ed25519/signer" // did:key:z6Mkk89bC3JrVqKie71YEcc5M1SMVxuCgNx6zLZ8SYJsxALi var Alice, _ = signer.Parse("MgCZT5vOnYZoVAeyjnzuJIVY9J4LNtJ+f8Js0cTPuKUpFne0BVEDJjEu6quFIU8yp91/TY/+MYK8GvlKoTDnqOCovCVM=") diff --git a/transport/car/codec.go b/transport/car/codec.go index 80f09fa..9515a4c 100644 --- a/transport/car/codec.go +++ b/transport/car/codec.go @@ -4,11 +4,11 @@ import ( "net/http" "strings" - "github.com/storacha-network/go-ucanto/core/message" - "github.com/storacha-network/go-ucanto/transport" - "github.com/storacha-network/go-ucanto/transport/car/request" - "github.com/storacha-network/go-ucanto/transport/car/response" - thttp "github.com/storacha-network/go-ucanto/transport/http" + "github.com/storacha/go-ucanto/core/message" + "github.com/storacha/go-ucanto/transport" + "github.com/storacha/go-ucanto/transport/car/request" + "github.com/storacha/go-ucanto/transport/car/response" + thttp "github.com/storacha/go-ucanto/transport/http" ) type carOutbound struct{} diff --git a/transport/car/request/request.go b/transport/car/request/request.go index 8f37d13..182b8ec 100644 --- a/transport/car/request/request.go +++ b/transport/car/request/request.go @@ -4,12 +4,12 @@ import ( "fmt" "net/http" - "github.com/storacha-network/go-ucanto/core/car" - "github.com/storacha-network/go-ucanto/core/dag/blockstore" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/message" - "github.com/storacha-network/go-ucanto/transport" - uhttp "github.com/storacha-network/go-ucanto/transport/http" + "github.com/storacha/go-ucanto/core/car" + "github.com/storacha/go-ucanto/core/dag/blockstore" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/message" + "github.com/storacha/go-ucanto/transport" + uhttp "github.com/storacha/go-ucanto/transport/http" ) const ContentType = car.ContentType diff --git a/transport/car/response/response.go b/transport/car/response/response.go index 2b97be7..ecd8f77 100644 --- a/transport/car/response/response.go +++ b/transport/car/response/response.go @@ -4,12 +4,12 @@ import ( "fmt" "net/http" - "github.com/storacha-network/go-ucanto/core/car" - "github.com/storacha-network/go-ucanto/core/dag/blockstore" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/message" - "github.com/storacha-network/go-ucanto/transport" - uhttp "github.com/storacha-network/go-ucanto/transport/http" + "github.com/storacha/go-ucanto/core/car" + "github.com/storacha/go-ucanto/core/dag/blockstore" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/message" + "github.com/storacha/go-ucanto/transport" + uhttp "github.com/storacha/go-ucanto/transport/http" ) const ContentType = car.ContentType diff --git a/transport/codec.go b/transport/codec.go index 224a8d1..4a27484 100644 --- a/transport/codec.go +++ b/transport/codec.go @@ -1,7 +1,7 @@ package transport import ( - "github.com/storacha-network/go-ucanto/core/message" + "github.com/storacha/go-ucanto/core/message" ) type RequestEncoder interface { diff --git a/transport/http.go b/transport/http.go index 1cb4634..b3c7acc 100644 --- a/transport/http.go +++ b/transport/http.go @@ -4,7 +4,7 @@ import ( "io" "net/http" - "github.com/storacha-network/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/core/result/failure" ) type HTTPRequest interface { diff --git a/transport/http/channel.go b/transport/http/channel.go index 0f2145d..9efddc5 100644 --- a/transport/http/channel.go +++ b/transport/http/channel.go @@ -5,7 +5,7 @@ import ( "net/http" "net/url" - "github.com/storacha-network/go-ucanto/transport" + "github.com/storacha/go-ucanto/transport" ) type channel struct { diff --git a/transport/http/error.go b/transport/http/error.go index e9ec765..0cf8a4a 100644 --- a/transport/http/error.go +++ b/transport/http/error.go @@ -3,7 +3,7 @@ package http import ( nethttp "net/http" - "github.com/storacha-network/go-ucanto/transport" + "github.com/storacha/go-ucanto/transport" ) type httpError struct { diff --git a/transport/http/response.go b/transport/http/response.go index 8935776..176cb67 100644 --- a/transport/http/response.go +++ b/transport/http/response.go @@ -4,7 +4,7 @@ import ( "io" "net/http" - "github.com/storacha-network/go-ucanto/transport" + "github.com/storacha/go-ucanto/transport" ) type request struct { diff --git a/ucan/caveats.go b/ucan/caveats.go index 9e93687..b1f6c62 100644 --- a/ucan/caveats.go +++ b/ucan/caveats.go @@ -9,7 +9,7 @@ import ( // details and/or restrictions. type NoCaveats struct{} -func (c NoCaveats) Build() (datamodel.Node, error) { +func (c NoCaveats) ToIPLD() (datamodel.Node, error) { np := basicnode.Prototype.Any nb := np.NewBuilder() ma, err := nb.BeginMap(0) diff --git a/ucan/crypto/signer.go b/ucan/crypto/signer.go index 77c5cf2..1faa505 100644 --- a/ucan/crypto/signer.go +++ b/ucan/crypto/signer.go @@ -1,7 +1,7 @@ package crypto import ( - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" + "github.com/storacha/go-ucanto/ucan/crypto/signature" ) // Signer is an entity that can sign a payload. diff --git a/ucan/datamodel/payload/payload.go b/ucan/datamodel/payload/payload.go index 1dc3806..28ea961 100644 --- a/ucan/datamodel/payload/payload.go +++ b/ucan/datamodel/payload/payload.go @@ -7,7 +7,7 @@ import ( "github.com/ipld/go-ipld-prime" "github.com/ipld/go-ipld-prime/schema" - udm "github.com/storacha-network/go-ucanto/ucan/datamodel/ucan" + udm "github.com/storacha/go-ucanto/ucan/datamodel/ucan" ) //go:embed payload.ipldsch diff --git a/ucan/formatter/formatter.go b/ucan/formatter/formatter.go index b90d722..6b041a3 100644 --- a/ucan/formatter/formatter.go +++ b/ucan/formatter/formatter.go @@ -6,9 +6,9 @@ import ( "github.com/ipld/go-ipld-prime" "github.com/ipld/go-ipld-prime/codec/dagjson" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" - hdm "github.com/storacha-network/go-ucanto/ucan/datamodel/header" - pdm "github.com/storacha-network/go-ucanto/ucan/datamodel/payload" + "github.com/storacha/go-ucanto/ucan/crypto/signature" + hdm "github.com/storacha/go-ucanto/ucan/datamodel/header" + pdm "github.com/storacha/go-ucanto/ucan/datamodel/payload" ) func FormatSignPayload(payload pdm.PayloadModel, version string, algorithm string) (string, error) { diff --git a/ucan/lib.go b/ucan/lib.go index e661bc5..1747ec3 100644 --- a/ucan/lib.go +++ b/ucan/lib.go @@ -5,10 +5,10 @@ import ( "time" "github.com/ipld/go-ipld-prime/datamodel" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" - pdm "github.com/storacha-network/go-ucanto/ucan/datamodel/payload" - udm "github.com/storacha-network/go-ucanto/ucan/datamodel/ucan" - "github.com/storacha-network/go-ucanto/ucan/formatter" + "github.com/storacha/go-ucanto/ucan/crypto/signature" + pdm "github.com/storacha/go-ucanto/ucan/datamodel/payload" + udm "github.com/storacha/go-ucanto/ucan/datamodel/ucan" + "github.com/storacha/go-ucanto/ucan/formatter" ) const version = "0.9.1" @@ -81,14 +81,14 @@ func WithProofs(prf []Link) Option { // MapBuilder builds a map of string => datamodel.Node from the underlying data. type MapBuilder interface { - Build() (map[string]datamodel.Node, error) + ToIPLD() (map[string]datamodel.Node, error) } type FactBuilder = MapBuilder // CaveatBuilder builds a datamodel.Node from the underlying data. type CaveatBuilder interface { - Build() (datamodel.Node, error) + ToIPLD() (datamodel.Node, error) } // Issue creates a new signed token with a given issuer. If expiration is @@ -113,7 +113,7 @@ func Issue[C CaveatBuilder](issuer Signer, audience Principal, capabilities []Ca var capsmdl []udm.CapabilityModel for _, cap := range capabilities { - nb, err := cap.Nb().Build() + nb, err := cap.Nb().ToIPLD() if err != nil { return nil, fmt.Errorf("building caveats: %s", err) } @@ -132,7 +132,7 @@ func Issue[C CaveatBuilder](issuer Signer, audience Principal, capabilities []Ca var fctsmdl []udm.FactModel for _, f := range cfg.fct { - vals, err := f.Build() + vals, err := f.ToIPLD() if err != nil { return nil, fmt.Errorf("building fact: %s", err) } diff --git a/ucan/ucan.go b/ucan/ucan.go index 6f567a3..8ed0b10 100644 --- a/ucan/ucan.go +++ b/ucan/ucan.go @@ -4,9 +4,9 @@ import ( "encoding/json" "github.com/ipld/go-ipld-prime" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/ucan/crypto" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/ucan/crypto" + "github.com/storacha/go-ucanto/ucan/crypto/signature" ) // Resorce is a string that represents resource a UCAN holder can act upon. diff --git a/ucan/view.go b/ucan/view.go index 44b4656..d2ef21a 100644 --- a/ucan/view.go +++ b/ucan/view.go @@ -3,9 +3,9 @@ package ucan import ( "fmt" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/ucan/crypto/signature" - udm "github.com/storacha-network/go-ucanto/ucan/datamodel/ucan" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/ucan/crypto/signature" + udm "github.com/storacha/go-ucanto/ucan/datamodel/ucan" ) type UCAN interface { diff --git a/validator/authorization.go b/validator/authorization.go index d622bcc..7693346 100644 --- a/validator/authorization.go +++ b/validator/authorization.go @@ -1,8 +1,8 @@ package validator import ( - "github.com/storacha-network/go-ucanto/core/delegation" - "github.com/storacha-network/go-ucanto/ucan" + "github.com/storacha/go-ucanto/core/delegation" + "github.com/storacha/go-ucanto/ucan" ) type Authorization[Caveats any] interface { diff --git a/validator/capability.go b/validator/capability.go index a33b034..5940fa6 100644 --- a/validator/capability.go +++ b/validator/capability.go @@ -4,11 +4,11 @@ import ( "fmt" "strings" - "github.com/storacha-network/go-ucanto/core/delegation" - "github.com/storacha-network/go-ucanto/core/invocation" - "github.com/storacha-network/go-ucanto/core/result/failure" - "github.com/storacha-network/go-ucanto/core/schema" - "github.com/storacha-network/go-ucanto/ucan" + "github.com/storacha/go-ucanto/core/delegation" + "github.com/storacha/go-ucanto/core/invocation" + "github.com/storacha/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/core/schema" + "github.com/storacha/go-ucanto/ucan" ) type Source interface { diff --git a/validator/datamodel/attestation.go b/validator/datamodel/attestation.go index 7e8258c..3c3340e 100644 --- a/validator/datamodel/attestation.go +++ b/validator/datamodel/attestation.go @@ -6,7 +6,7 @@ import ( "github.com/ipld/go-ipld-prime" "github.com/ipld/go-ipld-prime/schema" - ucanipld "github.com/storacha-network/go-ucanto/core/ipld" + ucanipld "github.com/storacha/go-ucanto/core/ipld" ) //go:embed attestation.ipldsch @@ -29,6 +29,6 @@ type AttestationModel struct { Proof ipld.Link } -func (m AttestationModel) Build() (ipld.Node, error) { +func (m AttestationModel) ToIPLD() (ipld.Node, error) { return ucanipld.WrapWithRecovery(&m, AttestationType()) } diff --git a/validator/error.go b/validator/error.go index 8070b98..3194a13 100644 --- a/validator/error.go +++ b/validator/error.go @@ -9,12 +9,12 @@ import ( "time" "github.com/ipld/go-ipld-prime/datamodel" - "github.com/storacha-network/go-ucanto/core/delegation" - "github.com/storacha-network/go-ucanto/core/ipld" - "github.com/storacha-network/go-ucanto/core/result/failure" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/ucan" - vdm "github.com/storacha-network/go-ucanto/validator/datamodel" + "github.com/storacha/go-ucanto/core/delegation" + "github.com/storacha/go-ucanto/core/ipld" + "github.com/storacha/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/ucan" + vdm "github.com/storacha/go-ucanto/validator/datamodel" ) // go hack for union type -- unexported method cannot be implemented outside module limiting satisfying types @@ -372,7 +372,7 @@ func (ee ExpiredError) Error() string { time.Unix(int64(*exp), 0).Format(time.RFC3339)) } -func (ee ExpiredError) Build() (datamodel.Node, error) { +func (ee ExpiredError) ToIPLD() (datamodel.Node, error) { name := ee.Name() stack := ee.Stack() exp := ee.delegation.Expiration() @@ -427,7 +427,7 @@ func (nvbe NotValidBeforeError) Error() string { time.Unix(int64(nvbe.delegation.NotBefore()), 0).Format(time.RFC3339)) } -func (nvbe NotValidBeforeError) Build() (datamodel.Node, error) { +func (nvbe NotValidBeforeError) ToIPLD() (datamodel.Node, error) { name := nvbe.Name() stack := nvbe.Stack() notValidBeforeModel := vdm.NotValidBeforeModel{ diff --git a/validator/lib.go b/validator/lib.go index 31d48da..4d62148 100644 --- a/validator/lib.go +++ b/validator/lib.go @@ -5,15 +5,15 @@ import ( "strings" "sync" - "github.com/storacha-network/go-ucanto/core/dag/blockstore" - "github.com/storacha-network/go-ucanto/core/delegation" - "github.com/storacha-network/go-ucanto/core/invocation" - "github.com/storacha-network/go-ucanto/core/result/failure" - "github.com/storacha-network/go-ucanto/core/schema" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/principal" - "github.com/storacha-network/go-ucanto/ucan" - vdm "github.com/storacha-network/go-ucanto/validator/datamodel" + "github.com/storacha/go-ucanto/core/dag/blockstore" + "github.com/storacha/go-ucanto/core/delegation" + "github.com/storacha/go-ucanto/core/invocation" + "github.com/storacha/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/core/schema" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/principal" + "github.com/storacha/go-ucanto/ucan" + vdm "github.com/storacha/go-ucanto/validator/datamodel" "github.com/ucan-wg/go-ucan/capability/policy" "github.com/ucan-wg/go-ucan/capability/policy/literal" "github.com/ucan-wg/go-ucan/capability/policy/selector" diff --git a/validator/lib_test.go b/validator/lib_test.go index e24f1f5..e73e9c2 100644 --- a/validator/lib_test.go +++ b/validator/lib_test.go @@ -10,22 +10,22 @@ import ( "github.com/ipld/go-ipld-prime" cidlink "github.com/ipld/go-ipld-prime/linking/cid" "github.com/ipld/go-ipld-prime/node/basicnode" - "github.com/storacha-network/go-ucanto/core/dag/blockstore" - "github.com/storacha-network/go-ucanto/core/delegation" - "github.com/storacha-network/go-ucanto/core/invocation" - "github.com/storacha-network/go-ucanto/core/ipld/block" - "github.com/storacha-network/go-ucanto/core/ipld/codec/cbor" - "github.com/storacha-network/go-ucanto/core/ipld/hash/sha256" - "github.com/storacha-network/go-ucanto/core/result/failure" - "github.com/storacha-network/go-ucanto/core/schema" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/principal" - "github.com/storacha-network/go-ucanto/principal/ed25519/verifier" - "github.com/storacha-network/go-ucanto/principal/signer" - "github.com/storacha-network/go-ucanto/testing/fixtures" - "github.com/storacha-network/go-ucanto/testing/helpers" - "github.com/storacha-network/go-ucanto/ucan" - udm "github.com/storacha-network/go-ucanto/ucan/datamodel/ucan" + "github.com/storacha/go-ucanto/core/dag/blockstore" + "github.com/storacha/go-ucanto/core/delegation" + "github.com/storacha/go-ucanto/core/invocation" + "github.com/storacha/go-ucanto/core/ipld/block" + "github.com/storacha/go-ucanto/core/ipld/codec/cbor" + "github.com/storacha/go-ucanto/core/ipld/hash/sha256" + "github.com/storacha/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/core/schema" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/principal" + "github.com/storacha/go-ucanto/principal/ed25519/verifier" + "github.com/storacha/go-ucanto/principal/signer" + "github.com/storacha/go-ucanto/testing/fixtures" + "github.com/storacha/go-ucanto/testing/helpers" + "github.com/storacha/go-ucanto/ucan" + udm "github.com/storacha/go-ucanto/ucan/datamodel/ucan" "github.com/stretchr/testify/require" ) @@ -34,7 +34,7 @@ type storeAddCaveats struct { Origin ipld.Link } -func (c storeAddCaveats) Build() (ipld.Node, error) { +func (c storeAddCaveats) ToIPLD() (ipld.Node, error) { np := basicnode.Prototype.Any nb := np.NewBuilder() ma, _ := nb.BeginMap(2) @@ -510,7 +510,7 @@ func TestAccess(t *testing.T) { // In order to mess up the signature we need to reach deep in UCAN library // to create a UCAN model, manually setting the signature to something bad // and then encode it as the root block of the delegation. - nb, _ := storeAddCaveats{Link: testLink}.Build() + nb, _ := storeAddCaveats{Link: testLink}.ToIPLD() exp := ucan.Now() + 30 model := udm.UCANModel{ V: "0.9.1", diff --git a/validator/session_test.go b/validator/session_test.go index 5b2556a..793bf6b 100644 --- a/validator/session_test.go +++ b/validator/session_test.go @@ -8,15 +8,15 @@ import ( "github.com/ipld/go-ipld-prime" "github.com/ipld/go-ipld-prime/node/basicnode" - "github.com/storacha-network/go-ucanto/core/delegation" - "github.com/storacha-network/go-ucanto/core/result/failure" - "github.com/storacha-network/go-ucanto/core/schema" - "github.com/storacha-network/go-ucanto/did" - "github.com/storacha-network/go-ucanto/principal/absentee" - "github.com/storacha-network/go-ucanto/principal/ed25519/signer" - "github.com/storacha-network/go-ucanto/testing/fixtures" - "github.com/storacha-network/go-ucanto/testing/helpers" - "github.com/storacha-network/go-ucanto/ucan" + "github.com/storacha/go-ucanto/core/delegation" + "github.com/storacha/go-ucanto/core/result/failure" + "github.com/storacha/go-ucanto/core/schema" + "github.com/storacha/go-ucanto/did" + "github.com/storacha/go-ucanto/principal/absentee" + "github.com/storacha/go-ucanto/principal/ed25519/signer" + "github.com/storacha/go-ucanto/testing/fixtures" + "github.com/storacha/go-ucanto/testing/helpers" + "github.com/storacha/go-ucanto/ucan" "github.com/stretchr/testify/require" ) @@ -24,7 +24,7 @@ type debugEchoCaveats struct { Message *string } -func (c debugEchoCaveats) Build() (ipld.Node, error) { +func (c debugEchoCaveats) ToIPLD() (ipld.Node, error) { np := basicnode.Prototype.Any nb := np.NewBuilder() ma, _ := nb.BeginMap(1) @@ -59,7 +59,7 @@ type attestCaveats struct { Proof ipld.Link } -func (c attestCaveats) Build() (ipld.Node, error) { +func (c attestCaveats) ToIPLD() (ipld.Node, error) { np := basicnode.Prototype.Any nb := np.NewBuilder() ma, _ := nb.BeginMap(1)