@@ -400,9 +400,13 @@ export default {
400
400
try {
401
401
const key = params ?? { } ;
402
402
const queryClient = await initQueryClient ( rootGetters )
403
- let value = ( await queryClient . queryProposedCertificateRevocation ( key . subject , key . subjectKeyId ) ) . data
403
+ let value = ( await queryClient . queryProposedCertificateRevocation ( key . subject , key . subjectKeyId , query ) ) . data
404
404
405
405
406
+ while ( all && ( < any > value ) . pagination && ( < any > value ) . pagination . next_key != null ) {
407
+ let next_values = ( await queryClient . queryProposedCertificateRevocation ( key . subject , key . subjectKeyId , { ...query , 'pagination.key' :( < any > value ) . pagination . next_key } ) ) . data
408
+ value = mergeResults ( value , next_values ) ;
409
+ }
406
410
commit ( 'QUERY' , { query : 'ProposedCertificateRevocation' , key : { params : { ...key } , query} , value } )
407
411
if ( subscribe ) commit ( 'SUBSCRIBE' , { action : 'QueryProposedCertificateRevocation' , payload : { options : { all } , params : { ...key } , query } } )
408
412
return getters [ 'getProposedCertificateRevocation' ] ( { params : { ...key } , query} ) ?? { }
@@ -669,57 +673,56 @@ export default {
669
673
670
674
}
671
675
} ,
672
-
673
-
674
-
675
-
676
-
677
-
678
-
679
- async QueryNocRootCertificates ( { commit, rootGetters, getters } , { options : { subscribe, all} = { subscribe :false , all :false } , params, query= null } ) {
680
- try {
681
- const key = params ?? { } ;
682
- const queryClient = await initQueryClient ( rootGetters )
683
- let value = ( await queryClient . queryNocRootCertificates ( key . vid ) ) . data
684
-
685
-
686
- commit ( 'QUERY' , { query : 'NocRootCertificates' , key : { params : { ...key } , query} , value } )
687
- if ( subscribe ) commit ( 'SUBSCRIBE' , { action : 'QueryNocRootCertificates' , payload : { options : { all } , params : { ...key } , query } } )
688
- return getters [ 'getNocRootCertificates' ] ( { params : { ...key } , query} ) ?? { }
689
- } catch ( e ) {
690
- throw new Error ( 'QueryClient:QueryNocRootCertificates API Node Unavailable. Could not perform query: ' + e . message )
691
-
692
- }
693
- } ,
694
-
695
-
696
-
697
-
698
-
699
-
700
-
701
- async QueryNocRootCertificatesAll ( { commit, rootGetters, getters } , { options : { subscribe, all} = { subscribe :false , all :false } , params, query= null } ) {
702
- try {
703
- const key = params ?? { } ;
704
- const queryClient = await initQueryClient ( rootGetters )
705
- let value = ( await queryClient . queryNocRootCertificatesAll ( query ) ) . data
706
-
707
-
708
- while ( all && ( < any > value ) . pagination && ( < any > value ) . pagination . next_key != null ) {
709
- let next_values = ( await queryClient . queryNocRootCertificatesAll ( { ...query , 'pagination.key' :( < any > value ) . pagination . next_key } ) ) . data
710
- value = mergeResults ( value , next_values ) ;
711
- }
712
- commit ( 'QUERY' , { query : 'NocRootCertificatesAll' , key : { params : { ...key } , query} , value } )
713
- if ( subscribe ) commit ( 'SUBSCRIBE' , { action : 'QueryNocRootCertificatesAll' , payload : { options : { all } , params : { ...key } , query } } )
714
- return getters [ 'getNocRootCertificatesAll' ] ( { params : { ...key } , query} ) ?? { }
715
- } catch ( e ) {
716
- throw new Error ( 'QueryClient:QueryNocRootCertificatesAll API Node Unavailable. Could not perform query: ' + e . message )
717
-
718
- }
719
- } ,
720
-
721
676
722
677
678
+
679
+
680
+
681
+
682
+
683
+ async QueryNocRootCertificates ( { commit, rootGetters, getters } , { options : { subscribe, all} = { subscribe :false , all :false } , params, query= null } ) {
684
+ try {
685
+ const key = params ?? { } ;
686
+ const queryClient = await initQueryClient ( rootGetters )
687
+ let value = ( await queryClient . queryNocRootCertificates ( key . vid ) ) . data
688
+
689
+
690
+ commit ( 'QUERY' , { query : 'NocRootCertificates' , key : { params : { ...key } , query} , value } )
691
+ if ( subscribe ) commit ( 'SUBSCRIBE' , { action : 'QueryNocRootCertificates' , payload : { options : { all } , params : { ...key } , query } } )
692
+ return getters [ 'getNocRootCertificates' ] ( { params : { ...key } , query} ) ?? { }
693
+ } catch ( e ) {
694
+ throw new SpVuexError ( 'QueryClient:QueryNocRootCertificates' , 'API Node Unavailable. Could not perform query: ' + e . message )
695
+
696
+ }
697
+ } ,
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+ async QueryNocRootCertificatesAll ( { commit, rootGetters, getters } , { options : { subscribe, all} = { subscribe :false , all :false } , params, query= null } ) {
706
+ try {
707
+ const key = params ?? { } ;
708
+ const queryClient = await initQueryClient ( rootGetters )
709
+ let value = ( await queryClient . queryNocRootCertificatesAll ( query ) ) . data
710
+
711
+
712
+ while ( all && ( < any > value ) . pagination && ( < any > value ) . pagination . next_key != null ) {
713
+ let next_values = ( await queryClient . queryNocRootCertificatesAll ( { ...query , 'pagination.key' :( < any > value ) . pagination . next_key } ) ) . data
714
+ value = mergeResults ( value , next_values ) ;
715
+ }
716
+ commit ( 'QUERY' , { query : 'NocRootCertificatesAll' , key : { params : { ...key } , query} , value } )
717
+ if ( subscribe ) commit ( 'SUBSCRIBE' , { action : 'QueryNocRootCertificatesAll' , payload : { options : { all } , params : { ...key } , query } } )
718
+ return getters [ 'getNocRootCertificatesAll' ] ( { params : { ...key } , query} ) ?? { }
719
+ } catch ( e ) {
720
+ throw new SpVuexError ( 'QueryClient:QueryNocRootCertificatesAll' , 'API Node Unavailable. Could not perform query: ' + e . message )
721
+
722
+ }
723
+ } ,
724
+
725
+
723
726
async sendMsgRejectAddX509RootCert ( { rootGetters } , { value, fee = [ ] , memo = '' } ) {
724
727
try {
725
728
const txClient = await initTxClient ( rootGetters )
@@ -885,6 +888,36 @@ export default {
885
888
}
886
889
}
887
890
} ,
891
+ async sendMsgAddNocX509RootCert ( { rootGetters } , { value, fee = [ ] , memo = '' } ) {
892
+ try {
893
+ const txClient = await initTxClient ( rootGetters )
894
+ const msg = await txClient . msgAddNocX509RootCert ( value )
895
+ const result = await txClient . signAndBroadcast ( [ msg ] , { fee : { amount : fee ,
896
+ gas : "200000" } , memo} )
897
+ return result
898
+ } catch ( e ) {
899
+ if ( e == MissingWalletError ) {
900
+ throw new SpVuexError ( 'TxClient:MsgAddNocX509RootCert:Init' , 'Could not initialize signing client. Wallet is required.' )
901
+ } else {
902
+ throw new SpVuexError ( 'TxClient:MsgAddNocX509RootCert:Send' , 'Could not broadcast Tx: ' + e . message )
903
+ }
904
+ }
905
+ } ,
906
+ async sendMsgRemoveX509Cert ( { rootGetters } , { value, fee = [ ] , memo = '' } ) {
907
+ try {
908
+ const txClient = await initTxClient ( rootGetters )
909
+ const msg = await txClient . msgRemoveX509Cert ( value )
910
+ const result = await txClient . signAndBroadcast ( [ msg ] , { fee : { amount : fee ,
911
+ gas : "200000" } , memo} )
912
+ return result
913
+ } catch ( e ) {
914
+ if ( e == MissingWalletError ) {
915
+ throw new SpVuexError ( 'TxClient:MsgRemoveX509Cert:Init' , 'Could not initialize signing client. Wallet is required.' )
916
+ } else {
917
+ throw new SpVuexError ( 'TxClient:MsgRemoveX509Cert:Send' , 'Could not broadcast Tx: ' + e . message )
918
+ }
919
+ }
920
+ } ,
888
921
889
922
async MsgProposeAddX509RootCert ( { rootGetters } , { value } ) {
890
923
try {
@@ -896,7 +929,6 @@ export default {
896
929
throw new SpVuexError ( 'TxClient:MsgProposeAddX509RootCert:Init' , 'Could not initialize signing client. Wallet is required.' )
897
930
} else {
898
931
throw new SpVuexError ( 'TxClient:MsgProposeAddX509RootCert:Create' , 'Could not create message: ' + e . message )
899
-
900
932
}
901
933
}
902
934
} ,
@@ -923,7 +955,6 @@ export default {
923
955
throw new SpVuexError ( 'TxClient:MsgProposeRevokeX509RootCert:Init' , 'Could not initialize signing client. Wallet is required.' )
924
956
} else {
925
957
throw new SpVuexError ( 'TxClient:MsgProposeRevokeX509RootCert:Create' , 'Could not create message: ' + e . message )
926
-
927
958
}
928
959
}
929
960
} ,
@@ -937,7 +968,6 @@ export default {
937
968
throw new SpVuexError ( 'TxClient:MsgRevokeX509Cert:Init' , 'Could not initialize signing client. Wallet is required.' )
938
969
} else {
939
970
throw new SpVuexError ( 'TxClient:MsgRevokeX509Cert:Create' , 'Could not create message: ' + e . message )
940
-
941
971
}
942
972
}
943
973
} ,
@@ -951,7 +981,6 @@ export default {
951
981
throw new SpVuexError ( 'TxClient:MsgApproveRevokeX509RootCert:Init' , 'Could not initialize signing client. Wallet is required.' )
952
982
} else {
953
983
throw new SpVuexError ( 'TxClient:MsgApproveRevokeX509RootCert:Create' , 'Could not create message: ' + e . message )
954
-
955
984
}
956
985
}
957
986
} ,
@@ -965,7 +994,6 @@ export default {
965
994
throw new SpVuexError ( 'TxClient:MsgUpdatePkiRevocationDistributionPoint:Init' , 'Could not initialize signing client. Wallet is required.' )
966
995
} else {
967
996
throw new SpVuexError ( 'TxClient:MsgUpdatePkiRevocationDistributionPoint:Create' , 'Could not create message: ' + e . message )
968
-
969
997
}
970
998
}
971
999
} ,
@@ -979,7 +1007,6 @@ export default {
979
1007
throw new SpVuexError ( 'TxClient:MsgRejectAddX509RootCert:Init' , 'Could not initialize signing client. Wallet is required.' )
980
1008
} else {
981
1009
throw new SpVuexError ( 'TxClient:MsgRejectAddX509RootCert:Create' , 'Could not create message: ' + e . message )
982
-
983
1010
}
984
1011
}
985
1012
} ,
@@ -993,7 +1020,6 @@ export default {
993
1020
throw new SpVuexError ( 'TxClient:MsgAddPkiRevocationDistributionPoint:Init' , 'Could not initialize signing client. Wallet is required.' )
994
1021
} else {
995
1022
throw new SpVuexError ( 'TxClient:MsgAddPkiRevocationDistributionPoint:Create' , 'Could not create message: ' + e . message )
996
-
997
1023
}
998
1024
}
999
1025
} ,
@@ -1007,7 +1033,6 @@ export default {
1007
1033
throw new SpVuexError ( 'TxClient:MsgApproveAddX509RootCert:Init' , 'Could not initialize signing client. Wallet is required.' )
1008
1034
} else {
1009
1035
throw new SpVuexError ( 'TxClient:MsgApproveAddX509RootCert:Create' , 'Could not create message: ' + e . message )
1010
-
1011
1036
}
1012
1037
}
1013
1038
} ,
@@ -1021,7 +1046,6 @@ export default {
1021
1046
throw new SpVuexError ( 'TxClient:MsgDeletePkiRevocationDistributionPoint:Init' , 'Could not initialize signing client. Wallet is required.' )
1022
1047
} else {
1023
1048
throw new SpVuexError ( 'TxClient:MsgDeletePkiRevocationDistributionPoint:Create' , 'Could not create message: ' + e . message )
1024
-
1025
1049
}
1026
1050
}
1027
1051
} ,
@@ -1035,23 +1059,35 @@ export default {
1035
1059
throw new SpVuexError ( 'TxClient:MsgAddX509Cert:Init' , 'Could not initialize signing client. Wallet is required.' )
1036
1060
} else {
1037
1061
throw new SpVuexError ( 'TxClient:MsgAddX509Cert:Create' , 'Could not create message: ' + e . message )
1038
-
1039
1062
}
1040
1063
}
1041
1064
} ,
1042
1065
async MsgAddNocX509RootCert ( { rootGetters } , { value } ) {
1043
- try {
1044
- const txClient = await initTxClient ( rootGetters )
1045
- const msg = await txClient . msgAddNocX509RootCert ( value )
1046
- return msg
1047
- } catch ( e ) {
1048
- if ( e == MissingWalletError ) {
1049
- throw new Error ( 'TxClient:MsgAddNocX509RootCert:Init Could not initialize signing client. Wallet is required.' )
1050
- } else {
1051
- throw new Error ( 'TxClient:MsgAddNocX509RootCert:Create Could not create message: ' + e . message )
1052
- }
1053
- }
1054
- } ,
1055
-
1066
+ try {
1067
+ const txClient = await initTxClient ( rootGetters )
1068
+ const msg = await txClient . msgAddNocX509RootCert ( value )
1069
+ return msg
1070
+ } catch ( e ) {
1071
+ if ( e == MissingWalletError ) {
1072
+ throw new SpVuexError ( 'TxClient:MsgAddNocX509RootCert:Init' , 'Could not initialize signing client. Wallet is required.' )
1073
+ } else {
1074
+ throw new SpVuexError ( 'TxClient:MsgAddNocX509RootCert:Create' , 'Could not create message: ' + e . message )
1075
+ }
1076
+ }
1077
+ } ,
1078
+ async MsgRemoveX509Cert ( { rootGetters } , { value } ) {
1079
+ try {
1080
+ const txClient = await initTxClient ( rootGetters )
1081
+ const msg = await txClient . msgRemoveX509Cert ( value )
1082
+ return msg
1083
+ } catch ( e ) {
1084
+ if ( e == MissingWalletError ) {
1085
+ throw new SpVuexError ( 'TxClient:MsgRemoveX509Cert:Init' , 'Could not initialize signing client. Wallet is required.' )
1086
+ } else {
1087
+ throw new SpVuexError ( 'TxClient:MsgRemoveX509Cert:Create' , 'Could not create message: ' + e . message )
1088
+ }
1089
+ }
1090
+ } ,
1091
+
1056
1092
}
1057
1093
}
0 commit comments