diff --git a/cmd/vc-rest/go.mod b/cmd/vc-rest/go.mod index 82280dcb1..134fc45d5 100644 --- a/cmd/vc-rest/go.mod +++ b/cmd/vc-rest/go.mod @@ -12,10 +12,11 @@ require ( github.com/deepmap/oapi-codegen v1.11.0 github.com/dgraph-io/ristretto v0.1.1 github.com/google/uuid v1.3.0 - github.com/hyperledger/aries-framework-go v0.3.3-0.20230810150537-71e132ba5968 github.com/hyperledger/aries-framework-go-ext/component/vdr/jwk v0.0.0-20221213152252-f0c83a5a922c github.com/hyperledger/aries-framework-go-ext/component/vdr/longform v0.0.0-20221213152252-f0c83a5a922c github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20221213152252-f0c83a5a922c + github.com/hyperledger/aries-framework-go/component/models v0.0.0-20230810150537-71e132ba5968 + github.com/hyperledger/aries-framework-go/component/vdr v0.0.0-20230622171716-43af8054a539 github.com/labstack/echo/v4 v4.10.2 github.com/ory/dockertest/v3 v3.9.1 github.com/ory/fosite v0.44.0 @@ -118,14 +119,13 @@ require ( github.com/hashicorp/go-retryablehttp v0.7.4 // indirect github.com/hashicorp/go-version v1.2.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hyperledger/aries-framework-go v0.3.3-0.20230810150537-71e132ba5968 // indirect github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220728172020-0a8903e45149 // indirect github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc3.0.20221104150937-07bfbe450122 // indirect github.com/hyperledger/aries-framework-go/component/didconfig v0.0.0-20230622211121-852ce35730b4 // indirect github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230622082138-3ffab1691857 // indirect github.com/hyperledger/aries-framework-go/component/log v0.0.0-20230427134832-0c9969493bd3 // indirect - github.com/hyperledger/aries-framework-go/component/models v0.0.0-20230810150537-71e132ba5968 // indirect github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20230427134832-0c9969493bd3 // indirect - github.com/hyperledger/aries-framework-go/component/vdr v0.0.0-20230622171716-43af8054a539 // indirect github.com/hyperledger/aries-framework-go/spi v0.0.0-20230517133327-301aa0597250 // indirect github.com/hyperledger/fabric-amcl v0.0.0-20230602173724-9e02669dceb2 // indirect github.com/hyperledger/ursa-wrapper-go v0.3.1 // indirect @@ -216,16 +216,16 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.23.0 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691 // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.11.0 // indirect + golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.55.0 // indirect diff --git a/cmd/vc-rest/go.sum b/cmd/vc-rest/go.sum index a3710d629..50e86e89a 100644 --- a/cmd/vc-rest/go.sum +++ b/cmd/vc-rest/go.sum @@ -1219,8 +1219,8 @@ golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220513210258-46612604a0f9/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1232,8 +1232,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691 h1:/yRP+0AN7mf5DkD3BAI6TOFnd51gEoDEb8o35jIFtgw= -golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1322,8 +1322,8 @@ golang.org/x/net v0.0.0-20220513224357-95641704303c/go.mod h1:CfG3xpIq0wQ8r1q4Su 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.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1443,8 +1443,8 @@ golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBc 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.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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= @@ -1460,8 +1460,8 @@ golang.org/x/text v0.3.6/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.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1541,8 +1541,8 @@ golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E 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.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= -golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= -golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIEK/dEeq7uiqb5qBgQrZzIE7E= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/cmd/vc-rest/startcmd/configuration.go b/cmd/vc-rest/startcmd/configuration.go index 1812b31e9..4e0bdbab5 100644 --- a/cmd/vc-rest/startcmd/configuration.go +++ b/cmd/vc-rest/startcmd/configuration.go @@ -15,12 +15,12 @@ import ( "github.com/hyperledger/aries-framework-go-ext/component/vdr/jwk" "github.com/hyperledger/aries-framework-go-ext/component/vdr/longform" "github.com/hyperledger/aries-framework-go-ext/component/vdr/orb" - ariesdid "github.com/hyperledger/aries-framework-go/pkg/doc/did" - vdrapi "github.com/hyperledger/aries-framework-go/pkg/framework/aries/api/vdr" - vdrpkg "github.com/hyperledger/aries-framework-go/pkg/vdr" - "github.com/hyperledger/aries-framework-go/pkg/vdr/httpbinding" - "github.com/hyperledger/aries-framework-go/pkg/vdr/key" - "github.com/hyperledger/aries-framework-go/pkg/vdr/web" + ariesdid "github.com/hyperledger/aries-framework-go/component/models/did" + vdrpkg "github.com/hyperledger/aries-framework-go/component/vdr" + vdrapi "github.com/hyperledger/aries-framework-go/component/vdr/api" + "github.com/hyperledger/aries-framework-go/component/vdr/httpbinding" + "github.com/hyperledger/aries-framework-go/component/vdr/key" + "github.com/hyperledger/aries-framework-go/component/vdr/web" tlsutils "github.com/trustbloc/cmdutil-go/pkg/utils/tls" "go.opentelemetry.io/otel/trace" diff --git a/cmd/vc-rest/startcmd/start.go b/cmd/vc-rest/startcmd/start.go index c126e8843..738bdf1d6 100644 --- a/cmd/vc-rest/startcmd/start.go +++ b/cmd/vc-rest/startcmd/start.go @@ -27,10 +27,11 @@ import ( oapimw "github.com/deepmap/oapi-codegen/pkg/middleware" "github.com/deepmap/oapi-codegen/pkg/securityprovider" "github.com/dgraph-io/ristretto" - "github.com/hyperledger/aries-framework-go/pkg/doc/jwt" - ariesld "github.com/hyperledger/aries-framework-go/pkg/doc/ld" - "github.com/hyperledger/aries-framework-go/pkg/doc/ldcontext/remote" - "github.com/hyperledger/aries-framework-go/pkg/doc/verifiable" + "github.com/hyperledger/aries-framework-go/component/models/ld/documentloader" + + "github.com/hyperledger/aries-framework-go/component/models/jwt" + "github.com/hyperledger/aries-framework-go/component/models/ld/context/remote" + "github.com/hyperledger/aries-framework-go/component/models/verifiable" "github.com/labstack/echo/v4" echomw "github.com/labstack/echo/v4/middleware" jsonld "github.com/piprate/json-gold/ld" @@ -1291,7 +1292,7 @@ func createJSONLDDocumentLoader(mongoClient *mongodb.Client, tlsConfig *tls.Conf return nil, err } - var loaderOpts []ariesld.DocumentLoaderOpts + var loaderOpts []documentloader.Opts httpClient := &http.Client{ Transport: &http.Transport{ @@ -1301,7 +1302,7 @@ func createJSONLDDocumentLoader(mongoClient *mongodb.Client, tlsConfig *tls.Conf for _, url := range providerURLs { loaderOpts = append(loaderOpts, - ariesld.WithRemoteProvider( + documentloader.WithRemoteProvider( remote.NewProvider(url, remote.WithHTTPClient(httpClient)), ), ) @@ -1309,7 +1310,7 @@ func createJSONLDDocumentLoader(mongoClient *mongodb.Client, tlsConfig *tls.Conf if contextEnableRemote { loaderOpts = append(loaderOpts, - ariesld.WithRemoteDocumentLoader(jsonld.NewDefaultDocumentLoader(http.DefaultClient))) + documentloader.WithRemoteDocumentLoader(jsonld.NewDefaultDocumentLoader(http.DefaultClient))) } loader, err := ld.NewDocumentLoader(ldStore, loaderOpts...) diff --git a/component/credentialstatus/credentialstatus_service.go b/component/credentialstatus/credentialstatus_service.go index 5f66f9067..6eb9b5ce7 100644 --- a/component/credentialstatus/credentialstatus_service.go +++ b/component/credentialstatus/credentialstatus_service.go @@ -18,8 +18,8 @@ import ( "strings" "github.com/google/uuid" - "github.com/hyperledger/aries-framework-go/pkg/doc/verifiable" - vdrapi "github.com/hyperledger/aries-framework-go/pkg/framework/aries/api/vdr" + "github.com/hyperledger/aries-framework-go/component/models/verifiable" + vdrapi "github.com/hyperledger/aries-framework-go/component/vdr/api" "github.com/piprate/json-gold/ld" "github.com/spf13/cobra" "github.com/trustbloc/logutil-go/pkg/log" diff --git a/component/credentialstatus/credentialstatus_service_test.go b/component/credentialstatus/credentialstatus_service_test.go index 64ad9577c..4c5a6652b 100644 --- a/component/credentialstatus/credentialstatus_service_test.go +++ b/component/credentialstatus/credentialstatus_service_test.go @@ -24,15 +24,15 @@ import ( "github.com/piprate/json-gold/ld" "github.com/stretchr/testify/require" - ariescrypto "github.com/hyperledger/aries-framework-go/pkg/crypto" - "github.com/hyperledger/aries-framework-go/pkg/doc/jose/jwk" - "github.com/hyperledger/aries-framework-go/pkg/doc/verifiable" - "github.com/hyperledger/aries-framework-go/pkg/framework/aries/api/vdr" - "github.com/hyperledger/aries-framework-go/pkg/kms" - cryptomock "github.com/hyperledger/aries-framework-go/pkg/mock/crypto" - mockkms "github.com/hyperledger/aries-framework-go/pkg/mock/kms" - vdrmock "github.com/hyperledger/aries-framework-go/pkg/mock/vdr" - vdr2 "github.com/hyperledger/aries-framework-go/pkg/vdr" + "github.com/hyperledger/aries-framework-go/component/kmscrypto/doc/jose/jwk" + cryptomock "github.com/hyperledger/aries-framework-go/component/kmscrypto/mock/crypto" + mockkms "github.com/hyperledger/aries-framework-go/component/kmscrypto/mock/kms" + "github.com/hyperledger/aries-framework-go/component/models/verifiable" + vdr2 "github.com/hyperledger/aries-framework-go/component/vdr" + vdr "github.com/hyperledger/aries-framework-go/component/vdr/api" + vdrmock "github.com/hyperledger/aries-framework-go/component/vdr/mock" + ariescrypto "github.com/hyperledger/aries-framework-go/spi/crypto" + kmsapi "github.com/hyperledger/aries-framework-go/spi/kms" "github.com/trustbloc/vcs/component/credentialstatus/internal/testutil" "github.com/trustbloc/vcs/pkg/cslmanager" @@ -120,7 +120,7 @@ func TestCredentialStatusList_CreateStatusListEntry(t *testing.T) { KMSRegistry: mockKMSRegistry, ExternalURL: "https://localhost:8080", Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -133,7 +133,7 @@ func TestCredentialStatusList_CreateStatusListEntry(t *testing.T) { KMSRegistry: mockKMSRegistry, ExternalURL: "https://localhost:8080", Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -217,7 +217,7 @@ func TestCredentialStatusList_GetStatusListVC(t *testing.T) { }), VCStatusStore: newMockVCStatusStore(), ProfileService: mockProfileSrv, - Crypto: vccrypto.New(&vdrmock.MockVDRegistry{}, + Crypto: vccrypto.New(&vdrmock.VDRegistry{}, loader), }) require.NoError(t, err) @@ -241,7 +241,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { cslVCStore := newMockCSLVCStore() cslIndexStore := newMockCSLIndexStore() crypto := vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader) + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader) ctx := context.Background() cslMgr, err := cslmanager.New( @@ -252,7 +252,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { ListSize: 2, KMSRegistry: mockKMSRegistry, Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -395,7 +395,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { KMSRegistry: mockKMSRegistry, VCStatusStore: vcStore, Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -431,7 +431,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { KMSRegistry: mockKMSRegistry, VCStatusStore: vcStore, Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -461,7 +461,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { VCStatusStore: newMockVCStatusStore(), Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -483,7 +483,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { VCStatusStore: newMockVCStatusStore(), Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -504,7 +504,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { VCStatusStore: newMockVCStatusStore(), Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -524,7 +524,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { VCStatusStore: newMockVCStatusStore(), Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -545,7 +545,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { VCStatusStore: newMockVCStatusStore(), Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -568,7 +568,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { CSLVCStore: newMockCSLVCStore(), VCStatusStore: newMockVCStatusStore(), Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -593,7 +593,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { CSLVCStore: newMockCSLVCStore(), VCStatusStore: newMockVCStatusStore(), Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -633,7 +633,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { ListSize: 2, KMSRegistry: mockKMSRegistry, Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -647,7 +647,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { EventPublisher: mockEventPublisher, EventTopic: eventTopic, Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -673,7 +673,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { cslVCStore := newMockCSLVCStore() loader := testutil.DocumentLoader(t) crypto := vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader) + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader) vcStatusStore := newMockVCStatusStore() @@ -685,7 +685,7 @@ func TestCredentialStatusList_UpdateVCStatus(t *testing.T) { ListSize: 2, KMSRegistry: mockKMSRegistry, Crypto: vccrypto.New( - &vdrmock.MockVDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), + &vdrmock.VDRegistry{ResolveValue: createDIDDoc("did:test:abc")}, loader), }) require.NoError(t, err) @@ -1056,14 +1056,14 @@ func (m *mockKMS) NewVCSigner(creator string, signatureType vcsverifiable.Signat return signer.NewKMSSigner(&mockkms.KeyManager{}, m.crypto, creator, signatureType, nil) } -func (m *mockKMS) SupportedKeyTypes() []kms.KeyType { +func (m *mockKMS) SupportedKeyTypes() []kmsapi.KeyType { return nil } -func (m *mockKMS) CreateJWKKey(_ kms.KeyType) (string, *jwk.JWK, error) { +func (m *mockKMS) CreateJWKKey(_ kmsapi.KeyType) (string, *jwk.JWK, error) { return "", nil, nil } -func (m *mockKMS) CreateCryptoKey(_ kms.KeyType) (string, interface{}, error) { +func (m *mockKMS) CreateCryptoKey(_ kmsapi.KeyType) (string, interface{}, error) { return "", nil, nil } diff --git a/component/credentialstatus/go.mod b/component/credentialstatus/go.mod index 827b8640a..7c4a3d142 100644 --- a/component/credentialstatus/go.mod +++ b/component/credentialstatus/go.mod @@ -9,8 +9,11 @@ go 1.19 require ( github.com/golang/mock v1.6.0 github.com/google/uuid v1.3.0 - github.com/hyperledger/aries-framework-go v0.3.3-0.20230810150537-71e132ba5968 github.com/hyperledger/aries-framework-go-ext/component/vdr/longform v0.0.0-20221201213446-c4c1e76daa49 + github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230622082138-3ffab1691857 + github.com/hyperledger/aries-framework-go/component/models v0.0.0-20230810150537-71e132ba5968 + github.com/hyperledger/aries-framework-go/component/vdr v0.0.0-20230622171716-43af8054a539 + github.com/hyperledger/aries-framework-go/spi v0.0.0-20230517133327-301aa0597250 github.com/piprate/json-gold v0.5.1-0.20230111113000-6ddbe6e6f19f github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 @@ -67,15 +70,12 @@ require ( github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hyperledger/aries-framework-go v0.3.3-0.20230810150537-71e132ba5968 // indirect github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220728172020-0a8903e45149 // indirect github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20221201213446-c4c1e76daa49 // indirect github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc3.0.20221104150937-07bfbe450122 // indirect - github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230622082138-3ffab1691857 // indirect github.com/hyperledger/aries-framework-go/component/log v0.0.0-20230427134832-0c9969493bd3 // indirect - github.com/hyperledger/aries-framework-go/component/models v0.0.0-20230810150537-71e132ba5968 // indirect github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20230427134832-0c9969493bd3 // indirect - github.com/hyperledger/aries-framework-go/component/vdr v0.0.0-20230622171716-43af8054a539 // indirect - github.com/hyperledger/aries-framework-go/spi v0.0.0-20230517133327-301aa0597250 // indirect github.com/hyperledger/fabric-amcl v0.0.0-20230602173724-9e02669dceb2 // indirect github.com/hyperledger/ursa-wrapper-go v0.3.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect diff --git a/component/credentialstatus/identityhub.go b/component/credentialstatus/identityhub.go index d42c253db..40201f35b 100644 --- a/component/credentialstatus/identityhub.go +++ b/component/credentialstatus/identityhub.go @@ -18,8 +18,8 @@ import ( "strings" "github.com/google/uuid" - "github.com/hyperledger/aries-framework-go/pkg/common/model" - "github.com/hyperledger/aries-framework-go/pkg/doc/did" + "github.com/hyperledger/aries-framework-go/component/models/did" + "github.com/hyperledger/aries-framework-go/component/models/did/endpoint" ) const ( @@ -131,7 +131,7 @@ func (s *Service) getIdentityHubServiceEndpoint(did *did.Doc) (string, error) { } switch service.ServiceEndpoint.Type() { - case model.Generic: + case endpoint.Generic: serviceEndpoint, err := service.ServiceEndpoint.URI() if err == nil { return serviceEndpoint, nil @@ -148,7 +148,7 @@ func (s *Service) getIdentityHubServiceEndpoint(did *did.Doc) (string, error) { } for _, v := range mapped { - didCoreEndpoint := model.NewDIDCoreEndpoint(v) + didCoreEndpoint := endpoint.NewDIDCoreEndpoint(v) serviceEndpoint, err = didCoreEndpoint.URI() if err == nil { return serviceEndpoint, nil @@ -156,7 +156,7 @@ func (s *Service) getIdentityHubServiceEndpoint(did *did.Doc) (string, error) { } return "", fmt.Errorf("unable to extract DIDCore service endpoint") - case model.DIDCommV1, model.DIDCommV2: + case endpoint.DIDCommV1, endpoint.DIDCommV2: serviceEndpoint, err := service.ServiceEndpoint.URI() if err != nil { return "", fmt.Errorf("unable to get service endpoint URL: %w", err) diff --git a/component/credentialstatus/identityhub_test.go b/component/credentialstatus/identityhub_test.go index 44d749e01..0d8d937b8 100644 --- a/component/credentialstatus/identityhub_test.go +++ b/component/credentialstatus/identityhub_test.go @@ -24,11 +24,11 @@ import ( "github.com/hyperledger/aries-framework-go-ext/component/vdr/longform" "github.com/stretchr/testify/require" - "github.com/hyperledger/aries-framework-go/pkg/common/model" - "github.com/hyperledger/aries-framework-go/pkg/doc/did" - "github.com/hyperledger/aries-framework-go/pkg/framework/aries/api/vdr" - vdrmock "github.com/hyperledger/aries-framework-go/pkg/mock/vdr" - vdr2 "github.com/hyperledger/aries-framework-go/pkg/vdr" + "github.com/hyperledger/aries-framework-go/component/models/did" + "github.com/hyperledger/aries-framework-go/component/models/did/endpoint" + vdr2 "github.com/hyperledger/aries-framework-go/component/vdr" + vdrapi "github.com/hyperledger/aries-framework-go/component/vdr/api" + vdrmock "github.com/hyperledger/aries-framework-go/component/vdr/mock" ) const ( @@ -236,7 +236,7 @@ func TestService_resolveDID(t *testing.T) { require.Equal(t, didDoc.ID, createDIDDoc(didID).ID) s = &Service{ - vdr: &vdrmock.MockVDRegistry{ + vdr: &vdrmock.VDRegistry{ ResolveErr: errors.New("some error"), }, } @@ -247,7 +247,7 @@ func TestService_resolveDID(t *testing.T) { func TestService_resolveDIDRelativeUrl(t *testing.T) { type fields struct { - getVDR func() vdr.Registry + getVDR func() vdrapi.Registry getHTTPClient func() httpClient } type args struct { @@ -263,8 +263,8 @@ func TestService_resolveDIDRelativeUrl(t *testing.T) { { name: "OK", fields: fields{ - getVDR: func() vdr.Registry { - return &vdrmock.MockVDRegistry{ + getVDR: func() vdrapi.Registry { + return &vdrmock.VDRegistry{ ResolveValue: createDIDDoc("did:trustbloc:abc"), } }, @@ -287,7 +287,7 @@ func TestService_resolveDIDRelativeUrl(t *testing.T) { { name: "OK - longform", fields: fields{ - getVDR: func() vdr.Registry { + getVDR: func() vdrapi.Registry { longformVDR, err := longform.New() require.NoError(t, err) @@ -306,8 +306,8 @@ func TestService_resolveDIDRelativeUrl(t *testing.T) { { name: "resolveDID error", fields: fields{ - getVDR: func() vdr.Registry { - return &vdrmock.MockVDRegistry{ + getVDR: func() vdrapi.Registry { + return &vdrmock.VDRegistry{ ResolveErr: errors.New("some error"), } }, @@ -324,8 +324,8 @@ func TestService_resolveDIDRelativeUrl(t *testing.T) { { name: "getQueryValues error", fields: fields{ - getVDR: func() vdr.Registry { - return &vdrmock.MockVDRegistry{ + getVDR: func() vdrapi.Registry { + return &vdrmock.VDRegistry{ ResolveValue: createDIDDoc("did:trustbloc:abc"), } }, @@ -342,10 +342,10 @@ func TestService_resolveDIDRelativeUrl(t *testing.T) { { name: "getIdentityHubServiceEndpoint error", fields: fields{ - getVDR: func() vdr.Registry { + getVDR: func() vdrapi.Registry { didDoc := createDIDDoc("did:trustbloc:abc") didDoc.Service[0].Type = "LinkedDomains" - return &vdrmock.MockVDRegistry{ + return &vdrmock.VDRegistry{ ResolveValue: didDoc, } }, @@ -362,10 +362,10 @@ func TestService_resolveDIDRelativeUrl(t *testing.T) { { name: "NewRequestWithContext error", fields: fields{ - getVDR: func() vdr.Registry { + getVDR: func() vdrapi.Registry { didDoc := createDIDDoc("did:trustbloc:abc") - didDoc.Service[0].ServiceEndpoint = model.NewDIDCommV1Endpoint(" http://example.com") - return &vdrmock.MockVDRegistry{ + didDoc.Service[0].ServiceEndpoint = endpoint.NewDIDCommV1Endpoint(" http://example.com") + return &vdrmock.VDRegistry{ ResolveValue: didDoc, } }, @@ -382,8 +382,8 @@ func TestService_resolveDIDRelativeUrl(t *testing.T) { { name: "sendHTTPRequest error", fields: fields{ - getVDR: func() vdr.Registry { - return &vdrmock.MockVDRegistry{ + getVDR: func() vdrapi.Registry { + return &vdrmock.VDRegistry{ ResolveValue: createDIDDoc("did:trustbloc:abc"), } }, @@ -402,8 +402,8 @@ func TestService_resolveDIDRelativeUrl(t *testing.T) { { name: "identityHubResponse Unmarshal error", fields: fields{ - getVDR: func() vdr.Registry { - return &vdrmock.MockVDRegistry{ + getVDR: func() vdrapi.Registry { + return &vdrmock.VDRegistry{ ResolveValue: createDIDDoc("did:trustbloc:abc"), } }, @@ -426,8 +426,8 @@ func TestService_resolveDIDRelativeUrl(t *testing.T) { { name: "checkResponseStatus error", fields: fields{ - getVDR: func() vdr.Registry { - return &vdrmock.MockVDRegistry{ + getVDR: func() vdrapi.Registry { + return &vdrmock.VDRegistry{ ResolveValue: createDIDDoc("did:trustbloc:abc"), } }, @@ -483,7 +483,7 @@ func createDIDDoc(didID string) *did.Doc { service := did.Service{ ID: "did:example:123456789abcdefghi#did-communication", Type: serviceTypeIdentityHub, - ServiceEndpoint: model.NewDIDCommV1Endpoint(serviceEndpointURL), + ServiceEndpoint: endpoint.NewDIDCommV1Endpoint(serviceEndpointURL), RecipientKeys: []string{creator}, Priority: 0, } diff --git a/component/credentialstatus/internal/testutil/document_loader.go b/component/credentialstatus/internal/testutil/document_loader.go index 703288c22..b2a0d37f0 100644 --- a/component/credentialstatus/internal/testutil/document_loader.go +++ b/component/credentialstatus/internal/testutil/document_loader.go @@ -10,10 +10,10 @@ import ( _ "embed" //nolint:gci // required for go:embed "testing" - "github.com/hyperledger/aries-framework-go/pkg/doc/ld" - "github.com/hyperledger/aries-framework-go/pkg/doc/ldcontext" - mockldstore "github.com/hyperledger/aries-framework-go/pkg/mock/ld" - ldstore "github.com/hyperledger/aries-framework-go/pkg/store/ld" + ldcontext "github.com/hyperledger/aries-framework-go/component/models/ld/context" + "github.com/hyperledger/aries-framework-go/component/models/ld/documentloader" + mockldstore "github.com/hyperledger/aries-framework-go/component/models/ld/mock" + ldstore "github.com/hyperledger/aries-framework-go/component/models/ld/store" "github.com/stretchr/testify/require" ) @@ -47,7 +47,7 @@ func (p *mockLDStoreProvider) JSONLDRemoteProviderStore() ldstore.RemoteProvider } // DocumentLoader returns a document loader with preloaded test contexts. -func DocumentLoader(t *testing.T, extraContexts ...ldcontext.Document) *ld.DocumentLoader { +func DocumentLoader(t *testing.T, extraContexts ...ldcontext.Document) *documentloader.DocumentLoader { t.Helper() ldStore := &mockLDStoreProvider{ @@ -83,8 +83,8 @@ func DocumentLoader(t *testing.T, extraContexts ...ldcontext.Document) *ld.Docum }, } - loader, err := ld.NewDocumentLoader(ldStore, - ld.WithExtraContexts( + loader, err := documentloader.NewDocumentLoader(ldStore, + documentloader.WithExtraContexts( append(testContexts, extraContexts...)..., ), ) diff --git a/component/profile/reader/file/creator.go b/component/profile/reader/file/creator.go index 29884c62d..217168f77 100644 --- a/component/profile/reader/file/creator.go +++ b/component/profile/reader/file/creator.go @@ -11,15 +11,14 @@ import ( "strings" "github.com/hyperledger/aries-framework-go-ext/component/vdr/longform" - "github.com/hyperledger/aries-framework-go-ext/component/vdr/orb" - "github.com/hyperledger/aries-framework-go/pkg/common/model" - "github.com/hyperledger/aries-framework-go/pkg/doc/did" - "github.com/hyperledger/aries-framework-go/pkg/doc/jose/jwk" - "github.com/hyperledger/aries-framework-go/pkg/framework/aries/api/vdr" - "github.com/hyperledger/aries-framework-go/pkg/kms" - "github.com/hyperledger/aries-framework-go/pkg/vdr/key" + "github.com/hyperledger/aries-framework-go/component/kmscrypto/doc/jose/jwk" + "github.com/hyperledger/aries-framework-go/component/models/did" + "github.com/hyperledger/aries-framework-go/component/models/did/endpoint" + vdrapi "github.com/hyperledger/aries-framework-go/component/vdr/api" + "github.com/hyperledger/aries-framework-go/component/vdr/key" + kmsapi "github.com/hyperledger/aries-framework-go/spi/kms" "github.com/trustbloc/vcs/pkg/doc/vc/crypto" vcsverifiable "github.com/trustbloc/vcs/pkg/doc/verifiable" @@ -57,13 +56,13 @@ type Creator struct { // KeysCreator create keys for DID creation process. type KeysCreator interface { - CreateJWKKey(keyType kms.KeyType) (string, *jwk.JWK, error) - CreateCryptoKey(keyType kms.KeyType) (string, interface{}, error) + CreateJWKKey(keyType kmsapi.KeyType) (string, *jwk.JWK, error) + CreateCryptoKey(keyType kmsapi.KeyType) (string, interface{}, error) } // creatorConfig configures PublicDID. type creatorConfig struct { - vdr vdr.Registry + vdr vdrapi.Registry } // newCreator creates Creator. @@ -75,8 +74,8 @@ func newCreator(config *creatorConfig) *Creator { // publicDID creates a new public DID given a key manager. func (c *Creator) publicDID(method profileapi.Method, verificationMethodType vcsverifiable.SignatureType, - keyType kms.KeyType, km KeysCreator, didDomain, difDidOrigin string) (*createResult, error) { - methods := map[profileapi.Method]func(verificationMethodType vcsverifiable.SignatureType, keyType kms.KeyType, + keyType kmsapi.KeyType, km KeysCreator, didDomain, difDidOrigin string) (*createResult, error) { + methods := map[profileapi.Method]func(verificationMethodType vcsverifiable.SignatureType, keyType kmsapi.KeyType, km KeysCreator, didDomain, difDidOrigin string) (*createResult, error){ profileapi.KeyDIDMethod: c.keyDID, profileapi.OrbDIDMethod: c.createDID, @@ -95,7 +94,7 @@ func (c *Creator) publicDID(method profileapi.Method, verificationMethodType vcs func (c *Creator) createDID( verificationMethodType vcsverifiable.SignatureType, - keyType kms.KeyType, + keyType kmsapi.KeyType, km KeysCreator, _, _ string, ) (*createResult, error) { //nolint: unparam @@ -131,8 +130,8 @@ func (c *Creator) createDID( didResolution, err := c.config.vdr.Create( orb.DIDMethod, doc, - vdr.WithOption(orb.UpdatePublicKeyOpt, updateKey), - vdr.WithOption(orb.RecoveryPublicKeyOpt, recoveryKey), + vdrapi.WithOption(orb.UpdatePublicKeyOpt, updateKey), + vdrapi.WithOption(orb.RecoveryPublicKeyOpt, recoveryKey), ) if err != nil { @@ -150,7 +149,7 @@ func (c *Creator) createDID( func (c *Creator) keyDID( verificationMethodType vcsverifiable.SignatureType, - keyType kms.KeyType, + keyType kmsapi.KeyType, km KeysCreator, _, _ string, ) (*createResult, error) { //nolint: unparam @@ -179,7 +178,7 @@ func (c *Creator) keyDID( func (c *Creator) jwkDID( verificationMethodType vcsverifiable.SignatureType, - keyType kms.KeyType, + keyType kmsapi.KeyType, km KeysCreator, _, _ string, ) (*createResult, error) { //nolint: unparam @@ -206,7 +205,7 @@ func (c *Creator) jwkDID( }, nil } -func (c *Creator) webDID(verificationMethodType vcsverifiable.SignatureType, keyType kms.KeyType, +func (c *Creator) webDID(verificationMethodType vcsverifiable.SignatureType, keyType kmsapi.KeyType, km KeysCreator, didDomain, difDidOrigin string) (*createResult, error) { r, err := c.createDID(verificationMethodType, keyType, km, didDomain, difDidOrigin) if err != nil { @@ -233,7 +232,7 @@ type serviceEndpointData struct { func (c *Creator) ionDID( verificationMethodType vcsverifiable.SignatureType, - keyType kms.KeyType, + keyType kmsapi.KeyType, km KeysCreator, _, difDidOrigin string, ) (*createResult, error) { //nolint:unparam verMethod, err := newVerMethods(1, km, verificationMethodType, keyType) @@ -253,7 +252,7 @@ func (c *Creator) ionDID( if difDidOrigin != "" { didDoc.Service = []did.Service{{ID: "LinkedDomains", Type: "LinkedDomains", - ServiceEndpoint: model.NewDIDCoreEndpoint(&serviceEndpointData{Origins: []string{difDidOrigin + "/"}})}} + ServiceEndpoint: endpoint.NewDIDCoreEndpoint(&serviceEndpointData{Origins: []string{difDidOrigin + "/"}})}} } keys := [2]interface{}{} @@ -273,9 +272,9 @@ func (c *Creator) ionDID( didResolution, err := c.config.vdr.Create( "ion", didDoc, - vdr.WithOption(orb.UpdatePublicKeyOpt, updateKey), - vdr.WithOption(orb.RecoveryPublicKeyOpt, recoveryKey), - vdr.WithOption(longform.VDRAcceptOpt, "long-form"), + vdrapi.WithOption(orb.UpdatePublicKeyOpt, updateKey), + vdrapi.WithOption(orb.RecoveryPublicKeyOpt, recoveryKey), + vdrapi.WithOption(longform.VDRAcceptOpt, "long-form"), ) if err != nil { return nil, fmt.Errorf("did:ion failed to create long form did: %w", err) @@ -291,7 +290,7 @@ func (c *Creator) ionDID( } func newVerMethods(count int, km KeysCreator, verMethodType vcsverifiable.SignatureType, - keyType kms.KeyType) ([]*did.VerificationMethod, error) { + keyType kmsapi.KeyType) ([]*did.VerificationMethod, error) { methods := make([]*did.VerificationMethod, count) for i := 0; i < count; i++ { diff --git a/component/profile/reader/file/go.mod b/component/profile/reader/file/go.mod index 822d6596b..f4b72f449 100644 --- a/component/profile/reader/file/go.mod +++ b/component/profile/reader/file/go.mod @@ -7,10 +7,13 @@ go 1.19 require ( github.com/hashicorp/go-version v1.2.0 - github.com/hyperledger/aries-framework-go v0.3.3-0.20230810150537-71e132ba5968 github.com/hyperledger/aries-framework-go-ext/component/vdr/jwk v0.0.0-20221213152252-f0c83a5a922c github.com/hyperledger/aries-framework-go-ext/component/vdr/longform v0.0.0-20221213152252-f0c83a5a922c github.com/hyperledger/aries-framework-go-ext/component/vdr/orb v1.0.0-rc5.0.20221213152252-f0c83a5a922c + github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230622082138-3ffab1691857 + github.com/hyperledger/aries-framework-go/component/models v0.0.0-20230810150537-71e132ba5968 + github.com/hyperledger/aries-framework-go/component/vdr v0.0.0-20230622171716-43af8054a539 + github.com/hyperledger/aries-framework-go/spi v0.0.0-20230517133327-301aa0597250 github.com/spf13/cobra v1.7.0 github.com/trustbloc/cmdutil-go v1.0.0 github.com/trustbloc/logutil-go v1.0.0 @@ -68,14 +71,11 @@ require ( github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hyperledger/aries-framework-go v0.3.3-0.20230810150537-71e132ba5968 // indirect github.com/hyperledger/aries-framework-go-ext/component/storage/mongodb v0.0.0-20220728172020-0a8903e45149 // indirect github.com/hyperledger/aries-framework-go-ext/component/vdr/sidetree v1.0.0-rc3.0.20221104150937-07bfbe450122 // indirect - github.com/hyperledger/aries-framework-go/component/kmscrypto v0.0.0-20230622082138-3ffab1691857 // indirect github.com/hyperledger/aries-framework-go/component/log v0.0.0-20230427134832-0c9969493bd3 // indirect - github.com/hyperledger/aries-framework-go/component/models v0.0.0-20230810150537-71e132ba5968 // indirect github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20230427134832-0c9969493bd3 // indirect - github.com/hyperledger/aries-framework-go/component/vdr v0.0.0-20230622171716-43af8054a539 // indirect - github.com/hyperledger/aries-framework-go/spi v0.0.0-20230517133327-301aa0597250 // indirect github.com/hyperledger/fabric-amcl v0.0.0-20230602173724-9e02669dceb2 // indirect github.com/hyperledger/ursa-wrapper-go v0.3.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -154,14 +154,14 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.23.0 // indirect - golang.org/x/crypto v0.11.0 // indirect - golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691 // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect - golang.org/x/tools v0.11.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect + golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.55.0 // indirect google.golang.org/protobuf v1.30.0 // indirect diff --git a/component/profile/reader/file/go.sum b/component/profile/reader/file/go.sum index 2697c1783..721f1f8cf 100644 --- a/component/profile/reader/file/go.sum +++ b/component/profile/reader/file/go.sum @@ -1070,8 +1070,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1083,8 +1083,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691 h1:/yRP+0AN7mf5DkD3BAI6TOFnd51gEoDEb8o35jIFtgw= -golang.org/x/exp v0.0.0-20230728194245-b0cb94b80691/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= +golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1173,8 +1173,8 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su 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.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1289,8 +1289,8 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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= @@ -1306,8 +1306,8 @@ golang.org/x/text v0.3.6/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.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1382,8 +1382,8 @@ golang.org/x/tools v0.1.1/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.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= -golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8= -golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIEK/dEeq7uiqb5qBgQrZzIE7E= +golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/component/profile/reader/file/reader.go b/component/profile/reader/file/reader.go index 6dddd1cbb..1ed22fdb7 100644 --- a/component/profile/reader/file/reader.go +++ b/component/profile/reader/file/reader.go @@ -23,8 +23,8 @@ import ( cmdutils "github.com/trustbloc/cmdutil-go/pkg/utils/cmd" //nolint:typecheck "github.com/trustbloc/logutil-go/pkg/log" //nolint:typecheck - vdrpkg "github.com/hyperledger/aries-framework-go/pkg/vdr" - "github.com/hyperledger/aries-framework-go/pkg/vdr/key" + vdrpkg "github.com/hyperledger/aries-framework-go/component/vdr" + "github.com/hyperledger/aries-framework-go/component/vdr/key" vcskms "github.com/trustbloc/vcs/pkg/kms" profileapi "github.com/trustbloc/vcs/pkg/profile" diff --git a/go.mod b/go.mod index 89eccd49c..9a5a30a9b 100644 --- a/go.mod +++ b/go.mod @@ -47,6 +47,7 @@ require ( github.com/trustbloc/orb v1.0.0-rc4.0.20221129223433-07e05f2f6e0a github.com/trustbloc/vcs/component/oidc/fosite v0.0.0-20230724110323-79c5330617d6 github.com/valyala/fastjson v1.6.3 + github.com/xeipuuv/gojsonschema v1.2.0 go.mongodb.org/mongo-driver v1.11.4 go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo v0.40.0 go.opentelemetry.io/otel v1.14.0 @@ -195,7 +196,6 @@ require ( github.com/xdg-go/stringprep v1.0.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect go.opentelemetry.io/otel/metric v0.35.0 // indirect go.uber.org/atomic v1.9.0 // indirect