Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/hid-noded/cmd/debug_extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func extendDebug(debugCmd *cobra.Command) *cobra.Command {
func bjjCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "bjj",
Short: "BabyJubJub commonds",
Short: "BabyJubJub commands, commons, commends",
}

cmd.AddCommand(bjjRandomCmd())
Expand Down
2 changes: 1 addition & 1 deletion cmd/hid-noded/cmd/debug_extensions_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func getDocumentSignature(doc types.SsiMsg, docProof *types.DocumentProof, priva
return "", err
}
default:
panic("recieved unsupported signing-algo. Supported algorithms are: [Ed25519Signature2020, EcdsaSecp256k1Signature2019, EcdsaSecp256k1RecoverySignature2020, BbsBlsSignature2020, BJJSignature2021]")
panic("received unsupported signing-algo. Supported algorithms are: [Ed25519Signature2020, EcdsaSecp256k1Signature2019, EcdsaSecp256k1RecoverySignature2020, BbsBlsSignature2020, BJJSignature2021]")
}

return signature, nil
Expand Down
30 changes: 15 additions & 15 deletions x/ssi/ld-context/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ type JsonLdDocument interface {
}

// It is a similar to `Did` struct, with the exception that the `context` attribute is of type
// `contextObject` instead of `[]string`, which is meant for accomodating Context JSON body
// having arbritrary attributes. It should be used for performing Canonization.
// `contextObject` instead of `[]string`, which is meant for accommodating Context JSON body
// having arbitrary attributes. It should be used for performing Canonization.
type JsonLdDidDocument struct {
Context []contextObject `json:"@context,omitempty"`
Id string `json:"id,omitempty"`
Expand All @@ -36,7 +36,7 @@ func (doc *JsonLdDidDocument) GetContext() []contextObject {
// NewJsonLdDidDocument returns a new JsonLdDid struct from input Did
func NewJsonLdDidDocument(didDoc *types.DidDocument) *JsonLdDidDocument {
if len(didDoc.Context) == 0 {
panic("atleast one context url must be provided for DID Document for Canonization")
panic("at least one context url must be provided for DID Document for Canonization")
}

var jsonLdDoc *JsonLdDidDocument = &JsonLdDidDocument{}
Expand Down Expand Up @@ -64,8 +64,8 @@ func NewJsonLdDidDocument(didDoc *types.DidDocument) *JsonLdDidDocument {
}

// It is a similar to `CredentialStatusDocument` struct, with the exception that the `context` attribute is of type
// `contextObject` instead of `[]string`, which is meant for accomodating Context JSON body
// having arbritrary attributes. It should be used for performing Canonization.
// `contextObject` instead of `[]string`, which is meant for accommodating Context JSON body
// having arbitrary attributes. It should be used for performing Canonization.
type JsonLdCredentialStatus struct {
Context []contextObject `json:"@context,omitempty"`
Id string `json:"id,omitempty"`
Expand Down Expand Up @@ -100,7 +100,7 @@ func (doc *JsonLdCredentialStatusBJJ) GetContext() []contextObject {
// NewJsonLdCredentialStatus returns a new JsonLdCredentialStatus struct from input Credential Status
func NewJsonLdCredentialStatus(credStatusDoc *types.CredentialStatusDocument) *JsonLdCredentialStatus {
if len(credStatusDoc.Context) == 0 {
panic("atleast one context url must be provided in the Credential Status Document for Canonization")
panic("at least one context url must be provided in the Credential Status Document for Canonization")
}

var jsonLdCredentialStatus *JsonLdCredentialStatus = &JsonLdCredentialStatus{}
Expand All @@ -126,7 +126,7 @@ func NewJsonLdCredentialStatus(credStatusDoc *types.CredentialStatusDocument) *J

func NewJsonLdCredentialStatusBJJ(credStatusDoc *types.CredentialStatusDocument, docProof *types.DocumentProof) *JsonLdCredentialStatusBJJ {
if len(credStatusDoc.Context) == 0 {
panic("atleast one context url must be provided in the Credential Status Document for Canonization")
panic("at least one context url must be provided in the Credential Status Document for Canonization")
}

var jsonLdCredentialStatus *JsonLdCredentialStatusBJJ = &JsonLdCredentialStatusBJJ{}
Expand Down Expand Up @@ -171,7 +171,7 @@ func (doc *JsonLdDocumentProof) GetContext() []contextObject {

func NewJsonLdDocumentProof(didDocProof *types.DocumentProof, didContexts []string) *JsonLdDocumentProof {
if len(didContexts) == 0 {
panic("atleast one context url must be provided for DID Document for Canonization")
panic("at least one context url must be provided for DID Document for Canonization")
}

var jsonLdDoc *JsonLdDocumentProof = &JsonLdDocumentProof{}
Expand All @@ -193,8 +193,8 @@ func NewJsonLdDocumentProof(didDocProof *types.DocumentProof, didContexts []stri
}

// It is a similar to `CredentialSchemaDocument` struct, with the exception that the `context` attribute is of type
// `contextObject` instead of `[]string`, which is meant for accomodating Context JSON body
// having arbritrary attributes. It should be used for performing Canonization.
// `contextObject` instead of `[]string`, which is meant for accommodating Context JSON body
// having arbitrary attributes. It should be used for performing Canonization.
type JsonLdCredentialSchema struct {
Context []contextObject `json:"@context,omitempty"`
Type string `json:"type,omitempty"`
Expand Down Expand Up @@ -228,7 +228,7 @@ func (doc *JsonLdCredentialSchemaBJJ) GetContext() []contextObject {

func NewJsonLdCredentialSchema(credSchema *types.CredentialSchemaDocument) *JsonLdCredentialSchema {
if len(credSchema.Context) == 0 {
panic("atleast one context url must be provided for DID Document for Canonization")
panic("at least one context url must be provided for DID Document for Canonization")
}

var jsonLdDoc *JsonLdCredentialSchema = &JsonLdCredentialSchema{}
Expand All @@ -254,7 +254,7 @@ func NewJsonLdCredentialSchema(credSchema *types.CredentialSchemaDocument) *Json

func NewJsonLdCredentialSchemaBJJ(credSchema *types.CredentialSchemaDocument, docProof *types.DocumentProof) *JsonLdCredentialSchemaBJJ {
if len(credSchema.Context) == 0 {
panic("atleast one context url must be provided for DID Document for Canonization")
panic("at least one context url must be provided for DID Document for Canonization")
}

var jsonLdDoc *JsonLdCredentialSchemaBJJ = &JsonLdCredentialSchemaBJJ{}
Expand Down Expand Up @@ -284,8 +284,8 @@ func NewJsonLdCredentialSchemaBJJ(credSchema *types.CredentialSchemaDocument, do
}

// It is a similar to `Did` struct, with the exception that the `context` attribute is of type
// `contextObject` instead of `[]string`, which is meant for accomodating Context JSON body
// having arbritrary attributes. It should be used for performing Canonization.
// `contextObject` instead of `[]string`, which is meant for accommodating Context JSON body
// having arbitrary attributes. It should be used for performing Canonization.
type JsonLdDidDocumentWithoutVM struct {
Context []contextObject `json:"@context,omitempty"`
Id string `json:"id,omitempty"`
Expand All @@ -307,7 +307,7 @@ func (doc *JsonLdDidDocumentWithoutVM) GetContext() []contextObject {
// NewJsonLdDidDocument returns a new JsonLdDid struct from input Did
func NewJsonLdDidDocumentWithoutVM(didDoc *types.DidDocument, docProof *types.DocumentProof) *JsonLdDidDocumentWithoutVM {
if len(didDoc.Context) == 0 {
panic("atleast one context url must be provided for DID Document for Canonization")
panic("at least one context url must be provided for DID Document for Canonization")
}

var jsonLdDoc *JsonLdDidDocumentWithoutVM = &JsonLdDidDocumentWithoutVM{}
Expand Down
2 changes: 1 addition & 1 deletion x/ssi/types/diddoc_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func isValidDidDocId(id string) error {
}
case MSINonBlockchainAccountId:
// Non Blockchain Account ID should be a string that supports alphanumeric characters,
// and dot (.) and hypen (-). The first character MUST NOT be dot (.) or hyphen (-).
// and dot (.) and hyphen (-). The first character MUST NOT be dot (.) or hyphen (-).
isValidMSI, err := regexp.MatchString(
"^[a-zA-Z0-9][a-zA-Z0-9.-]*$",
inputMSI,
Expand Down
4 changes: 2 additions & 2 deletions x/ssi/types/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ func (gs GenesisState) Validate() error {
maxChainNamespaceLength := 10

if len(namespace) > maxChainNamespaceLength {
return fmt.Errorf("chain namespace shouldn't shouldn't be more than 10, namespace recieved %s", namespace)
return fmt.Errorf("chain namespace shouldn't shouldn't be more than 10, namespace received %s", namespace)
}

if !regexPattern.MatchString(namespace) && len(namespace) != 0 {
return fmt.Errorf("chain namespace should be in alphanumeric format, namespace recieved %s", namespace)
return fmt.Errorf("chain namespace should be in alphanumeric format, namespace received %s", namespace)
}

return nil
Expand Down
4 changes: 2 additions & 2 deletions x/ssi/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.