diff --git a/proto/swisstronik/compliance/query.proto b/proto/swisstronik/compliance/query.proto index b3a00264..adefe4dc 100644 --- a/proto/swisstronik/compliance/query.proto +++ b/proto/swisstronik/compliance/query.proto @@ -25,7 +25,7 @@ service Query { } rpc VerificationDetails(QueryVerificationDetailsRequest) returns (QueryVerificationDetailsResponse) { - option (google.api.http).get = "/swisstronik/compliance/details/{userAddress}"; + option (google.api.http).get = "/swisstronik/compliance/details/{verificationID}"; } } @@ -58,7 +58,7 @@ message QueryIssuerDetailsResponse { } message QueryVerificationDetailsRequest { - string userAddress = 1; + string verificationID = 1; } message QueryVerificationDetailsResponse { diff --git a/proto/swisstronik/compliance/tx.proto b/proto/swisstronik/compliance/tx.proto index fe3d79ad..6a172afe 100644 --- a/proto/swisstronik/compliance/tx.proto +++ b/proto/swisstronik/compliance/tx.proto @@ -9,20 +9,22 @@ option go_package = "swisstronik/x/compliance/types"; // Msg defines the Msg service. service Msg { - rpc SetIssuerDetails(MsgSetIssuerDetails) returns (MsgSetIssuerDetailsResponse); - rpc UpdateIssuerDetails(MsgUpdateIssuerDetails) returns (MsgUpdateIssuerDetailsResponse); - rpc RemoveIssuer(MsgRemoveIssuer) returns (MsgRemoveIssuer); + rpc HandleSetIssuerDetails(MsgSetIssuerDetails) returns (MsgSetIssuerDetailsResponse); + rpc HandleUpdateIssuerDetails(MsgUpdateIssuerDetails) returns (MsgUpdateIssuerDetailsResponse); + rpc HandleRemoveIssuer(MsgRemoveIssuer) returns (MsgRemoveIssuerResponse); } message MsgSetIssuerDetails { string operator = 1; - IssuerDetails details = 2; + string issuerAddress = 2; + IssuerDetails details = 3; } message MsgSetIssuerDetailsResponse {} message MsgUpdateIssuerDetails { string operator = 1; - IssuerDetails details = 2; + string issuerAddress = 2; + IssuerDetails details = 3; } message MsgUpdateIssuerDetailsResponse {} diff --git a/x/compliance/client/cli/query.go b/x/compliance/client/cli/query.go index 4f5be44e..4e1333e0 100644 --- a/x/compliance/client/cli/query.go +++ b/x/compliance/client/cli/query.go @@ -10,7 +10,7 @@ import ( ) // GetQueryCmd returns the cli query commands for this module -func GetQueryCmd(queryRoute string) *cobra.Command { +func GetQueryCmd() *cobra.Command { cmd := &cobra.Command{ Use: types.ModuleName, Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), @@ -23,6 +23,7 @@ func GetQueryCmd(queryRoute string) *cobra.Command { CmdQueryParams(), CmdGetAddressInfo(), CmdGetIssuerDetails(), + CmdGetVerificationDetails(), ) return cmd @@ -42,11 +43,11 @@ func CmdGetAddressInfo() *cobra.Command { return err } - req := &types.QueryVerificationDataRequest{ + req := &types.QueryAddressInfoRequest{ Address: address.String(), } - resp, err := queryClient.VerificationData(context.Background(), req) + resp, err := queryClient.AddressInfo(context.Background(), req) if err != nil { return err } @@ -91,3 +92,35 @@ func CmdGetIssuerDetails() *cobra.Command { return cmd } + +func CmdGetVerificationDetails() *cobra.Command { + cmd := &cobra.Command{ + Use: "get-verification-details [verification-id]", + Short: "Returns details of provided address", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + queryClient := types.NewQueryClient(clientCtx) + + id, err := types.ParseAddress(args[0]) + if err != nil { + return err + } + + req := &types.QueryVerificationDetailsRequest{ + VerificationID: id.String(), + } + + resp, err := queryClient.VerificationDetails(context.Background(), req) + if err != nil { + return err + } + + return clientCtx.PrintProto(resp) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/compliance/client/cli/tx.go b/x/compliance/client/cli/tx.go index 0d573511..a9754c74 100644 --- a/x/compliance/client/cli/tx.go +++ b/x/compliance/client/cli/tx.go @@ -1,13 +1,9 @@ package cli import ( - "fmt" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/ethereum/go-ethereum/common" - "swisstronik/x/compliance/types" - "time" - "github.com/spf13/cobra" + "swisstronik/x/compliance/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" @@ -24,70 +20,16 @@ func GetTxCmd() *cobra.Command { } cmd.AddCommand( - CmdSetAddressInfo(), CmdSetIssuerDetails(), ) return cmd } -// CmdSetAddressInfo command sets sample verification data for specific address. -// This function is used only for debug purposes and will be removed before chain update. -func CmdSetAddressInfo() *cobra.Command { - cmd := &cobra.Command{ - Use: "set-address-info [user-address] [issuer-address] [issuer-alias] [origin-chain]", - Short: "Sets sample verification data for provided address", - Args: cobra.MinimumNArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - userAddress := args[0] - if !common.IsHexAddress(userAddress) { - return fmt.Errorf("provided non-eth user address") - } - - issuerAddress := args[1] - if !common.IsHexAddress(issuerAddress) { - return fmt.Errorf("provided non-eth user address") - } - - issuerAlias := args[2] - if len(issuerAlias) == 0 { - issuerAlias = "sample_issuer" - } - - originChain := args[3] - if len(originChain) == 0 { - originChain = "swisstronik" - } - - timestamp := uint32(time.Now().Unix()) - - msg := types.NewMsgSetAddressInfo( - clientCtx.GetFromAddress().String(), - userAddress, - issuerAddress, - issuerAlias, - originChain, - timestamp, - types.VerificationType_VT_KYC, - ) - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - return cmd -} - // CmdSetIssuerDetails command sets provided issuer details. func CmdSetIssuerDetails() *cobra.Command { cmd := &cobra.Command{ - Use: "set-issuer-details [issuer-address] [issuer-alias]", + Use: "set-issuer-details [issuer-address] [name] [description] [url] [logo-url] [legalEntity]", Short: "Sets issuer details", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { @@ -101,11 +43,20 @@ func CmdSetIssuerDetails() *cobra.Command { return err } - issuerAlias := args[1] + issuerName := args[1] + issuerDescription := args[2] + issuerURL := args[3] + issuerLogo := args[4] + issuerLegalEntity := args[5] + msg := types.NewSetIssuerDetailsMsg( - clientCtx.GetFromAddress().String(), + clientCtx.GetFromAddress(), issuerAddress.String(), - issuerAlias, + issuerName, + issuerDescription, + issuerURL, + issuerLogo, + issuerLegalEntity, ) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg) diff --git a/x/compliance/keeper/keeper.go b/x/compliance/keeper/keeper.go index 24accb35..b8703673 100644 --- a/x/compliance/keeper/keeper.go +++ b/x/compliance/keeper/keeper.go @@ -114,15 +114,10 @@ func (k Keeper) GetAddressInfo(ctx sdk.Context, address sdk.Address) (*types.Add return &addrInfo, nil } -// SetIssuerDetailsInner sets description about provided issuer address -func (k Keeper) SetIssuerDetailsInner(ctx sdk.Context, issuerAddress sdk.Address, alias string) error { +// SetIssuerDetails sets details for provided issuer address +func (k Keeper) SetIssuerDetails(ctx sdk.Context, issuerAddress sdk.Address, details *types.IssuerDetails) error { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixIssuerDetails) - if len(alias) == 0 { - return errors.Wrap(types.ErrInvalidParam, "invalid issuer alias") - } - - details := &types.IssuerDetails{IssuerAlias: alias} detailsBytes, err := details.Marshal() if err != nil { return err @@ -149,16 +144,6 @@ func (k Keeper) GetIssuerDetails(ctx sdk.Context, issuerAddress sdk.Address) (*t return &issuerDetails, nil } -// GetIssuerAlias returns human-readable alias of provided issuer address -func (k Keeper) GetIssuerAlias(ctx sdk.Context, issuerAddress sdk.Address) (string, error) { - issuerDetails, err := k.GetIssuerDetails(ctx, issuerAddress) - if err != nil { - return "", err - } - - return issuerDetails.IssuerAlias, nil -} - // GetAddressDetails returns address details func (k Keeper) GetAddressDetails(ctx sdk.Context, address sdk.Address) (*types.AddressDetails, error) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixAddressDetails) diff --git a/x/compliance/keeper/msg_server.go b/x/compliance/keeper/msg_server.go index f81b7bca..cdd96474 100644 --- a/x/compliance/keeper/msg_server.go +++ b/x/compliance/keeper/msg_server.go @@ -18,32 +18,27 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { var _ types.MsgServer = msgServer{} -func (k msgServer) SetAddressInfo(goCtx context.Context, msg *types.MsgSetAddressInfo) (*types.MsgSetAddressInfoResponse, error) { +func (k msgServer) HandleSetIssuerDetails(goCtx context.Context, msg *types.MsgSetIssuerDetails) (*types.MsgSetIssuerDetailsResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - address, err := sdk.AccAddressFromBech32(msg.UserAddress) + issuerAddress, err := sdk.AccAddressFromBech32(msg.IssuerAddress) if err != nil { return nil, err } - if err := k.SetAddressInfoRaw(ctx, address, msg.Data); err != nil { + if err := k.SetIssuerDetails(ctx, issuerAddress, msg.Details); err != nil { return nil, err } - return &types.MsgSetAddressInfoResponse{}, nil + return &types.MsgSetIssuerDetailsResponse{}, nil } -func (k msgServer) SetIssuerDetails(goCtx context.Context, msg *types.MsgSetIssuerDetails) (*types.MsgSetIssuerDetailsResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - issuerAddress, err := sdk.AccAddressFromBech32(msg.IssuerAddress) - if err != nil { - return nil, err - } - - if err := k.SetIssuerDetailsInner(ctx, issuerAddress, msg.Details.IssuerAlias); err != nil { - return nil, err - } +func (k msgServer) HandleUpdateIssuerDetails(goCtx context.Context, msg *types.MsgUpdateIssuerDetails) (*types.MsgUpdateIssuerDetailsResponse, error) { + // TODO: Implement + return &types.MsgUpdateIssuerDetailsResponse{}, nil +} - return &types.MsgSetIssuerDetailsResponse{}, nil +func (k msgServer) HandleRemoveIssuer(goCtx context.Context, msg *types.MsgRemoveIssuer) (*types.MsgRemoveIssuerResponse, error) { + // TODO: Implement + return &types.MsgRemoveIssuerResponse{}, nil } diff --git a/x/compliance/keeper/query.go b/x/compliance/keeper/query.go index 2da1f637..801ecab0 100644 --- a/x/compliance/keeper/query.go +++ b/x/compliance/keeper/query.go @@ -10,7 +10,7 @@ import ( var _ types.QueryServer = Keeper{} -func (k Keeper) VerificationData(goCtx context.Context, req *types.QueryVerificationDataRequest) (*types.QueryVerificationDataResponse, error) { +func (k Keeper) AddressInfo(goCtx context.Context, req *types.QueryAddressInfoRequest) (*types.QueryAddressInfoResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } @@ -26,7 +26,7 @@ func (k Keeper) VerificationData(goCtx context.Context, req *types.QueryVerifica return nil, err } - return &types.QueryVerificationDataResponse{Data: verificationData}, nil + return &types.QueryAddressInfoResponse{Data: verificationData}, nil } func (k Keeper) IssuerDetails(goCtx context.Context, req *types.QueryIssuerDetailsRequest) (*types.QueryIssuerDetailsResponse, error) { @@ -47,3 +47,21 @@ func (k Keeper) IssuerDetails(goCtx context.Context, req *types.QueryIssuerDetai return &types.QueryIssuerDetailsResponse{Details: issuerDetails}, nil } + +func (k Keeper) VerificationDetails(goCtx context.Context, req *types.QueryVerificationDetailsRequest) (*types.QueryVerificationDetailsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + + details, err := k.GetVerificationDetails(ctx, []byte(req.VerificationID)) + if err != nil { + return nil, err + } + + if details == nil { + return &types.QueryVerificationDetailsResponse{}, nil + } + + return &types.QueryVerificationDetailsResponse{Details: details}, nil +} diff --git a/x/compliance/module.go b/x/compliance/module.go index 64367d19..3ce3f1b2 100644 --- a/x/compliance/module.go +++ b/x/compliance/module.go @@ -77,7 +77,7 @@ func (a AppModuleBasic) GetTxCmd() *cobra.Command { // GetQueryCmd returns the root query command for the module. The subcommands of this root command are used by end-users to generate new queries to the subset of the state defined by the module func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd(types.StoreKey) + return cli.GetQueryCmd() } // ---------------------------------------------------------------------------- @@ -88,7 +88,7 @@ func (AppModuleBasic) GetQueryCmd() *cobra.Command { type AppModule struct { AppModuleBasic - keeper keeper.Keeper + keeper keeper.Keeper } func NewAppModule( diff --git a/x/compliance/types/msg.go b/x/compliance/types/msg.go index 7bbf6aeb..f1f28660 100644 --- a/x/compliance/types/msg.go +++ b/x/compliance/types/msg.go @@ -5,80 +5,106 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -func NewMsgSetAddressInfo( - signer, userAddress, issuerAddress, issuerAlias, originChain string, - creationTimestamp uint32, - verificationType VerificationType, -) MsgSetAddressInfo { - adapterData := &IssuerAdapterContractDetail{ - IssuerAlias: issuerAlias, - ContractAddress: issuerAddress, +func NewSetIssuerDetailsMsg(operator sdk.Address, issuerAddress, issuerName, issuerDescription, issuerURL, issuerLogo, issuerLegalEntity string) MsgSetIssuerDetails { + issuerDetails := IssuerDetails{ + Name: issuerName, + Description: issuerDescription, + Url: issuerURL, + Logo: issuerLogo, + LegalEntity: issuerLegalEntity, + Operator: operator.Bytes(), } - - verificationEntry := &VerificationEntry{ - AdapterData: adapterData, - OriginChain: originChain, - IssuanceTimestamp: creationTimestamp, - ExpirationTimestamp: 0, - OriginalData: nil, + return MsgSetIssuerDetails{ + Operator: operator.String(), + IssuerAddress: issuerAddress, + Details: &issuerDetails, } +} - verificationData := &VerificationData{ - VerificationType: verificationType, - Entries: []*VerificationEntry{verificationEntry}, - } +func (msg *MsgSetIssuerDetails) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(msg) + return sdk.MustSortJSON(bz) +} - addressInfo := &AddressInfo{ - Address: userAddress, - IsVerified: true, - BanData: nil, - Verifications: []*VerificationData{verificationData}, +func (msg *MsgSetIssuerDetails) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Operator) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err) } - return MsgSetAddressInfo{ - Signer: signer, - Data: addressInfo, - UserAddress: userAddress, + _, err = sdk.AccAddressFromBech32(msg.IssuerAddress) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid issuer address (%s)", err) } + + return nil } -func (msg *MsgSetAddressInfo) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Signer) +func (msg *MsgSetIssuerDetails) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Operator) if err != nil { panic(err) } return []sdk.AccAddress{creator} } -func (msg *MsgSetAddressInfo) GetSignBytes() []byte { +func NewUpdateIssuerDetailsMsg(operator sdk.Address, issuerAddress, issuerName, issuerDescription, issuerURL, issuerLogo, issuerLegalEntity string) MsgUpdateIssuerDetails { + issuerDetails := IssuerDetails{ + Name: issuerName, + Description: issuerDescription, + Url: issuerURL, + Logo: issuerLogo, + LegalEntity: issuerLegalEntity, + Operator: operator.Bytes(), + } + return MsgUpdateIssuerDetails{ + Operator: operator.String(), + IssuerAddress: issuerAddress, + Details: &issuerDetails, + } +} + +func (msg *MsgUpdateIssuerDetails) GetSignBytes() []byte { bz := ModuleCdc.MustMarshalJSON(msg) return sdk.MustSortJSON(bz) } -func (msg *MsgSetAddressInfo) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Signer) +func (msg *MsgUpdateIssuerDetails) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Operator) if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err) } + + _, err = sdk.AccAddressFromBech32(msg.IssuerAddress) + if err != nil { + return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid issuer address (%s)", err) + } + return nil } -func NewSetIssuerDetailsMsg(signer, issuerAddress, issuerAlias string) MsgSetIssuerDetails { - issuerDetails := IssuerDetails{IssuerAlias: issuerAlias} - return MsgSetIssuerDetails{ - Signer: signer, +func (msg *MsgUpdateIssuerDetails) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Operator) + if err != nil { + panic(err) + } + return []sdk.AccAddress{creator} +} + +func NewRemoveIssuerDetailsMsg(operator sdk.Address, issuerAddress string) MsgRemoveIssuer { + return MsgRemoveIssuer{ + Operator: operator.String(), IssuerAddress: issuerAddress, - Details: &issuerDetails, } } -func (msg *MsgSetIssuerDetails) GetSignBytes() []byte { +func (msg *MsgRemoveIssuer) GetSignBytes() []byte { bz := ModuleCdc.MustMarshalJSON(msg) return sdk.MustSortJSON(bz) } -func (msg *MsgSetIssuerDetails) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Signer) +func (msg *MsgRemoveIssuer) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Operator) if err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid signer address (%s)", err) } @@ -91,8 +117,8 @@ func (msg *MsgSetIssuerDetails) ValidateBasic() error { return nil } -func (msg *MsgSetIssuerDetails) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Signer) +func (msg *MsgRemoveIssuer) GetSigners() []sdk.AccAddress { + creator, err := sdk.AccAddressFromBech32(msg.Operator) if err != nil { panic(err) } diff --git a/x/compliance/types/query.pb.go b/x/compliance/types/query.pb.go index 51f6b0c0..1db870ac 100644 --- a/x/compliance/types/query.pb.go +++ b/x/compliance/types/query.pb.go @@ -293,7 +293,7 @@ func (m *QueryIssuerDetailsResponse) GetDetails() *IssuerDetails { } type QueryVerificationDetailsRequest struct { - UserAddress string `protobuf:"bytes,1,opt,name=userAddress,proto3" json:"userAddress,omitempty"` + VerificationID string `protobuf:"bytes,1,opt,name=verificationID,proto3" json:"verificationID,omitempty"` } func (m *QueryVerificationDetailsRequest) Reset() { *m = QueryVerificationDetailsRequest{} } @@ -329,9 +329,9 @@ func (m *QueryVerificationDetailsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryVerificationDetailsRequest proto.InternalMessageInfo -func (m *QueryVerificationDetailsRequest) GetUserAddress() string { +func (m *QueryVerificationDetailsRequest) GetVerificationID() string { if m != nil { - return m.UserAddress + return m.VerificationID } return "" } @@ -396,42 +396,43 @@ func init() { } var fileDescriptor_f80d6bdaf4aa1245 = []byte{ - // 558 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x31, 0x6f, 0xd3, 0x4e, - 0x18, 0xc6, 0xe3, 0xbf, 0xda, 0x54, 0xff, 0x37, 0xea, 0x72, 0xad, 0x20, 0x58, 0xc8, 0x0d, 0x17, - 0x8a, 0xa0, 0x15, 0xbe, 0x26, 0x15, 0xb4, 0x03, 0x12, 0x4a, 0x81, 0xa1, 0x1b, 0xa4, 0x12, 0x03, - 0x12, 0xc3, 0x25, 0xb9, 0x5a, 0x27, 0x12, 0x9f, 0xeb, 0xbb, 0x00, 0x55, 0x94, 0x85, 0x8d, 0x0d, - 0x89, 0x91, 0x95, 0x99, 0xaf, 0xc0, 0xda, 0xb1, 0x12, 0x0b, 0x13, 0x42, 0x09, 0x1f, 0x04, 0xf5, - 0x7c, 0x16, 0x76, 0xe2, 0x8b, 0xda, 0x2d, 0x79, 0xf3, 0x3c, 0xcf, 0xfb, 0xbb, 0xdc, 0x63, 0x03, - 0x96, 0xef, 0xb8, 0x94, 0x2a, 0x16, 0x21, 0x7f, 0x43, 0xba, 0x62, 0x10, 0xf5, 0x39, 0x0d, 0xbb, - 0x8c, 0x9c, 0x0c, 0x59, 0x7c, 0xea, 0x47, 0xb1, 0x50, 0x02, 0x5d, 0xcb, 0x68, 0xfc, 0x7f, 0x1a, - 0x77, 0x3d, 0x10, 0x81, 0xd0, 0x12, 0x72, 0xf1, 0x29, 0x51, 0xbb, 0x37, 0x03, 0x21, 0x82, 0x3e, - 0x23, 0x34, 0xe2, 0x84, 0x86, 0xa1, 0x50, 0x54, 0x71, 0x11, 0x4a, 0xf3, 0xeb, 0x56, 0x57, 0xc8, - 0x81, 0x90, 0xa4, 0x43, 0xa5, 0x59, 0x42, 0xde, 0x36, 0x3a, 0x4c, 0xd1, 0x06, 0x89, 0x68, 0xc0, - 0x43, 0x2d, 0x36, 0xda, 0xba, 0x85, 0x2d, 0xa2, 0x31, 0x1d, 0xa4, 0x81, 0x9b, 0x16, 0x11, 0x0b, - 0x15, 0x57, 0x9c, 0x19, 0x19, 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bd, 0x0b, 0x7d, 0x74, 0xa0, - 0x9c, 0x5c, 0x3f, 0xda, 0xb2, 0x45, 0xcd, 0x37, 0xce, 0xdd, 0xbe, 0x94, 0x36, 0x81, 0xc6, 0x77, - 0x3e, 0xfc, 0xf8, 0xf3, 0xf9, 0xbf, 0x1a, 0xf2, 0xc8, 0xc2, 0x27, 0x01, 0x7d, 0x71, 0xa0, 0x92, - 0xb9, 0x7d, 0x44, 0x16, 0x2e, 0x99, 0xef, 0xa5, 0xbb, 0x73, 0x79, 0x83, 0x41, 0xbb, 0xa7, 0xd1, - 0xea, 0xe8, 0x96, 0x0d, 0x6d, 0x64, 0x9a, 0x3d, 0x46, 0xdf, 0x1c, 0x58, 0xcd, 0x5d, 0x3f, 0x6a, - 0x2c, 0x5c, 0x57, 0xd4, 0x56, 0xb7, 0x79, 0x15, 0x8b, 0x61, 0x7c, 0xa8, 0x19, 0x77, 0x90, 0x6f, - 0x63, 0x4c, 0xaa, 0x4e, 0x46, 0xb9, 0xca, 0x8f, 0xd1, 0x77, 0x07, 0xd6, 0x0a, 0x5a, 0x80, 0xf6, - 0x16, 0x32, 0xd8, 0x2b, 0xec, 0xee, 0x5f, 0xdd, 0x68, 0x8e, 0xf0, 0x40, 0x1f, 0x81, 0xa0, 0xfb, - 0xb6, 0x23, 0x98, 0x62, 0x92, 0x51, 0xe6, 0x81, 0x18, 0x1f, 0xec, 0x9f, 0x4d, 0x3c, 0xe7, 0x7c, - 0xe2, 0x39, 0xbf, 0x27, 0x9e, 0xf3, 0x69, 0xea, 0x95, 0xce, 0xa7, 0x5e, 0xe9, 0xe7, 0xd4, 0x2b, - 0xbd, 0xf2, 0xb2, 0x39, 0xef, 0xb3, 0x49, 0xea, 0x34, 0x62, 0xb2, 0x53, 0xd6, 0xaf, 0xcb, 0xdd, - 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe4, 0xc7, 0x7b, 0xd4, 0x18, 0x06, 0x00, 0x00, + // 561 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x4f, 0x6b, 0x13, 0x41, + 0x18, 0xc6, 0xb3, 0xd2, 0x3f, 0xf8, 0x96, 0x7a, 0x98, 0x16, 0x8d, 0x8b, 0x6c, 0xe3, 0xc4, 0x16, + 0x6d, 0x21, 0x93, 0xa4, 0x60, 0x73, 0x10, 0x24, 0xa5, 0x1e, 0x72, 0xd3, 0x14, 0x3c, 0x08, 0x1e, + 0x26, 0xc9, 0x74, 0x19, 0x4c, 0x76, 0xb6, 0x3b, 0x93, 0x6a, 0x09, 0xb9, 0x78, 0xf3, 0x26, 0x78, + 0xf4, 0x03, 0x78, 0xf3, 0x43, 0x78, 0xea, 0xb1, 0xe0, 0xc5, 0x93, 0x48, 0xe2, 0x07, 0x91, 0xce, + 0xce, 0xe2, 0x6e, 0xb2, 0x13, 0xda, 0x5b, 0xf2, 0xee, 0xf3, 0x3c, 0xef, 0x6f, 0x92, 0x67, 0x16, + 0xb0, 0x7c, 0xcf, 0xa5, 0x54, 0x91, 0x08, 0xf8, 0x3b, 0xd2, 0x15, 0x83, 0xb0, 0xcf, 0x69, 0xd0, + 0x65, 0xe4, 0x74, 0xc8, 0xa2, 0xf3, 0x4a, 0x18, 0x09, 0x25, 0xd0, 0xdd, 0x94, 0xa6, 0xf2, 0x5f, + 0xe3, 0x6e, 0xfa, 0xc2, 0x17, 0x5a, 0x42, 0xae, 0x3e, 0xc5, 0x6a, 0xf7, 0x81, 0x2f, 0x84, 0xdf, + 0x67, 0x84, 0x86, 0x9c, 0xd0, 0x20, 0x10, 0x8a, 0x2a, 0x2e, 0x02, 0x69, 0x9e, 0xee, 0x76, 0x85, + 0x1c, 0x08, 0x49, 0x3a, 0x54, 0x9a, 0x25, 0xe4, 0xac, 0xd6, 0x61, 0x8a, 0xd6, 0x48, 0x48, 0x7d, + 0x1e, 0x68, 0xb1, 0xd1, 0x96, 0x2d, 0x6c,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, 0xff, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa4, 0xe5, 0xa3, 0x77, 0x21, 0x06, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -830,10 +831,10 @@ func (m *QueryVerificationDetailsRequest) MarshalToSizedBuffer(dAtA []byte) (int _ = i var l int _ = l - if len(m.UserAddress) > 0 { - i -= len(m.UserAddress) - copy(dAtA[i:], m.UserAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.UserAddress))) + if len(m.VerificationID) > 0 { + i -= len(m.VerificationID) + copy(dAtA[i:], m.VerificationID) + i = encodeVarintQuery(dAtA, i, uint64(len(m.VerificationID))) i-- dAtA[i] = 0xa } @@ -964,7 +965,7 @@ func (m *QueryVerificationDetailsRequest) Size() (n int) { } var l int _ = l - l = len(m.UserAddress) + l = len(m.VerificationID) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -1490,7 +1491,7 @@ func (m *QueryVerificationDetailsRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VerificationID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1518,7 +1519,7 @@ func (m *QueryVerificationDetailsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UserAddress = string(dAtA[iNdEx:postIndex]) + m.VerificationID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/compliance/types/query.pb.gw.go b/x/compliance/types/query.pb.gw.go index 307cd3a1..d932ab19 100644 --- a/x/compliance/types/query.pb.gw.go +++ b/x/compliance/types/query.pb.gw.go @@ -170,15 +170,15 @@ func request_Query_VerificationDetails_0(ctx context.Context, marshaler runtime. _ = err ) - val, ok = pathParams["userAddress"] + val, ok = pathParams["verificationID"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userAddress") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "verificationID") } - protoReq.UserAddress, err = runtime.String(val) + protoReq.VerificationID, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userAddress", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "verificationID", err) } msg, err := client.VerificationDetails(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -197,15 +197,15 @@ func local_request_Query_VerificationDetails_0(ctx context.Context, marshaler ru _ = err ) - val, ok = pathParams["userAddress"] + val, ok = pathParams["verificationID"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "userAddress") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "verificationID") } - protoReq.UserAddress, err = runtime.String(val) + protoReq.VerificationID, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "userAddress", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "verificationID", err) } msg, err := server.VerificationDetails(ctx, &protoReq) @@ -442,7 +442,7 @@ var ( pattern_Query_IssuerDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"swisstronik", "compliance", "issuer", "issuerAddress"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_VerificationDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"swisstronik", "compliance", "details", "userAddress"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_VerificationDetails_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"swisstronik", "compliance", "details", "verificationID"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/compliance/types/tx.pb.go b/x/compliance/types/tx.pb.go index 3e21db88..08ae06e6 100644 --- a/x/compliance/types/tx.pb.go +++ b/x/compliance/types/tx.pb.go @@ -30,8 +30,9 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgSetIssuerDetails struct { - Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` - Details *IssuerDetails `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"` + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + IssuerAddress string `protobuf:"bytes,2,opt,name=issuerAddress,proto3" json:"issuerAddress,omitempty"` + Details *IssuerDetails `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` } func (m *MsgSetIssuerDetails) Reset() { *m = MsgSetIssuerDetails{} } @@ -74,6 +75,13 @@ func (m *MsgSetIssuerDetails) GetOperator() string { return "" } +func (m *MsgSetIssuerDetails) GetIssuerAddress() string { + if m != nil { + return m.IssuerAddress + } + return "" +} + func (m *MsgSetIssuerDetails) GetDetails() *IssuerDetails { if m != nil { return m.Details @@ -118,8 +126,9 @@ func (m *MsgSetIssuerDetailsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSetIssuerDetailsResponse proto.InternalMessageInfo type MsgUpdateIssuerDetails struct { - Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` - Details *IssuerDetails `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"` + Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` + IssuerAddress string `protobuf:"bytes,2,opt,name=issuerAddress,proto3" json:"issuerAddress,omitempty"` + Details *IssuerDetails `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"` } func (m *MsgUpdateIssuerDetails) Reset() { *m = MsgUpdateIssuerDetails{} } @@ -162,6 +171,13 @@ func (m *MsgUpdateIssuerDetails) GetOperator() string { return "" } +func (m *MsgUpdateIssuerDetails) GetIssuerAddress() string { + if m != nil { + return m.IssuerAddress + } + return "" +} + func (m *MsgUpdateIssuerDetails) GetDetails() *IssuerDetails { if m != nil { return m.Details @@ -305,30 +321,32 @@ func init() { func init() { proto.RegisterFile("swisstronik/compliance/tx.proto", fileDescriptor_b617e43f088d8eed) } var fileDescriptor_b617e43f088d8eed = []byte{ - // 365 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x93, 0xbf, 0x4e, 0xc2, 0x50, - 0x14, 0xc6, 0x29, 0x26, 0x2a, 0x47, 0x8d, 0xa6, 0x18, 0xc4, 0x1a, 0xaf, 0xa4, 0x91, 0x48, 0x62, - 0xd2, 0x06, 0x48, 0x8c, 0x9b, 0xd1, 0xb8, 0x38, 0x74, 0x29, 0x71, 0x71, 0xb2, 0xb4, 0x27, 0xcd, - 0x8d, 0xd0, 0xdb, 0xf4, 0x5c, 0x10, 0x07, 0xdf, 0xc1, 0xc7, 0x72, 0x64, 0x74, 0x70, 0x30, 0xf0, - 0x22, 0x46, 0x0a, 0x48, 0xb5, 0x10, 0x59, 0xdc, 0xee, 0x9f, 0xdf, 0xfd, 0xbe, 0xef, 0x9e, 0x93, - 0x03, 0x47, 0xf4, 0xc8, 0x89, 0x64, 0x24, 0x02, 0xfe, 0x60, 0xba, 0xa2, 0x1d, 0xb6, 0xb8, 0x13, - 0xb8, 0x68, 0xca, 0x9e, 0x11, 0x46, 0x42, 0x0a, 0xb5, 0x30, 0x03, 0x18, 0xdf, 0x80, 0xb6, 0xeb, - 0x0b, 0x5f, 0x8c, 0x10, 0xf3, 0x6b, 0x15, 0xd3, 0x1a, 0x73, 0x05, 0xb5, 0x05, 0x99, 0x4d, 0x87, - 0xd0, 0xec, 0x56, 0x9b, 0x28, 0x9d, 0xaa, 0xe9, 0x0a, 0x1e, 0x8c, 0xef, 0xc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3e, 0x06, 0x4c, 0x79, 0x19, 0xb2, 0x4c, 0x7f, 0xc8, 0x32, 0x6f, 0x43, 0x96, - 0xb9, 0x63, 0xb3, 0xb3, 0xd3, 0x4b, 0x0c, 0xeb, 0x53, 0x88, 0xd4, 0x5c, 0x1d, 0xcd, 0x4e, 0xfd, - 0x33, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x14, 0x62, 0xf0, 0xd3, 0x03, 0x00, 0x00, + // 386 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0x3f, 0x4b, 0xfb, 0x40, + 0x18, 0xc7, 0x7b, 0x2d, 0xfc, 0x7e, 0x7a, 0x22, 0x42, 0x94, 0xda, 0x46, 0x3c, 0x4b, 0xb0, 0x58, + 0x10, 0x12, 0xda, 0x82, 0xb8, 0x89, 0xe2, 0xa0, 0x43, 0x96, 0x14, 0x17, 0xb7, 0x34, 0x79, 0x08, + 0x87, 0x6d, 0x2e, 0xe4, 0x39, 0x6b, 0x75, 0xf5, 0x0d, 0x38, 0x0a, 0xbe, 0x21, 0xc7, 0x8e, 0x8e, + 0xd2, 0xbe, 0x08, 0x57, 0x31, 0x69, 0x6a, 0xa3, 0x69, 0xb1, 0xb8, 0xb8, 0xe5, 0xcf, 0x27, 0xdf, + 0xef, 0xe7, 0xf2, 0x70, 0x47, 0x77, 0xf0, 0x86, 0x23, 0xca, 0x50, 0xf8, 0xfc, 0xca, 0x70, 0x44, + 0x37, 0xe8, 0x70, 0xdb, 0x77, 0xc0, 0x90, 0x7d, 0x3d, 0x08, 0x85, 0x14, 0x4a, 0x71, 0x0a, 0xd0, + 0x3f, 0x01, 0x75, 0xc3, 0x13, 0x9e, 0x88, 0x10, 0xe3, 0xe3, 0x2a, 0xa6, 0x55, 0xe6, 0x08, 0xec, + 0x0a, 0x34, 0xda, 0x36, 0x82, 0xd1, 0xab, 0xb7, 0x41, 0xda, 0x75, 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12, 0xa9, 0x9f, 0xbf, 0x37, 0x27, 0x6d, 0x1a, 0x54, 0x8d, 0x1f, 0x82, 0x49, 0xdf, 0xc9, + 0xe1, 0xf3, 0x90, 0x91, 0xc1, 0x90, 0x91, 0xd7, 0x21, 0x23, 0x0f, 0x23, 0x96, 0x1b, 0x8c, 0x58, + 0xee, 0x65, 0xc4, 0x72, 0x97, 0x6c, 0x7a, 0x93, 0xf6, 0x53, 0xa7, 0xc2, 0x6d, 0x00, 0xd8, 0xfe, + 0x17, 0x6d, 0xd2, 0xe6, 0x7b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x05, 0x73, 0x2a, 0x3c, 0x04, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -343,9 +361,9 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { - SetIssuerDetails(ctx context.Context, in *MsgSetIssuerDetails, opts ...grpc.CallOption) (*MsgSetIssuerDetailsResponse, error) - UpdateIssuerDetails(ctx context.Context, in *MsgUpdateIssuerDetails, opts ...grpc.CallOption) (*MsgUpdateIssuerDetailsResponse, error) - RemoveIssuer(ctx context.Context, in *MsgRemoveIssuer, opts ...grpc.CallOption) (*MsgRemoveIssuer, error) + HandleSetIssuerDetails(ctx context.Context, in *MsgSetIssuerDetails, opts ...grpc.CallOption) (*MsgSetIssuerDetailsResponse, error) + HandleUpdateIssuerDetails(ctx context.Context, in *MsgUpdateIssuerDetails, opts ...grpc.CallOption) (*MsgUpdateIssuerDetailsResponse, error) + HandleRemoveIssuer(ctx context.Context, in *MsgRemoveIssuer, opts ...grpc.CallOption) (*MsgRemoveIssuerResponse, error) } type msgClient struct { @@ -356,27 +374,27 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) SetIssuerDetails(ctx context.Context, in *MsgSetIssuerDetails, opts ...grpc.CallOption) (*MsgSetIssuerDetailsResponse, error) { +func (c *msgClient) HandleSetIssuerDetails(ctx context.Context, in *MsgSetIssuerDetails, opts ...grpc.CallOption) (*MsgSetIssuerDetailsResponse, error) { out := new(MsgSetIssuerDetailsResponse) - err := c.cc.Invoke(ctx, "/swisstronik.compliance.Msg/SetIssuerDetails", in, out, opts...) + err := c.cc.Invoke(ctx, "/swisstronik.compliance.Msg/HandleSetIssuerDetails", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) UpdateIssuerDetails(ctx context.Context, in *MsgUpdateIssuerDetails, opts ...grpc.CallOption) (*MsgUpdateIssuerDetailsResponse, error) { +func (c *msgClient) HandleUpdateIssuerDetails(ctx context.Context, in *MsgUpdateIssuerDetails, opts ...grpc.CallOption) (*MsgUpdateIssuerDetailsResponse, error) { out := new(MsgUpdateIssuerDetailsResponse) - err := c.cc.Invoke(ctx, "/swisstronik.compliance.Msg/UpdateIssuerDetails", in, out, opts...) + err := c.cc.Invoke(ctx, "/swisstronik.compliance.Msg/HandleUpdateIssuerDetails", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) RemoveIssuer(ctx context.Context, in *MsgRemoveIssuer, opts ...grpc.CallOption) (*MsgRemoveIssuer, error) { - out := new(MsgRemoveIssuer) - err := c.cc.Invoke(ctx, "/swisstronik.compliance.Msg/RemoveIssuer", in, out, opts...) +func (c *msgClient) HandleRemoveIssuer(ctx context.Context, in *MsgRemoveIssuer, opts ...grpc.CallOption) (*MsgRemoveIssuerResponse, error) { + out := new(MsgRemoveIssuerResponse) + err := c.cc.Invoke(ctx, "/swisstronik.compliance.Msg/HandleRemoveIssuer", in, out, opts...) if err != nil { return nil, err } @@ -385,79 +403,79 @@ func (c *msgClient) RemoveIssuer(ctx context.Context, in *MsgRemoveIssuer, opts // MsgServer is the server API for Msg service. type MsgServer interface { - SetIssuerDetails(context.Context, *MsgSetIssuerDetails) (*MsgSetIssuerDetailsResponse, error) - UpdateIssuerDetails(context.Context, *MsgUpdateIssuerDetails) (*MsgUpdateIssuerDetailsResponse, error) - RemoveIssuer(context.Context, *MsgRemoveIssuer) (*MsgRemoveIssuer, error) + HandleSetIssuerDetails(context.Context, *MsgSetIssuerDetails) (*MsgSetIssuerDetailsResponse, error) + HandleUpdateIssuerDetails(context.Context, *MsgUpdateIssuerDetails) (*MsgUpdateIssuerDetailsResponse, error) + HandleRemoveIssuer(context.Context, *MsgRemoveIssuer) (*MsgRemoveIssuerResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) SetIssuerDetails(ctx context.Context, req *MsgSetIssuerDetails) (*MsgSetIssuerDetailsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetIssuerDetails not implemented") +func (*UnimplementedMsgServer) HandleSetIssuerDetails(ctx context.Context, req *MsgSetIssuerDetails) (*MsgSetIssuerDetailsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HandleSetIssuerDetails not implemented") } -func (*UnimplementedMsgServer) UpdateIssuerDetails(ctx context.Context, req *MsgUpdateIssuerDetails) (*MsgUpdateIssuerDetailsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateIssuerDetails not implemented") +func (*UnimplementedMsgServer) HandleUpdateIssuerDetails(ctx context.Context, req *MsgUpdateIssuerDetails) (*MsgUpdateIssuerDetailsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HandleUpdateIssuerDetails not implemented") } -func (*UnimplementedMsgServer) RemoveIssuer(ctx context.Context, req *MsgRemoveIssuer) (*MsgRemoveIssuer, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveIssuer not implemented") +func (*UnimplementedMsgServer) HandleRemoveIssuer(ctx context.Context, req *MsgRemoveIssuer) (*MsgRemoveIssuerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method HandleRemoveIssuer not implemented") } func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } -func _Msg_SetIssuerDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Msg_HandleSetIssuerDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgSetIssuerDetails) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).SetIssuerDetails(ctx, in) + return srv.(MsgServer).HandleSetIssuerDetails(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/swisstronik.compliance.Msg/SetIssuerDetails", + FullMethod: "/swisstronik.compliance.Msg/HandleSetIssuerDetails", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetIssuerDetails(ctx, req.(*MsgSetIssuerDetails)) + return srv.(MsgServer).HandleSetIssuerDetails(ctx, req.(*MsgSetIssuerDetails)) } return interceptor(ctx, in, info, handler) } -func _Msg_UpdateIssuerDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Msg_HandleUpdateIssuerDetails_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateIssuerDetails) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).UpdateIssuerDetails(ctx, in) + return srv.(MsgServer).HandleUpdateIssuerDetails(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/swisstronik.compliance.Msg/UpdateIssuerDetails", + FullMethod: "/swisstronik.compliance.Msg/HandleUpdateIssuerDetails", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateIssuerDetails(ctx, req.(*MsgUpdateIssuerDetails)) + return srv.(MsgServer).HandleUpdateIssuerDetails(ctx, req.(*MsgUpdateIssuerDetails)) } return interceptor(ctx, in, info, handler) } -func _Msg_RemoveIssuer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Msg_HandleRemoveIssuer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRemoveIssuer) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).RemoveIssuer(ctx, in) + return srv.(MsgServer).HandleRemoveIssuer(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/swisstronik.compliance.Msg/RemoveIssuer", + FullMethod: "/swisstronik.compliance.Msg/HandleRemoveIssuer", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RemoveIssuer(ctx, req.(*MsgRemoveIssuer)) + return srv.(MsgServer).HandleRemoveIssuer(ctx, req.(*MsgRemoveIssuer)) } return interceptor(ctx, in, info, handler) } @@ -467,16 +485,16 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "SetIssuerDetails", - Handler: _Msg_SetIssuerDetails_Handler, + MethodName: "HandleSetIssuerDetails", + Handler: _Msg_HandleSetIssuerDetails_Handler, }, { - MethodName: "UpdateIssuerDetails", - Handler: _Msg_UpdateIssuerDetails_Handler, + MethodName: "HandleUpdateIssuerDetails", + Handler: _Msg_HandleUpdateIssuerDetails_Handler, }, { - MethodName: "RemoveIssuer", - Handler: _Msg_RemoveIssuer_Handler, + MethodName: "HandleRemoveIssuer", + Handler: _Msg_HandleRemoveIssuer_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -513,6 +531,13 @@ func (m *MsgSetIssuerDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x1a + } + if len(m.IssuerAddress) > 0 { + i -= len(m.IssuerAddress) + copy(dAtA[i:], m.IssuerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.IssuerAddress))) + i-- dAtA[i] = 0x12 } if len(m.Operator) > 0 { @@ -578,6 +603,13 @@ func (m *MsgUpdateIssuerDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintTx(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x1a + } + if len(m.IssuerAddress) > 0 { + i -= len(m.IssuerAddress) + copy(dAtA[i:], m.IssuerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.IssuerAddress))) + i-- dAtA[i] = 0x12 } if len(m.Operator) > 0 { @@ -694,6 +726,10 @@ func (m *MsgSetIssuerDetails) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.IssuerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } if m.Details != nil { l = m.Details.Size() n += 1 + l + sovTx(uint64(l)) @@ -720,6 +756,10 @@ func (m *MsgUpdateIssuerDetails) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.IssuerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } if m.Details != nil { l = m.Details.Size() n += 1 + l + sovTx(uint64(l)) @@ -830,6 +870,38 @@ func (m *MsgSetIssuerDetails) Unmarshal(dAtA []byte) error { m.Operator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IssuerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IssuerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) } @@ -998,6 +1070,38 @@ func (m *MsgUpdateIssuerDetails) Unmarshal(dAtA []byte) error { m.Operator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IssuerAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IssuerAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) }