refactor(client): migrate from MetaMask/go-did-it to code.sonr.org/go/did-it
This commit is contained in:
@@ -5,15 +5,15 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"iter"
|
"iter"
|
||||||
|
|
||||||
"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"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/pkg/command"
|
"code.sonr.org/go/ucan/pkg/command"
|
||||||
"github.com/ucan-wg/go-ucan/pkg/container"
|
"code.sonr.org/go/ucan/pkg/container"
|
||||||
"github.com/ucan-wg/go-ucan/pkg/policy"
|
"code.sonr.org/go/ucan/pkg/policy"
|
||||||
"github.com/ucan-wg/go-ucan/token/delegation"
|
"code.sonr.org/go/ucan/token/delegation"
|
||||||
"github.com/ucan-wg/go-ucan/token/invocation"
|
"code.sonr.org/go/ucan/token/invocation"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Client struct {
|
type Client struct {
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ import (
|
|||||||
"iter"
|
"iter"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/MetaMask/go-did-it"
|
"code.sonr.org/go/did-it"
|
||||||
"github.com/MetaMask/go-did-it/didtest"
|
"code.sonr.org/go/did-it/didtest"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/pkg/command"
|
"code.sonr.org/go/ucan/pkg/command"
|
||||||
"github.com/ucan-wg/go-ucan/pkg/policy"
|
"code.sonr.org/go/ucan/pkg/policy"
|
||||||
"github.com/ucan-wg/go-ucan/token/delegation"
|
"code.sonr.org/go/ucan/token/delegation"
|
||||||
"github.com/ucan-wg/go-ucan/token/invocation"
|
"code.sonr.org/go/ucan/token/invocation"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExampleNewClient() {
|
func ExampleNewClient() {
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"iter"
|
"iter"
|
||||||
|
|
||||||
"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"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/pkg/command"
|
"code.sonr.org/go/ucan/pkg/command"
|
||||||
"github.com/ucan-wg/go-ucan/token/delegation"
|
"code.sonr.org/go/ucan/token/delegation"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DlgIssuingLogic is a function that decides what powers are given to a client.
|
// DlgIssuingLogic is a function that decides what powers are given to a client.
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/MetaMask/go-did-it"
|
"code.sonr.org/go/did-it"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/pkg/command"
|
"code.sonr.org/go/ucan/pkg/command"
|
||||||
"github.com/ucan-wg/go-ucan/token/delegation"
|
"code.sonr.org/go/ucan/token/delegation"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Pool struct {
|
type Pool struct {
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import (
|
|||||||
"iter"
|
"iter"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"github.com/MetaMask/go-did-it"
|
"code.sonr.org/go/did-it"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/pkg/command"
|
"code.sonr.org/go/ucan/pkg/command"
|
||||||
"github.com/ucan-wg/go-ucan/token/delegation"
|
"code.sonr.org/go/ucan/token/delegation"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FindProof find in the pool the best (shortest, smallest in bytes) chain of delegation(s) matching the given invocation parameters.
|
// FindProof find in the pool the best (shortest, smallest in bytes) chain of delegation(s) matching the given invocation parameters.
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ import (
|
|||||||
"iter"
|
"iter"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/MetaMask/go-did-it/didtest"
|
"code.sonr.org/go/did-it/didtest"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/pkg/command"
|
"code.sonr.org/go/ucan/pkg/command"
|
||||||
"github.com/ucan-wg/go-ucan/token/delegation"
|
"code.sonr.org/go/ucan/token/delegation"
|
||||||
"github.com/ucan-wg/go-ucan/token/delegation/delegationtest"
|
"code.sonr.org/go/ucan/token/delegation/delegationtest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestFindProof(t *testing.T) {
|
func TestFindProof(t *testing.T) {
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import (
|
|||||||
"iter"
|
"iter"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/MetaMask/go-did-it"
|
"code.sonr.org/go/did-it"
|
||||||
"github.com/avast/retry-go/v4"
|
"github.com/avast/retry-go/v4"
|
||||||
|
|
||||||
"github.com/ucan-wg/go-ucan/pkg/command"
|
"code.sonr.org/go/ucan/pkg/command"
|
||||||
"github.com/ucan-wg/go-ucan/token/delegation"
|
"code.sonr.org/go/ucan/token/delegation"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DelegationRequester interface {
|
type DelegationRequester interface {
|
||||||
|
|||||||
Reference in New Issue
Block a user