refactor(token): migrate from ucan-wg to code.sonr.org/go
This commit is contained in:
@@ -3,7 +3,7 @@ package token
|
|||||||
import (
|
import (
|
||||||
"github.com/ipld/go-ipld-prime/datamodel"
|
"github.com/ipld/go-ipld-prime/datamodel"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/token/internal/envelope"
|
"code.sonr.org/go/ucan/token/internal/envelope"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Info = envelope.Info
|
type Info = envelope.Info
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/MetaMask/go-did-it/crypto"
|
"code.sonr.org/go/did-it/crypto"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
"github.com/ipld/go-ipld-prime/codec"
|
"github.com/ipld/go-ipld-prime/codec"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/token/internal/envelope"
|
"code.sonr.org/go/ucan/token/internal/envelope"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCidFromBytes(t *testing.T) {
|
func TestCidFromBytes(t *testing.T) {
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/MetaMask/go-did-it/crypto"
|
"code.sonr.org/go/did-it/crypto"
|
||||||
"github.com/MetaMask/go-did-it/crypto/ed25519"
|
"code.sonr.org/go/did-it/crypto/ed25519"
|
||||||
"github.com/ipld/go-ipld-prime"
|
"github.com/ipld/go-ipld-prime"
|
||||||
"github.com/ipld/go-ipld-prime/codec/dagcbor"
|
"github.com/ipld/go-ipld-prime/codec/dagcbor"
|
||||||
"github.com/ipld/go-ipld-prime/datamodel"
|
"github.com/ipld/go-ipld-prime/datamodel"
|
||||||
@@ -18,7 +18,7 @@ import (
|
|||||||
"github.com/ipld/go-ipld-prime/schema"
|
"github.com/ipld/go-ipld-prime/schema"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/token/internal/envelope"
|
"code.sonr.org/go/ucan/token/internal/envelope"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ import (
|
|||||||
"github.com/ipld/go-ipld-prime/schema"
|
"github.com/ipld/go-ipld-prime/schema"
|
||||||
"github.com/ucan-wg/go-varsig"
|
"github.com/ucan-wg/go-varsig"
|
||||||
|
|
||||||
"github.com/MetaMask/go-did-it"
|
"code.sonr.org/go/did-it"
|
||||||
"github.com/MetaMask/go-did-it/crypto"
|
"code.sonr.org/go/did-it/crypto"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
_ "github.com/MetaMask/go-did-it/verifiers/did-key"
|
_ "code.sonr.org/go/did-it/verifiers/did-key"
|
||||||
"github.com/ipld/go-ipld-prime"
|
"github.com/ipld/go-ipld-prime"
|
||||||
"github.com/ipld/go-ipld-prime/codec/dagcbor"
|
"github.com/ipld/go-ipld-prime/codec/dagcbor"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/token/internal/envelope"
|
"code.sonr.org/go/ucan/token/internal/envelope"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDecode(t *testing.T) {
|
func TestDecode(t *testing.T) {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/MetaMask/go-did-it"
|
"code.sonr.org/go/did-it"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/pkg/policy/limits"
|
"code.sonr.org/go/ucan/pkg/policy/limits"
|
||||||
)
|
)
|
||||||
|
|
||||||
func OptionalDID(s *string) (did.DID, error) {
|
func OptionalDID(s *string) (did.DID, error) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/pkg/policy/limits"
|
"code.sonr.org/go/ucan/pkg/policy/limits"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestOptionalTimestamp(t *testing.T) {
|
func TestOptionalTimestamp(t *testing.T) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"github.com/MetaMask/go-did-it"
|
"code.sonr.org/go/did-it"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
"github.com/ipld/go-ipld-prime"
|
"github.com/ipld/go-ipld-prime"
|
||||||
"github.com/ipld/go-ipld-prime/codec"
|
"github.com/ipld/go-ipld-prime/codec"
|
||||||
@@ -12,9 +12,9 @@ import (
|
|||||||
"github.com/ipld/go-ipld-prime/codec/dagjson"
|
"github.com/ipld/go-ipld-prime/codec/dagjson"
|
||||||
"github.com/ipld/go-ipld-prime/datamodel"
|
"github.com/ipld/go-ipld-prime/datamodel"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/token/delegation"
|
"code.sonr.org/go/ucan/token/delegation"
|
||||||
"github.com/ucan-wg/go-ucan/token/internal/envelope"
|
"code.sonr.org/go/ucan/token/internal/envelope"
|
||||||
"github.com/ucan-wg/go-ucan/token/invocation"
|
"code.sonr.org/go/ucan/token/invocation"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FromSealed decodes an arbitrary token type from the binary data,
|
// FromSealed decodes an arbitrary token type from the binary data,
|
||||||
|
|||||||
Reference in New Issue
Block a user