diff --git a/.changeset/entries/2021-07-27T07:01:46Z.yaml b/.changeset/entries/2021-07-27T07:01:46Z.yaml new file mode 100644 index 0000000000..081471df50 --- /dev/null +++ b/.changeset/entries/2021-07-27T07:01:46Z.yaml @@ -0,0 +1,5 @@ +type: changed +module: x/profiles +pull_request: 539 +description: Made profiles query user parameter optional +backward_compatible: true diff --git a/docs/developers/queries/profiles/application-links.md b/docs/developers/queries/profiles/application-links.md new file mode 100644 index 0000000000..badde7c3ab --- /dev/null +++ b/docs/developers/queries/profiles/application-links.md @@ -0,0 +1,11 @@ +## Query application links +This query allows you to retrieve the application links with the optional user `address`. + +**CLI** +```bash +desmos query profiles app-links [[address]] + +# Example +# desmos query app-links +# desmos query app-links desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud +``` \ No newline at end of file diff --git a/docs/developers/queries/profiles/blocks.md b/docs/developers/queries/profiles/blocks.md new file mode 100644 index 0000000000..74d3a82c2f --- /dev/null +++ b/docs/developers/queries/profiles/blocks.md @@ -0,0 +1,11 @@ +## Query blocked users +This query allows you to retrieve the user blocked list with the optional user `address`. + +**CLI** +```bash +desmos query profiles blocks [[address]] [[subspace]] + +# Example +# desmos query profiles blocks +# desmos query profiles blocks desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud +``` \ No newline at end of file diff --git a/docs/developers/queries/profiles/chain-links.md b/docs/developers/queries/profiles/chain-links.md new file mode 100644 index 0000000000..323d69f683 --- /dev/null +++ b/docs/developers/queries/profiles/chain-links.md @@ -0,0 +1,11 @@ +## Query chain links +This query allows you to retrieve the chain links with the optional user `address`. + +**CLI** +```bash +desmos query profiles chain-links [[address]] + +# Example +# desmos query chain-links +# desmos query chain-links desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud +``` \ No newline at end of file diff --git a/docs/developers/queries/profiles/incoming-dtag-requests.md b/docs/developers/queries/profiles/incoming-dtag-requests.md new file mode 100644 index 0000000000..53dac7f829 --- /dev/null +++ b/docs/developers/queries/profiles/incoming-dtag-requests.md @@ -0,0 +1,11 @@ +## Query incoming DTag requests +This query allows you to retrieve the DTag requests with the optional user `address`. + +**CLI** +```bash +desmos query profiles incoming-dtag-transfer-requests [[address]] + +# Example +# desmos query profiles incoming-dtag-transfer-requests +# desmos query profiles incoming-dtag-transfer-requests desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud +``` \ No newline at end of file diff --git a/docs/developers/queries/profiles/relationships.md b/docs/developers/queries/profiles/relationships.md new file mode 100644 index 0000000000..169663eb36 --- /dev/null +++ b/docs/developers/queries/profiles/relationships.md @@ -0,0 +1,11 @@ +## Query relationships +This query allows you to retrieve the relationships with the optional creator `address`. + +**CLI** +```bash +desmos query profiles relationships [[address]] + +# Example +# desmos query relationships +# desmos query relationships desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud +``` \ No newline at end of file diff --git a/docs/developers/queries/profiles/user-blocks.md b/docs/developers/queries/profiles/user-blocks.md deleted file mode 100644 index 9160eb6eff..0000000000 --- a/docs/developers/queries/profiles/user-blocks.md +++ /dev/null @@ -1,10 +0,0 @@ -## Query user blocked users -This query allows you to retrieve the user blocked by the user with the given `address`. - -**CLI** -```bash -desmos query profiles blocks [address] [[subspace]] - -# Example -# desmos query profiles blocks desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud -``` \ No newline at end of file diff --git a/docs/developers/queries/profiles/user-dtag-requests.md b/docs/developers/queries/profiles/user-dtag-requests.md deleted file mode 100644 index bd00e32ea8..0000000000 --- a/docs/developers/queries/profiles/user-dtag-requests.md +++ /dev/null @@ -1,10 +0,0 @@ -## Query user's DTag requests -This query allows you to retrieve the DTag requests of the user with the given `address`. - -**CLI** -```bash -desmos query profiles incoming-dtag-transfer-requests [address] - -# Example -# desmos query profiles incoming-dtag-transfer-requests desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud -``` \ No newline at end of file diff --git a/docs/developers/queries/profiles/user-relationships.md b/docs/developers/queries/profiles/user-relationships.md deleted file mode 100644 index 662c290215..0000000000 --- a/docs/developers/queries/profiles/user-relationships.md +++ /dev/null @@ -1,10 +0,0 @@ -## Query user relationships -This query allows you to retrieve the details of a relationship where the creator has the given `address`. - -**CLI** -```bash -desmos query profiles relationships [address] - -# Example -# desmos query relationships user desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud -``` \ No newline at end of file diff --git a/docs/developers/query-data.md b/docs/developers/query-data.md index 349147b80d..b2f46935db 100644 --- a/docs/developers/query-data.md +++ b/docs/developers/query-data.md @@ -8,9 +8,11 @@ read the data stored inside it. Here you will find a list of all the query endpo ## Profiles - [Query the stored profiles](queries/profiles/profile.md) -- [Query all the DTag transfer requests](queries/profiles/user-dtag-requests.md) -- [Query user's relationships](queries/profiles/user-relationships.md) -- [Query user's blocked users](queries/profiles/user-blocks.md) +- [Query incoming DTag transfer requests](queries/profiles/incoming-dtag-requests.md) +- [Query relationships](queries/profiles/relationships.md) +- [Query blocked users](queries/profiles/blocks.md) +- [Query chain links](queries/profiles/chain-links.md) +- [Query application links](queries/profiles/application-links.md) ## Posts diff --git a/proto/desmos/profiles/v1beta1/query.proto b/proto/desmos/profiles/v1beta1/query.proto index 43aa9738d0..9467d6e776 100644 --- a/proto/desmos/profiles/v1beta1/query.proto +++ b/proto/desmos/profiles/v1beta1/query.proto @@ -37,23 +37,24 @@ service Query { option (google.api.http).get = "/desmos/profiles/v1beta1/params"; } - // UserRelationships queries the relationships for the user having the given - // address - rpc UserRelationships(QueryUserRelationshipsRequest) - returns (QueryUserRelationshipsResponse) { + // Relationships queries all relationships for the given user, if provided. + // Otherwise, it queries all the relationships stored. + rpc Relationships(QueryRelationshipsRequest) + returns (QueryRelationshipsResponse) { option (google.api.http).get = "/desmos/relationships/v1beta1/relationships/{user}"; } - // UserBlocks queries the user blocks for the user having the given address - rpc UserBlocks(QueryUserBlocksRequest) returns (QueryUserBlocksResponse) { + // Blocks queries the blocks for the given user, if provided. + // Otherwise, it queries all the stored blocks. + rpc Blocks(QueryBlocksRequest) returns (QueryBlocksResponse) { option (google.api.http).get = "/desmos/relationships/v1beta1/blocks/{user}"; } - // UserChainLinks queries chain links for the given user - rpc UserChainLinks(QueryUserChainLinksRequest) - returns (QueryUserChainLinksResponse) { + // ChainLinks queries the chain links associated to the given user, if provided. + // Otherwise it queries all the chain links stored. + rpc ChainLinks(QueryChainLinksRequest) returns (QueryChainLinksResponse) { option (google.api.http).get = "/desmos/profiles/v1beta1/chain-links/{user}"; } @@ -66,9 +67,10 @@ service Query { "/desmos/profiles/v1beta1/chain-links/{user}/{chain_name}/{target}"; } - // UserApplicationLinks queries application links for the given user - rpc UserApplicationLinks(QueryUserApplicationLinksRequest) - returns (QueryUserApplicationLinksResponse) { + // ApplicationLinks queries the applications links associated to the given user, if provided. + // Otherwise, it queries all the application links stored. + rpc ApplicationLinks(QueryApplicationLinksRequest) + returns (QueryApplicationLinksResponse) { option (google.api.http).get = "/desmos/profiles/v1beta1/app-links/{user}"; } diff --git a/proto/desmos/profiles/v1beta1/query_app_links.proto b/proto/desmos/profiles/v1beta1/query_app_links.proto index b7c961e406..b019c4fce7 100644 --- a/proto/desmos/profiles/v1beta1/query_app_links.proto +++ b/proto/desmos/profiles/v1beta1/query_app_links.proto @@ -30,18 +30,18 @@ message QueryUserApplicationLinkResponse { ApplicationLink link = 1 [ (gogoproto.nullable) = false ]; } -// QueryUserApplicationLinksRequest represents the request used when querying +// QueryApplicationLinksRequest represents the request used when querying // the application links of a specific user -message QueryUserApplicationLinksRequest { +message QueryApplicationLinksRequest { string user = 1; // Pagination defines an optional pagination for the request cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryUserApplicationLinksResponse represents the response to the query used +// QueryApplicationLinksResponse represents the response to the query used // to get the application links for a specific user -message QueryUserApplicationLinksResponse { +message QueryApplicationLinksResponse { repeated ApplicationLink links = 1 [ (gogoproto.nullable) = false ]; // Pagination defines the pagination response diff --git a/proto/desmos/profiles/v1beta1/query_chain_links.proto b/proto/desmos/profiles/v1beta1/query_chain_links.proto index 9d68fb7536..59d870c476 100644 --- a/proto/desmos/profiles/v1beta1/query_chain_links.proto +++ b/proto/desmos/profiles/v1beta1/query_chain_links.proto @@ -28,18 +28,18 @@ message QueryUserChainLinkResponse { ChainLink link = 1 [ (gogoproto.nullable) = false ]; } -// QueryUserChainLinksRequest is the request type for the -// Query/UserChainLinks RPC endpoint -message QueryUserChainLinksRequest { +// QueryChainLinksRequest is the request type for the +// Query/ChainLinks RPC endpoint +message QueryChainLinksRequest { string user = 1; // Pagination defines an optional pagination for the request cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryUserChainLinksResponse is the response type for the -// Query/UserChainLinks RPC method. -message QueryUserChainLinksResponse { +// QueryChainLinksResponse is the response type for the +// Query/ChainLinks RPC method. +message QueryChainLinksResponse { repeated ChainLink links = 1 [ (gogoproto.nullable) = false ]; // Pagination defines the pagination response diff --git a/proto/desmos/profiles/v1beta1/query_relationships.proto b/proto/desmos/profiles/v1beta1/query_relationships.proto index 1138da44e7..f65bbcfd8a 100644 --- a/proto/desmos/profiles/v1beta1/query_relationships.proto +++ b/proto/desmos/profiles/v1beta1/query_relationships.proto @@ -10,9 +10,9 @@ import "cosmos/base/query/v1beta1/pagination.proto"; option go_package = "github.com/desmos-labs/desmos/x/profiles/types"; -// QueryUserRelationshipsRequest is the request type for the -// Query/UserRelationships RPC method. -message QueryUserRelationshipsRequest { +// QueryRelationshipsRequest is the request type for the +// Query/Relationships RPC method. +message QueryRelationshipsRequest { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; @@ -26,25 +26,21 @@ message QueryUserRelationshipsRequest { cosmos.base.query.v1beta1.PageRequest pagination = 3; } -// QueryUserRelationshipsResponse is the response type for the -// Query/UserRelationships RPC method. -message QueryUserRelationshipsResponse { - string user = 1; - - // relationships represent the list of all the relationships for the queried - // user - repeated desmos.profiles.v1beta1.Relationship relationships = 2 +// QueryRelationshipsResponse is the response type for the +// Query/Relationships RPC method. +message QueryRelationshipsResponse { + repeated desmos.profiles.v1beta1.Relationship relationships = 1 [ (gogoproto.nullable) = false ]; // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageResponse pagination = 3; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // ___________________________________________________________________________________________________________________ -// QueryUserBlocksRequest is the request type for the Query/UserBlocks RPC +// QueryBlocksRequest is the request type for the Query/Blocks RPC // endpoint -message QueryUserBlocksRequest { +message QueryBlocksRequest { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; @@ -54,10 +50,9 @@ message QueryUserBlocksRequest { cosmos.base.query.v1beta1.PageRequest pagination = 3; } -// QueryUserBlocksResponse is the response type for the Query/UserBlocks RPC +// QueryBlocksResponse is the response type for the Query/Blocks RPC // method. -message QueryUserBlocksResponse { - // blocks represent the list of all the blocks for the queried user +message QueryBlocksResponse { repeated desmos.profiles.v1beta1.UserBlock blocks = 1 [ (gogoproto.nullable) = false ]; cosmos.base.query.v1beta1.PageResponse pagination = 2; diff --git a/x/profiles/client/cli/cli_app_links.go b/x/profiles/client/cli/cli_app_links.go index 2ff3e23fda..2d19a18c3e 100644 --- a/x/profiles/client/cli/cli_app_links.go +++ b/x/profiles/client/cli/cli_app_links.go @@ -136,12 +136,12 @@ func GetCmdUnlinkApplication() *cobra.Command { // ------------------------------------------------------------------------------------------------------------------- -// GetCmdQueryUserApplicationsLinks returns the command allowing to query the application links associated with a profile -func GetCmdQueryUserApplicationsLinks() *cobra.Command { +// GetCmdQueryApplicationsLinks returns the command allowing to query the application links, optionally associated with a user +func GetCmdQueryApplicationsLinks() *cobra.Command { cmd := &cobra.Command{ - Use: "app-links [user]", - Short: "Get all the application links associated to the given username with optional pagination", - Args: cobra.ExactArgs(1), + Use: "app-links [[user]]", + Short: "Get all the application links with optional user address and pagination", + Args: cobra.RangeArgs(0, 1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -149,14 +149,19 @@ func GetCmdQueryUserApplicationsLinks() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) + var user string + if len(args) == 1 { + user = args[0] + } + pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { return err } - res, err := queryClient.UserApplicationLinks( + res, err := queryClient.ApplicationLinks( context.Background(), - &types.QueryUserApplicationLinksRequest{User: args[0], Pagination: pageReq}, + &types.QueryApplicationLinksRequest{User: user, Pagination: pageReq}, ) if err != nil { return err diff --git a/x/profiles/client/cli/cli_app_links_test.go b/x/profiles/client/cli/cli_app_links_test.go index 84f796ee3f..113b0c174d 100644 --- a/x/profiles/client/cli/cli_app_links_test.go +++ b/x/profiles/client/cli/cli_app_links_test.go @@ -14,33 +14,57 @@ import ( "github.com/desmos-labs/desmos/x/profiles/types" ) -func (s *IntegrationTestSuite) TestCmdQueryUserApplicationsLinks() { +func (s *IntegrationTestSuite) TestCmdQueryApplicationsLinks() { val := s.network.Validators[0] testCases := []struct { name string args []string expectErr bool - expectedOutput types.QueryUserApplicationLinksResponse + expectedOutput types.QueryApplicationLinksResponse }{ { - name: "no links found", + name: "existing links are returned properly", + args: []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + expectErr: false, + expectedOutput: types.QueryApplicationLinksResponse{ + Links: []types.ApplicationLink{ + types.NewApplicationLink( + "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", + types.NewData("reddit", "reddit-user"), + types.ApplicationLinkStateInitialized, + types.NewOracleRequest( + -1, + 1, + types.NewOracleRequestCallData("twitter", "call_data"), + "client_id", + ), + nil, + time.Date(2020, 1, 1, 00, 00, 00, 000, time.UTC), + ), + }, + }, + }, + { + name: "existing links of the given user address are not found", args: []string{ "cosmos122u6u9gpdr2rp552fkkvlgyecjlmtqhkascl5a", fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserApplicationLinksResponse{ + expectedOutput: types.QueryApplicationLinksResponse{ Links: []types.ApplicationLink{}, }, }, { - name: "existing link is returned properly", + name: "existing links of the given user are returned properly", args: []string{ "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserApplicationLinksResponse{ + expectedOutput: types.QueryApplicationLinksResponse{ Links: []types.ApplicationLink{ types.NewApplicationLink( "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", @@ -64,7 +88,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserApplicationsLinks() { tc := tc s.Run(tc.name, func() { - cmd := cli.GetCmdQueryUserApplicationsLinks() + cmd := cli.GetCmdQueryApplicationsLinks() clientCtx := val.ClientCtx out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) @@ -73,7 +97,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserApplicationsLinks() { } else { s.Require().NoError(err) - var response types.QueryUserApplicationLinksResponse + var response types.QueryApplicationLinksResponse s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &response), out.String()) s.Require().Equal(tc.expectedOutput.Links, response.Links) } diff --git a/x/profiles/client/cli/cli_chain_links.go b/x/profiles/client/cli/cli_chain_links.go index 54b10d0ffb..a294ceca6c 100644 --- a/x/profiles/client/cli/cli_chain_links.go +++ b/x/profiles/client/cli/cli_chain_links.go @@ -109,12 +109,12 @@ func GetCmdUnlinkChainAccount() *cobra.Command { // -------------------------------------------------------------------------------------------------------------------- -// GetCmdQueryUserChainLinks returns the command allowing to query all the chain links of a specific user -func GetCmdQueryUserChainLinks() *cobra.Command { +// GetCmdQueryChainLinks returns the command allowing to query the chain links, optionally associated with a user +func GetCmdQueryChainLinks() *cobra.Command { cmd := &cobra.Command{ - Use: "chain-links [address]", - Short: "Retrieve all the user's chain links with optional pagination", - Args: cobra.ExactArgs(1), + Use: "chain-links [[address]]", + Short: "Retrieve all chain links with optional user address and pagination", + Args: cobra.RangeArgs(0, 1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -122,14 +122,19 @@ func GetCmdQueryUserChainLinks() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) + var user string + if len(args) == 1 { + user = args[0] + } + pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { return err } - res, err := queryClient.UserChainLinks( + res, err := queryClient.ChainLinks( context.Background(), - &types.QueryUserChainLinksRequest{User: args[0], Pagination: pageReq}, + &types.QueryChainLinksRequest{User: user, Pagination: pageReq}, ) if err != nil { return err diff --git a/x/profiles/client/cli/cli_chain_links_test.go b/x/profiles/client/cli/cli_chain_links_test.go index 503798514d..6b6bdb9fae 100644 --- a/x/profiles/client/cli/cli_chain_links_test.go +++ b/x/profiles/client/cli/cli_chain_links_test.go @@ -16,7 +16,7 @@ import ( "github.com/desmos-labs/desmos/x/profiles/types" ) -func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { +func (s *IntegrationTestSuite) TestCmdQueryChainLinks() { val := s.network.Validators[0] pubKey, err := sdk.GetPubKeyFromBech32( @@ -29,8 +29,45 @@ func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { name string args []string expectErr bool - expectedOutput types.QueryUserChainLinksResponse + expectedOutput types.QueryChainLinksResponse }{ + { + name: "existing chain links are returned properly", + args: []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + expectErr: false, + expectedOutput: types.QueryChainLinksResponse{ + Links: []types.ChainLink{ + types.NewChainLink( + "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", + types.NewBech32Address("cosmos1cjf97gpzwmaf30pzvaargfgr884mpp5ak8f7ns", "cosmos"), + types.NewProof( + pubKey, + "909e38994b1583d3f14384c2e9a03c90064e8fd8e19b780bb0ba303dfe671a27287da04d0ce096ce9a140bd070ee36818f5519eb2070a16971efd8143855524b", + "text", + ), + types.NewChainConfig("cosmos"), + time.Date(2019, 1, 1, 00, 00, 00, 000, time.UTC), + ), + types.NewChainLink( + "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", + types.NewBech32Address("cosmos1xmquc944hzu6n6qtljcexkuhhz76mucxtgm5x0", "cosmos"), + types.NewProof( + pubKey, + "909e38994b1583d3f14384c2e9a03c90064e8fd8e19b780bb0ba303dfe671a27287da04d0ce096ce9a140bd070ee36818f5519eb2070a16971efd8143855524b", + "text", + ), + types.NewChainConfig("cosmos"), + time.Date(2019, 1, 1, 00, 00, 00, 000, time.UTC), + ), + }, + Pagination: &query.PageResponse{ + NextKey: nil, + Total: 0, + }, + }, + }, { name: "empty array is returned properly", args: []string{ @@ -38,7 +75,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserChainLinksResponse{ + expectedOutput: types.QueryChainLinksResponse{ Links: []types.ChainLink{}, Pagination: &query.PageResponse{ NextKey: nil, @@ -47,13 +84,13 @@ func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { }, }, { - name: "existing chain links is returned properly", + name: "existing chain links of the given user are returned properly", args: []string{ "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserChainLinksResponse{ + expectedOutput: types.QueryChainLinksResponse{ Links: []types.ChainLink{ types.NewChainLink( "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", @@ -90,7 +127,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { uc := uc s.Run(uc.name, func() { - cmd := cli.GetCmdQueryUserChainLinks() + cmd := cli.GetCmdQueryChainLinks() clientCtx := val.ClientCtx out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, uc.args) @@ -99,7 +136,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { } else { s.Require().NoError(err) - var response types.QueryUserChainLinksResponse + var response types.QueryChainLinksResponse s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &response), out.String()) s.Require().Equal(uc.expectedOutput.Pagination, response.Pagination) diff --git a/x/profiles/client/cli/cli_dtag_requests.go b/x/profiles/client/cli/cli_dtag_requests.go index 4e7d00a97c..a43aa0e104 100644 --- a/x/profiles/client/cli/cli_dtag_requests.go +++ b/x/profiles/client/cli/cli_dtag_requests.go @@ -137,9 +137,9 @@ func GetCmdRefuseDTagTransfer() *cobra.Command { // GetCmdQueryDTagRequests returns the command allowing to query all the DTag transfer requests made towards a user func GetCmdQueryDTagRequests() *cobra.Command { cmd := &cobra.Command{ - Use: "incoming-dtag-transfer-requests [address]", - Short: "Retrieve the DTag transfer requests made to the given address with optional pagination", - Args: cobra.ExactArgs(1), + Use: "incoming-dtag-transfer-requests [[address]]", + Short: "Retrieve the DTag transfer requests with optional address and pagination", + Args: cobra.RangeArgs(0, 1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -147,6 +147,11 @@ func GetCmdQueryDTagRequests() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) + var receiver string + if len(args) == 1 { + receiver = args[0] + } + pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { return err @@ -154,7 +159,7 @@ func GetCmdQueryDTagRequests() *cobra.Command { res, err := queryClient.IncomingDTagTransferRequests( context.Background(), - &types.QueryIncomingDTagTransferRequestsRequest{Receiver: args[0], Pagination: pageReq}, + &types.QueryIncomingDTagTransferRequestsRequest{Receiver: receiver, Pagination: pageReq}, ) if err != nil { return err diff --git a/x/profiles/client/cli/cli_dtag_requests_test.go b/x/profiles/client/cli/cli_dtag_requests_test.go index 910c7652cd..46cb93c168 100644 --- a/x/profiles/client/cli/cli_dtag_requests_test.go +++ b/x/profiles/client/cli/cli_dtag_requests_test.go @@ -22,6 +22,20 @@ func (s *IntegrationTestSuite) TestCmdQueryDTagRequests() { expectErr bool expRequests []types.DTagTransferRequest }{ + { + name: "existing requests are returned properly", + args: []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + expectErr: false, + expRequests: []types.DTagTransferRequest{ + types.NewDTagTransferRequest( + "dtag", + "cosmos122u6u9gpdr2rp552fkkvlgyecjlmtqhkascl5a", + "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", + ), + }, + }, { name: "empty slice is returned properly", args: []string{ @@ -32,7 +46,7 @@ func (s *IntegrationTestSuite) TestCmdQueryDTagRequests() { expRequests: []types.DTagTransferRequest{}, }, { - name: "existing requests are returned properly", + name: "existing requests of the given user are returned properly", args: []string{ "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", fmt.Sprintf("--%s=json", tmcli.OutputFlag), diff --git a/x/profiles/client/cli/cli_relationships.go b/x/profiles/client/cli/cli_relationships.go index bfdf2d06ec..6dea61b71f 100644 --- a/x/profiles/client/cli/cli_relationships.go +++ b/x/profiles/client/cli/cli_relationships.go @@ -123,12 +123,12 @@ func GetCmdUnblockUser() *cobra.Command { // -------------------------------------------------------------------------------------------------------------------- -// GetCmdQueryUserRelationships returns the command allowing to query all the relationships of a specific user -func GetCmdQueryUserRelationships() *cobra.Command { +// GetCmdQueryRelationships returns the command allowing to query the relationships with optional user and subspace +func GetCmdQueryRelationships() *cobra.Command { cmd := &cobra.Command{ - Use: "relationships [address] [[subspace-id]]", - Short: "Retrieve all the user's relationships with optional subspace", - Args: cobra.RangeArgs(1, 2), + Use: "relationships [[address]] [[subspace-id]]", + Short: "Retrieve all the relationships with optional address and subspace", + Args: cobra.RangeArgs(0, 2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -136,7 +136,11 @@ func GetCmdQueryUserRelationships() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) - user := args[0] + var user string + if len(args) >= 1 { + user = args[0] + } + var subspace string if len(args) == 2 { subspace = args[1] @@ -147,9 +151,9 @@ func GetCmdQueryUserRelationships() *cobra.Command { return err } - res, err := queryClient.UserRelationships( + res, err := queryClient.Relationships( context.Background(), - &types.QueryUserRelationshipsRequest{User: user, SubspaceId: subspace, Pagination: pageReq}, + &types.QueryRelationshipsRequest{User: user, SubspaceId: subspace, Pagination: pageReq}, ) if err != nil { return err @@ -165,12 +169,12 @@ func GetCmdQueryUserRelationships() *cobra.Command { return cmd } -// GetCmdQueryUserBlocks returns the command allowing to query all the blocks of a single user with optional subspace -func GetCmdQueryUserBlocks() *cobra.Command { +// GetCmdQueryBlocks returns the command allowing to query all the blocks with optional user and subspace +func GetCmdQueryBlocks() *cobra.Command { cmd := &cobra.Command{ - Use: "blocks [address] [[subspace-id]] ", - Short: "Retrieve the list of all the blocked users of the given address", - Args: cobra.RangeArgs(1, 2), + Use: "blocks [[address]] [[subspace-id]] ", + Short: "Retrieve the list of all the blocked users with optional address and subspace", + Args: cobra.RangeArgs(0, 2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -178,7 +182,11 @@ func GetCmdQueryUserBlocks() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) - user := args[0] + var user string + if len(args) >= 1 { + user = args[0] + } + var subspace string if len(args) == 2 { subspace = args[1] @@ -189,9 +197,9 @@ func GetCmdQueryUserBlocks() *cobra.Command { return err } - res, err := queryClient.UserBlocks( + res, err := queryClient.Blocks( context.Background(), - &types.QueryUserBlocksRequest{User: user, SubspaceId: subspace, Pagination: pageReq}) + &types.QueryBlocksRequest{User: user, SubspaceId: subspace, Pagination: pageReq}) if err != nil { return err } diff --git a/x/profiles/client/cli/cli_relationships_test.go b/x/profiles/client/cli/cli_relationships_test.go index fce28ef4cd..b0b9faee5c 100644 --- a/x/profiles/client/cli/cli_relationships_test.go +++ b/x/profiles/client/cli/cli_relationships_test.go @@ -14,15 +14,35 @@ import ( "github.com/desmos-labs/desmos/x/profiles/types" ) -func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { +func (s *IntegrationTestSuite) TestCmdQueryRelationships() { val := s.network.Validators[0] testCases := []struct { name string args []string expectErr bool - expectedOutput types.QueryUserRelationshipsResponse + expectedOutput types.QueryRelationshipsResponse }{ + { + name: "existing relationships are returned properly", + args: []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + expectErr: false, + expectedOutput: types.QueryRelationshipsResponse{ + Relationships: []types.Relationship{ + types.NewRelationship( + "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", + "cosmos1zs70glquczqgt83g03jnvcqppu4jjj8yjxwlvh", + "60303ae22b998861bce3b28f33eec1be758a213c86c93c076dbe9f558c11c752", + ), + }, + Pagination: &query.PageResponse{ + NextKey: nil, + Total: 0, + }, + }, + }, { name: "empty array is returned properly", args: []string{ @@ -30,8 +50,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserRelationshipsResponse{ - User: s.network.Validators[1].Address.String(), + expectedOutput: types.QueryRelationshipsResponse{ Relationships: []types.Relationship{}, Pagination: &query.PageResponse{ NextKey: nil, @@ -40,14 +59,13 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { }, }, { - name: "existing relationship is returned properly", + name: "existing relationships of the given user are returned properly", args: []string{ "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserRelationshipsResponse{ - User: "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", + expectedOutput: types.QueryRelationshipsResponse{ Relationships: []types.Relationship{ types.NewRelationship( "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", @@ -67,7 +85,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { tc := tc s.Run(tc.name, func() { - cmd := cli.GetCmdQueryUserRelationships() + cmd := cli.GetCmdQueryRelationships() clientCtx := val.ClientCtx out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) @@ -76,7 +94,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { } else { s.Require().NoError(err) - var response types.QueryUserRelationshipsResponse + var response types.QueryRelationshipsResponse s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &response), out.String()) s.Require().Equal(tc.expectedOutput, response) } @@ -84,15 +102,36 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { } } -func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { +func (s *IntegrationTestSuite) TestCmdQueryBlocks() { val := s.network.Validators[0] testCases := []struct { name string args []string expectErr bool - expectedOutput types.QueryUserBlocksResponse + expectedOutput types.QueryBlocksResponse }{ + { + name: "existing user blocks are returned properly", + args: []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + expectErr: false, + expectedOutput: types.QueryBlocksResponse{ + Blocks: []types.UserBlock{ + types.NewUserBlock( + "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", + "cosmos1zs70glquczqgt83g03jnvcqppu4jjj8yjxwlvh", + "Test block", + "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", + ), + }, + Pagination: &query.PageResponse{ + NextKey: nil, + Total: 0, + }, + }, + }, { name: "empty slice is returned properly", args: []string{ @@ -100,7 +139,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserBlocksResponse{ + expectedOutput: types.QueryBlocksResponse{ Blocks: []types.UserBlock{}, Pagination: &query.PageResponse{ NextKey: nil, @@ -109,13 +148,13 @@ func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { }, }, { - name: "existing user blocks are returned properly", + name: "existing user blocks of the given user are returned properly", args: []string{ "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserBlocksResponse{ + expectedOutput: types.QueryBlocksResponse{ Blocks: []types.UserBlock{ types.NewUserBlock( "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", @@ -136,7 +175,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { tc := tc s.Run(tc.name, func() { - cmd := cli.GetCmdQueryUserBlocks() + cmd := cli.GetCmdQueryBlocks() clientCtx := val.ClientCtx out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) @@ -145,7 +184,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { } else { s.Require().NoError(err) - var response types.QueryUserBlocksResponse + var response types.QueryBlocksResponse s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &response), out.String()) s.Require().Equal(tc.expectedOutput, response) } diff --git a/x/profiles/client/cli/query.go b/x/profiles/client/cli/query.go index 03160dacdd..b83fada068 100644 --- a/x/profiles/client/cli/query.go +++ b/x/profiles/client/cli/query.go @@ -22,11 +22,11 @@ func GetQueryCmd() *cobra.Command { profileQueryCmd.AddCommand( GetCmdQueryProfile(), GetCmdQueryDTagRequests(), - GetCmdQueryUserRelationships(), - GetCmdQueryUserBlocks(), + GetCmdQueryRelationships(), + GetCmdQueryBlocks(), GetCmdQueryParams(), - GetCmdQueryUserChainLinks(), - GetCmdQueryUserApplicationsLinks(), + GetCmdQueryChainLinks(), + GetCmdQueryApplicationsLinks(), ) return profileQueryCmd } diff --git a/x/profiles/keeper/grpc_query.go b/x/profiles/keeper/grpc_query.go index 53e20bd221..c58d09c190 100644 --- a/x/profiles/keeper/grpc_query.go +++ b/x/profiles/keeper/grpc_query.go @@ -59,11 +59,6 @@ func (k Keeper) Profile(ctx context.Context, request *types.QueryProfileRequest) } func (k Keeper) IncomingDTagTransferRequests(ctx context.Context, request *types.QueryIncomingDTagTransferRequestsRequest) (*types.QueryIncomingDTagTransferRequestsResponse, error) { - _, err := sdk.AccAddressFromBech32(request.Receiver) - if err != nil { - return nil, status.Errorf(codes.InvalidArgument, "invalid user address: %s", request.Receiver) - } - sdkCtx := sdk.UnwrapSDKContext(ctx) var requests []types.DTagTransferRequest @@ -89,8 +84,8 @@ func (k Keeper) IncomingDTagTransferRequests(ctx context.Context, request *types return &types.QueryIncomingDTagTransferRequestsResponse{Requests: requests, Pagination: pageRes}, nil } -// UserRelationships implements the Query/UserRelationships gRPC method -func (k Keeper) UserRelationships(ctx context.Context, request *types.QueryUserRelationshipsRequest) (*types.QueryUserRelationshipsResponse, error) { +// Relationships implements the Query/Relationships gRPC method +func (k Keeper) Relationships(ctx context.Context, request *types.QueryRelationshipsRequest) (*types.QueryRelationshipsResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) var relationships []types.Relationship @@ -113,11 +108,11 @@ func (k Keeper) UserRelationships(ctx context.Context, request *types.QueryUserR return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryUserRelationshipsResponse{User: request.User, Relationships: relationships, Pagination: pageRes}, nil + return &types.QueryRelationshipsResponse{Relationships: relationships, Pagination: pageRes}, nil } -// UserBlocks implements the Query/UserBlocks gRPC method -func (k Keeper) UserBlocks(ctx context.Context, request *types.QueryUserBlocksRequest) (*types.QueryUserBlocksResponse, error) { +// Blocks implements the Query/Blocks gRPC method +func (k Keeper) Blocks(ctx context.Context, request *types.QueryBlocksRequest) (*types.QueryBlocksResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) var userblocks []types.UserBlock @@ -140,7 +135,7 @@ func (k Keeper) UserBlocks(ctx context.Context, request *types.QueryUserBlocksRe return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryUserBlocksResponse{Blocks: userblocks, Pagination: pageRes}, nil + return &types.QueryBlocksResponse{Blocks: userblocks, Pagination: pageRes}, nil } // Params implements the Query/Params gRPC method @@ -150,8 +145,8 @@ func (k Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types return &types.QueryParamsResponse{Params: params}, nil } -// UserChainLinks implements the Query/UserChainLinks gRPC method -func (k Keeper) UserChainLinks(ctx context.Context, request *types.QueryUserChainLinksRequest) (*types.QueryUserChainLinksResponse, error) { +// ChainLinks implements the Query/ChainLinks gRPC method +func (k Keeper) ChainLinks(ctx context.Context, request *types.QueryChainLinksRequest) (*types.QueryChainLinksResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) var links []types.ChainLink @@ -174,7 +169,7 @@ func (k Keeper) UserChainLinks(ctx context.Context, request *types.QueryUserChai return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryUserChainLinksResponse{Links: links, Pagination: pageRes}, nil + return &types.QueryChainLinksResponse{Links: links, Pagination: pageRes}, nil } // UserChainLink implements the Query/UserChainLink gRPC method @@ -189,8 +184,8 @@ func (k Keeper) UserChainLink(ctx context.Context, request *types.QueryUserChain return &types.QueryUserChainLinkResponse{Link: link}, nil } -// UserApplicationLinks implements the Query/UserApplicationLinks gRPC method -func (k Keeper) UserApplicationLinks(ctx context.Context, request *types.QueryUserApplicationLinksRequest) (*types.QueryUserApplicationLinksResponse, error) { +// ApplicationLinks implements the Query/ApplicationLinks gRPC method +func (k Keeper) ApplicationLinks(ctx context.Context, request *types.QueryApplicationLinksRequest) (*types.QueryApplicationLinksResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) var links []types.ApplicationLink @@ -213,7 +208,7 @@ func (k Keeper) UserApplicationLinks(ctx context.Context, request *types.QueryUs return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryUserApplicationLinksResponse{Links: links, Pagination: pageRes}, nil + return &types.QueryApplicationLinksResponse{Links: links, Pagination: pageRes}, nil } // UserApplicationLink implements the Query/UserApplicationLink gRPC method diff --git a/x/profiles/keeper/grpc_query_test.go b/x/profiles/keeper/grpc_query_test.go index 5baca70354..c927451059 100644 --- a/x/profiles/keeper/grpc_query_test.go +++ b/x/profiles/keeper/grpc_query_test.go @@ -96,11 +96,6 @@ func (suite *KeeperTestSuite) TestQueryServer_IncomingDTagTransferRequests() { shouldErr bool expRequests []types.DTagTransferRequest }{ - { - name: "invalid user", - req: types.NewQueryIncomingDTagTransferRequestsRequest("invalid-address", nil), - shouldErr: true, - }, { name: "valid request without pagination", store: func(ctx sdk.Context) { @@ -202,11 +197,11 @@ func (suite *KeeperTestSuite) TestQueryServer_Params() { suite.Require().Equal(types.DefaultParams(), res.Params) } -func (suite *KeeperTestSuite) TestQueryServer_UserChainLinks() { +func (suite *KeeperTestSuite) TestQueryServer_ChainLinks() { testCases := []struct { name string store func(ctx sdk.Context) - req *types.QueryUserChainLinksRequest + req *types.QueryChainLinksRequest shouldErr bool expLinks []types.ChainLink }{ @@ -246,7 +241,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserChainLinks() { suite.cdc.MustMarshalBinaryBare(&link), ) }, - req: &types.QueryUserChainLinksRequest{ + req: &types.QueryChainLinksRequest{ User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47", }, shouldErr: false, @@ -312,7 +307,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserChainLinks() { suite.cdc.MustMarshalBinaryBare(&link), ) }, - req: &types.QueryUserChainLinksRequest{ + req: &types.QueryChainLinksRequest{ User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47", Pagination: &query.PageRequest{Limit: 1}, }, @@ -341,7 +336,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserChainLinks() { tc.store(ctx) } - res, err := suite.k.UserChainLinks(sdk.WrapSDKContext(ctx), tc.req) + res, err := suite.k.ChainLinks(sdk.WrapSDKContext(ctx), tc.req) if tc.shouldErr { suite.Require().Error(err) } else { @@ -433,11 +428,11 @@ func (suite *KeeperTestSuite) TestQueryServer_UserChainLink() { } } -func (suite *KeeperTestSuite) TestQueryServer_UserRelationships() { +func (suite *KeeperTestSuite) TestQueryServer_Relationships() { testCases := []struct { name string store func(ctx sdk.Context) - req *types.QueryUserRelationshipsRequest + req *types.QueryRelationshipsRequest shouldErr bool expRelationships []types.Relationship }{ @@ -460,7 +455,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserRelationships() { suite.Require().NoError(suite.k.StoreProfile(ctx, testutil.ProfileFromAddr(relationship.Creator))) suite.Require().NoError(suite.k.SaveRelationship(ctx, relationship)) }, - req: &types.QueryUserRelationshipsRequest{User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"}, + req: &types.QueryRelationshipsRequest{User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"}, shouldErr: false, expRelationships: []types.Relationship{ types.NewRelationship( @@ -494,7 +489,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserRelationships() { suite.Require().NoError(suite.k.StoreProfile(ctx, testutil.ProfileFromAddr(relationship.Creator))) suite.Require().NoError(suite.k.SaveRelationship(ctx, relationship)) }, - req: &types.QueryUserRelationshipsRequest{ + req: &types.QueryRelationshipsRequest{ User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47", Pagination: &query.PageRequest{Limit: 1}, }, @@ -517,7 +512,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserRelationships() { tc.store(ctx) } - res, err := suite.k.UserRelationships(sdk.WrapSDKContext(ctx), tc.req) + res, err := suite.k.Relationships(sdk.WrapSDKContext(ctx), tc.req) if tc.shouldErr { suite.Require().Error(err) } else { @@ -529,11 +524,11 @@ func (suite *KeeperTestSuite) TestQueryServer_UserRelationships() { } } -func (suite *KeeperTestSuite) TestQueryServer_UserBlocks() { +func (suite *KeeperTestSuite) TestQueryServer_Blocks() { testCases := []struct { name string store func(ctx sdk.Context) - req *types.QueryUserBlocksRequest + req *types.QueryBlocksRequest shouldErr bool expBlocks []types.UserBlock }{ @@ -558,7 +553,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserBlocks() { suite.Require().NoError(suite.k.StoreProfile(ctx, testutil.ProfileFromAddr(block.Blocker))) suite.Require().NoError(suite.k.SaveUserBlock(ctx, block)) }, - req: &types.QueryUserBlocksRequest{User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"}, + req: &types.QueryBlocksRequest{User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"}, shouldErr: false, expBlocks: []types.UserBlock{ types.NewUserBlock( @@ -596,7 +591,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserBlocks() { suite.Require().NoError(suite.k.StoreProfile(ctx, testutil.ProfileFromAddr(block.Blocker))) suite.Require().NoError(suite.k.SaveUserBlock(ctx, block)) }, - req: &types.QueryUserBlocksRequest{ + req: &types.QueryBlocksRequest{ User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47", Pagination: &query.PageRequest{Limit: 1}, }, @@ -620,7 +615,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserBlocks() { tc.store(ctx) } - res, err := suite.k.UserBlocks(sdk.WrapSDKContext(ctx), tc.req) + res, err := suite.k.Blocks(sdk.WrapSDKContext(ctx), tc.req) if tc.shouldErr { suite.Require().Error(err) } else { @@ -632,17 +627,17 @@ func (suite *KeeperTestSuite) TestQueryServer_UserBlocks() { } } -func (suite *KeeperTestSuite) TestQueryServer_UserApplicationLinks() { +func (suite *KeeperTestSuite) TestQueryServer_ApplicationLinks() { testCases := []struct { name string store func(ctx sdk.Context) - req *types.QueryUserApplicationLinksRequest + req *types.QueryApplicationLinksRequest shouldErr bool expApplicationLinks []types.ApplicationLink }{ { name: "empty requests return empty result", - req: types.NewQueryUserApplicationLinksRequest("user", nil), + req: types.NewQueryApplicationLinksRequest("user", nil), shouldErr: false, expApplicationLinks: nil, }, @@ -691,7 +686,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserApplicationLinks() { ), )) }, - req: types.NewQueryUserApplicationLinksRequest( + req: types.NewQueryApplicationLinksRequest( "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47", &query.PageRequest{Limit: 1, Offset: 1, CountTotal: true}, ), @@ -725,7 +720,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserApplicationLinks() { tc.store(ctx) } - res, err := suite.k.UserApplicationLinks(sdk.WrapSDKContext(ctx), tc.req) + res, err := suite.k.ApplicationLinks(sdk.WrapSDKContext(ctx), tc.req) if tc.shouldErr { suite.Require().Error(err) } else { diff --git a/x/profiles/types/query.pb.go b/x/profiles/types/query.pb.go index 016807fd60..f74024d3a1 100644 --- a/x/profiles/types/query.pb.go +++ b/x/profiles/types/query.pb.go @@ -35,52 +35,52 @@ func init() { } var fileDescriptor_5e0074f57a59f38d = []byte{ - // 718 bytes of a gzipped FileDescriptorProto + // 712 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x4f, 0x6b, 0x13, 0x4f, - 0x18, 0xc7, 0xbb, 0x3f, 0xf8, 0x55, 0x18, 0xb0, 0xe0, 0x58, 0x90, 0x86, 0x12, 0x51, 0x0f, 0x6a, - 0xd3, 0xec, 0x34, 0x4d, 0xa9, 0x6d, 0x91, 0x4a, 0xd3, 0x1e, 0xac, 0x78, 0xa8, 0x52, 0x2f, 0x5e, - 0xc2, 0xec, 0x76, 0xba, 0x1d, 0xba, 0x99, 0x99, 0xee, 0x4c, 0x8a, 0x25, 0xe4, 0xe2, 0xd9, 0x83, - 0xe0, 0xc5, 0x17, 0xe0, 0x0b, 0xf0, 0x25, 0x08, 0x5e, 0x3c, 0x16, 0x04, 0xf1, 0xe0, 0x41, 0x5a, - 0x2f, 0xbe, 0x06, 0x2f, 0xb2, 0xf3, 0x27, 0x35, 0xad, 0xbb, 0xc9, 0xc6, 0x5b, 0x76, 0xf6, 0xfb, - 0x7d, 0x9e, 0xcf, 0x77, 0xe6, 0xd9, 0x09, 0xb8, 0xb5, 0x43, 0x64, 0x8b, 0x4b, 0x24, 0x12, 0xbe, - 0x4b, 0x63, 0x22, 0xd1, 0x61, 0x2d, 0x20, 0x0a, 0xd7, 0xd0, 0x41, 0x9b, 0x24, 0x47, 0xbe,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, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, + 0xd2, 0x6a, 0x7a, 0x47, 0x93, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -104,18 +104,21 @@ type QueryClient interface { IncomingDTagTransferRequests(ctx context.Context, in *QueryIncomingDTagTransferRequestsRequest, opts ...grpc.CallOption) (*QueryIncomingDTagTransferRequestsResponse, error) // Params queries the profiles module params Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // UserRelationships queries the relationships for the user having the given - // address - UserRelationships(ctx context.Context, in *QueryUserRelationshipsRequest, opts ...grpc.CallOption) (*QueryUserRelationshipsResponse, error) - // UserBlocks queries the user blocks for the user having the given address - UserBlocks(ctx context.Context, in *QueryUserBlocksRequest, opts ...grpc.CallOption) (*QueryUserBlocksResponse, error) - // UserChainLinks queries chain links for the given user - UserChainLinks(ctx context.Context, in *QueryUserChainLinksRequest, opts ...grpc.CallOption) (*QueryUserChainLinksResponse, error) + // Relationships queries all relationships for the given user, if provided. + // Otherwise, it queries all the relationships stored. + Relationships(ctx context.Context, in *QueryRelationshipsRequest, opts ...grpc.CallOption) (*QueryRelationshipsResponse, error) + // Blocks queries the blocks for the given user, if provided. + // Otherwise, it queries all the stored blocks. + Blocks(ctx context.Context, in *QueryBlocksRequest, opts ...grpc.CallOption) (*QueryBlocksResponse, error) + // ChainLinks queries the chain links associated to the given user, if provided. + // Otherwise it queries all the chain links stored. + ChainLinks(ctx context.Context, in *QueryChainLinksRequest, opts ...grpc.CallOption) (*QueryChainLinksResponse, error) // UserChainLink queries the chain link for the given user, chain name and // target address UserChainLink(ctx context.Context, in *QueryUserChainLinkRequest, opts ...grpc.CallOption) (*QueryUserChainLinkResponse, error) - // UserApplicationLinks queries application links for the given user - UserApplicationLinks(ctx context.Context, in *QueryUserApplicationLinksRequest, opts ...grpc.CallOption) (*QueryUserApplicationLinksResponse, error) + // ApplicationLinks queries the applications links associated to the given user, if provided. + // Otherwise, it queries all the application links stored. + ApplicationLinks(ctx context.Context, in *QueryApplicationLinksRequest, opts ...grpc.CallOption) (*QueryApplicationLinksResponse, error) // UserApplicationLinks queries a single application link for a given user, // searching via the application name and username UserApplicationLink(ctx context.Context, in *QueryUserApplicationLinkRequest, opts ...grpc.CallOption) (*QueryUserApplicationLinkResponse, error) @@ -159,27 +162,27 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) UserRelationships(ctx context.Context, in *QueryUserRelationshipsRequest, opts ...grpc.CallOption) (*QueryUserRelationshipsResponse, error) { - out := new(QueryUserRelationshipsResponse) - err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/UserRelationships", in, out, opts...) +func (c *queryClient) Relationships(ctx context.Context, in *QueryRelationshipsRequest, opts ...grpc.CallOption) (*QueryRelationshipsResponse, error) { + out := new(QueryRelationshipsResponse) + err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/Relationships", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) UserBlocks(ctx context.Context, in *QueryUserBlocksRequest, opts ...grpc.CallOption) (*QueryUserBlocksResponse, error) { - out := new(QueryUserBlocksResponse) - err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/UserBlocks", in, out, opts...) +func (c *queryClient) Blocks(ctx context.Context, in *QueryBlocksRequest, opts ...grpc.CallOption) (*QueryBlocksResponse, error) { + out := new(QueryBlocksResponse) + err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/Blocks", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) UserChainLinks(ctx context.Context, in *QueryUserChainLinksRequest, opts ...grpc.CallOption) (*QueryUserChainLinksResponse, error) { - out := new(QueryUserChainLinksResponse) - err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/UserChainLinks", in, out, opts...) +func (c *queryClient) ChainLinks(ctx context.Context, in *QueryChainLinksRequest, opts ...grpc.CallOption) (*QueryChainLinksResponse, error) { + out := new(QueryChainLinksResponse) + err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/ChainLinks", in, out, opts...) if err != nil { return nil, err } @@ -195,9 +198,9 @@ func (c *queryClient) UserChainLink(ctx context.Context, in *QueryUserChainLinkR return out, nil } -func (c *queryClient) UserApplicationLinks(ctx context.Context, in *QueryUserApplicationLinksRequest, opts ...grpc.CallOption) (*QueryUserApplicationLinksResponse, error) { - out := new(QueryUserApplicationLinksResponse) - err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/UserApplicationLinks", in, out, opts...) +func (c *queryClient) ApplicationLinks(ctx context.Context, in *QueryApplicationLinksRequest, opts ...grpc.CallOption) (*QueryApplicationLinksResponse, error) { + out := new(QueryApplicationLinksResponse) + err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/ApplicationLinks", in, out, opts...) if err != nil { return nil, err } @@ -233,18 +236,21 @@ type QueryServer interface { IncomingDTagTransferRequests(context.Context, *QueryIncomingDTagTransferRequestsRequest) (*QueryIncomingDTagTransferRequestsResponse, error) // Params queries the profiles module params Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // UserRelationships queries the relationships for the user having the given - // address - UserRelationships(context.Context, *QueryUserRelationshipsRequest) (*QueryUserRelationshipsResponse, error) - // UserBlocks queries the user blocks for the user having the given address - UserBlocks(context.Context, *QueryUserBlocksRequest) (*QueryUserBlocksResponse, error) - // UserChainLinks queries chain links for the given user - UserChainLinks(context.Context, *QueryUserChainLinksRequest) (*QueryUserChainLinksResponse, error) + // Relationships queries all relationships for the given user, if provided. + // Otherwise, it queries all the relationships stored. + Relationships(context.Context, *QueryRelationshipsRequest) (*QueryRelationshipsResponse, error) + // Blocks queries the blocks for the given user, if provided. + // Otherwise, it queries all the stored blocks. + Blocks(context.Context, *QueryBlocksRequest) (*QueryBlocksResponse, error) + // ChainLinks queries the chain links associated to the given user, if provided. + // Otherwise it queries all the chain links stored. + ChainLinks(context.Context, *QueryChainLinksRequest) (*QueryChainLinksResponse, error) // UserChainLink queries the chain link for the given user, chain name and // target address UserChainLink(context.Context, *QueryUserChainLinkRequest) (*QueryUserChainLinkResponse, error) - // UserApplicationLinks queries application links for the given user - UserApplicationLinks(context.Context, *QueryUserApplicationLinksRequest) (*QueryUserApplicationLinksResponse, error) + // ApplicationLinks queries the applications links associated to the given user, if provided. + // Otherwise, it queries all the application links stored. + ApplicationLinks(context.Context, *QueryApplicationLinksRequest) (*QueryApplicationLinksResponse, error) // UserApplicationLinks queries a single application link for a given user, // searching via the application name and username UserApplicationLink(context.Context, *QueryUserApplicationLinkRequest) (*QueryUserApplicationLinkResponse, error) @@ -266,20 +272,20 @@ func (*UnimplementedQueryServer) IncomingDTagTransferRequests(ctx context.Contex func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (*UnimplementedQueryServer) UserRelationships(ctx context.Context, req *QueryUserRelationshipsRequest) (*QueryUserRelationshipsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserRelationships not implemented") +func (*UnimplementedQueryServer) Relationships(ctx context.Context, req *QueryRelationshipsRequest) (*QueryRelationshipsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Relationships not implemented") } -func (*UnimplementedQueryServer) UserBlocks(ctx context.Context, req *QueryUserBlocksRequest) (*QueryUserBlocksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserBlocks not implemented") +func (*UnimplementedQueryServer) Blocks(ctx context.Context, req *QueryBlocksRequest) (*QueryBlocksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Blocks not implemented") } -func (*UnimplementedQueryServer) UserChainLinks(ctx context.Context, req *QueryUserChainLinksRequest) (*QueryUserChainLinksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserChainLinks not implemented") +func (*UnimplementedQueryServer) ChainLinks(ctx context.Context, req *QueryChainLinksRequest) (*QueryChainLinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ChainLinks not implemented") } func (*UnimplementedQueryServer) UserChainLink(ctx context.Context, req *QueryUserChainLinkRequest) (*QueryUserChainLinkResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UserChainLink not implemented") } -func (*UnimplementedQueryServer) UserApplicationLinks(ctx context.Context, req *QueryUserApplicationLinksRequest) (*QueryUserApplicationLinksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserApplicationLinks not implemented") +func (*UnimplementedQueryServer) ApplicationLinks(ctx context.Context, req *QueryApplicationLinksRequest) (*QueryApplicationLinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ApplicationLinks not implemented") } func (*UnimplementedQueryServer) UserApplicationLink(ctx context.Context, req *QueryUserApplicationLinkRequest) (*QueryUserApplicationLinkResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UserApplicationLink not implemented") @@ -346,56 +352,56 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_UserRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUserRelationshipsRequest) +func _Query_Relationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRelationshipsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).UserRelationships(ctx, in) + return srv.(QueryServer).Relationships(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/desmos.profiles.v1beta1.Query/UserRelationships", + FullMethod: "/desmos.profiles.v1beta1.Query/Relationships", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserRelationships(ctx, req.(*QueryUserRelationshipsRequest)) + return srv.(QueryServer).Relationships(ctx, req.(*QueryRelationshipsRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_UserBlocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUserBlocksRequest) +func _Query_Blocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBlocksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).UserBlocks(ctx, in) + return srv.(QueryServer).Blocks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/desmos.profiles.v1beta1.Query/UserBlocks", + FullMethod: "/desmos.profiles.v1beta1.Query/Blocks", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserBlocks(ctx, req.(*QueryUserBlocksRequest)) + return srv.(QueryServer).Blocks(ctx, req.(*QueryBlocksRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_UserChainLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUserChainLinksRequest) +func _Query_ChainLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryChainLinksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).UserChainLinks(ctx, in) + return srv.(QueryServer).ChainLinks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/desmos.profiles.v1beta1.Query/UserChainLinks", + FullMethod: "/desmos.profiles.v1beta1.Query/ChainLinks", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserChainLinks(ctx, req.(*QueryUserChainLinksRequest)) + return srv.(QueryServer).ChainLinks(ctx, req.(*QueryChainLinksRequest)) } return interceptor(ctx, in, info, handler) } @@ -418,20 +424,20 @@ func _Query_UserChainLink_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Query_UserApplicationLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUserApplicationLinksRequest) +func _Query_ApplicationLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryApplicationLinksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).UserApplicationLinks(ctx, in) + return srv.(QueryServer).ApplicationLinks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/desmos.profiles.v1beta1.Query/UserApplicationLinks", + FullMethod: "/desmos.profiles.v1beta1.Query/ApplicationLinks", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserApplicationLinks(ctx, req.(*QueryUserApplicationLinksRequest)) + return srv.(QueryServer).ApplicationLinks(ctx, req.(*QueryApplicationLinksRequest)) } return interceptor(ctx, in, info, handler) } @@ -489,24 +495,24 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_Params_Handler, }, { - MethodName: "UserRelationships", - Handler: _Query_UserRelationships_Handler, + MethodName: "Relationships", + Handler: _Query_Relationships_Handler, }, { - MethodName: "UserBlocks", - Handler: _Query_UserBlocks_Handler, + MethodName: "Blocks", + Handler: _Query_Blocks_Handler, }, { - MethodName: "UserChainLinks", - Handler: _Query_UserChainLinks_Handler, + MethodName: "ChainLinks", + Handler: _Query_ChainLinks_Handler, }, { MethodName: "UserChainLink", Handler: _Query_UserChainLink_Handler, }, { - MethodName: "UserApplicationLinks", - Handler: _Query_UserApplicationLinks_Handler, + MethodName: "ApplicationLinks", + Handler: _Query_ApplicationLinks_Handler, }, { MethodName: "UserApplicationLink", diff --git a/x/profiles/types/query.pb.gw.go b/x/profiles/types/query.pb.gw.go index a3797c83e8..f3374c5e74 100644 --- a/x/profiles/types/query.pb.gw.go +++ b/x/profiles/types/query.pb.gw.go @@ -176,11 +176,11 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } var ( - filter_Query_UserRelationships_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_Relationships_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_UserRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserRelationshipsRequest +func request_Query_Relationships_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRelationshipsRequest var metadata runtime.ServerMetadata var ( @@ -204,17 +204,17 @@ func request_Query_UserRelationships_0(ctx context.Context, marshaler runtime.Ma if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserRelationships_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Relationships_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UserRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Relationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_UserRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserRelationshipsRequest +func local_request_Query_Relationships_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRelationshipsRequest var metadata runtime.ServerMetadata var ( @@ -238,21 +238,21 @@ func local_request_Query_UserRelationships_0(ctx context.Context, marshaler runt if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserRelationships_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Relationships_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UserRelationships(ctx, &protoReq) + msg, err := server.Relationships(ctx, &protoReq) return msg, metadata, err } var ( - filter_Query_UserBlocks_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_Blocks_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_UserBlocks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserBlocksRequest +func request_Query_Blocks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBlocksRequest var metadata runtime.ServerMetadata var ( @@ -276,17 +276,17 @@ func request_Query_UserBlocks_0(ctx context.Context, marshaler runtime.Marshaler if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserBlocks_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Blocks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UserBlocks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Blocks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_UserBlocks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserBlocksRequest +func local_request_Query_Blocks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBlocksRequest var metadata runtime.ServerMetadata var ( @@ -310,21 +310,21 @@ func local_request_Query_UserBlocks_0(ctx context.Context, marshaler runtime.Mar if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserBlocks_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Blocks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UserBlocks(ctx, &protoReq) + msg, err := server.Blocks(ctx, &protoReq) return msg, metadata, err } var ( - filter_Query_UserChainLinks_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_ChainLinks_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_UserChainLinks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserChainLinksRequest +func request_Query_ChainLinks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryChainLinksRequest var metadata runtime.ServerMetadata var ( @@ -348,17 +348,17 @@ func request_Query_UserChainLinks_0(ctx context.Context, marshaler runtime.Marsh if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserChainLinks_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ChainLinks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UserChainLinks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ChainLinks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_UserChainLinks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserChainLinksRequest +func local_request_Query_ChainLinks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryChainLinksRequest var metadata runtime.ServerMetadata var ( @@ -382,11 +382,11 @@ func local_request_Query_UserChainLinks_0(ctx context.Context, marshaler runtime if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserChainLinks_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ChainLinks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UserChainLinks(ctx, &protoReq) + msg, err := server.ChainLinks(ctx, &protoReq) return msg, metadata, err } @@ -490,11 +490,11 @@ func local_request_Query_UserChainLink_0(ctx context.Context, marshaler runtime. } var ( - filter_Query_UserApplicationLinks_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_ApplicationLinks_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_UserApplicationLinks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserApplicationLinksRequest +func request_Query_ApplicationLinks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryApplicationLinksRequest var metadata runtime.ServerMetadata var ( @@ -518,17 +518,17 @@ func request_Query_UserApplicationLinks_0(ctx context.Context, marshaler runtime if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserApplicationLinks_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ApplicationLinks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UserApplicationLinks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ApplicationLinks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_UserApplicationLinks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserApplicationLinksRequest +func local_request_Query_ApplicationLinks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryApplicationLinksRequest var metadata runtime.ServerMetadata var ( @@ -552,11 +552,11 @@ func local_request_Query_UserApplicationLinks_0(ctx context.Context, marshaler r if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserApplicationLinks_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ApplicationLinks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UserApplicationLinks(ctx, &protoReq) + msg, err := server.ApplicationLinks(ctx, &protoReq) return msg, metadata, err } @@ -779,7 +779,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_UserRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Relationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -788,18 +788,18 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_UserRelationships_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Relationships_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UserRelationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Relationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_UserBlocks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Blocks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -808,18 +808,18 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_UserBlocks_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Blocks_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UserBlocks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Blocks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_UserChainLinks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ChainLinks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -828,14 +828,14 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_UserChainLinks_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ChainLinks_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UserChainLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ChainLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -859,7 +859,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_UserApplicationLinks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ApplicationLinks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -868,14 +868,14 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_UserApplicationLinks_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ApplicationLinks_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UserApplicationLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ApplicationLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1020,7 +1020,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_UserRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Relationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -1029,18 +1029,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_UserRelationships_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Relationships_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UserRelationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Relationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_UserBlocks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Blocks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -1049,18 +1049,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_UserBlocks_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Blocks_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UserBlocks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Blocks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_UserChainLinks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ChainLinks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -1069,14 +1069,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_UserChainLinks_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_ChainLinks_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UserChainLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ChainLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1100,7 +1100,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_UserApplicationLinks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ApplicationLinks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -1109,14 +1109,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_UserApplicationLinks_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_ApplicationLinks_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UserApplicationLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ApplicationLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1170,15 +1170,15 @@ var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"desmos", "profiles", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_UserRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 1, 0, 4, 1, 5, 3}, []string{"desmos", "relationships", "v1beta1", "user"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Relationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 1, 0, 4, 1, 5, 3}, []string{"desmos", "relationships", "v1beta1", "user"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_UserBlocks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"desmos", "relationships", "v1beta1", "blocks", "user"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Blocks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"desmos", "relationships", "v1beta1", "blocks", "user"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_UserChainLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"desmos", "profiles", "v1beta1", "chain-links", "user"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ChainLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"desmos", "profiles", "v1beta1", "chain-links", "user"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_UserChainLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"desmos", "profiles", "v1beta1", "chain-links", "user", "chain_name", "target"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_UserApplicationLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"desmos", "profiles", "v1beta1", "app-links", "user"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ApplicationLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"desmos", "profiles", "v1beta1", "app-links", "user"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_UserApplicationLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"desmos", "profiles", "v1beta1", "app-links", "user", "application", "username"}, "", runtime.AssumeColonVerbOpt(true))) @@ -1192,15 +1192,15 @@ var ( forward_Query_Params_0 = runtime.ForwardResponseMessage - forward_Query_UserRelationships_0 = runtime.ForwardResponseMessage + forward_Query_Relationships_0 = runtime.ForwardResponseMessage - forward_Query_UserBlocks_0 = runtime.ForwardResponseMessage + forward_Query_Blocks_0 = runtime.ForwardResponseMessage - forward_Query_UserChainLinks_0 = runtime.ForwardResponseMessage + forward_Query_ChainLinks_0 = runtime.ForwardResponseMessage forward_Query_UserChainLink_0 = runtime.ForwardResponseMessage - forward_Query_UserApplicationLinks_0 = runtime.ForwardResponseMessage + forward_Query_ApplicationLinks_0 = runtime.ForwardResponseMessage forward_Query_UserApplicationLink_0 = runtime.ForwardResponseMessage diff --git a/x/profiles/types/query_app_links.go b/x/profiles/types/query_app_links.go index a8bca994ab..0af19aa08a 100644 --- a/x/profiles/types/query_app_links.go +++ b/x/profiles/types/query_app_links.go @@ -4,9 +4,9 @@ import ( query "github.com/cosmos/cosmos-sdk/types/query" ) -// NewQueryUserApplicationLinksRequest returns a new QueryUserApplicationLinksRequest instance -func NewQueryUserApplicationLinksRequest(user string, pageReq *query.PageRequest) *QueryUserApplicationLinksRequest { - return &QueryUserApplicationLinksRequest{ +// NewQueryApplicationLinksRequest returns a new QueryApplicationLinksRequest instance +func NewQueryApplicationLinksRequest(user string, pageReq *query.PageRequest) *QueryApplicationLinksRequest { + return &QueryApplicationLinksRequest{ User: user, Pagination: pageReq, } diff --git a/x/profiles/types/query_app_links.pb.go b/x/profiles/types/query_app_links.pb.go index 97387ebb12..b7067b8ce8 100644 --- a/x/profiles/types/query_app_links.pb.go +++ b/x/profiles/types/query_app_links.pb.go @@ -141,26 +141,26 @@ func (m *QueryUserApplicationLinkResponse) GetLink() ApplicationLink { return ApplicationLink{} } -// QueryUserApplicationLinksRequest represents the request used when querying +// QueryApplicationLinksRequest represents the request used when querying // the application links of a specific user -type QueryUserApplicationLinksRequest struct { +type QueryApplicationLinksRequest struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // Pagination defines an optional pagination for the request Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserApplicationLinksRequest) Reset() { *m = QueryUserApplicationLinksRequest{} } -func (m *QueryUserApplicationLinksRequest) String() string { return proto.CompactTextString(m) } -func (*QueryUserApplicationLinksRequest) ProtoMessage() {} -func (*QueryUserApplicationLinksRequest) Descriptor() ([]byte, []int) { +func (m *QueryApplicationLinksRequest) Reset() { *m = QueryApplicationLinksRequest{} } +func (m *QueryApplicationLinksRequest) String() string { return proto.CompactTextString(m) } +func (*QueryApplicationLinksRequest) ProtoMessage() {} +func (*QueryApplicationLinksRequest) Descriptor() ([]byte, []int) { return fileDescriptor_18d2a2b45fd238cb, []int{2} } -func (m *QueryUserApplicationLinksRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryApplicationLinksRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserApplicationLinksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryApplicationLinksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserApplicationLinksRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryApplicationLinksRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -170,52 +170,52 @@ func (m *QueryUserApplicationLinksRequest) XXX_Marshal(b []byte, deterministic b return b[:n], nil } } -func (m *QueryUserApplicationLinksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserApplicationLinksRequest.Merge(m, src) +func (m *QueryApplicationLinksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryApplicationLinksRequest.Merge(m, src) } -func (m *QueryUserApplicationLinksRequest) XXX_Size() int { +func (m *QueryApplicationLinksRequest) XXX_Size() int { return m.Size() } -func (m *QueryUserApplicationLinksRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserApplicationLinksRequest.DiscardUnknown(m) +func (m *QueryApplicationLinksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryApplicationLinksRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserApplicationLinksRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryApplicationLinksRequest proto.InternalMessageInfo -func (m *QueryUserApplicationLinksRequest) GetUser() string { +func (m *QueryApplicationLinksRequest) GetUser() string { if m != nil { return m.User } return "" } -func (m *QueryUserApplicationLinksRequest) GetPagination() *query.PageRequest { +func (m *QueryApplicationLinksRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } -// QueryUserApplicationLinksResponse represents the response to the query used +// QueryApplicationLinksResponse represents the response to the query used // to get the application links for a specific user -type QueryUserApplicationLinksResponse struct { +type QueryApplicationLinksResponse struct { Links []ApplicationLink `protobuf:"bytes,1,rep,name=links,proto3" json:"links"` // Pagination defines the pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserApplicationLinksResponse) Reset() { *m = QueryUserApplicationLinksResponse{} } -func (m *QueryUserApplicationLinksResponse) String() string { return proto.CompactTextString(m) } -func (*QueryUserApplicationLinksResponse) ProtoMessage() {} -func (*QueryUserApplicationLinksResponse) Descriptor() ([]byte, []int) { +func (m *QueryApplicationLinksResponse) Reset() { *m = QueryApplicationLinksResponse{} } +func (m *QueryApplicationLinksResponse) String() string { return proto.CompactTextString(m) } +func (*QueryApplicationLinksResponse) ProtoMessage() {} +func (*QueryApplicationLinksResponse) Descriptor() ([]byte, []int) { return fileDescriptor_18d2a2b45fd238cb, []int{3} } -func (m *QueryUserApplicationLinksResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryApplicationLinksResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserApplicationLinksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryApplicationLinksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserApplicationLinksResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryApplicationLinksResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -225,26 +225,26 @@ func (m *QueryUserApplicationLinksResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QueryUserApplicationLinksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserApplicationLinksResponse.Merge(m, src) +func (m *QueryApplicationLinksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryApplicationLinksResponse.Merge(m, src) } -func (m *QueryUserApplicationLinksResponse) XXX_Size() int { +func (m *QueryApplicationLinksResponse) XXX_Size() int { return m.Size() } -func (m *QueryUserApplicationLinksResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserApplicationLinksResponse.DiscardUnknown(m) +func (m *QueryApplicationLinksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryApplicationLinksResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserApplicationLinksResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryApplicationLinksResponse proto.InternalMessageInfo -func (m *QueryUserApplicationLinksResponse) GetLinks() []ApplicationLink { +func (m *QueryApplicationLinksResponse) GetLinks() []ApplicationLink { if m != nil { return m.Links } return nil } -func (m *QueryUserApplicationLinksResponse) GetPagination() *query.PageResponse { +func (m *QueryApplicationLinksResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } @@ -349,8 +349,8 @@ func (m *QueryApplicationLinkByClientIDResponse) GetLink() ApplicationLink { func init() { proto.RegisterType((*QueryUserApplicationLinkRequest)(nil), "desmos.profiles.v1beta1.QueryUserApplicationLinkRequest") proto.RegisterType((*QueryUserApplicationLinkResponse)(nil), "desmos.profiles.v1beta1.QueryUserApplicationLinkResponse") - proto.RegisterType((*QueryUserApplicationLinksRequest)(nil), "desmos.profiles.v1beta1.QueryUserApplicationLinksRequest") - proto.RegisterType((*QueryUserApplicationLinksResponse)(nil), "desmos.profiles.v1beta1.QueryUserApplicationLinksResponse") + proto.RegisterType((*QueryApplicationLinksRequest)(nil), "desmos.profiles.v1beta1.QueryApplicationLinksRequest") + proto.RegisterType((*QueryApplicationLinksResponse)(nil), "desmos.profiles.v1beta1.QueryApplicationLinksResponse") proto.RegisterType((*QueryApplicationLinkByClientIDRequest)(nil), "desmos.profiles.v1beta1.QueryApplicationLinkByClientIDRequest") proto.RegisterType((*QueryApplicationLinkByClientIDResponse)(nil), "desmos.profiles.v1beta1.QueryApplicationLinkByClientIDResponse") } @@ -360,36 +360,36 @@ func init() { } var fileDescriptor_18d2a2b45fd238cb = []byte{ - // 459 bytes of a gzipped FileDescriptorProto + // 460 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xd1, 0x6e, 0xd3, 0x30, - 0x14, 0x6d, 0x58, 0x41, 0x9b, 0xfb, 0x16, 0x21, 0xd1, 0x05, 0x94, 0x95, 0x48, 0x8c, 0x09, 0x69, - 0xb6, 0x36, 0xbe, 0x80, 0x52, 0x01, 0x93, 0x78, 0x80, 0x4a, 0xbc, 0xf0, 0x52, 0x39, 0xc9, 0x6d, - 0xb0, 0xe6, 0xd8, 0x5e, 0xec, 0x20, 0xf2, 0xc2, 0x37, 0xf0, 0x2d, 0x7c, 0xc5, 0x1e, 0xf7, 0xc8, - 0x13, 0x42, 0xed, 0x8f, 0xa0, 0xd8, 0x5e, 0x3b, 0x2a, 0xb2, 0x4a, 0x88, 0x37, 0x5f, 0x9f, 0x73, - 0xef, 0x3d, 0xe7, 0x58, 0x46, 0xc7, 0x39, 0xe8, 0x52, 0x6a, 0xa2, 0x2a, 0x39, 0x67, 0x1c, 0x34, - 0xf9, 0x7c, 0x92, 0x82, 0xa1, 0x27, 0xe4, 0xa2, 0x86, 0xaa, 0x99, 0x51, 0xa5, 0x66, 0x9c, 0x89, - 0x73, 0x8d, 0x55, 0x25, 0x8d, 0x0c, 0x1f, 0x38, 0x3a, 0xbe, 0xa6, 0x63, 0x4f, 0x8f, 0xee, 0x17, - 0xb2, 0x90, 0x96, 0x43, 0xda, 0x93, 0xa3, 0x47, 0x8f, 0x0a, 0x29, 0x0b, 0x0e, 0x84, 0x2a, 0x46, - 0xa8, 0x10, 0xd2, 0x50, 0xc3, 0xa4, 0xf0, 0xc3, 0xa2, 0x7d, 0x8f, 0xda, 0x2a, 0xad, 0xe7, 0x84, - 0x8a, 0xc6, 0x43, 0xb8, 0x4b, 0x56, 0x29, 0x73, 0xe0, 0x7a, 0x53, 0x57, 0xb4, 0x9f, 0xc9, 0x96, - 0x3f, 0x73, 0x0a, 0x5c, 0xe1, 0xa1, 0x67, 0xae, 0x22, 0x29, 0xd5, 0xe0, 0x5c, 0xad, 0x86, 0x29, - 0x5a, 0x30, 0x61, 0x25, 0x39, 0x6e, 0xa2, 0xd1, 0xc1, 0xfb, 0x96, 0xf1, 0x41, 0x43, 0xf5, 0x42, - 0x29, 0xce, 0x32, 0x8b, 0xbe, 0x65, 0xe2, 0x7c, 0x0a, 0x17, 0x35, 0x68, 0x13, 0x86, 0xa8, 0x5f, - 0x6b, 0xa8, 0x86, 0xc1, 0x28, 0x38, 0xda, 0x9b, 0xda, 0x73, 0x38, 0x42, 0x03, 0xba, 0x66, 0x0f, - 0xef, 0x58, 0xe8, 0xe6, 0x55, 0x18, 0xa1, 0xdd, 0x96, 0x29, 0x68, 0x09, 0xc3, 0x1d, 0x0b, 0xaf, - 0xea, 0x64, 0x8e, 0x46, 0xdd, 0x4b, 0xb5, 0x92, 0x42, 0x43, 0x38, 0x46, 0xfd, 0xd6, 0xae, 0xdd, - 0x3a, 0x38, 0x3d, 0xc2, 0x1d, 0xcf, 0x80, 0x37, 0xfa, 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xa7, 0x79, 0xc2, 0xd1, 0xc1, 0x6d, 0x53, 0xee, 0xee, 0x81, 0xc7, 0x6f, 0x2f, 0x16, 0x71, 0x70, + 0xb9, 0x88, 0x83, 0xdf, 0x8b, 0x38, 0xf8, 0xbe, 0x8c, 0x7b, 0x97, 0xcb, 0xb8, 0xf7, 0x73, 0x19, + 0xf7, 0x3e, 0xe1, 0x82, 0x99, 0xcf, 0x75, 0x8a, 0x33, 0x59, 0x12, 0x37, 0xf9, 0x88, 0xd3, 0x54, + 0xfb, 0x33, 0xf9, 0xba, 0xfe, 0x67, 0xa6, 0x51, 0xa0, 0xd3, 0x07, 0xf6, 0x3b, 0xbc, 0xf8, 0x13, + 0x00, 0x00, 0xff, 0xff, 0xb7, 0x75, 0xa8, 0xc0, 0x1e, 0x04, 0x00, 0x00, } func (m *QueryUserApplicationLinkRequest) Marshal() (dAtA []byte, err error) { @@ -469,7 +469,7 @@ func (m *QueryUserApplicationLinkResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *QueryUserApplicationLinksRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryApplicationLinksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -479,12 +479,12 @@ func (m *QueryUserApplicationLinksRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserApplicationLinksRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryApplicationLinksRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserApplicationLinksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryApplicationLinksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -511,7 +511,7 @@ func (m *QueryUserApplicationLinksRequest) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *QueryUserApplicationLinksResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryApplicationLinksResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -521,12 +521,12 @@ func (m *QueryUserApplicationLinksResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserApplicationLinksResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryApplicationLinksResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserApplicationLinksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryApplicationLinksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -666,7 +666,7 @@ func (m *QueryUserApplicationLinkResponse) Size() (n int) { return n } -func (m *QueryUserApplicationLinksRequest) Size() (n int) { +func (m *QueryApplicationLinksRequest) Size() (n int) { if m == nil { return 0 } @@ -683,7 +683,7 @@ func (m *QueryUserApplicationLinksRequest) Size() (n int) { return n } -func (m *QueryUserApplicationLinksResponse) Size() (n int) { +func (m *QueryApplicationLinksResponse) Size() (n int) { if m == nil { return 0 } @@ -961,7 +961,7 @@ func (m *QueryUserApplicationLinkResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserApplicationLinksRequest) Unmarshal(dAtA []byte) error { +func (m *QueryApplicationLinksRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -984,10 +984,10 @@ func (m *QueryUserApplicationLinksRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserApplicationLinksRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryApplicationLinksRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserApplicationLinksRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryApplicationLinksRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1079,7 +1079,7 @@ func (m *QueryUserApplicationLinksRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserApplicationLinksResponse) Unmarshal(dAtA []byte) error { +func (m *QueryApplicationLinksResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1102,10 +1102,10 @@ func (m *QueryUserApplicationLinksResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserApplicationLinksResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryApplicationLinksResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserApplicationLinksResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryApplicationLinksResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/profiles/types/query_chain_links.pb.go b/x/profiles/types/query_chain_links.pb.go index c6bcef8de3..88e11fa166 100644 --- a/x/profiles/types/query_chain_links.pb.go +++ b/x/profiles/types/query_chain_links.pb.go @@ -139,26 +139,26 @@ func (m *QueryUserChainLinkResponse) GetLink() ChainLink { return ChainLink{} } -// QueryUserChainLinksRequest is the request type for the -// Query/UserChainLinks RPC endpoint -type QueryUserChainLinksRequest struct { +// QueryChainLinksRequest is the request type for the +// Query/ChainLinks RPC endpoint +type QueryChainLinksRequest struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // Pagination defines an optional pagination for the request Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserChainLinksRequest) Reset() { *m = QueryUserChainLinksRequest{} } -func (m *QueryUserChainLinksRequest) String() string { return proto.CompactTextString(m) } -func (*QueryUserChainLinksRequest) ProtoMessage() {} -func (*QueryUserChainLinksRequest) Descriptor() ([]byte, []int) { +func (m *QueryChainLinksRequest) Reset() { *m = QueryChainLinksRequest{} } +func (m *QueryChainLinksRequest) String() string { return proto.CompactTextString(m) } +func (*QueryChainLinksRequest) ProtoMessage() {} +func (*QueryChainLinksRequest) Descriptor() ([]byte, []int) { return fileDescriptor_c44c4be38a628772, []int{2} } -func (m *QueryUserChainLinksRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryChainLinksRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserChainLinksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryChainLinksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserChainLinksRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryChainLinksRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -168,52 +168,52 @@ func (m *QueryUserChainLinksRequest) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *QueryUserChainLinksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserChainLinksRequest.Merge(m, src) +func (m *QueryChainLinksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryChainLinksRequest.Merge(m, src) } -func (m *QueryUserChainLinksRequest) XXX_Size() int { +func (m *QueryChainLinksRequest) XXX_Size() int { return m.Size() } -func (m *QueryUserChainLinksRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserChainLinksRequest.DiscardUnknown(m) +func (m *QueryChainLinksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryChainLinksRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserChainLinksRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryChainLinksRequest proto.InternalMessageInfo -func (m *QueryUserChainLinksRequest) GetUser() string { +func (m *QueryChainLinksRequest) GetUser() string { if m != nil { return m.User } return "" } -func (m *QueryUserChainLinksRequest) GetPagination() *query.PageRequest { +func (m *QueryChainLinksRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } -// QueryUserChainLinksResponse is the response type for the -// Query/UserChainLinks RPC method. -type QueryUserChainLinksResponse struct { +// QueryChainLinksResponse is the response type for the +// Query/ChainLinks RPC method. +type QueryChainLinksResponse struct { Links []ChainLink `protobuf:"bytes,1,rep,name=links,proto3" json:"links"` // Pagination defines the pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserChainLinksResponse) Reset() { *m = QueryUserChainLinksResponse{} } -func (m *QueryUserChainLinksResponse) String() string { return proto.CompactTextString(m) } -func (*QueryUserChainLinksResponse) ProtoMessage() {} -func (*QueryUserChainLinksResponse) Descriptor() ([]byte, []int) { +func (m *QueryChainLinksResponse) Reset() { *m = QueryChainLinksResponse{} } +func (m *QueryChainLinksResponse) String() string { return proto.CompactTextString(m) } +func (*QueryChainLinksResponse) ProtoMessage() {} +func (*QueryChainLinksResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c44c4be38a628772, []int{3} } -func (m *QueryUserChainLinksResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryChainLinksResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserChainLinksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryChainLinksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserChainLinksResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryChainLinksResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -223,26 +223,26 @@ func (m *QueryUserChainLinksResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *QueryUserChainLinksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserChainLinksResponse.Merge(m, src) +func (m *QueryChainLinksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryChainLinksResponse.Merge(m, src) } -func (m *QueryUserChainLinksResponse) XXX_Size() int { +func (m *QueryChainLinksResponse) XXX_Size() int { return m.Size() } -func (m *QueryUserChainLinksResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserChainLinksResponse.DiscardUnknown(m) +func (m *QueryChainLinksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryChainLinksResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserChainLinksResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryChainLinksResponse proto.InternalMessageInfo -func (m *QueryUserChainLinksResponse) GetLinks() []ChainLink { +func (m *QueryChainLinksResponse) GetLinks() []ChainLink { if m != nil { return m.Links } return nil } -func (m *QueryUserChainLinksResponse) GetPagination() *query.PageResponse { +func (m *QueryChainLinksResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } @@ -252,8 +252,8 @@ func (m *QueryUserChainLinksResponse) GetPagination() *query.PageResponse { func init() { proto.RegisterType((*QueryUserChainLinkRequest)(nil), "desmos.profiles.v1beta1.QueryUserChainLinkRequest") proto.RegisterType((*QueryUserChainLinkResponse)(nil), "desmos.profiles.v1beta1.QueryUserChainLinkResponse") - proto.RegisterType((*QueryUserChainLinksRequest)(nil), "desmos.profiles.v1beta1.QueryUserChainLinksRequest") - proto.RegisterType((*QueryUserChainLinksResponse)(nil), "desmos.profiles.v1beta1.QueryUserChainLinksResponse") + proto.RegisterType((*QueryChainLinksRequest)(nil), "desmos.profiles.v1beta1.QueryChainLinksRequest") + proto.RegisterType((*QueryChainLinksResponse)(nil), "desmos.profiles.v1beta1.QueryChainLinksResponse") } func init() { @@ -261,34 +261,34 @@ func init() { } var fileDescriptor_c44c4be38a628772 = []byte{ - // 420 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xbd, 0xae, 0xd3, 0x30, - 0x14, 0x4e, 0xb8, 0xe5, 0x4a, 0xd7, 0x77, 0x8b, 0x10, 0xa4, 0x01, 0xc2, 0x55, 0x06, 0x40, 0x48, - 0xd8, 0xb4, 0xac, 0x88, 0xa1, 0x48, 0xc0, 0x80, 0x10, 0x44, 0x62, 0xe9, 0x52, 0x39, 0xed, 0xa9, - 0x6b, 0x35, 0xb1, 0xd3, 0xd8, 0x41, 0xed, 0x5b, 0xf0, 0x14, 0x3c, 0x4b, 0xc7, 0x8e, 0x4c, 0x08, - 0xb5, 0x2f, 0x82, 0x62, 0xbb, 0x3f, 0x12, 0x29, 0x88, 0xcd, 0x27, 0xe7, 0x7c, 0xe7, 0xfb, 0x89, - 0x8d, 0xc8, 0x04, 0x54, 0x21, 0x15, 0x29, 0x2b, 0x39, 0xe5, 0x39, 0x28, 0xf2, 0xb5, 0x97, 0x81, - 0xa6, 0x3d, 0xb2, 0xa8, 0xa1, 0x5a, 0x8d, 0xc6, 0x33, 0xca, 0xc5, 0x28, 0xe7, 0x62, 0xae, 0x70, - 0x59, 0x49, 0x2d, 0x83, 0x7b, 0x16, 0x80, 0xf7, 0x00, 0xec, 0x00, 0xd1, 0x1d, 0x26, 0x99, 0x34, - 0x33, 0xa4, 0x39, 0xd9, 0xf1, 0xe8, 0x01, 0x93, 0x92, 0xe5, 0x40, 0x68, 0xc9, 0x09, 0x15, 0x42, - 0x6a, 0xaa, 0xb9, 0x14, 0x6e, 0x59, 0xd4, 0x75, 0x5d, 0x53, 0x65, 0xf5, 0x94, 0x50, 0xb1, 0x72, - 0xad, 0x17, 0xe7, 0x84, 0x15, 0x72, 0x02, 0xb9, 0xfa, 0x53, 0x59, 0xd4, 0x1d, 0xcb, 0x06, 0x31, - 0xb2, 0x1a, 0x6c, 0xe1, 0x5a, 0xcf, 0x6c, 0x45, 0x32, 0xaa, 0xc0, 0x3a, 0x3b, 0xac, 0x2b, 0x29, - 0xe3, 0xc2, 0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x6f, 0x88, 0x19, 0xd7, 0xb3, 0x3a, 0xc3, 0x63, - 0x59, 0xb8, 0xd7, 0xf1, 0x3c, 0xa7, 0x99, 0xda, 0xbf, 0x94, 0xe5, 0xf1, 0x4a, 0xea, 0x55, 0x09, - 0x2a, 0xbb, 0x34, 0xf7, 0xe6, 0xe5, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0x42, 0xc8, 0xc6, - 0x4b, 0x03, 0x00, 0x00, + // 424 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xc1, 0x8e, 0xd3, 0x30, + 0x10, 0x4d, 0xd8, 0xb2, 0xd2, 0x7a, 0x6f, 0x11, 0xda, 0x4d, 0x23, 0x08, 0xab, 0x1c, 0x00, 0x21, + 0x61, 0xb3, 0xe5, 0x8a, 0x38, 0x14, 0x09, 0x38, 0x20, 0x04, 0x91, 0xb8, 0xf4, 0x52, 0x39, 0xed, + 0xd4, 0xb5, 0x9a, 0xd8, 0x69, 0xec, 0x20, 0xfa, 0x17, 0x7c, 0x03, 0x5f, 0xd3, 0x63, 0x8f, 0x9c, + 0x10, 0x6a, 0x7f, 0x04, 0xc5, 0x76, 0xd3, 0x4a, 0x6d, 0x41, 0x7b, 0xf3, 0xe4, 0xcd, 0x9b, 0xf7, + 0xde, 0xc4, 0x46, 0x64, 0x0c, 0xaa, 0x90, 0x8a, 0x94, 0x95, 0x9c, 0xf0, 0x1c, 0x14, 0xf9, 0x76, + 0x9b, 0x81, 0xa6, 0xb7, 0x64, 0x5e, 0x43, 0xb5, 0x18, 0x8e, 0xa6, 0x94, 0x8b, 0x61, 0xce, 0xc5, + 0x4c, 0xe1, 0xb2, 0x92, 0x5a, 0x06, 0xd7, 0x96, 0x80, 0xb7, 0x04, 0xec, 0x08, 0xd1, 0x03, 0x26, + 0x99, 0x34, 0x3d, 0xa4, 0x39, 0xd9, 0xf6, 0xe8, 0x21, 0x93, 0x92, 0xe5, 0x40, 0x68, 0xc9, 0x09, + 0x15, 0x42, 0x6a, 0xaa, 0xb9, 0x14, 0x6e, 0x58, 0xd4, 0x75, 0xa8, 0xa9, 0xb2, 0x7a, 0x42, 0xa8, + 0x58, 0x38, 0xe8, 0xe5, 0x29, 0x63, 0x85, 0x1c, 0x43, 0xae, 0x0e, 0x9d, 0x45, 0xdd, 0x91, 0x6c, + 0x18, 0x43, 0xeb, 0xc1, 0x16, 0x0e, 0x7a, 0x6e, 0x2b, 0x92, 0x51, 0x05, 0x36, 0x59, 0x3b, 0xae, + 0xa4, 0x8c, 0x0b, 0x63, 0xca, 0xf6, 0x26, 0x13, 0xd4, 0xfd, 0xd2, 0x74, 0x7c, 0x55, 0x50, 0xbd, + 0x6d, 0x44, 0x3e, 0x72, 0x31, 0x4b, 0x61, 0x5e, 0x83, 0xd2, 0x41, 0x80, 0x3a, 0xb5, 0x82, 0x2a, + 0xf4, 0x6f, 0xfc, 0x67, 0x17, 0xa9, 0x39, 0x07, 0x8f, 0x10, 0xb2, 0x66, 0x04, 0x2d, 0x20, 0xbc, + 0x67, 0x90, 0x0b, 0xf3, 0xe5, 0x13, 0x2d, 0x20, 0xb8, 0x42, 0xe7, 0x9a, 0x56, 0x0c, 0x74, 0x78, + 0x66, 0x20, 0x57, 0x25, 0x03, 0x14, 0x1d, 0xd3, 0x51, 0xa5, 0x14, 0x0a, 0x82, 0xd7, 0xa8, 0xd3, + 0x64, 0x33, 0x42, 0x97, 0xbd, 0x04, 0x9f, 0xd8, 0x3a, 0x6e, 0x99, 0xfd, 0xce, 0xf2, 0xf7, 0x63, + 0x2f, 0x35, 0xac, 0x44, 0xa3, 0x2b, 0x33, 0xbb, 0x45, 0xd5, 0xbf, 0x02, 0xbc, 0x43, 0x68, 0xb7, + 0x05, 0x13, 0xe0, 0xb2, 0xf7, 0x04, 0xbb, 0x05, 0x36, 0x2b, 0xc3, 0x66, 0x65, 0xad, 0xe6, 0x67, + 0xca, 0xc0, 0xcd, 0x4b, 0xf7, 0x98, 0xc9, 0x4f, 0x1f, 0x5d, 0x1f, 0xc8, 0xba, 0x3c, 0x6f, 0xd0, + 0x7d, 0xf3, 0xaf, 0x42, 0xff, 0xe6, 0xec, 0x4e, 0x81, 0x2c, 0x2d, 0x78, 0x7f, 0xc4, 0xe3, 0xd3, + 0xff, 0x7a, 0xb4, 0xe2, 0xfb, 0x26, 0xfb, 0x1f, 0x96, 0xeb, 0xd8, 0x5f, 0xad, 0x63, 0xff, 0xcf, + 0x3a, 0xf6, 0x7f, 0x6c, 0x62, 0x6f, 0xb5, 0x89, 0xbd, 0x5f, 0x9b, 0xd8, 0x1b, 0x60, 0xc6, 0xf5, + 0xb4, 0xce, 0xf0, 0x48, 0x16, 0xee, 0x55, 0xbc, 0xc8, 0x69, 0xa6, 0xb6, 0x2f, 0xe4, 0xfb, 0xee, + 0x2a, 0xea, 0x45, 0x09, 0x2a, 0x3b, 0x37, 0xf7, 0xe5, 0xd5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x0b, 0xb6, 0x3f, 0x0a, 0x43, 0x03, 0x00, 0x00, } func (m *QueryUserChainLinkRequest) Marshal() (dAtA []byte, err error) { @@ -368,7 +368,7 @@ func (m *QueryUserChainLinkResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *QueryUserChainLinksRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryChainLinksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -378,12 +378,12 @@ func (m *QueryUserChainLinksRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserChainLinksRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryChainLinksRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserChainLinksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryChainLinksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -410,7 +410,7 @@ func (m *QueryUserChainLinksRequest) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *QueryUserChainLinksResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryChainLinksResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -420,12 +420,12 @@ func (m *QueryUserChainLinksResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserChainLinksResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryChainLinksResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserChainLinksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryChainLinksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -502,7 +502,7 @@ func (m *QueryUserChainLinkResponse) Size() (n int) { return n } -func (m *QueryUserChainLinksRequest) Size() (n int) { +func (m *QueryChainLinksRequest) Size() (n int) { if m == nil { return 0 } @@ -519,7 +519,7 @@ func (m *QueryUserChainLinksRequest) Size() (n int) { return n } -func (m *QueryUserChainLinksResponse) Size() (n int) { +func (m *QueryChainLinksResponse) Size() (n int) { if m == nil { return 0 } @@ -773,7 +773,7 @@ func (m *QueryUserChainLinkResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserChainLinksRequest) Unmarshal(dAtA []byte) error { +func (m *QueryChainLinksRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -796,10 +796,10 @@ func (m *QueryUserChainLinksRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserChainLinksRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryChainLinksRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserChainLinksRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryChainLinksRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -891,7 +891,7 @@ func (m *QueryUserChainLinksRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserChainLinksResponse) Unmarshal(dAtA []byte) error { +func (m *QueryChainLinksResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -914,10 +914,10 @@ func (m *QueryUserChainLinksResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserChainLinksResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryChainLinksResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserChainLinksResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryChainLinksResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/profiles/types/query_relationships.pb.go b/x/profiles/types/query_relationships.pb.go index 322a988dab..1db4f9f6e7 100644 --- a/x/profiles/types/query_relationships.pb.go +++ b/x/profiles/types/query_relationships.pb.go @@ -27,9 +27,9 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// QueryUserRelationshipsRequest is the request type for the -// Query/UserRelationships RPC method. -type QueryUserRelationshipsRequest struct { +// QueryRelationshipsRequest is the request type for the +// Query/Relationships RPC method. +type QueryRelationshipsRequest struct { // address of the user to query the relationships for User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // subspace to query the relationships for @@ -38,18 +38,18 @@ type QueryUserRelationshipsRequest struct { Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserRelationshipsRequest) Reset() { *m = QueryUserRelationshipsRequest{} } -func (m *QueryUserRelationshipsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryUserRelationshipsRequest) ProtoMessage() {} -func (*QueryUserRelationshipsRequest) Descriptor() ([]byte, []int) { +func (m *QueryRelationshipsRequest) Reset() { *m = QueryRelationshipsRequest{} } +func (m *QueryRelationshipsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRelationshipsRequest) ProtoMessage() {} +func (*QueryRelationshipsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_c0b8922e87a25523, []int{0} } -func (m *QueryUserRelationshipsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryRelationshipsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserRelationshipsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryRelationshipsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserRelationshipsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryRelationshipsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -59,41 +59,38 @@ func (m *QueryUserRelationshipsRequest) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *QueryUserRelationshipsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserRelationshipsRequest.Merge(m, src) +func (m *QueryRelationshipsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRelationshipsRequest.Merge(m, src) } -func (m *QueryUserRelationshipsRequest) XXX_Size() int { +func (m *QueryRelationshipsRequest) XXX_Size() int { return m.Size() } -func (m *QueryUserRelationshipsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserRelationshipsRequest.DiscardUnknown(m) +func (m *QueryRelationshipsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRelationshipsRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserRelationshipsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryRelationshipsRequest proto.InternalMessageInfo -// QueryUserRelationshipsResponse is the response type for the -// Query/UserRelationships RPC method. -type QueryUserRelationshipsResponse struct { - User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` - // relationships represent the list of all the relationships for the queried - // user - Relationships []Relationship `protobuf:"bytes,2,rep,name=relationships,proto3" json:"relationships"` +// QueryRelationshipsResponse is the response type for the +// Query/Relationships RPC method. +type QueryRelationshipsResponse struct { + Relationships []Relationship `protobuf:"bytes,1,rep,name=relationships,proto3" json:"relationships"` // pagination defines an optional pagination for the request. - Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserRelationshipsResponse) Reset() { *m = QueryUserRelationshipsResponse{} } -func (m *QueryUserRelationshipsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryUserRelationshipsResponse) ProtoMessage() {} -func (*QueryUserRelationshipsResponse) Descriptor() ([]byte, []int) { +func (m *QueryRelationshipsResponse) Reset() { *m = QueryRelationshipsResponse{} } +func (m *QueryRelationshipsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRelationshipsResponse) ProtoMessage() {} +func (*QueryRelationshipsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c0b8922e87a25523, []int{1} } -func (m *QueryUserRelationshipsResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryRelationshipsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserRelationshipsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryRelationshipsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserRelationshipsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryRelationshipsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -103,60 +100,53 @@ func (m *QueryUserRelationshipsResponse) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *QueryUserRelationshipsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserRelationshipsResponse.Merge(m, src) +func (m *QueryRelationshipsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRelationshipsResponse.Merge(m, src) } -func (m *QueryUserRelationshipsResponse) XXX_Size() int { +func (m *QueryRelationshipsResponse) XXX_Size() int { return m.Size() } -func (m *QueryUserRelationshipsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserRelationshipsResponse.DiscardUnknown(m) +func (m *QueryRelationshipsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRelationshipsResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserRelationshipsResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryRelationshipsResponse proto.InternalMessageInfo -func (m *QueryUserRelationshipsResponse) GetUser() string { - if m != nil { - return m.User - } - return "" -} - -func (m *QueryUserRelationshipsResponse) GetRelationships() []Relationship { +func (m *QueryRelationshipsResponse) GetRelationships() []Relationship { if m != nil { return m.Relationships } return nil } -func (m *QueryUserRelationshipsResponse) GetPagination() *query.PageResponse { +func (m *QueryRelationshipsResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } -// QueryUserBlocksRequest is the request type for the Query/UserBlocks RPC +// QueryBlocksRequest is the request type for the Query/Blocks RPC // endpoint -type QueryUserBlocksRequest struct { +type QueryBlocksRequest struct { // address of the user to query the blocks for User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` SubspaceId string `protobuf:"bytes,2,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty"` Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserBlocksRequest) Reset() { *m = QueryUserBlocksRequest{} } -func (m *QueryUserBlocksRequest) String() string { return proto.CompactTextString(m) } -func (*QueryUserBlocksRequest) ProtoMessage() {} -func (*QueryUserBlocksRequest) Descriptor() ([]byte, []int) { +func (m *QueryBlocksRequest) Reset() { *m = QueryBlocksRequest{} } +func (m *QueryBlocksRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBlocksRequest) ProtoMessage() {} +func (*QueryBlocksRequest) Descriptor() ([]byte, []int) { return fileDescriptor_c0b8922e87a25523, []int{2} } -func (m *QueryUserBlocksRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryBlocksRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserBlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryBlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserBlocksRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryBlocksRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -166,38 +156,37 @@ func (m *QueryUserBlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *QueryUserBlocksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserBlocksRequest.Merge(m, src) +func (m *QueryBlocksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBlocksRequest.Merge(m, src) } -func (m *QueryUserBlocksRequest) XXX_Size() int { +func (m *QueryBlocksRequest) XXX_Size() int { return m.Size() } -func (m *QueryUserBlocksRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserBlocksRequest.DiscardUnknown(m) +func (m *QueryBlocksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBlocksRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserBlocksRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryBlocksRequest proto.InternalMessageInfo -// QueryUserBlocksResponse is the response type for the Query/UserBlocks RPC +// QueryBlocksResponse is the response type for the Query/Blocks RPC // method. -type QueryUserBlocksResponse struct { - // blocks represent the list of all the blocks for the queried user +type QueryBlocksResponse struct { Blocks []UserBlock `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserBlocksResponse) Reset() { *m = QueryUserBlocksResponse{} } -func (m *QueryUserBlocksResponse) String() string { return proto.CompactTextString(m) } -func (*QueryUserBlocksResponse) ProtoMessage() {} -func (*QueryUserBlocksResponse) Descriptor() ([]byte, []int) { +func (m *QueryBlocksResponse) Reset() { *m = QueryBlocksResponse{} } +func (m *QueryBlocksResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBlocksResponse) ProtoMessage() {} +func (*QueryBlocksResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c0b8922e87a25523, []int{3} } -func (m *QueryUserBlocksResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryBlocksResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserBlocksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryBlocksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserBlocksResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryBlocksResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -207,26 +196,26 @@ func (m *QueryUserBlocksResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *QueryUserBlocksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserBlocksResponse.Merge(m, src) +func (m *QueryBlocksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBlocksResponse.Merge(m, src) } -func (m *QueryUserBlocksResponse) XXX_Size() int { +func (m *QueryBlocksResponse) XXX_Size() int { return m.Size() } -func (m *QueryUserBlocksResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserBlocksResponse.DiscardUnknown(m) +func (m *QueryBlocksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBlocksResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserBlocksResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryBlocksResponse proto.InternalMessageInfo -func (m *QueryUserBlocksResponse) GetBlocks() []UserBlock { +func (m *QueryBlocksResponse) GetBlocks() []UserBlock { if m != nil { return m.Blocks } return nil } -func (m *QueryUserBlocksResponse) GetPagination() *query.PageResponse { +func (m *QueryBlocksResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } @@ -234,10 +223,10 @@ func (m *QueryUserBlocksResponse) GetPagination() *query.PageResponse { } func init() { - proto.RegisterType((*QueryUserRelationshipsRequest)(nil), "desmos.profiles.v1beta1.QueryUserRelationshipsRequest") - proto.RegisterType((*QueryUserRelationshipsResponse)(nil), "desmos.profiles.v1beta1.QueryUserRelationshipsResponse") - proto.RegisterType((*QueryUserBlocksRequest)(nil), "desmos.profiles.v1beta1.QueryUserBlocksRequest") - proto.RegisterType((*QueryUserBlocksResponse)(nil), "desmos.profiles.v1beta1.QueryUserBlocksResponse") + proto.RegisterType((*QueryRelationshipsRequest)(nil), "desmos.profiles.v1beta1.QueryRelationshipsRequest") + proto.RegisterType((*QueryRelationshipsResponse)(nil), "desmos.profiles.v1beta1.QueryRelationshipsResponse") + proto.RegisterType((*QueryBlocksRequest)(nil), "desmos.profiles.v1beta1.QueryBlocksRequest") + proto.RegisterType((*QueryBlocksResponse)(nil), "desmos.profiles.v1beta1.QueryBlocksResponse") } func init() { @@ -245,39 +234,38 @@ func init() { } var fileDescriptor_c0b8922e87a25523 = []byte{ - // 451 bytes of a gzipped FileDescriptorProto + // 447 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x93, 0xbf, 0x8e, 0xd3, 0x40, - 0x10, 0xc6, 0xbd, 0xb9, 0xd3, 0x09, 0x36, 0xa2, 0xb1, 0x10, 0xe7, 0x8b, 0xc0, 0x89, 0x22, 0x01, + 0x10, 0xc6, 0xbd, 0x77, 0xa7, 0x13, 0x6c, 0x44, 0xb3, 0x20, 0x91, 0x44, 0xc8, 0x89, 0x22, 0x01, 0x11, 0x12, 0xbb, 0x4a, 0xe8, 0xa8, 0x50, 0x0a, 0xfe, 0x74, 0x9c, 0x25, 0x1a, 0x9a, 0x68, 0x37, - 0x99, 0xf3, 0x59, 0x38, 0xde, 0x3d, 0x8f, 0x8d, 0xc8, 0x1b, 0x50, 0xf2, 0x06, 0x5c, 0x81, 0x78, - 0x96, 0x2b, 0x53, 0x52, 0x21, 0x94, 0x34, 0x3c, 0x06, 0xf2, 0xee, 0x26, 0xe7, 0x40, 0x2c, 0x24, - 0x2a, 0xba, 0x19, 0xcf, 0x7c, 0x33, 0xbf, 0xf9, 0xac, 0xa5, 0xc3, 0x19, 0xe0, 0x5c, 0x21, 0xd7, - 0xb9, 0x3a, 0x4b, 0x52, 0x40, 0xfe, 0x7e, 0x28, 0xa1, 0x10, 0x43, 0x7e, 0x51, 0x42, 0xbe, 0x98, - 0xe4, 0x90, 0x8a, 0x22, 0x51, 0x19, 0x9e, 0x27, 0x1a, 0x99, 0xce, 0x55, 0xa1, 0xfc, 0x63, 0x2b, - 0x61, 0x1b, 0x09, 0x73, 0x92, 0xce, 0xed, 0x58, 0xc5, 0xca, 0xf4, 0xf0, 0x2a, 0xb2, 0xed, 0x9d, - 0xbb, 0xb1, 0x52, 0x71, 0x0a, 0x5c, 0xe8, 0x84, 0x8b, 0x2c, 0x53, 0x85, 0x1d, 0xe8, 0xaa, 0x27, - 0xae, 0x6a, 0x32, 0x59, 0x9e, 0x71, 0x91, 0x2d, 0x5c, 0x69, 0xd4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, 0xcf, 0xcf, 0xc7, 0x9b, 0x63, 0x66, 0x47, + 0x17, 0x3f, 0x07, 0x41, 0xd4, 0x9e, 0xc0, 0x5e, 0xb5, 0x6e, 0x38, 0xb0, 0x37, 0x3c, 0xfe, 0xe7, + 0x0d, 0x8e, 0xa7, 0x79, 0xc4, 0xe8, 0x2b, 0xa1, 0xcc, 0xa2, 0xcf, 0x32, 0xbd, 0xf8, 0x70, 0xd3, + 0x8c, 0x5d, 0x13, 0x7a, 0xb7, 0x45, 0xe7, 0x1d, 0x7d, 0x41, 0x8f, 0x95, 0x7d, 0xf1, 0x56, 0x8e, + 0xf6, 0x5a, 0xf9, 0x0e, 0xa1, 0xb0, 0x62, 0xef, 0xa3, 0xd7, 0xfd, 0x37, 0x03, 0x67, 0xaf, 0x2f, + 0x36, 0x21, 0xb9, 0xdc, 0x84, 0xe4, 0xd7, 0x26, 0x24, 0x5f, 0xb6, 0x61, 0x70, 0xb9, 0x0d, 0x83, + 0x1f, 0xdb, 0x30, 0x78, 0xcf, 0x93, 0xb4, 0x3c, 0xab, 0x14, 0x5f, 0xe8, 0xa5, 0x70, 0x78, 0x4f, + 0x33, 0xa9, 0xd0, 0xc7, 0xe2, 0xd3, 0xd5, 0xe7, 0x54, 0xae, 0x0c, 0xa0, 0x3a, 0xb6, 0xff, 0xf8, + 0x67, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x67, 0x86, 0xe3, 0x1b, 0x09, 0x04, 0x00, 0x00, } -func (m *QueryUserRelationshipsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryRelationshipsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -287,12 +275,12 @@ func (m *QueryUserRelationshipsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserRelationshipsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryRelationshipsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserRelationshipsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryRelationshipsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -326,7 +314,7 @@ func (m *QueryUserRelationshipsRequest) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryUserRelationshipsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryRelationshipsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -336,12 +324,12 @@ func (m *QueryUserRelationshipsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserRelationshipsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryRelationshipsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserRelationshipsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryRelationshipsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -356,7 +344,7 @@ func (m *QueryUserRelationshipsResponse) MarshalToSizedBuffer(dAtA []byte) (int, i = encodeVarintQueryRelationships(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(m.Relationships) > 0 { for iNdEx := len(m.Relationships) - 1; iNdEx >= 0; iNdEx-- { @@ -369,20 +357,13 @@ func (m *QueryUserRelationshipsResponse) MarshalToSizedBuffer(dAtA []byte) (int, i = encodeVarintQueryRelationships(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0xa } } - if len(m.User) > 0 { - i -= len(m.User) - copy(dAtA[i:], m.User) - i = encodeVarintQueryRelationships(dAtA, i, uint64(len(m.User))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } -func (m *QueryUserBlocksRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryBlocksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -392,12 +373,12 @@ func (m *QueryUserBlocksRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserBlocksRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryBlocksRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserBlocksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryBlocksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -431,7 +412,7 @@ func (m *QueryUserBlocksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryUserBlocksResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryBlocksResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -441,12 +422,12 @@ func (m *QueryUserBlocksResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserBlocksResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryBlocksResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserBlocksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryBlocksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -491,7 +472,7 @@ func encodeVarintQueryRelationships(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryUserRelationshipsRequest) Size() (n int) { +func (m *QueryRelationshipsRequest) Size() (n int) { if m == nil { return 0 } @@ -512,16 +493,12 @@ func (m *QueryUserRelationshipsRequest) Size() (n int) { return n } -func (m *QueryUserRelationshipsResponse) Size() (n int) { +func (m *QueryRelationshipsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.User) - if l > 0 { - n += 1 + l + sovQueryRelationships(uint64(l)) - } if len(m.Relationships) > 0 { for _, e := range m.Relationships { l = e.Size() @@ -535,7 +512,7 @@ func (m *QueryUserRelationshipsResponse) Size() (n int) { return n } -func (m *QueryUserBlocksRequest) Size() (n int) { +func (m *QueryBlocksRequest) Size() (n int) { if m == nil { return 0 } @@ -556,7 +533,7 @@ func (m *QueryUserBlocksRequest) Size() (n int) { return n } -func (m *QueryUserBlocksResponse) Size() (n int) { +func (m *QueryBlocksResponse) Size() (n int) { if m == nil { return 0 } @@ -581,7 +558,7 @@ func sovQueryRelationships(x uint64) (n int) { func sozQueryRelationships(x uint64) (n int) { return sovQueryRelationships(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *QueryUserRelationshipsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryRelationshipsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -604,10 +581,10 @@ func (m *QueryUserRelationshipsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserRelationshipsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRelationshipsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -731,7 +708,7 @@ func (m *QueryUserRelationshipsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserRelationshipsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryRelationshipsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -754,45 +731,13 @@ func (m *QueryUserRelationshipsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserRelationshipsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRelationshipsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQueryRelationships - } - 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 ErrInvalidLengthQueryRelationships - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQueryRelationships - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.User = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Relationships", wireType) } @@ -826,7 +771,7 @@ func (m *QueryUserRelationshipsResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -883,7 +828,7 @@ func (m *QueryUserRelationshipsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserBlocksRequest) Unmarshal(dAtA []byte) error { +func (m *QueryBlocksRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -906,10 +851,10 @@ func (m *QueryUserBlocksRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserBlocksRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBlocksRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserBlocksRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBlocksRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1033,7 +978,7 @@ func (m *QueryUserBlocksRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserBlocksResponse) Unmarshal(dAtA []byte) error { +func (m *QueryBlocksResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1056,10 +1001,10 @@ func (m *QueryUserBlocksResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserBlocksResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBlocksResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserBlocksResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBlocksResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: