refactor(delegation): migrate from github.com/ucan-wg to code.sonr.org/go
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/MetaMask/go-did-it/didtest"
|
||||
"code.sonr.org/go/did-it/didtest"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user