refactor(delegation): migrate from github.com/ucan-wg to code.sonr.org/go

This commit is contained in:
2026-01-08 15:45:53 -05:00
parent 499f83fd6f
commit b23a6de775
12 changed files with 43 additions and 43 deletions

View File

@@ -16,13 +16,13 @@ import (
"strings"
"time"
"github.com/MetaMask/go-did-it"
"code.sonr.org/go/did-it"
"github.com/ucan-wg/go-ucan/pkg/command"
"github.com/ucan-wg/go-ucan/pkg/meta"
"github.com/ucan-wg/go-ucan/pkg/policy"
"github.com/ucan-wg/go-ucan/token/internal/nonce"
"github.com/ucan-wg/go-ucan/token/internal/parse"
"code.sonr.org/go/ucan/pkg/command"
"code.sonr.org/go/ucan/pkg/meta"
"code.sonr.org/go/ucan/pkg/policy"
"code.sonr.org/go/ucan/token/internal/nonce"
"code.sonr.org/go/ucan/token/internal/parse"
)
// Token is an immutable type that holds the fields of a UCAN delegation.

View File

@@ -6,12 +6,12 @@ import (
"testing"
"time"
"github.com/MetaMask/go-did-it/didtest"
"code.sonr.org/go/did-it/didtest"
"github.com/stretchr/testify/require"
"github.com/ucan-wg/go-ucan/pkg/command"
"github.com/ucan-wg/go-ucan/pkg/policy"
"github.com/ucan-wg/go-ucan/token/delegation"
"code.sonr.org/go/ucan/pkg/command"
"code.sonr.org/go/ucan/pkg/policy"
"code.sonr.org/go/ucan/token/delegation"
)
//go:embed testdata/new.dagjson

View File

