From 153d868d51fe2ae98c37781fda74b065253011bd Mon Sep 17 00:00:00 2001 From: DaevMithran Date: Wed, 4 Sep 2024 17:18:33 +0530 Subject: [PATCH 01/13] fix: Fix jsonld errors in didDocument --- services/diddoc_service.go | 5 +++++ types/constants.go | 1 + 2 files changed, 6 insertions(+) diff --git a/services/diddoc_service.go b/services/diddoc_service.go index c7c61cc6..d389b4d5 100644 --- a/services/diddoc_service.go +++ b/services/diddoc_service.go @@ -53,6 +53,11 @@ func (dds DIDDocService) Resolve(did string, version string, contentType types.C result := types.DidResolution{Did: &didDoc, Metadata: *resolvedMetadata, ResolutionMetadata: didResolutionMetadata} if didResolutionMetadata.ContentType == types.DIDJSONLD || didResolutionMetadata.ContentType == types.JSONLD { didDoc.AddContext(types.DIDSchemaJSONLD) + + if len(didDoc.Service) > 0 { + didDoc.AddContext(types.DIFDIDConfigurationJSONLD) + } + for _, method := range didDoc.VerificationMethod { switch method.Type { case "Ed25519VerificationKey2020": diff --git a/types/constants.go b/types/constants.go index 6120d904..0468aec5 100644 --- a/types/constants.go +++ b/types/constants.go @@ -41,6 +41,7 @@ const ( Ed25519VerificationKey2020JSONLD = "https://w3id.org/security/suites/ed25519-2020/v1" Ed25519VerificationKey2018JSONLD = "https://w3id.org/security/suites/ed25519-2018/v1" JsonWebKey2020JSONLD = "https://w3id.org/security/suites/jws-2020/v1" + DIFDIDConfigurationJSONLD = "https://identity.foundation/.well-known/did-configuration/v1" ) const ( From 9450d4d2d6f32024fe2d8a61e71bb19f82adf92b Mon Sep 17 00:00:00 2001 From: DaevMithran Date: Wed, 4 Sep 2024 17:44:45 +0530 Subject: [PATCH 02/13] fix lint errors --- README.md | 8 ++++---- services/diddoc_service.go | 2 +- types/constants.go | 2 +- types/helper.go | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 981d7f2a..dcbbdd89 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ## ℹī¸ Overview -DID methods are expected to provide [standards-compliant methods of DID and DID Document ("DIDDoc") production](https://w3c.github.io/did-core/#production-and-consumption). The **cheqd DID Resolver** is designed to implement the [W3C DID *Resolution* specification](https://w3c-ccg.github.io/did-resolution/) for [`did:cheqd`](https://docs.cheqd.io/identity/architecture/adr-list/adr-001-cheqd-did-method) method. +DID methods are expected to provide [standards-compliant methods of DID and DID Document ("DIDDoc") production](https://w3c.github.io/did-core/#production-and-consumption). The **cheqd DID Resolver** is designed to implement the [W3C DID _Resolution_ specification](https://w3c.github.io/did-resolution/) for [`did:cheqd`](https://docs.cheqd.io/identity/architecture/adr-list/adr-001-cheqd-did-method) method. ### 📝 Architecture @@ -60,7 +60,7 @@ enable = true address = "0.0.0.0:9090" ``` -**Note**: If you're pointing a DID Resolver to your own node instance, by default `cheqd-node` instance gRPC endpoints are *not* served up with a TLS certificate. This means the `useTls` property would need to be set to `false`, unless you're otherwise using a load balancer that provides TLS connections to the gRPC port. +**Note**: If you're pointing a DID Resolver to your own node instance, by default `cheqd-node` instance gRPC endpoints are _not_ served up with a TLS certificate. This means the `useTls` property would need to be set to `false`, unless you're otherwise using a load balancer that provides TLS connections to the gRPC port. ## 🧑‍đŸ’ģ Building your own Docker image @@ -87,7 +87,7 @@ image: did-resolver:local Make sure you comment out the pre-existing `image` property that pulls in a container image from Github Container Registry, as shown above. -You can also do *just* a build with: +You can also do _just_ a build with: ```bash docker-compose -f docker/docker-compose.yml --env-file docker/docker-compose.env build --no-cache @@ -191,7 +191,7 @@ You can execute the tests as long as you have Ginkgo CLI installed, which target ginkgo -r --tags integration --race --randomize-suites --keep-going --trace ``` -**Note**: By default, the tests target `localhost:8080` as the port where it expects the running DID Resolver instance for testing. If your running instance is at a different address, you can override this by setting a value for the `TEST_HOST_ADDRESS` environment variable *before* executing the Ginkgo test suite. +**Note**: By default, the tests target `localhost:8080` as the port where it expects the running DID Resolver instance for testing. If your running instance is at a different address, you can override this by setting a value for the `TEST_HOST_ADDRESS` environment variable _before_ executing the Ginkgo test suite. ```bash export TEST_HOST_ADDRESS="where.is.did.resolver.running:port" diff --git a/services/diddoc_service.go b/services/diddoc_service.go index d389b4d5..668b56e9 100644 --- a/services/diddoc_service.go +++ b/services/diddoc_service.go @@ -169,7 +169,7 @@ func (dds DIDDocService) DereferenceSecondary(did string, version string, fragme return &result, nil } -func (dds DIDDocService) resolveMetadata(did string, metadata *didTypes.Metadata, contentType types.ContentType) (*types.ResolutionDidDocMetadata, *types.IdentityError) { +func (dds DIDDocService) resolveMetadata(did string, metadata *didTypes.Metadata, _ types.ContentType) (*types.ResolutionDidDocMetadata, *types.IdentityError) { resources, err := dds.ledgerService.QueryCollectionResources(did) if err != nil { return nil, err diff --git a/types/constants.go b/types/constants.go index 0468aec5..e7be1371 100644 --- a/types/constants.go +++ b/types/constants.go @@ -37,11 +37,11 @@ func (tKType TransformKeysType) IsSupported() bool { const ( DIDSchemaJSONLD = "https://www.w3.org/ns/did/v1" + DIFDIDConfigurationJSONLD = "https://identity.foundation/.well-known/did-configuration/v1" ResolutionSchemaJSONLD = "https://w3id.org/did-resolution/v1" Ed25519VerificationKey2020JSONLD = "https://w3id.org/security/suites/ed25519-2020/v1" Ed25519VerificationKey2018JSONLD = "https://w3id.org/security/suites/ed25519-2018/v1" JsonWebKey2020JSONLD = "https://w3id.org/security/suites/jws-2020/v1" - DIFDIDConfigurationJSONLD = "https://identity.foundation/.well-known/did-configuration/v1" ) const ( diff --git a/types/helper.go b/types/helper.go index 2a6744dd..5ed8a992 100644 --- a/types/helper.go +++ b/types/helper.go @@ -36,15 +36,15 @@ func SetupLogger(config Config) { func ParseGRPCEndpoint(configEndpoint string, networkName string) (*Network, error) { config := strings.Split(configEndpoint, ",") if len(config) != 3 { - return nil, fmt.Errorf(fmt.Sprintf("Endpoint config for %s is invalid: %s", networkName, configEndpoint)) + return nil, fmt.Errorf("endpoint config for %s is invalid: %s", networkName, configEndpoint) } useTls, err := strconv.ParseBool(config[1]) if err != nil { - return nil, fmt.Errorf(fmt.Sprintf("useTls value %s for %s endpoint is invalid", configEndpoint, networkName)) + return nil, fmt.Errorf("useTls value %s for %s endpoint is invalid", configEndpoint, networkName) } timeout, err := time.ParseDuration(config[2]) if err != nil { - return nil, fmt.Errorf(fmt.Sprintf("Timeout value %s for %s endpoint is invalid", configEndpoint, networkName)) + return nil, fmt.Errorf("timeout value %s for %s endpoint is invalid", configEndpoint, networkName) } return &Network{ From 8690834411d1bac4023d3e07cfe92fea458c8a69 Mon Sep 17 00:00:00 2001 From: DaevMithran Date: Mon, 9 Sep 2024 11:58:24 +0530 Subject: [PATCH 03/13] fix unit tests --- tests/unit/diddoc/common/did_doc_resolve_service_test.go | 1 + tests/unit/diddoc/request/diddoc_positive_cases_test.go | 2 +- tests/unit/diddoc/request/diddoc_transform_key_test.go | 2 +- .../unit/diddoc/request/request_service_resolve_did_doc_test.go | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/unit/diddoc/common/did_doc_resolve_service_test.go b/tests/unit/diddoc/common/did_doc_resolve_service_test.go index 60602b0e..03961b00 100644 --- a/tests/unit/diddoc/common/did_doc_resolve_service_test.go +++ b/tests/unit/diddoc/common/did_doc_resolve_service_test.go @@ -27,6 +27,7 @@ var _ = DescribeTable("Test Resolve method", func(testCase resolveDidDocTestCase (testCase.expectedError == nil) { testCase.expectedDIDResolution.Did.Context = []string{ types.DIDSchemaJSONLD, + types.DIFDIDConfigurationJSONLD, types.JsonWebKey2020JSONLD, } } else if testCase.expectedDIDResolution.Did != nil { diff --git a/tests/unit/diddoc/request/diddoc_positive_cases_test.go b/tests/unit/diddoc/request/diddoc_positive_cases_test.go index 3f996277..5c49ba9b 100644 --- a/tests/unit/diddoc/request/diddoc_positive_cases_test.go +++ b/tests/unit/diddoc/request/diddoc_positive_cases_test.go @@ -25,7 +25,7 @@ var _ = DescribeTable("Test Query handlers with versionId and versionTime params expectedDIDResolution := testCase.expectedResolution.(*types.DidResolution) if (testCase.resolutionType == "" || testCase.resolutionType == types.DIDJSONLD) && testCase.expectedError == nil { - expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.JsonWebKey2020JSONLD} + expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.DIFDIDConfigurationJSONLD, types.JsonWebKey2020JSONLD } } else if expectedDIDResolution.Did != nil { expectedDIDResolution.Did.Context = nil } diff --git a/tests/unit/diddoc/request/diddoc_transform_key_test.go b/tests/unit/diddoc/request/diddoc_transform_key_test.go index eddbb84e..20e56793 100644 --- a/tests/unit/diddoc/request/diddoc_transform_key_test.go +++ b/tests/unit/diddoc/request/diddoc_transform_key_test.go @@ -23,7 +23,7 @@ var _ = DescribeTable("Test Query handler with transformKeys params", func(testC expectedDIDResolution := testCase.expectedResolution.(*types.DidResolution) if (testCase.resolutionType == "" || testCase.resolutionType == types.DIDJSONLD) && testCase.expectedError == nil { - expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.JsonWebKey2020JSONLD} + expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.DIFDIDConfigurationJSONLD, types.JsonWebKey2020JSONLD } } else if expectedDIDResolution.Did != nil { expectedDIDResolution.Did.Context = nil } diff --git a/tests/unit/diddoc/request/request_service_resolve_did_doc_test.go b/tests/unit/diddoc/request/request_service_resolve_did_doc_test.go index 4013ae92..17c63682 100644 --- a/tests/unit/diddoc/request/request_service_resolve_did_doc_test.go +++ b/tests/unit/diddoc/request/request_service_resolve_did_doc_test.go @@ -31,7 +31,7 @@ var _ = DescribeTable("Test DIDDocEchoHandler function", func(testCase resolveDI context, rec := utils.SetupEmptyContext(request, testCase.resolutionType, utils.MockLedger) if (testCase.resolutionType == "" || testCase.resolutionType == types.DIDJSONLD) && testCase.expectedError == nil { - testCase.expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.JsonWebKey2020JSONLD} + testCase.expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.DIFDIDConfigurationJSONLD, types.JsonWebKey2020JSONLD } } else if testCase.expectedDIDResolution.Did != nil { testCase.expectedDIDResolution.Did.Context = nil } From f771d5bed9be31e81148547e25d01178551290e2 Mon Sep 17 00:00:00 2001 From: DaevMithran Date: Mon, 9 Sep 2024 14:10:30 +0530 Subject: [PATCH 04/13] fix integration tests --- .../diddoc/diddoc_indy_mainnet_did.json | 17 +-- .../diddoc_uuid_testnet_several_versions.json | 117 ++++++++-------- ...uuid_testnet_several_versions_between.json | 119 +++++++++-------- .../diddoc_version_indy_mainnet_did.json | 115 ++++++++-------- .../version_id/transform_key.json | 125 +++++++++--------- .../version_id/version_time.json | 117 ++++++++-------- .../version_time_&_transform_key.json | 117 ++++++++-------- .../testdata/query/metadata/diddoc_did.json | 115 ++++++++-------- .../diddoc_version_time_date_did.json | 115 ++++++++-------- .../version_time/diddoc_version_time_did.json | 117 ++++++++-------- 10 files changed, 523 insertions(+), 551 deletions(-) diff --git a/tests/integration/rest/testdata/diddoc/diddoc_indy_mainnet_did.json b/tests/integration/rest/testdata/diddoc/diddoc_indy_mainnet_did.json index bd62ee39..7c44488a 100644 --- a/tests/integration/rest/testdata/diddoc/diddoc_indy_mainnet_did.json +++ b/tests/integration/rest/testdata/diddoc/diddoc_indy_mainnet_did.json @@ -12,6 +12,7 @@ "didDocument": { "@context": [ "https://www.w3.org/ns/did/v1", + "https://identity.foundation/.well-known/did-configuration/v1", "https://w3id.org/security/suites/ed25519-2020/v1" ], "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN", @@ -23,16 +24,12 @@ "publicKeyMultibase": "z6Mkta7joRuvDh7UnoESdgpr9dDUMh5LvdoECDi3WGrJoscA" } ], - "authentication": [ - "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#key1" - ], + "authentication": ["did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#key1"], "service": [ { "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#website", "type": "LinkedDomains", - "serviceEndpoint": [ - "https://www.cheqd.io" - ] + "serviceEndpoint": ["https://www.cheqd.io"] }, { "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#non-fungible-image", @@ -44,16 +41,12 @@ { "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#twitter", "type": "LinkedDomains", - "serviceEndpoint": [ - "https://twitter.com/cheqd_io" - ] + "serviceEndpoint": ["https://twitter.com/cheqd_io"] }, { "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#linkedin", "type": "LinkedDomains", - "serviceEndpoint": [ - "https://www.linkedin.com/company/cheqd-identity/" - ] + "serviceEndpoint": ["https://www.linkedin.com/company/cheqd-identity/"] } ] }, diff --git a/tests/integration/rest/testdata/diddoc/diddoc_uuid_testnet_several_versions.json b/tests/integration/rest/testdata/diddoc/diddoc_uuid_testnet_several_versions.json index 383104b3..66d4e8dc 100644 --- a/tests/integration/rest/testdata/diddoc/diddoc_uuid_testnet_several_versions.json +++ b/tests/integration/rest/testdata/diddoc/diddoc_uuid_testnet_several_versions.json @@ -1,61 +1,60 @@ { - "@context": "https://w3id.org/did-resolution/v1", - "didResolutionMetadata": { - "contentType": "application/did+ld+json", - "retrieved": "2023-04-12T14:51:09Z", - "did": { - "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "method": "cheqd" - } - }, - "didDocument": { - "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/security/suites/ed25519-2018/v1" - ], - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "verificationMethod": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", - "type": "Ed25519VerificationKey2018", - "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" - } - ], - "authentication": [ - "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" - ], - "service": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://bar.example.com" - ] - } - ] - }, - "didDocumentMetadata": { - "created": "2023-03-06T09:36:55Z", - "updated": "2023-03-06T09:59:22Z", - "deactivated": true, - "versionId": "f790c9b9-4817-4b31-be43-b198e6e18071", - "previousVersionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", - "linkedResourceMetadata": [ - { - "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceName": "TestResource", - "resourceType": "TestType", - "mediaType": "text/plain; charset=utf-8", - "created": "2023-03-06T09:53:44Z", - "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", - "previousVersionId": null, - "nextVersionId": null, - "resourceVersion": "1.0" - } - ] + "@context": "https://w3id.org/did-resolution/v1", + "didResolutionMetadata": { + "contentType": "application/did+ld+json", + "retrieved": "2023-04-12T14:51:09Z", + "did": { + "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "method": "cheqd" } -} \ No newline at end of file + }, + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://identity.foundation/.well-known/did-configuration/v1", + "https://w3id.org/security/suites/ed25519-2018/v1" + ], + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "verificationMethod": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", + "type": "Ed25519VerificationKey2018", + "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" + } + ], + "authentication": [ + "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" + ], + "service": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", + "type": "LinkedDomains", + "serviceEndpoint": ["https://bar.example.com"] + } + ] + }, + "didDocumentMetadata": { + "created": "2023-03-06T09:36:55Z", + "updated": "2023-03-06T09:59:22Z", + "deactivated": true, + "versionId": "f790c9b9-4817-4b31-be43-b198e6e18071", + "previousVersionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", + "linkedResourceMetadata": [ + { + "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceName": "TestResource", + "resourceType": "TestType", + "mediaType": "text/plain; charset=utf-8", + "created": "2023-03-06T09:53:44Z", + "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", + "previousVersionId": null, + "nextVersionId": null, + "resourceVersion": "1.0" + } + ] + } +} diff --git a/tests/integration/rest/testdata/diddoc/diddoc_uuid_testnet_several_versions_between.json b/tests/integration/rest/testdata/diddoc/diddoc_uuid_testnet_several_versions_between.json index 7e81d0ec..c29f7433 100644 --- a/tests/integration/rest/testdata/diddoc/diddoc_uuid_testnet_several_versions_between.json +++ b/tests/integration/rest/testdata/diddoc/diddoc_uuid_testnet_several_versions_between.json @@ -1,62 +1,61 @@ { - "@context": "https://w3id.org/did-resolution/v1", - "didResolutionMetadata": { - "contentType": "application/did+ld+json", - "retrieved": "2023-04-12T15:00:53Z", - "did": { - "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "method": "cheqd" - } - }, - "didDocument": { - "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/security/suites/ed25519-2018/v1" - ], - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "verificationMethod": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", - "type": "Ed25519VerificationKey2018", - "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" - } - ], - "authentication": [ - "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" - ], - "service": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://bar.example.com" - ] - } - ] - }, - "didDocumentMetadata": { - "created": "2023-03-06T09:36:55Z", - "updated": "2023-03-06T09:39:48Z", - "deactivated": true, - "versionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", - "nextVersionId": "f790c9b9-4817-4b31-be43-b198e6e18071", - "previousVersionId": "0ce23d04-5b67-4ea6-a315-788588e53f4e", - "linkedResourceMetadata": [ - { - "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceName": "TestResource", - "resourceType": "TestType", - "mediaType": "text/plain; charset=utf-8", - "created": "2023-03-06T09:53:44Z", - "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", - "previousVersionId": null, - "nextVersionId": null, - "resourceVersion": "1.0" - } - ] + "@context": "https://w3id.org/did-resolution/v1", + "didResolutionMetadata": { + "contentType": "application/did+ld+json", + "retrieved": "2023-04-12T15:00:53Z", + "did": { + "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "method": "cheqd" } -} \ No newline at end of file + }, + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://identity.foundation/.well-known/did-configuration/v1", + "https://w3id.org/security/suites/ed25519-2018/v1" + ], + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "verificationMethod": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", + "type": "Ed25519VerificationKey2018", + "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" + } + ], + "authentication": [ + "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" + ], + "service": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", + "type": "LinkedDomains", + "serviceEndpoint": ["https://bar.example.com"] + } + ] + }, + "didDocumentMetadata": { + "created": "2023-03-06T09:36:55Z", + "updated": "2023-03-06T09:39:48Z", + "deactivated": true, + "versionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", + "nextVersionId": "f790c9b9-4817-4b31-be43-b198e6e18071", + "previousVersionId": "0ce23d04-5b67-4ea6-a315-788588e53f4e", + "linkedResourceMetadata": [ + { + "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceName": "TestResource", + "resourceType": "TestType", + "mediaType": "text/plain; charset=utf-8", + "created": "2023-03-06T09:53:44Z", + "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", + "previousVersionId": null, + "nextVersionId": null, + "resourceVersion": "1.0" + } + ] + } +} diff --git a/tests/integration/rest/testdata/diddoc_version/diddoc_version_indy_mainnet_did.json b/tests/integration/rest/testdata/diddoc_version/diddoc_version_indy_mainnet_did.json index fe41c019..67e5e1a8 100644 --- a/tests/integration/rest/testdata/diddoc_version/diddoc_version_indy_mainnet_did.json +++ b/tests/integration/rest/testdata/diddoc_version/diddoc_version_indy_mainnet_did.json @@ -1,64 +1,57 @@ { - "@context": "https://w3id.org/did-resolution/v1", - "didResolutionMetadata": { - "contentType": "application/did+ld+json", - "retrieved": "2023-03-24T12:50:08Z", - "did": { - "didString": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN", - "methodSpecificId": "Ps1ysXP2Ae6GBfxNhNQNKN", - "method": "cheqd" - } - }, - "didDocument": { - "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/security/suites/ed25519-2020/v1" - ], - "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN", - "verificationMethod": [ - { - "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#key1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN", - "publicKeyMultibase": "z6Mkta7joRuvDh7UnoESdgpr9dDUMh5LvdoECDi3WGrJoscA" - } - ], - "authentication": [ - "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#key1" - ], - "service": [ - { - "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#website", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://www.cheqd.io" - ] - }, - { - "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#non-fungible-image", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://gateway.ipfs.io/ipfs/bafybeihetj2ng3d74k7t754atv2s5dk76pcqtvxls6dntef3xa6rax25xe" - ] - }, - { - "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#twitter", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://twitter.com/cheqd_io" - ] - }, - { - "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#linkedin", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://www.linkedin.com/company/cheqd-identity/" - ] - } - ] - }, - "didDocumentMetadata": { - "created": "2022-04-05T11:49:19Z", - "versionId": "4fa8e367-c70e-533e-babf-3732d9761061" + "@context": "https://w3id.org/did-resolution/v1", + "didResolutionMetadata": { + "contentType": "application/did+ld+json", + "retrieved": "2023-03-24T12:50:08Z", + "did": { + "didString": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN", + "methodSpecificId": "Ps1ysXP2Ae6GBfxNhNQNKN", + "method": "cheqd" } + }, + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://identity.foundation/.well-known/did-configuration/v1", + "https://w3id.org/security/suites/ed25519-2020/v1" + ], + "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN", + "verificationMethod": [ + { + "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#key1", + "type": "Ed25519VerificationKey2020", + "controller": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN", + "publicKeyMultibase": "z6Mkta7joRuvDh7UnoESdgpr9dDUMh5LvdoECDi3WGrJoscA" + } + ], + "authentication": ["did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#key1"], + "service": [ + { + "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#website", + "type": "LinkedDomains", + "serviceEndpoint": ["https://www.cheqd.io"] + }, + { + "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#non-fungible-image", + "type": "LinkedDomains", + "serviceEndpoint": [ + "https://gateway.ipfs.io/ipfs/bafybeihetj2ng3d74k7t754atv2s5dk76pcqtvxls6dntef3xa6rax25xe" + ] + }, + { + "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#twitter", + "type": "LinkedDomains", + "serviceEndpoint": ["https://twitter.com/cheqd_io"] + }, + { + "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#linkedin", + "type": "LinkedDomains", + "serviceEndpoint": ["https://www.linkedin.com/company/cheqd-identity/"] + } + ] + }, + "didDocumentMetadata": { + "created": "2022-04-05T11:49:19Z", + "versionId": "4fa8e367-c70e-533e-babf-3732d9761061" + } } diff --git a/tests/integration/rest/testdata/query/diddoc_common/version_id/transform_key.json b/tests/integration/rest/testdata/query/diddoc_common/version_id/transform_key.json index 9d9dea2e..434df5a2 100644 --- a/tests/integration/rest/testdata/query/diddoc_common/version_id/transform_key.json +++ b/tests/integration/rest/testdata/query/diddoc_common/version_id/transform_key.json @@ -1,66 +1,65 @@ { - "@context": "https://w3id.org/did-resolution/v1", - "didResolutionMetadata": { - "contentType": "application/did+ld+json", - "retrieved": "2023-04-25T09:30:18Z", - "did": { - "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "method": "cheqd" - } - }, - "didDocument": { - "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/security/suites/ed25519-2018/v1" - ], - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "verificationMethod": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", - "type": "JsonWebKey2020", - "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "publicKeyJwk": { - "crv": "Ed25519", - "kty": "OKP", - "x": "oL8hiQFXJqrR7ZBRrw7KcvBtGwk12U9TOPrqsJjaIsM" - } - } - ], - "authentication": [ - "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" - ], - "service": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://bar.example.com" - ] - } - ] - }, - "didDocumentMetadata": { - "created": "2023-03-06T09:36:55Z", - "updated": "2023-03-06T09:39:48Z", - "deactivated": true, - "versionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", - "nextVersionId": "f790c9b9-4817-4b31-be43-b198e6e18071", - "previousVersionId": "0ce23d04-5b67-4ea6-a315-788588e53f4e", - "linkedResourceMetadata": [ - { - "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceName": "TestResource", - "resourceType": "TestType", - "mediaType": "text/plain; charset=utf-8", - "resourceVersion": "1.0", - "created": "2023-03-06T09:53:44Z", - "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", - "previousVersionId": null, - "nextVersionId": null - } - ] + "@context": "https://w3id.org/did-resolution/v1", + "didResolutionMetadata": { + "contentType": "application/did+ld+json", + "retrieved": "2023-04-25T09:30:18Z", + "did": { + "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "method": "cheqd" } + }, + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://identity.foundation/.well-known/did-configuration/v1", + "https://w3id.org/security/suites/ed25519-2018/v1" + ], + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "verificationMethod": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", + "type": "JsonWebKey2020", + "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "publicKeyJwk": { + "crv": "Ed25519", + "kty": "OKP", + "x": "oL8hiQFXJqrR7ZBRrw7KcvBtGwk12U9TOPrqsJjaIsM" + } + } + ], + "authentication": [ + "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" + ], + "service": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", + "type": "LinkedDomains", + "serviceEndpoint": ["https://bar.example.com"] + } + ] + }, + "didDocumentMetadata": { + "created": "2023-03-06T09:36:55Z", + "updated": "2023-03-06T09:39:48Z", + "deactivated": true, + "versionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", + "nextVersionId": "f790c9b9-4817-4b31-be43-b198e6e18071", + "previousVersionId": "0ce23d04-5b67-4ea6-a315-788588e53f4e", + "linkedResourceMetadata": [ + { + "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceName": "TestResource", + "resourceType": "TestType", + "mediaType": "text/plain; charset=utf-8", + "resourceVersion": "1.0", + "created": "2023-03-06T09:53:44Z", + "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", + "previousVersionId": null, + "nextVersionId": null + } + ] + } } diff --git a/tests/integration/rest/testdata/query/diddoc_common/version_id/version_time.json b/tests/integration/rest/testdata/query/diddoc_common/version_id/version_time.json index 09c62f3e..2701480e 100644 --- a/tests/integration/rest/testdata/query/diddoc_common/version_id/version_time.json +++ b/tests/integration/rest/testdata/query/diddoc_common/version_id/version_time.json @@ -1,62 +1,61 @@ { - "@context": "https://w3id.org/did-resolution/v1", - "didResolutionMetadata": { - "contentType": "application/did+ld+json", - "retrieved": "2023-04-25T09:29:12Z", - "did": { - "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "method": "cheqd" - } - }, - "didDocument": { - "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/security/suites/ed25519-2018/v1" - ], - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "verificationMethod": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", - "type": "Ed25519VerificationKey2018", - "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" - } - ], - "authentication": [ - "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" - ], - "service": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://bar.example.com" - ] - } - ] - }, - "didDocumentMetadata": { - "created": "2023-03-06T09:36:55Z", - "updated": "2023-03-06T09:39:48Z", - "deactivated": true, - "versionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", - "nextVersionId": "f790c9b9-4817-4b31-be43-b198e6e18071", - "previousVersionId": "0ce23d04-5b67-4ea6-a315-788588e53f4e", - "linkedResourceMetadata": [ - { - "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceName": "TestResource", - "resourceType": "TestType", - "mediaType": "text/plain; charset=utf-8", - "resourceVersion": "1.0", - "created": "2023-03-06T09:53:44Z", - "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", - "previousVersionId": null, - "nextVersionId": null - } - ] + "@context": "https://w3id.org/did-resolution/v1", + "didResolutionMetadata": { + "contentType": "application/did+ld+json", + "retrieved": "2023-04-25T09:29:12Z", + "did": { + "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "method": "cheqd" } + }, + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://identity.foundation/.well-known/did-configuration/v1", + "https://w3id.org/security/suites/ed25519-2018/v1" + ], + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "verificationMethod": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", + "type": "Ed25519VerificationKey2018", + "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" + } + ], + "authentication": [ + "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" + ], + "service": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", + "type": "LinkedDomains", + "serviceEndpoint": ["https://bar.example.com"] + } + ] + }, + "didDocumentMetadata": { + "created": "2023-03-06T09:36:55Z", + "updated": "2023-03-06T09:39:48Z", + "deactivated": true, + "versionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", + "nextVersionId": "f790c9b9-4817-4b31-be43-b198e6e18071", + "previousVersionId": "0ce23d04-5b67-4ea6-a315-788588e53f4e", + "linkedResourceMetadata": [ + { + "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceName": "TestResource", + "resourceType": "TestType", + "mediaType": "text/plain; charset=utf-8", + "resourceVersion": "1.0", + "created": "2023-03-06T09:53:44Z", + "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", + "previousVersionId": null, + "nextVersionId": null + } + ] + } } diff --git a/tests/integration/rest/testdata/query/diddoc_common/version_id/version_time_&_transform_key.json b/tests/integration/rest/testdata/query/diddoc_common/version_id/version_time_&_transform_key.json index 14bbf9f2..9eed0794 100644 --- a/tests/integration/rest/testdata/query/diddoc_common/version_id/version_time_&_transform_key.json +++ b/tests/integration/rest/testdata/query/diddoc_common/version_id/version_time_&_transform_key.json @@ -1,62 +1,61 @@ { - "@context": "https://w3id.org/did-resolution/v1", - "didResolutionMetadata": { - "contentType": "application/did+ld+json", - "retrieved": "2023-04-25T09:35:05Z", - "did": { - "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "method": "cheqd" - } - }, - "didDocument": { - "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/security/suites/ed25519-2018/v1" - ], - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "verificationMethod": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "publicKeyMultibase": "z6MkqGkKBhttMdqBvfUShfB2QxKJmbQtZbQ3FSzRnYr2unBU" - } - ], - "authentication": [ - "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" - ], - "service": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://bar.example.com" - ] - } - ] - }, - "didDocumentMetadata": { - "created": "2023-03-06T09:36:55Z", - "updated": "2023-03-06T09:39:48Z", - "deactivated": true, - "versionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", - "nextVersionId": "f790c9b9-4817-4b31-be43-b198e6e18071", - "previousVersionId": "0ce23d04-5b67-4ea6-a315-788588e53f4e", - "linkedResourceMetadata": [ - { - "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceName": "TestResource", - "resourceType": "TestType", - "mediaType": "text/plain; charset=utf-8", - "resourceVersion": "1.0", - "created": "2023-03-06T09:53:44Z", - "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", - "previousVersionId": null, - "nextVersionId": null - } - ] + "@context": "https://w3id.org/did-resolution/v1", + "didResolutionMetadata": { + "contentType": "application/did+ld+json", + "retrieved": "2023-04-25T09:35:05Z", + "did": { + "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "method": "cheqd" } + }, + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://identity.foundation/.well-known/did-configuration/v1", + "https://w3id.org/security/suites/ed25519-2018/v1" + ], + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "verificationMethod": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", + "type": "Ed25519VerificationKey2020", + "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "publicKeyMultibase": "z6MkqGkKBhttMdqBvfUShfB2QxKJmbQtZbQ3FSzRnYr2unBU" + } + ], + "authentication": [ + "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" + ], + "service": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", + "type": "LinkedDomains", + "serviceEndpoint": ["https://bar.example.com"] + } + ] + }, + "didDocumentMetadata": { + "created": "2023-03-06T09:36:55Z", + "updated": "2023-03-06T09:39:48Z", + "deactivated": true, + "versionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", + "nextVersionId": "f790c9b9-4817-4b31-be43-b198e6e18071", + "previousVersionId": "0ce23d04-5b67-4ea6-a315-788588e53f4e", + "linkedResourceMetadata": [ + { + "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceName": "TestResource", + "resourceType": "TestType", + "mediaType": "text/plain; charset=utf-8", + "resourceVersion": "1.0", + "created": "2023-03-06T09:53:44Z", + "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", + "previousVersionId": null, + "nextVersionId": null + } + ] + } } diff --git a/tests/integration/rest/testdata/query/metadata/diddoc_did.json b/tests/integration/rest/testdata/query/metadata/diddoc_did.json index 42437e74..5aba64eb 100644 --- a/tests/integration/rest/testdata/query/metadata/diddoc_did.json +++ b/tests/integration/rest/testdata/query/metadata/diddoc_did.json @@ -1,64 +1,57 @@ { - "@context": "https://w3id.org/did-resolution/v1", - "didResolutionMetadata": { - "contentType": "application/did+ld+json", - "retrieved": "2023-06-15T08:10:37Z", - "did": { - "didString": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN", - "methodSpecificId": "Ps1ysXP2Ae6GBfxNhNQNKN", - "method": "cheqd" - } - }, - "didDocument": { - "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/security/suites/ed25519-2020/v1" - ], - "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN", - "verificationMethod": [ - { - "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#key1", - "type": "Ed25519VerificationKey2020", - "controller": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN", - "publicKeyMultibase": "z6Mkta7joRuvDh7UnoESdgpr9dDUMh5LvdoECDi3WGrJoscA" - } - ], - "authentication": [ - "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#key1" - ], - "service": [ - { - "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#website", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://www.cheqd.io" - ] - }, - { - "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#non-fungible-image", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://gateway.ipfs.io/ipfs/bafybeihetj2ng3d74k7t754atv2s5dk76pcqtvxls6dntef3xa6rax25xe" - ] - }, - { - "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#twitter", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://twitter.com/cheqd_io" - ] - }, - { - "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#linkedin", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://www.linkedin.com/company/cheqd-identity/" - ] - } - ] - }, - "didDocumentMetadata": { - "created": "2022-04-05T11:49:19Z", - "versionId": "4fa8e367-c70e-533e-babf-3732d9761061" + "@context": "https://w3id.org/did-resolution/v1", + "didResolutionMetadata": { + "contentType": "application/did+ld+json", + "retrieved": "2023-06-15T08:10:37Z", + "did": { + "didString": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN", + "methodSpecificId": "Ps1ysXP2Ae6GBfxNhNQNKN", + "method": "cheqd" } + }, + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://identity.foundation/.well-known/did-configuration/v1", + "https://w3id.org/security/suites/ed25519-2020/v1" + ], + "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN", + "verificationMethod": [ + { + "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#key1", + "type": "Ed25519VerificationKey2020", + "controller": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN", + "publicKeyMultibase": "z6Mkta7joRuvDh7UnoESdgpr9dDUMh5LvdoECDi3WGrJoscA" + } + ], + "authentication": ["did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#key1"], + "service": [ + { + "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#website", + "type": "LinkedDomains", + "serviceEndpoint": ["https://www.cheqd.io"] + }, + { + "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#non-fungible-image", + "type": "LinkedDomains", + "serviceEndpoint": [ + "https://gateway.ipfs.io/ipfs/bafybeihetj2ng3d74k7t754atv2s5dk76pcqtvxls6dntef3xa6rax25xe" + ] + }, + { + "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#twitter", + "type": "LinkedDomains", + "serviceEndpoint": ["https://twitter.com/cheqd_io"] + }, + { + "id": "did:cheqd:mainnet:Ps1ysXP2Ae6GBfxNhNQNKN#linkedin", + "type": "LinkedDomains", + "serviceEndpoint": ["https://www.linkedin.com/company/cheqd-identity/"] + } + ] + }, + "didDocumentMetadata": { + "created": "2022-04-05T11:49:19Z", + "versionId": "4fa8e367-c70e-533e-babf-3732d9761061" + } } diff --git a/tests/integration/rest/testdata/query/version_time/diddoc_version_time_date_did.json b/tests/integration/rest/testdata/query/version_time/diddoc_version_time_date_did.json index 11d3ae6d..58c379b1 100644 --- a/tests/integration/rest/testdata/query/version_time/diddoc_version_time_date_did.json +++ b/tests/integration/rest/testdata/query/version_time/diddoc_version_time_date_did.json @@ -1,61 +1,60 @@ { - "@context": "https://w3id.org/did-resolution/v1", - "didResolutionMetadata": { - "contentType": "application/did+ld+json", - "retrieved": "2023-04-24T10:48:50Z", - "did": { - "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "method": "cheqd" - } - }, - "didDocument": { - "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/security/suites/ed25519-2018/v1" - ], - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "verificationMethod": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", - "type": "Ed25519VerificationKey2018", - "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" - } - ], - "authentication": [ - "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" - ], - "service": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://bar.example.com" - ] - } - ] - }, - "didDocumentMetadata": { - "created": "2023-03-06T09:36:55Z", - "updated": "2023-03-06T09:59:22Z", - "deactivated": true, - "versionId": "f790c9b9-4817-4b31-be43-b198e6e18071", - "previousVersionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", - "linkedResourceMetadata": [ - { - "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceName": "TestResource", - "resourceType": "TestType", - "mediaType": "text/plain; charset=utf-8", - "resourceVersion": "1.0", - "created": "2023-03-06T09:53:44Z", - "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", - "previousVersionId": null, - "nextVersionId": null - } - ] + "@context": "https://w3id.org/did-resolution/v1", + "didResolutionMetadata": { + "contentType": "application/did+ld+json", + "retrieved": "2023-04-24T10:48:50Z", + "did": { + "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "method": "cheqd" } + }, + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://identity.foundation/.well-known/did-configuration/v1", + "https://w3id.org/security/suites/ed25519-2018/v1" + ], + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "verificationMethod": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", + "type": "Ed25519VerificationKey2018", + "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" + } + ], + "authentication": [ + "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" + ], + "service": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", + "type": "LinkedDomains", + "serviceEndpoint": ["https://bar.example.com"] + } + ] + }, + "didDocumentMetadata": { + "created": "2023-03-06T09:36:55Z", + "updated": "2023-03-06T09:59:22Z", + "deactivated": true, + "versionId": "f790c9b9-4817-4b31-be43-b198e6e18071", + "previousVersionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", + "linkedResourceMetadata": [ + { + "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceName": "TestResource", + "resourceType": "TestType", + "mediaType": "text/plain; charset=utf-8", + "resourceVersion": "1.0", + "created": "2023-03-06T09:53:44Z", + "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", + "previousVersionId": null, + "nextVersionId": null + } + ] + } } diff --git a/tests/integration/rest/testdata/query/version_time/diddoc_version_time_did.json b/tests/integration/rest/testdata/query/version_time/diddoc_version_time_did.json index 763a0f59..a53c6acf 100644 --- a/tests/integration/rest/testdata/query/version_time/diddoc_version_time_did.json +++ b/tests/integration/rest/testdata/query/version_time/diddoc_version_time_did.json @@ -1,62 +1,61 @@ { - "@context": "https://w3id.org/did-resolution/v1", - "didResolutionMetadata": { - "contentType": "application/did+ld+json", - "retrieved": "2023-04-24T10:48:50Z", - "did": { - "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "method": "cheqd" - } - }, - "didDocument": { - "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/security/suites/ed25519-2018/v1" - ], - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "verificationMethod": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", - "type": "Ed25519VerificationKey2018", - "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" - } - ], - "authentication": [ - "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" - ], - "service": [ - { - "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", - "type": "LinkedDomains", - "serviceEndpoint": [ - "https://bar.example.com" - ] - } - ] - }, - "didDocumentMetadata": { - "created": "2023-03-06T09:36:55Z", - "updated": "2023-03-06T09:39:48Z", - "deactivated": true, - "versionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", - "nextVersionId": "f790c9b9-4817-4b31-be43-b198e6e18071", - "previousVersionId": "0ce23d04-5b67-4ea6-a315-788588e53f4e", - "linkedResourceMetadata": [ - { - "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", - "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", - "resourceName": "TestResource", - "resourceType": "TestType", - "mediaType": "text/plain; charset=utf-8", - "resourceVersion": "1.0", - "created": "2023-03-06T09:53:44Z", - "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", - "previousVersionId": null, - "nextVersionId": null - } - ] + "@context": "https://w3id.org/did-resolution/v1", + "didResolutionMetadata": { + "contentType": "application/did+ld+json", + "retrieved": "2023-04-24T10:48:50Z", + "did": { + "didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "method": "cheqd" } + }, + "didDocument": { + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://identity.foundation/.well-known/did-configuration/v1", + "https://w3id.org/security/suites/ed25519-2018/v1" + ], + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "verificationMethod": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", + "type": "Ed25519VerificationKey2018", + "controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" + } + ], + "authentication": [ + "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" + ], + "service": [ + { + "id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", + "type": "LinkedDomains", + "serviceEndpoint": ["https://bar.example.com"] + } + ] + }, + "didDocumentMetadata": { + "created": "2023-03-06T09:36:55Z", + "updated": "2023-03-06T09:39:48Z", + "deactivated": true, + "versionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", + "nextVersionId": "f790c9b9-4817-4b31-be43-b198e6e18071", + "previousVersionId": "0ce23d04-5b67-4ea6-a315-788588e53f4e", + "linkedResourceMetadata": [ + { + "resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", + "resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", + "resourceName": "TestResource", + "resourceType": "TestType", + "mediaType": "text/plain; charset=utf-8", + "resourceVersion": "1.0", + "created": "2023-03-06T09:53:44Z", + "checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", + "previousVersionId": null, + "nextVersionId": null + } + ] + } } From 5abd88bd80303a266b2db2617ecc3e63b4e21f4f Mon Sep 17 00:00:00 2001 From: Ankur Banerjee Date: Mon, 9 Sep 2024 18:51:10 +0200 Subject: [PATCH 05/13] make tidy, stick to go 1.21.x --- go.mod | 26 +++++++++++++------------- go.sum | 53 ++++++++++++++++++++++++++++------------------------- 2 files changed, 41 insertions(+), 38 deletions(-) diff --git a/go.mod b/go.mod index d3459e2e..14a78738 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/cheqd/did-resolver go 1.21 -toolchain go1.21.0 +toolchain go1.21.13 require ( github.com/cheqd/cheqd-node/api/v2 v2.2.0 @@ -12,14 +12,14 @@ require ( github.com/lestrrat-go/jwx v1.2.29 github.com/mr-tron/base58 v1.2.0 github.com/multiformats/go-multibase v0.2.0 - github.com/onsi/ginkgo/v2 v2.17.1 - github.com/onsi/gomega v1.33.0 + github.com/onsi/ginkgo/v2 v2.20.1 + github.com/onsi/gomega v1.34.1 github.com/rs/zerolog v1.32.0 github.com/spf13/viper v1.16.0 github.com/swaggo/echo-swagger v1.4.1 github.com/swaggo/swag v1.16.3 google.golang.org/grpc v1.63.2 - google.golang.org/protobuf v1.33.0 + google.golang.org/protobuf v1.34.1 ) require ( @@ -30,17 +30,17 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/spec v0.20.8 // indirect github.com/go-openapi/swag v0.22.3 // indirect - github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect + github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/labstack/gommon v0.4.2 // indirect @@ -66,13 +66,13 @@ require ( github.com/swaggo/files/v2 v2.0.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect - golang.org/x/crypto v0.22.0 // indirect - golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/sys v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.17.0 // indirect + golang.org/x/tools v0.24.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect diff --git a/go.sum b/go.sum index a826b9bf..6d4667d8 100644 --- a/go.sum +++ b/go.sum @@ -79,8 +79,8 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= @@ -96,8 +96,8 @@ github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-resty/resty/v2 v2.12.0 h1:rsVL8P90LFvkUYq/V5BTVe203WfRIU4gvcf+yfzJzGA= github.com/go-resty/resty/v2 v2.12.0/go.mod h1:o0yGPrkS3lOe1+eFajk6kBW8ScXzwU3hD69/gt2yB/0= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -154,8 +154,8 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -225,10 +225,10 @@ github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoR github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= -github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= -github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE= -github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= +github.com/onsi/ginkgo/v2 v2.20.1 h1:YlVIbqct+ZmnEph770q9Q7NVAz4wwIiVNahee6JyUzo= +github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= +github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -305,8 +305,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= 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= @@ -317,8 +317,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 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-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= -golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= 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= @@ -344,8 +344,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -383,8 +383,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -406,6 +406,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -451,8 +453,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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= @@ -469,8 +471,9 @@ 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.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -527,8 +530,8 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 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.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= -golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= 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= @@ -630,8 +633,8 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 1faa8d1bc7a9b4eb53f48604add4f99a8966685a Mon Sep 17 00:00:00 2001 From: Ankur Banerjee Date: Mon, 9 Sep 2024 18:56:00 +0200 Subject: [PATCH 06/13] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 30bff246..cefd4bd0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -38,7 +38,7 @@ jobs: cache: false - name: Run golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v5 with: version: v1.56.2 args: --config .github/linters/.golangci.yaml From 586db02ae4199826a064ae3f87bd11915dc72d37 Mon Sep 17 00:00:00 2001 From: Ankur Banerjee Date: Mon, 9 Sep 2024 18:57:27 +0200 Subject: [PATCH 07/13] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cefd4bd0..5af81d61 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -38,7 +38,7 @@ jobs: cache: false - name: Run golangci-lint - uses: golangci/golangci-lint-action@v5 + uses: golangci/golangci-lint-action@v4 with: version: v1.56.2 args: --config .github/linters/.golangci.yaml From 12505c8c9f4fb6eacc63b6c7fd1dc1396439774e Mon Sep 17 00:00:00 2001 From: Ankur Banerjee Date: Mon, 9 Sep 2024 19:05:21 +0200 Subject: [PATCH 08/13] Revert "make tidy, stick to go 1.21.x" This reverts commit 5abd88bd80303a266b2db2617ecc3e63b4e21f4f. --- go.mod | 26 +++++++++++++------------- go.sum | 53 +++++++++++++++++++++++++---------------------------- 2 files changed, 38 insertions(+), 41 deletions(-) diff --git a/go.mod b/go.mod index 14a78738..d3459e2e 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/cheqd/did-resolver go 1.21 -toolchain go1.21.13 +toolchain go1.21.0 require ( github.com/cheqd/cheqd-node/api/v2 v2.2.0 @@ -12,14 +12,14 @@ require ( github.com/lestrrat-go/jwx v1.2.29 github.com/mr-tron/base58 v1.2.0 github.com/multiformats/go-multibase v0.2.0 - github.com/onsi/ginkgo/v2 v2.20.1 - github.com/onsi/gomega v1.34.1 + github.com/onsi/ginkgo/v2 v2.17.1 + github.com/onsi/gomega v1.33.0 github.com/rs/zerolog v1.32.0 github.com/spf13/viper v1.16.0 github.com/swaggo/echo-swagger v1.4.1 github.com/swaggo/swag v1.16.3 google.golang.org/grpc v1.63.2 - google.golang.org/protobuf v1.34.1 + google.golang.org/protobuf v1.33.0 ) require ( @@ -30,17 +30,17 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/spec v0.20.8 // indirect github.com/go-openapi/swag v0.22.3 // indirect - github.com/go-task/slim-sprig/v3 v3.0.0 // indirect + github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect + github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/labstack/gommon v0.4.2 // indirect @@ -66,13 +66,13 @@ require ( github.com/swaggo/files/v2 v2.0.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect - golang.org/x/crypto v0.26.0 // indirect - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/net v0.28.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/text v0.17.0 // indirect + golang.org/x/crypto v0.22.0 // indirect + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.24.0 // indirect + golang.org/x/tools v0.17.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect diff --git a/go.sum b/go.sum index 6d4667d8..a826b9bf 100644 --- a/go.sum +++ b/go.sum @@ -79,8 +79,8 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= @@ -96,8 +96,8 @@ github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-resty/resty/v2 v2.12.0 h1:rsVL8P90LFvkUYq/V5BTVe203WfRIU4gvcf+yfzJzGA= github.com/go-resty/resty/v2 v2.12.0/go.mod h1:o0yGPrkS3lOe1+eFajk6kBW8ScXzwU3hD69/gt2yB/0= -github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= -github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -154,8 +154,8 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -225,10 +225,10 @@ github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoR github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/onsi/ginkgo/v2 v2.20.1 h1:YlVIbqct+ZmnEph770q9Q7NVAz4wwIiVNahee6JyUzo= -github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= -github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= -github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= +github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= +github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE= +github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -305,8 +305,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= 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= @@ -317,8 +317,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 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-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= +golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= 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= @@ -344,8 +344,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -383,8 +383,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -406,8 +406,6 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -453,8 +451,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 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= @@ -471,9 +469,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.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -530,8 +527,8 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 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.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= 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= @@ -633,8 +630,8 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From e5feb021c2d85ce20548e2b0cde6262b79565de1 Mon Sep 17 00:00:00 2001 From: Ankur Banerjee Date: Mon, 9 Sep 2024 19:06:13 +0200 Subject: [PATCH 09/13] Update go.mod --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index d3459e2e..86154827 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/cheqd/did-resolver go 1.21 -toolchain go1.21.0 +toolchain go1.21.13 require ( github.com/cheqd/cheqd-node/api/v2 v2.2.0 From faf31b26f2990dad1b8bbad9b1b880d8e9af8d00 Mon Sep 17 00:00:00 2001 From: Ankur Banerjee Date: Mon, 9 Sep 2024 19:07:46 +0200 Subject: [PATCH 10/13] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5af81d61..30bff246 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -38,7 +38,7 @@ jobs: cache: false - name: Run golangci-lint - uses: golangci/golangci-lint-action@v4 + uses: golangci/golangci-lint-action@v6 with: version: v1.56.2 args: --config .github/linters/.golangci.yaml From 83cf03f91a0341d800511d4fc5eec33f022d8d49 Mon Sep 17 00:00:00 2001 From: DaevMithran Date: Tue, 10 Sep 2024 15:59:21 +0530 Subject: [PATCH 11/13] Add context only for LinkedDomains --- services/diddoc_service.go | 7 +++++-- types/constants.go | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/services/diddoc_service.go b/services/diddoc_service.go index 668b56e9..075caff6 100644 --- a/services/diddoc_service.go +++ b/services/diddoc_service.go @@ -54,8 +54,11 @@ func (dds DIDDocService) Resolve(did string, version string, contentType types.C if didResolutionMetadata.ContentType == types.DIDJSONLD || didResolutionMetadata.ContentType == types.JSONLD { didDoc.AddContext(types.DIDSchemaJSONLD) - if len(didDoc.Service) > 0 { - didDoc.AddContext(types.DIFDIDConfigurationJSONLD) + for _, service := range didDoc.Service { + if service.Type == types.LinkedDomains { + didDoc.AddContext(types.DIFDIDConfigurationJSONLD) + break + } } for _, method := range didDoc.VerificationMethod { diff --git a/types/constants.go b/types/constants.go index e7be1371..39426c86 100644 --- a/types/constants.go +++ b/types/constants.go @@ -58,6 +58,7 @@ const ( VersionId string = "versionId" VersionTime string = "versionTime" TransformKeys string = "transformKeys" + LinkedDomains string = "LinkedDomains" Metadata string = "metadata" ServiceQ string = "service" RelativeRef string = "relativeRef" From 9e602271ec6324908ce678c45698ca5231b54fc0 Mon Sep 17 00:00:00 2001 From: DaevMithran Date: Tue, 10 Sep 2024 17:12:02 +0530 Subject: [PATCH 12/13] fix unit tests --- tests/constants/common.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/constants/common.go b/tests/constants/common.go index d8bca6a8..6715fcd4 100644 --- a/tests/constants/common.go +++ b/tests/constants/common.go @@ -7,6 +7,7 @@ import ( didTypes "github.com/cheqd/cheqd-node/api/v2/cheqd/did/v2" resourceTypes "github.com/cheqd/cheqd-node/api/v2/cheqd/resource/v2" + "github.com/cheqd/did-resolver/types" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -22,7 +23,7 @@ func generateVerificationMethod() didTypes.VerificationMethod { func generateService() didTypes.Service { return didTypes.Service{ Id: ExistentDid + "#" + ValidServiceId, - ServiceType: "DIDCommMessaging", + ServiceType: types.LinkedDomains, ServiceEndpoint: []string{"http://example.com"}, } } From 281953435ca21f2ba016aa255b15221a4f6c4a1f Mon Sep 17 00:00:00 2001 From: Ankur Banerjee Date: Tue, 10 Sep 2024 17:00:55 +0200 Subject: [PATCH 13/13] Rename to LinkedDomainsJSONLD --- services/diddoc_service.go | 2 +- tests/unit/diddoc/common/did_doc_resolve_service_test.go | 2 +- tests/unit/diddoc/request/diddoc_positive_cases_test.go | 2 +- tests/unit/diddoc/request/diddoc_transform_key_test.go | 2 +- .../unit/diddoc/request/request_service_resolve_did_doc_test.go | 2 +- types/constants.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/services/diddoc_service.go b/services/diddoc_service.go index 075caff6..c28a4d1c 100644 --- a/services/diddoc_service.go +++ b/services/diddoc_service.go @@ -56,7 +56,7 @@ func (dds DIDDocService) Resolve(did string, version string, contentType types.C for _, service := range didDoc.Service { if service.Type == types.LinkedDomains { - didDoc.AddContext(types.DIFDIDConfigurationJSONLD) + didDoc.AddContext(types.LinkedDomainsJSONLD) break } } diff --git a/tests/unit/diddoc/common/did_doc_resolve_service_test.go b/tests/unit/diddoc/common/did_doc_resolve_service_test.go index 03961b00..1c71089e 100644 --- a/tests/unit/diddoc/common/did_doc_resolve_service_test.go +++ b/tests/unit/diddoc/common/did_doc_resolve_service_test.go @@ -27,7 +27,7 @@ var _ = DescribeTable("Test Resolve method", func(testCase resolveDidDocTestCase (testCase.expectedError == nil) { testCase.expectedDIDResolution.Did.Context = []string{ types.DIDSchemaJSONLD, - types.DIFDIDConfigurationJSONLD, + types.LinkedDomainsJSONLD, types.JsonWebKey2020JSONLD, } } else if testCase.expectedDIDResolution.Did != nil { diff --git a/tests/unit/diddoc/request/diddoc_positive_cases_test.go b/tests/unit/diddoc/request/diddoc_positive_cases_test.go index 5c49ba9b..878915fa 100644 --- a/tests/unit/diddoc/request/diddoc_positive_cases_test.go +++ b/tests/unit/diddoc/request/diddoc_positive_cases_test.go @@ -25,7 +25,7 @@ var _ = DescribeTable("Test Query handlers with versionId and versionTime params expectedDIDResolution := testCase.expectedResolution.(*types.DidResolution) if (testCase.resolutionType == "" || testCase.resolutionType == types.DIDJSONLD) && testCase.expectedError == nil { - expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.DIFDIDConfigurationJSONLD, types.JsonWebKey2020JSONLD } + expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.LinkedDomainsJSONLD, types.JsonWebKey2020JSONLD} } else if expectedDIDResolution.Did != nil { expectedDIDResolution.Did.Context = nil } diff --git a/tests/unit/diddoc/request/diddoc_transform_key_test.go b/tests/unit/diddoc/request/diddoc_transform_key_test.go index 20e56793..d62da111 100644 --- a/tests/unit/diddoc/request/diddoc_transform_key_test.go +++ b/tests/unit/diddoc/request/diddoc_transform_key_test.go @@ -23,7 +23,7 @@ var _ = DescribeTable("Test Query handler with transformKeys params", func(testC expectedDIDResolution := testCase.expectedResolution.(*types.DidResolution) if (testCase.resolutionType == "" || testCase.resolutionType == types.DIDJSONLD) && testCase.expectedError == nil { - expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.DIFDIDConfigurationJSONLD, types.JsonWebKey2020JSONLD } + expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.LinkedDomainsJSONLD, types.JsonWebKey2020JSONLD} } else if expectedDIDResolution.Did != nil { expectedDIDResolution.Did.Context = nil } diff --git a/tests/unit/diddoc/request/request_service_resolve_did_doc_test.go b/tests/unit/diddoc/request/request_service_resolve_did_doc_test.go index 17c63682..72db51f7 100644 --- a/tests/unit/diddoc/request/request_service_resolve_did_doc_test.go +++ b/tests/unit/diddoc/request/request_service_resolve_did_doc_test.go @@ -31,7 +31,7 @@ var _ = DescribeTable("Test DIDDocEchoHandler function", func(testCase resolveDI context, rec := utils.SetupEmptyContext(request, testCase.resolutionType, utils.MockLedger) if (testCase.resolutionType == "" || testCase.resolutionType == types.DIDJSONLD) && testCase.expectedError == nil { - testCase.expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.DIFDIDConfigurationJSONLD, types.JsonWebKey2020JSONLD } + testCase.expectedDIDResolution.Did.Context = []string{types.DIDSchemaJSONLD, types.LinkedDomainsJSONLD, types.JsonWebKey2020JSONLD} } else if testCase.expectedDIDResolution.Did != nil { testCase.expectedDIDResolution.Did.Context = nil } diff --git a/types/constants.go b/types/constants.go index 39426c86..e871b82f 100644 --- a/types/constants.go +++ b/types/constants.go @@ -37,7 +37,7 @@ func (tKType TransformKeysType) IsSupported() bool { const ( DIDSchemaJSONLD = "https://www.w3.org/ns/did/v1" - DIFDIDConfigurationJSONLD = "https://identity.foundation/.well-known/did-configuration/v1" + LinkedDomainsJSONLD = "https://identity.foundation/.well-known/did-configuration/v1" ResolutionSchemaJSONLD = "https://w3id.org/did-resolution/v1" Ed25519VerificationKey2020JSONLD = "https://w3id.org/security/suites/ed25519-2020/v1" Ed25519VerificationKey2018JSONLD = "https://w3id.org/security/suites/ed25519-2018/v1"