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{