@@ -9,17 +9,17 @@ import (
"slices"
"time"
"github.com/MetaMask/go-did-it"
didkeyctl "github.com/MetaMask/go-did-it/controller/did-key"
"github.com/MetaMask/go-did-it/crypto"
"github.com/MetaMask/go-did-it/didtest"
"code.sonr.org/go/did-it"
didkeyctl "code.sonr.org/go/did-it/controller/did-key"
"code.sonr.org/go/did-it/crypto"
"code.sonr.org/go/did-it/didtest"
"github.com/ipfs/go-cid"
"github.com/ucan-wg/go-ucan/pkg/command"
"github.com/ucan-wg/go-ucan/pkg/policy"
"github.com/ucan-wg/go-ucan/pkg/policy/policytest"
"github.com/ucan-wg/go-ucan/token/delegation"
"github.com/ucan-wg/go-ucan/token/delegation/delegationtest"
"code.sonr.org/go/ucan/pkg/command"
"code.sonr.org/go/ucan/pkg/policy"
"code.sonr.org/go/ucan/pkg/policy/policytest"
"code.sonr.org/go/ucan/token/delegation"
"code.sonr.org/go/ucan/token/delegation/delegationtest"
)
const (
@@ -215,7 +215,7 @@ func (g *generator) writeGoFile() error {
Println("import (")
Println("\t\"github.com/ipfs/go-cid\"")
Println()
Println("\t\"github.com/ucan-wg/go-ucan/token/delegation\"")
Println("\t\"code.sonr.org/go/ucan/token/delegation\"")
Println(")")
refs := make(map[cid.Cid]string, len(g.dlgs))

View File

@@ -1,7 +1,7 @@
package main
import (
"github.com/MetaMask/go-did-it/didtest"
"code.sonr.org/go/did-it/didtest"
)
func main() {

View File

@@ -5,11 +5,11 @@ import (
"path/filepath"
"sync"
_ "github.com/MetaMask/go-did-it/verifiers/did-key"
_ "code.sonr.org/go/did-it/verifiers/did-key"
"github.com/ipfs/go-cid"
"github.com/ucan-wg/go-ucan/pkg/command"
"github.com/ucan-wg/go-ucan/token/delegation"
"code.sonr.org/go/ucan/pkg/command"
"code.sonr.org/go/ucan/token/delegation"
)
var (

View File

@@ -5,7 +5,7 @@ package delegationtest
import (
"github.com/ipfs/go-cid"
"github.com/ucan-wg/go-ucan/token/delegation"
"code.sonr.org/go/ucan/token/delegation"
)
var (

View File

@@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/ucan-wg/go-ucan/token/delegation"
"github.com/ucan-wg/go-ucan/token/delegation/delegationtest"
"code.sonr.org/go/ucan/token/delegation"
"code.sonr.org/go/ucan/token/delegation/delegationtest"
)
func TestGetDelegation(t *testing.T) {

View File

@@ -8,17 +8,17 @@ import (
"fmt"
"time"
"github.com/MetaMask/go-did-it/didtest"
"code.sonr.org/go/did-it/didtest"
"github.com/ipfs/go-cid"
"github.com/ipld/go-ipld-prime"
"github.com/ipld/go-ipld-prime/codec/dagcbor"
"github.com/ipld/go-ipld-prime/codec/dagjson"
"github.com/ucan-wg/go-ucan/pkg/command"
"github.com/ucan-wg/go-ucan/pkg/policy"
"github.com/ucan-wg/go-ucan/pkg/policy/literal"
"github.com/ucan-wg/go-ucan/token/delegation"
"github.com/ucan-wg/go-ucan/token/internal/envelope"
"code.sonr.org/go/ucan/pkg/command"
"code.sonr.org/go/ucan/pkg/policy"
"code.sonr.org/go/ucan/pkg/policy/literal"
"code.sonr.org/go/ucan/token/delegation"
"code.sonr.org/go/ucan/token/internal/envelope"
)
// The following example shows how to create a delegation.Token with

View File

@@ -7,8 +7,8 @@ import (
"fmt"
"testing"
"github.com/MetaMask/go-did-it/crypto"
"github.com/MetaMask/go-did-it/crypto/ed25519"
"code.sonr.org/go/did-it/crypto"
"code.sonr.org/go/did-it/crypto/ed25519"
"github.com/multiformats/go-varint"
"github.com/stretchr/testify/require"
)

View File

@@ -3,8 +3,8 @@ package delegation
import (
"io"
"github.com/MetaMask/go-did-it"
"github.com/MetaMask/go-did-it/crypto"
"code.sonr.org/go/did-it"
"code.sonr.org/go/did-it/crypto"
"github.com/ipfs/go-cid"
"github.com/ipld/go-ipld-prime"
"github.com/ipld/go-ipld-prime/codec"
@@ -12,7 +12,7 @@ import (
"github.com/ipld/go-ipld-prime/codec/dagjson"
"github.com/ipld/go-ipld-prime/datamodel"
"github.com/ucan-wg/go-ucan/token/internal/envelope"
"code.sonr.org/go/ucan/token/internal/envelope"
)
// ToSealed wraps the delegation token in an envelope, generates the

View File

@@ -10,8 +10,8 @@ import (
"github.com/ipld/go-ipld-prime/node/bindnode"
"github.com/ipld/go-ipld-prime/schema"
"github.com/ucan-wg/go-ucan/pkg/meta"
"github.com/ucan-wg/go-ucan/token/internal/envelope"
"code.sonr.org/go/ucan/pkg/meta"
"code.sonr.org/go/ucan/token/internal/envelope"
)
// Tag is the string used as a key within the SigPayload that identifies

View File

@@ -5,13 +5,13 @@ import (
_ "embed"
"testing"
"github.com/MetaMask/go-did-it/didtest"
"code.sonr.org/go/did-it/didtest"
"github.com/ipld/go-ipld-prime"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/ucan-wg/go-ucan/token/delegation"
"github.com/ucan-wg/go-ucan/token/internal/envelope"
"code.sonr.org/go/ucan/token/delegation"
"code.sonr.org/go/ucan/token/internal/envelope"
)
//go:embed delegation.ipldsch