-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b69d3d7
commit 603602e
Showing
4 changed files
with
71 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package types | ||
|
||
import ( | ||
"context" | ||
|
||
gogogrpc "github.com/cosmos/gogoproto/grpc" | ||
|
||
"github.com/pokt-network/poktroll/pkg/client" | ||
) | ||
|
||
// TODO_IN_THIS_COMMIT: godoc... | ||
type ProofQueryClient interface { | ||
QueryClient | ||
|
||
GetParams(context.Context) (client.ProofParams, error) | ||
} | ||
|
||
// TODO_IN_THIS_COMMIT: godoc... | ||
func NewProofQueryClient(conn gogogrpc.ClientConn) ProofQueryClient { | ||
return NewQueryClient(conn).(ProofQueryClient) | ||
} | ||
|
||
// TODO_IN_THIS_COMMIT: investigate generalization... | ||
// TODO_IN_THIS_COMMIT: godoc... | ||
func (c *queryClient) GetParams(ctx context.Context) (client.ProofParams, error) { | ||
res, err := c.Params(ctx, &QueryParamsRequest{}) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
params := res.GetParams() | ||
return ¶ms, nil | ||
} |