diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml
index ae4a0929c..b7a56815b 100644
--- a/docs/static/openapi.yml
+++ b/docs/static/openapi.yml
@@ -9435,6 +9435,10 @@ paths:
in: query
required: false
type: boolean
+ - name: subjectKeyId
+ in: query
+ required: false
+ type: string
tags:
- Query
/dcl/pki/all-certificates/{subject}:
diff --git a/docs/transactions.md b/docs/transactions.md
index 23e2a4e08..474bfe806 100644
--- a/docs/transactions.md
+++ b/docs/transactions.md
@@ -170,7 +170,8 @@ Please make sure that TLS is enabled in gRPC, REST or Light Client Proxy for sec
| **GLOBAL - Work for all certificate types (DA, NOC)** | |
| [GET_CERT](transactions/pki.md#get_cert)
Gets a certificate (PAA, PAI, RCAC, ICAC) | CLI `dcld query pki cert --subject= --subject-key-id=`
GET `/dcl/pki/all-certificates/{subject}/{subject_key_id}` |
| [GET_ALL_CERTS](transactions/pki.md#get_all_certs)
Gets all certificates (PAA, PAI, RCAC, ICAC) | CLI `dcld query pki all-certs`
GET `/dcl/pki/all-certificates` |
-| [GET_ALL_CERTS_BY_SUBJECT](transactions/pki.md#get_all_certs_by_subject)
| CLI `dcld query pki all-subject-certs --subject=`
GET `/dcl/pki/all-certificates/{subject}` |
+| [GET_ALL_CERTS_BY_SUBJECT](transactions/pki.md#get_all_certs_by_subject)
Gets all certificates associated with a subject (PAA, PAI, RCAC, ICAC) | CLI `dcld query pki all-subject-certs --subject=`
GET `/dcl/pki/all-certificates/{subject}` |
+| [GET_ALL_CERTS_BY_SKID](transactions/pki.md#get_all_certs_by_skid)
Gets all certificates by the given subject key ID (PAA, PAI, RCAC, ICAC) | CLI `dcld query pki cert --subject-key-id=`
GET `/dcl/pki/all-certificates?subjectKeyId={subjectKeyId}` |
| [GET_CHILD_CERTS](transactions/pki.md#get_child_certs)
Gets all child certificates for the given certificate (PAA, PAI, RCAC, ICAC) | CLI `dcld query pki all-child-x509-certs --subject= --subject-key-id=`
GET `/dcl/pki/child-certificates/{subject}/{subject_key_id}` |
| **DA - Work for DA certificate types (PAA, PAI)** | |
| [PROPOSE_ADD_PAA](transactions/pki.md#propose_add_paa)
Proposes a new PAA (self-signed root certificate) | CLI `dcld tx pki propose-add-x509-root-cert --certificate=`
POST `/cosmos/tx/v1beta1/txs`([MsgProposeAddX509RootCert](https://github.com/zigbee-alliance/distributed-compliance-ledger/blob/master/proto/zigbeealliance/distributedcomplianceledger/pki/tx.proto#L34)) |
diff --git a/docs/transactions/pki.md b/docs/transactions/pki.md
index 61bf9b863..c50213825 100644
--- a/docs/transactions/pki.md
+++ b/docs/transactions/pki.md
@@ -67,6 +67,24 @@ Use [GET_ALL_REVOKED_NOC_ICA_CERTS](#get_all_revoked_noc_ica-icacs) to get a lis
- REST API:
- GET `/dcl/pki/all-certificates/{subject}`
+#### GET_ALL_CERTS_BY_SKID
+
+**Status: Implemented**
+
+Gets all certificates by the given subject key ID attribute. This query works for all types certificates (PAA, PAI, RCAC, ICAC).
+
+Revoked certificates are not returned.
+Use [GET_ALL_REVOKED_DA_CERTS](#get_all_revoked_da_certs) to get a list of all revoked DA certificates.
+Use [GET_ALL_REVOKED_NOC_ROOT_CERTS](#get_all_revoked_noc_root-rcacs) to get a list of all revoked Noc Root certificates.
+Use [GET_ALL_REVOKED_NOC_ICA_CERTS](#get_all_revoked_noc_ica-icacs) to get a list of all revoked Noc ICA certificates.
+
+- Parameters:
+ - subject_key_id: `string` - certificates's `Subject Key Id` in hex string format, e.g: `5A:88:0E:6C:36:53:D0:7F:B0:89:71:A3:F4:73:79:09:30:E6:2B:DB`
+- CLI command:
+ - `dcld query pki cert --subject-key-id=`
+- REST API:
+ - GET `/dcl/pki/all-certificates?subjectKeyId={subjectKeyId}`
+
#### GET_CHILD_CERTS
**Status: Implemented**
diff --git a/integration_tests/cli/pki-combine-certs.sh b/integration_tests/cli/pki-combine-certs.sh
index 23fa96e5a..3762a1a8a 100755
--- a/integration_tests/cli/pki-combine-certs.sh
+++ b/integration_tests/cli/pki-combine-certs.sh
@@ -283,6 +283,41 @@ response_does_not_contain "$result" "\"subjectKeyId\": \"$da_root_subject_key_id
test_divider
+echo "Request certificates by subject key id"
+echo "Request DA certificate using global command"
+result=$(dcld query pki cert --subject-key-id="$da_root_subject_key_id")
+echo $result | jq
+check_response "$result" "\"subjectKeyId\": \"$da_root_subject_key_id\""
+
+echo "Request NOC certificate using global command"
+result=$(dcld query pki cert --subject-key-id="$noc_root_subject_key_id")
+echo $result | jq
+check_response "$result" "\"subjectKeyId\": \"$noc_root_subject_key_id\""
+
+echo "Request DA certificate"
+result=$(dcld query pki x509-cert --subject-key-id="$da_root_subject_key_id")
+echo $result | jq
+check_response "$result" "\"subjectKeyId\": \"$da_root_subject_key_id\""
+
+echo "Request NOC certificate using DA command (must be empty)"
+result=$(dcld query pki x509-cert --subject="$noc_root_subject" --subject-key-id="$noc_root_subject_key_id")
+echo $result | jq
+check_response "$result" "Not Found"
+response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_root_subject_key_id\""
+
+echo "Request NOC Root certificate"
+result=$(dcld query pki noc-x509-cert --subject="$noc_root_subject" --subject-key-id="$noc_root_subject_key_id")
+echo $result | jq
+check_response "$result" "\"subjectKeyId\": \"$noc_root_subject_key_id\""
+
+echo "Request DA certificate using NOC command (must be empty)"
+result=$(dcld query pki noc-x509-cert --subject="$da_root_subject" --subject-key-id="$da_root_subject_key_id")
+echo $result | jq
+check_response "$result" "Not Found"
+response_does_not_contain "$result" "\"subjectKeyId\": \"$da_root_subject_key_id\""
+
+test_divider
+
echo "Request DA certificates by subject using global command"
result=$(dcld query pki all-subject-certs --subject=$da_root_subject)
echo $result | jq
diff --git a/integration_tests/grpc_rest/pki/helpers.go b/integration_tests/grpc_rest/pki/helpers.go
index c605aef40..549b8beaa 100644
--- a/integration_tests/grpc_rest/pki/helpers.go
+++ b/integration_tests/grpc_rest/pki/helpers.go
@@ -36,7 +36,7 @@ import (
TODO: provide tests for error cases
*/
-func GetAllProposedX509RootCerts(suite *utils.TestSuite) (res []pkitypes.ProposedCertificate, err error) {
+func GetAllProposedDaX509RootCerts(suite *utils.TestSuite) (res []pkitypes.ProposedCertificate, err error) {
if suite.Rest {
var resp pkitypes.QueryAllProposedCertificateResponse
err := suite.QueryREST("/dcl/pki/proposed-certificates", &resp)
@@ -63,7 +63,7 @@ func GetAllProposedX509RootCerts(suite *utils.TestSuite) (res []pkitypes.Propose
return res, nil
}
-func GetProposedX509RootCert(suite *utils.TestSuite, subject string, subjectKeyID string) (*pkitypes.ProposedCertificate, error) {
+func GetProposedDaX509RootCert(suite *utils.TestSuite, subject string, subjectKeyID string) (*pkitypes.ProposedCertificate, error) {
var res pkitypes.ProposedCertificate
if suite.Rest {
var resp pkitypes.QueryGetProposedCertificateResponse
@@ -100,14 +100,15 @@ func GetProposedX509RootCert(suite *utils.TestSuite, subject string, subjectKeyI
return &res, nil
}
-func GetAllX509Certs(suite *utils.TestSuite) (res []pkitypes.ApprovedCertificates, err error) {
- return getAllX509Certs(suite, "")
+func GetAllDaX509Certs(suite *utils.TestSuite) (res []pkitypes.ApprovedCertificates, err error) {
+ return getAllDaX509Certs(suite, "")
}
-func GetAllX509certsBySubjectKeyID(suite *utils.TestSuite, subjectKeyID string) (res []pkitypes.ApprovedCertificates, err error) {
- return getAllX509Certs(suite, subjectKeyID)
+
+func GetAllDaX509certsBySubjectKeyID(suite *utils.TestSuite, subjectKeyID string) (res []pkitypes.ApprovedCertificates, err error) {
+ return getAllDaX509Certs(suite, subjectKeyID)
}
-func getAllX509Certs(suite *utils.TestSuite, subjectKeyID string) (res []pkitypes.ApprovedCertificates, err error) {
+func getAllDaX509Certs(suite *utils.TestSuite, subjectKeyID string) (res []pkitypes.ApprovedCertificates, err error) {
if suite.Rest {
var resp pkitypes.QueryAllApprovedCertificatesResponse
err := suite.QueryREST(fmt.Sprintf("/dcl/pki/certificates?subjectKeyId=%s", subjectKeyID), &resp)
@@ -134,7 +135,7 @@ func getAllX509Certs(suite *utils.TestSuite, subjectKeyID string) (res []pkitype
return res, nil
}
-func GetX509Cert(suite *utils.TestSuite, subject string, subjectKeyID string) (*pkitypes.ApprovedCertificates, error) {
+func GetDaX509Cert(suite *utils.TestSuite, subject string, subjectKeyID string) (*pkitypes.ApprovedCertificates, error) {
var res pkitypes.ApprovedCertificates
if suite.Rest {
var resp pkitypes.QueryGetApprovedCertificatesResponse
@@ -171,7 +172,7 @@ func GetX509Cert(suite *utils.TestSuite, subject string, subjectKeyID string) (*
return &res, nil
}
-func GetAllRevokedX509Certs(suite *utils.TestSuite) (res []pkitypes.RevokedCertificates, err error) {
+func GetAllRevokedDaX509Certs(suite *utils.TestSuite) (res []pkitypes.RevokedCertificates, err error) {
if suite.Rest {
var resp pkitypes.QueryAllRevokedCertificatesResponse
err := suite.QueryREST("/dcl/pki/revoked-certificates", &resp)
@@ -198,7 +199,7 @@ func GetAllRevokedX509Certs(suite *utils.TestSuite) (res []pkitypes.RevokedCerti
return res, nil
}
-func GetRevokedX509Cert(suite *utils.TestSuite, subject string, subjectKeyID string) (*pkitypes.RevokedCertificates, error) {
+func GetRevokedDaX509Cert(suite *utils.TestSuite, subject string, subjectKeyID string) (*pkitypes.RevokedCertificates, error) {
var res pkitypes.RevokedCertificates
if suite.Rest {
var resp pkitypes.QueryGetRevokedCertificatesResponse
@@ -308,7 +309,7 @@ func getProposedRevocationX509Cert(suite *utils.TestSuite, subject string, subje
return &res, nil
}
-func GetAllRootX509Certs(suite *utils.TestSuite) (res pkitypes.ApprovedRootCertificates, err error) {
+func GetAllDaRootX509Certs(suite *utils.TestSuite) (res pkitypes.ApprovedRootCertificates, err error) {
if suite.Rest {
var resp pkitypes.QueryGetApprovedRootCertificatesResponse
err := suite.QueryREST("/dcl/pki/root-certificates", &resp)
@@ -335,7 +336,7 @@ func GetAllRootX509Certs(suite *utils.TestSuite) (res pkitypes.ApprovedRootCerti
return res, nil
}
-func GetAllRevokedRootX509Certs(suite *utils.TestSuite) (res pkitypes.RevokedRootCertificates, err error) {
+func GetAllRevokedDaRootX509Certs(suite *utils.TestSuite) (res pkitypes.RevokedRootCertificates, err error) {
if suite.Rest {
var resp pkitypes.QueryGetRevokedRootCertificatesResponse
err := suite.QueryREST("/dcl/pki/revoked-root-certificates", &resp)
@@ -362,7 +363,7 @@ func GetAllRevokedRootX509Certs(suite *utils.TestSuite) (res pkitypes.RevokedRoo
return res, nil
}
-func GetAllX509CertsBySubject(suite *utils.TestSuite, subject string) (*pkitypes.ApprovedCertificatesBySubject, error) {
+func GetAllDaX509CertsBySubject(suite *utils.TestSuite, subject string) (*pkitypes.ApprovedCertificatesBySubject, error) {
var res pkitypes.ApprovedCertificatesBySubject
if suite.Rest {
var resp pkitypes.QueryGetApprovedCertificatesBySubjectResponse
@@ -435,7 +436,7 @@ func GetAllChildX509Certs(suite *utils.TestSuite, subject string, subjectKeyID s
return &res, nil
}
-func GetAllRejectedX509RootCerts(suite *utils.TestSuite) (res []pkitypes.RejectedCertificate, err error) {
+func GetAllRejectedDaX509RootCerts(suite *utils.TestSuite) (res []pkitypes.RejectedCertificate, err error) {
if suite.Rest {
var resp pkitypes.QueryAllRejectedCertificatesResponse
err := suite.QueryREST("dcl/pki/rejected-certificates", &resp)
@@ -461,7 +462,7 @@ func GetAllRejectedX509RootCerts(suite *utils.TestSuite) (res []pkitypes.Rejecte
return res, nil
}
-func GetRejectedX509RootCert(suite *utils.TestSuite, subject string, subjectKeyID string) (*pkitypes.RejectedCertificate, error) {
+func GetRejectedDaX509RootCert(suite *utils.TestSuite, subject string, subjectKeyID string) (*pkitypes.RejectedCertificate, error) {
var res pkitypes.RejectedCertificate
if suite.Rest {
var resp pkitypes.QueryGetRejectedCertificatesResponse
@@ -597,9 +598,17 @@ func GetPkiRevocationDistributionPoint(suite *utils.TestSuite, vendorID int32, s
}
func GetAllCerts(suite *utils.TestSuite) (res []pkitypes.AllCertificates, err error) {
+ return getAllCerts(suite, "")
+}
+
+func GetAllCertsBySubjectKeyId(suite *utils.TestSuite, subjectKeyID string) (res []pkitypes.AllCertificates, err error) {
+ return getAllCerts(suite, subjectKeyID)
+}
+
+func getAllCerts(suite *utils.TestSuite, subjectKeyID string) (res []pkitypes.AllCertificates, err error) {
if suite.Rest {
var resp pkitypes.QueryAllCertificatesResponse
- err := suite.QueryREST("/dcl/pki/all-certificates", &resp)
+ err := suite.QueryREST(fmt.Sprintf("/dcl/pki/all-certificates?subjectKeyId=%s", subjectKeyID), &resp)
if err != nil {
return nil, err
}
@@ -612,7 +621,9 @@ func GetAllCerts(suite *utils.TestSuite) (res []pkitypes.AllCertificates, err er
pkiClient := pkitypes.NewQueryClient(grpcConn)
resp, err := pkiClient.CertificatesAll(
context.Background(),
- &pkitypes.QueryAllCertificatesRequest{},
+ &pkitypes.QueryAllCertificatesRequest{
+ SubjectKeyId: subjectKeyID,
+ },
)
if err != nil {
return nil, err
@@ -699,22 +710,22 @@ func GetAllCertsBySubject(suite *utils.TestSuite, subject string) (*pkitypes.All
//nolint:funlen
func Demo(suite *utils.TestSuite) {
// All requests return empty or 404 value
- proposedCertificates, _ := GetAllProposedX509RootCerts(suite)
+ proposedCertificates, _ := GetAllProposedDaX509RootCerts(suite)
require.Equal(suite.T, 0, len(proposedCertificates))
- _, err := GetProposedX509RootCert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
+ _, err := GetProposedDaX509RootCert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
suite.AssertNotFound(err)
- certificates, _ := GetAllX509Certs(suite)
+ certificates, _ := GetAllDaX509Certs(suite)
require.Equal(suite.T, 0, len(certificates))
- _, err = GetX509Cert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
suite.AssertNotFound(err)
- revokedCertificates, _ := GetAllRevokedX509Certs(suite)
+ revokedCertificates, _ := GetAllRevokedDaX509Certs(suite)
require.Equal(suite.T, 0, len(revokedCertificates))
- _, err = GetRevokedX509Cert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
+ _, err = GetRevokedDaX509Cert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
suite.AssertNotFound(err)
proposedRevocationCertificates, _ := GetAllProposedRevocationX509Certs(suite)
@@ -723,21 +734,24 @@ func Demo(suite *utils.TestSuite) {
_, err = GetProposedRevocationX509Cert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
suite.AssertNotFound(err)
- rootCertificates, _ := GetAllRootX509Certs(suite)
+ rootCertificates, _ := GetAllDaRootX509Certs(suite)
require.Equal(suite.T, 0, len(rootCertificates.Certs))
- revokedRootCertificates, _ := GetAllRevokedRootX509Certs(suite)
+ revokedRootCertificates, _ := GetAllRevokedDaRootX509Certs(suite)
require.Equal(suite.T, 0, len(revokedRootCertificates.Certs))
_, err = GetAllChildX509Certs(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
suite.AssertNotFound(err)
- _, err = GetAllX509CertsBySubject(suite, testconstants.RootSubject)
+ _, err = GetAllDaX509CertsBySubject(suite, testconstants.RootSubject)
suite.AssertNotFound(err)
allCertificates, _ := GetAllCerts(suite)
require.Equal(suite.T, 0, len(allCertificates))
+ allCertificatesBySkid, _ := GetAllCertsBySubjectKeyId(suite, testconstants.GoogleSubjectKeyID)
+ require.Equal(suite.T, 0, len(allCertificatesBySkid))
+
_, err = GetAllCertsBySubject(suite, testconstants.RootSubject)
suite.AssertNotFound(err)
@@ -809,35 +823,35 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Request all proposed Root certificates
- proposedCertificates, _ = GetAllProposedX509RootCerts(suite)
+ proposedCertificates, _ = GetAllProposedDaX509RootCerts(suite)
require.Equal(suite.T, 1, len(proposedCertificates))
require.Equal(suite.T, testconstants.RootSubject, proposedCertificates[0].Subject)
require.Equal(suite.T, testconstants.RootSubjectKeyID, proposedCertificates[0].SubjectKeyId)
require.Equal(suite.T, testconstants.RootSubjectAsText, proposedCertificates[0].SubjectAsText)
// Request all approved certificates
- certificates, _ = GetAllX509Certs(suite)
+ certificates, _ = GetAllDaX509Certs(suite)
require.Equal(suite.T, 0, len(certificates))
// Request proposed Root certificate
- proposedCertificate, _ := GetProposedX509RootCert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
+ proposedCertificate, _ := GetProposedDaX509RootCert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
require.Equal(suite.T, testconstants.RootCertPem, proposedCertificate.PemCert)
require.Equal(suite.T, jackAccount.Address, proposedCertificate.Owner)
require.Equal(suite.T, 1, len(proposedCertificate.Approvals))
// Request all proposed Root certificates
- proposedCertificates, _ = GetAllProposedX509RootCerts(suite)
+ proposedCertificates, _ = GetAllProposedDaX509RootCerts(suite)
require.Equal(suite.T, 1, len(proposedCertificates))
require.Equal(suite.T, testconstants.RootSubject, proposedCertificates[0].Subject)
require.Equal(suite.T, testconstants.RootSubjectKeyID, proposedCertificates[0].SubjectKeyId)
require.Equal(suite.T, testconstants.RootSubjectAsText, proposedCertificates[0].SubjectAsText)
// Request all approved certificates
- certificates, _ = GetAllX509Certs(suite)
+ certificates, _ = GetAllDaX509Certs(suite)
require.Equal(suite.T, 0, len(certificates))
// Request proposed Root certificate
- proposedCertificate, _ = GetProposedX509RootCert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
+ proposedCertificate, _ = GetProposedDaX509RootCert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
require.Equal(suite.T, testconstants.RootCertPem, proposedCertificate.PemCert)
require.Equal(suite.T, jackAccount.Address, proposedCertificate.Owner)
require.True(suite.T, proposedCertificate.HasApprovalFrom(jackAccount.Address))
@@ -863,12 +877,12 @@ func Demo(suite *utils.TestSuite) {
require.ErrorContains(suite.T, err, "vid is not empty")
// Request all proposed Root certificates
- proposedCertificates, _ = GetAllProposedX509RootCerts(suite)
+ proposedCertificates, _ = GetAllProposedDaX509RootCerts(suite)
require.Equal(suite.T, 0, len(proposedCertificates))
// Request all approved certificates
- certificates, _ = GetAllX509Certs(suite)
- certsBySubjectKeyID, _ := GetAllX509certsBySubjectKeyID(suite, testconstants.RootSubjectKeyID)
+ certificates, _ = GetAllDaX509Certs(suite)
+ certsBySubjectKeyID, _ := GetAllDaX509certsBySubjectKeyID(suite, testconstants.RootSubjectKeyID)
for _, certs := range [][]pkitypes.ApprovedCertificates{certificates, certsBySubjectKeyID} {
require.Equal(suite.T, 1, len(certs))
require.Equal(suite.T, testconstants.RootSubjectKeyID, certs[0].SubjectKeyId)
@@ -877,13 +891,13 @@ func Demo(suite *utils.TestSuite) {
}
// Request all approved Root certificates
- rootCertificates, _ = GetAllRootX509Certs(suite)
+ rootCertificates, _ = GetAllDaRootX509Certs(suite)
require.Equal(suite.T, 1, len(rootCertificates.Certs))
require.Equal(suite.T, testconstants.RootSubject, rootCertificates.Certs[0].Subject)
require.Equal(suite.T, testconstants.RootSubjectKeyID, rootCertificates.Certs[0].SubjectKeyId)
// Request approved Root certificate
- certificate, _ := GetX509Cert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
+ certificate, _ := GetDaX509Cert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
require.Equal(suite.T, testconstants.RootSubject, certificate.Subject)
require.Equal(suite.T, testconstants.RootSubjectKeyID, certificate.SubjectKeyId)
require.Equal(suite.T, testconstants.RootSubjectAsText, certificate.Certs[0].SubjectAsText)
@@ -909,11 +923,11 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Request all proposed Root certificates
- proposedCertificates, _ = GetAllProposedX509RootCerts(suite)
+ proposedCertificates, _ = GetAllProposedDaX509RootCerts(suite)
require.Equal(suite.T, 0, len(proposedCertificates))
// Request all approved certificates
- certificates, _ = GetAllX509Certs(suite)
+ certificates, _ = GetAllDaX509Certs(suite)
require.Equal(suite.T, 2, len(certificates))
require.Equal(suite.T, testconstants.RootSubject, certificates[0].Subject)
require.Equal(suite.T, testconstants.RootSubjectKeyID, certificates[0].SubjectKeyId)
@@ -923,13 +937,13 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, testconstants.IntermediateSubjectAsText, certificates[1].Certs[0].SubjectAsText)
// Request all approved Root certificates
- rootCertificates, _ = GetAllRootX509Certs(suite)
+ rootCertificates, _ = GetAllDaRootX509Certs(suite)
require.Equal(suite.T, 1, len(rootCertificates.Certs))
require.Equal(suite.T, testconstants.RootSubject, rootCertificates.Certs[0].Subject)
require.Equal(suite.T, testconstants.RootSubjectKeyID, rootCertificates.Certs[0].SubjectKeyId)
// Request Intermediate certificate
- certificate, _ = GetX509Cert(suite, testconstants.IntermediateSubject, testconstants.IntermediateSubjectKeyID)
+ certificate, _ = GetDaX509Cert(suite, testconstants.IntermediateSubject, testconstants.IntermediateSubjectKeyID)
require.Equal(suite.T, testconstants.IntermediateSubject, certificate.Subject)
require.Equal(suite.T, testconstants.IntermediateSubjectKeyID, certificate.SubjectKeyId)
require.Equal(suite.T, testconstants.IntermediateSubjectAsText, certificate.Certs[0].SubjectAsText)
@@ -947,11 +961,11 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Request all proposed Root certificates
- proposedCertificates, _ = GetAllProposedX509RootCerts(suite)
+ proposedCertificates, _ = GetAllProposedDaX509RootCerts(suite)
require.Equal(suite.T, 0, len(proposedCertificates))
// Request all approved certificates
- certificates, _ = GetAllX509Certs(suite)
+ certificates, _ = GetAllDaX509Certs(suite)
require.Equal(suite.T, 3, len(certificates))
require.Equal(suite.T, testconstants.LeafSubject, certificates[0].Subject)
require.Equal(suite.T, testconstants.LeafSubjectKeyID, certificates[0].SubjectKeyId)
@@ -964,13 +978,13 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, testconstants.IntermediateSubjectAsText, certificates[2].Certs[0].SubjectAsText)
// Request all approved Root certificates
- rootCertificates, _ = GetAllRootX509Certs(suite)
+ rootCertificates, _ = GetAllDaRootX509Certs(suite)
require.Equal(suite.T, 1, len(rootCertificates.Certs))
require.Equal(suite.T, testconstants.RootSubject, rootCertificates.Certs[0].Subject)
require.Equal(suite.T, testconstants.RootSubjectKeyID, rootCertificates.Certs[0].SubjectKeyId)
// Request Leaf certificate
- certificate, _ = GetX509Cert(suite, testconstants.LeafSubject, testconstants.LeafSubjectKeyID)
+ certificate, _ = GetDaX509Cert(suite, testconstants.LeafSubject, testconstants.LeafSubjectKeyID)
require.Equal(suite.T, testconstants.LeafSubject, certificate.Subject)
require.Equal(suite.T, testconstants.LeafSubjectKeyID, certificate.SubjectKeyId)
require.Equal(suite.T, 1, len(certificate.Certs))
@@ -982,17 +996,17 @@ func Demo(suite *utils.TestSuite) {
require.False(suite.T, certificate.Certs[0].IsRoot)
// Request all Subject certificates
- subjectCertificates, _ := GetAllX509CertsBySubject(suite, testconstants.LeafSubject)
+ subjectCertificates, _ := GetAllDaX509CertsBySubject(suite, testconstants.LeafSubject)
require.Equal(suite.T, testconstants.LeafSubject, subjectCertificates.Subject)
require.Equal(suite.T, 1, len(subjectCertificates.SubjectKeyIds))
require.Equal(suite.T, testconstants.LeafSubjectKeyID, subjectCertificates.SubjectKeyIds[0])
- subjectCertificates, _ = GetAllX509CertsBySubject(suite, testconstants.IntermediateSubject)
+ subjectCertificates, _ = GetAllDaX509CertsBySubject(suite, testconstants.IntermediateSubject)
require.Equal(suite.T, testconstants.IntermediateSubject, subjectCertificates.Subject)
require.Equal(suite.T, 1, len(subjectCertificates.SubjectKeyIds))
require.Equal(suite.T, testconstants.IntermediateSubjectKeyID, subjectCertificates.SubjectKeyIds[0])
- subjectCertificates, _ = GetAllX509CertsBySubject(suite, testconstants.RootSubject)
+ subjectCertificates, _ = GetAllDaX509CertsBySubject(suite, testconstants.RootSubject)
require.Equal(suite.T, testconstants.RootSubject, subjectCertificates.Subject)
require.Equal(suite.T, 1, len(subjectCertificates.SubjectKeyIds))
require.Equal(suite.T, testconstants.RootSubjectKeyID, subjectCertificates.SubjectKeyIds[0])
@@ -1002,11 +1016,11 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, 0, len(proposedRevocationCertificates))
// Request all revoked certificates
- revokedCertificates, _ = GetAllRevokedX509Certs(suite)
+ revokedCertificates, _ = GetAllRevokedDaX509Certs(suite)
require.Equal(suite.T, 0, len(revokedCertificates))
// Request all revoked Root certificates
- revokedRootCertificates, _ = GetAllRevokedRootX509Certs(suite)
+ revokedRootCertificates, _ = GetAllRevokedDaRootX509Certs(suite)
require.Equal(suite.T, 0, len(revokedRootCertificates.Certs))
// Get all child certificates
@@ -1030,6 +1044,11 @@ func Demo(suite *utils.TestSuite) {
allCertificates, _ = GetAllCerts(suite)
require.Equal(suite.T, 3, len(allCertificates))
+ allCertificatesBySkid, _ = GetAllCertsBySubjectKeyId(suite, testconstants.RootSubjectKeyID)
+ require.Equal(suite.T, 1, len(allCertificatesBySkid))
+ require.Equal(suite.T, testconstants.RootSubjectKeyID, allCertificatesBySkid[0].SubjectKeyId)
+ require.Equal(suite.T, testconstants.RootSubject, allCertificatesBySkid[0].Certs[0].Subject)
+
// Request all Subject certificates
allSubjectCertificates, _ := GetAllCertsBySubject(suite, testconstants.LeafSubject)
require.Equal(suite.T, testconstants.LeafSubject, allSubjectCertificates.Subject)
@@ -1071,7 +1090,7 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, 0, len(proposedRevocationCertificates))
// Request all revoked certificates
- revokedCertificates, _ = GetAllRevokedX509Certs(suite)
+ revokedCertificates, _ = GetAllRevokedDaX509Certs(suite)
require.Equal(suite.T, 2, len(revokedCertificates))
require.Equal(suite.T, testconstants.LeafSubject, revokedCertificates[0].Subject)
require.Equal(suite.T, testconstants.LeafSubjectKeyID, revokedCertificates[0].SubjectKeyId)
@@ -1081,11 +1100,11 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, testconstants.IntermediateSubjectAsText, revokedCertificates[1].Certs[0].SubjectAsText)
// Request all revoked Root certificates
- revokedRootCertificates, _ = GetAllRevokedRootX509Certs(suite)
+ revokedRootCertificates, _ = GetAllRevokedDaRootX509Certs(suite)
require.Equal(suite.T, 0, len(revokedRootCertificates.Certs))
// Request revoked Intermediate certificate
- revokedCertificate, _ := GetRevokedX509Cert(suite, testconstants.IntermediateSubject, testconstants.IntermediateSubjectKeyID)
+ revokedCertificate, _ := GetRevokedDaX509Cert(suite, testconstants.IntermediateSubject, testconstants.IntermediateSubjectKeyID)
require.Equal(suite.T, 1, len(revokedCertificate.Certs))
require.Equal(suite.T, testconstants.IntermediateSubject, revokedCertificate.Subject)
require.Equal(suite.T, testconstants.IntermediateSubjectKeyID, revokedCertificate.SubjectKeyId)
@@ -1097,7 +1116,7 @@ func Demo(suite *utils.TestSuite) {
require.False(suite.T, revokedCertificate.Certs[0].IsRoot)
// Request revoked Leaf certificate
- revokedCertificate, _ = GetRevokedX509Cert(suite, testconstants.LeafSubject, testconstants.LeafSubjectKeyID)
+ revokedCertificate, _ = GetRevokedDaX509Cert(suite, testconstants.LeafSubject, testconstants.LeafSubjectKeyID)
require.Equal(suite.T, 1, len(revokedCertificate.Certs))
require.Equal(suite.T, testconstants.LeafSubject, revokedCertificate.Subject)
require.Equal(suite.T, testconstants.LeafSubjectKeyID, revokedCertificate.SubjectKeyId)
@@ -1109,8 +1128,8 @@ func Demo(suite *utils.TestSuite) {
require.False(suite.T, revokedCertificate.Certs[0].IsRoot)
// Request all approved certificates
- certificates, _ = GetAllX509Certs(suite)
- certsBySubjectKeyID, _ = GetAllX509certsBySubjectKeyID(suite, testconstants.RootSubjectKeyID)
+ certificates, _ = GetAllDaX509Certs(suite)
+ certsBySubjectKeyID, _ = GetAllDaX509certsBySubjectKeyID(suite, testconstants.RootSubjectKeyID)
for _, certs := range [][]pkitypes.ApprovedCertificates{certificates, certsBySubjectKeyID} {
require.Equal(suite.T, 1, len(certs))
require.Equal(suite.T, testconstants.RootSubjectKeyID, certs[0].SubjectKeyId)
@@ -1133,7 +1152,7 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, testconstants.RootSubjectKeyID, proposedRevocationCertificates[0].SubjectKeyId)
// Request all revoked certificates
- revokedCertificates, _ = GetAllRevokedX509Certs(suite)
+ revokedCertificates, _ = GetAllRevokedDaX509Certs(suite)
require.Equal(suite.T, 2, len(revokedCertificates))
require.Equal(suite.T, testconstants.LeafSubject, revokedCertificates[0].Subject)
require.Equal(suite.T, testconstants.LeafSubjectKeyID, revokedCertificates[0].SubjectKeyId)
@@ -1141,7 +1160,7 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, testconstants.IntermediateSubjectKeyID, revokedCertificates[1].SubjectKeyId)
// Request all revoked Root certificates
- revokedRootCertificates, _ = GetAllRevokedRootX509Certs(suite)
+ revokedRootCertificates, _ = GetAllRevokedDaRootX509Certs(suite)
require.Equal(suite.T, 0, len(revokedRootCertificates.Certs))
// Request Root certificate proposed to revoke
@@ -1152,7 +1171,7 @@ func Demo(suite *utils.TestSuite) {
require.True(suite.T, proposedCertificateRevocation.HasRevocationFrom(jackAccount.Address))
// Request all approved certificates
- certificates, _ = GetAllX509Certs(suite)
+ certificates, _ = GetAllDaX509Certs(suite)
require.Equal(suite.T, 1, len(certificates))
require.Equal(suite.T, testconstants.RootSubject, certificates[0].Subject)
require.Equal(suite.T, testconstants.RootSubjectKeyID, certificates[0].SubjectKeyId)
@@ -1171,7 +1190,7 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, 0, len(proposedRevocationCertificates))
// Request all revoked certificates
- revokedCertificates, _ = GetAllRevokedX509Certs(suite)
+ revokedCertificates, _ = GetAllRevokedDaX509Certs(suite)
require.Equal(suite.T, 3, len(revokedCertificates))
require.Equal(suite.T, testconstants.LeafSubject, revokedCertificates[0].Subject)
require.Equal(suite.T, testconstants.LeafSubjectKeyID, revokedCertificates[0].SubjectKeyId)
@@ -1181,13 +1200,13 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, testconstants.IntermediateSubjectKeyID, revokedCertificates[2].SubjectKeyId)
// Request all revoked Root certificates
- revokedRootCertificates, _ = GetAllRevokedRootX509Certs(suite)
+ revokedRootCertificates, _ = GetAllRevokedDaRootX509Certs(suite)
require.Equal(suite.T, 1, len(revokedRootCertificates.Certs))
require.Equal(suite.T, testconstants.RootSubject, revokedRootCertificates.Certs[0].Subject)
require.Equal(suite.T, testconstants.RootSubjectKeyID, revokedRootCertificates.Certs[0].SubjectKeyId)
// Request revoked Root certificate
- revokedCertificate, _ = GetRevokedX509Cert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
+ revokedCertificate, _ = GetRevokedDaX509Cert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
require.Equal(suite.T, 1, len(revokedCertificate.Certs))
require.Equal(suite.T, testconstants.RootSubject, revokedCertificate.Subject)
require.Equal(suite.T, testconstants.RootSubjectKeyID, revokedCertificate.SubjectKeyId)
@@ -1198,19 +1217,19 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, testconstants.RootSubjectAsText, revokedCertificate.Certs[0].SubjectAsText)
require.True(suite.T, revokedCertificate.Certs[0].IsRoot)
- certificates, _ = GetAllX509Certs(suite)
+ certificates, _ = GetAllDaX509Certs(suite)
require.Equal(suite.T, 0, len(certificates))
- _, err = GetProposedX509RootCert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
+ _, err = GetProposedDaX509RootCert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
suite.AssertNotFound(err)
- _, err = GetX509Cert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
suite.AssertNotFound(err)
- _, err = GetX509Cert(suite, testconstants.IntermediateSubject, testconstants.IntermediateSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.IntermediateSubject, testconstants.IntermediateSubjectKeyID)
suite.AssertNotFound(err)
- _, err = GetX509Cert(suite, testconstants.LeafSubject, testconstants.LeafSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.LeafSubject, testconstants.LeafSubjectKeyID)
suite.AssertNotFound(err)
proposedRevocationCertificates, _ = GetAllProposedRevocationX509Certs(suite)
@@ -1219,7 +1238,7 @@ func Demo(suite *utils.TestSuite) {
_, err = GetProposedRevocationX509Cert(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
suite.AssertNotFound(err)
- rootCertificates, _ = GetAllRootX509Certs(suite)
+ rootCertificates, _ = GetAllDaRootX509Certs(suite)
require.Equal(suite.T, 0, len(rootCertificates.Certs))
_, err = GetAllChildX509Certs(suite, testconstants.RootSubject, testconstants.RootSubjectKeyID)
@@ -1231,17 +1250,17 @@ func Demo(suite *utils.TestSuite) {
_, err = GetAllChildX509Certs(suite, testconstants.LeafSubject, testconstants.LeafSubjectKeyID)
suite.AssertNotFound(err)
- _, err = GetAllX509CertsBySubject(suite, testconstants.RootSubject)
+ _, err = GetAllDaX509CertsBySubject(suite, testconstants.RootSubject)
suite.AssertNotFound(err)
- _, err = GetAllX509CertsBySubject(suite, testconstants.IntermediateSubject)
+ _, err = GetAllDaX509CertsBySubject(suite, testconstants.IntermediateSubject)
suite.AssertNotFound(err)
- _, err = GetAllX509CertsBySubject(suite, testconstants.LeafSubject)
+ _, err = GetAllDaX509CertsBySubject(suite, testconstants.LeafSubject)
suite.AssertNotFound(err)
// CHECK GOOGLE ROOT CERTIFICATE WHICH INCLUDES VID
- _, err = GetRevokedX509Cert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
+ _, err = GetRevokedDaX509Cert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
suite.AssertNotFound(err)
_, err = GetProposedRevocationX509Cert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
@@ -1257,21 +1276,21 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Request all proposed Root certificate
- proposedCertificates, _ = GetAllProposedX509RootCerts(suite)
+ proposedCertificates, _ = GetAllProposedDaX509RootCerts(suite)
require.Equal(suite.T, 1, len(proposedCertificates))
require.Equal(suite.T, testconstants.GoogleSubject, proposedCertificates[0].Subject)
require.Equal(suite.T, testconstants.GoogleSubjectKeyID, proposedCertificates[0].SubjectKeyId)
// Request all approved certificates
- certificates, _ = GetAllX509Certs(suite)
+ certificates, _ = GetAllDaX509Certs(suite)
require.Equal(suite.T, 0, len(certificates))
// Request all approved certificates by subjectKeyId
- certificates, _ = GetAllX509certsBySubjectKeyID(suite, testconstants.GoogleSubjectKeyID)
+ certificates, _ = GetAllDaX509certsBySubjectKeyID(suite, testconstants.GoogleSubjectKeyID)
require.Equal(suite.T, 0, len(certificates))
// Request proposed Google Root certificate
- proposedCertificate, _ = GetProposedX509RootCert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
+ proposedCertificate, _ = GetProposedDaX509RootCert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
require.Equal(suite.T, testconstants.GoogleCertPem, proposedCertificate.PemCert)
require.Equal(suite.T, aliceAccount.Address, proposedCertificate.Owner)
require.Equal(suite.T, 1, len(proposedCertificate.Approvals))
@@ -1286,21 +1305,21 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Request all proposed Root certificates
- proposedCertificates, _ = GetAllProposedX509RootCerts(suite)
+ proposedCertificates, _ = GetAllProposedDaX509RootCerts(suite)
require.Equal(suite.T, 1, len(proposedCertificates))
require.Equal(suite.T, testconstants.GoogleSubject, proposedCertificates[0].Subject)
require.Equal(suite.T, testconstants.GoogleSubjectKeyID, proposedCertificates[0].SubjectKeyId)
// Request all approved certificates
- certificates, _ = GetAllX509Certs(suite)
+ certificates, _ = GetAllDaX509Certs(suite)
require.Equal(suite.T, 0, len(certificates))
// Request all approved certificates by subjectKeyId
- certificates, _ = GetAllX509certsBySubjectKeyID(suite, testconstants.RootSubjectKeyID)
+ certificates, _ = GetAllDaX509certsBySubjectKeyID(suite, testconstants.RootSubjectKeyID)
require.Equal(suite.T, 0, len(certificates))
// Request proposed Root certificate
- proposedCertificate, _ = GetProposedX509RootCert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
+ proposedCertificate, _ = GetProposedDaX509RootCert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
require.Equal(suite.T, testconstants.GoogleCertPem, proposedCertificate.PemCert)
require.Equal(suite.T, aliceAccount.Address, proposedCertificate.Owner)
require.True(suite.T, proposedCertificate.HasApprovalFrom(aliceAccount.Address))
@@ -1315,25 +1334,25 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Request all proposed Root certificates
- proposedCertificates, _ = GetAllProposedX509RootCerts(suite)
+ proposedCertificates, _ = GetAllProposedDaX509RootCerts(suite)
require.Equal(suite.T, 0, len(proposedCertificates))
// Request all approved certificates
- certificates, _ = GetAllX509Certs(suite)
- certsBySubjectKeyID, _ = GetAllX509certsBySubjectKeyID(suite, testconstants.GoogleSubjectKeyID)
+ certificates, _ = GetAllDaX509Certs(suite)
+ certsBySubjectKeyID, _ = GetAllDaX509certsBySubjectKeyID(suite, testconstants.GoogleSubjectKeyID)
for _, certs := range [][]pkitypes.ApprovedCertificates{certificates, certsBySubjectKeyID} {
require.Equal(suite.T, 1, len(certs))
require.Equal(suite.T, testconstants.GoogleSubjectKeyID, certs[0].SubjectKeyId)
require.Equal(suite.T, testconstants.GoogleSubject, certs[0].Certs[0].Subject)
}
// Request all approved Root certificates
- rootCertificates, _ = GetAllRootX509Certs(suite)
+ rootCertificates, _ = GetAllDaRootX509Certs(suite)
require.Equal(suite.T, 1, len(rootCertificates.Certs))
require.Equal(suite.T, testconstants.GoogleSubject, rootCertificates.Certs[0].Subject)
require.Equal(suite.T, testconstants.GoogleSubjectKeyID, rootCertificates.Certs[0].SubjectKeyId)
// Request approved Google Root certificate
- certificate, _ = GetX509Cert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
+ certificate, _ = GetDaX509Cert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
require.Equal(suite.T, testconstants.GoogleSubject, certificate.Subject)
require.Equal(suite.T, testconstants.GoogleSubjectKeyID, certificate.SubjectKeyId)
require.Equal(suite.T, 1, len(certificate.Certs))
@@ -1359,7 +1378,7 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, testconstants.GoogleSubjectKeyID, proposedRevocationCertificates[0].SubjectKeyId)
// Request all revoked certificates
- revokedCertificates, _ = GetAllRevokedX509Certs(suite)
+ revokedCertificates, _ = GetAllRevokedDaX509Certs(suite)
require.Equal(suite.T, 3, len(revokedCertificates))
require.Equal(suite.T, testconstants.LeafSubject, revokedCertificates[0].Subject)
require.Equal(suite.T, testconstants.LeafSubjectKeyID, revokedCertificates[0].SubjectKeyId)
@@ -1372,7 +1391,7 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, testconstants.IntermediateSubjectAsText, revokedCertificates[2].Certs[0].SubjectAsText)
// Request all revoked Root certificates
- revokedRootCertificates, _ = GetAllRevokedRootX509Certs(suite)
+ revokedRootCertificates, _ = GetAllRevokedDaRootX509Certs(suite)
require.Equal(suite.T, 1, len(revokedRootCertificates.Certs))
require.Equal(suite.T, testconstants.RootSubject, revokedRootCertificates.Certs[0].Subject)
require.Equal(suite.T, testconstants.RootSubjectKeyID, revokedRootCertificates.Certs[0].SubjectKeyId)
@@ -1384,8 +1403,8 @@ func Demo(suite *utils.TestSuite) {
require.True(suite.T, proposedCertificateRevocation.HasRevocationFrom(jackAccount.Address))
// Request all approved certificates
- certificates, _ = GetAllX509Certs(suite)
- certsBySubjectKeyID, _ = GetAllX509certsBySubjectKeyID(suite, testconstants.GoogleSubjectKeyID)
+ certificates, _ = GetAllDaX509Certs(suite)
+ certsBySubjectKeyID, _ = GetAllDaX509certsBySubjectKeyID(suite, testconstants.GoogleSubjectKeyID)
for _, certs := range [][]pkitypes.ApprovedCertificates{certificates, certsBySubjectKeyID} {
require.Equal(suite.T, 1, len(certs))
require.Equal(suite.T, testconstants.GoogleSubjectKeyID, certs[0].SubjectKeyId)
@@ -1408,7 +1427,7 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, 0, len(proposedRevocationCertificates))
// Request all revoked certificates
- revokedCertificates, _ = GetAllRevokedX509Certs(suite)
+ revokedCertificates, _ = GetAllRevokedDaX509Certs(suite)
require.Equal(suite.T, 4, len(revokedCertificates))
require.Equal(suite.T, testconstants.LeafSubject, revokedCertificates[0].Subject)
require.Equal(suite.T, testconstants.LeafSubjectKeyID, revokedCertificates[0].SubjectKeyId)
@@ -1424,7 +1443,7 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, testconstants.GoogleSubjectAsText, revokedCertificates[3].Certs[0].SubjectAsText)
// Request all revoked Root certificates
- revokedRootCertificates, _ = GetAllRevokedRootX509Certs(suite)
+ revokedRootCertificates, _ = GetAllRevokedDaRootX509Certs(suite)
require.Equal(suite.T, 2, len(revokedRootCertificates.Certs))
require.Equal(suite.T, testconstants.RootSubject, revokedRootCertificates.Certs[0].Subject)
require.Equal(suite.T, testconstants.RootSubjectKeyID, revokedRootCertificates.Certs[0].SubjectKeyId)
@@ -1432,7 +1451,7 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, testconstants.GoogleSubjectKeyID, revokedRootCertificates.Certs[1].SubjectKeyId)
// Request revoked Google Root certificate
- revokedCertificate, _ = GetRevokedX509Cert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
+ revokedCertificate, _ = GetRevokedDaX509Cert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
require.Equal(suite.T, 1, len(revokedCertificate.Certs))
require.Equal(suite.T, testconstants.GoogleSubject, revokedCertificate.Subject)
require.Equal(suite.T, testconstants.GoogleSubjectKeyID, revokedCertificate.SubjectKeyId)
@@ -1443,16 +1462,16 @@ func Demo(suite *utils.TestSuite) {
require.Equal(suite.T, testconstants.GoogleSubjectAsText, revokedCertificate.Certs[0].SubjectAsText)
require.True(suite.T, revokedCertificate.Certs[0].IsRoot)
- certificates, _ = GetAllX509Certs(suite)
+ certificates, _ = GetAllDaX509Certs(suite)
require.Equal(suite.T, 0, len(certificates))
- certificates, _ = GetAllX509certsBySubjectKeyID(suite, testconstants.GoogleSubjectKeyID)
+ certificates, _ = GetAllDaX509certsBySubjectKeyID(suite, testconstants.GoogleSubjectKeyID)
require.Equal(suite.T, 0, len(certificates))
- _, err = GetProposedX509RootCert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
+ _, err = GetProposedDaX509RootCert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
suite.AssertNotFound(err)
- _, err = GetX509Cert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
suite.AssertNotFound(err)
proposedRevocationCertificates, _ = GetAllProposedRevocationX509Certs(suite)
@@ -1461,20 +1480,20 @@ func Demo(suite *utils.TestSuite) {
_, err = GetProposedRevocationX509Cert(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
suite.AssertNotFound(err)
- rootCertificates, _ = GetAllRootX509Certs(suite)
+ rootCertificates, _ = GetAllDaRootX509Certs(suite)
require.Equal(suite.T, 0, len(rootCertificates.Certs))
_, err = GetAllChildX509Certs(suite, testconstants.GoogleSubject, testconstants.GoogleSubjectKeyID)
suite.AssertNotFound(err)
- _, err = GetAllX509CertsBySubject(suite, testconstants.GoogleSubject)
+ _, err = GetAllDaX509CertsBySubject(suite, testconstants.GoogleSubject)
suite.AssertNotFound(err)
// CHECK TEST ROOT CERTIFICATE FOR REJECTING
- _, err = GetRejectedX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
+ _, err = GetRejectedDaX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
suite.AssertNotFound(err)
- _, err = GetProposedX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
+ _, err = GetProposedDaX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
suite.AssertNotFound(err)
// Alice (Trustee) propose Test Root certificate
@@ -1487,7 +1506,7 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Request proposed Test Root certificate
- proposedCertificate, _ = GetProposedX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
+ proposedCertificate, _ = GetProposedDaX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
require.Equal(suite.T, testconstants.TestCertPem, proposedCertificate.PemCert)
require.Equal(suite.T, aliceAccount.Address, proposedCertificate.Owner)
@@ -1500,13 +1519,13 @@ func Demo(suite *utils.TestSuite) {
_, err = suite.BuildAndBroadcastTx([]sdk.Msg{&msgRejectX509TestRootCert}, aliceName, aliceAccount)
require.NoError(suite.T, err)
- _, err = GetProposedX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
+ _, err = GetProposedDaX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
suite.AssertNotFound(err)
- _, err = GetX509Cert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
suite.AssertNotFound(err)
- _, err = GetRevokedX509Cert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
+ _, err = GetRevokedDaX509Cert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
suite.AssertNotFound(err)
// Alice (Trustee) propose Test Root certificate
@@ -1519,21 +1538,21 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Request all proposed Root certificates
- proposedCertificates, _ = GetAllProposedX509RootCerts(suite)
+ proposedCertificates, _ = GetAllProposedDaX509RootCerts(suite)
require.Equal(suite.T, 1, len(proposedCertificates))
require.Equal(suite.T, testconstants.TestSubject, proposedCertificates[0].Subject)
require.Equal(suite.T, testconstants.TestSubjectKeyID, proposedCertificates[0].SubjectKeyId)
// Request all rejected Root certificates
- rejectedCertificates, _ := GetAllRejectedX509RootCerts(suite)
+ rejectedCertificates, _ := GetAllRejectedDaX509RootCerts(suite)
require.Equal(suite.T, 0, len(rejectedCertificates))
// Request all approved Root certificates
- certificates, _ = GetAllX509Certs(suite)
+ certificates, _ = GetAllDaX509Certs(suite)
require.Equal(suite.T, 0, len(certificates))
// Request proposed Test Root certificate
- proposedCertificate, _ = GetProposedX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
+ proposedCertificate, _ = GetProposedDaX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
require.Equal(suite.T, testconstants.TestCertPem, proposedCertificate.PemCert)
require.Equal(suite.T, aliceAccount.Address, proposedCertificate.Owner)
require.Equal(suite.T, 1, len(proposedCertificate.Approvals))
@@ -1552,21 +1571,21 @@ func Demo(suite *utils.TestSuite) {
require.Error(suite.T, err)
// Request all proposed Root certificates
- proposedCertificates, _ = GetAllProposedX509RootCerts(suite)
+ proposedCertificates, _ = GetAllProposedDaX509RootCerts(suite)
require.Equal(suite.T, 1, len(proposedCertificates))
require.Equal(suite.T, testconstants.TestSubject, proposedCertificates[0].Subject)
require.Equal(suite.T, testconstants.TestSubjectKeyID, proposedCertificates[0].SubjectKeyId)
// Request all rejected Root certificates
- rejectedCertificates, _ = GetAllRejectedX509RootCerts(suite)
+ rejectedCertificates, _ = GetAllRejectedDaX509RootCerts(suite)
require.Equal(suite.T, 0, len(rejectedCertificates))
// Request all approved Root certificates
- certificates, _ = GetAllX509Certs(suite)
+ certificates, _ = GetAllDaX509Certs(suite)
require.Equal(suite.T, 0, len(certificates))
// Request proposed Test Root certificate
- proposedCertificate, _ = GetProposedX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
+ proposedCertificate, _ = GetProposedDaX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
require.Equal(suite.T, testconstants.TestCertPem, proposedCertificate.PemCert)
require.Equal(suite.T, aliceAccount.Address, proposedCertificate.Owner)
require.Equal(suite.T, 1, len(proposedCertificate.Approvals))
@@ -1582,21 +1601,21 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Request all proposed Root certificates
- proposedCertificates, _ = GetAllProposedX509RootCerts(suite)
+ proposedCertificates, _ = GetAllProposedDaX509RootCerts(suite)
require.Equal(suite.T, 0, len(proposedCertificates))
// Request all approved Root certificates
- certificates, _ = GetAllX509Certs(suite)
+ certificates, _ = GetAllDaX509Certs(suite)
require.Equal(suite.T, 0, len(certificates))
// Request all rejected Root certificates
- rejectedCertificates, _ = GetAllRejectedX509RootCerts(suite)
+ rejectedCertificates, _ = GetAllRejectedDaX509RootCerts(suite)
require.Equal(suite.T, 1, len(rejectedCertificates))
require.Equal(suite.T, testconstants.TestSubject, rejectedCertificates[0].Subject)
require.Equal(suite.T, testconstants.TestSubjectKeyID, rejectedCertificates[0].SubjectKeyId)
// Request rejected Test Root certificate
- rejectedCertificate, _ := GetRejectedX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
+ rejectedCertificate, _ := GetRejectedDaX509RootCert(suite, testconstants.TestSubject, testconstants.TestSubjectKeyID)
require.Equal(suite.T, testconstants.TestSubject, rejectedCertificate.Subject)
require.Equal(suite.T, testconstants.TestSubjectKeyID, rejectedCertificate.SubjectKeyId)
require.Equal(suite.T, 1, len(rejectedCertificate.Certs))
@@ -1633,7 +1652,7 @@ func Demo(suite *utils.TestSuite) {
_, err = suite.BuildAndBroadcastTx([]sdk.Msg{&msgProposeAddX509RootCert}, jackName, jackAccount)
require.NoError(suite.T, err)
- proposedCertificate, err = GetProposedX509RootCert(suite, testconstants.PAACertWithNumericVidSubject, testconstants.PAACertWithNumericVidSubjectKeyID)
+ proposedCertificate, err = GetProposedDaX509RootCert(suite, testconstants.PAACertWithNumericVidSubject, testconstants.PAACertWithNumericVidSubjectKeyID)
require.NoError(suite.T, err)
// Alice (Trustee) approve Root certificate
@@ -1728,7 +1747,7 @@ func Demo(suite *utils.TestSuite) {
_, err = suite.BuildAndBroadcastTx([]sdk.Msg{&msgProposeAddX509RootCert}, jackName, jackAccount)
require.NoError(suite.T, err)
- proposedCertificate, err = GetProposedX509RootCert(suite, testconstants.PAACertNoVidSubject, testconstants.PAACertNoVidSubjectKeyID)
+ proposedCertificate, err = GetProposedDaX509RootCert(suite, testconstants.PAACertNoVidSubject, testconstants.PAACertNoVidSubjectKeyID)
require.NoError(suite.T, err)
// Alice (Trustee) approve Root certificate
@@ -1921,11 +1940,11 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Check approved certificate
- certs, _ := GetX509Cert(suite, testconstants.RootCertWithSameSubjectAndSKIDSubject, testconstants.RootCertWithSameSubjectAndSKIDSubjectKeyID)
+ certs, _ := GetDaX509Cert(suite, testconstants.RootCertWithSameSubjectAndSKIDSubject, testconstants.RootCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 2, len(certs.Certs))
- certs, _ = GetX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 2, len(certs.Certs))
- certs, _ = GetX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
// Revoke intermediate certificate with invalid serialNumber
@@ -1944,17 +1963,17 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Request revoked certificate with serialNumber 3
- revokedCertificate, _ = GetRevokedX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
+ revokedCertificate, _ = GetRevokedDaX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(revokedCertificate.Certs))
require.Equal(suite.T, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, revokedCertificate.Subject)
require.Equal(suite.T, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID, revokedCertificate.SubjectKeyId)
require.Equal(suite.T, testconstants.IntermediateCertWithSameSubjectAndSKID1SerialNumber, revokedCertificate.Certs[0].SerialNumber)
// Check approved certificate
- certs, _ = GetX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
require.Equal(suite.T, testconstants.IntermediateCertWithSameSubjectAndSKID2SerialNumber, certs.Certs[0].SerialNumber)
- certs, _ = GetX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
require.Equal(suite.T, testconstants.LeafCertWithSameSubjectAndSKIDSerialNumber, certs.Certs[0].SerialNumber)
@@ -1988,7 +2007,7 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Request revoked Root certificate with serialNumber 1
- revokedCertificate, _ = GetRevokedX509Cert(suite, testconstants.RootCertWithSameSubjectAndSKIDSubject, testconstants.RootCertWithSameSubjectAndSKIDSubjectKeyID)
+ revokedCertificate, _ = GetRevokedDaX509Cert(suite, testconstants.RootCertWithSameSubjectAndSKIDSubject, testconstants.RootCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(revokedCertificate.Certs))
require.Equal(suite.T, testconstants.RootCertWithSameSubjectAndSKIDSubject, revokedCertificate.Subject)
require.Equal(suite.T, testconstants.RootCertWithSameSubjectAndSKIDSubjectKeyID, revokedCertificate.SubjectKeyId)
@@ -1996,15 +2015,15 @@ func Demo(suite *utils.TestSuite) {
require.True(suite.T, revokedCertificate.Certs[0].IsRoot)
// Check approved certificate
- certs, _ = GetX509Cert(suite, testconstants.RootCertWithSameSubjectAndSKIDSubject, testconstants.RootCertWithSameSubjectAndSKIDSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.RootCertWithSameSubjectAndSKIDSubject, testconstants.RootCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
require.Equal(suite.T, testconstants.RootCertWithSameSubjectAndSKID2SerialNumber, certs.Certs[0].SerialNumber)
- certs, _ = GetX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
require.Equal(suite.T, testconstants.IntermediateCertWithSameSubjectAndSKID2SerialNumber, certs.Certs[0].SerialNumber)
- certs, _ = GetX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
require.Equal(suite.T, testconstants.LeafCertWithSameSubjectAndSKIDSerialNumber, certs.Certs[0].SerialNumber)
@@ -2037,9 +2056,9 @@ func Demo(suite *utils.TestSuite) {
_, err = suite.BuildAndBroadcastTx([]sdk.Msg{&msgRemoveX509Cert}, vendorName, vendorAccount)
require.NoError(suite.T, err)
// Check that two intermediate certificates removed
- _, err = GetRevokedX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
+ _, err = GetRevokedDaX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
suite.AssertNotFound(err)
- _, err = GetX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
suite.AssertNotFound(err)
// Remove leaf x509 certificate by subject and subject key id
@@ -2051,7 +2070,7 @@ func Demo(suite *utils.TestSuite) {
_, err = suite.BuildAndBroadcastTx([]sdk.Msg{&msgRemoveX509Cert}, vendorName, vendorAccount)
require.NoError(suite.T, err)
// Check that leaf certificate removed
- _, err = GetX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
suite.AssertNotFound(err)
// Remove x509 by subject, subject key id and serial number
@@ -2088,11 +2107,11 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Check that leaf and x509 with different serial number is not removed
- certs, _ = GetX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
require.Equal(suite.T, testconstants.IntermediateCertWithSameSubjectAndSKID2SerialNumber, certs.Certs[0].SerialNumber)
- certs, _ = GetX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
require.Equal(suite.T, testconstants.LeafCertWithSameSubjectAndSKIDSerialNumber, certs.Certs[0].SerialNumber)
@@ -2105,9 +2124,9 @@ func Demo(suite *utils.TestSuite) {
_, err = suite.BuildAndBroadcastTx([]sdk.Msg{&msgRemoveX509Cert}, vendorName, vendorAccount)
require.NoError(suite.T, err)
- _, err = GetX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
suite.AssertNotFound(err)
- certs, _ = GetX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
require.Equal(suite.T, testconstants.LeafCertWithSameSubjectAndSKIDSerialNumber, certs.Certs[0].SerialNumber)
@@ -2120,7 +2139,7 @@ func Demo(suite *utils.TestSuite) {
_, err = suite.BuildAndBroadcastTx([]sdk.Msg{&msgRemoveX509Cert}, vendorName, vendorAccount)
require.NoError(suite.T, err)
- _, err = GetX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
suite.AssertNotFound(err)
// Revoke Root certificate and its child certificates
@@ -2140,11 +2159,11 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Check that certs are added
- certs, _ = GetX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
require.Equal(suite.T, testconstants.IntermediateCertWithSameSubjectAndSKID1SerialNumber, certs.Certs[0].SerialNumber)
- certs, _ = GetX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
require.Equal(suite.T, testconstants.LeafCertWithSameSubjectAndSKIDSerialNumber, certs.Certs[0].SerialNumber)
@@ -2173,29 +2192,29 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Request revoked certificates
- revokedCertificate, _ = GetRevokedX509Cert(suite, testconstants.RootCertWithSameSubjectAndSKIDSubject, testconstants.RootCertWithSameSubjectAndSKIDSubjectKeyID)
+ revokedCertificate, _ = GetRevokedDaX509Cert(suite, testconstants.RootCertWithSameSubjectAndSKIDSubject, testconstants.RootCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 2, len(revokedCertificate.Certs))
require.Equal(suite.T, testconstants.RootCertWithSameSubjectAndSKIDSubject, revokedCertificate.Subject)
require.Equal(suite.T, testconstants.RootCertWithSameSubjectAndSKIDSubjectKeyID, revokedCertificate.SubjectKeyId)
require.Equal(suite.T, testconstants.RootCertWithSameSubjectAndSKID2SerialNumber, revokedCertificate.Certs[1].SerialNumber)
require.True(suite.T, revokedCertificate.Certs[1].IsRoot)
- revokedCertificate, _ = GetRevokedX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
+ revokedCertificate, _ = GetRevokedDaX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(revokedCertificate.Certs))
require.Equal(suite.T, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, revokedCertificate.Subject)
require.Equal(suite.T, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID, revokedCertificate.SubjectKeyId)
- revokedCertificate, _ = GetRevokedX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
+ revokedCertificate, _ = GetRevokedDaX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
require.Equal(suite.T, 1, len(revokedCertificate.Certs))
require.Equal(suite.T, testconstants.LeafCertWithSameSubjectAndSKIDSubject, revokedCertificate.Subject)
require.Equal(suite.T, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID, revokedCertificate.SubjectKeyId)
// Check that all certs are removed from approved lists
- _, err = GetX509Cert(suite, testconstants.RootCertWithSameSubjectAndSKIDSubject, testconstants.RootCertWithSameSubjectAndSKIDSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.RootCertWithSameSubjectAndSKIDSubject, testconstants.RootCertWithSameSubjectAndSKIDSubjectKeyID)
suite.AssertNotFound(err)
- _, err = GetX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.IntermediateCertWithSameSubjectAndSKIDSubject, testconstants.IntermediateCertWithSameSubjectAndSKIDSubjectKeyID)
suite.AssertNotFound(err)
- _, err = GetX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.LeafCertWithSameSubjectAndSKIDSubject, testconstants.LeafCertWithSameSubjectAndSKIDSubjectKeyID)
suite.AssertNotFound(err)
// Add X509 certificates by Vendor Account
@@ -2243,9 +2262,9 @@ func Demo(suite *utils.TestSuite) {
require.NoError(suite.T, err)
// Check approved certificates
- certs, _ = GetX509Cert(suite, testconstants.RootCertWithVidSubject, testconstants.RootCertWithVidSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.RootCertWithVidSubject, testconstants.RootCertWithVidSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
- certs, _ = GetX509Cert(suite, testconstants.IntermediateCertWithVid1Subject, testconstants.IntermediateCertWithVid1SubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.IntermediateCertWithVid1Subject, testconstants.IntermediateCertWithVid1SubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
// Check certificates (using global collection)
@@ -2264,13 +2283,13 @@ func Demo(suite *utils.TestSuite) {
require.Error(suite.T, err)
// Check there is only one approved intermediate certificate
- certs, _ = GetX509Cert(suite, testconstants.IntermediateCertWithVid1Subject, testconstants.IntermediateCertWithVid1SubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.IntermediateCertWithVid1Subject, testconstants.IntermediateCertWithVid1SubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
require.Equal(suite.T, testconstants.IntermediateCertWithVid1SerialNumber, certs.Certs[0].SerialNumber)
// Check that if root cert is non-VID scoped and CertVID != AccountVID then adding an intermediate cert should fail
// Ensure that there is a non-VID root cert exists
- certs, _ = GetX509Cert(suite, testconstants.PAACertNoVidSubject, testconstants.PAACertNoVidSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.PAACertNoVidSubject, testconstants.PAACertNoVidSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
// Try to submit txn with another Vendor
@@ -2299,7 +2318,7 @@ func Demo(suite *utils.TestSuite) {
require.Error(suite.T, err)
// Check there is no an intermediate certificate
- _, err = GetX509Cert(suite, testconstants.PAICertWithNumericVidSubject, testconstants.PAICertWithNumericVidSubjectKeyID)
+ _, err = GetDaX509Cert(suite, testconstants.PAICertWithNumericVidSubject, testconstants.PAICertWithNumericVidSubjectKeyID)
suite.AssertNotFound(err)
// Check that if root cert is non-VID scoped and CertVID==AccountVID then adding x509 should succeed
@@ -2327,7 +2346,7 @@ func Demo(suite *utils.TestSuite) {
_, err = suite.BuildAndBroadcastTx([]sdk.Msg{&msgAddX509Cert}, newVendorName, newVendorAccount)
require.NoError(suite.T, err)
// Check there is only one approved intermediate certificate
- certs, _ = GetX509Cert(suite, testconstants.PAICertWithNumericVidSubject, testconstants.PAICertWithNumericVidSubjectKeyID)
+ certs, _ = GetDaX509Cert(suite, testconstants.PAICertWithNumericVidSubject, testconstants.PAICertWithNumericVidSubjectKeyID)
require.Equal(suite.T, 1, len(certs.Certs))
require.Equal(suite.T, int32(testconstants.PAICertWithNumericVidVid), certs.Certs[0].Vid)
}
diff --git a/integration_tests/upgrade/04-test-upgrade-1.4.3-to-1.4.4.sh b/integration_tests/upgrade/04-test-upgrade-1.4.3-to-1.4.4.sh
index f06651bee..e7108ff9c 100755
--- a/integration_tests/upgrade/04-test-upgrade-1.4.3-to-1.4.4.sh
+++ b/integration_tests/upgrade/04-test-upgrade-1.4.3-to-1.4.4.sh
@@ -19,9 +19,9 @@ source integration_tests/cli/common.sh
# Upgrade constants
plan_name="v1.4.4"
-upgrade_checksum="sha256:b4293d404ea454334b23969a6d7f3b58515ea8c0296ccb3f3a7095f728366925"
+upgrade_checksum="sha256:f740b65e5b0d417856ea7c8caef0d937e5810d1b448efc58b9842879409d87ff"
binary_version_old="v1.4.3"
-binary_version_new="v1.4.4-4-dev"
+binary_version_new="v1.4.4-5-dev"
wget -O dcld_old "https://github.com/zigbee-alliance/distributed-compliance-ledger/releases/download/$binary_version_old/dcld"
chmod ugo+x dcld_old
@@ -493,6 +493,21 @@ result=$($DCLD_BIN_NEW query pki noc-x509-cert --subject="$noc_root_cert_1_subje
check_response "$result" "Not Found"
echo "Get all x509 certificates by subjectKeyId"
+result=$($DCLD_BIN_NEW query pki cert --subject-key-id="$root_cert_with_vid_subject_key_id_for_1_4_3")
+check_response "$result" "$root_cert_with_vid_subject_for_1_4_3"
+check_response "$result" "\"subjectKeyId\": \"$root_cert_with_vid_subject_key_id_for_1_4_3\""
+
+result=$($DCLD_BIN_NEW query pki cert --subject-key-id="$test_root_cert_subject_key_id_for_1_2")
+check_response "$result" "$test_root_cert_subject_for_1_2"
+check_response "$result" "\"subjectKeyId\": \"$test_root_cert_subject_key_id_for_1_2\""
+
+result=$($DCLD_BIN_NEW query pki cert --subject-key-id="$test_root_cert_subject_key_id")
+check_response "$result" "$test_root_cert_subject"
+check_response "$result" "\"subjectKeyId\": \"$test_root_cert_subject_key_id\""
+
+result=$($DCLD_BIN_NEW query pki cert --subject-key-id="$noc_root_cert_1_subject_key_id_for_1_4_3")
+check_response "$result" "Not Found"
+
result=$($DCLD_BIN_NEW query pki x509-cert --subject-key-id="$root_cert_with_vid_subject_key_id_for_1_4_3")
check_response "$result" "$root_cert_with_vid_subject_for_1_4_3"
check_response "$result" "\"subjectKeyId\": \"$root_cert_with_vid_subject_key_id_for_1_4_3\""
@@ -1490,11 +1505,18 @@ check_response "$result" "Not Found"
echo "Get all certificates by SKID"
+echo "Get all certificates by SKID (Global)"
+result=$($DCLD_BIN_NEW query pki cert --subject-key-id=$da_root_cert_2_subject_key_id_for_1_4_4)
+check_response "$result" "\"subjectKeyId\": \"$da_root_cert_2_subject_key_id_for_1_4_4\""
+
+result=$($DCLD_BIN_NEW query pki cert --subject-key-id=$noc_root_cert_2_subject_key_id_for_1_4_4)
+check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_2_subject_key_id_for_1_4_4\""
+
echo "Get all certificates by SKID (DA)"
result=$($DCLD_BIN_NEW query pki x509-cert --subject-key-id=$da_root_cert_2_subject_key_id_for_1_4_4)
check_response "$result" "\"subjectKeyId\": \"$da_root_cert_2_subject_key_id_for_1_4_4\""
-result=$($DCLD_BIN_NEW query pki x509-cert --subject-key-id=$noc_root_cert_2_subject_for_1_4_4)
+result=$($DCLD_BIN_NEW query pki x509-cert --subject-key-id=$noc_root_cert_2_subject_key_id_for_1_4_4)
check_response "$result" "Not Found"
echo "Get all certificates by SKID (NOC)"
diff --git a/integration_tests/upgrade/add-new-node-after-upgrade.sh b/integration_tests/upgrade/add-new-node-after-upgrade.sh
index 4e3bbb35c..e02180158 100755
--- a/integration_tests/upgrade/add-new-node-after-upgrade.sh
+++ b/integration_tests/upgrade/add-new-node-after-upgrade.sh
@@ -65,7 +65,7 @@ trap cleanup EXIT
check_adding_new_node() {
local stable_binary_version="${1:-0.12.1}"
- local latest_binary_version="${2:-1.4.4-4-dev}"
+ local latest_binary_version="${2:-1.4.4-5-dev}"
echo "1. run $node_name container"
docker run -d --name $node_name --ip $ip -p "$node_p2p_port-$node_client_port:26656-26657" --network $docker_network -i dcledger
diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/all_certificates_by_subject_key_id.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/all_certificates_by_subject_key_id.proto
new file mode 100644
index 000000000..f5c5a899f
--- /dev/null
+++ b/proto/zigbeealliance/distributedcomplianceledger/pki/all_certificates_by_subject_key_id.proto
@@ -0,0 +1,14 @@
+syntax = "proto3";
+package zigbeealliance.distributedcomplianceledger.pki;
+
+option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types";
+
+import "zigbeealliance/distributedcomplianceledger/pki/certificate.proto";
+
+message AllCertificatesBySubjectKeyId {
+ string subjectKeyId = 1;
+ repeated Certificate certs = 2;
+ uint32 schemaVersion = 3;
+
+}
+
diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/genesis.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/genesis.proto
index f81c35a80..c6a1399d6 100644
--- a/proto/zigbeealliance/distributedcomplianceledger/pki/genesis.proto
+++ b/proto/zigbeealliance/distributedcomplianceledger/pki/genesis.proto
@@ -24,6 +24,8 @@ import "zigbeealliance/distributedcomplianceledger/pki/noc_certificates_by_vid_a
import "zigbeealliance/distributedcomplianceledger/pki/noc_certificates_by_subject.proto";
import "zigbeealliance/distributedcomplianceledger/pki/all_certificates.proto";
import "zigbeealliance/distributedcomplianceledger/pki/all_certificates_by_subject.proto";
+import "zigbeealliance/distributedcomplianceledger/pki/all_certificates_by_subject_key_id.proto";
+
// this line is used by starport scaffolding # genesis/proto/import
import "gogoproto/gogo.proto";
@@ -54,5 +56,6 @@ message GenesisState {
repeated AllCertificates certificatesList = 21 [(gogoproto.nullable) = false];
repeated RevokedNocIcaCertificates revokedNocIcaCertificatesList = 22 [(gogoproto.nullable) = false];
repeated AllCertificatesBySubject allCertificatesBySubjectList = 23 [(gogoproto.nullable) = false];
+ repeated AllCertificatesBySubjectKeyId allCertificatesBySubjectKeyIdList = 24 [(gogoproto.nullable) = false];
// this line is used by starport scaffolding # genesis/proto/state
}
diff --git a/proto/zigbeealliance/distributedcomplianceledger/pki/query.proto b/proto/zigbeealliance/distributedcomplianceledger/pki/query.proto
index ebb6433e5..1d2257912 100644
--- a/proto/zigbeealliance/distributedcomplianceledger/pki/query.proto
+++ b/proto/zigbeealliance/distributedcomplianceledger/pki/query.proto
@@ -197,6 +197,7 @@ service Query {
message QueryAllCertificatesRequest {
cosmos.base.query.v1beta1.PageRequest pagination = 1;
+ string subjectKeyId = 2;
}
message QueryAllCertificatesResponse {
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.compliance/module.ts b/ts-client/zigbeealliance.distributedcomplianceledger.compliance/module.ts
index fd79838f3..c792d5d4a 100755
--- a/ts-client/zigbeealliance.distributedcomplianceledger.compliance/module.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.compliance/module.ts
@@ -7,10 +7,10 @@ import { msgTypes } from './registry';
import { IgniteClient } from "../client"
import { MissingWalletError } from "../helpers"
import { Api } from "./rest";
-import { MsgUpdateComplianceInfo } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
-import { MsgCertifyModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
import { MsgDeleteComplianceInfo } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
+import { MsgCertifyModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
import { MsgProvisionModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
+import { MsgUpdateComplianceInfo } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
import { MsgRevokeModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
import { CertifiedModel as typeCertifiedModel} from "./types"
@@ -20,10 +20,10 @@ import { DeviceSoftwareCompliance as typeDeviceSoftwareCompliance} from "./types
import { ProvisionalModel as typeProvisionalModel} from "./types"
import { RevokedModel as typeRevokedModel} from "./types"
-export { MsgUpdateComplianceInfo, MsgCertifyModel, MsgDeleteComplianceInfo, MsgProvisionModel, MsgRevokeModel };
+export { MsgDeleteComplianceInfo, MsgCertifyModel, MsgProvisionModel, MsgUpdateComplianceInfo, MsgRevokeModel };
-type sendMsgUpdateComplianceInfoParams = {
- value: MsgUpdateComplianceInfo,
+type sendMsgDeleteComplianceInfoParams = {
+ value: MsgDeleteComplianceInfo,
fee?: StdFee,
memo?: string
};
@@ -34,14 +34,14 @@ type sendMsgCertifyModelParams = {
memo?: string
};
-type sendMsgDeleteComplianceInfoParams = {
- value: MsgDeleteComplianceInfo,
+type sendMsgProvisionModelParams = {
+ value: MsgProvisionModel,
fee?: StdFee,
memo?: string
};
-type sendMsgProvisionModelParams = {
- value: MsgProvisionModel,
+type sendMsgUpdateComplianceInfoParams = {
+ value: MsgUpdateComplianceInfo,
fee?: StdFee,
memo?: string
};
@@ -53,22 +53,22 @@ type sendMsgRevokeModelParams = {
};
-type msgUpdateComplianceInfoParams = {
- value: MsgUpdateComplianceInfo,
+type msgDeleteComplianceInfoParams = {
+ value: MsgDeleteComplianceInfo,
};
type msgCertifyModelParams = {
value: MsgCertifyModel,
};
-type msgDeleteComplianceInfoParams = {
- value: MsgDeleteComplianceInfo,
-};
-
type msgProvisionModelParams = {
value: MsgProvisionModel,
};
+type msgUpdateComplianceInfoParams = {
+ value: MsgUpdateComplianceInfo,
+};
+
type msgRevokeModelParams = {
value: MsgRevokeModel,
};
@@ -103,17 +103,17 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
return {
- async sendMsgUpdateComplianceInfo({ value, fee, memo }: sendMsgUpdateComplianceInfoParams): Promise {
+ async sendMsgDeleteComplianceInfo({ value, fee, memo }: sendMsgDeleteComplianceInfoParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgUpdateComplianceInfo: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgDeleteComplianceInfo: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgUpdateComplianceInfo({ value: MsgUpdateComplianceInfo.fromPartial(value) })
+ let msg = this.msgDeleteComplianceInfo({ value: MsgDeleteComplianceInfo.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgUpdateComplianceInfo: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgDeleteComplianceInfo: Could not broadcast Tx: '+ e.message)
}
},
@@ -131,31 +131,31 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
}
},
- async sendMsgDeleteComplianceInfo({ value, fee, memo }: sendMsgDeleteComplianceInfoParams): Promise {
+ async sendMsgProvisionModel({ value, fee, memo }: sendMsgProvisionModelParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgDeleteComplianceInfo: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgProvisionModel: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgDeleteComplianceInfo({ value: MsgDeleteComplianceInfo.fromPartial(value) })
+ let msg = this.msgProvisionModel({ value: MsgProvisionModel.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgDeleteComplianceInfo: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgProvisionModel: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgProvisionModel({ value, fee, memo }: sendMsgProvisionModelParams): Promise {
+ async sendMsgUpdateComplianceInfo({ value, fee, memo }: sendMsgUpdateComplianceInfoParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgProvisionModel: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgUpdateComplianceInfo: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgProvisionModel({ value: MsgProvisionModel.fromPartial(value) })
+ let msg = this.msgUpdateComplianceInfo({ value: MsgUpdateComplianceInfo.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgProvisionModel: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgUpdateComplianceInfo: Could not broadcast Tx: '+ e.message)
}
},
@@ -174,11 +174,11 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
},
- msgUpdateComplianceInfo({ value }: msgUpdateComplianceInfoParams): EncodeObject {
+ msgDeleteComplianceInfo({ value }: msgDeleteComplianceInfoParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.compliance.MsgUpdateComplianceInfo", value: MsgUpdateComplianceInfo.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.compliance.MsgDeleteComplianceInfo", value: MsgDeleteComplianceInfo.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgUpdateComplianceInfo: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgDeleteComplianceInfo: Could not create message: ' + e.message)
}
},
@@ -190,19 +190,19 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
}
},
- msgDeleteComplianceInfo({ value }: msgDeleteComplianceInfoParams): EncodeObject {
+ msgProvisionModel({ value }: msgProvisionModelParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.compliance.MsgDeleteComplianceInfo", value: MsgDeleteComplianceInfo.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.compliance.MsgProvisionModel", value: MsgProvisionModel.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgDeleteComplianceInfo: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgProvisionModel: Could not create message: ' + e.message)
}
},
- msgProvisionModel({ value }: msgProvisionModelParams): EncodeObject {
+ msgUpdateComplianceInfo({ value }: msgUpdateComplianceInfoParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.compliance.MsgProvisionModel", value: MsgProvisionModel.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.compliance.MsgUpdateComplianceInfo", value: MsgUpdateComplianceInfo.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgProvisionModel: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgUpdateComplianceInfo: Could not create message: ' + e.message)
}
},
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.compliance/registry.ts b/ts-client/zigbeealliance.distributedcomplianceledger.compliance/registry.ts
index ae2ff0273..4ad67b5c3 100755
--- a/ts-client/zigbeealliance.distributedcomplianceledger.compliance/registry.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.compliance/registry.ts
@@ -1,15 +1,15 @@
import { GeneratedType } from "@cosmjs/proto-signing";
-import { MsgUpdateComplianceInfo } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
-import { MsgCertifyModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
import { MsgDeleteComplianceInfo } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
+import { MsgCertifyModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
import { MsgProvisionModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
+import { MsgUpdateComplianceInfo } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
import { MsgRevokeModel } from "./types/zigbeealliance/distributedcomplianceledger/compliance/tx";
const msgTypes: Array<[string, GeneratedType]> = [
- ["/zigbeealliance.distributedcomplianceledger.compliance.MsgUpdateComplianceInfo", MsgUpdateComplianceInfo],
- ["/zigbeealliance.distributedcomplianceledger.compliance.MsgCertifyModel", MsgCertifyModel],
["/zigbeealliance.distributedcomplianceledger.compliance.MsgDeleteComplianceInfo", MsgDeleteComplianceInfo],
+ ["/zigbeealliance.distributedcomplianceledger.compliance.MsgCertifyModel", MsgCertifyModel],
["/zigbeealliance.distributedcomplianceledger.compliance.MsgProvisionModel", MsgProvisionModel],
+ ["/zigbeealliance.distributedcomplianceledger.compliance.MsgUpdateComplianceInfo", MsgUpdateComplianceInfo],
["/zigbeealliance.distributedcomplianceledger.compliance.MsgRevokeModel", MsgRevokeModel],
];
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.dclauth/module.ts b/ts-client/zigbeealliance.distributedcomplianceledger.dclauth/module.ts
index 1c12dd37c..ce05bdd4a 100755
--- a/ts-client/zigbeealliance.distributedcomplianceledger.dclauth/module.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.dclauth/module.ts
@@ -7,8 +7,8 @@ import { msgTypes } from './registry';
import { IgniteClient } from "../client"
import { MissingWalletError } from "../helpers"
import { Api } from "./rest";
-import { MsgProposeAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
import { MsgApproveRevokeAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
+import { MsgProposeAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
import { MsgProposeRevokeAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
import { MsgRejectAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
import { MsgApproveAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
@@ -21,16 +21,16 @@ import { PendingAccountRevocation as typePendingAccountRevocation} from "./types
import { RejectedAccount as typeRejectedAccount} from "./types"
import { RevokedAccount as typeRevokedAccount} from "./types"
-export { MsgProposeAddAccount, MsgApproveRevokeAccount, MsgProposeRevokeAccount, MsgRejectAddAccount, MsgApproveAddAccount };
+export { MsgApproveRevokeAccount, MsgProposeAddAccount, MsgProposeRevokeAccount, MsgRejectAddAccount, MsgApproveAddAccount };
-type sendMsgProposeAddAccountParams = {
- value: MsgProposeAddAccount,
+type sendMsgApproveRevokeAccountParams = {
+ value: MsgApproveRevokeAccount,
fee?: StdFee,
memo?: string
};
-type sendMsgApproveRevokeAccountParams = {
- value: MsgApproveRevokeAccount,
+type sendMsgProposeAddAccountParams = {
+ value: MsgProposeAddAccount,
fee?: StdFee,
memo?: string
};
@@ -54,14 +54,14 @@ type sendMsgApproveAddAccountParams = {
};
-type msgProposeAddAccountParams = {
- value: MsgProposeAddAccount,
-};
-
type msgApproveRevokeAccountParams = {
value: MsgApproveRevokeAccount,
};
+type msgProposeAddAccountParams = {
+ value: MsgProposeAddAccount,
+};
+
type msgProposeRevokeAccountParams = {
value: MsgProposeRevokeAccount,
};
@@ -104,31 +104,31 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
return {
- async sendMsgProposeAddAccount({ value, fee, memo }: sendMsgProposeAddAccountParams): Promise {
+ async sendMsgApproveRevokeAccount({ value, fee, memo }: sendMsgApproveRevokeAccountParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgProposeAddAccount: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgApproveRevokeAccount: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgProposeAddAccount({ value: MsgProposeAddAccount.fromPartial(value) })
+ let msg = this.msgApproveRevokeAccount({ value: MsgApproveRevokeAccount.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgProposeAddAccount: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgApproveRevokeAccount: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgApproveRevokeAccount({ value, fee, memo }: sendMsgApproveRevokeAccountParams): Promise {
+ async sendMsgProposeAddAccount({ value, fee, memo }: sendMsgProposeAddAccountParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgApproveRevokeAccount: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgProposeAddAccount: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgApproveRevokeAccount({ value: MsgApproveRevokeAccount.fromPartial(value) })
+ let msg = this.msgProposeAddAccount({ value: MsgProposeAddAccount.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgApproveRevokeAccount: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgProposeAddAccount: Could not broadcast Tx: '+ e.message)
}
},
@@ -175,19 +175,19 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
},
- msgProposeAddAccount({ value }: msgProposeAddAccountParams): EncodeObject {
+ msgApproveRevokeAccount({ value }: msgApproveRevokeAccountParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.dclauth.MsgProposeAddAccount", value: MsgProposeAddAccount.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.dclauth.MsgApproveRevokeAccount", value: MsgApproveRevokeAccount.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgProposeAddAccount: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgApproveRevokeAccount: Could not create message: ' + e.message)
}
},
- msgApproveRevokeAccount({ value }: msgApproveRevokeAccountParams): EncodeObject {
+ msgProposeAddAccount({ value }: msgProposeAddAccountParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.dclauth.MsgApproveRevokeAccount", value: MsgApproveRevokeAccount.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.dclauth.MsgProposeAddAccount", value: MsgProposeAddAccount.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgApproveRevokeAccount: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgProposeAddAccount: Could not create message: ' + e.message)
}
},
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.dclauth/registry.ts b/ts-client/zigbeealliance.distributedcomplianceledger.dclauth/registry.ts
index c44224ed3..8e8ad9b46 100755
--- a/ts-client/zigbeealliance.distributedcomplianceledger.dclauth/registry.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.dclauth/registry.ts
@@ -1,13 +1,13 @@
import { GeneratedType } from "@cosmjs/proto-signing";
-import { MsgProposeAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
import { MsgApproveRevokeAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
+import { MsgProposeAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
import { MsgProposeRevokeAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
import { MsgRejectAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
import { MsgApproveAddAccount } from "./types/zigbeealliance/distributedcomplianceledger/dclauth/tx";
const msgTypes: Array<[string, GeneratedType]> = [
- ["/zigbeealliance.distributedcomplianceledger.dclauth.MsgProposeAddAccount", MsgProposeAddAccount],
["/zigbeealliance.distributedcomplianceledger.dclauth.MsgApproveRevokeAccount", MsgApproveRevokeAccount],
+ ["/zigbeealliance.distributedcomplianceledger.dclauth.MsgProposeAddAccount", MsgProposeAddAccount],
["/zigbeealliance.distributedcomplianceledger.dclauth.MsgProposeRevokeAccount", MsgProposeRevokeAccount],
["/zigbeealliance.distributedcomplianceledger.dclauth.MsgRejectAddAccount", MsgRejectAddAccount],
["/zigbeealliance.distributedcomplianceledger.dclauth.MsgApproveAddAccount", MsgApproveAddAccount],
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.model/module.ts b/ts-client/zigbeealliance.distributedcomplianceledger.model/module.ts
index 13ff97e47..f12d38c4f 100755
--- a/ts-client/zigbeealliance.distributedcomplianceledger.model/module.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.model/module.ts
@@ -8,11 +8,11 @@ import { IgniteClient } from "../client"
import { MissingWalletError } from "../helpers"
import { Api } from "./rest";
import { MsgUpdateModel } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
-import { MsgDeleteModelVersion } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
+import { MsgCreateModelVersion } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
import { MsgUpdateModelVersion } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
-import { MsgDeleteModel } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
import { MsgCreateModel } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
-import { MsgCreateModelVersion } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
+import { MsgDeleteModel } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
+import { MsgDeleteModelVersion } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
import { Model as typeModel} from "./types"
import { ModelVersion as typeModelVersion} from "./types"
@@ -20,7 +20,7 @@ import { ModelVersions as typeModelVersions} from "./types"
import { Product as typeProduct} from "./types"
import { VendorProducts as typeVendorProducts} from "./types"
-export { MsgUpdateModel, MsgDeleteModelVersion, MsgUpdateModelVersion, MsgDeleteModel, MsgCreateModel, MsgCreateModelVersion };
+export { MsgUpdateModel, MsgCreateModelVersion, MsgUpdateModelVersion, MsgCreateModel, MsgDeleteModel, MsgDeleteModelVersion };
type sendMsgUpdateModelParams = {
value: MsgUpdateModel,
@@ -28,8 +28,8 @@ type sendMsgUpdateModelParams = {
memo?: string
};
-type sendMsgDeleteModelVersionParams = {
- value: MsgDeleteModelVersion,
+type sendMsgCreateModelVersionParams = {
+ value: MsgCreateModelVersion,
fee?: StdFee,
memo?: string
};
@@ -40,20 +40,20 @@ type sendMsgUpdateModelVersionParams = {
memo?: string
};
-type sendMsgDeleteModelParams = {
- value: MsgDeleteModel,
+type sendMsgCreateModelParams = {
+ value: MsgCreateModel,
fee?: StdFee,
memo?: string
};
-type sendMsgCreateModelParams = {
- value: MsgCreateModel,
+type sendMsgDeleteModelParams = {
+ value: MsgDeleteModel,
fee?: StdFee,
memo?: string
};
-type sendMsgCreateModelVersionParams = {
- value: MsgCreateModelVersion,
+type sendMsgDeleteModelVersionParams = {
+ value: MsgDeleteModelVersion,
fee?: StdFee,
memo?: string
};
@@ -63,24 +63,24 @@ type msgUpdateModelParams = {
value: MsgUpdateModel,
};
-type msgDeleteModelVersionParams = {
- value: MsgDeleteModelVersion,
+type msgCreateModelVersionParams = {
+ value: MsgCreateModelVersion,
};
type msgUpdateModelVersionParams = {
value: MsgUpdateModelVersion,
};
-type msgDeleteModelParams = {
- value: MsgDeleteModel,
-};
-
type msgCreateModelParams = {
value: MsgCreateModel,
};
-type msgCreateModelVersionParams = {
- value: MsgCreateModelVersion,
+type msgDeleteModelParams = {
+ value: MsgDeleteModel,
+};
+
+type msgDeleteModelVersionParams = {
+ value: MsgDeleteModelVersion,
};
@@ -127,17 +127,17 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
}
},
- async sendMsgDeleteModelVersion({ value, fee, memo }: sendMsgDeleteModelVersionParams): Promise {
+ async sendMsgCreateModelVersion({ value, fee, memo }: sendMsgCreateModelVersionParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgDeleteModelVersion: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgCreateModelVersion: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgDeleteModelVersion({ value: MsgDeleteModelVersion.fromPartial(value) })
+ let msg = this.msgCreateModelVersion({ value: MsgCreateModelVersion.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgDeleteModelVersion: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgCreateModelVersion: Could not broadcast Tx: '+ e.message)
}
},
@@ -155,45 +155,45 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
}
},
- async sendMsgDeleteModel({ value, fee, memo }: sendMsgDeleteModelParams): Promise {
+ async sendMsgCreateModel({ value, fee, memo }: sendMsgCreateModelParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgDeleteModel: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgCreateModel: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgDeleteModel({ value: MsgDeleteModel.fromPartial(value) })
+ let msg = this.msgCreateModel({ value: MsgCreateModel.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgDeleteModel: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgCreateModel: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgCreateModel({ value, fee, memo }: sendMsgCreateModelParams): Promise {
+ async sendMsgDeleteModel({ value, fee, memo }: sendMsgDeleteModelParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgCreateModel: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgDeleteModel: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgCreateModel({ value: MsgCreateModel.fromPartial(value) })
+ let msg = this.msgDeleteModel({ value: MsgDeleteModel.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgCreateModel: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgDeleteModel: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgCreateModelVersion({ value, fee, memo }: sendMsgCreateModelVersionParams): Promise {
+ async sendMsgDeleteModelVersion({ value, fee, memo }: sendMsgDeleteModelVersionParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgCreateModelVersion: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgDeleteModelVersion: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgCreateModelVersion({ value: MsgCreateModelVersion.fromPartial(value) })
+ let msg = this.msgDeleteModelVersion({ value: MsgDeleteModelVersion.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgCreateModelVersion: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgDeleteModelVersion: Could not broadcast Tx: '+ e.message)
}
},
@@ -206,11 +206,11 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
}
},
- msgDeleteModelVersion({ value }: msgDeleteModelVersionParams): EncodeObject {
+ msgCreateModelVersion({ value }: msgCreateModelVersionParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.model.MsgDeleteModelVersion", value: MsgDeleteModelVersion.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.model.MsgCreateModelVersion", value: MsgCreateModelVersion.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgDeleteModelVersion: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgCreateModelVersion: Could not create message: ' + e.message)
}
},
@@ -222,27 +222,27 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
}
},
- msgDeleteModel({ value }: msgDeleteModelParams): EncodeObject {
+ msgCreateModel({ value }: msgCreateModelParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.model.MsgDeleteModel", value: MsgDeleteModel.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.model.MsgCreateModel", value: MsgCreateModel.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgDeleteModel: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgCreateModel: Could not create message: ' + e.message)
}
},
- msgCreateModel({ value }: msgCreateModelParams): EncodeObject {
+ msgDeleteModel({ value }: msgDeleteModelParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.model.MsgCreateModel", value: MsgCreateModel.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.model.MsgDeleteModel", value: MsgDeleteModel.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgCreateModel: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgDeleteModel: Could not create message: ' + e.message)
}
},
- msgCreateModelVersion({ value }: msgCreateModelVersionParams): EncodeObject {
+ msgDeleteModelVersion({ value }: msgDeleteModelVersionParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.model.MsgCreateModelVersion", value: MsgCreateModelVersion.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.model.MsgDeleteModelVersion", value: MsgDeleteModelVersion.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgCreateModelVersion: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgDeleteModelVersion: Could not create message: ' + e.message)
}
},
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.model/registry.ts b/ts-client/zigbeealliance.distributedcomplianceledger.model/registry.ts
index fb0123042..5bbdb8095 100755
--- a/ts-client/zigbeealliance.distributedcomplianceledger.model/registry.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.model/registry.ts
@@ -1,18 +1,18 @@
import { GeneratedType } from "@cosmjs/proto-signing";
import { MsgUpdateModel } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
-import { MsgDeleteModelVersion } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
+import { MsgCreateModelVersion } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
import { MsgUpdateModelVersion } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
-import { MsgDeleteModel } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
import { MsgCreateModel } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
-import { MsgCreateModelVersion } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
+import { MsgDeleteModel } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
+import { MsgDeleteModelVersion } from "./types/zigbeealliance/distributedcomplianceledger/model/tx";
const msgTypes: Array<[string, GeneratedType]> = [
["/zigbeealliance.distributedcomplianceledger.model.MsgUpdateModel", MsgUpdateModel],
- ["/zigbeealliance.distributedcomplianceledger.model.MsgDeleteModelVersion", MsgDeleteModelVersion],
+ ["/zigbeealliance.distributedcomplianceledger.model.MsgCreateModelVersion", MsgCreateModelVersion],
["/zigbeealliance.distributedcomplianceledger.model.MsgUpdateModelVersion", MsgUpdateModelVersion],
- ["/zigbeealliance.distributedcomplianceledger.model.MsgDeleteModel", MsgDeleteModel],
["/zigbeealliance.distributedcomplianceledger.model.MsgCreateModel", MsgCreateModel],
- ["/zigbeealliance.distributedcomplianceledger.model.MsgCreateModelVersion", MsgCreateModelVersion],
+ ["/zigbeealliance.distributedcomplianceledger.model.MsgDeleteModel", MsgDeleteModel],
+ ["/zigbeealliance.distributedcomplianceledger.model.MsgDeleteModelVersion", MsgDeleteModelVersion],
];
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.pki/module.ts b/ts-client/zigbeealliance.distributedcomplianceledger.pki/module.ts
index b3d559e98..ec237dae5 100755
--- a/ts-client/zigbeealliance.distributedcomplianceledger.pki/module.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.pki/module.ts
@@ -7,27 +7,28 @@ import { msgTypes } from './registry';
import { IgniteClient } from "../client"
import { MissingWalletError } from "../helpers"
import { Api } from "./rest";
-import { MsgAddX509Cert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgProposeAddX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgAssignVid } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgProposeRevokeX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgRevokeNocX509IcaCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgRevokeNocX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
import { MsgRevokeX509Cert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgAddPkiRevocationDistributionPoint } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgRemoveNocX509IcaCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgAddX509Cert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
import { MsgAddNocX509IcaCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgRejectAddX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgDeletePkiRevocationDistributionPoint } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgAddNocX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
import { MsgUpdatePkiRevocationDistributionPoint } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgRemoveNocX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgProposeRevokeX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgProposeAddX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgDeletePkiRevocationDistributionPoint } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgApproveRevokeX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
import { MsgRemoveX509Cert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
import { MsgApproveAddX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgApproveRevokeX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgRevokeNocX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgRevokeNocX509IcaCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgAddNocX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgAssignVid } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgRejectAddX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgRemoveNocX509IcaCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgAddPkiRevocationDistributionPoint } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgRemoveNocX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
import { AllCertificates as typeAllCertificates} from "./types"
import { AllCertificatesBySubject as typeAllCertificatesBySubject} from "./types"
+import { AllCertificatesBySubjectKeyId as typeAllCertificatesBySubjectKeyId} from "./types"
import { ApprovedCertificates as typeApprovedCertificates} from "./types"
import { ApprovedCertificatesBySubject as typeApprovedCertificatesBySubject} from "./types"
import { ApprovedCertificatesBySubjectKeyId as typeApprovedCertificatesBySubjectKeyId} from "./types"
@@ -53,70 +54,76 @@ import { RevokedNocRootCertificates as typeRevokedNocRootCertificates} from "./t
import { RevokedRootCertificates as typeRevokedRootCertificates} from "./types"
import { UniqueCertificate as typeUniqueCertificate} from "./types"
-export { MsgAddX509Cert, MsgProposeAddX509RootCert, MsgAssignVid, MsgProposeRevokeX509RootCert, MsgRevokeNocX509IcaCert, MsgRevokeX509Cert, MsgAddPkiRevocationDistributionPoint, MsgRemoveNocX509IcaCert, MsgAddNocX509IcaCert, MsgRejectAddX509RootCert, MsgDeletePkiRevocationDistributionPoint, MsgAddNocX509RootCert, MsgUpdatePkiRevocationDistributionPoint, MsgRemoveNocX509RootCert, MsgRemoveX509Cert, MsgApproveAddX509RootCert, MsgApproveRevokeX509RootCert, MsgRevokeNocX509RootCert };
+export { MsgRevokeNocX509RootCert, MsgRevokeX509Cert, MsgAddX509Cert, MsgAddNocX509IcaCert, MsgUpdatePkiRevocationDistributionPoint, MsgProposeRevokeX509RootCert, MsgProposeAddX509RootCert, MsgDeletePkiRevocationDistributionPoint, MsgApproveRevokeX509RootCert, MsgRemoveX509Cert, MsgApproveAddX509RootCert, MsgRevokeNocX509IcaCert, MsgAddNocX509RootCert, MsgAssignVid, MsgRejectAddX509RootCert, MsgRemoveNocX509IcaCert, MsgAddPkiRevocationDistributionPoint, MsgRemoveNocX509RootCert };
-type sendMsgAddX509CertParams = {
- value: MsgAddX509Cert,
+type sendMsgRevokeNocX509RootCertParams = {
+ value: MsgRevokeNocX509RootCert,
fee?: StdFee,
memo?: string
};
-type sendMsgProposeAddX509RootCertParams = {
- value: MsgProposeAddX509RootCert,
+type sendMsgRevokeX509CertParams = {
+ value: MsgRevokeX509Cert,
fee?: StdFee,
memo?: string
};
-type sendMsgAssignVidParams = {
- value: MsgAssignVid,
+type sendMsgAddX509CertParams = {
+ value: MsgAddX509Cert,
fee?: StdFee,
memo?: string
};
-type sendMsgProposeRevokeX509RootCertParams = {
- value: MsgProposeRevokeX509RootCert,
+type sendMsgAddNocX509IcaCertParams = {
+ value: MsgAddNocX509IcaCert,
fee?: StdFee,
memo?: string
};
-type sendMsgRevokeNocX509IcaCertParams = {
- value: MsgRevokeNocX509IcaCert,
+type sendMsgUpdatePkiRevocationDistributionPointParams = {
+ value: MsgUpdatePkiRevocationDistributionPoint,
fee?: StdFee,
memo?: string
};
-type sendMsgRevokeX509CertParams = {
- value: MsgRevokeX509Cert,
+type sendMsgProposeRevokeX509RootCertParams = {
+ value: MsgProposeRevokeX509RootCert,
fee?: StdFee,
memo?: string
};
-type sendMsgAddPkiRevocationDistributionPointParams = {
- value: MsgAddPkiRevocationDistributionPoint,
+type sendMsgProposeAddX509RootCertParams = {
+ value: MsgProposeAddX509RootCert,
fee?: StdFee,
memo?: string
};
-type sendMsgRemoveNocX509IcaCertParams = {
- value: MsgRemoveNocX509IcaCert,
+type sendMsgDeletePkiRevocationDistributionPointParams = {
+ value: MsgDeletePkiRevocationDistributionPoint,
fee?: StdFee,
memo?: string
};
-type sendMsgAddNocX509IcaCertParams = {
- value: MsgAddNocX509IcaCert,
+type sendMsgApproveRevokeX509RootCertParams = {
+ value: MsgApproveRevokeX509RootCert,
fee?: StdFee,
memo?: string
};
-type sendMsgRejectAddX509RootCertParams = {
- value: MsgRejectAddX509RootCert,
+type sendMsgRemoveX509CertParams = {
+ value: MsgRemoveX509Cert,
fee?: StdFee,
memo?: string
};
-type sendMsgDeletePkiRevocationDistributionPointParams = {
- value: MsgDeletePkiRevocationDistributionPoint,
+type sendMsgApproveAddX509RootCertParams = {
+ value: MsgApproveAddX509RootCert,
+ fee?: StdFee,
+ memo?: string
+};
+
+type sendMsgRevokeNocX509IcaCertParams = {
+ value: MsgRevokeNocX509IcaCert,
fee?: StdFee,
memo?: string
};
@@ -127,113 +134,107 @@ type sendMsgAddNocX509RootCertParams = {
memo?: string
};
-type sendMsgUpdatePkiRevocationDistributionPointParams = {
- value: MsgUpdatePkiRevocationDistributionPoint,
+type sendMsgAssignVidParams = {
+ value: MsgAssignVid,
fee?: StdFee,
memo?: string
};
-type sendMsgRemoveNocX509RootCertParams = {
- value: MsgRemoveNocX509RootCert,
+type sendMsgRejectAddX509RootCertParams = {
+ value: MsgRejectAddX509RootCert,
fee?: StdFee,
memo?: string
};
-type sendMsgRemoveX509CertParams = {
- value: MsgRemoveX509Cert,
+type sendMsgRemoveNocX509IcaCertParams = {
+ value: MsgRemoveNocX509IcaCert,
fee?: StdFee,
memo?: string
};
-type sendMsgApproveAddX509RootCertParams = {
- value: MsgApproveAddX509RootCert,
+type sendMsgAddPkiRevocationDistributionPointParams = {
+ value: MsgAddPkiRevocationDistributionPoint,
fee?: StdFee,
memo?: string
};
-type sendMsgApproveRevokeX509RootCertParams = {
- value: MsgApproveRevokeX509RootCert,
+type sendMsgRemoveNocX509RootCertParams = {
+ value: MsgRemoveNocX509RootCert,
fee?: StdFee,
memo?: string
};
-type sendMsgRevokeNocX509RootCertParams = {
+
+type msgRevokeNocX509RootCertParams = {
value: MsgRevokeNocX509RootCert,
- fee?: StdFee,
- memo?: string
};
+type msgRevokeX509CertParams = {
+ value: MsgRevokeX509Cert,
+};
type msgAddX509CertParams = {
value: MsgAddX509Cert,
};
-type msgProposeAddX509RootCertParams = {
- value: MsgProposeAddX509RootCert,
+type msgAddNocX509IcaCertParams = {
+ value: MsgAddNocX509IcaCert,
};
-type msgAssignVidParams = {
- value: MsgAssignVid,
+type msgUpdatePkiRevocationDistributionPointParams = {
+ value: MsgUpdatePkiRevocationDistributionPoint,
};
type msgProposeRevokeX509RootCertParams = {
value: MsgProposeRevokeX509RootCert,
};
-type msgRevokeNocX509IcaCertParams = {
- value: MsgRevokeNocX509IcaCert,
-};
-
-type msgRevokeX509CertParams = {
- value: MsgRevokeX509Cert,
+type msgProposeAddX509RootCertParams = {
+ value: MsgProposeAddX509RootCert,
};
-type msgAddPkiRevocationDistributionPointParams = {
- value: MsgAddPkiRevocationDistributionPoint,
+type msgDeletePkiRevocationDistributionPointParams = {
+ value: MsgDeletePkiRevocationDistributionPoint,
};
-type msgRemoveNocX509IcaCertParams = {
- value: MsgRemoveNocX509IcaCert,
+type msgApproveRevokeX509RootCertParams = {
+ value: MsgApproveRevokeX509RootCert,
};
-type msgAddNocX509IcaCertParams = {
- value: MsgAddNocX509IcaCert,
+type msgRemoveX509CertParams = {
+ value: MsgRemoveX509Cert,
};
-type msgRejectAddX509RootCertParams = {
- value: MsgRejectAddX509RootCert,
+type msgApproveAddX509RootCertParams = {
+ value: MsgApproveAddX509RootCert,
};
-type msgDeletePkiRevocationDistributionPointParams = {
- value: MsgDeletePkiRevocationDistributionPoint,
+type msgRevokeNocX509IcaCertParams = {
+ value: MsgRevokeNocX509IcaCert,
};
type msgAddNocX509RootCertParams = {
value: MsgAddNocX509RootCert,
};
-type msgUpdatePkiRevocationDistributionPointParams = {
- value: MsgUpdatePkiRevocationDistributionPoint,
-};
-
-type msgRemoveNocX509RootCertParams = {
- value: MsgRemoveNocX509RootCert,
+type msgAssignVidParams = {
+ value: MsgAssignVid,
};
-type msgRemoveX509CertParams = {
- value: MsgRemoveX509Cert,
+type msgRejectAddX509RootCertParams = {
+ value: MsgRejectAddX509RootCert,
};
-type msgApproveAddX509RootCertParams = {
- value: MsgApproveAddX509RootCert,
+type msgRemoveNocX509IcaCertParams = {
+ value: MsgRemoveNocX509IcaCert,
};
-type msgApproveRevokeX509RootCertParams = {
- value: MsgApproveRevokeX509RootCert,
+type msgAddPkiRevocationDistributionPointParams = {
+ value: MsgAddPkiRevocationDistributionPoint,
};
-type msgRevokeNocX509RootCertParams = {
- value: MsgRevokeNocX509RootCert,
+type msgRemoveNocX509RootCertParams = {
+ value: MsgRemoveNocX509RootCert,
};
@@ -266,400 +267,400 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
return {
- async sendMsgAddX509Cert({ value, fee, memo }: sendMsgAddX509CertParams): Promise {
+ async sendMsgRevokeNocX509RootCert({ value, fee, memo }: sendMsgRevokeNocX509RootCertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgAddX509Cert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgRevokeNocX509RootCert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgAddX509Cert({ value: MsgAddX509Cert.fromPartial(value) })
+ let msg = this.msgRevokeNocX509RootCert({ value: MsgRevokeNocX509RootCert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgAddX509Cert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgRevokeNocX509RootCert: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgProposeAddX509RootCert({ value, fee, memo }: sendMsgProposeAddX509RootCertParams): Promise {
+ async sendMsgRevokeX509Cert({ value, fee, memo }: sendMsgRevokeX509CertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgProposeAddX509RootCert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgRevokeX509Cert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgProposeAddX509RootCert({ value: MsgProposeAddX509RootCert.fromPartial(value) })
+ let msg = this.msgRevokeX509Cert({ value: MsgRevokeX509Cert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgProposeAddX509RootCert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgRevokeX509Cert: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgAssignVid({ value, fee, memo }: sendMsgAssignVidParams): Promise {
+ async sendMsgAddX509Cert({ value, fee, memo }: sendMsgAddX509CertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgAssignVid: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgAddX509Cert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgAssignVid({ value: MsgAssignVid.fromPartial(value) })
+ let msg = this.msgAddX509Cert({ value: MsgAddX509Cert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgAssignVid: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgAddX509Cert: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgProposeRevokeX509RootCert({ value, fee, memo }: sendMsgProposeRevokeX509RootCertParams): Promise {
+ async sendMsgAddNocX509IcaCert({ value, fee, memo }: sendMsgAddNocX509IcaCertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgProposeRevokeX509RootCert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgAddNocX509IcaCert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgProposeRevokeX509RootCert({ value: MsgProposeRevokeX509RootCert.fromPartial(value) })
+ let msg = this.msgAddNocX509IcaCert({ value: MsgAddNocX509IcaCert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgProposeRevokeX509RootCert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgAddNocX509IcaCert: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgRevokeNocX509IcaCert({ value, fee, memo }: sendMsgRevokeNocX509IcaCertParams): Promise {
+ async sendMsgUpdatePkiRevocationDistributionPoint({ value, fee, memo }: sendMsgUpdatePkiRevocationDistributionPointParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgRevokeNocX509IcaCert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgUpdatePkiRevocationDistributionPoint: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgRevokeNocX509IcaCert({ value: MsgRevokeNocX509IcaCert.fromPartial(value) })
+ let msg = this.msgUpdatePkiRevocationDistributionPoint({ value: MsgUpdatePkiRevocationDistributionPoint.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgRevokeNocX509IcaCert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgUpdatePkiRevocationDistributionPoint: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgRevokeX509Cert({ value, fee, memo }: sendMsgRevokeX509CertParams): Promise {
+ async sendMsgProposeRevokeX509RootCert({ value, fee, memo }: sendMsgProposeRevokeX509RootCertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgRevokeX509Cert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgProposeRevokeX509RootCert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgRevokeX509Cert({ value: MsgRevokeX509Cert.fromPartial(value) })
+ let msg = this.msgProposeRevokeX509RootCert({ value: MsgProposeRevokeX509RootCert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgRevokeX509Cert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgProposeRevokeX509RootCert: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgAddPkiRevocationDistributionPoint({ value, fee, memo }: sendMsgAddPkiRevocationDistributionPointParams): Promise {
+ async sendMsgProposeAddX509RootCert({ value, fee, memo }: sendMsgProposeAddX509RootCertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgAddPkiRevocationDistributionPoint: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgProposeAddX509RootCert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgAddPkiRevocationDistributionPoint({ value: MsgAddPkiRevocationDistributionPoint.fromPartial(value) })
+ let msg = this.msgProposeAddX509RootCert({ value: MsgProposeAddX509RootCert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgAddPkiRevocationDistributionPoint: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgProposeAddX509RootCert: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgRemoveNocX509IcaCert({ value, fee, memo }: sendMsgRemoveNocX509IcaCertParams): Promise {
+ async sendMsgDeletePkiRevocationDistributionPoint({ value, fee, memo }: sendMsgDeletePkiRevocationDistributionPointParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgRemoveNocX509IcaCert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgDeletePkiRevocationDistributionPoint: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgRemoveNocX509IcaCert({ value: MsgRemoveNocX509IcaCert.fromPartial(value) })
+ let msg = this.msgDeletePkiRevocationDistributionPoint({ value: MsgDeletePkiRevocationDistributionPoint.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgRemoveNocX509IcaCert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgDeletePkiRevocationDistributionPoint: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgAddNocX509IcaCert({ value, fee, memo }: sendMsgAddNocX509IcaCertParams): Promise {
+ async sendMsgApproveRevokeX509RootCert({ value, fee, memo }: sendMsgApproveRevokeX509RootCertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgAddNocX509IcaCert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgApproveRevokeX509RootCert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgAddNocX509IcaCert({ value: MsgAddNocX509IcaCert.fromPartial(value) })
+ let msg = this.msgApproveRevokeX509RootCert({ value: MsgApproveRevokeX509RootCert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgAddNocX509IcaCert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgApproveRevokeX509RootCert: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgRejectAddX509RootCert({ value, fee, memo }: sendMsgRejectAddX509RootCertParams): Promise {
+ async sendMsgRemoveX509Cert({ value, fee, memo }: sendMsgRemoveX509CertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgRejectAddX509RootCert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgRemoveX509Cert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgRejectAddX509RootCert({ value: MsgRejectAddX509RootCert.fromPartial(value) })
+ let msg = this.msgRemoveX509Cert({ value: MsgRemoveX509Cert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgRejectAddX509RootCert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgRemoveX509Cert: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgDeletePkiRevocationDistributionPoint({ value, fee, memo }: sendMsgDeletePkiRevocationDistributionPointParams): Promise {
+ async sendMsgApproveAddX509RootCert({ value, fee, memo }: sendMsgApproveAddX509RootCertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgDeletePkiRevocationDistributionPoint: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgApproveAddX509RootCert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgDeletePkiRevocationDistributionPoint({ value: MsgDeletePkiRevocationDistributionPoint.fromPartial(value) })
+ let msg = this.msgApproveAddX509RootCert({ value: MsgApproveAddX509RootCert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgDeletePkiRevocationDistributionPoint: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgApproveAddX509RootCert: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgAddNocX509RootCert({ value, fee, memo }: sendMsgAddNocX509RootCertParams): Promise {
+ async sendMsgRevokeNocX509IcaCert({ value, fee, memo }: sendMsgRevokeNocX509IcaCertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgAddNocX509RootCert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgRevokeNocX509IcaCert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgAddNocX509RootCert({ value: MsgAddNocX509RootCert.fromPartial(value) })
+ let msg = this.msgRevokeNocX509IcaCert({ value: MsgRevokeNocX509IcaCert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgAddNocX509RootCert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgRevokeNocX509IcaCert: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgUpdatePkiRevocationDistributionPoint({ value, fee, memo }: sendMsgUpdatePkiRevocationDistributionPointParams): Promise {
+ async sendMsgAddNocX509RootCert({ value, fee, memo }: sendMsgAddNocX509RootCertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgUpdatePkiRevocationDistributionPoint: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgAddNocX509RootCert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgUpdatePkiRevocationDistributionPoint({ value: MsgUpdatePkiRevocationDistributionPoint.fromPartial(value) })
+ let msg = this.msgAddNocX509RootCert({ value: MsgAddNocX509RootCert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgUpdatePkiRevocationDistributionPoint: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgAddNocX509RootCert: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgRemoveNocX509RootCert({ value, fee, memo }: sendMsgRemoveNocX509RootCertParams): Promise {
+ async sendMsgAssignVid({ value, fee, memo }: sendMsgAssignVidParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgRemoveNocX509RootCert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgAssignVid: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgRemoveNocX509RootCert({ value: MsgRemoveNocX509RootCert.fromPartial(value) })
+ let msg = this.msgAssignVid({ value: MsgAssignVid.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgRemoveNocX509RootCert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgAssignVid: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgRemoveX509Cert({ value, fee, memo }: sendMsgRemoveX509CertParams): Promise {
+ async sendMsgRejectAddX509RootCert({ value, fee, memo }: sendMsgRejectAddX509RootCertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgRemoveX509Cert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgRejectAddX509RootCert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgRemoveX509Cert({ value: MsgRemoveX509Cert.fromPartial(value) })
+ let msg = this.msgRejectAddX509RootCert({ value: MsgRejectAddX509RootCert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgRemoveX509Cert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgRejectAddX509RootCert: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgApproveAddX509RootCert({ value, fee, memo }: sendMsgApproveAddX509RootCertParams): Promise {
+ async sendMsgRemoveNocX509IcaCert({ value, fee, memo }: sendMsgRemoveNocX509IcaCertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgApproveAddX509RootCert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgRemoveNocX509IcaCert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgApproveAddX509RootCert({ value: MsgApproveAddX509RootCert.fromPartial(value) })
+ let msg = this.msgRemoveNocX509IcaCert({ value: MsgRemoveNocX509IcaCert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgApproveAddX509RootCert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgRemoveNocX509IcaCert: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgApproveRevokeX509RootCert({ value, fee, memo }: sendMsgApproveRevokeX509RootCertParams): Promise {
+ async sendMsgAddPkiRevocationDistributionPoint({ value, fee, memo }: sendMsgAddPkiRevocationDistributionPointParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgApproveRevokeX509RootCert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgAddPkiRevocationDistributionPoint: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgApproveRevokeX509RootCert({ value: MsgApproveRevokeX509RootCert.fromPartial(value) })
+ let msg = this.msgAddPkiRevocationDistributionPoint({ value: MsgAddPkiRevocationDistributionPoint.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgApproveRevokeX509RootCert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgAddPkiRevocationDistributionPoint: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgRevokeNocX509RootCert({ value, fee, memo }: sendMsgRevokeNocX509RootCertParams): Promise {
+ async sendMsgRemoveNocX509RootCert({ value, fee, memo }: sendMsgRemoveNocX509RootCertParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgRevokeNocX509RootCert: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgRemoveNocX509RootCert: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgRevokeNocX509RootCert({ value: MsgRevokeNocX509RootCert.fromPartial(value) })
+ let msg = this.msgRemoveNocX509RootCert({ value: MsgRemoveNocX509RootCert.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgRevokeNocX509RootCert: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgRemoveNocX509RootCert: Could not broadcast Tx: '+ e.message)
}
},
- msgAddX509Cert({ value }: msgAddX509CertParams): EncodeObject {
+ msgRevokeNocX509RootCert({ value }: msgRevokeNocX509RootCertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgAddX509Cert", value: MsgAddX509Cert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRevokeNocX509RootCert", value: MsgRevokeNocX509RootCert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgAddX509Cert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgRevokeNocX509RootCert: Could not create message: ' + e.message)
}
},
- msgProposeAddX509RootCert({ value }: msgProposeAddX509RootCertParams): EncodeObject {
+ msgRevokeX509Cert({ value }: msgRevokeX509CertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgProposeAddX509RootCert", value: MsgProposeAddX509RootCert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRevokeX509Cert", value: MsgRevokeX509Cert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgProposeAddX509RootCert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgRevokeX509Cert: Could not create message: ' + e.message)
}
},
- msgAssignVid({ value }: msgAssignVidParams): EncodeObject {
+ msgAddX509Cert({ value }: msgAddX509CertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgAssignVid", value: MsgAssignVid.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgAddX509Cert", value: MsgAddX509Cert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgAssignVid: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgAddX509Cert: Could not create message: ' + e.message)
}
},
- msgProposeRevokeX509RootCert({ value }: msgProposeRevokeX509RootCertParams): EncodeObject {
+ msgAddNocX509IcaCert({ value }: msgAddNocX509IcaCertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgProposeRevokeX509RootCert", value: MsgProposeRevokeX509RootCert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgAddNocX509IcaCert", value: MsgAddNocX509IcaCert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgProposeRevokeX509RootCert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgAddNocX509IcaCert: Could not create message: ' + e.message)
}
},
- msgRevokeNocX509IcaCert({ value }: msgRevokeNocX509IcaCertParams): EncodeObject {
+ msgUpdatePkiRevocationDistributionPoint({ value }: msgUpdatePkiRevocationDistributionPointParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRevokeNocX509IcaCert", value: MsgRevokeNocX509IcaCert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgUpdatePkiRevocationDistributionPoint", value: MsgUpdatePkiRevocationDistributionPoint.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgRevokeNocX509IcaCert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgUpdatePkiRevocationDistributionPoint: Could not create message: ' + e.message)
}
},
- msgRevokeX509Cert({ value }: msgRevokeX509CertParams): EncodeObject {
+ msgProposeRevokeX509RootCert({ value }: msgProposeRevokeX509RootCertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRevokeX509Cert", value: MsgRevokeX509Cert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgProposeRevokeX509RootCert", value: MsgProposeRevokeX509RootCert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgRevokeX509Cert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgProposeRevokeX509RootCert: Could not create message: ' + e.message)
}
},
- msgAddPkiRevocationDistributionPoint({ value }: msgAddPkiRevocationDistributionPointParams): EncodeObject {
+ msgProposeAddX509RootCert({ value }: msgProposeAddX509RootCertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgAddPkiRevocationDistributionPoint", value: MsgAddPkiRevocationDistributionPoint.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgProposeAddX509RootCert", value: MsgProposeAddX509RootCert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgAddPkiRevocationDistributionPoint: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgProposeAddX509RootCert: Could not create message: ' + e.message)
}
},
- msgRemoveNocX509IcaCert({ value }: msgRemoveNocX509IcaCertParams): EncodeObject {
+ msgDeletePkiRevocationDistributionPoint({ value }: msgDeletePkiRevocationDistributionPointParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRemoveNocX509IcaCert", value: MsgRemoveNocX509IcaCert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgDeletePkiRevocationDistributionPoint", value: MsgDeletePkiRevocationDistributionPoint.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgRemoveNocX509IcaCert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgDeletePkiRevocationDistributionPoint: Could not create message: ' + e.message)
}
},
- msgAddNocX509IcaCert({ value }: msgAddNocX509IcaCertParams): EncodeObject {
+ msgApproveRevokeX509RootCert({ value }: msgApproveRevokeX509RootCertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgAddNocX509IcaCert", value: MsgAddNocX509IcaCert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgApproveRevokeX509RootCert", value: MsgApproveRevokeX509RootCert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgAddNocX509IcaCert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgApproveRevokeX509RootCert: Could not create message: ' + e.message)
}
},
- msgRejectAddX509RootCert({ value }: msgRejectAddX509RootCertParams): EncodeObject {
+ msgRemoveX509Cert({ value }: msgRemoveX509CertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRejectAddX509RootCert", value: MsgRejectAddX509RootCert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRemoveX509Cert", value: MsgRemoveX509Cert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgRejectAddX509RootCert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgRemoveX509Cert: Could not create message: ' + e.message)
}
},
- msgDeletePkiRevocationDistributionPoint({ value }: msgDeletePkiRevocationDistributionPointParams): EncodeObject {
+ msgApproveAddX509RootCert({ value }: msgApproveAddX509RootCertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgDeletePkiRevocationDistributionPoint", value: MsgDeletePkiRevocationDistributionPoint.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgApproveAddX509RootCert", value: MsgApproveAddX509RootCert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgDeletePkiRevocationDistributionPoint: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgApproveAddX509RootCert: Could not create message: ' + e.message)
}
},
- msgAddNocX509RootCert({ value }: msgAddNocX509RootCertParams): EncodeObject {
+ msgRevokeNocX509IcaCert({ value }: msgRevokeNocX509IcaCertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgAddNocX509RootCert", value: MsgAddNocX509RootCert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRevokeNocX509IcaCert", value: MsgRevokeNocX509IcaCert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgAddNocX509RootCert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgRevokeNocX509IcaCert: Could not create message: ' + e.message)
}
},
- msgUpdatePkiRevocationDistributionPoint({ value }: msgUpdatePkiRevocationDistributionPointParams): EncodeObject {
+ msgAddNocX509RootCert({ value }: msgAddNocX509RootCertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgUpdatePkiRevocationDistributionPoint", value: MsgUpdatePkiRevocationDistributionPoint.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgAddNocX509RootCert", value: MsgAddNocX509RootCert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgUpdatePkiRevocationDistributionPoint: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgAddNocX509RootCert: Could not create message: ' + e.message)
}
},
- msgRemoveNocX509RootCert({ value }: msgRemoveNocX509RootCertParams): EncodeObject {
+ msgAssignVid({ value }: msgAssignVidParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRemoveNocX509RootCert", value: MsgRemoveNocX509RootCert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgAssignVid", value: MsgAssignVid.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgRemoveNocX509RootCert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgAssignVid: Could not create message: ' + e.message)
}
},
- msgRemoveX509Cert({ value }: msgRemoveX509CertParams): EncodeObject {
+ msgRejectAddX509RootCert({ value }: msgRejectAddX509RootCertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRemoveX509Cert", value: MsgRemoveX509Cert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRejectAddX509RootCert", value: MsgRejectAddX509RootCert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgRemoveX509Cert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgRejectAddX509RootCert: Could not create message: ' + e.message)
}
},
- msgApproveAddX509RootCert({ value }: msgApproveAddX509RootCertParams): EncodeObject {
+ msgRemoveNocX509IcaCert({ value }: msgRemoveNocX509IcaCertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgApproveAddX509RootCert", value: MsgApproveAddX509RootCert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRemoveNocX509IcaCert", value: MsgRemoveNocX509IcaCert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgApproveAddX509RootCert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgRemoveNocX509IcaCert: Could not create message: ' + e.message)
}
},
- msgApproveRevokeX509RootCert({ value }: msgApproveRevokeX509RootCertParams): EncodeObject {
+ msgAddPkiRevocationDistributionPoint({ value }: msgAddPkiRevocationDistributionPointParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgApproveRevokeX509RootCert", value: MsgApproveRevokeX509RootCert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgAddPkiRevocationDistributionPoint", value: MsgAddPkiRevocationDistributionPoint.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgApproveRevokeX509RootCert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgAddPkiRevocationDistributionPoint: Could not create message: ' + e.message)
}
},
- msgRevokeNocX509RootCert({ value }: msgRevokeNocX509RootCertParams): EncodeObject {
+ msgRemoveNocX509RootCert({ value }: msgRemoveNocX509RootCertParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRevokeNocX509RootCert", value: MsgRevokeNocX509RootCert.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.pki.MsgRemoveNocX509RootCert", value: MsgRemoveNocX509RootCert.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgRevokeNocX509RootCert: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgRemoveNocX509RootCert: Could not create message: ' + e.message)
}
},
@@ -687,6 +688,7 @@ class SDKModule {
this.structure = {
AllCertificates: getStructure(typeAllCertificates.fromPartial({})),
AllCertificatesBySubject: getStructure(typeAllCertificatesBySubject.fromPartial({})),
+ AllCertificatesBySubjectKeyId: getStructure(typeAllCertificatesBySubjectKeyId.fromPartial({})),
ApprovedCertificates: getStructure(typeApprovedCertificates.fromPartial({})),
ApprovedCertificatesBySubject: getStructure(typeApprovedCertificatesBySubject.fromPartial({})),
ApprovedCertificatesBySubjectKeyId: getStructure(typeApprovedCertificatesBySubjectKeyId.fromPartial({})),
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.pki/registry.ts b/ts-client/zigbeealliance.distributedcomplianceledger.pki/registry.ts
index 2ce7e64a6..00c5c5430 100755
--- a/ts-client/zigbeealliance.distributedcomplianceledger.pki/registry.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.pki/registry.ts
@@ -1,42 +1,42 @@
import { GeneratedType } from "@cosmjs/proto-signing";
-import { MsgAddX509Cert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgProposeAddX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgAssignVid } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgProposeRevokeX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgRevokeNocX509IcaCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgRevokeNocX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
import { MsgRevokeX509Cert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgAddPkiRevocationDistributionPoint } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgRemoveNocX509IcaCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgAddX509Cert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
import { MsgAddNocX509IcaCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgRejectAddX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgDeletePkiRevocationDistributionPoint } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgAddNocX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
import { MsgUpdatePkiRevocationDistributionPoint } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgRemoveNocX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgProposeRevokeX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgProposeAddX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgDeletePkiRevocationDistributionPoint } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgApproveRevokeX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
import { MsgRemoveX509Cert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
import { MsgApproveAddX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgApproveRevokeX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
-import { MsgRevokeNocX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgRevokeNocX509IcaCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgAddNocX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgAssignVid } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgRejectAddX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgRemoveNocX509IcaCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgAddPkiRevocationDistributionPoint } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
+import { MsgRemoveNocX509RootCert } from "./types/zigbeealliance/distributedcomplianceledger/pki/tx";
const msgTypes: Array<[string, GeneratedType]> = [
- ["/zigbeealliance.distributedcomplianceledger.pki.MsgAddX509Cert", MsgAddX509Cert],
- ["/zigbeealliance.distributedcomplianceledger.pki.MsgProposeAddX509RootCert", MsgProposeAddX509RootCert],
- ["/zigbeealliance.distributedcomplianceledger.pki.MsgAssignVid", MsgAssignVid],
- ["/zigbeealliance.distributedcomplianceledger.pki.MsgProposeRevokeX509RootCert", MsgProposeRevokeX509RootCert],
- ["/zigbeealliance.distributedcomplianceledger.pki.MsgRevokeNocX509IcaCert", MsgRevokeNocX509IcaCert],
+ ["/zigbeealliance.distributedcomplianceledger.pki.MsgRevokeNocX509RootCert", MsgRevokeNocX509RootCert],
["/zigbeealliance.distributedcomplianceledger.pki.MsgRevokeX509Cert", MsgRevokeX509Cert],
- ["/zigbeealliance.distributedcomplianceledger.pki.MsgAddPkiRevocationDistributionPoint", MsgAddPkiRevocationDistributionPoint],
- ["/zigbeealliance.distributedcomplianceledger.pki.MsgRemoveNocX509IcaCert", MsgRemoveNocX509IcaCert],
+ ["/zigbeealliance.distributedcomplianceledger.pki.MsgAddX509Cert", MsgAddX509Cert],
["/zigbeealliance.distributedcomplianceledger.pki.MsgAddNocX509IcaCert", MsgAddNocX509IcaCert],
- ["/zigbeealliance.distributedcomplianceledger.pki.MsgRejectAddX509RootCert", MsgRejectAddX509RootCert],
- ["/zigbeealliance.distributedcomplianceledger.pki.MsgDeletePkiRevocationDistributionPoint", MsgDeletePkiRevocationDistributionPoint],
- ["/zigbeealliance.distributedcomplianceledger.pki.MsgAddNocX509RootCert", MsgAddNocX509RootCert],
["/zigbeealliance.distributedcomplianceledger.pki.MsgUpdatePkiRevocationDistributionPoint", MsgUpdatePkiRevocationDistributionPoint],
- ["/zigbeealliance.distributedcomplianceledger.pki.MsgRemoveNocX509RootCert", MsgRemoveNocX509RootCert],
+ ["/zigbeealliance.distributedcomplianceledger.pki.MsgProposeRevokeX509RootCert", MsgProposeRevokeX509RootCert],
+ ["/zigbeealliance.distributedcomplianceledger.pki.MsgProposeAddX509RootCert", MsgProposeAddX509RootCert],
+ ["/zigbeealliance.distributedcomplianceledger.pki.MsgDeletePkiRevocationDistributionPoint", MsgDeletePkiRevocationDistributionPoint],
+ ["/zigbeealliance.distributedcomplianceledger.pki.MsgApproveRevokeX509RootCert", MsgApproveRevokeX509RootCert],
["/zigbeealliance.distributedcomplianceledger.pki.MsgRemoveX509Cert", MsgRemoveX509Cert],
["/zigbeealliance.distributedcomplianceledger.pki.MsgApproveAddX509RootCert", MsgApproveAddX509RootCert],
- ["/zigbeealliance.distributedcomplianceledger.pki.MsgApproveRevokeX509RootCert", MsgApproveRevokeX509RootCert],
- ["/zigbeealliance.distributedcomplianceledger.pki.MsgRevokeNocX509RootCert", MsgRevokeNocX509RootCert],
+ ["/zigbeealliance.distributedcomplianceledger.pki.MsgRevokeNocX509IcaCert", MsgRevokeNocX509IcaCert],
+ ["/zigbeealliance.distributedcomplianceledger.pki.MsgAddNocX509RootCert", MsgAddNocX509RootCert],
+ ["/zigbeealliance.distributedcomplianceledger.pki.MsgAssignVid", MsgAssignVid],
+ ["/zigbeealliance.distributedcomplianceledger.pki.MsgRejectAddX509RootCert", MsgRejectAddX509RootCert],
+ ["/zigbeealliance.distributedcomplianceledger.pki.MsgRemoveNocX509IcaCert", MsgRemoveNocX509IcaCert],
+ ["/zigbeealliance.distributedcomplianceledger.pki.MsgAddPkiRevocationDistributionPoint", MsgAddPkiRevocationDistributionPoint],
+ ["/zigbeealliance.distributedcomplianceledger.pki.MsgRemoveNocX509RootCert", MsgRemoveNocX509RootCert],
];
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.pki/rest.ts b/ts-client/zigbeealliance.distributedcomplianceledger.pki/rest.ts
index 742cc3231..0950c4830 100644
--- a/ts-client/zigbeealliance.distributedcomplianceledger.pki/rest.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.pki/rest.ts
@@ -787,6 +787,7 @@ export class Api extends HttpClient
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.pki/types.ts b/ts-client/zigbeealliance.distributedcomplianceledger.pki/types.ts
index 97c81ee53..592848aee 100755
--- a/ts-client/zigbeealliance.distributedcomplianceledger.pki/types.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.pki/types.ts
@@ -1,5 +1,6 @@
import { AllCertificates } from "./types/zigbeealliance/distributedcomplianceledger/pki/all_certificates"
import { AllCertificatesBySubject } from "./types/zigbeealliance/distributedcomplianceledger/pki/all_certificates_by_subject"
+import { AllCertificatesBySubjectKeyId } from "./types/zigbeealliance/distributedcomplianceledger/pki/all_certificates_by_subject_key_id"
import { ApprovedCertificates } from "./types/zigbeealliance/distributedcomplianceledger/pki/approved_certificates"
import { ApprovedCertificatesBySubject } from "./types/zigbeealliance/distributedcomplianceledger/pki/approved_certificates_by_subject"
import { ApprovedCertificatesBySubjectKeyId } from "./types/zigbeealliance/distributedcomplianceledger/pki/approved_certificates_by_subject_key_id"
@@ -29,6 +30,7 @@ import { UniqueCertificate } from "./types/zigbeealliance/distributedcompliancel
export {
AllCertificates,
AllCertificatesBySubject,
+ AllCertificatesBySubjectKeyId,
ApprovedCertificates,
ApprovedCertificatesBySubject,
ApprovedCertificatesBySubjectKeyId,
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.pki/types/zigbeealliance/distributedcomplianceledger/pki/genesis.ts b/ts-client/zigbeealliance.distributedcomplianceledger.pki/types/zigbeealliance/distributedcomplianceledger/pki/genesis.ts
index 90deab7b4..35f244faa 100644
--- a/ts-client/zigbeealliance.distributedcomplianceledger.pki/types/zigbeealliance/distributedcomplianceledger/pki/genesis.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.pki/types/zigbeealliance/distributedcomplianceledger/pki/genesis.ts
@@ -2,6 +2,7 @@
import _m0 from "protobufjs/minimal";
import { AllCertificates } from "./all_certificates";
import { AllCertificatesBySubject } from "./all_certificates_by_subject";
+import { AllCertificatesBySubjectKeyId } from "./all_certificates_by_subject_key_id";
import { ApprovedCertificates } from "./approved_certificates";
import { ApprovedCertificatesBySubject } from "./approved_certificates_by_subject";
import { ApprovedCertificatesBySubjectKeyId } from "./approved_certificates_by_subject_key_id";
@@ -50,8 +51,9 @@ export interface GenesisState {
nocCertificatesBySubjectList: NocCertificatesBySubject[];
certificatesList: AllCertificates[];
revokedNocIcaCertificatesList: RevokedNocIcaCertificates[];
- /** this line is used by starport scaffolding # genesis/proto/state */
allCertificatesBySubjectList: AllCertificatesBySubject[];
+ /** this line is used by starport scaffolding # genesis/proto/state */
+ allCertificatesBySubjectKeyIdList: AllCertificatesBySubjectKeyId[];
}
function createBaseGenesisState(): GenesisState {
@@ -79,6 +81,7 @@ function createBaseGenesisState(): GenesisState {
certificatesList: [],
revokedNocIcaCertificatesList: [],
allCertificatesBySubjectList: [],
+ allCertificatesBySubjectKeyIdList: [],
};
}
@@ -153,6 +156,9 @@ export const GenesisState = {
for (const v of message.allCertificatesBySubjectList) {
AllCertificatesBySubject.encode(v!, writer.uint32(186).fork()).ldelim();
}
+ for (const v of message.allCertificatesBySubjectKeyIdList) {
+ AllCertificatesBySubjectKeyId.encode(v!, writer.uint32(194).fork()).ldelim();
+ }
return writer;
},
@@ -238,6 +244,9 @@ export const GenesisState = {
case 23:
message.allCertificatesBySubjectList.push(AllCertificatesBySubject.decode(reader, reader.uint32()));
break;
+ case 24:
+ message.allCertificatesBySubjectKeyIdList.push(AllCertificatesBySubjectKeyId.decode(reader, reader.uint32()));
+ break;
default:
reader.skipType(tag & 7);
break;
@@ -320,6 +329,9 @@ export const GenesisState = {
allCertificatesBySubjectList: Array.isArray(object?.allCertificatesBySubjectList)
? object.allCertificatesBySubjectList.map((e: any) => AllCertificatesBySubject.fromJSON(e))
: [],
+ allCertificatesBySubjectKeyIdList: Array.isArray(object?.allCertificatesBySubjectKeyIdList)
+ ? object.allCertificatesBySubjectKeyIdList.map((e: any) => AllCertificatesBySubjectKeyId.fromJSON(e))
+ : [],
};
},
@@ -471,6 +483,13 @@ export const GenesisState = {
} else {
obj.allCertificatesBySubjectList = [];
}
+ if (message.allCertificatesBySubjectKeyIdList) {
+ obj.allCertificatesBySubjectKeyIdList = message.allCertificatesBySubjectKeyIdList.map((e) =>
+ e ? AllCertificatesBySubjectKeyId.toJSON(e) : undefined
+ );
+ } else {
+ obj.allCertificatesBySubjectKeyIdList = [];
+ }
return obj;
},
@@ -524,6 +543,8 @@ export const GenesisState = {
object.revokedNocIcaCertificatesList?.map((e) => RevokedNocIcaCertificates.fromPartial(e)) || [];
message.allCertificatesBySubjectList =
object.allCertificatesBySubjectList?.map((e) => AllCertificatesBySubject.fromPartial(e)) || [];
+ message.allCertificatesBySubjectKeyIdList =
+ object.allCertificatesBySubjectKeyIdList?.map((e) => AllCertificatesBySubjectKeyId.fromPartial(e)) || [];
return message;
},
};
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.pki/types/zigbeealliance/distributedcomplianceledger/pki/query.ts b/ts-client/zigbeealliance.distributedcomplianceledger.pki/types/zigbeealliance/distributedcomplianceledger/pki/query.ts
index fde7bf85e..534b68cef 100644
--- a/ts-client/zigbeealliance.distributedcomplianceledger.pki/types/zigbeealliance/distributedcomplianceledger/pki/query.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.pki/types/zigbeealliance/distributedcomplianceledger/pki/query.ts
@@ -26,6 +26,7 @@ export const protobufPackage = "zigbeealliance.distributedcomplianceledger.pki";
export interface QueryAllCertificatesRequest {
pagination: PageRequest | undefined;
+ subjectKeyId: string;
}
export interface QueryAllCertificatesResponse {
@@ -307,7 +308,7 @@ export interface QueryGetNocCertificatesResponse {
}
function createBaseQueryAllCertificatesRequest(): QueryAllCertificatesRequest {
- return { pagination: undefined };
+ return { pagination: undefined, subjectKeyId: "" };
}
export const QueryAllCertificatesRequest = {
@@ -315,6 +316,9 @@ export const QueryAllCertificatesRequest = {
if (message.pagination !== undefined) {
PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
}
+ if (message.subjectKeyId !== "") {
+ writer.uint32(18).string(message.subjectKeyId);
+ }
return writer;
},
@@ -328,6 +332,9 @@ export const QueryAllCertificatesRequest = {
case 1:
message.pagination = PageRequest.decode(reader, reader.uint32());
break;
+ case 2:
+ message.subjectKeyId = reader.string();
+ break;
default:
reader.skipType(tag & 7);
break;
@@ -337,13 +344,17 @@ export const QueryAllCertificatesRequest = {
},
fromJSON(object: any): QueryAllCertificatesRequest {
- return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined };
+ return {
+ pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined,
+ subjectKeyId: isSet(object.subjectKeyId) ? String(object.subjectKeyId) : "",
+ };
},
toJSON(message: QueryAllCertificatesRequest): unknown {
const obj: any = {};
message.pagination !== undefined
&& (obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
+ message.subjectKeyId !== undefined && (obj.subjectKeyId = message.subjectKeyId);
return obj;
},
@@ -352,6 +363,7 @@ export const QueryAllCertificatesRequest = {
message.pagination = (object.pagination !== undefined && object.pagination !== null)
? PageRequest.fromPartial(object.pagination)
: undefined;
+ message.subjectKeyId = object.subjectKeyId ?? "";
return message;
},
};
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.validator/module.ts b/ts-client/zigbeealliance.distributedcomplianceledger.validator/module.ts
index cb85ae35a..331c1a8c9 100755
--- a/ts-client/zigbeealliance.distributedcomplianceledger.validator/module.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.validator/module.ts
@@ -7,12 +7,12 @@ import { msgTypes } from './registry';
import { IgniteClient } from "../client"
import { MissingWalletError } from "../helpers"
import { Api } from "./rest";
+import { MsgRejectDisableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
import { MsgCreateValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
import { MsgDisableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
-import { MsgApproveDisableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
import { MsgEnableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
import { MsgProposeDisableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
-import { MsgRejectDisableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
+import { MsgApproveDisableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
import { Description as typeDescription} from "./types"
import { DisabledValidator as typeDisabledValidator} from "./types"
@@ -22,22 +22,22 @@ import { ProposedDisableValidator as typeProposedDisableValidator} from "./types
import { RejectedDisableValidator as typeRejectedDisableValidator} from "./types"
import { Validator as typeValidator} from "./types"
-export { MsgCreateValidator, MsgDisableValidator, MsgApproveDisableValidator, MsgEnableValidator, MsgProposeDisableValidator, MsgRejectDisableValidator };
+export { MsgRejectDisableValidator, MsgCreateValidator, MsgDisableValidator, MsgEnableValidator, MsgProposeDisableValidator, MsgApproveDisableValidator };
-type sendMsgCreateValidatorParams = {
- value: MsgCreateValidator,
+type sendMsgRejectDisableValidatorParams = {
+ value: MsgRejectDisableValidator,
fee?: StdFee,
memo?: string
};
-type sendMsgDisableValidatorParams = {
- value: MsgDisableValidator,
+type sendMsgCreateValidatorParams = {
+ value: MsgCreateValidator,
fee?: StdFee,
memo?: string
};
-type sendMsgApproveDisableValidatorParams = {
- value: MsgApproveDisableValidator,
+type sendMsgDisableValidatorParams = {
+ value: MsgDisableValidator,
fee?: StdFee,
memo?: string
};
@@ -54,13 +54,17 @@ type sendMsgProposeDisableValidatorParams = {
memo?: string
};
-type sendMsgRejectDisableValidatorParams = {
- value: MsgRejectDisableValidator,
+type sendMsgApproveDisableValidatorParams = {
+ value: MsgApproveDisableValidator,
fee?: StdFee,
memo?: string
};
+type msgRejectDisableValidatorParams = {
+ value: MsgRejectDisableValidator,
+};
+
type msgCreateValidatorParams = {
value: MsgCreateValidator,
};
@@ -69,10 +73,6 @@ type msgDisableValidatorParams = {
value: MsgDisableValidator,
};
-type msgApproveDisableValidatorParams = {
- value: MsgApproveDisableValidator,
-};
-
type msgEnableValidatorParams = {
value: MsgEnableValidator,
};
@@ -81,8 +81,8 @@ type msgProposeDisableValidatorParams = {
value: MsgProposeDisableValidator,
};
-type msgRejectDisableValidatorParams = {
- value: MsgRejectDisableValidator,
+type msgApproveDisableValidatorParams = {
+ value: MsgApproveDisableValidator,
};
@@ -115,45 +115,45 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
return {
- async sendMsgCreateValidator({ value, fee, memo }: sendMsgCreateValidatorParams): Promise {
+ async sendMsgRejectDisableValidator({ value, fee, memo }: sendMsgRejectDisableValidatorParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgCreateValidator: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgRejectDisableValidator: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgCreateValidator({ value: MsgCreateValidator.fromPartial(value) })
+ let msg = this.msgRejectDisableValidator({ value: MsgRejectDisableValidator.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgCreateValidator: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgRejectDisableValidator: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgDisableValidator({ value, fee, memo }: sendMsgDisableValidatorParams): Promise {
+ async sendMsgCreateValidator({ value, fee, memo }: sendMsgCreateValidatorParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgDisableValidator: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgCreateValidator: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgDisableValidator({ value: MsgDisableValidator.fromPartial(value) })
+ let msg = this.msgCreateValidator({ value: MsgCreateValidator.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgDisableValidator: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgCreateValidator: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgApproveDisableValidator({ value, fee, memo }: sendMsgApproveDisableValidatorParams): Promise {
+ async sendMsgDisableValidator({ value, fee, memo }: sendMsgDisableValidatorParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgApproveDisableValidator: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgDisableValidator: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgApproveDisableValidator({ value: MsgApproveDisableValidator.fromPartial(value) })
+ let msg = this.msgDisableValidator({ value: MsgDisableValidator.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgApproveDisableValidator: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgDisableValidator: Could not broadcast Tx: '+ e.message)
}
},
@@ -185,21 +185,29 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
}
},
- async sendMsgRejectDisableValidator({ value, fee, memo }: sendMsgRejectDisableValidatorParams): Promise {
+ async sendMsgApproveDisableValidator({ value, fee, memo }: sendMsgApproveDisableValidatorParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgRejectDisableValidator: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgApproveDisableValidator: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgRejectDisableValidator({ value: MsgRejectDisableValidator.fromPartial(value) })
+ let msg = this.msgApproveDisableValidator({ value: MsgApproveDisableValidator.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgRejectDisableValidator: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgApproveDisableValidator: Could not broadcast Tx: '+ e.message)
}
},
+ msgRejectDisableValidator({ value }: msgRejectDisableValidatorParams): EncodeObject {
+ try {
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.validator.MsgRejectDisableValidator", value: MsgRejectDisableValidator.fromPartial( value ) }
+ } catch (e: any) {
+ throw new Error('TxClient:MsgRejectDisableValidator: Could not create message: ' + e.message)
+ }
+ },
+
msgCreateValidator({ value }: msgCreateValidatorParams): EncodeObject {
try {
return { typeUrl: "/zigbeealliance.distributedcomplianceledger.validator.MsgCreateValidator", value: MsgCreateValidator.fromPartial( value ) }
@@ -216,14 +224,6 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
}
},
- msgApproveDisableValidator({ value }: msgApproveDisableValidatorParams): EncodeObject {
- try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.validator.MsgApproveDisableValidator", value: MsgApproveDisableValidator.fromPartial( value ) }
- } catch (e: any) {
- throw new Error('TxClient:MsgApproveDisableValidator: Could not create message: ' + e.message)
- }
- },
-
msgEnableValidator({ value }: msgEnableValidatorParams): EncodeObject {
try {
return { typeUrl: "/zigbeealliance.distributedcomplianceledger.validator.MsgEnableValidator", value: MsgEnableValidator.fromPartial( value ) }
@@ -240,11 +240,11 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
}
},
- msgRejectDisableValidator({ value }: msgRejectDisableValidatorParams): EncodeObject {
+ msgApproveDisableValidator({ value }: msgApproveDisableValidatorParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.validator.MsgRejectDisableValidator", value: MsgRejectDisableValidator.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.validator.MsgApproveDisableValidator", value: MsgApproveDisableValidator.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgRejectDisableValidator: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgApproveDisableValidator: Could not create message: ' + e.message)
}
},
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.validator/registry.ts b/ts-client/zigbeealliance.distributedcomplianceledger.validator/registry.ts
index 8f3e89f23..86fffa30d 100755
--- a/ts-client/zigbeealliance.distributedcomplianceledger.validator/registry.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.validator/registry.ts
@@ -1,18 +1,18 @@
import { GeneratedType } from "@cosmjs/proto-signing";
+import { MsgRejectDisableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
import { MsgCreateValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
import { MsgDisableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
-import { MsgApproveDisableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
import { MsgEnableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
import { MsgProposeDisableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
-import { MsgRejectDisableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
+import { MsgApproveDisableValidator } from "./types/zigbeealliance/distributedcomplianceledger/validator/tx";
const msgTypes: Array<[string, GeneratedType]> = [
+ ["/zigbeealliance.distributedcomplianceledger.validator.MsgRejectDisableValidator", MsgRejectDisableValidator],
["/zigbeealliance.distributedcomplianceledger.validator.MsgCreateValidator", MsgCreateValidator],
["/zigbeealliance.distributedcomplianceledger.validator.MsgDisableValidator", MsgDisableValidator],
- ["/zigbeealliance.distributedcomplianceledger.validator.MsgApproveDisableValidator", MsgApproveDisableValidator],
["/zigbeealliance.distributedcomplianceledger.validator.MsgEnableValidator", MsgEnableValidator],
["/zigbeealliance.distributedcomplianceledger.validator.MsgProposeDisableValidator", MsgProposeDisableValidator],
- ["/zigbeealliance.distributedcomplianceledger.validator.MsgRejectDisableValidator", MsgRejectDisableValidator],
+ ["/zigbeealliance.distributedcomplianceledger.validator.MsgApproveDisableValidator", MsgApproveDisableValidator],
];
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.vendorinfo/module.ts b/ts-client/zigbeealliance.distributedcomplianceledger.vendorinfo/module.ts
index f43f0c642..dac5b4bda 100755
--- a/ts-client/zigbeealliance.distributedcomplianceledger.vendorinfo/module.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.vendorinfo/module.ts
@@ -7,18 +7,12 @@ import { msgTypes } from './registry';
import { IgniteClient } from "../client"
import { MissingWalletError } from "../helpers"
import { Api } from "./rest";
-import { MsgCreateVendorInfo } from "./types/zigbeealliance/distributedcomplianceledger/vendorinfo/tx";
import { MsgUpdateVendorInfo } from "./types/zigbeealliance/distributedcomplianceledger/vendorinfo/tx";
+import { MsgCreateVendorInfo } from "./types/zigbeealliance/distributedcomplianceledger/vendorinfo/tx";
import { VendorInfo as typeVendorInfo} from "./types"
-export { MsgCreateVendorInfo, MsgUpdateVendorInfo };
-
-type sendMsgCreateVendorInfoParams = {
- value: MsgCreateVendorInfo,
- fee?: StdFee,
- memo?: string
-};
+export { MsgUpdateVendorInfo, MsgCreateVendorInfo };
type sendMsgUpdateVendorInfoParams = {
value: MsgUpdateVendorInfo,
@@ -26,15 +20,21 @@ type sendMsgUpdateVendorInfoParams = {
memo?: string
};
-
-type msgCreateVendorInfoParams = {
+type sendMsgCreateVendorInfoParams = {
value: MsgCreateVendorInfo,
+ fee?: StdFee,
+ memo?: string
};
+
type msgUpdateVendorInfoParams = {
value: MsgUpdateVendorInfo,
};
+type msgCreateVendorInfoParams = {
+ value: MsgCreateVendorInfo,
+};
+
export const registry = new Registry(msgTypes);
@@ -65,48 +65,48 @@ export const txClient = ({ signer, prefix, addr }: TxClientOptions = { addr: "ht
return {
- async sendMsgCreateVendorInfo({ value, fee, memo }: sendMsgCreateVendorInfoParams): Promise {
+ async sendMsgUpdateVendorInfo({ value, fee, memo }: sendMsgUpdateVendorInfoParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgCreateVendorInfo: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgUpdateVendorInfo: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgCreateVendorInfo({ value: MsgCreateVendorInfo.fromPartial(value) })
+ let msg = this.msgUpdateVendorInfo({ value: MsgUpdateVendorInfo.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgCreateVendorInfo: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgUpdateVendorInfo: Could not broadcast Tx: '+ e.message)
}
},
- async sendMsgUpdateVendorInfo({ value, fee, memo }: sendMsgUpdateVendorInfoParams): Promise {
+ async sendMsgCreateVendorInfo({ value, fee, memo }: sendMsgCreateVendorInfoParams): Promise {
if (!signer) {
- throw new Error('TxClient:sendMsgUpdateVendorInfo: Unable to sign Tx. Signer is not present.')
+ throw new Error('TxClient:sendMsgCreateVendorInfo: Unable to sign Tx. Signer is not present.')
}
try {
const { address } = (await signer.getAccounts())[0];
const signingClient = await SigningStargateClient.connectWithSigner(addr,signer,{registry, prefix});
- let msg = this.msgUpdateVendorInfo({ value: MsgUpdateVendorInfo.fromPartial(value) })
+ let msg = this.msgCreateVendorInfo({ value: MsgCreateVendorInfo.fromPartial(value) })
return await signingClient.signAndBroadcast(address, [msg], fee ? fee : defaultFee, memo)
} catch (e: any) {
- throw new Error('TxClient:sendMsgUpdateVendorInfo: Could not broadcast Tx: '+ e.message)
+ throw new Error('TxClient:sendMsgCreateVendorInfo: Could not broadcast Tx: '+ e.message)
}
},
- msgCreateVendorInfo({ value }: msgCreateVendorInfoParams): EncodeObject {
+ msgUpdateVendorInfo({ value }: msgUpdateVendorInfoParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.vendorinfo.MsgCreateVendorInfo", value: MsgCreateVendorInfo.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.vendorinfo.MsgUpdateVendorInfo", value: MsgUpdateVendorInfo.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgCreateVendorInfo: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgUpdateVendorInfo: Could not create message: ' + e.message)
}
},
- msgUpdateVendorInfo({ value }: msgUpdateVendorInfoParams): EncodeObject {
+ msgCreateVendorInfo({ value }: msgCreateVendorInfoParams): EncodeObject {
try {
- return { typeUrl: "/zigbeealliance.distributedcomplianceledger.vendorinfo.MsgUpdateVendorInfo", value: MsgUpdateVendorInfo.fromPartial( value ) }
+ return { typeUrl: "/zigbeealliance.distributedcomplianceledger.vendorinfo.MsgCreateVendorInfo", value: MsgCreateVendorInfo.fromPartial( value ) }
} catch (e: any) {
- throw new Error('TxClient:MsgUpdateVendorInfo: Could not create message: ' + e.message)
+ throw new Error('TxClient:MsgCreateVendorInfo: Could not create message: ' + e.message)
}
},
diff --git a/ts-client/zigbeealliance.distributedcomplianceledger.vendorinfo/registry.ts b/ts-client/zigbeealliance.distributedcomplianceledger.vendorinfo/registry.ts
index 523c72b23..22bef5b8b 100755
--- a/ts-client/zigbeealliance.distributedcomplianceledger.vendorinfo/registry.ts
+++ b/ts-client/zigbeealliance.distributedcomplianceledger.vendorinfo/registry.ts
@@ -1,10 +1,10 @@
import { GeneratedType } from "@cosmjs/proto-signing";
-import { MsgCreateVendorInfo } from "./types/zigbeealliance/distributedcomplianceledger/vendorinfo/tx";
import { MsgUpdateVendorInfo } from "./types/zigbeealliance/distributedcomplianceledger/vendorinfo/tx";
+import { MsgCreateVendorInfo } from "./types/zigbeealliance/distributedcomplianceledger/vendorinfo/tx";
const msgTypes: Array<[string, GeneratedType]> = [
- ["/zigbeealliance.distributedcomplianceledger.vendorinfo.MsgCreateVendorInfo", MsgCreateVendorInfo],
["/zigbeealliance.distributedcomplianceledger.vendorinfo.MsgUpdateVendorInfo", MsgUpdateVendorInfo],
+ ["/zigbeealliance.distributedcomplianceledger.vendorinfo.MsgCreateVendorInfo", MsgCreateVendorInfo],
];
diff --git a/x/pki/client/cli/query_all_certificates.go b/x/pki/client/cli/query_all_certificates.go
index bfd7d3285..82ee58097 100644
--- a/x/pki/client/cli/query_all_certificates.go
+++ b/x/pki/client/cli/query_all_certificates.go
@@ -58,7 +58,7 @@ func CmdShowCertificates() *cobra.Command {
cmd := &cobra.Command{
Use: "cert",
- Short: "Gets certificate by the given combination of subject and subject-key-id. " +
+ Short: "Gets certificate by the given combination of subject and subject-key-id or just subject-key-id. " +
"This query works for all types of certificates (PAA, PAI, RCAC, ICAC).",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) (err error) {
@@ -67,13 +67,24 @@ func CmdShowCertificates() *cobra.Command {
return err
}
- var res types.AllCertificates
+ if subject != "" {
+ var res types.AllCertificates
+
+ return cli.QueryWithProof(
+ clientCtx,
+ pkitypes.StoreKey,
+ types.AllCertificatesKeyPrefix,
+ types.AllCertificatesKey(subject, subjectKeyID),
+ &res,
+ )
+ }
+ var res types.AllCertificatesBySubjectKeyId
return cli.QueryWithProof(
clientCtx,
pkitypes.StoreKey,
- types.AllCertificatesKeyPrefix,
- types.AllCertificatesKey(subject, subjectKeyID),
+ types.AllCertificatesBySubjectKeyIDKeyPrefix,
+ types.AllCertificatesBySubjectKeyIDKey(subjectKeyID),
&res,
)
},
diff --git a/x/pki/genesis.go b/x/pki/genesis.go
index d96a8edb4..7033a9476 100644
--- a/x/pki/genesis.go
+++ b/x/pki/genesis.go
@@ -101,6 +101,9 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState)
for _, elem := range genState.AllCertificatesBySubjectList {
k.SetAllCertificatesBySubject(ctx, elem)
}
+ for _, elem := range genState.AllCertificatesBySubjectKeyIdList {
+ k.SetAllCertificatesBySubjectKeyID(ctx, elem)
+ }
// this line is used by starport scaffolding # genesis/module/init
}
@@ -139,6 +142,7 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState {
genesis.CertificatesList = k.GetAllAllCertificates(ctx)
genesis.RevokedNocIcaCertificatesList = k.GetAllRevokedNocIcaCertificates(ctx)
genesis.AllCertificatesBySubjectList = k.GetAllAllCertificatesBySubject(ctx)
+ genesis.AllCertificatesBySubjectKeyIdList = k.GetAllAllCertificatesBySubjectKeyID(ctx)
// this line is used by starport scaffolding # genesis/module/export
return genesis
diff --git a/x/pki/genesis_test.go b/x/pki/genesis_test.go
index b0b4cf4cd..ca297e9d9 100644
--- a/x/pki/genesis_test.go
+++ b/x/pki/genesis_test.go
@@ -224,6 +224,14 @@ func TestGenesis(t *testing.T) {
Subject: "1",
},
},
+ AllCertificatesBySubjectKeyIdList: []types.AllCertificatesBySubjectKeyId{
+ {
+ SubjectKeyId: "0",
+ },
+ {
+ SubjectKeyId: "1",
+ },
+ },
// this line is used by starport scaffolding # genesis/test/state
}
@@ -255,5 +263,6 @@ func TestGenesis(t *testing.T) {
require.ElementsMatch(t, genesisState.CertificatesList, got.CertificatesList)
require.ElementsMatch(t, genesisState.RevokedNocIcaCertificatesList, got.RevokedNocIcaCertificatesList)
require.ElementsMatch(t, genesisState.AllCertificatesBySubjectList, got.AllCertificatesBySubjectList)
+ require.ElementsMatch(t, genesisState.AllCertificatesBySubjectKeyIdList, got.AllCertificatesBySubjectKeyIdList)
// this line is used by starport scaffolding # genesis/test/assert
}
diff --git a/x/pki/handler_test.go b/x/pki/handler_test.go
index 67c1bdbd6..f5a489536 100644
--- a/x/pki/handler_test.go
+++ b/x/pki/handler_test.go
@@ -225,14 +225,14 @@ func queryProposedCertificate(
return &resp.ProposedCertificate, nil
}
-func queryAllApprovedCertificates(setup *TestSetup) ([]types.ApprovedCertificates, error) {
+func queryAllNocCertificates(setup *TestSetup) ([]types.NocCertificates, error) {
// query all certificates
- return _queryAllApprovedCertificates(setup, "")
+ return _queryAllNocCertificates(setup, "")
}
-func queryAllNocCertificates(setup *TestSetup) ([]types.NocCertificates, error) {
+func queryAllApprovedCertificates(setup *TestSetup) ([]types.ApprovedCertificates, error) {
// query all certificates
- return _queryAllNocCertificates(setup, "")
+ return _queryAllApprovedCertificates(setup, "")
}
func queryAllApprovedCertificatesBySubjectKeyID(setup *TestSetup, subjectKeyID string) ([]types.ApprovedCertificates, error) {
@@ -772,6 +772,29 @@ func queryRevokedNocIcaCertificates(setup *TestSetup, subject, subjectKeyID stri
return &resp.RevokedNocIcaCertificates, nil
}
+func queryAllCertificatesBySubjectKeyID(setup *TestSetup, subjectKeyID string) ([]types.AllCertificates, error) {
+ // query all certificates
+ return _queryAllCertificates(setup, subjectKeyID)
+}
+
+func _queryAllCertificates(setup *TestSetup, subjectKeyID string) ([]types.AllCertificates, error) {
+ // query all certificates
+ req := &types.QueryAllCertificatesRequest{
+ SubjectKeyId: subjectKeyID,
+ }
+
+ resp, err := setup.Keeper.CertificatesAll(setup.Wctx, req)
+ if err != nil {
+ require.Nil(setup.T, resp)
+
+ return nil, err
+ }
+
+ require.NotNil(setup.T, resp)
+
+ return resp.Certificates, nil
+}
+
func queryCertificatesFromAllCertificatesIndex(
setup *TestSetup,
subject string,
@@ -897,6 +920,11 @@ func ensureCertificatePresentInGlobalCertificateIndexes(
require.Equal(t, subjectKeyID, allCertificate.SubjectKeyId)
require.Equal(t, serialNumber, allCertificate.SerialNumber)
+ // AllCertificate: SKID
+ certificateBySubjectKeyID, _ := queryAllCertificatesBySubjectKeyID(setup, subjectKeyID)
+ require.Len(t, certificateBySubjectKeyID, 1)
+ require.Len(t, certificateBySubjectKeyID[0].Certs, 1)
+
if !skipCheckForSubject {
// AllCertificate: Subject
allCertificatesBySubject, err := queryCertificatesBySubjectFromAllCertificatesIndex(setup, subject)
@@ -921,6 +949,10 @@ func ensureCertificateNotPresentInGlobalCertificateIndexes(
_, err := querySingleCertificateFromAllCertificatesIndex(setup, subject, subjectKeyID)
require.Equal(t, codes.NotFound, status.Code(err))
+ // AllCertificate: SKID
+ certificatesBySubjectKeyID, _ := queryAllCertificatesBySubjectKeyID(setup, subjectKeyID)
+ require.Empty(t, certificatesBySubjectKeyID)
+
if !skipCheckForSubject {
// AllCertificate: Subject
_, err = queryCertificatesBySubjectFromAllCertificatesIndex(setup, subject)
diff --git a/x/pki/keeper/all_certificates_by_subject_key_id.go b/x/pki/keeper/all_certificates_by_subject_key_id.go
new file mode 100644
index 000000000..84c19a2fe
--- /dev/null
+++ b/x/pki/keeper/all_certificates_by_subject_key_id.go
@@ -0,0 +1,147 @@
+package keeper
+
+import (
+ "github.com/cosmos/cosmos-sdk/store/prefix"
+ sdk "github.com/cosmos/cosmos-sdk/types"
+
+ pkitypes "github.com/zigbee-alliance/distributed-compliance-ledger/types/pki"
+ "github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types"
+)
+
+// SetAllCertificatesBySubjectKeyID set a specific AllCertificatesBySubjectKeyId in the store from its index.
+func (k Keeper) SetAllCertificatesBySubjectKeyID(ctx sdk.Context, allCertificatesBySubjectKeyID types.AllCertificatesBySubjectKeyId) {
+ store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.AllCertificatesBySubjectKeyIDKeyPrefix))
+ b := k.cdc.MustMarshal(&allCertificatesBySubjectKeyID)
+ store.Set(types.AllCertificatesBySubjectKeyIDKey(
+ allCertificatesBySubjectKeyID.SubjectKeyId,
+ ), b)
+}
+
+// Add an All certificate to the list of All certificates with the subjectKeyId map.
+func (k Keeper) AddAllCertificateBySubjectKeyID(ctx sdk.Context, certificate types.Certificate) {
+ k.addAllCertificatesBySubjectKeyID(ctx, certificate.SubjectKeyId, []*types.Certificate{&certificate})
+}
+
+// Add an All certificates list to All certificates with the subjectKeyId map.
+func (k Keeper) AddAllCertificatesBySubjectKeyID(ctx sdk.Context, allCertificate types.AllCertificates) {
+ k.addAllCertificatesBySubjectKeyID(ctx, allCertificate.SubjectKeyId, allCertificate.Certs)
+}
+
+func (k Keeper) addAllCertificatesBySubjectKeyID(ctx sdk.Context, subjectKeyID string, certs []*types.Certificate) {
+ store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.AllCertificatesBySubjectKeyIDKeyPrefix))
+
+ AllCertificatesBytes := store.Get(types.AllCertificatesBySubjectKeyIDKey(
+ subjectKeyID,
+ ))
+ var AllCertificates types.AllCertificatesBySubjectKeyId
+
+ if AllCertificatesBytes == nil {
+ AllCertificates = types.AllCertificatesBySubjectKeyId{
+ SubjectKeyId: subjectKeyID,
+ Certs: []*types.Certificate{},
+ }
+ } else {
+ k.cdc.MustUnmarshal(AllCertificatesBytes, &AllCertificates)
+ }
+
+ AllCertificates.Certs = append(AllCertificates.Certs, certs...)
+
+ k.SetAllCertificatesBySubjectKeyID(ctx, AllCertificates)
+}
+
+// GetAllCertificatesBySubjectKeyID returns a AllCertificatesBySubjectKeyId from its index.
+func (k Keeper) GetAllCertificatesBySubjectKeyID(
+ ctx sdk.Context,
+ subjectKeyID string,
+
+) (val types.AllCertificatesBySubjectKeyId, found bool) {
+ store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.AllCertificatesBySubjectKeyIDKeyPrefix))
+
+ b := store.Get(types.AllCertificatesBySubjectKeyIDKey(
+ subjectKeyID,
+ ))
+ if b == nil {
+ return val, false
+ }
+
+ k.cdc.MustUnmarshal(b, &val)
+
+ return val, true
+}
+
+// RemoveAllCertificatesBySubjectKeyID removes a AllCertificatesBySubjectKeyId from the store.
+func (k Keeper) RemoveAllCertificatesBySubjectKeyID(
+ ctx sdk.Context,
+ subject string,
+ subjectKeyID string,
+) {
+ store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.AllCertificatesBySubjectKeyIDKeyPrefix))
+ certs, found := k.GetAllCertificatesBySubjectKeyID(ctx, subjectKeyID)
+ if !found {
+ return
+ }
+
+ for i := 0; i < len(certs.Certs); {
+ if certs.Certs[i].Subject == subject {
+ certs.Certs = append(certs.Certs[:i], certs.Certs[i+1:]...)
+ } else {
+ i++
+ }
+ }
+
+ if len(certs.Certs) == 0 {
+ store.Delete(types.AllCertificatesBySubjectKeyIDKey(
+ subjectKeyID,
+ ))
+ } else {
+ k.SetAllCertificatesBySubjectKeyID(ctx, certs)
+ }
+}
+
+func (k Keeper) RemoveAllCertificatesBySubjectKeyIDBySerialNumber(ctx sdk.Context, subject, subjectKeyID, serialNumber string) {
+ k._removeAllCertificatesFromSubjectKeyIDState(ctx, subjectKeyID, func(cert *types.Certificate) bool {
+ return cert.Subject == subject && cert.SubjectKeyId == subjectKeyID && cert.SerialNumber == serialNumber
+ })
+}
+
+// GetAllAllCertificatesBySubjectKeyID returns all AllCertificatesBySubjectKeyId.
+func (k Keeper) GetAllAllCertificatesBySubjectKeyID(ctx sdk.Context) (list []types.AllCertificatesBySubjectKeyId) {
+ store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.AllCertificatesBySubjectKeyIDKeyPrefix))
+ iterator := sdk.KVStorePrefixIterator(store, []byte{})
+
+ defer iterator.Close()
+
+ for ; iterator.Valid(); iterator.Next() {
+ var val types.AllCertificatesBySubjectKeyId
+ k.cdc.MustUnmarshal(iterator.Value(), &val)
+ list = append(list, val)
+ }
+
+ return
+}
+
+func (k Keeper) _removeAllCertificatesFromSubjectKeyIDState(ctx sdk.Context, subjectKeyID string, filter func(cert *types.Certificate) bool) {
+ certs, found := k.GetAllCertificatesBySubjectKeyID(ctx, subjectKeyID)
+ if !found {
+ return
+ }
+
+ numCertsBefore := len(certs.Certs)
+ for i := 0; i < len(certs.Certs); {
+ cert := certs.Certs[i]
+ if filter(cert) {
+ certs.Certs = append(certs.Certs[:i], certs.Certs[i+1:]...)
+ } else {
+ i++
+ }
+ }
+
+ if len(certs.Certs) == 0 {
+ store := prefix.NewStore(ctx.KVStore(k.storeKey), pkitypes.KeyPrefix(types.AllCertificatesBySubjectKeyIDKeyPrefix))
+ store.Delete(types.AllCertificatesBySubjectKeyIDKey(
+ subjectKeyID,
+ ))
+ } else if numCertsBefore > len(certs.Certs) { // Update state only if any certificate is removed
+ k.SetAllCertificatesBySubjectKeyID(ctx, certs)
+ }
+}
diff --git a/x/pki/keeper/all_certificates_by_subject_key_id_test.go b/x/pki/keeper/all_certificates_by_subject_key_id_test.go
new file mode 100644
index 000000000..d450edfc0
--- /dev/null
+++ b/x/pki/keeper/all_certificates_by_subject_key_id_test.go
@@ -0,0 +1,66 @@
+package keeper_test
+
+import (
+ "strconv"
+ "testing"
+
+ sdk "github.com/cosmos/cosmos-sdk/types"
+ "github.com/stretchr/testify/require"
+
+ keepertest "github.com/zigbee-alliance/distributed-compliance-ledger/testutil/keeper"
+ "github.com/zigbee-alliance/distributed-compliance-ledger/testutil/nullify"
+ "github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/keeper"
+ "github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types"
+)
+
+// Prevent strconv unused error.
+var _ = strconv.IntSize
+
+func createAllCertificatesBySubjectKeyID(keeper *keeper.Keeper, ctx sdk.Context, n int) []types.AllCertificatesBySubjectKeyId {
+ items := make([]types.AllCertificatesBySubjectKeyId, n)
+ for i := range items {
+ items[i].SubjectKeyId = strconv.Itoa(i)
+
+ keeper.SetAllCertificatesBySubjectKeyID(ctx, items[i])
+ }
+
+ return items
+}
+
+func TestAllCertificatesBySubjectKeyIdGet(t *testing.T) {
+ keeper, ctx := keepertest.PkiKeeper(t, nil)
+ items := createAllCertificatesBySubjectKeyID(keeper, ctx, 10)
+ for _, item := range items {
+ rst, found := keeper.GetAllCertificatesBySubjectKeyID(ctx,
+ item.SubjectKeyId,
+ )
+ require.True(t, found)
+ require.Equal(t,
+ nullify.Fill(&item),
+ nullify.Fill(&rst),
+ )
+ }
+}
+func TestAllCertificatesBySubjectKeyIdRemove(t *testing.T) {
+ keeper, ctx := keepertest.PkiKeeper(t, nil)
+ items := createAllCertificatesBySubjectKeyID(keeper, ctx, 10)
+ for _, item := range items {
+ keeper.RemoveAllCertificatesBySubjectKeyID(ctx,
+ "",
+ item.SubjectKeyId,
+ )
+ _, found := keeper.GetAllCertificatesBySubjectKeyID(ctx,
+ item.SubjectKeyId,
+ )
+ require.False(t, found)
+ }
+}
+
+func TestAllCertificatesBySubjectKeyIdGetAll(t *testing.T) {
+ keeper, ctx := keepertest.PkiKeeper(t, nil)
+ items := createAllCertificatesBySubjectKeyID(keeper, ctx, 10)
+ require.ElementsMatch(t,
+ nullify.Fill(items),
+ nullify.Fill(keeper.GetAllAllCertificatesBySubjectKeyID(ctx)),
+ )
+}
diff --git a/x/pki/keeper/child_certificates.go b/x/pki/keeper/child_certificates.go
index e8a438327..aff2055fc 100644
--- a/x/pki/keeper/child_certificates.go
+++ b/x/pki/keeper/child_certificates.go
@@ -118,6 +118,9 @@ func (k msgServer) RevokeApprovedChildCertificates(ctx sdk.Context, issuer strin
// remove from global subject -> subject key ID map
k.RemoveAllCertificateBySubject(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId)
+ // remove from global certificate -> subject key ID map
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId)
+
// Remove certificate from approved certificates list
k.RemoveApprovedCertificates(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId)
@@ -156,6 +159,9 @@ func (k msgServer) RevokeNocChildCertificates(ctx sdk.Context, issuer string, au
// remove from global subject -> subject key ID map
k.RemoveAllCertificateBySubject(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId)
+ // remove from global subject -> subject key ID map
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId)
+
// Remove certificate from noc certificates list
k.RemoveNocCertificates(ctx, certIdentifier.Subject, certIdentifier.SubjectKeyId)
diff --git a/x/pki/keeper/grpc_query_certificates.go b/x/pki/keeper/grpc_query_all_certificates.go
similarity index 61%
rename from x/pki/keeper/grpc_query_certificates.go
rename to x/pki/keeper/grpc_query_all_certificates.go
index 25a6cfbaa..65a3dc9f2 100644
--- a/x/pki/keeper/grpc_query_certificates.go
+++ b/x/pki/keeper/grpc_query_all_certificates.go
@@ -26,21 +26,36 @@ func (k Keeper) CertificatesAll(c context.Context, req *types.QueryAllCertificat
)
ctx := sdk.UnwrapSDKContext(c)
- store := ctx.KVStore(k.storeKey)
- nocCertificatesStore := prefix.NewStore(store, pkitypes.KeyPrefix(types.AllCertificatesKeyPrefix))
+ if req.SubjectKeyId != "" {
+ aprCerts, found := k.GetAllCertificatesBySubjectKeyID(
+ ctx,
+ req.SubjectKeyId,
+ )
- pageRes, err = query.Paginate(nocCertificatesStore, req.Pagination, func(key []byte, value []byte) error {
- var certificates types.AllCertificates
- if err := k.cdc.Unmarshal(value, &certificates); err != nil {
- return err
+ if found {
+ certificatess = append(certificatess, types.AllCertificates{
+ SubjectKeyId: aprCerts.SubjectKeyId,
+ Certs: aprCerts.Certs,
+ })
}
+ pageRes = &query.PageResponse{Total: 1}
+ } else {
+ store := ctx.KVStore(k.storeKey)
+ allCertificatesStore := prefix.NewStore(store, pkitypes.KeyPrefix(types.AllCertificatesKeyPrefix))
- certificatess = append(certificatess, certificates)
+ pageRes, err = query.Paginate(allCertificatesStore, req.Pagination, func(key []byte, value []byte) error {
+ var certificates types.AllCertificates
+ if err := k.cdc.Unmarshal(value, &certificates); err != nil {
+ return err
+ }
- return nil
- })
- if err != nil {
- return nil, status.Error(codes.Internal, err.Error())
+ certificatess = append(certificatess, certificates)
+
+ return nil
+ })
+ if err != nil {
+ return nil, status.Error(codes.Internal, err.Error())
+ }
}
return &types.QueryAllCertificatesResponse{Certificates: certificatess, Pagination: pageRes}, nil
diff --git a/x/pki/keeper/grpc_query_certificates_test.go b/x/pki/keeper/grpc_query_all_certificates_test.go
similarity index 100%
rename from x/pki/keeper/grpc_query_certificates_test.go
rename to x/pki/keeper/grpc_query_all_certificates_test.go
diff --git a/x/pki/keeper/keeper.go b/x/pki/keeper/keeper.go
index 56060b0de..53439e8b2 100644
--- a/x/pki/keeper/keeper.go
+++ b/x/pki/keeper/keeper.go
@@ -121,11 +121,13 @@ func (k msgServer) removeApprovedX509Cert(ctx sdk.Context, certID types.Certific
if len(certificates.Certs) == 0 {
k.RemoveAllCertificates(ctx, certID.Subject, certID.SubjectKeyId)
k.RemoveAllCertificateBySubject(ctx, certID.Subject, certID.SubjectKeyId)
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, certID.Subject, certID.SubjectKeyId)
k.RemoveApprovedCertificates(ctx, certID.Subject, certID.SubjectKeyId)
k.RemoveApprovedCertificateBySubject(ctx, certID.Subject, certID.SubjectKeyId)
k.RemoveApprovedCertificatesBySubjectKeyID(ctx, certID.Subject, certID.SubjectKeyId)
} else {
k.RemoveAllCertificatesBySerialNumber(ctx, certID.Subject, certID.SubjectKeyId, serialNumber)
+ k.RemoveAllCertificatesBySubjectKeyIDBySerialNumber(ctx, certID.Subject, certID.SubjectKeyId, serialNumber)
k.RemoveApprovedCertificatesBySerialNumber(ctx, certID.Subject, certID.SubjectKeyId, serialNumber)
k.RemoveApprovedCertificatesBySubjectKeyIDBySerialNumber(ctx, certID.Subject, certID.SubjectKeyId, serialNumber)
}
@@ -142,6 +144,7 @@ func (k msgServer) removeNocX509Cert(
if len(certificates.Certs) == 0 { //nolint:nestif
k.RemoveAllCertificates(ctx, certID.Subject, certID.SubjectKeyId)
k.RemoveAllCertificateBySubject(ctx, certID.Subject, certID.SubjectKeyId)
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, certID.Subject, certID.SubjectKeyId)
k.RemoveNocCertificates(ctx, certID.Subject, certID.SubjectKeyId)
k.RemoveNocCertificateBySubject(ctx, certID.Subject, certID.SubjectKeyId)
k.RemoveNocCertificatesBySubjectAndSubjectKeyID(ctx, certID.Subject, certID.SubjectKeyId)
@@ -154,6 +157,7 @@ func (k msgServer) removeNocX509Cert(
}
} else {
k.RemoveAllCertificatesBySerialNumber(ctx, certID.Subject, certID.SubjectKeyId, serialNumber)
+ k.RemoveAllCertificatesBySubjectKeyIDBySerialNumber(ctx, certID.Subject, certID.SubjectKeyId, serialNumber)
k.RemoveNocCertificatesBySerialNumber(ctx, certID.Subject, certID.SubjectKeyId, serialNumber)
k.RemoveNocCertificatesBySubjectKeyIDBySerialNumber(ctx, certID.Subject, certID.SubjectKeyId, serialNumber)
k.RemoveNocCertificatesByVidAndSkidBySerialNumber(ctx, accountVid, certID.Subject, certID.SubjectKeyId, serialNumber)
diff --git a/x/pki/keeper/migrations.go b/x/pki/keeper/migrations.go
index 4c3ddc1f6..46977bf77 100644
--- a/x/pki/keeper/migrations.go
+++ b/x/pki/keeper/migrations.go
@@ -2,6 +2,7 @@ package keeper
import (
sdk "github.com/cosmos/cosmos-sdk/types"
+ pkitypes "github.com/zigbee-alliance/distributed-compliance-ledger/x/pki/types"
)
// Migrator is a struct for handling in-place store migrations.
@@ -32,6 +33,7 @@ func (m Migrator) Migrate3to4(ctx sdk.Context) error {
approvedCertificates := m.keeper.GetAllApprovedCertificates(ctx)
for _, cert := range approvedCertificates {
m.keeper.AddAllCertificates(ctx, cert.Subject, cert.SubjectKeyId, cert.SchemaVersion, cert.Certs)
+ m.keeper.AddAllCertificatesBySubjectKeyID(ctx, pkitypes.AllCertificates(cert))
}
approvedCertificatesBySubject := m.keeper.GetAllApprovedCertificatesBySubject(ctx)
for _, cert := range approvedCertificatesBySubject {
diff --git a/x/pki/keeper/migrations_test.go b/x/pki/keeper/migrations_test.go
index eb87541b4..9a39b9213 100644
--- a/x/pki/keeper/migrations_test.go
+++ b/x/pki/keeper/migrations_test.go
@@ -69,7 +69,6 @@ func TestMigrator_Migrate3to4(t *testing.T) {
subjectKeyID := "0"
list, found := _keeper.GetAllCertificates(ctx, subject, subjectKeyID)
require.True(t, found)
-
require.Equal(t, 1, len(list.Certs))
require.Equal(t, subjectKeyID, list.SubjectKeyId)
require.Equal(t, msg[0].Certs, list.Certs)
@@ -82,4 +81,11 @@ func TestMigrator_Migrate3to4(t *testing.T) {
require.True(t, found)
require.Equal(t, subject, subjList.Subject)
require.Equal(t, 1, len(subjList.SubjectKeyIds))
+
+ // check that all certificates by subject key id migrated
+ certificatesBySubjectKeyId, found := _keeper.GetAllCertificatesBySubjectKeyID(ctx, subjectKeyID)
+ require.True(t, found)
+ require.Equal(t, 1, len(certificatesBySubjectKeyId.Certs))
+ require.Equal(t, subjectKeyID, certificatesBySubjectKeyId.SubjectKeyId)
+ require.Equal(t, msg[0].Certs, certificatesBySubjectKeyId.Certs)
}
diff --git a/x/pki/keeper/msg_server_add_noc_x_509_ica_cert.go b/x/pki/keeper/msg_server_add_noc_x_509_ica_cert.go
index 5d52afb98..c4fcf3dc7 100644
--- a/x/pki/keeper/msg_server_add_noc_x_509_ica_cert.go
+++ b/x/pki/keeper/msg_server_add_noc_x_509_ica_cert.go
@@ -109,6 +109,9 @@ func (k msgServer) AddNocX509IcaCert(goCtx context.Context, msg *types.MsgAddNoc
// append to global list of certificates indexed by subject
k.AddAllCertificateBySubject(ctx, certificate.Subject, certificate.SubjectKeyId)
+ // add to global list of certificates indexed by skid
+ k.AddAllCertificateBySubjectKeyID(ctx, certificate)
+
// Add to the list of all NOC certificates
k.AddNocCertificate(ctx, certificate)
diff --git a/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go b/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go
index 20a356933..0f22ab2f0 100644
--- a/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go
+++ b/x/pki/keeper/msg_server_add_noc_x_509_root_cert.go
@@ -90,6 +90,9 @@ func (k msgServer) AddNocX509RootCert(goCtx context.Context, msg *types.MsgAddNo
// append to global list of certificates indexed by subject
k.AddAllCertificateBySubject(ctx, certificate.Subject, certificate.SubjectKeyId)
+ // add to global list of certificates indexed by skid
+ k.AddAllCertificateBySubjectKeyID(ctx, certificate)
+
// Add to the list of all NOC certificates
k.AddNocCertificate(ctx, certificate)
diff --git a/x/pki/keeper/msg_server_add_x_509_cert.go b/x/pki/keeper/msg_server_add_x_509_cert.go
index d30d8233d..816f446d1 100644
--- a/x/pki/keeper/msg_server_add_x_509_cert.go
+++ b/x/pki/keeper/msg_server_add_x_509_cert.go
@@ -113,6 +113,9 @@ func (k msgServer) AddX509Cert(goCtx context.Context, msg *types.MsgAddX509Cert)
// append to global list of certificates indexed by subject
k.AddAllCertificateBySubject(ctx, certificate.Subject, certificate.SubjectKeyId)
+ // add to global list of certificates indexed by skid
+ k.AddAllCertificateBySubjectKeyID(ctx, certificate)
+
// append new certificate to list of certificates with the same Subject/SubjectKeyID combination and store updated list
k.AddApprovedCertificate(ctx, certificate)
diff --git a/x/pki/keeper/msg_server_approve_add_x_509_root_cert.go b/x/pki/keeper/msg_server_approve_add_x_509_root_cert.go
index 8a198b0b6..757891504 100644
--- a/x/pki/keeper/msg_server_approve_add_x_509_root_cert.go
+++ b/x/pki/keeper/msg_server_approve_add_x_509_root_cert.go
@@ -85,6 +85,9 @@ func (k msgServer) ApproveAddX509RootCert(goCtx context.Context, msg *types.MsgA
// append to global list of certificates indexed by subject
k.AddAllCertificateBySubject(ctx, rootCertificate.Subject, rootCertificate.SubjectKeyId)
+ // add to global list of certificates indexed by skid
+ k.AddAllCertificateBySubjectKeyID(ctx, rootCertificate)
+
// add approved certificate to stored list of certificates with the same Subject/SubjectKeyID combination
k.AddApprovedCertificate(ctx, rootCertificate)
diff --git a/x/pki/keeper/msg_server_approve_revoke_x_509_root_cert.go b/x/pki/keeper/msg_server_approve_revoke_x_509_root_cert.go
index 342ea1593..e02a221a3 100644
--- a/x/pki/keeper/msg_server_approve_revoke_x_509_root_cert.go
+++ b/x/pki/keeper/msg_server_approve_revoke_x_509_root_cert.go
@@ -103,6 +103,7 @@ func (k msgServer) _revokeRootCertificates(
k.RemoveApprovedRootCertificate(ctx, certID)
k.RemoveAllCertificates(ctx, certificates.Subject, certificates.SubjectKeyId)
k.RemoveAllCertificateBySubject(ctx, certificates.Subject, certificates.SubjectKeyId)
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, certificates.Subject, certificates.SubjectKeyId)
k.RemoveApprovedCertificates(ctx, certificates.Subject, certificates.SubjectKeyId)
// remove from subject -> subject key ID map
k.RemoveApprovedCertificateBySubject(ctx, certificates.Subject, certificates.SubjectKeyId)
@@ -131,6 +132,7 @@ func (k msgServer) _revokeRootCertificate(
if len(certificates.Certs) == 0 {
k.RemoveAllCertificates(ctx, cert.Subject, cert.SubjectKeyId)
k.RemoveAllCertificateBySubject(ctx, cert.Subject, cert.SubjectKeyId)
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, cert.Subject, cert.SubjectKeyId)
k.RemoveApprovedCertificates(ctx, cert.Subject, cert.SubjectKeyId)
k.RemoveApprovedRootCertificate(ctx,
types.CertificateIdentifier{
@@ -143,6 +145,7 @@ func (k msgServer) _revokeRootCertificate(
} else {
k.SetApprovedCertificates(ctx, certificates)
k.RemoveAllCertificatesBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, serialNumber)
+ k.RemoveAllCertificatesBySubjectKeyIDBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, serialNumber)
k.RemoveApprovedCertificatesBySubjectKeyIDBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, serialNumber)
}
}
diff --git a/x/pki/keeper/msg_server_assign_vid.go b/x/pki/keeper/msg_server_assign_vid.go
index 32e8ad2fa..e6dd607bf 100644
--- a/x/pki/keeper/msg_server_assign_vid.go
+++ b/x/pki/keeper/msg_server_assign_vid.go
@@ -68,6 +68,13 @@ func (k msgServer) AssignVid(goCtx context.Context, msg *types.MsgAssignVid) (*t
return nil, pkitypes.NewErrNotEmptyVid("Vendor ID (VID) already present in certificates")
}
+ // assign VID to certificates in global list indexed by subject key id
+ allCertificatesBySubjectKeyID, found := k.GetAllCertificatesBySubjectKeyID(ctx, msg.SubjectKeyId)
+ if !found {
+ return nil, pkitypes.NewErrCertificateDoesNotExist(msg.Subject, msg.SubjectKeyId)
+ }
+ k.assignVid(&allCertificatesBySubjectKeyID.Certs, msg.Vid)
+
// assign VID to certificates in approved list
approvedCertificates, found := k.GetApprovedCertificates(ctx, msg.Subject, msg.SubjectKeyId)
if !found {
@@ -84,6 +91,8 @@ func (k msgServer) AssignVid(goCtx context.Context, msg *types.MsgAssignVid) (*t
// update global certificates list
k.SetAllCertificates(ctx, certificates)
+ // update global certificates list indexed by subject key id
+ k.SetAllCertificatesBySubjectKeyID(ctx, allCertificatesBySubjectKeyID)
// update approved certificates list
k.SetApprovedCertificates(ctx, approvedCertificates)
// update certificates list indexed by subject key id
diff --git a/x/pki/keeper/msg_server_remove_noc_x_509_ica_cert.go b/x/pki/keeper/msg_server_remove_noc_x_509_ica_cert.go
index 0d8a94ce0..9a5b0ad47 100644
--- a/x/pki/keeper/msg_server_remove_noc_x_509_ica_cert.go
+++ b/x/pki/keeper/msg_server_remove_noc_x_509_ica_cert.go
@@ -81,8 +81,10 @@ func (k msgServer) RemoveNocX509IcaCert(goCtx context.Context, msg *types.MsgRem
} else {
// remove from global certificates map
k.RemoveAllCertificates(ctx, certID.Subject, certID.SubjectKeyId)
- // remove from global subject -> subject key ID map
+ // remove from global subject -> subject map
k.RemoveAllCertificateBySubject(ctx, certID.Subject, certID.SubjectKeyId)
+ // remove from global certificates -> subject key ID map
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, certID.Subject, certID.SubjectKeyId)
// remove from noc certificates map
k.RemoveNocCertificates(ctx, certID.Subject, certID.SubjectKeyId)
// remove from noc ica certificates map
diff --git a/x/pki/keeper/msg_server_remove_noc_x_509_root_cert.go b/x/pki/keeper/msg_server_remove_noc_x_509_root_cert.go
index 791af0a64..c14313a05 100644
--- a/x/pki/keeper/msg_server_remove_noc_x_509_root_cert.go
+++ b/x/pki/keeper/msg_server_remove_noc_x_509_root_cert.go
@@ -79,6 +79,8 @@ func (k msgServer) RemoveNocX509RootCert(goCtx context.Context, msg *types.MsgRe
k.RemoveAllCertificates(ctx, certID.Subject, certID.SubjectKeyId)
// remove from global subject -> subject key ID map
k.RemoveAllCertificateBySubject(ctx, certID.Subject, certID.SubjectKeyId)
+ // remove from global subject -> subject key ID map
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, certID.Subject, certID.SubjectKeyId)
// remove from noc certificates map
k.RemoveNocCertificates(ctx, certID.Subject, certID.SubjectKeyId)
// remove from noc root certificates map
diff --git a/x/pki/keeper/msg_server_remove_x_509_cert.go b/x/pki/keeper/msg_server_remove_x_509_cert.go
index 6570b3ba1..7f8269477 100644
--- a/x/pki/keeper/msg_server_remove_x_509_cert.go
+++ b/x/pki/keeper/msg_server_remove_x_509_cert.go
@@ -69,8 +69,10 @@ func (k msgServer) RemoveX509Cert(goCtx context.Context, msg *types.MsgRemoveX50
} else {
// remove from global certificates map
k.RemoveAllCertificates(ctx, certID.Subject, certID.SubjectKeyId)
- // remove from global subject -> subject key ID map
+ // remove from global subject -> subject map
k.RemoveAllCertificateBySubject(ctx, certID.Subject, certID.SubjectKeyId)
+ // remove from global subject -> subject key ID map
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, certID.Subject, certID.SubjectKeyId)
// remove from approved certificates map
k.RemoveApprovedCertificates(ctx, certID.Subject, certID.SubjectKeyId)
// remove from subject -> subject key ID map
diff --git a/x/pki/keeper/msg_server_revoke_noc_x_509_ica_cert.go b/x/pki/keeper/msg_server_revoke_noc_x_509_ica_cert.go
index a307e0a50..add76ed31 100644
--- a/x/pki/keeper/msg_server_revoke_noc_x_509_ica_cert.go
+++ b/x/pki/keeper/msg_server_revoke_noc_x_509_ica_cert.go
@@ -85,6 +85,7 @@ func (k msgServer) _revokeNocCertificate(
if len(certificates.Certs) == 0 {
k.RemoveAllCertificates(ctx, certificates.Subject, certificates.SubjectKeyId)
k.RemoveAllCertificateBySubject(ctx, certificates.Subject, certificates.SubjectKeyId)
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, certificates.Subject, certificates.SubjectKeyId)
k.RemoveNocCertificates(ctx, certificates.Subject, certificates.SubjectKeyId)
k.RemoveNocIcaCertificate(ctx, certificates.Subject, certificates.SubjectKeyId, vid)
k.RemoveNocCertificatesByVidAndSkid(ctx, vid, cert.SubjectKeyId)
@@ -92,6 +93,7 @@ func (k msgServer) _revokeNocCertificate(
k.RemoveNocCertificatesBySubjectAndSubjectKeyID(ctx, cert.Subject, cert.SubjectKeyId)
} else {
k.RemoveAllCertificatesBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, serialNumber)
+ k.RemoveAllCertificatesBySubjectKeyIDBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, serialNumber)
k.RemoveNocCertificatesBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, serialNumber)
k.RemoveNocIcaCertificateBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, vid, serialNumber)
k.RemoveNocCertificatesByVidAndSkidBySerialNumber(ctx, vid, cert.Subject, cert.SubjectKeyId, serialNumber)
@@ -110,8 +112,10 @@ func (k msgServer) _revokeNocIcaCertificates(ctx sdk.Context, certificates types
})
// remove cert from global certs list
k.RemoveAllCertificates(ctx, certificates.Subject, certificates.SubjectKeyId)
- // remove cert from global certs list -> subject key ID map
+ // remove cert from global certs list -> subject map
k.RemoveAllCertificateBySubject(ctx, certificates.Subject, certificates.SubjectKeyId)
+ // remove cert from global certs list -> subject key ID map
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, certificates.Subject, certificates.SubjectKeyId)
// remove cert from NOC certs list
k.RemoveNocCertificates(ctx, certificates.Subject, certificates.SubjectKeyId)
// remove cert from NOC ica certs list
diff --git a/x/pki/keeper/msg_server_revoke_noc_x_509_root_cert.go b/x/pki/keeper/msg_server_revoke_noc_x_509_root_cert.go
index 2aac42556..043f4d65b 100644
--- a/x/pki/keeper/msg_server_revoke_noc_x_509_root_cert.go
+++ b/x/pki/keeper/msg_server_revoke_noc_x_509_root_cert.go
@@ -90,6 +90,7 @@ func (k msgServer) _revokeNocRootCertificate(
if len(certificates.Certs) == 0 {
k.RemoveAllCertificates(ctx, certificates.Subject, certificates.SubjectKeyId)
k.RemoveAllCertificateBySubject(ctx, certificates.Subject, certificates.SubjectKeyId)
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, certificates.Subject, certificates.SubjectKeyId)
k.RemoveNocCertificates(ctx, certificates.Subject, certificates.SubjectKeyId)
k.RemoveNocRootCertificate(ctx, certificates.Subject, certificates.SubjectKeyId, vid)
k.RemoveNocCertificatesByVidAndSkid(ctx, vid, cert.SubjectKeyId)
@@ -97,6 +98,7 @@ func (k msgServer) _revokeNocRootCertificate(
k.RemoveNocCertificatesBySubjectAndSubjectKeyID(ctx, cert.Subject, cert.SubjectKeyId)
} else {
k.RemoveAllCertificatesBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, serialNumber)
+ k.RemoveAllCertificatesBySubjectKeyIDBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, serialNumber)
k.RemoveNocCertificatesBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, serialNumber)
k.RemoveNocRootCertificateBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, vid, serialNumber)
k.RemoveNocCertificatesByVidAndSkidBySerialNumber(ctx, vid, cert.Subject, cert.SubjectKeyId, serialNumber)
@@ -116,8 +118,10 @@ func (k msgServer) _revokeNocRootCertificates(ctx sdk.Context, certificates type
// remove cert from global certs list
k.RemoveAllCertificates(ctx, certificates.Subject, certificates.SubjectKeyId)
- // remove cert from global certs list -> subject key ID map
+ // remove cert from global certs list -> subject map
k.RemoveAllCertificateBySubject(ctx, certificates.Subject, certificates.SubjectKeyId)
+ // remove cert from global certs list -> subject key ID map
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, certificates.Subject, certificates.SubjectKeyId)
// remove cert from NOC certs list
k.RemoveNocCertificates(ctx, certificates.Subject, certificates.SubjectKeyId)
// remove cert from NOC ica certs list
diff --git a/x/pki/keeper/msg_server_revoke_x_509_cert.go b/x/pki/keeper/msg_server_revoke_x_509_cert.go
index 0aa933891..614b3f3ea 100644
--- a/x/pki/keeper/msg_server_revoke_x_509_cert.go
+++ b/x/pki/keeper/msg_server_revoke_x_509_cert.go
@@ -65,8 +65,10 @@ func (k msgServer) _revokeX509Certificates(ctx sdk.Context, certID types.Certifi
// Remove certificate from global list
k.RemoveAllCertificates(ctx, certID.Subject, certID.SubjectKeyId)
- // Remove certificate from global list -> subject key ID map
+ // Remove certificate from global list -> subject map
k.RemoveAllCertificateBySubject(ctx, certID.Subject, certID.SubjectKeyId)
+ // Remove certificate from global list -> subject key ID map
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, certID.Subject, certID.SubjectKeyId)
// Remove certificate from approved list
k.RemoveApprovedCertificates(ctx, certID.Subject, certID.SubjectKeyId)
// Remove certificate identifier from issuer's ChildCertificates record
@@ -90,12 +92,14 @@ func (k msgServer) _revokeX509Certificate(ctx sdk.Context, cert *types.Certifica
if len(certificates.Certs) == 0 {
k.RemoveAllCertificates(ctx, cert.Subject, cert.SubjectKeyId)
k.RemoveAllCertificateBySubject(ctx, cert.Subject, cert.SubjectKeyId)
+ k.RemoveAllCertificatesBySubjectKeyID(ctx, cert.Subject, cert.SubjectKeyId)
k.RemoveApprovedCertificates(ctx, cert.Subject, cert.SubjectKeyId)
k.RemoveApprovedCertificateBySubject(ctx, cert.Subject, cert.SubjectKeyId)
k.RemoveApprovedCertificatesBySubjectKeyID(ctx, cert.Subject, cert.SubjectKeyId)
k.RemoveChildCertificate(ctx, cert.Issuer, cert.AuthorityKeyId, certID)
} else {
k.RemoveAllCertificatesBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, cert.SerialNumber)
+ k.RemoveAllCertificatesBySubjectKeyIDBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, cert.SerialNumber)
k.RemoveApprovedCertificatesBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, cert.SerialNumber)
k.RemoveApprovedCertificatesBySubjectKeyIDBySerialNumber(ctx, cert.Subject, cert.SubjectKeyId, cert.SerialNumber)
}
diff --git a/x/pki/types/all_certificates_by_subject_key_id.pb.go b/x/pki/types/all_certificates_by_subject_key_id.pb.go
new file mode 100644
index 000000000..fa3ddff29
--- /dev/null
+++ b/x/pki/types/all_certificates_by_subject_key_id.pb.go
@@ -0,0 +1,421 @@
+// Code generated by protoc-gen-gogo. DO NOT EDIT.
+// source: zigbeealliance/distributedcomplianceledger/pki/all_certificates_by_subject_key_id.proto
+
+package types
+
+import (
+ fmt "fmt"
+ proto "github.com/cosmos/gogoproto/proto"
+ io "io"
+ math "math"
+ math_bits "math/bits"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+
+type AllCertificatesBySubjectKeyId struct {
+ SubjectKeyId string `protobuf:"bytes,1,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty"`
+ Certs []*Certificate `protobuf:"bytes,2,rep,name=certs,proto3" json:"certs,omitempty"`
+ SchemaVersion uint32 `protobuf:"varint,3,opt,name=schemaVersion,proto3" json:"schemaVersion,omitempty"`
+}
+
+func (m *AllCertificatesBySubjectKeyId) Reset() { *m = AllCertificatesBySubjectKeyId{} }
+func (m *AllCertificatesBySubjectKeyId) String() string { return proto.CompactTextString(m) }
+func (*AllCertificatesBySubjectKeyId) ProtoMessage() {}
+func (*AllCertificatesBySubjectKeyId) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7745e5de031ddc35, []int{0}
+}
+func (m *AllCertificatesBySubjectKeyId) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *AllCertificatesBySubjectKeyId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_AllCertificatesBySubjectKeyId.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *AllCertificatesBySubjectKeyId) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AllCertificatesBySubjectKeyId.Merge(m, src)
+}
+func (m *AllCertificatesBySubjectKeyId) XXX_Size() int {
+ return m.Size()
+}
+func (m *AllCertificatesBySubjectKeyId) XXX_DiscardUnknown() {
+ xxx_messageInfo_AllCertificatesBySubjectKeyId.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AllCertificatesBySubjectKeyId proto.InternalMessageInfo
+
+func (m *AllCertificatesBySubjectKeyId) GetSubjectKeyId() string {
+ if m != nil {
+ return m.SubjectKeyId
+ }
+ return ""
+}
+
+func (m *AllCertificatesBySubjectKeyId) GetCerts() []*Certificate {
+ if m != nil {
+ return m.Certs
+ }
+ return nil
+}
+
+func (m *AllCertificatesBySubjectKeyId) GetSchemaVersion() uint32 {
+ if m != nil {
+ return m.SchemaVersion
+ }
+ return 0
+}
+
+func init() {
+ proto.RegisterType((*AllCertificatesBySubjectKeyId)(nil), "zigbeealliance.distributedcomplianceledger.pki.AllCertificatesBySubjectKeyId")
+}
+
+func init() {
+ proto.RegisterFile("zigbeealliance/distributedcomplianceledger/pki/all_certificates_by_subject_key_id.proto", fileDescriptor_7745e5de031ddc35)
+}
+
+var fileDescriptor_7745e5de031ddc35 = []byte{
+ // 284 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x0a, 0xaf, 0xca, 0x4c, 0x4f,
+ 0x4a, 0x4d, 0x4d, 0xcc, 0xc9, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0xd5, 0x4f, 0xc9, 0x2c, 0x2e, 0x29,
+ 0xca, 0x4c, 0x2a, 0x2d, 0x49, 0x4d, 0x49, 0xce, 0xcf, 0x2d, 0x80, 0x88, 0xe6, 0xa4, 0xa6, 0xa4,
+ 0xa7, 0x16, 0xe9, 0x17, 0x64, 0x67, 0xea, 0x27, 0xe6, 0xe4, 0xc4, 0x27, 0xa7, 0x16, 0x95, 0x64,
+ 0xa6, 0x65, 0x26, 0x27, 0x96, 0xa4, 0x16, 0xc7, 0x27, 0x55, 0xc6, 0x17, 0x97, 0x26, 0x65, 0xa5,
+ 0x26, 0x97, 0xc4, 0x67, 0xa7, 0x56, 0xc6, 0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x64, 0x0c, 0x08,
+ 0x00, 0x00, 0xff, 0xff, 0x42, 0x6e, 0x65, 0x0b, 0xf2, 0x01, 0x00, 0x00,
+}
+
+func (m *AllCertificatesBySubjectKeyId) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AllCertificatesBySubjectKeyId) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *AllCertificatesBySubjectKeyId) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.SchemaVersion != 0 {
+ i = encodeVarintAllCertificatesBySubjectKeyId(dAtA, i, uint64(m.SchemaVersion))
+ i--
+ dAtA[i] = 0x18
+ }
+ if len(m.Certs) > 0 {
+ for iNdEx := len(m.Certs) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.Certs[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintAllCertificatesBySubjectKeyId(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.SubjectKeyId) > 0 {
+ i -= len(m.SubjectKeyId)
+ copy(dAtA[i:], m.SubjectKeyId)
+ i = encodeVarintAllCertificatesBySubjectKeyId(dAtA, i, uint64(len(m.SubjectKeyId)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func encodeVarintAllCertificatesBySubjectKeyId(dAtA []byte, offset int, v uint64) int {
+ offset -= sovAllCertificatesBySubjectKeyId(v)
+ base := offset
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return base
+}
+func (m *AllCertificatesBySubjectKeyId) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.SubjectKeyId)
+ if l > 0 {
+ n += 1 + l + sovAllCertificatesBySubjectKeyId(uint64(l))
+ }
+ if len(m.Certs) > 0 {
+ for _, e := range m.Certs {
+ l = e.Size()
+ n += 1 + l + sovAllCertificatesBySubjectKeyId(uint64(l))
+ }
+ }
+ if m.SchemaVersion != 0 {
+ n += 1 + sovAllCertificatesBySubjectKeyId(uint64(m.SchemaVersion))
+ }
+ return n
+}
+
+func sovAllCertificatesBySubjectKeyId(x uint64) (n int) {
+ return (math_bits.Len64(x|1) + 6) / 7
+}
+func sozAllCertificatesBySubjectKeyId(x uint64) (n int) {
+ return sovAllCertificatesBySubjectKeyId(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (m *AllCertificatesBySubjectKeyId) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowAllCertificatesBySubjectKeyId
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: AllCertificatesBySubjectKeyId: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: AllCertificatesBySubjectKeyId: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubjectKeyId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowAllCertificatesBySubjectKeyId
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthAllCertificatesBySubjectKeyId
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthAllCertificatesBySubjectKeyId
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SubjectKeyId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Certs", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowAllCertificatesBySubjectKeyId
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthAllCertificatesBySubjectKeyId
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthAllCertificatesBySubjectKeyId
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Certs = append(m.Certs, &Certificate{})
+ if err := m.Certs[len(m.Certs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SchemaVersion", wireType)
+ }
+ m.SchemaVersion = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowAllCertificatesBySubjectKeyId
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.SchemaVersion |= uint32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipAllCertificatesBySubjectKeyId(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthAllCertificatesBySubjectKeyId
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipAllCertificatesBySubjectKeyId(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ depth := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowAllCertificatesBySubjectKeyId
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowAllCertificatesBySubjectKeyId
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ case 1:
+ iNdEx += 8
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowAllCertificatesBySubjectKeyId
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if length < 0 {
+ return 0, ErrInvalidLengthAllCertificatesBySubjectKeyId
+ }
+ iNdEx += length
+ case 3:
+ depth++
+ case 4:
+ if depth == 0 {
+ return 0, ErrUnexpectedEndOfGroupAllCertificatesBySubjectKeyId
+ }
+ depth--
+ case 5:
+ iNdEx += 4
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthAllCertificatesBySubjectKeyId
+ }
+ if depth == 0 {
+ return iNdEx, nil
+ }
+ }
+ return 0, io.ErrUnexpectedEOF
+}
+
+var (
+ ErrInvalidLengthAllCertificatesBySubjectKeyId = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowAllCertificatesBySubjectKeyId = fmt.Errorf("proto: integer overflow")
+ ErrUnexpectedEndOfGroupAllCertificatesBySubjectKeyId = fmt.Errorf("proto: unexpected end of group")
+)
diff --git a/x/pki/types/genesis.go b/x/pki/types/genesis.go
index 40591b83a..6354dd8be 100644
--- a/x/pki/types/genesis.go
+++ b/x/pki/types/genesis.go
@@ -33,6 +33,7 @@ func DefaultGenesis() *GenesisState {
CertificatesList: []AllCertificates{},
RevokedNocIcaCertificatesList: []RevokedNocIcaCertificates{},
AllCertificatesBySubjectList: []AllCertificatesBySubject{},
+ AllCertificatesBySubjectKeyIdList: []AllCertificatesBySubjectKeyId{},
// this line is used by starport scaffolding # genesis/types/default
}
}
@@ -243,6 +244,17 @@ func (gs GenesisState) Validate() error { //nolint:gocyclo,vet
}
allCertificatesBySubjectIndexMap[index] = struct{}{}
}
+ // Check for duplicated index in allCertificatesBySubjectKeyId
+ allCertificatesBySubjectKeyIDIndexMap := make(map[string]struct{})
+
+ for _, elem := range gs.AllCertificatesBySubjectKeyIdList {
+ index := string(AllCertificatesBySubjectKeyIDKey(elem.SubjectKeyId))
+ if _, ok := allCertificatesBySubjectKeyIDIndexMap[index]; ok {
+ return fmt.Errorf("duplicated index for allCertificatesBySubjectKeyId")
+ }
+ allCertificatesBySubjectKeyIDIndexMap[index] = struct{}{}
+ }
+
// this line is used by starport scaffolding # genesis/types/validate
return nil
diff --git a/x/pki/types/genesis.pb.go b/x/pki/types/genesis.pb.go
index 142c19ee3..c85a8d724 100644
--- a/x/pki/types/genesis.pb.go
+++ b/x/pki/types/genesis.pb.go
@@ -48,6 +48,7 @@ type GenesisState struct {
CertificatesList []AllCertificates `protobuf:"bytes,21,rep,name=certificatesList,proto3" json:"certificatesList"`
RevokedNocIcaCertificatesList []RevokedNocIcaCertificates `protobuf:"bytes,22,rep,name=revokedNocIcaCertificatesList,proto3" json:"revokedNocIcaCertificatesList"`
AllCertificatesBySubjectList []AllCertificatesBySubject `protobuf:"bytes,23,rep,name=allCertificatesBySubjectList,proto3" json:"allCertificatesBySubjectList"`
+ AllCertificatesBySubjectKeyIdList []AllCertificatesBySubjectKeyId `protobuf:"bytes,24,rep,name=allCertificatesBySubjectKeyIdList,proto3" json:"allCertificatesBySubjectKeyIdList"`
}
func (m *GenesisState) Reset() { *m = GenesisState{} }
@@ -244,6 +245,13 @@ func (m *GenesisState) GetAllCertificatesBySubjectList() []AllCertificatesBySubj
return nil
}
+func (m *GenesisState) GetAllCertificatesBySubjectKeyIdList() []AllCertificatesBySubjectKeyId {
+ if m != nil {
+ return m.AllCertificatesBySubjectKeyIdList
+ }
+ return nil
+}
+
func init() {
proto.RegisterType((*GenesisState)(nil), "zigbeealliance.distributedcomplianceledger.pki.GenesisState")
}
@@ -253,67 +261,69 @@ func init() {
}
var fileDescriptor_f53eb28747bee8a8 = []byte{
- // 956 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x97, 0x4f, 0x6f, 0xe3, 0x44,
- 0x18, 0xc6, 0x33, 0xec, 0xb2, 0xc0, 0x74, 0x81, 0x65, 0xf6, 0x5f, 0x55, 0x41, 0x76, 0xd9, 0x03,
- 0xda, 0x4b, 0x13, 0x69, 0x39, 0x70, 0x41, 0x42, 0x49, 0x83, 0xba, 0xd9, 0x85, 0x10, 0x52, 0x5a,
- 0x24, 0x84, 0xb0, 0x9c, 0xf1, 0x90, 0x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, 0x83, 0x92, 0x15, 0x00, 0x00,
+ // 982 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x97, 0x4f, 0x8f, 0xdb, 0x44,
+ 0x18, 0xc6, 0x33, 0xb4, 0x14, 0x98, 0x2d, 0x50, 0xa6, 0xff, 0xa2, 0x02, 0x69, 0xe9, 0x01, 0xf5,
+ 0xb2, 0x89, 0x54, 0x0e, 0x5c, 0x90, 0x50, 0xb2, 0x41, 0xdb, 0xb4, 0x10, 0x42, 0x96, 0x6d, 0x25,
+ 0x84, 0xb0, 0x9c, 0xf1, 0x90, 0x0e, 0x76, 0x3d, 0xae, 0xed, 0x2c, 0x04, 0x09, 0x09, 0x04, 0xe2,
+ 0x8c, 0x90, 0x90, 0x90, 0x38, 0x21, 0xf1, 0x01, 0xf8, 0x18, 0x7b, 0xdc, 0x23, 0x27, 0x84, 0x36,
+ 0xdf, 0x80, 0x4f, 0x50, 0xe5, 0xf5, 0x38, 0x7f, 0xec, 0x19, 0x67, 0x3d, 0xf1, 0x6d, 0x9b, 0x3a,
+ 0xcf, 0xf3, 0x9b, 0xf7, 0x7d, 0xde, 0xc9, 0x6b, 0xfc, 0xde, 0xb7, 0x7c, 0x3c, 0x62, 0xcc, 0xf6,
+ 0x3c, 0x6e, 0xfb, 0x94, 0xb5, 0x1c, 0x1e, 0xc5, 0x21, 0x1f, 0x4d, 0x62, 0xe6, 0x50, 0xf1, 0x24,
+ 0x48, 0x3e, 0xf5, 0x98, 0x33, 0x66, 0x61, 0x2b, 0x70, 0x79, 0x6b, 0xcc, 0x7c, 0x16, 0xf1, 0xa8,
+ 0x19, 0x84, 0x22, 0x16, 0xa4, 0xb9, 0xfe, 0xed, 0x66, 0xc1, 0xb7, 0x9b, 0x81, 0xcb, 0x6f, 0xdc,
+ 0x2f, 0xe9, 0x66, 0x07, 0x41, 0x28, 0x8e, 0x98, 0x63, 0x51, 0x16,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 0x59, 0x7f, 0xda, 0x1a, 0xcd, 0xb4, 0x3f, 0x45, 0x9e, 0xc9, 0xf6, 0xa3, 0x79, 0x60, 0xf9, 0x0b,
+ 0x52, 0x37, 0xdc, 0x7e, 0x8a, 0x84, 0x17, 0xdb, 0xcf, 0x26, 0xf7, 0xce, 0x17, 0xc7, 0xa7, 0x0d,
+ 0x74, 0x72, 0xda, 0x40, 0xff, 0x9d, 0x36, 0xd0, 0x2f, 0xb3, 0x46, 0xed, 0x64, 0xd6, 0xa8, 0xfd,
+ 0x33, 0x6b, 0xd4, 0x3e, 0xeb, 0x8e, 0x79, 0xfc, 0x78, 0x32, 0x6a, 0x52, 0xf1, 0xa4, 0x95, 0xb0,
+ 0xed, 0xaa, 0xde, 0x44, 0x77, 0x97, 0x74, 0xbb, 0xf2, 0x5d, 0xf4, 0x1b, 0x78, 0x1b, 0x8d, 0xa7,
+ 0x01, 0x8b, 0x46, 0x17, 0xe0, 0xdd, 0xf2, 0x9d, 0x67, 0x01, 0x00, 0x00, 0xff, 0xff, 0x50, 0x95,
+ 0x6e, 0x00, 0x8f, 0x16, 0x00, 0x00,
}
func (m *GenesisState) Marshal() (dAtA []byte, err error) {
@@ -336,6 +346,22 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if len(m.AllCertificatesBySubjectKeyIdList) > 0 {
+ for iNdEx := len(m.AllCertificatesBySubjectKeyIdList) - 1; iNdEx >= 0; iNdEx-- {
+ {
+ size, err := m.AllCertificatesBySubjectKeyIdList[iNdEx].MarshalToSizedBuffer(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = encodeVarintGenesis(dAtA, i, uint64(size))
+ }
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xc2
+ }
+ }
if len(m.AllCertificatesBySubjectList) > 0 {
for iNdEx := len(m.AllCertificatesBySubjectList) - 1; iNdEx >= 0; iNdEx-- {
{
@@ -824,6 +850,12 @@ func (m *GenesisState) Size() (n int) {
n += 2 + l + sovGenesis(uint64(l))
}
}
+ if len(m.AllCertificatesBySubjectKeyIdList) > 0 {
+ for _, e := range m.AllCertificatesBySubjectKeyIdList {
+ l = e.Size()
+ n += 2 + l + sovGenesis(uint64(l))
+ }
+ }
return n
}
@@ -1648,6 +1680,40 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
+ case 24:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field AllCertificatesBySubjectKeyIdList", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenesis
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthGenesis
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenesis
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.AllCertificatesBySubjectKeyIdList = append(m.AllCertificatesBySubjectKeyIdList, AllCertificatesBySubjectKeyId{})
+ if err := m.AllCertificatesBySubjectKeyIdList[len(m.AllCertificatesBySubjectKeyIdList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenesis(dAtA[iNdEx:])
diff --git a/x/pki/types/genesis_test.go b/x/pki/types/genesis_test.go
index 14804de12..d3ca9d7e9 100644
--- a/x/pki/types/genesis_test.go
+++ b/x/pki/types/genesis_test.go
@@ -218,6 +218,22 @@ AllCertificatesBySubjectList: []types.AllCertificatesBySubject{
Subject: "1",
},
},
+AllCertificatesBySubjectKeyIdList: []types.AllCertificatesBySubjectKeyId{
+ {
+ SubjectKeyId: "0",
+},
+ {
+ SubjectKeyId: "1",
+},
+},
+AllCertificatesBySubjectKeyIdList: []types.AllCertificatesBySubjectKeyId{
+ {
+ SubjectKeyId: "0",
+},
+ {
+ SubjectKeyId: "1",
+},
+},
// this line is used by starport scaffolding # types/genesis/validField
},
valid: true,
@@ -532,6 +548,34 @@ SubjectKeyID: "0",
},
valid: false,
},
+{
+ desc: "duplicated allCertificatesBySubjectKeyId",
+ genState: &types.GenesisState{
+ AllCertificatesBySubjectKeyIdList: []types.AllCertificatesBySubjectKeyId{
+ {
+ SubjectKeyId: "0",
+},
+ {
+ SubjectKeyId: "0",
+},
+ },
+ },
+ valid: false,
+},
+{
+ desc: "duplicated allCertificatesBySubjectKeyId",
+ genState: &types.GenesisState{
+ AllCertificatesBySubjectKeyIdList: []types.AllCertificatesBySubjectKeyId{
+ {
+ SubjectKeyId: "0",
+},
+ {
+ SubjectKeyId: "0",
+},
+ },
+ },
+ valid: false,
+},
// this line is used by starport scaffolding # types/genesis/testcase
} {
t.Run(tc.desc, func(t *testing.T) {
diff --git a/x/pki/types/key_all_certificates_by_subject_key_id.go b/x/pki/types/key_all_certificates_by_subject_key_id.go
new file mode 100644
index 000000000..f04b2fb9e
--- /dev/null
+++ b/x/pki/types/key_all_certificates_by_subject_key_id.go
@@ -0,0 +1,23 @@
+package types
+
+import "encoding/binary"
+
+var _ binary.ByteOrder
+
+const (
+ // AllCertificatesBySubjectKeyIDKeyPrefix is the prefix to retrieve all AllCertificatesBySubjectKeyId
+ AllCertificatesBySubjectKeyIDKeyPrefix = "AllCertificatesBySubjectKeyId/value/"
+)
+
+// AllCertificatesBySubjectKeyIDKey returns the store key to retrieve a AllCertificatesBySubjectKeyId from the index fields
+func AllCertificatesBySubjectKeyIDKey(
+ subjectKeyID string,
+) []byte {
+ var key []byte
+
+ subjectKeyIDBytes := []byte(subjectKeyID)
+ key = append(key, subjectKeyIDBytes...)
+ key = append(key, []byte("/")...)
+
+ return key
+}
diff --git a/x/pki/types/query.pb.go b/x/pki/types/query.pb.go
index 3f95a9cf2..b29232d74 100644
--- a/x/pki/types/query.pb.go
+++ b/x/pki/types/query.pb.go
@@ -32,7 +32,8 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type QueryAllCertificatesRequest struct {
- Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
+ Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
+ SubjectKeyId string `protobuf:"bytes,2,opt,name=subjectKeyId,proto3" json:"subjectKeyId,omitempty"`
}
func (m *QueryAllCertificatesRequest) Reset() { *m = QueryAllCertificatesRequest{} }
@@ -75,6 +76,13 @@ func (m *QueryAllCertificatesRequest) GetPagination() *query.PageRequest {
return nil
}
+func (m *QueryAllCertificatesRequest) GetSubjectKeyId() string {
+ if m != nil {
+ return m.SubjectKeyId
+ }
+ return ""
+}
+
type QueryAllCertificatesResponse struct {
Certificates []AllCertificates `protobuf:"bytes,1,rep,name=certificates,proto3" json:"certificates"`
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
@@ -3227,172 +3235,172 @@ func init() {
}
var fileDescriptor_db6ffa8ae459ba1c = []byte{
- // 2629 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5c, 0x5f, 0x6c, 0x5c, 0x47,
- 0xf5, 0xce, 0xec, 0xfe, 0xd2, 0x9f, 0x3a, 0x8d, 0x08, 0x9d, 0xa4, 0x89, 0xb3, 0x89, 0x1d, 0x67,
- 0xda, 0xd8, 0x8e, 0x83, 0x77, 0x9b, 0x84, 0x26, 0x50, 0xa9, 0x4d, 0xed, 0xb8, 0x75, 0x9d, 0x80,
- 0x6b, 0xaf, 0xdb, 0x34, 0x49, 0x4b, 0x56, 0x77, 0xef, 0x5e, 0x9c, 0x8b, 0xaf, 0xf7, 0x6e, 0x77,
- 0x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x3f, 0xbc, 0x57, 0x4e, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -4675,6 +4683,13 @@ func (m *QueryAllCertificatesRequest) MarshalToSizedBuffer(dAtA []byte) (int, er
_ = i
var l int
_ = l
+ if len(m.SubjectKeyId) > 0 {
+ i -= len(m.SubjectKeyId)
+ copy(dAtA[i:], m.SubjectKeyId)
+ i = encodeVarintQuery(dAtA, i, uint64(len(m.SubjectKeyId)))
+ i--
+ dAtA[i] = 0x12
+ }
if m.Pagination != nil {
{
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
@@ -7034,6 +7049,10 @@ func (m *QueryAllCertificatesRequest) Size() (n int) {
l = m.Pagination.Size()
n += 1 + l + sovQuery(uint64(l))
}
+ l = len(m.SubjectKeyId)
+ if l > 0 {
+ n += 1 + l + sovQuery(uint64(l))
+ }
return n
}
@@ -8011,6 +8030,38 @@ func (m *QueryAllCertificatesRequest) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SubjectKeyId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthQuery
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.SubjectKeyId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:])