diff --git a/.gitignore b/.gitignore index c48b62d..67e7649 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ # IDE/Tools .docker .idea -/.vscode +.vscode # vim .*.sw? @@ -27,5 +27,8 @@ vendor/ # Cloud API key .coinbase_cloud_api_key*.json -# Example binary -staking-client-* +# Example binaries +bin + +# VSCode artifacts +**/__debug_bin** diff --git a/LICENSE b/LICENSE index 05f48c2..2d2fd2a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2023 Coinbase, Inc. +Copyright (c) 2018-2024 Coinbase, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index bc90261..db8c58e 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,263 @@ -# Staking API Go Client Library +![Coinbase Staking API](docs/images/banner.svg) -This repository contains the Protocol Buffer definitions for the Coinbase **Staking API**, as well as the Go client libraries generated from them. +# [Coinbase Staking API](https://github.com/coinbase/staking-client-library-go) + +> Programmatic access to Coinbase's best-in-class staking infrastructure and services. :large_blue_circle: + +[![Current version](https://img.shields.io/github/tag/coinbase/staking-client-library-go?color=3498DB&label=version)](https://github.com/coinbase/staking-client-library-go/releases) [![GitHub contributors](https://img.shields.io/github/contributors/coinbase/staking-client-library-go?color=3498DB)](https://github.com/coinbase/staking-client-library-go/graphs/contributors) [![GitHub Stars](https://img.shields.io/github/stars/coinbase/staking-client-library-go.svg?color=3498DB)](https://github.com/coinbase/staking-client-library-go/stargazers) [![GitHub](https://img.shields.io/github/license/coinbase/staking-client-library-go?color=3498DB)](https://github.com/coinbase/staking-client-library-go/blob/main/LICENSE) ## Overview -Staking API provides a set of APIs to aid in non-custodial staking for multiple protocols and networks. +The **Coinbase Staking API** empowers developers to deliver a fully-featured staking experience in their Web2 apps, wallets, or dApps using *one common interface* across protocols. -# Documentation +A traditional infrastructure-heavy staking integration can take months. Coinbase's Staking API enables onboarding within hours by providing powerful and simple APIs on both sides of the staking experience. -In order to self-host the documentation run please use the swagger-ui docker container like so: +* [Orchestration](./protos/coinbase/staking/orchestration/v1): *Write*. Power non-custodial staking workflows for your users. -```bash -docker run -p 8080:8080 -e SWAGGER_JSON=/doc/coinbase/staking/v1alpha1/api.swagger.json -v $(PWD)/doc/openapi:/doc swaggerapi/swagger-ui -``` +* [Rewards](./protos/coinbase/staking/rewards/v1): *Read*. Access onchain, staking-related rewards data. + +## Quick Start + +1. Create and download an API key from the [Cloud Platform](https://portal.cloud.coinbase.com/access/api). +2. Place the key named `.coinbase_cloud_api_key.json` at the root of this repository. +3. Run one of the code samples [below](#stake-partial-eth-💠) or any of our [provided examples](./examples/) :rocket:. + +### Stake Partial ETH :diamond_shape_with_a_dot_inside: + +This code sample creates an ETH staking workflow. View the full code sample [here](examples/ethereum/create-workflow/main.go) + +
+ Code Sample + +```golang +// examples/ethereum/create-workflow/main.go +package main + +import ( + "context" + "fmt" + "log" -## Prerequisites + "github.cbhq.net/cloud/staking-client-library-go/auth" + "github.cbhq.net/cloud/staking-client-library-go/client" + "github.cbhq.net/cloud/staking-client-library-go/client/options" + stakingpb "github.cbhq.net/cloud/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1" +) -- [Golang 1.19+](https://go.dev/learn/) +func main() { + // TODO: Add your project ID found at cloud.coinbase.com or in your API key. + projectID := "" -## Repository Structure -- [`auth/`](./auth/) contains the authentication-related code for accessing Coinbase Cloud APIs. -- [`client/`](./client/) contains client instantiation helpers for Staking APIs. -- [`gen/`](./gen/) contains Go code generated from the Protocol Buffers. -- [`protos/`](./protos/) contains the Protocol Buffers that define the Staking APIs. + ctx := context.Background() -## Module Installation + // Loads the API key from the default location. + apiKey, err := auth.NewAPIKey(auth.WithLoadAPIKeyFromFile(true)) + if err != nil { + log.Fatalf("error loading API key: %s", err.Error()) + } + + // Creates the Coinbase Staking API client. + stakingClient, err := client.New(ctx, options.WithAPIKey(apiKey)) + if err != nil { + log.Fatalf("error instantiating staking client: %s", err.Error()) + } + + // Constructs the API request + req := &stakingpb.CreateWorkflowRequest{ + Parent: fmt.Sprintf("projects/%s", projectID), + Workflow: &stakingpb.Workflow{ + Action: "protocols/ethereum_kiln/networks/holesky/actions/stake", + StakingParameters: &stakingpb.Workflow_EthereumKilnStakingParameters{ + EthereumKilnStakingParameters: &stakingpb.EthereumKilnStakingParameters{ + Parameters: &stakingpb.EthereumKilnStakingParameters_StakeParameters{ + StakeParameters: &stakingpb.EthereumKilnStakeParameters{ + StakerAddress: "0xdb816889F2a7362EF242E5a717dfD5B38Ae849FE", + IntegratorContractAddress: "0xA55416de5DE61A0AC1aa8970a280E04388B1dE4b", + Amount: &stakingpb.Amount{ + Value: "20", + Currency: "ETH", + }, + }, + }, + }, + }, + SkipBroadcast: true, + }, + } + + workflow, err := stakingClient.Orchestration.CreateWorkflow(ctx, req) + if err != nil { + log.Fatalf("couldn't create workflow: %s", err.Error()) + } + + log.Printf("Workflow created: %s", workflow.Name) +} ``` -go get github.com/coinbase/staking-client-library-go + +
+ +
+ Output + + ```text + 2024/03/28 11:43:49 Workflow created: projects/62376b2f-3f24-42c9-9025-d576a3c06d6f/workflows/ffbf9b45-c57b-49cb-a4d5-fdab66d8cb25 + ``` + +
+ +### View Ethereum Rewards :moneybag: + +This code sample returns rewards for an Ethereum validator address. View the full code sample [here](examples/ethereum/list-rewards/main.go). + +
+ Code Sample + +```golang +// examples/ethereum/list-rewards/main.go +package main + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "log" + "time" + + "google.golang.org/api/iterator" + + "github.cbhq.net/cloud/staking-client-library-go/auth" + "github.cbhq.net/cloud/staking-client-library-go/client" + "github.cbhq.net/cloud/staking-client-library-go/client/options" + rewardsV1 "github.cbhq.net/cloud/staking-client-library-go/client/rewards/v1" + rewardspb "github.cbhq.net/cloud/staking-client-library-go/gen/go/coinbase/staking/rewards/v1" +) + +func main() { + ctx := context.Background() + + // Loads the API key from the default location. + apiKey, err := auth.NewAPIKey(auth.WithLoadAPIKeyFromFile(true)) + if err != nil { + log.Fatalf("error loading API key: %s", err.Error()) + } + + // Creates the Coinbase Staking API client. + stakingClient, err := client.New(ctx, options.WithAPIKey(apiKey)) + if err != nil { + log.Fatalf("error instantiating staking client: %s", err.Error()) + } + + // Lists the rewards for the given address for the previous last 2 days, aggregated by day. + rewardsIter := stakingClient.Rewards.ListRewards(ctx, &rewardspb.ListRewardsRequest{ + Parent: rewardspb.ProtocolResourceName{Protocol: "ethereum"}.String(), + PageSize: 200, + Filter: rewardsV1.WithAddress().Eq("0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474"). + And(rewardsV1.WithPeriodEndTime().Gte(time.Now().AddDate(0, 0, -2))). + And(rewardsV1.WithPeriodEndTime().Lt(time.Now())).String(), + }) + + // Iterates through the rewards and print them. + for { + reward, err := rewardsIter.Next() + if errors.Is(err, iterator.Done) { + break + } + + if err != nil { + log.Fatalf("error listing rewards: %s", err.Error()) + } + + marshaled, err := json.MarshalIndent(reward, "", " ") + if err != nil { + log.Fatalf("error marshaling reward: %s", err.Error()) + } + + fmt.Printf(string(marshaled)) + } +} ``` -## Get Started -To test that your API Key gives you access as expected to the Staking APIs: - -1. Clone this GitHub repo -2. Download your API key from the Coinbase Cloud UI and save it as `.coinbase_cloud_api_key.json` at the root of this repo -3. Run `go run examples/example.go` -4. You should see output like the following: - ``` - 2023/09/25 15:01:03 got protocol: protocols/ethereum_kiln - 2023/09/25 15:01:04 got network: protocols/ethereum_kiln/networks/mainnet - 2023/09/25 15:01:04 got action: protocols/ethereum_kiln/networks/goerli/actions/stake - 2023/09/25 15:01:04 got action: protocols/ethereum_kiln/networks/goerli/actions/unstake - 2023/09/25 15:01:04 got action: protocols/ethereum_kiln/networks/goerli/actions/claim_rewards - ``` -### Create an Ethereum Kiln workflow -To test creating an Ethereum Kiln workflow perform the following: - -1. Open `examples/ethereum_kiln/example.go` and set the following variables: - * `projectID` - this is the project ID of your Coinbase Cloud project - * `privateKey` - this is the private key of the address with this you want to perform staking actions - * `stakerAddress` - this is the address with which you want to perform staking actions - * `integratorContractAddress` - this is the integrator contract address to which you want to stake. This is typically procured by engaging with the Coinbase Cloud sales team. -2. Run `go run examples/ethereum_kiln/example.go` - -### Create a Polygon workflow -To test creating a Polygon workflow perform the following: - -1. Open `examples/polygon/example.go` and set the following variables: - * `projectID` - this is the project ID of your Coinbase Cloud project - * `privateKey` - this is the private key of the address with this you want to perform staking actions - * `delegatorAddress` - this is the address with which you want to perform staking actions -2. Run `go run examples/polygon/example.go` - -### Listing workflows -To test listing workflows within a project, perform the following: - -1. Open `examples/example_list_workflows.go` and set the following variables: - * `projectID` - this is the project ID of your Coinbase Cloud project -2. Run `go run examples/example_list_workflows.go` +
+ +
+ Output + + ```json + { + "address": "0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474", + "period_identifier": { + "date": "2024-03-26" + }, + "aggregation_unit": 2, + "period_start_time": { + "seconds": 1711411200 + }, + "period_end_time": { + "seconds": 1711497599 + }, + "total_earned_native_unit": { + "amount": "0.00211503", + "exp": "18", + "ticker": "ETH", + "raw_numeric": "2115030000000000" + }, + "total_earned_usd": [ + { + "source": 1, + "conversion_time": { + "seconds": 1711498140 + }, + "amount": { + "amount": "7.58", + "exp": "2", + "ticker": "USD", + "raw_numeric": "758" + }, + "conversion_price": "3582.979980" + } + ], + "protocol": "ethereum" + } + { + "address": "0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474", + "period_identifier": { + "date": "2024-03-27" + }, + "aggregation_unit": 2, + "period_start_time": { + "seconds": 1711497600 + }, + "period_end_time": { + "seconds": 1711583999 + }, + "total_earned_native_unit": { + "amount": "0.002034193", + "exp": "18", + "ticker": "ETH", + "raw_numeric": "2034193000000000" + }, + "total_earned_usd": [ + { + "source": 1, + "conversion_time": { + "seconds": 1711584540 + }, + "amount": { + "amount": "7.13", + "exp": "2", + "ticker": "USD", + "raw_numeric": "713" + }, + "conversion_price": "3504.580078" + } + ], + "protocol": "ethereum" + } + ``` + +
+ +## Documentation + +There are numerous examples in the [`examples directory`](./examples) to help get you started. For even more, refer to our [documentation website](https://docs.cloud.coinbase.com/) for detailed definitions, API specifications, integration guides, and more! diff --git a/client/client.go b/client/client.go new file mode 100644 index 0000000..146a9f0 --- /dev/null +++ b/client/client.go @@ -0,0 +1,36 @@ +package client + +import ( + "context" + "fmt" + + "github.com/coinbase/staking-client-library-go/client/options" + orchestrationClient "github.com/coinbase/staking-client-library-go/client/orchestration/v1" + rewardsClient "github.com/coinbase/staking-client-library-go/client/rewards/v1" +) + +type StakingClient struct { + Orchestration *orchestrationClient.OrchestrationServiceClient + Rewards *rewardsClient.RewardsServiceClient +} + +// New returns a StakingClient based on the given inputs. +func New( + ctx context.Context, + stakingOpts ...options.StakingClientOption, +) (*StakingClient, error) { + orchestrationClient, err := orchestrationClient.NewOrchestrationServiceClient(ctx, stakingOpts...) + if err != nil { + return nil, fmt.Errorf("failed to create orchestration client: %w", err) + } + + rewardsClient, err := rewardsClient.NewRewardsServiceClient(ctx, stakingOpts...) + if err != nil { + return nil, fmt.Errorf("failed to create rewards client: %w", err) + } + + return &StakingClient{ + Orchestration: orchestrationClient, + Rewards: rewardsClient, + }, nil +} diff --git a/client/errors/errors.go b/client/errors/errors.go index 396eede..8025950 100644 --- a/client/errors/errors.go +++ b/client/errors/errors.go @@ -51,7 +51,7 @@ func (s *StakingAPIError) Error() string { } else if s.httpCode != 0 && s.message != "" { return fmt.Sprintf("stakingapi error: httpCode: %d message: %s", s.httpCode, s.message) } else if s.err != nil { - // Either http code or message is missing. This should be very unlikely. It can happen when an internal + // Either http code or message is missing. This should be very unlikely. It can happen when an orchestration // service simply returns the response body say as "Unauthorized". In this case, we also print the original error. return fmt.Sprintf("stakingapi error: httpCode: %d message: %s err: %s", s.httpCode, s.message, s.Unwrap().Error()) } else { @@ -146,7 +146,7 @@ type ErrDetails struct { // sort of proto.Message that can be cast to the google/rpc/error_details.proto // types. // -// This is for internal use only. +// This is for orchestration use only. func parseDetails(details []interface{}) ErrDetails { var ed ErrDetails diff --git a/client/filter/filter.go b/client/filter/filter.go new file mode 100644 index 0000000..08115ea --- /dev/null +++ b/client/filter/filter.go @@ -0,0 +1,109 @@ +package filter + +import ( + "fmt" + "strings" + "time" +) + +// Supported operations taken from https://google.aip.dev/160 + +type ComparisonOperation string + +const ( + Equals ComparisonOperation = "=" + NotEquals ComparisonOperation = "!=" + LessThan ComparisonOperation = "<" + LessEquals ComparisonOperation = "<=" + GreaterEquals ComparisonOperation = ">=" + GreaterThan ComparisonOperation = ">" +) + +type LogicalOperation string + +const ( + And LogicalOperation = "AND" +) + +// Filterer interface for both Term and LogicalExpressions. +type Filterer interface { + And(other Filterer) *LogicalExpressions + String() string +} + +// LogicalExpression represents a pair of filter terms joined with a logical operator. +type LogicalExpression struct { + Op LogicalOperation + Filter Filterer +} + +// LogicalExpressions represents a list of logical expressions. +type LogicalExpressions struct { + expressions []LogicalExpression +} + +// Term helps represent a single filter condition, e.g. "field = value". +type Term struct { + field string + op ComparisonOperation + value interface{} +} + +func (t *Term) And(other Filterer) *LogicalExpressions { + return &LogicalExpressions{ + expressions: []LogicalExpression{ + {Op: And, Filter: t}, + {Op: And, Filter: other}, + }, + } +} + +func (t *Term) String() string { + parsedValue := t.value + + if timeValue, ok := t.value.(time.Time); ok { + // If the type assertion is successful, the value is a time.Time, + // so we need to parse it to a string in RFC3339 format. + parsedValue = fmt.Sprintf("'%s'", timeValue.Format(time.RFC3339)) + } else if intValue, ok := t.value.(int); ok { + // If the type assertion is successful, the value is an int + parsedValue = fmt.Sprintf("%d", intValue) + } else if stringValue, ok := t.value.(string); ok { + // If the type assertion is successful, the value is a string + parsedValue = fmt.Sprintf("'%s'", stringValue) + } + + return fmt.Sprintf("%s %s %s", t.field, t.op, parsedValue) +} + +func NewTerm(field string, op ComparisonOperation, value interface{}) *Term { + return &Term{field: field, op: op, value: value} +} + +func (le *LogicalExpressions) And(other Filterer) *LogicalExpressions { + le.expressions = append(le.expressions, LogicalExpression{Op: And, Filter: other}) + + return le +} + +func (le *LogicalExpressions) String() string { + if len(le.expressions) == 0 { + return "" + } + + parts := make([]string, len(le.expressions)*2-1) + + index := 0 + + for i, expr := range le.expressions { + if i > 0 { + parts[index] = fmt.Sprintf(" %s ", expr.Op) + index++ + } + + parts[index] = expr.Filter.String() + index++ + } + + return "(" + strings.Join(parts, "") + ")" +} diff --git a/client/filter/filter_test.go b/client/filter/filter_test.go new file mode 100644 index 0000000..e79e107 --- /dev/null +++ b/client/filter/filter_test.go @@ -0,0 +1,73 @@ +package filter + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +// AFilter is a custom type to define filter operation on the 'a' field. +type AFilter struct{} + +// Eq method is a custom method to define the equals operation on the 'a' field. +func (AFilter) Eq(value int) *Term { + return NewTerm("a", Equals, value) +} + +// Neq method is a custom method to define the not equals operation on the 'a' field. +func (AFilter) Neq(value int) *Term { + return NewTerm("a", NotEquals, value) +} + +// Gt method is a custom method to define the greater than operation on the 'a' field. +func (AFilter) Gt(value int) *Term { + return NewTerm("a", GreaterThan, value) +} + +// Gte method is a custom method to define the greater than or equals operation on the 'a' field. +func (AFilter) Gte(value int) *Term { + return NewTerm("a", GreaterEquals, value) +} + +// Lt method is a custom method to define the less than operation on the 'a' field. +func (AFilter) Lt(value int) *Term { + return NewTerm("a", LessThan, value) +} + +// Lte method is a custom method to define the less than or equals operation on the 'a' field. +func (AFilter) Lte(value int) *Term { + return NewTerm("a", LessEquals, value) +} + +func WithA() AFilter { + return AFilter{} +} + +// BFilter is a custom type to define filter operation on the 'b' field. +type BFilter struct{} + +// Eq method is a custom method to define the equals operation on the 'b' field. +func (BFilter) Eq(value string) *Term { + return NewTerm("b", Equals, value) +} + +func WithB() BFilter { + return BFilter{} +} + +func TestFilter(t *testing.T) { + f := WithA().Gt(10).String() + assert.Equal(t, "a > '10'", f) + + // Filter to perform a simple AND between 2 conditions. + f = WithA().Gte(10).And(WithA().Lt(20)).String() + assert.Equal(t, "(a >= '10' AND a < '20')", f) + + // Filter to perform a simple AND between 3 conditions with no special order enforcement. + f = WithA().Gte(10).And(WithA().Lt(20)).And(WithB().Eq("example")).String() + assert.Equal(t, "(a >= '10' AND a < '20' AND b = 'example')", f) + + // Filter to perform a simple AND between 3 conditions while enforcing order of operations - forcing latter 2 conditions to be AND'ed first. + f = WithA().Gte(10).And(WithA().Lt(20).And(WithB().Eq("example"))).String() + assert.Equal(t, "(a >= '10' AND (a < '20' AND b = 'example'))", f) +} diff --git a/client/options.go b/client/options/options.go similarity index 97% rename from client/options.go rename to client/options/options.go index c82ac17..9026219 100644 --- a/client/options.go +++ b/client/options/options.go @@ -1,4 +1,4 @@ -package client +package options import ( "errors" @@ -10,6 +10,7 @@ import ( "google.golang.org/api/option" "github.com/coinbase/staking-client-library-go/auth" + "github.com/coinbase/staking-client-library-go/client/transport" ) // StakingClientConfig stores configuration information about a Staking client. @@ -131,7 +132,7 @@ func GetHTTPClient(serviceName string, config *StakingClientConfig) (*http.Clien httpClient.Transport = http.DefaultTransport } - httpClient.Transport = NewTransport( + httpClient.Transport = transport.NewTransport( httpClient.Transport, serviceName, config.APIKey, diff --git a/client/v1alpha1/action.go b/client/orchestration/v1/action.go similarity index 84% rename from client/v1alpha1/action.go rename to client/orchestration/v1/action.go index 4e84f75..3d65845 100644 --- a/client/v1alpha1/action.go +++ b/client/orchestration/v1/action.go @@ -1,4 +1,4 @@ -package v1alpha1 +package v1 import ( "context" @@ -6,11 +6,11 @@ import ( "github.com/googleapis/gax-go/v2" stakingerrors "github.com/coinbase/staking-client-library-go/client/errors" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1" ) // ListActions lists the Actions supported by Staking API. -func (s *StakingServiceClient) ListActions( +func (s *OrchestrationServiceClient) ListActions( ctx context.Context, req *stakingpb.ListActionsRequest, opts ...gax.CallOption, diff --git a/client/orchestration/v1/client.go b/client/orchestration/v1/client.go new file mode 100644 index 0000000..6a66486 --- /dev/null +++ b/client/orchestration/v1/client.go @@ -0,0 +1,62 @@ +package v1 + +import ( + "context" + + "google.golang.org/grpc" + + clients "github.com/coinbase/staking-client-library-go/client/options" + innerClient "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/orchestration/v1" +) + +const ( + // ServiceName is the name of the service used by the Authenticator. + serviceName = "staking" + + // ServiceEndpoint is the default endpoint URL to use. + serviceEndpoint = "https://api.developer.coinbase.com/staking/orchestration" +) + +// OrchestrationServiceClient is the client to use to access StakingService APIs. +type OrchestrationServiceClient struct { + client *innerClient.StakingClient +} + +// NewOrchestrationServiceClient returns a OrchestrationServiceClient based on the given inputs. +func NewOrchestrationServiceClient( + ctx context.Context, + stakingOpts ...clients.StakingClientOption, +) (*OrchestrationServiceClient, error) { + config, err := clients.GetConfig(serviceName, serviceEndpoint, stakingOpts...) + if err != nil { + return nil, err + } + + clientOptions, err := clients.GetClientOptions(config) + if err != nil { + return nil, err + } + + innerClient, err := innerClient.NewStakingRESTClient(ctx, clientOptions...) + if err != nil { + return nil, err + } + + return &OrchestrationServiceClient{ + client: innerClient, + }, nil +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (s *OrchestrationServiceClient) Close() error { + return s.client.Close() +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (s *OrchestrationServiceClient) Connection() *grpc.ClientConn { + return s.client.Connection() +} diff --git a/client/v1alpha1/network.go b/client/orchestration/v1/network.go similarity index 84% rename from client/v1alpha1/network.go rename to client/orchestration/v1/network.go index 36fae4c..f8cccc8 100644 --- a/client/v1alpha1/network.go +++ b/client/orchestration/v1/network.go @@ -1,4 +1,4 @@ -package v1alpha1 +package v1 import ( "context" @@ -6,11 +6,11 @@ import ( "github.com/googleapis/gax-go/v2" stakingerrors "github.com/coinbase/staking-client-library-go/client/errors" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1" ) // ListNetworks lists the Networks supported by Staking API. -func (s *StakingServiceClient) ListNetworks( +func (s *OrchestrationServiceClient) ListNetworks( ctx context.Context, req *stakingpb.ListNetworksRequest, opts ...gax.CallOption, diff --git a/client/v1alpha1/protocol.go b/client/orchestration/v1/protocol.go similarity index 84% rename from client/v1alpha1/protocol.go rename to client/orchestration/v1/protocol.go index ff672fe..7d92b25 100644 --- a/client/v1alpha1/protocol.go +++ b/client/orchestration/v1/protocol.go @@ -1,4 +1,4 @@ -package v1alpha1 +package v1 import ( "context" @@ -6,11 +6,11 @@ import ( "github.com/googleapis/gax-go/v2" stakingerrors "github.com/coinbase/staking-client-library-go/client/errors" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1" ) // ListProtocols lists the Protocols supported by Staking API. -func (s *StakingServiceClient) ListProtocols( +func (s *OrchestrationServiceClient) ListProtocols( ctx context.Context, req *stakingpb.ListProtocolsRequest, opts ...gax.CallOption, diff --git a/client/v1alpha1/staking_target.go b/client/orchestration/v1/staking_target.go similarity index 94% rename from client/v1alpha1/staking_target.go rename to client/orchestration/v1/staking_target.go index 0662f12..6544d4d 100644 --- a/client/v1alpha1/staking_target.go +++ b/client/orchestration/v1/staking_target.go @@ -1,4 +1,4 @@ -package v1alpha1 +package v1 import ( "context" @@ -9,8 +9,8 @@ import ( "google.golang.org/api/iterator" stakingerrors "github.com/coinbase/staking-client-library-go/client/errors" - innerClient "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" + innerClient "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/orchestration/v1" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1" ) // StakingTargetIterator is an interface for iterating through the response to ListStakingTargets. @@ -64,7 +64,7 @@ func (n *StakingTargetIteratorImpl) Response() *stakingpb.ListStakingTargetsResp } // ListStakingTargets lists the StakingTargets supported by Staking API. -func (s *StakingServiceClient) ListStakingTargets( +func (s *OrchestrationServiceClient) ListStakingTargets( ctx context.Context, req *stakingpb.ListStakingTargetsRequest, opts ...gax.CallOption, diff --git a/client/v1alpha1/view_staking_context.go b/client/orchestration/v1/view_staking_context.go similarity index 85% rename from client/v1alpha1/view_staking_context.go rename to client/orchestration/v1/view_staking_context.go index b39aff4..60c44fd 100644 --- a/client/v1alpha1/view_staking_context.go +++ b/client/orchestration/v1/view_staking_context.go @@ -1,4 +1,4 @@ -package v1alpha1 +package v1 import ( "context" @@ -6,11 +6,11 @@ import ( "github.com/googleapis/gax-go/v2" stakingerrors "github.com/coinbase/staking-client-library-go/client/errors" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1" ) // ViewStakingContext helps view staking context information given a specific network address. -func (s *StakingServiceClient) ViewStakingContext( +func (s *OrchestrationServiceClient) ViewStakingContext( ctx context.Context, req *stakingpb.ViewStakingContextRequest, opts ...gax.CallOption, diff --git a/client/v1alpha1/workflow.go b/client/orchestration/v1/workflow.go similarity index 79% rename from client/v1alpha1/workflow.go rename to client/orchestration/v1/workflow.go index 6990e0b..c285642 100644 --- a/client/v1alpha1/workflow.go +++ b/client/orchestration/v1/workflow.go @@ -1,4 +1,4 @@ -package v1alpha1 +package v1 import ( "context" @@ -9,12 +9,12 @@ import ( "google.golang.org/api/iterator" stakingerrors "github.com/coinbase/staking-client-library-go/client/errors" - innerClient "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" + innerClient "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/orchestration/v1" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1" ) // CreateWorkflow starts a workflow with the given protocol specific parameters. -func (s *StakingServiceClient) CreateWorkflow( +func (s *OrchestrationServiceClient) CreateWorkflow( ctx context.Context, req *stakingpb.CreateWorkflowRequest, opts ...gax.CallOption, @@ -31,7 +31,7 @@ func (s *StakingServiceClient) CreateWorkflow( } // GetWorkflow get the current state of a workflow. -func (s *StakingServiceClient) GetWorkflow( +func (s *OrchestrationServiceClient) GetWorkflow( ctx context.Context, req *stakingpb.GetWorkflowRequest, opts ...gax.CallOption, @@ -98,7 +98,7 @@ func (n *WorkflowIteratorImpl) Response() *stakingpb.ListWorkflowsResponse { } // ListWorkflows lists the Workflows supported by Staking API. -func (s *StakingServiceClient) ListWorkflows( +func (s *OrchestrationServiceClient) ListWorkflows( ctx context.Context, req *stakingpb.ListWorkflowsRequest, opts ...gax.CallOption, @@ -107,7 +107,7 @@ func (s *StakingServiceClient) ListWorkflows( } // PerformWorkflowStep helps update workflow move to the next state by returning the signed tx back. -func (s *StakingServiceClient) PerformWorkflowStep( +func (s *OrchestrationServiceClient) PerformWorkflowStep( ctx context.Context, req *stakingpb.PerformWorkflowStepRequest, opts ...gax.CallOption, @@ -123,28 +123,9 @@ func (s *StakingServiceClient) PerformWorkflowStep( return wf, sae } -// RefreshWorkflowStep helps refresh a workflow. -func (s *StakingServiceClient) RefreshWorkflowStep( - ctx context.Context, - req *stakingpb.RefreshWorkflowStepRequest, - opts ...gax.CallOption, -) (*stakingpb.Workflow, error) { - wf, err := s.client.RefreshWorkflowStep(ctx, req, opts...) - if err == nil { - return wf, nil - } - - sae := stakingerrors.FromError(err) - _ = sae.Print() - - return wf, sae -} - func WorkflowFinished(workflow *stakingpb.Workflow) bool { return workflow.State == stakingpb.Workflow_STATE_COMPLETED || - workflow.State == stakingpb.Workflow_STATE_FAILED || - workflow.State == stakingpb.Workflow_STATE_CANCELED || - workflow.State == stakingpb.Workflow_STATE_CANCEL_FAILED + workflow.State == stakingpb.Workflow_STATE_FAILED } func WorkflowWaitingForSigning(workflow *stakingpb.Workflow) bool { @@ -154,7 +135,3 @@ func WorkflowWaitingForSigning(workflow *stakingpb.Workflow) bool { func WorkflowWaitingForExternalBroadcast(workflow *stakingpb.Workflow) bool { return workflow.State == stakingpb.Workflow_STATE_WAITING_FOR_EXT_BROADCAST } - -func WorkflowFailedRefreshable(workflow *stakingpb.Workflow) bool { - return workflow.State == stakingpb.Workflow_STATE_FAILED_REFRESHABLE -} diff --git a/client/rewards/v1/client.go b/client/rewards/v1/client.go new file mode 100644 index 0000000..b8d0702 --- /dev/null +++ b/client/rewards/v1/client.go @@ -0,0 +1,59 @@ +package v1 + +import ( + "context" + + "google.golang.org/grpc" + + clients "github.com/coinbase/staking-client-library-go/client/options" + innerClient "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/rewards/v1" +) + +const ( + // ServiceEndpoint is the endpoint the client will use. + serviceEndpoint = "https://api.developer.coinbase.com/staking/rewards" +) + +// RewardsServiceClient is the client to use to access StakingService APIs. +type RewardsServiceClient struct { + client *innerClient.RewardClient +} + +// NewRewardsServiceClient returns a RewardsServiceClient based on the given inputs. +func NewRewardsServiceClient( + ctx context.Context, + stakingOpts ...clients.StakingClientOption, +) (*RewardsServiceClient, error) { + config, err := clients.GetConfig("rewards-reporting", serviceEndpoint, stakingOpts...) + if err != nil { + return nil, err + } + + clientOptions, err := clients.GetClientOptions(config) + if err != nil { + return nil, err + } + + innerClient, err := innerClient.NewRewardRESTClient(ctx, clientOptions...) + if err != nil { + return nil, err + } + + return &RewardsServiceClient{ + client: innerClient, + }, nil +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (s *RewardsServiceClient) Close() error { + return s.client.Close() +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (s *RewardsServiceClient) Connection() *grpc.ClientConn { + return s.client.Connection() +} diff --git a/client/rewards/v1/reward.go b/client/rewards/v1/reward.go new file mode 100644 index 0000000..de7005a --- /dev/null +++ b/client/rewards/v1/reward.go @@ -0,0 +1,73 @@ +package v1 + +import ( + "context" + "errors" + + "github.com/googleapis/gax-go/v2" + + "google.golang.org/api/iterator" + + stakingerrors "github.com/coinbase/staking-client-library-go/client/errors" + innerClient "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/rewards/v1" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1" +) + +// RewardIterator is an interface for iterating through the response to ListRewards. +type RewardIterator interface { + // PageInfo supports pagination. See the google.golang.org/api/iterator package for details. + PageInfo() *iterator.PageInfo + + // Next returns the next result. Its second return value is iterator.Done if there are no more + // results. Once Next returns Done, all subsequent calls will return Done. + Next() (*stakingpb.Reward, error) + + // Response is the raw response for the current page. + // Calling Next() or InternalFetch() updates this value. + Response() *stakingpb.ListRewardsResponse +} + +// RewardIteratorImpl is an implementation of RewardIterator that unwraps correctly. +type RewardIteratorImpl struct { + iter *innerClient.RewardIterator +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (n *RewardIteratorImpl) PageInfo() *iterator.PageInfo { + return n.iter.PageInfo() +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (n *RewardIteratorImpl) Next() (*stakingpb.Reward, error) { + reward, err := n.iter.Next() + if errors.Is(err, iterator.Done) || err == nil { + return reward, err + } + + return reward, stakingerrors.FromError(err) +} + +// Response is the raw response for the current page. +// Calling Next() or InternalFetch() updates this value. +func (n *RewardIteratorImpl) Response() *stakingpb.ListRewardsResponse { + if n.iter.Response == nil { + return nil + } + + response, ok := n.iter.Response.(*stakingpb.ListRewardsResponse) + if !ok { + return nil + } + + return response +} + +// ListRewards helps list onchain rewards of an address for a specific protocol, with optional filters for time range, aggregation period, and more. +func (s *RewardsServiceClient) ListRewards( + ctx context.Context, + req *stakingpb.ListRewardsRequest, + opts ...gax.CallOption, +) RewardIterator { + return &RewardIteratorImpl{iter: s.client.ListRewards(ctx, req, opts...)} +} diff --git a/client/rewards/v1/reward_filter.go b/client/rewards/v1/reward_filter.go new file mode 100644 index 0000000..00dd5bb --- /dev/null +++ b/client/rewards/v1/reward_filter.go @@ -0,0 +1,133 @@ +package v1 + +import ( + "time" + + "github.com/coinbase/staking-client-library-go/client/filter" +) + +// AddressFilter is a custom type to define filter operation on the address field. +type AddressFilter struct{} + +// Eq method is a custom method to define the equals operation on the address field. +func (AddressFilter) Eq(value string) *filter.Term { + return filter.NewTerm("address", filter.Equals, value) +} + +// WithAddress instructs the backend API to return rewards aggregations that have `address` set in a manner which matches the desired filter. +// Needs a companion equals operator to be functional (ex: WithAddress().Eq("my_address"). +func WithAddress() AddressFilter { + return AddressFilter{} +} + +// EpochFilter is a custom type to define filter operation on the epoch field. +type EpochFilter struct{} + +// Eq method is a custom method to define the equals operation on the epoch field. +func (EpochFilter) Eq(value int) *filter.Term { + return filter.NewTerm("epoch", filter.Equals, value) +} + +// Neq method is a custom method to define the not equals operation on the epoch field. +func (EpochFilter) Neq(value int) *filter.Term { + return filter.NewTerm("epoch", filter.NotEquals, value) +} + +// Gt method is a custom method to define the greater than operation on the epoch field. +func (EpochFilter) Gt(value int) *filter.Term { + return filter.NewTerm("epoch", filter.GreaterThan, value) +} + +// Gte method is a custom method to define the greater than or equals operation on the epoch field. +func (EpochFilter) Gte(value int) *filter.Term { + return filter.NewTerm("epoch", filter.GreaterEquals, value) +} + +// Lt method is a custom method to define the less than operation on the epoch field. +func (EpochFilter) Lt(value int) *filter.Term { + return filter.NewTerm("epoch", filter.LessThan, value) +} + +// Lte method is a custom method to define the less than or equals operation on the epoch field. +func (EpochFilter) Lte(value int) *filter.Term { + return filter.NewTerm("epoch", filter.LessEquals, value) +} + +// WithEpoch instructs the backend API to return rewards aggregations that have `epoch` set in a manner which matches the desired filter. +// Needs a companion comparison operator (ex: >, <, =, etc) to be functional. +func WithEpoch() EpochFilter { + return EpochFilter{} +} + +// DateFilter is a custom type to define filter operation on the date. +type DateFilter struct{} + +// Eq method is a custom method to define the equals operation on the date. +func (DateFilter) Eq(value string) *filter.Term { + return filter.NewTerm("date", filter.Equals, value) +} + +// Neq method is a custom method to define the not equals operation on the date. +func (DateFilter) Neq(value string) *filter.Term { + return filter.NewTerm("date", filter.NotEquals, value) +} + +// Gt method is a custom method to define the greater than operation on the date. +func (DateFilter) Gt(value string) *filter.Term { + return filter.NewTerm("date", filter.GreaterThan, value) +} + +// Gte method is a custom method to define the greater than or equals operation on the date. +func (DateFilter) Gte(value string) *filter.Term { + return filter.NewTerm("date", filter.GreaterEquals, value) +} + +// Lt method is a custom method to define the less than operation on the date. +func (DateFilter) Lt(value string) *filter.Term { + return filter.NewTerm("date", filter.LessThan, value) +} + +// Lte method is a custom method to define the less than or equals operation on the date. +func (DateFilter) Lte(value string) *filter.Term { + return filter.NewTerm("date", filter.LessEquals, value) +} + +// WithDate instructs the backend API to return rewards aggregations that have `date` set in a manner which matches the desired filter. +// Needs a companion comparison operator (ex: >, <, =, etc) to be functional. +func WithDate() DateFilter { + return DateFilter{} +} + +// PeriodEndTimeFilter is a custom type to define filter operation on the period_end_time field. +type PeriodEndTimeFilter struct{} + +// Eq method is a custom method to define the equals operation on the period_end_time field. +func (PeriodEndTimeFilter) Eq(value time.Time) *filter.Term { + return filter.NewTerm("period_end_time", filter.Equals, value) +} + +// Gt method is a custom method to define the greater than operation on the period_end_time field. +func (PeriodEndTimeFilter) Gt(value time.Time) *filter.Term { + return filter.NewTerm("period_end_time", filter.GreaterThan, value) +} + +// Gte method is a custom method to define the greater than or equals operation on the period_end_time field. +func (PeriodEndTimeFilter) Gte(value time.Time) *filter.Term { + return filter.NewTerm("period_end_time", filter.GreaterEquals, value) +} + +// Lt method is a custom method to define the less than operation on the period_end_time field. +func (PeriodEndTimeFilter) Lt(value time.Time) *filter.Term { + return filter.NewTerm("period_end_time", filter.LessThan, value) +} + +// Lte method is a custom method to define the less than or equals operation on the period_end_time field. +func (PeriodEndTimeFilter) Lte(value time.Time) *filter.Term { + return filter.NewTerm("period_end_time", filter.LessEquals, value) +} + +// Instructs the backend API to return rewards aggregations that have `period_end_time` set in a manner which matches the desired filter. +// Needs a companion comparison operator (ex: >, <, =, etc) to be functional. +func WithPeriodEndTime() PeriodEndTimeFilter { + return PeriodEndTimeFilter{} +} diff --git a/client/rewards/v1/reward_filter_test.go b/client/rewards/v1/reward_filter_test.go new file mode 100644 index 0000000..8aff925 --- /dev/null +++ b/client/rewards/v1/reward_filter_test.go @@ -0,0 +1,71 @@ +package v1 + +import ( + "fmt" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func TestRewardFilter(t *testing.T) { + f := WithAddress().Eq("abcd").String() + assert.Equal(t, "address = 'abcd'", f) + + f = WithEpoch().Eq(10).String() + assert.Equal(t, "epoch = 10", f) + + f = WithAddress().Eq("abcd").And(WithEpoch().Lt(10)).String() + assert.Equal(t, "(address = 'abcd' AND epoch < 10)", f) + + f = WithAddress().Eq("abcd").And(WithEpoch().Lte(10)).String() + assert.Equal(t, "(address = 'abcd' AND epoch <= 10)", f) + + f = WithAddress().Eq("abcd").And(WithEpoch().Gt(10)).String() + assert.Equal(t, "(address = 'abcd' AND epoch > 10)", f) + + f = WithAddress().Eq("abcd").And(WithEpoch().Gte(10)).String() + assert.Equal(t, "(address = 'abcd' AND epoch >= 10)", f) + + f = WithAddress().Eq("abcd").And(WithEpoch().Neq(10)).String() + assert.Equal(t, "(address = 'abcd' AND epoch != 10)", f) + + f = WithDate().Eq("2020-01-01").String() + assert.Equal(t, "date = '2020-01-01'", f) + + f = WithAddress().Eq("abcd").And(WithDate().Lt("2020-01-01")).String() + assert.Equal(t, "(address = 'abcd' AND date < '2020-01-01')", f) + + f = WithAddress().Eq("abcd").And(WithDate().Lte("2020-01-01")).String() + assert.Equal(t, "(address = 'abcd' AND date <= '2020-01-01')", f) + + f = WithAddress().Eq("abcd").And(WithDate().Gt("2020-01-01")).String() + assert.Equal(t, "(address = 'abcd' AND date > '2020-01-01')", f) + + f = WithAddress().Eq("abcd").And(WithDate().Gte("2020-01-01")).String() + assert.Equal(t, "(address = 'abcd' AND date >= '2020-01-01')", f) + + f = WithAddress().Eq("abcd").And(WithDate().Neq("2020-01-01")).String() + assert.Equal(t, "(address = 'abcd' AND date != '2020-01-01')", f) + + now := time.Now() + fiveDaysAgo := now.AddDate(0, 0, -5) + + nowRFC3339 := now.Format(time.RFC3339) + fiveDaysAgoRFC3339 := fiveDaysAgo.Format(time.RFC3339) + + f = WithPeriodEndTime().Eq(fiveDaysAgo).String() + assert.Equal(t, fmt.Sprintf("period_end_time = '%s'", fiveDaysAgoRFC3339), f) + + f = WithAddress().Eq("abcd").And(WithPeriodEndTime().Lt(fiveDaysAgo)).String() + assert.Equal(t, fmt.Sprintf("(address = 'abcd' AND period_end_time < '%s')", fiveDaysAgoRFC3339), f) + + f = WithAddress().Eq("abcd").And(WithPeriodEndTime().Lte(fiveDaysAgo)).String() + assert.Equal(t, fmt.Sprintf("(address = 'abcd' AND period_end_time <= '%s')", fiveDaysAgoRFC3339), f) + + f = WithAddress().Eq("abcd").And(WithPeriodEndTime().Gt(fiveDaysAgo)).String() + assert.Equal(t, fmt.Sprintf("(address = 'abcd' AND period_end_time > '%s')", fiveDaysAgoRFC3339), f) + + f = WithAddress().Eq("abcd").And(WithPeriodEndTime().Gte(fiveDaysAgo)).And(WithPeriodEndTime().Lt(now)).String() + assert.Equal(t, fmt.Sprintf("(address = 'abcd' AND period_end_time >= '%s' AND period_end_time < '%s')", fiveDaysAgoRFC3339, nowRFC3339), f) +} diff --git a/client/rewards/v1/stake.go b/client/rewards/v1/stake.go new file mode 100644 index 0000000..5096c8b --- /dev/null +++ b/client/rewards/v1/stake.go @@ -0,0 +1,73 @@ +package v1 + +import ( + "context" + "errors" + + "github.com/googleapis/gax-go/v2" + + "google.golang.org/api/iterator" + + stakingerrors "github.com/coinbase/staking-client-library-go/client/errors" + innerClient "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/rewards/v1" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1" +) + +// StakeIterator is an interface for iterating through the response to ListStakes. +type StakeIterator interface { + // PageInfo supports pagination. See the google.golang.org/api/iterator package for details. + PageInfo() *iterator.PageInfo + + // Next returns the next result. Its second return value is iterator.Done if there are no more + // results. Once Next returns Done, all subsequent calls will return Done. + Next() (*stakingpb.Stake, error) + + // Response is the raw response for the current page. + // Calling Next() or InternalFetch() updates this value. + Response() *stakingpb.ListStakesResponse +} + +// StakeIteratorImpl is an implementation of StakeIterator that unwraps correctly. +type StakeIteratorImpl struct { + iter *innerClient.StakeIterator +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (n *StakeIteratorImpl) PageInfo() *iterator.PageInfo { + return n.iter.PageInfo() +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (n *StakeIteratorImpl) Next() (*stakingpb.Stake, error) { + reward, err := n.iter.Next() + if errors.Is(err, iterator.Done) || err == nil { + return reward, err + } + + return reward, stakingerrors.FromError(err) +} + +// Response is the raw response for the current page. +// Calling Next() or InternalFetch() updates this value. +func (n *StakeIteratorImpl) Response() *stakingpb.ListStakesResponse { + if n.iter.Response == nil { + return nil + } + + response, ok := n.iter.Response.(*stakingpb.ListStakesResponse) + if !ok { + return nil + } + + return response +} + +// ListStakes list staking activities for a given protocol. +func (s *RewardsServiceClient) ListStakes( + ctx context.Context, + req *stakingpb.ListStakesRequest, + opts ...gax.CallOption, +) StakeIterator { + return &StakeIteratorImpl{iter: s.client.ListStakes(ctx, req, opts...)} +} diff --git a/client/transport.go b/client/transport/transport.go similarity index 98% rename from client/transport.go rename to client/transport/transport.go index a9b5f99..877058f 100644 --- a/client/transport.go +++ b/client/transport/transport.go @@ -1,4 +1,4 @@ -package client +package transport import ( "fmt" diff --git a/client/v1alpha1/staking.go b/client/v1alpha1/staking.go deleted file mode 100644 index 8573a59..0000000 --- a/client/v1alpha1/staking.go +++ /dev/null @@ -1,62 +0,0 @@ -package v1alpha1 - -import ( - "context" - - "google.golang.org/grpc" - - clients "github.com/coinbase/staking-client-library-go/client" - innerClient "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" -) - -const ( - // StakingServiceName is the name of the ProtocolService used by the Authenticator. - stakingServiceName = "staking" - - // StakingServiceEndpoint is the default endpoint URL to use for ProtocolService. - stakingServiceEndpoint = "https://api.developer.coinbase.com/staking" -) - -// StakingServiceClient is the client to use to access StakingService APIs. -type StakingServiceClient struct { - client *innerClient.StakingClient -} - -// NewStakingServiceClient returns a StakingServiceClient based on the given inputs. -func NewStakingServiceClient( - ctx context.Context, - stakingOpts ...clients.StakingClientOption, -) (*StakingServiceClient, error) { - config, err := clients.GetConfig(stakingServiceName, stakingServiceEndpoint, stakingOpts...) - if err != nil { - return nil, err - } - - clientOptions, err := clients.GetClientOptions(config) - if err != nil { - return nil, err - } - - innerClient, err := innerClient.NewStakingRESTClient(ctx, clientOptions...) - if err != nil { - return nil, err - } - - return &StakingServiceClient{ - client: innerClient, - }, nil -} - -// Close closes the connection to the API service. The user should invoke this when -// the client is no longer required. -func (s *StakingServiceClient) Close() error { - return s.client.Close() -} - -// Connection returns a connection to the API service. -// -// Deprecated: Connections are now pooled so this method does not always -// return the same resource. -func (s *StakingServiceClient) Connection() *grpc.ClientConn { - return s.client.Connection() -} diff --git a/doc/doc/v1alpha1.md b/doc/doc/v1alpha1.md deleted file mode 100644 index b3e68f1..0000000 --- a/doc/doc/v1alpha1.md +++ /dev/null @@ -1,1185 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [coinbase/staking/v1alpha1/action.proto](#coinbase_staking_v1alpha1_action-proto) - - [Action](#coinbase-staking-v1alpha1-Action) - - [ListActionsRequest](#coinbase-staking-v1alpha1-ListActionsRequest) - - [ListActionsResponse](#coinbase-staking-v1alpha1-ListActionsResponse) - -- [coinbase/staking/v1alpha1/protocol.proto](#coinbase_staking_v1alpha1_protocol-proto) - - [ListProtocolsRequest](#coinbase-staking-v1alpha1-ListProtocolsRequest) - - [ListProtocolsResponse](#coinbase-staking-v1alpha1-ListProtocolsResponse) - - [Protocol](#coinbase-staking-v1alpha1-Protocol) - -- [coinbase/staking/v1alpha1/network.proto](#coinbase_staking_v1alpha1_network-proto) - - [ListNetworksRequest](#coinbase-staking-v1alpha1-ListNetworksRequest) - - [ListNetworksResponse](#coinbase-staking-v1alpha1-ListNetworksResponse) - - [Network](#coinbase-staking-v1alpha1-Network) - -- [coinbase/staking/v1alpha1/staking_target.proto](#coinbase_staking_v1alpha1_staking_target-proto) - - [Contract](#coinbase-staking-v1alpha1-Contract) - - [ListStakingTargetsRequest](#coinbase-staking-v1alpha1-ListStakingTargetsRequest) - - [ListStakingTargetsResponse](#coinbase-staking-v1alpha1-ListStakingTargetsResponse) - - [StakingTarget](#coinbase-staking-v1alpha1-StakingTarget) - - [Validator](#coinbase-staking-v1alpha1-Validator) - -- [coinbase/staking/v1alpha1/common.proto](#coinbase_staking_v1alpha1_common-proto) - - [Amount](#coinbase-staking-v1alpha1-Amount) - -- [coinbase/staking/v1alpha1/ethereum_kiln.proto](#coinbase_staking_v1alpha1_ethereum_kiln-proto) - - [EthereumKilnClaimRewardsParameters](#coinbase-staking-v1alpha1-EthereumKilnClaimRewardsParameters) - - [EthereumKilnClaimStakeParameters](#coinbase-staking-v1alpha1-EthereumKilnClaimStakeParameters) - - [EthereumKilnStakeParameters](#coinbase-staking-v1alpha1-EthereumKilnStakeParameters) - - [EthereumKilnStakingContextDetails](#coinbase-staking-v1alpha1-EthereumKilnStakingContextDetails) - - [EthereumKilnStakingContextParameters](#coinbase-staking-v1alpha1-EthereumKilnStakingContextParameters) - - [EthereumKilnStakingParameters](#coinbase-staking-v1alpha1-EthereumKilnStakingParameters) - - [EthereumKilnUnstakeParameters](#coinbase-staking-v1alpha1-EthereumKilnUnstakeParameters) - -- [coinbase/staking/v1alpha1/polygon.proto](#coinbase_staking_v1alpha1_polygon-proto) - - [PolygonClaimRewardsParameters](#coinbase-staking-v1alpha1-PolygonClaimRewardsParameters) - - [PolygonRestakeParameters](#coinbase-staking-v1alpha1-PolygonRestakeParameters) - - [PolygonStakeParameters](#coinbase-staking-v1alpha1-PolygonStakeParameters) - - [PolygonStakingParameters](#coinbase-staking-v1alpha1-PolygonStakingParameters) - - [PolygonUnstakeParameters](#coinbase-staking-v1alpha1-PolygonUnstakeParameters) - -- [coinbase/staking/v1alpha1/solana.proto](#coinbase_staking_v1alpha1_solana-proto) - - [NonceOptions](#coinbase-staking-v1alpha1-NonceOptions) - - [SolanaCreateStakeAccountParameters](#coinbase-staking-v1alpha1-SolanaCreateStakeAccountParameters) - - [SolanaDeactivateStakeParameters](#coinbase-staking-v1alpha1-SolanaDeactivateStakeParameters) - - [SolanaDelegateStakeParameters](#coinbase-staking-v1alpha1-SolanaDelegateStakeParameters) - - [SolanaMergeStakeParameters](#coinbase-staking-v1alpha1-SolanaMergeStakeParameters) - - [SolanaSplitStakeParameters](#coinbase-staking-v1alpha1-SolanaSplitStakeParameters) - - [SolanaStakingParameters](#coinbase-staking-v1alpha1-SolanaStakingParameters) - - [SolanaWithdrawStakeParameters](#coinbase-staking-v1alpha1-SolanaWithdrawStakeParameters) - -- [coinbase/staking/v1alpha1/workflow.proto](#coinbase_staking_v1alpha1_workflow-proto) - - [CreateWorkflowRequest](#coinbase-staking-v1alpha1-CreateWorkflowRequest) - - [GetWorkflowRequest](#coinbase-staking-v1alpha1-GetWorkflowRequest) - - [ListWorkflowsRequest](#coinbase-staking-v1alpha1-ListWorkflowsRequest) - - [ListWorkflowsResponse](#coinbase-staking-v1alpha1-ListWorkflowsResponse) - - [PerformWorkflowStepRequest](#coinbase-staking-v1alpha1-PerformWorkflowStepRequest) - - [RefreshWorkflowStepRequest](#coinbase-staking-v1alpha1-RefreshWorkflowStepRequest) - - [TxStepOutput](#coinbase-staking-v1alpha1-TxStepOutput) - - [WaitStepOutput](#coinbase-staking-v1alpha1-WaitStepOutput) - - [Workflow](#coinbase-staking-v1alpha1-Workflow) - - [WorkflowStep](#coinbase-staking-v1alpha1-WorkflowStep) - - - [TxStepOutput.State](#coinbase-staking-v1alpha1-TxStepOutput-State) - - [WaitStepOutput.State](#coinbase-staking-v1alpha1-WaitStepOutput-State) - - [WaitStepOutput.WaitUnit](#coinbase-staking-v1alpha1-WaitStepOutput-WaitUnit) - - [Workflow.State](#coinbase-staking-v1alpha1-Workflow-State) - -- [coinbase/staking/v1alpha1/staking_context.proto](#coinbase_staking_v1alpha1_staking_context-proto) - - [ViewStakingContextRequest](#coinbase-staking-v1alpha1-ViewStakingContextRequest) - - [ViewStakingContextResponse](#coinbase-staking-v1alpha1-ViewStakingContextResponse) - -- [coinbase/staking/v1alpha1/api.proto](#coinbase_staking_v1alpha1_api-proto) - - [StakingService](#coinbase-staking-v1alpha1-StakingService) - -- [Scalar Value Types](#scalar-value-types) - - - - -

Top

- -## coinbase/staking/v1alpha1/action.proto - - - - - -### Action -An Action resource, which represents an action you may take on a network, -posted to a validator (e.g. stake, unstake). - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The resource name of the Action. Format: protocols/{protocolName}/networks/{networkName}/actions/{actionName} Ex: protocols/polygon/networks/goerli/validators/stake | - - - - - - - - -### ListActionsRequest -The request message for ListActions. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| parent | [string](#string) | | The resource name of the parent that owns the collection of actions. Format: protocols/{protocol}/networks/{network} | - - - - - - - - -### ListActionsResponse -The response message for ListActions. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| actions | [Action](#coinbase-staking-v1alpha1-Action) | repeated | The list of actions. | - - - - - - - - - - - - - - - - -

Top

- -## coinbase/staking/v1alpha1/protocol.proto - - - - - -### ListProtocolsRequest -The request message for ListProtocols. - - - - - - - - -### ListProtocolsResponse -The response message for ListProtocols. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| protocols | [Protocol](#coinbase-staking-v1alpha1-Protocol) | repeated | The list of protocols. | - - - - - - - - -### Protocol -A Protocol resource (e.g. polygon, ethereum, etc.). - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The resource name of the Protocol. Format: protocols/{protocolName} Ex: protocols/polygon | - - - - - - - - - - - - - - - - -

Top

- -## coinbase/staking/v1alpha1/network.proto - - - - - -### ListNetworksRequest -The request message for ListNetworks. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| parent | [string](#string) | | The resource name of the parent that owns the collection of networks. Format: protocols/{protocol} | - - - - - - - - -### ListNetworksResponse -The response message for ListNetworks. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| networks | [Network](#coinbase-staking-v1alpha1-Network) | repeated | The list of networks. | - - - - - - - - -### Network -A Network resource, which represents a blockchain network. -(e.g. mainnet, testnet, etc.) - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The resource name of the Network. Format: protocols/{protocolName}/networks/{networkName} Ex: protocols/polygon/networks/goerli | -| is_mainnet | [bool](#bool) | | Represents if the network is the mainnet network for the given protocol. | - - - - - - - - - - - - - - - - -

Top

- -## coinbase/staking/v1alpha1/staking_target.proto - - - - - -### Contract -A Contract resource, which represents an active contract -for the given protocol network which you can submit an action -to. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The resource name of the Contract Address. Format: protocols/{protocolName}/networks/{networkName}/stakingTargets/{contractName} Ex: protocols/polygon/networks/goerli/stakingTargets/0x857679d69fE50E7B722f94aCd2629d80C355163d | -| address | [string](#string) | | The contract address you may submit actions to. | - - - - - - - - -### ListStakingTargetsRequest -The request message for ListStakingTargets. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| parent | [string](#string) | | The resource name of the parent that owns the collection of staking targets. Format: protocols/{protocol}/networks/{network} | -| page_size | [int32](#int32) | | The maximum number of staking targets to return. The service may return fewer than this value. - -If unspecified, 100 staking targets will be returned. The maximum value is 1000; values over 1000 will be floored to 1000. | -| page_token | [string](#string) | | A page token as part of the response of a previous call. Provide this to retrieve the next page. - -When paginating, all other parameters must match the previous request to list resources. | - - - - - - - - -### ListStakingTargetsResponse -The response message for ListStakingTargets. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| staking_targets | [StakingTarget](#coinbase-staking-v1alpha1-StakingTarget) | repeated | The list of staking targets. | -| next_page_token | [string](#string) | | A token which can be provided as `page_token` to retrieve the next page. If this field is omitted, there are no additional pages. | - - - - - - - - -### StakingTarget -A Staking Target represents a destination that you perform an action on related to staking. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| validator | [Validator](#coinbase-staking-v1alpha1-Validator) | | A validator to stake to. | -| contract | [Contract](#coinbase-staking-v1alpha1-Contract) | | A contract to send a staking action to. | - - - - - - - - -### Validator -A Validator resource represents an active validator for the given protocol network. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The resource name of the Validator. Format: protocols/{protocolName}/networks/{networkName}/stakingTargets/{validatorName} Ex: protocols/polygon/networks/goerli/stakingTargets/0x857679d69fE50E7B722f94aCd2629d80C355163d | -| address | [string](#string) | | The public address of the validator. | -| commission_rate | [float](#float) | | The rate of commission for the validator | - - - - - - - - - - - - - - - - -

Top

- -## coinbase/staking/v1alpha1/common.proto - - - - - -### Amount -The amount of a token you wish to perform an action -with. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| value | [string](#string) | | The total value of the token. | -| currency | [string](#string) | | The name of the token. | - - - - - - - - - - - - - - - - -

Top

- -## coinbase/staking/v1alpha1/ethereum_kiln.proto - - - - - -### EthereumKilnClaimRewardsParameters -The parameters required for the claim rewards action on Ethereum Kiln. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| staker_address | [string](#string) | | The address you wish to claim rewards for. | -| integrator_contract_address | [string](#string) | | The address of the integrator contract. | - - - - - - - - -### EthereumKilnClaimStakeParameters -The parameters required for the claim stake action on Ethereum Kiln. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| staker_address | [string](#string) | | The address you wish to claim stake for. | -| integrator_contract_address | [string](#string) | | The address of the integrator contract | - - - - - - - - -### EthereumKilnStakeParameters -The parameters required for the stake action on Ethereum Kiln. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| staker_address | [string](#string) | | The address you wish to stake from. | -| integrator_contract_address | [string](#string) | | The address of the integrator contract. | -| amount | [Amount](#coinbase-staking-v1alpha1-Amount) | | The amount of Ethereum to stake in wei. | - - - - - - - - -### EthereumKilnStakingContextDetails -The protocol specific details for an Ethereum Kiln staking context. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| ethereum_balance | [Amount](#coinbase-staking-v1alpha1-Amount) | | The Ethereum balance of the address. This can be used to gate the stake action to make sure the requested stake amount is less than ethereum_balance. | -| integrator_share_balance | [Amount](#coinbase-staking-v1alpha1-Amount) | | The number of integrator shares owned by the address. | -| integrator_share_underlying_balance | [Amount](#coinbase-staking-v1alpha1-Amount) | | The total Ethereum you can exchange for your integrator shares. This can be used to gate the unstake action to make sure the requested unstake amount is less than integrator_share_underlying_balance | -| total_exitable_eth | [Amount](#coinbase-staking-v1alpha1-Amount) | | The total amount of Ethereum you can redeem for all non-claimed vPool shares. This along with the condition total_shares_pending_exit == fulfillable_share_count can be used to gate the claim_stake action. | -| total_shares_pending_exit | [Amount](#coinbase-staking-v1alpha1-Amount) | | The number of vPool shares are eligible to receive now or at a later point in time. | -| fulfillable_share_count | [Amount](#coinbase-staking-v1alpha1-Amount) | | The number of vPool shares you are able to claim now. | - - - - - - - - -### EthereumKilnStakingContextParameters -The protocol specific parameters required for fetching a staking context. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| integrator_contract_address | [string](#string) | | Integrator contract address. | - - - - - - - - -### EthereumKilnStakingParameters -The parameters needed for staking on Ethereum via Kiln. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| stake_parameters | [EthereumKilnStakeParameters](#coinbase-staking-v1alpha1-EthereumKilnStakeParameters) | | The parameters for stake action on Ethereum Kiln. | -| unstake_parameters | [EthereumKilnUnstakeParameters](#coinbase-staking-v1alpha1-EthereumKilnUnstakeParameters) | | The parameters for unstake action on Ethereum Kiln. | -| claim_rewards_parameters | [EthereumKilnClaimRewardsParameters](#coinbase-staking-v1alpha1-EthereumKilnClaimRewardsParameters) | | The parameters for claim rewards action on Ethereum Kiln. | -| claim_stake_parameters | [EthereumKilnClaimStakeParameters](#coinbase-staking-v1alpha1-EthereumKilnClaimStakeParameters) | | The parameters for claim stake action on Ethereum Kiln. | - - - - - - - - -### EthereumKilnUnstakeParameters -The parameters required for the unstake action on Ethereum Kiln. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| staker_address | [string](#string) | | The address you wish to unstake from. | -| integrator_contract_address | [string](#string) | | The address of the integrator contract. | -| amount | [Amount](#coinbase-staking-v1alpha1-Amount) | | The amount of Ethereum to unstake in wei. | - - - - - - - - - - - - - - - - -

Top

- -## coinbase/staking/v1alpha1/polygon.proto - - - - - -### PolygonClaimRewardsParameters -The parameters required for claim rewards action on Polygon. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| delegator_address | [string](#string) | | The public address of the delegator you wish to interact with. | -| validator_address | [string](#string) | | The public address of the validator you wish to perform the action to. | - - - - - - - - -### PolygonRestakeParameters -The parameters required for unstake action on Polygon. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| delegator_address | [string](#string) | | The public address of the delegator you wish to interact with. | -| validator_address | [string](#string) | | The public address of the validator you wish to perform the action to. | - - - - - - - - -### PolygonStakeParameters -The parameters required for stake action on Polygon. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| delegator_address | [string](#string) | | The public address of the delegator you wish to interact with. | -| validator_address | [string](#string) | | The public address of the validator you wish to perform the action to. | -| amount | [Amount](#coinbase-staking-v1alpha1-Amount) | | The amount of the asset. For native assets or ERC-20 contracts, this is presented in terms of atomic units (e.g., Wei for Ether) as a base-10 number. | - - - - - - - - -### PolygonStakingParameters -The parameters needed for staking on Polygon. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| stake_parameters | [PolygonStakeParameters](#coinbase-staking-v1alpha1-PolygonStakeParameters) | | The parameters for stake action on Polygon. | -| unstake_parameters | [PolygonUnstakeParameters](#coinbase-staking-v1alpha1-PolygonUnstakeParameters) | | The parameters for unstake action on Polygon. | -| restake_parameters | [PolygonRestakeParameters](#coinbase-staking-v1alpha1-PolygonRestakeParameters) | | The parameters for restake action on Polygon. | -| claim_rewards_parameters | [PolygonClaimRewardsParameters](#coinbase-staking-v1alpha1-PolygonClaimRewardsParameters) | | The parameters for claim rewards action on Polygon. | - - - - - - - - -### PolygonUnstakeParameters -The parameters required for unstake action on Polygon. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| delegator_address | [string](#string) | | The public address of the delegator you wish to interact with. | -| validator_address | [string](#string) | | The public address of the validator you wish to perform the action to. | -| amount | [Amount](#coinbase-staking-v1alpha1-Amount) | | The amount of the asset. For native assets or ERC-20 contracts, this is presented in terms of atomic units (e.g., Wei for Ether) as a base-10 number. | - - - - - - - - - - - - - - - - -

Top

- -## coinbase/staking/v1alpha1/solana.proto - - - - - -### NonceOptions -The parameters required to use a durable transaction nonce for Solana transactions. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| nonce | [string](#string) | | The blockhash stored in the nonce account. | -| nonce_account | [string](#string) | | The address of the nonce account. | -| nonce_authority | [string](#string) | | The address of the nonce authority. If not provided, defaults to the nonce_account_address. Signs the transaction. | - - - - - - - - -### SolanaCreateStakeAccountParameters -The parameters required for the create stake account action on Solana. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| stake_account_address | [string](#string) | | The address of the new stake account which will be created. This address must not already exist. Signs the transaction. | -| from_address | [string](#string) | | The address of the account which will fund the stake account. Pays the transaction fee. Signs the transaction. | -| stake_authority | [string](#string) | | The address of the account which will be granted signing authority over staking operations on the new stake account. If not provided, defaults to the from_address. | -| withdraw_authority | [string](#string) | | The address of the account which will be granted signing authority over withdrawing inactive stake from the new stake account. If not provided, defaults to the from_address. | -| amount | [Amount](#coinbase-staking-v1alpha1-Amount) | | The amount to fund the stake account with, in Lamports. | -| nonce_options | [NonceOptions](#coinbase-staking-v1alpha1-NonceOptions) | | The parameters required to use a durable transaction nonce for Solana transactions. | - - - - - - - - -### SolanaDeactivateStakeParameters -The parameters required for the deactivate stake action on Solana. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| stake_account_address | [string](#string) | | The address of the stake account which will have its stake deactivated. Stake must be currently active. | -| stake_authority | [string](#string) | | The address of the account which has signing authority over staking operations on the stake account. Signs the transaction. | -| nonce_options | [NonceOptions](#coinbase-staking-v1alpha1-NonceOptions) | | The parameters required to use a durable transaction nonce for Solana transactions. | - - - - - - - - -### SolanaDelegateStakeParameters -The parameters required for the delegate stake action on Solana. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| stake_account_address | [string](#string) | | The address of the stake account which will be delegating its stake. | -| vote_account_address | [string](#string) | | The address of the validator's vote account to which the stake will be delegated. | -| stake_authority | [string](#string) | | The address of the account which has signing authority over staking operations on the stake account. Signs the transaction. | -| nonce_options | [NonceOptions](#coinbase-staking-v1alpha1-NonceOptions) | | The parameters required to use a durable transaction nonce for Solana transactions. | - - - - - - - - -### SolanaMergeStakeParameters -The parameters required for merge stake action on Solana. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| stake_account_address | [string](#string) | | The address of the stake account will be merged into and have stake added to it. | -| source_stake_account_address | [string](#string) | | The address of the source stake account which will have no longer exist after the merge. | -| stake_authority | [string](#string) | | The address of the account which has signing authority over staking operations on the stake account. Signs the transaction. | -| nonce_options | [NonceOptions](#coinbase-staking-v1alpha1-NonceOptions) | | The parameters required to use a durable transaction nonce for Solana transactions. | - - - - - - - - -### SolanaSplitStakeParameters -The parameters required for split stake action on Solana. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| stake_account_address | [string](#string) | | The address of the stake account will be split and have its stake removed. | -| new_stake_account_address | [string](#string) | | The address of the new stake account which will be created and have the stake added to it. | -| stake_authority | [string](#string) | | The address of the account which has signing authority over staking operations on the stake account. Signs the transaction. | -| amount | [Amount](#coinbase-staking-v1alpha1-Amount) | | The amount of stake to split, in Lamports. | -| nonce_options | [NonceOptions](#coinbase-staking-v1alpha1-NonceOptions) | | The parameters required to use a durable transaction nonce for Solana transactions. | - - - - - - - - -### SolanaStakingParameters -The parameters needed for staking on Solana. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| create_stake_parameters | [SolanaCreateStakeAccountParameters](#coinbase-staking-v1alpha1-SolanaCreateStakeAccountParameters) | | The parameters for create stake account action on Solana. | -| delegate_stake_parameters | [SolanaDelegateStakeParameters](#coinbase-staking-v1alpha1-SolanaDelegateStakeParameters) | | The parameters for delegate stake action on Solana. | -| deactivate_stake_parameters | [SolanaDeactivateStakeParameters](#coinbase-staking-v1alpha1-SolanaDeactivateStakeParameters) | | The parameters for deactivate stake action on Solana. | -| withdraw_stake_parameters | [SolanaWithdrawStakeParameters](#coinbase-staking-v1alpha1-SolanaWithdrawStakeParameters) | | The parameters for withdraw stake action on Solana. | -| split_stake_parameters | [SolanaSplitStakeParameters](#coinbase-staking-v1alpha1-SolanaSplitStakeParameters) | | The parameters for split stake action on Solana. | -| merge_stake_parameters | [SolanaMergeStakeParameters](#coinbase-staking-v1alpha1-SolanaMergeStakeParameters) | | The parameters for merge stake action on Solana. | - - - - - - - - -### SolanaWithdrawStakeParameters -The parameters required for the withdraw stake action on Solana. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| stake_account_address | [string](#string) | | The address of the stake account from which stake will be withdrawn. Stake must be currently inactive. | -| recipient_address | [string](#string) | | The address of the recipient account which will receive the withdrawn stake. | -| withdraw_authority | [string](#string) | | The address of the account which has signing authority over withdrawing inactive stake from the stake account. Signs the transaction. | -| amount | [Amount](#coinbase-staking-v1alpha1-Amount) | | The amount to withdraw from the stake account, in Lamports. | -| nonce_options | [NonceOptions](#coinbase-staking-v1alpha1-NonceOptions) | | The parameters required to use a durable transaction nonce for Solana transactions. | - - - - - - - - - - - - - - - - -

Top

- -## coinbase/staking/v1alpha1/workflow.proto - - - - - -### CreateWorkflowRequest -The request message for CreateWorkflow. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| parent | [string](#string) | | The resource name of the parent that owns the workflow. Format: projects/{project} | -| workflow | [Workflow](#coinbase-staking-v1alpha1-Workflow) | | The workflow to create. | - - - - - - - - -### GetWorkflowRequest -The message for GetWorkflow. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The resource name of the workflow. Format: projects/{project}/workflows/{workflow} | - - - - - - - - -### ListWorkflowsRequest -The message for ListWorkflows. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| parent | [string](#string) | | The resource name of the parent that owns the collection of networks. Format: projects/{project} | -| filter | [string](#string) | | [AIP-160](https://google.aip.dev/160) filter Supported fields: - string delegator_address: "0x..." - string validator_address: "0x..." - string action: "stake", "unstake" - string protocol: "ethereum_kiln" - string network: "goerli", "mainnet" - string amount: "10000" - string currency: "ETH" | -| page_size | [int32](#int32) | | The maximum number of workflows to return. The service may return fewer than this value. - -If unspecified, 100 workflows will be returned. The maximum value is 1000; values over 1000 will be floored to 1000. | -| page_token | [string](#string) | | A page token as part of the response of a previous call. Provide this to retrieve the next page. - -When paginating, all other parameters must match the previous request to list resources. | - - - - - - - - -### ListWorkflowsResponse -The response message for ListWorkflows. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| workflows | [Workflow](#coinbase-staking-v1alpha1-Workflow) | repeated | The list of workflows. | -| next_page_token | [string](#string) | | A token which can be provided as `page_token` to retrieve the next page. If this field is omitted, there are no additional pages. | - - - - - - - - -### PerformWorkflowStepRequest -The request message for PerformWorkflowStep. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The resource name of the workflow. Format: projects/{project}/workflows/{workflow} | -| step | [int32](#int32) | | The index of the step to be performed. | -| data | [string](#string) | | Transaction metadata. This is either the signed transaction or transaction hash depending on the workflow's broadcast method. | - - - - - - - - -### RefreshWorkflowStepRequest -The request message for RefreshWorkflowStepRequest. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The resource name of the workflow. Format: projects/{project}/workflows/{workflow} | -| step | [int32](#int32) | | The index of the step to be refreshed. | - - - - - - - - -### TxStepOutput -The details of a transaction being constructed and broadcasted to the network. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| unsigned_tx | [string](#string) | | The unsigned transaction which was signed in order to be broadcasted. | -| signed_tx | [string](#string) | | The signed transaction which was asked to be broadcasted. | -| tx_hash | [string](#string) | | The hash of the broadcasted transaction. | -| state | [TxStepOutput.State](#coinbase-staking-v1alpha1-TxStepOutput-State) | | The state of the transaction step. | -| error_message | [string](#string) | | The error message if the transaction step failed. | - - - - - - - - -### WaitStepOutput -The output details of a step where we wait for some kind of on-chain activity to finish like reaching a certain checkpoint, epoch or block. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| start | [int64](#int64) | | The beginning of wait period. | -| current | [int64](#int64) | | The current wait progress. | -| target | [int64](#int64) | | The target wait end point. | -| unit | [WaitStepOutput.WaitUnit](#coinbase-staking-v1alpha1-WaitStepOutput-WaitUnit) | | The wait unit (like checkpoint, block, epoch etc). | -| state | [WaitStepOutput.State](#coinbase-staking-v1alpha1-WaitStepOutput-State) | | The state of the wait step. | - - - - - - - - -### Workflow -A Workflow resource. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The resource name of the workflow. Format: projects/{projectUUID}/workflows/{workflowUUID} Ex: projects/ 123e4567-e89b-12d3-a456-426614174000/workflows/123e4567-e89b-12d3-a456-426614174000 | -| action | [string](#string) | | The resource name of the action being performed. Format: protocols/{protocol}/networks/{network}/actions/{action} | -| polygon_staking_parameters | [PolygonStakingParameters](#coinbase-staking-v1alpha1-PolygonStakingParameters) | | Polygon staking parameters. | -| solana_staking_parameters | [SolanaStakingParameters](#coinbase-staking-v1alpha1-SolanaStakingParameters) | | Solana staking parameters. | -| ethereum_kiln_staking_parameters | [EthereumKilnStakingParameters](#coinbase-staking-v1alpha1-EthereumKilnStakingParameters) | | EthereumKiln staking parameters. | -| state | [Workflow.State](#coinbase-staking-v1alpha1-Workflow-State) | | The current state of the workflow. | -| current_step_id | [int32](#int32) | | The index of the current step. | -| steps | [WorkflowStep](#coinbase-staking-v1alpha1-WorkflowStep) | repeated | The list of steps for this workflow. | -| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp the workflow was created. | -| update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp the workflow was last updated. | -| skip_broadcast | [bool](#bool) | | Flag to skip tx broadcast to network on behalf of the user. Use this flag if you instead prefer to broadcast signed txs on your own. | -| complete_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The timestamp the workflow completed. | - - - - - - - - -### WorkflowStep -The information for a step in the workflow. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| name | [string](#string) | | The human readable name of the step. | -| tx_step_output | [TxStepOutput](#coinbase-staking-v1alpha1-TxStepOutput) | | The tx step output (e.g. transaction metadata such as unsigned tx, signed tx etc). | -| wait_step_output | [WaitStepOutput](#coinbase-staking-v1alpha1-WaitStepOutput) | | The waiting details for any kind like how many checkpoints away for unbonding etc. | - - - - - - - - - - -### TxStepOutput.State -State defines an enumeration of states for a staking transaction. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| STATE_UNSPECIFIED | 0 | Unspecified transaction state, this is for backwards compatibility. | -| STATE_NOT_CONSTRUCTED | 1 | Tx has not yet been constructed in the backend. | -| STATE_CONSTRUCTED | 2 | Tx construction is over in the backend. | -| STATE_PENDING_SIGNING | 3 | Tx is waiting to be signed. | -| STATE_SIGNED | 4 | Tx has been signed and returned to the backend. | -| STATE_BROADCASTING | 5 | Tx is being broadcasted to the network. | -| STATE_CONFIRMING | 6 | Tx is waiting for confirmation. | -| STATE_CONFIRMED | 7 | Tx has been confirmed to be included in a block. | -| STATE_FINALIZED | 8 | Tx has been finalized. | -| STATE_FAILED | 9 | Tx construction or broadcasting failed. | -| STATE_SUCCESS | 10 | Tx has been successfully executed. | -| STATE_CANCELING | 11 | Tx is being canceled. | -| STATE_CANCELED | 12 | Tx has been canceled. | -| STATE_CANCEL_FAILED | 13 | Tx cancellation failed. | -| STATE_FAILED_REFRESHABLE | 14 | Tx failed but can be refreshed. | -| STATE_REFRESHING | 15 | Tx is being refreshed. | -| STATE_PENDING_EXT_BROADCAST | 16 | Tx is waiting to be externally broadcasted by the customer. | - - - - - -### WaitStepOutput.State -WaitStepState defines an enumeration of states for a wait step. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| STATE_UNSPECIFIED | 0 | Unspecified wait step state. | -| STATE_NOT_STARTED | 1 | Wait step has not started. | -| STATE_IN_PROGRESS | 2 | Wait step is in-progress. | -| STATE_COMPLETED | 3 | Wait step completed. | - - - - - -### WaitStepOutput.WaitUnit -The unit of wait time. - -| Name | Number | Description | -| ---- | ------ | ----------- | -| WAIT_UNIT_UNSPECIFIED | 0 | Unspecified wait time. | -| WAIT_UNIT_SECONDS | 1 | Wait time measured in seconds. | -| WAIT_UNIT_BLOCKS | 2 | Wait time measured in blocks. | -| WAIT_UNIT_EPOCHS | 3 | Wait time measured in epochs. | -| WAIT_UNIT_CHECKPOINTS | 4 | Wait time measured in checkpoints. | - - - - - -### Workflow.State -The state of a workflow -Example workflow states: -IN_PROGRESS -> WAITING_FOR_SIGNING -> IN_PROGRESS -> COMPLETED -.................................................|-> FAILED -IN_PROGRESS -> WAITING_FOR_SIGNING -> CANCELING -> CANCELED -...............................................|-> CANCEL_FAILED - -| Name | Number | Description | -| ---- | ------ | ----------- | -| STATE_UNSPECIFIED | 0 | Unspecified workflow state, this is for backwards compatibility. | -| STATE_IN_PROGRESS | 1 | In Progress represents a workflow that is currently in progress. | -| STATE_WAITING_FOR_SIGNING | 2 | Waiting for signing represents the workflow is waiting on the consumer to sign and return the corresponding signed tx. | -| STATE_COMPLETED | 3 | Completed represents the workflow has completed. | -| STATE_FAILED | 4 | Failed represents the workflow has failed. | -| STATE_CANCELING | 5 | Canceling represents the workflow is being canceled. | -| STATE_CANCELED | 6 | Canceled represents the workflow has been canceled. | -| STATE_CANCEL_FAILED | 7 | Cancel failed represents the workflow failed to cancel. | -| STATE_FAILED_REFRESHABLE | 8 | Failed refreshable represents the workflow failed but can be refreshed. | -| STATE_WAITING_FOR_EXT_BROADCAST | 9 | Waiting for external broadcast represents the workflow is waiting for the customer to broadcast a tx and return its corresponding tx hash. | - - - - - - - - - - - -

Top

- -## coinbase/staking/v1alpha1/staking_context.proto - - - - - -### ViewStakingContextRequest -The request message for the ViewStakingContext request. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| address | [string](#string) | | The address to fetch staking context for. | -| network | [string](#string) | | The network to fetch staking context for. | -| ethereum_kiln_staking_context_parameters | [EthereumKilnStakingContextParameters](#coinbase-staking-v1alpha1-EthereumKilnStakingContextParameters) | | EthereumKiln staking context parameters. | - - - - - - - - -### ViewStakingContextResponse -The response message for the ViewStakingContext request. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| address | [string](#string) | | The address you are getting a staking context for. | -| ethereum_kiln_staking_context_details | [EthereumKilnStakingContextDetails](#coinbase-staking-v1alpha1-EthereumKilnStakingContextDetails) | | EthereumKiln staking context details. | - - - - - - - - - - - - - - - - -

Top

- -## coinbase/staking/v1alpha1/api.proto - - - - - - - - - - - -### StakingService -StakingService manages staking related resources such as protocols, networks, validators and workflows. - -| Method Name | Request Type | Response Type | Description | -| ----------- | ------------ | ------------- | ------------| -| ListProtocols | [ListProtocolsRequest](#coinbase-staking-v1alpha1-ListProtocolsRequest) | [ListProtocolsResponse](#coinbase-staking-v1alpha1-ListProtocolsResponse) | List supported protocols. | -| ListNetworks | [ListNetworksRequest](#coinbase-staking-v1alpha1-ListNetworksRequest) | [ListNetworksResponse](#coinbase-staking-v1alpha1-ListNetworksResponse) | List supported staking networks for a given protocol. | -| ListStakingTargets | [ListStakingTargetsRequest](#coinbase-staking-v1alpha1-ListStakingTargetsRequest) | [ListStakingTargetsResponse](#coinbase-staking-v1alpha1-ListStakingTargetsResponse) | List supported staking targets for a given protocol and network. | -| ListActions | [ListActionsRequest](#coinbase-staking-v1alpha1-ListActionsRequest) | [ListActionsResponse](#coinbase-staking-v1alpha1-ListActionsResponse) | List supported actions for a given protocol and network. | -| CreateWorkflow | [CreateWorkflowRequest](#coinbase-staking-v1alpha1-CreateWorkflowRequest) | [Workflow](#coinbase-staking-v1alpha1-Workflow) | Create a workflow to perform an action. | -| GetWorkflow | [GetWorkflowRequest](#coinbase-staking-v1alpha1-GetWorkflowRequest) | [Workflow](#coinbase-staking-v1alpha1-Workflow) | Get the current state of an active workflow. | -| ListWorkflows | [ListWorkflowsRequest](#coinbase-staking-v1alpha1-ListWorkflowsRequest) | [ListWorkflowsResponse](#coinbase-staking-v1alpha1-ListWorkflowsResponse) | List all workflows in a project. | -| PerformWorkflowStep | [PerformWorkflowStepRequest](#coinbase-staking-v1alpha1-PerformWorkflowStepRequest) | [Workflow](#coinbase-staking-v1alpha1-Workflow) | Perform the next step in a workflow. | -| RefreshWorkflowStep | [RefreshWorkflowStepRequest](#coinbase-staking-v1alpha1-RefreshWorkflowStepRequest) | [Workflow](#coinbase-staking-v1alpha1-Workflow) | Refresh the current step in a workflow. | -| ViewStakingContext | [ViewStakingContextRequest](#coinbase-staking-v1alpha1-ViewStakingContextRequest) | [ViewStakingContextResponse](#coinbase-staking-v1alpha1-ViewStakingContextResponse) | View Staking context information given a specific network address. | - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | -| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- | -| double | | double | double | float | float64 | double | float | Float | -| float | | float | float | float | float32 | float | float | Float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum | -| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) | -| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum | -| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) | - diff --git a/docs/images/banner.svg b/docs/images/banner.svg new file mode 100644 index 0000000..0fd3aa8 --- /dev/null +++ b/docs/images/banner.svg @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/openapi/staking.swagger.json b/docs/openapi/orchestration.swagger.json similarity index 63% rename from doc/openapi/staking.swagger.json rename to docs/openapi/orchestration.swagger.json index 965071d..39d3a86 100644 --- a/doc/openapi/staking.swagger.json +++ b/docs/openapi/orchestration.swagger.json @@ -1,9 +1,9 @@ { "swagger": "2.0", "info": { - "title": "Coinbase Non-Custodial Staking API", - "description": "Staking Service is a non-custodial staking service that aims to support multiple protocols and actions on them.", - "version": "v1alpha1" + "title": "Orchestration Service", + "description": "Service that can power non-custodial staking experiences for your users.", + "version": "v1" }, "tags": [ { @@ -14,14 +14,18 @@ "name": "Network", "description": "Networks details" }, - { - "name": "Validator", - "description": "Validators details" - }, { "name": "Action", "description": "Actions details" }, + { + "name": "StakingTarget", + "description": "Staking targets details" + }, + { + "name": "StakingContext", + "description": "Staking context details" + }, { "name": "Workflow", "description": "Workflow management details" @@ -42,7 +46,7 @@ "application/json" ], "paths": { - "/api/v1alpha1/protocols": { + "/v1/protocols": { "get": { "summary": "List supported protocols", "description": "List supported protocols", @@ -51,7 +55,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1ListProtocolsResponse" + "$ref": "#/definitions/v1ListProtocolsResponse" } }, "400": { @@ -102,7 +106,7 @@ ] } }, - "/api/v1alpha1/viewStakingContext:view": { + "/v1/viewStakingContext:view": { "get": { "summary": "Returns point-in-time context of staking data for an address", "description": "Returns point-in-time context of staking data for an address", @@ -111,7 +115,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1ViewStakingContextResponse" + "$ref": "#/definitions/v1ViewStakingContextResponse" } }, "400": { @@ -185,7 +189,7 @@ ] } }, - "/api/v1alpha1/{name}": { + "/v1/{name}": { "get": { "summary": "Get workflow", "operationId": "getWorkflow", @@ -193,77 +197,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1Workflow" - } - }, - "400": { - "description": "The request attempted has invalid parameters", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - }, - "401": { - "description": "Returned if authentication information is invalid", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - }, - "403": { - "description": "Returned when a user does not have permission to the resource.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - }, - "404": { - "description": "Returned when a resource is not found.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - }, - "429": { - "description": "Returned when a resource limit has been reached.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - }, - "500": { - "description": "Returned when an internal server error happens.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "name", - "description": "The resource name of the workflow.\nFormat: projects/{project}/workflows/{workflow}", - "in": "path", - "required": true, - "type": "string", - "pattern": "projects/[^/]+/workflows/[^/]+" - } - ], - "tags": [ - "Workflow" - ] - } - }, - "/api/v1alpha1/{name}/refresh": { - "post": { - "summary": "Refresh the current step in a workflow", - "description": "Refresh the current step in a workflow", - "operationId": "refreshWorkflow", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1alpha1Workflow" + "$ref": "#/definitions/v1Workflow" } }, "400": { @@ -317,25 +251,6 @@ "required": true, "type": "string", "pattern": "projects/[^/]+/workflows/[^/]+" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "step": { - "type": "integer", - "format": "int32", - "description": "The index of the step to be refreshed." - } - }, - "description": "The request message for RefreshWorkflowStepRequest.", - "required": [ - "step" - ] - } } ], "tags": [ @@ -343,7 +258,7 @@ ] } }, - "/api/v1alpha1/{name}/step": { + "/v1/{name}/step": { "post": { "summary": "Perform the next step in a workflow", "description": "Perform the next step in a workflow", @@ -352,7 +267,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1Workflow" + "$ref": "#/definitions/v1Workflow" } }, "400": { @@ -412,23 +327,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "step": { - "type": "integer", - "format": "int32", - "description": "The index of the step to be performed." - }, - "data": { - "type": "string", - "description": "Transaction metadata. This is either the signed transaction or transaction hash depending on the workflow's broadcast method." - } - }, - "description": "The request message for PerformWorkflowStep.", - "required": [ - "step", - "data" - ] + "$ref": "#/definitions/StakingServicePerformWorkflowStepBody" } } ], @@ -437,7 +336,7 @@ ] } }, - "/api/v1alpha1/{parent}/actions": { + "/v1/{parent}/actions": { "get": { "summary": "List supported actions", "description": "List supported actions", @@ -446,7 +345,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1ListActionsResponse" + "$ref": "#/definitions/v1ListActionsResponse" } }, "400": { @@ -507,7 +406,7 @@ ] } }, - "/api/v1alpha1/{parent}/networks": { + "/v1/{parent}/networks": { "get": { "summary": "List supported networks", "description": "List supported networks", @@ -516,7 +415,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1ListNetworksResponse" + "$ref": "#/definitions/v1ListNetworksResponse" } }, "400": { @@ -577,7 +476,7 @@ ] } }, - "/api/v1alpha1/{parent}/stakingTargets": { + "/v1/{parent}/stakingTargets": { "get": { "summary": "List supported staking targets", "description": "List supported staking targets", @@ -586,7 +485,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1ListStakingTargetsResponse" + "$ref": "#/definitions/v1ListStakingTargetsResponse" } }, "400": { @@ -662,7 +561,7 @@ ] } }, - "/api/v1alpha1/{parent}/workflows": { + "/v1/{parent}/workflows": { "get": { "summary": "List supported workflows", "operationId": "listWorkflows", @@ -670,7 +569,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1ListWorkflowsResponse" + "$ref": "#/definitions/v1ListWorkflowsResponse" } }, "400": { @@ -727,7 +626,7 @@ }, { "name": "filter", - "description": "[AIP-160](https://google.aip.dev/160) filter\nSupported fields:\n- string delegator_address: \"0x...\"\n- string validator_address: \"0x...\"\n- string action: \"stake\", \"unstake\"\n- string protocol: \"ethereum_kiln\"\n- string network: \"goerli\", \"mainnet\"\n- string amount: \"10000\"\n- string currency: \"ETH\"", + "description": "[AIP-160](https://google.aip.dev/160) filter\nSupported fields:\n- string action: \"stake\", \"unstake\"\n- string protocol: \"ethereum_kiln\"\n- string network: \"holesky\", \"mainnet\"", "in": "query", "required": false, "type": "string" @@ -759,7 +658,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/v1alpha1Workflow" + "$ref": "#/definitions/v1Workflow" } }, "400": { @@ -820,7 +719,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1alpha1Workflow", + "$ref": "#/definitions/v1Workflow", "required": [ "workflow" ] @@ -834,6 +733,37 @@ } }, "definitions": { + "StakeAccountBalanceState": { + "type": "string", + "enum": [ + "BALANCE_STATE_UNSPECIFIED", + "BALANCE_STATE_INACTIVE", + "BALANCE_STATE_ACTIVATING", + "BALANCE_STATE_ACTIVE", + "BALANCE_STATE_DEACTIVATING" + ], + "default": "BALANCE_STATE_UNSPECIFIED", + "description": "Represents the different states a stake account balance can have.\nUsed to check to see if stake is actively earning rewards or ready to be withdrawn.\n\n - BALANCE_STATE_UNSPECIFIED: The balance is not known.\n - BALANCE_STATE_INACTIVE: The balance is not actively staking.\n - BALANCE_STATE_ACTIVATING: The balance is in a warm up period and will activate in the next epoch.\n - BALANCE_STATE_ACTIVE: The balance is actively staking and earning rewards.\n - BALANCE_STATE_DEACTIVATING: The balance is in a cool down period and will be deactivated in the next epoch." + }, + "StakingServicePerformWorkflowStepBody": { + "type": "object", + "properties": { + "step": { + "type": "integer", + "format": "int32", + "description": "The index of the step to be performed." + }, + "data": { + "type": "string", + "description": "Transaction metadata. This is either the signed transaction or transaction hash depending on the workflow's broadcast method." + } + }, + "description": "The request message for PerformWorkflowStep.", + "required": [ + "step", + "data" + ] + }, "WaitStepOutputWaitUnit": { "type": "string", "enum": [ @@ -874,17 +804,17 @@ } } }, - "v1alpha1Action": { + "v1Action": { "type": "object", "properties": { "name": { "type": "string", - "title": "The resource name of the Action.\nFormat: protocols/{protocolName}/networks/{networkName}/actions/{actionName}\nEx: protocols/polygon/networks/goerli/validators/stake" + "title": "The resource name of the Action.\nFormat: protocols/{protocolName}/networks/{networkName}/actions/{actionName}\nEx: protocols/ethereum_kiln/networks/holesky/validators/stake" } }, - "description": "An Action resource, which represents an action you may take on a network,\nposted to a validator (e.g. stake, unstake)." + "description": "An Action resource represents an action you may take on a network (e.g. stake, unstake)." }, - "v1alpha1Amount": { + "v1Amount": { "type": "object", "properties": { "value": { @@ -898,12 +828,12 @@ }, "description": "The amount of a token you wish to perform an action\nwith." }, - "v1alpha1Contract": { + "v1Contract": { "type": "object", "properties": { "name": { "type": "string", - "title": "The resource name of the Contract Address.\nFormat: protocols/{protocolName}/networks/{networkName}/stakingTargets/{contractName}\nEx: protocols/polygon/networks/goerli/stakingTargets/0x857679d69fE50E7B722f94aCd2629d80C355163d" + "title": "The resource name of the Contract Address.\nFormat: protocols/{protocolName}/networks/{networkName}/stakingTargets/{contractName}\nEx: protocols/ethereum_kiln/networks/holesky/stakingTargets/0xA55416de5DE61A0AC1aa8970a280E04388B1dE4b" }, "address": { "type": "string", @@ -912,26 +842,7 @@ }, "description": "A Contract resource, which represents an active contract\nfor the given protocol network which you can submit an action\nto." }, - "v1alpha1EthereumKilnClaimRewardsParameters": { - "type": "object", - "properties": { - "stakerAddress": { - "type": "string", - "description": "The address you wish to claim rewards for." - }, - "integratorContractAddress": { - "type": "string", - "description": "The address of the integrator contract." - } - }, - "description": "The parameters required for the claim rewards action on Ethereum Kiln.", - "title": "EthereumKiln: Claim Rewards Parameters", - "required": [ - "stakerAddress", - "integratorContractAddress" - ] - }, - "v1alpha1EthereumKilnClaimStakeParameters": { + "v1EthereumKilnClaimStakeParameters": { "type": "object", "properties": { "stakerAddress": { @@ -950,7 +861,7 @@ "integratorContractAddress" ] }, - "v1alpha1EthereumKilnStakeParameters": { + "v1EthereumKilnStakeParameters": { "type": "object", "properties": { "stakerAddress": { @@ -962,7 +873,7 @@ "description": "The address of the integrator contract." }, "amount": { - "$ref": "#/definitions/v1alpha1Amount", + "$ref": "#/definitions/v1Amount", "description": "The amount of Ethereum to stake in wei." } }, @@ -974,38 +885,38 @@ "amount" ] }, - "v1alpha1EthereumKilnStakingContextDetails": { + "v1EthereumKilnStakingContextDetails": { "type": "object", "properties": { "ethereumBalance": { - "$ref": "#/definitions/v1alpha1Amount", + "$ref": "#/definitions/v1Amount", "description": "The Ethereum balance of the address.\nThis can be used to gate the stake action to make sure the requested stake amount\nis less than ethereum_balance." }, "integratorShareBalance": { - "$ref": "#/definitions/v1alpha1Amount", + "$ref": "#/definitions/v1Amount", "description": "The number of integrator shares owned by the address." }, "integratorShareUnderlyingBalance": { - "$ref": "#/definitions/v1alpha1Amount", + "$ref": "#/definitions/v1Amount", "title": "The total Ethereum you can exchange for your integrator shares.\nThis can be used to gate the unstake action to make sure the requested unstake amount\nis less than integrator_share_underlying_balance" }, "totalExitableEth": { - "$ref": "#/definitions/v1alpha1Amount", + "$ref": "#/definitions/v1Amount", "description": "The total amount of Ethereum you can redeem for all non-claimed vPool shares.\nThis along with the condition total_shares_pending_exit == fulfillable_share_count\ncan be used to gate the claim_stake action." }, "totalSharesPendingExit": { - "$ref": "#/definitions/v1alpha1Amount", + "$ref": "#/definitions/v1Amount", "description": "The number of vPool shares are eligible to receive now or at a later point in time." }, "fulfillableShareCount": { - "$ref": "#/definitions/v1alpha1Amount", + "$ref": "#/definitions/v1Amount", "description": "The number of vPool shares you are able to claim now." } }, "description": "The protocol specific details for an Ethereum Kiln staking context.", "title": "EthereumKiln: Staking context details" }, - "v1alpha1EthereumKilnStakingContextParameters": { + "v1EthereumKilnStakingContextParameters": { "type": "object", "properties": { "integratorContractAddress": { @@ -1016,30 +927,26 @@ "description": "The protocol specific parameters required for fetching a staking context.", "title": "EthereumKiln: Staking Context Parameters" }, - "v1alpha1EthereumKilnStakingParameters": { + "v1EthereumKilnStakingParameters": { "type": "object", "properties": { "stakeParameters": { - "$ref": "#/definitions/v1alpha1EthereumKilnStakeParameters", + "$ref": "#/definitions/v1EthereumKilnStakeParameters", "description": "The parameters for stake action on Ethereum Kiln." }, "unstakeParameters": { - "$ref": "#/definitions/v1alpha1EthereumKilnUnstakeParameters", + "$ref": "#/definitions/v1EthereumKilnUnstakeParameters", "description": "The parameters for unstake action on Ethereum Kiln." }, - "claimRewardsParameters": { - "$ref": "#/definitions/v1alpha1EthereumKilnClaimRewardsParameters", - "description": "The parameters for claim rewards action on Ethereum Kiln." - }, "claimStakeParameters": { - "$ref": "#/definitions/v1alpha1EthereumKilnClaimStakeParameters", + "$ref": "#/definitions/v1EthereumKilnClaimStakeParameters", "description": "The parameters for claim stake action on Ethereum Kiln." } }, "description": "The parameters needed for staking on Ethereum via Kiln.", "title": "EthereumKiln: Staking Parameters" }, - "v1alpha1EthereumKilnUnstakeParameters": { + "v1EthereumKilnUnstakeParameters": { "type": "object", "properties": { "stakerAddress": { @@ -1051,7 +958,7 @@ "description": "The address of the integrator contract." }, "amount": { - "$ref": "#/definitions/v1alpha1Amount", + "$ref": "#/definitions/v1Amount", "description": "The amount of Ethereum to unstake in wei." } }, @@ -1063,56 +970,56 @@ "amount" ] }, - "v1alpha1ListActionsResponse": { + "v1ListActionsResponse": { "type": "object", "properties": { "actions": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/v1alpha1Action" + "$ref": "#/definitions/v1Action" }, "description": "The list of actions." } }, "description": "The response message for ListActions." }, - "v1alpha1ListNetworksResponse": { + "v1ListNetworksResponse": { "type": "object", "properties": { "networks": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/v1alpha1Network" + "$ref": "#/definitions/v1Network" }, "description": "The list of networks." } }, "description": "The response message for ListNetworks." }, - "v1alpha1ListProtocolsResponse": { + "v1ListProtocolsResponse": { "type": "object", "properties": { "protocols": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/v1alpha1Protocol" + "$ref": "#/definitions/v1Protocol" }, "description": "The list of protocols." } }, "description": "The response message for ListProtocols." }, - "v1alpha1ListStakingTargetsResponse": { + "v1ListStakingTargetsResponse": { "type": "object", "properties": { "stakingTargets": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/v1alpha1StakingTarget" + "$ref": "#/definitions/v1StakingTarget" }, "description": "The list of staking targets." }, @@ -1123,14 +1030,14 @@ }, "description": "The response message for ListStakingTargets." }, - "v1alpha1ListWorkflowsResponse": { + "v1ListWorkflowsResponse": { "type": "object", "properties": { "workflows": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/v1alpha1Workflow" + "$ref": "#/definitions/v1Workflow" }, "description": "The list of workflows." }, @@ -1141,384 +1048,205 @@ }, "description": "The response message for ListWorkflows." }, - "v1alpha1Network": { + "v1Network": { "type": "object", "properties": { "name": { "type": "string", - "title": "The resource name of the Network.\nFormat: protocols/{protocolName}/networks/{networkName}\nEx: protocols/polygon/networks/goerli" - }, - "isMainnet": { - "type": "boolean", - "description": "Represents if the network is the mainnet network\nfor the given protocol." + "title": "The resource name of the Network.\nFormat: protocols/{protocolName}/networks/{networkName}\nEx: protocols/ethereum_kiln/networks/holesky" } }, - "title": "A Network resource, which represents a blockchain network.\n(e.g. mainnet, testnet, etc.)" + "description": "A Network resource represents a blockchain network e.g. mainnet, testnet, etc." }, - "v1alpha1NonceOptions": { + "v1PriorityFee": { "type": "object", "properties": { - "nonce": { + "computeUnitLimit": { "type": "string", - "description": "The blockhash stored in the nonce account." - }, - "nonceAccount": { - "type": "string", - "description": "The address of the nonce account." - }, - "nonceAuthority": { - "type": "string", - "description": "The address of the nonce authority. If not provided, defaults to the nonce_account_address. Signs the transaction." - } - }, - "description": "The parameters required to use a durable transaction nonce for Solana transactions.", - "title": "Solana: Nonce Options" - }, - "v1alpha1PolygonClaimRewardsParameters": { - "type": "object", - "properties": { - "delegatorAddress": { - "type": "string", - "description": "The public address of the delegator you wish to\ninteract with." + "format": "int64", + "description": "The maximum number of compute units a transaction is allowed to consume." }, - "validatorAddress": { + "unitPrice": { "type": "string", - "description": "The public address of the validator you wish to\nperform the action to." + "format": "int64", + "description": "The price to pay per compute unit." } }, - "description": "The parameters required for claim rewards action on Polygon.", - "title": "The parameters needed to claim rewards on Polygon.", - "required": [ - "delegatorAddress", - "validatorAddress" - ] + "description": "A prioritization fee that can be added to a Solana transaction." }, - "v1alpha1PolygonRestakeParameters": { + "v1Protocol": { "type": "object", "properties": { - "delegatorAddress": { - "type": "string", - "description": "The public address of the delegator you wish to\ninteract with." - }, - "validatorAddress": { + "name": { "type": "string", - "description": "The public address of the validator you wish to\nperform the action to." + "title": "The resource name of the Protocol.\nFormat: protocols/{protocolName}\nEx: protocols/ethereum_kiln" } }, - "description": "The parameters required for unstake action on Polygon.", - "title": "The parameters needed to restake on Polygon.", - "required": [ - "delegatorAddress", - "validatorAddress" - ] + "description": "A Protocol resource (e.g. ethereum_kiln, solana etc.)." }, - "v1alpha1PolygonStakeParameters": { + "v1SolanaClaimStakeParameters": { "type": "object", "properties": { - "delegatorAddress": { + "walletAddress": { "type": "string", - "description": "The public address of the delegator you wish to\ninteract with." + "description": "The address which is the signing authority to claim stake." }, - "validatorAddress": { + "stakeAccountAddress": { "type": "string", - "description": "The public address of the validator you wish to\nperform the action to." + "description": "The address of the stake account to claim stake from." }, - "amount": { - "$ref": "#/definitions/v1alpha1Amount", - "description": "The amount of the asset. For native assets or ERC-20 contracts, this is presented in terms of\natomic units (e.g., Wei for Ether) as a base-10 number." + "priorityFee": { + "$ref": "#/definitions/v1PriorityFee", + "description": "The option to set a priority fee for the transaction." } }, - "description": "The parameters required for stake action on Polygon.", - "title": "The parameters needed to stake on Polygon.", - "required": [ - "delegatorAddress", - "validatorAddress", - "amount" - ] + "description": "The parameters required to perform a claim stake operation on Solana.", + "title": "Solana: Claim Stake Parameters" }, - "v1alpha1PolygonStakingParameters": { + "v1SolanaStakeParameters": { "type": "object", "properties": { - "stakeParameters": { - "$ref": "#/definitions/v1alpha1PolygonStakeParameters", - "description": "The parameters for stake action on Polygon." - }, - "unstakeParameters": { - "$ref": "#/definitions/v1alpha1PolygonUnstakeParameters", - "description": "The parameters for unstake action on Polygon." - }, - "restakeParameters": { - "$ref": "#/definitions/v1alpha1PolygonRestakeParameters", - "description": "The parameters for restake action on Polygon." - }, - "claimRewardsParameters": { - "$ref": "#/definitions/v1alpha1PolygonClaimRewardsParameters", - "description": "The parameters for claim rewards action on Polygon." - } - }, - "description": "The parameters needed for staking on Polygon." - }, - "v1alpha1PolygonUnstakeParameters": { - "type": "object", - "properties": { - "delegatorAddress": { + "walletAddress": { "type": "string", - "description": "The public address of the delegator you wish to\ninteract with." + "description": "The address where the funds are coming from to stake." }, "validatorAddress": { "type": "string", - "description": "The public address of the validator you wish to\nperform the action to." + "description": "The address of the validator." }, "amount": { - "$ref": "#/definitions/v1alpha1Amount", - "description": "The amount of the asset. For native assets or ERC-20 contracts, this is presented in terms of\natomic units (e.g., Wei for Ether) as a base-10 number." - } - }, - "description": "The parameters required for unstake action on Polygon.", - "title": "The parameters needed to unstake on Polygon.", - "required": [ - "delegatorAddress", - "validatorAddress", - "amount" - ] - }, - "v1alpha1Protocol": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "The resource name of the Protocol.\nFormat: protocols/{protocolName}\nEx: protocols/polygon" + "$ref": "#/definitions/v1Amount", + "title": "The amount of Solana to stake in lamports. (1 lamport = 0.000000001 SOL)" + }, + "priorityFee": { + "$ref": "#/definitions/v1PriorityFee", + "description": "The option to set a priority fee for the transaction." } }, - "description": "A Protocol resource (e.g. polygon, ethereum, etc.)." + "description": "The parameters required to perform a stake operation on Solana.", + "title": "Solana: Stake Parameters" }, - "v1alpha1SolanaCreateStakeAccountParameters": { + "v1SolanaStakingContextDetails": { "type": "object", "properties": { - "stakeAccountAddress": { - "type": "string", - "description": "The address of the new stake account which will be created. This address must not already exist. Signs the transaction." + "balance": { + "$ref": "#/definitions/v1Amount", + "description": "The total balance of the main wallet address (system account).\nUsed to check the balance for any future staking or transaction to send." }, - "fromAddress": { + "currentEpoch": { "type": "string", - "description": "The address of the account which will fund the stake account. Pays the transaction fee. Signs the transaction." - }, - "stakeAuthority": { - "type": "string", - "description": "The address of the account which will be granted signing authority over staking operations on the new stake account. If not provided, defaults to the from_address." + "format": "int64", + "description": "The current epoch that the Solana blockchain is in.\nUsed as a frame of reference for future stake activations and deactivations." }, - "withdrawAuthority": { + "epochCompletionPercentage": { "type": "string", - "description": "The address of the account which will be granted signing authority over withdrawing inactive stake from the new stake account. If not provided, defaults to the from_address." + "description": "How much of the epoch has passed as a percentage.\nUsed to inform how much time is left before a stake is activated or deactivated." }, - "amount": { - "$ref": "#/definitions/v1alpha1Amount", - "description": "The amount to fund the stake account with, in Lamports." - }, - "nonceOptions": { - "$ref": "#/definitions/v1alpha1NonceOptions", - "description": "The parameters required to use a durable transaction nonce for Solana transactions." + "stakeAccounts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1StakeAccount" + }, + "description": "The list of staking accounts that are linked to the main wallet address (system account).\nUsed to check for statuses and balances of all stake accounts related to the main wallet address that\nthey're linked to." } }, - "description": "The parameters required for the create stake account action on Solana.", - "title": "Solana: Create Stake Account Parameters", - "required": [ - "stakeAccountAddress", - "fromAddress", - "amount" - ] + "description": "The protocol specific details for a Solana staking context.", + "title": "Solana: Staking Context Details" }, - "v1alpha1SolanaDeactivateStakeParameters": { + "v1SolanaStakingContextParameters": { "type": "object", - "properties": { - "stakeAccountAddress": { - "type": "string", - "description": "The address of the stake account which will have its stake deactivated. Stake must be currently active." - }, - "stakeAuthority": { - "type": "string", - "description": "The address of the account which has signing authority over staking operations on the stake account. Signs the transaction." - }, - "nonceOptions": { - "$ref": "#/definitions/v1alpha1NonceOptions", - "description": "The parameters required to use a durable transaction nonce for Solana transactions." - } - }, - "description": "The parameters required for the deactivate stake action on Solana.", - "title": "Solana: Deactivate Stake Parameters", - "required": [ - "stakeAccountAddress", - "stakeAuthority" - ] + "description": "The protocol specific parameters required for fetching a staking context.", + "title": "Solana: Staking Context Parameters" }, - "v1alpha1SolanaDelegateStakeParameters": { + "v1SolanaStakingParameters": { "type": "object", "properties": { - "stakeAccountAddress": { - "type": "string", - "description": "The address of the stake account which will be delegating its stake." - }, - "voteAccountAddress": { - "type": "string", - "description": "The address of the validator's vote account to which the stake will be delegated." + "stakeParameters": { + "$ref": "#/definitions/v1SolanaStakeParameters", + "description": "The parameters for stake action on Solana." }, - "stakeAuthority": { - "type": "string", - "description": "The address of the account which has signing authority over staking operations on the stake account. Signs the transaction." + "unstakeParameters": { + "$ref": "#/definitions/v1SolanaUnstakeParameters", + "description": "The parameters for unstake action on Solana." }, - "nonceOptions": { - "$ref": "#/definitions/v1alpha1NonceOptions", - "description": "The parameters required to use a durable transaction nonce for Solana transactions." + "claimStakeParameters": { + "$ref": "#/definitions/v1SolanaClaimStakeParameters", + "description": "The parameters for claim stake action on Solana." } }, - "description": "The parameters required for the delegate stake action on Solana.", - "title": "Solana: Delegate Stake Parameters", - "required": [ - "stakeAccountAddress", - "voteAccountAddress", - "stakeAuthority" - ] + "description": "The parameters needed for staking on Solana.", + "title": "Solana: Staking Parameters" }, - "v1alpha1SolanaMergeStakeParameters": { + "v1SolanaUnstakeParameters": { "type": "object", "properties": { - "stakeAccountAddress": { - "type": "string", - "description": "The address of the stake account will be merged into and have stake added to it." - }, - "sourceStakeAccountAddress": { - "type": "string", - "description": "The address of the source stake account which will have no longer exist after the merge." - }, - "stakeAuthority": { + "walletAddress": { "type": "string", - "description": "The address of the account which has signing authority over staking operations on the stake account. Signs the transaction." + "description": "The address which is the signing authority to unstake." }, - "nonceOptions": { - "$ref": "#/definitions/v1alpha1NonceOptions", - "description": "The parameters required to use a durable transaction nonce for Solana transactions." - } - }, - "description": "The parameters required for merge stake action on Solana.", - "title": "Solana: Merge Stake Parameters", - "required": [ - "stakeAccountAddress", - "sourceStakeAccountAddress", - "stakeAuthority" - ] - }, - "v1alpha1SolanaSplitStakeParameters": { - "type": "object", - "properties": { "stakeAccountAddress": { "type": "string", - "description": "The address of the stake account will be split and have its stake removed." - }, - "newStakeAccountAddress": { - "type": "string", - "description": "The address of the new stake account which will be created and have the stake added to it." - }, - "stakeAuthority": { - "type": "string", - "description": "The address of the account which has signing authority over staking operations on the stake account. Signs the transaction." + "description": "The address of the stake account to unstake from." }, "amount": { - "$ref": "#/definitions/v1alpha1Amount", - "description": "The amount of stake to split, in Lamports." + "$ref": "#/definitions/v1Amount", + "title": "The amount of Solana to unstake in lamports. (1 lamport = 0.000000001 SOL)" }, - "nonceOptions": { - "$ref": "#/definitions/v1alpha1NonceOptions", - "description": "The parameters required to use a durable transaction nonce for Solana transactions." + "priorityFee": { + "$ref": "#/definitions/v1PriorityFee", + "description": "The option to set a priority fee for the transaction." } }, - "description": "The parameters required for split stake action on Solana.", - "title": "Solana: Split Stake Parameters", - "required": [ - "stakeAccountAddress", - "newStakeAccountAddress", - "stakeAuthority", - "amount" - ] + "description": "The parameters required to perform a unstake operation on Solana.", + "title": "Solana: Unstake Parameters" }, - "v1alpha1SolanaStakingParameters": { + "v1StakeAccount": { "type": "object", "properties": { - "createStakeParameters": { - "$ref": "#/definitions/v1alpha1SolanaCreateStakeAccountParameters", - "description": "The parameters for create stake account action on Solana." - }, - "delegateStakeParameters": { - "$ref": "#/definitions/v1alpha1SolanaDelegateStakeParameters", - "description": "The parameters for delegate stake action on Solana." - }, - "deactivateStakeParameters": { - "$ref": "#/definitions/v1alpha1SolanaDeactivateStakeParameters", - "description": "The parameters for deactivate stake action on Solana." + "address": { + "type": "string", + "description": "The address of the stake account.\nUsed to hold the staked funds transferred over from the main wallet." }, - "withdrawStakeParameters": { - "$ref": "#/definitions/v1alpha1SolanaWithdrawStakeParameters", - "description": "The parameters for withdraw stake action on Solana." + "bondedStake": { + "$ref": "#/definitions/v1Amount", + "description": "The bonded balance in lamports on the stake account (rent is not included in bonded amount).\nUsed to check the amount that is currently staked." }, - "splitStakeParameters": { - "$ref": "#/definitions/v1alpha1SolanaSplitStakeParameters", - "description": "The parameters for split stake action on Solana." + "rentReserve": { + "$ref": "#/definitions/v1Amount", + "description": "The rent amount for the stake account in lamports.\nUsed to highlight the amount used as the rent to maintain the address on the Solana blockchain." }, - "mergeStakeParameters": { - "$ref": "#/definitions/v1alpha1SolanaMergeStakeParameters", - "description": "The parameters for merge stake action on Solana." - } - }, - "description": "The parameters needed for staking on Solana.", - "title": "Solana: Staking Parameters" - }, - "v1alpha1SolanaWithdrawStakeParameters": { - "type": "object", - "properties": { - "stakeAccountAddress": { - "type": "string", - "description": "The address of the stake account from which stake will be withdrawn. Stake must be currently inactive." + "balance": { + "$ref": "#/definitions/v1Amount", + "description": "The total balance on the address in lamports.\nUsed to check the total balance for the stake account." }, - "recipientAddress": { - "type": "string", - "description": "The address of the recipient account which will receive the withdrawn stake." + "balanceState": { + "$ref": "#/definitions/StakeAccountBalanceState", + "description": "The balance state of the stake account.\nUsed to show what state the currently staked funds are in.", + "readOnly": true }, - "withdrawAuthority": { + "validator": { "type": "string", - "description": "The address of the account which has signing authority over withdrawing inactive stake from the stake account. Signs the transaction." - }, - "amount": { - "$ref": "#/definitions/v1alpha1Amount", - "description": "The amount to withdraw from the stake account, in Lamports." - }, - "nonceOptions": { - "$ref": "#/definitions/v1alpha1NonceOptions", - "description": "The parameters required to use a durable transaction nonce for Solana transactions." + "description": "The validator (vote account) that the stake account is assigned to stake to.\nUsed to show where the staked funds are staked to." } }, - "description": "The parameters required for the withdraw stake action on Solana.", - "title": "Solana: Withdraw Stake Parameters", - "required": [ - "stakeAccountAddress", - "recipientAddress", - "withdrawAuthority", - "amount" - ] + "description": "The balance information for a stake account." }, - "v1alpha1StakingTarget": { + "v1StakingTarget": { "type": "object", "properties": { "validator": { - "$ref": "#/definitions/v1alpha1Validator", + "$ref": "#/definitions/v1Validator", "description": "A validator to stake to." }, "contract": { - "$ref": "#/definitions/v1alpha1Contract", + "$ref": "#/definitions/v1Contract", "description": "A contract to send a staking action to." } }, "description": "A Staking Target represents a destination that you perform an action on related to staking." }, - "v1alpha1TxStepOutput": { + "v1TxStepOutput": { "type": "object", "properties": { "unsignedTx": { @@ -1537,7 +1265,7 @@ "readOnly": true }, "state": { - "$ref": "#/definitions/v1alpha1TxStepOutputState", + "$ref": "#/definitions/v1TxStepOutputState", "description": "The state of the transaction step.", "readOnly": true }, @@ -1549,7 +1277,7 @@ }, "description": "The details of a transaction being constructed and broadcasted to the network." }, - "v1alpha1TxStepOutputState": { + "v1TxStepOutputState": { "type": "string", "enum": [ "STATE_UNSPECIFIED", @@ -1563,22 +1291,17 @@ "STATE_FINALIZED", "STATE_FAILED", "STATE_SUCCESS", - "STATE_CANCELING", - "STATE_CANCELED", - "STATE_CANCEL_FAILED", - "STATE_FAILED_REFRESHABLE", - "STATE_REFRESHING", "STATE_PENDING_EXT_BROADCAST" ], "default": "STATE_UNSPECIFIED", - "description": "State defines an enumeration of states for a staking transaction.\n\n - STATE_UNSPECIFIED: Unspecified transaction state, this is for backwards compatibility.\n - STATE_NOT_CONSTRUCTED: Tx has not yet been constructed in the backend.\n - STATE_CONSTRUCTED: Tx construction is over in the backend.\n - STATE_PENDING_SIGNING: Tx is waiting to be signed.\n - STATE_SIGNED: Tx has been signed and returned to the backend.\n - STATE_BROADCASTING: Tx is being broadcasted to the network.\n - STATE_CONFIRMING: Tx is waiting for confirmation.\n - STATE_CONFIRMED: Tx has been confirmed to be included in a block.\n - STATE_FINALIZED: Tx has been finalized.\n - STATE_FAILED: Tx construction or broadcasting failed.\n - STATE_SUCCESS: Tx has been successfully executed.\n - STATE_CANCELING: Tx is being canceled.\n - STATE_CANCELED: Tx has been canceled.\n - STATE_CANCEL_FAILED: Tx cancellation failed.\n - STATE_FAILED_REFRESHABLE: Tx failed but can be refreshed.\n - STATE_REFRESHING: Tx is being refreshed.\n - STATE_PENDING_EXT_BROADCAST: Tx is waiting to be externally broadcasted by the customer." + "description": "State defines an enumeration of states for a staking transaction.\n\n - STATE_UNSPECIFIED: Unspecified transaction state, this is for backwards compatibility.\n - STATE_NOT_CONSTRUCTED: Tx has not yet been constructed in the backend.\n - STATE_CONSTRUCTED: Tx construction is over in the backend.\n - STATE_PENDING_SIGNING: Tx is waiting to be signed.\n - STATE_SIGNED: Tx has been signed and returned to the backend.\n - STATE_BROADCASTING: Tx is being broadcasted to the network.\n - STATE_CONFIRMING: Tx is waiting for confirmation.\n - STATE_CONFIRMED: Tx has been confirmed to be included in a block.\n - STATE_FINALIZED: Tx has been finalized.\n - STATE_FAILED: Tx construction or broadcasting failed.\n - STATE_SUCCESS: Tx has been successfully executed.\n - STATE_PENDING_EXT_BROADCAST: Tx is waiting to be externally broadcasted by the customer." }, - "v1alpha1Validator": { + "v1Validator": { "type": "object", "properties": { "name": { "type": "string", - "title": "The resource name of the Validator.\nFormat: protocols/{protocolName}/networks/{networkName}/stakingTargets/{validatorName}\nEx: protocols/polygon/networks/goerli/stakingTargets/0x857679d69fE50E7B722f94aCd2629d80C355163d" + "title": "The resource name of the Validator.\nFormat: protocols/{protocolName}/networks/{networkName}/stakingTargets/{validatorName}\nEx: protocols/solana/networks/testnet/stakingTargets/GkqYQysEGmuL6V2AJoNnWZUz2ZBGWhzQXsJiXm2CLKAN" }, "address": { "type": "string", @@ -1592,7 +1315,7 @@ }, "description": "A Validator resource represents an active validator for the given protocol network." }, - "v1alpha1ViewStakingContextResponse": { + "v1ViewStakingContextResponse": { "type": "object", "properties": { "address": { @@ -1600,17 +1323,22 @@ "description": "The address you are getting a staking context for." }, "ethereumKilnStakingContextDetails": { - "$ref": "#/definitions/v1alpha1EthereumKilnStakingContextDetails", + "$ref": "#/definitions/v1EthereumKilnStakingContextDetails", "description": "EthereumKiln staking context details." + }, + "solanaStakingContextDetails": { + "$ref": "#/definitions/v1SolanaStakingContextDetails", + "description": "Solana staking context details." } }, "description": "The response message for the ViewStakingContext request.", "required": [ "address", - "ethereumKilnStakingContextDetails" + "ethereumKilnStakingContextDetails", + "solanaStakingContextDetails" ] }, - "v1alpha1WaitStepOutput": { + "v1WaitStepOutput": { "type": "object", "properties": { "start": { @@ -1637,14 +1365,14 @@ "readOnly": true }, "state": { - "$ref": "#/definitions/v1alpha1WaitStepOutputState", + "$ref": "#/definitions/v1WaitStepOutputState", "description": "The state of the wait step.", "readOnly": true } }, "description": "The output details of a step where we wait for some kind of on-chain activity to finish like reaching a certain checkpoint, epoch or block." }, - "v1alpha1WaitStepOutputState": { + "v1WaitStepOutputState": { "type": "string", "enum": [ "STATE_UNSPECIFIED", @@ -1655,7 +1383,7 @@ "default": "STATE_UNSPECIFIED", "description": "WaitStepState defines an enumeration of states for a wait step.\n\n - STATE_UNSPECIFIED: Unspecified wait step state.\n - STATE_NOT_STARTED: Wait step has not started.\n - STATE_IN_PROGRESS: Wait step is in-progress.\n - STATE_COMPLETED: Wait step completed." }, - "v1alpha1Workflow": { + "v1Workflow": { "type": "object", "properties": { "name": { @@ -1667,20 +1395,16 @@ "type": "string", "title": "The resource name of the action being\nperformed.\nFormat: protocols/{protocol}/networks/{network}/actions/{action}" }, - "polygonStakingParameters": { - "$ref": "#/definitions/v1alpha1PolygonStakingParameters", - "description": "Polygon staking parameters." - }, "solanaStakingParameters": { - "$ref": "#/definitions/v1alpha1SolanaStakingParameters", + "$ref": "#/definitions/v1SolanaStakingParameters", "description": "Solana staking parameters." }, "ethereumKilnStakingParameters": { - "$ref": "#/definitions/v1alpha1EthereumKilnStakingParameters", + "$ref": "#/definitions/v1EthereumKilnStakingParameters", "description": "EthereumKiln staking parameters." }, "state": { - "$ref": "#/definitions/v1alpha1WorkflowState", + "$ref": "#/definitions/v1WorkflowState", "description": "The current state of the workflow.", "readOnly": true }, @@ -1694,7 +1418,7 @@ "type": "array", "items": { "type": "object", - "$ref": "#/definitions/v1alpha1WorkflowStep" + "$ref": "#/definitions/v1WorkflowStep" }, "description": "The list of steps for this workflow.", "readOnly": true @@ -1725,12 +1449,11 @@ "description": "A Workflow resource.", "required": [ "action", - "polygonStakingParameters", "solanaStakingParameters", "ethereumKilnStakingParameters" ] }, - "v1alpha1WorkflowState": { + "v1WorkflowState": { "type": "string", "enum": [ "STATE_UNSPECIFIED", @@ -1738,17 +1461,13 @@ "STATE_WAITING_FOR_SIGNING", "STATE_COMPLETED", "STATE_FAILED", - "STATE_CANCELING", - "STATE_CANCELED", - "STATE_CANCEL_FAILED", - "STATE_FAILED_REFRESHABLE", "STATE_WAITING_FOR_EXT_BROADCAST" ], "default": "STATE_UNSPECIFIED", - "description": "- STATE_UNSPECIFIED: Unspecified workflow state, this is for backwards compatibility.\n - STATE_IN_PROGRESS: In Progress represents a workflow that is currently in progress.\n - STATE_WAITING_FOR_SIGNING: Waiting for signing represents the workflow is waiting on the consumer to sign and return the corresponding signed tx.\n - STATE_COMPLETED: Completed represents the workflow has completed.\n - STATE_FAILED: Failed represents the workflow has failed.\n - STATE_CANCELING: Canceling represents the workflow is being canceled.\n - STATE_CANCELED: Canceled represents the workflow has been canceled.\n - STATE_CANCEL_FAILED: Cancel failed represents the workflow failed to cancel.\n - STATE_FAILED_REFRESHABLE: Failed refreshable represents the workflow failed but can be refreshed.\n - STATE_WAITING_FOR_EXT_BROADCAST: Waiting for external broadcast represents the workflow is waiting for the customer to broadcast a tx and return its corresponding tx hash.", - "title": "The state of a workflow\nExample workflow states:\nIN_PROGRESS -\u003e WAITING_FOR_SIGNING -\u003e IN_PROGRESS -\u003e COMPLETED\n.................................................|-\u003e FAILED\nIN_PROGRESS -\u003e WAITING_FOR_SIGNING -\u003e CANCELING -\u003e CANCELED\n...............................................|-\u003e CANCEL_FAILED" + "description": "Example flow: A workflow with skip_broadcast = true leading to a successful completion.\n IN_PROGRESS -\u003e WAITING_FOR_EXT_BROADCAST -\u003e IN_PROGRESS -\u003e COMPLETED\n Example flow: A workflow with skip_broadcast = false leading to a successful completion.\n IN_PROGRESS -\u003e WAITING_FOR_SIGNING -\u003e IN_PROGRESS -\u003e COMPLETED\n Example flow: A workflow with skip_broadcast = false leading to a failure.\n IN_PROGRESS -\u003e WAITING_FOR_SIGNING -\u003e IN_PROGRESS -\u003e FAILED\n\n - STATE_UNSPECIFIED: Unspecified workflow state, this is for backwards compatibility.\n - STATE_IN_PROGRESS: In Progress represents a workflow that is currently in progress.\n - STATE_WAITING_FOR_SIGNING: Waiting for signing represents the workflow is waiting on the consumer to sign and return the corresponding signed tx.\n - STATE_COMPLETED: Completed represents the workflow has completed.\n - STATE_FAILED: Failed represents the workflow has failed.\n - STATE_WAITING_FOR_EXT_BROADCAST: Waiting for external broadcast represents the workflow is waiting for the customer to broadcast a tx and return its corresponding tx hash.", + "title": "The state of a workflow" }, - "v1alpha1WorkflowStep": { + "v1WorkflowStep": { "type": "object", "properties": { "name": { @@ -1757,12 +1476,12 @@ "readOnly": true }, "txStepOutput": { - "$ref": "#/definitions/v1alpha1TxStepOutput", + "$ref": "#/definitions/v1TxStepOutput", "description": "The tx step output (e.g. transaction metadata such as unsigned tx, signed tx etc).", "readOnly": true }, "waitStepOutput": { - "$ref": "#/definitions/v1alpha1WaitStepOutput", + "$ref": "#/definitions/v1WaitStepOutput", "description": "The waiting details for any kind like how many checkpoints away for unbonding etc.", "readOnly": true } diff --git a/docs/openapi/rewards.swagger.json b/docs/openapi/rewards.swagger.json new file mode 100644 index 0000000..6e32cd4 --- /dev/null +++ b/docs/openapi/rewards.swagger.json @@ -0,0 +1,562 @@ +{ + "swagger": "2.0", + "info": { + "title": "Rewards Service", + "description": "Service that provides access to onchain, staking-related rewards data.", + "version": "v1" + }, + "tags": [ + { + "name": "Reward", + "description": "A high-level view of an address's rewards aggregated over some period of time (ex: over an Epoch)." + }, + { + "name": "Stake", + "description": "A snapshot of an address's staking-related balance at a particular point in time. Feature coming soon." + }, + { + "name": "RewardService" + } + ], + "host": "api.developer.coinbase.com", + "basePath": "/rewards", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/{parent}/rewards": { + "get": { + "summary": "List and filter rewards", + "description": "Lists onchain rewards of an address for a specific protocol, with optional filters for time range, aggregation period, and more.", + "operationId": "RewardService_ListRewards", + "responses": { + "200": { + "description": "OK", + "schema": { + "example": { + "rewards": [ + { + "address": "beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar", + "epoch": "533", + "aggregationUnit": "epoch", + "periodStartTime": null, + "periodEndTime": "2023-11-16T00:13:44Z", + "totalEarnedNativeUnit": { + "amount": "224.7098145", + "exp": "9", + "ticker": "SOL", + "rawNumeric": "224709814509" + }, + "totalEarnedUsd": null, + "endingBalance": null, + "protocol": "solana" + }, + { + "address": "beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar", + "epoch": "532", + "aggregationUnit": "epoch", + "periodStartTime": null, + "periodEndTime": "2023-11-13T19:38:36Z", + "totalEarnedNativeUnit": { + "amount": "225.0794241", + "exp": "9", + "ticker": "SOL", + "rawNumeric": "225079424094" + }, + "totalEarnedUsd": null, + "endingBalance": null, + "protocol": "solana" + } + ], + "nextPageToken": "VAql-wtdiJWkWII9bJBDnE9oEc-8IlgU0DtKbxSDtBg=:1:1700241277" + } + } + }, + "400": { + "description": "The request attempted has invalid parameters", + "schema": { + "example": { + "code": 3, + "message": "Filter validation failed. \u003cRemediation assistance here\u003e.", + "details": [] + } + } + }, + "401": { + "description": "Returned if authentication information is invalid", + "schema": { + "example": "Unauthorized" + } + }, + "500": { + "description": "Returned when an internal server error happens.", + "schema": { + "example": { + "code": 3, + "message": "Internal server error.", + "details": [] + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "parent", + "description": "The protocol that the rewards were earned on.\nThe response will only include rewards for the protocol specified here.", + "in": "path", + "required": true, + "type": "string", + "pattern": "protocols/[^/]+" + }, + { + "name": "pageSize", + "description": "The maximum number of items to return. Maximum size of this value is 500.\nIf user supplies a value \u003e 500, the API will truncate to 500.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "pageToken", + "description": "A page token as part of the response of a previous call.\nProvide this to retrieve the next page.\n\nWhen paginating, all other parameters must match the previous\nrequest to list resources correctly.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "filter", + "description": "[AIP-160](https://google.aip.dev/160) format compliant filter. Supported protocols are 'ethereum', 'solana', and 'cosmos'.\nSupplying other protocols will return an error.\n* **Ethereum**:\n - Fields:\n - `address` - A ethereum validator public key.\n - `date` - A date in format 'YYYY-MM-DD'. Supports multiple comparisons (ex: '2024-01-15).\n - `period_end_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z').\n - Example(s):\n - `\"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474' AND date \u003e= '2024-01-01' AND date \u003c '2024-01-15'\"`\n - `\"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474' AND period_end_time \u003e= '2024-01-01T00:00:00Z' AND period_end_time \u003c '2024-01-15T00:00:00Z'\"`\n - `\"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474' AND date = '2024-01-01'\"`\n\n* **Solana**:\n - Fields:\n - `address` - A solana validator or delegator address.\n - `epoch` - A solana epoch. Supports epoch comparisons (ex: `epoch \u003e= 1000 AND epoch \u003c= 2000`).\n - `period_end_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z').\n - Example(s):\n - `\"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar' AND epoch \u003e= 540 AND epoch \u003c 550\"`\n - `\"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar' AND period_end_time \u003e= '2024-01-01T00:00:00Z' AND period_end_time \u003c '2024-01-15T00:00:00Z'\"`\n - `\"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar' AND epoch = 550\"`\n\n* **Cosmos**:\n - Fields:\n - `address` - A cosmos validator or delegator address (ex: `cosmosvaloper1c4k24jzduc365kywrsvf5ujz4ya6mwympnc4en` and `cosmos1c4k24jzduc365kywrsvf5ujz4ya6mwymy8vq4q`)\n - `date` - A date in format 'YYYY-MM-DD'. Supports multiple comparisons (ex: '2024-01-15).\n - `period_end_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z').\n - Example(s):\n - `\"address='cosmos1mfduj0qax6ut8rd6cfc4j0ds06z0mwlhrljhqh' AND date = '2024-11-16'\"`\n - `\"address='cosmos1mfduj0qax6ut8rd6cfc4j0ds06z0mwlhrljhqh' AND period_end_time \u003e= '2024-01-01T00:00:00Z' AND period_end_time \u003c '2024-01-15T00:00:00Z'\"`\n - `\"address='cosmos1mfduj0qax6ut8rd6cfc4j0ds06z0mwlhrljhqh' AND date = '2024-01-01'\"`", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Reward" + ] + } + }, + "/v1/{parent}/stakes": { + "get": { + "summary": "List and filter staking balances", + "description": "Lists staking balance of a protocol, with optional filters for time range and address.", + "operationId": "RewardService_ListStakes", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ListStakesResponse" + } + }, + "400": { + "description": "The request attempted has invalid parameters", + "schema": { + "example": { + "code": 3, + "message": "Filter validation failed. \u003cRemediation assistance here\u003e.", + "details": [] + } + } + }, + "401": { + "description": "Returned if authentication information is invalid", + "schema": { + "example": "Unauthorized" + } + }, + "500": { + "description": "Returned when an internal server error happens.", + "schema": { + "example": { + "code": 3, + "message": "Internal server error.", + "details": [] + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "parent", + "description": "The protocol that the staking balance exists on.\nThe response will only include staking balances for the protocol specified here.", + "in": "path", + "required": true, + "type": "string", + "pattern": "protocols/[^/]+" + }, + { + "name": "pageSize", + "description": "The maximum number of items to return.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "pageToken", + "description": "A page token as part of the response of a previous call.\nProvide this to retrieve the next page.\n\nWhen paginating, all other parameters must match the previous\nrequest to list resources.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "filter", + "description": "[AIP-160](https://google.aip.dev/160) format compliant filter. Supported protocols are 'ethereum', 'solana'.\nSupplying other protocols will return an error.\n* **Ethereum**:\n - Fields:\n - `address` - A ethereum validator public key.\n - `evaluation_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z').\n - Example(s):\n - `\"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474'\"`\n - `\"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474' AND evaluation_time \u003e= '2024-01-01T00:00:00Z' AND evaluation_time \u003c '2024-01-15T00:00:00Z'\"`\n\n* **Solana**:\n - Fields:\n - `address` - A solana staking address.\n - `evaluation_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z').\n - Example(s):\n - `\"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar'\"`\n - `\"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar' AND evaluation_time \u003e= '2024-01-01T00:00:00Z' AND evaluation_time \u003c '2024-01-15T00:00:00Z'\"`", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Stake" + ] + } + } + }, + "definitions": { + "RewardRateCalculationMethods": { + "type": "string", + "enum": [ + "CALCULATION_METHODS_UNSPECIFIED", + "SOLO_STAKER", + "POOLED_STAKER", + "EPOCH_AUTO_COMPOUNDING", + "NO_AUTO_COMPOUNDING" + ], + "default": "CALCULATION_METHODS_UNSPECIFIED", + "description": "Representing the different methods of calculating yield.\n\n - CALCULATION_METHODS_UNSPECIFIED: Calculation method is unknown or unspecified.\n - SOLO_STAKER: A single Ethereum validator acting in isolation is currently not able to compound earned rewards because\nEthereum only allows validators to stake 32 ETH precisely.\nThis percentage yield is assuming that the rewards never compound, mimicking the behavior of a solo staker.\n - POOLED_STAKER: A pool of Ethereum validators of sufficient size is able to compound rewards almost immediately.\nThis percentage yield is assuming rewards compound immediately, mimicking the behavior of a sufficiently large pool.\n - EPOCH_AUTO_COMPOUNDING: A Solana delegator's staking rewards are staked (and therefore auto-compound) when rewards are paid out between epochs.\nThis percentage yield is assuming the rewards are auto-compounded on that schedule, mimicking a Solana delegator.\n - NO_AUTO_COMPOUNDING: A Solana validator's rewards accumulate in a separate account from the validator's active stake.\nThis percentage yield is assuming the rewards are not auto-compounded at any point, mimicking a Solana validator who never staked their rewards." + }, + "StakeDelegation": { + "type": "object", + "properties": { + "address": { + "type": "string", + "title": "Address associated to the delegation" + }, + "amount": { + "$ref": "#/definitions/v1AssetAmount", + "title": "Amount of delegation received or given" + }, + "commissionRate": { + "type": "string", + "title": "Commission rate for delegation" + } + }, + "description": "A single delegation from one address to another." + }, + "USDValueSource": { + "type": "string", + "enum": [ + "SOURCE_UNSPECIFIED", + "COINBASE_EXCHANGE" + ], + "default": "SOURCE_UNSPECIFIED", + "description": "The source of the USD price conversion.\n\n - SOURCE_UNSPECIFIED: The USD value source is unknown or unspecified.\n - COINBASE_EXCHANGE: The USD value source is the Coinbase exchange." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1AggregationUnit": { + "type": "string", + "enum": [ + "AGGREGATION_UNIT_UNSPECIFIED", + "EPOCH", + "DAY" + ], + "default": "AGGREGATION_UNIT_UNSPECIFIED", + "description": "The unit of time that the reward events were aggregated by.\n\n - AGGREGATION_UNIT_UNSPECIFIED: Aggregation unit is unknown or unspecified.\n - EPOCH: Indicates the rewards are aggregated by epoch. This means there will be a 'epoch' field displaying the epoch on this resource.\n - DAY: Indicates the rewards are aggregated by day. This means there will be a 'date' field displaying the date on this resource." + }, + "v1AssetAmount": { + "type": "object", + "properties": { + "amount": { + "type": "string", + "title": "The amount of the asset in the most common denomination.\nEx: ETH (converted from gwei)\nEx: USD (converted from fractional pennies)", + "readOnly": true + }, + "exp": { + "type": "string", + "description": "The number of decimals needed to convert from the raw numeric value to the most\ncommon denomination.", + "readOnly": true + }, + "ticker": { + "type": "string", + "description": "The ticker of this asset (ex: USD, ETH, SOL).", + "readOnly": true + }, + "rawNumeric": { + "type": "string", + "description": "The raw, unadulterated numeric value.\nEx: Wei (in Ethereum) and Lamports (in Solana).", + "readOnly": true + } + }, + "description": "Amount encapsulation for a given asset." + }, + "v1ListRewardsResponse": { + "type": "object", + "properties": { + "rewards": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Reward" + }, + "description": "The rewards returned in this response.", + "readOnly": true + }, + "nextPageToken": { + "type": "string", + "description": "The page token the user must use in the next request if the next page is desired.", + "readOnly": true + } + }, + "description": "The response message for ListRewards." + }, + "v1ListStakesResponse": { + "type": "object", + "properties": { + "stakes": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Stake" + }, + "description": "The staking balances returned in this response.", + "readOnly": true + }, + "nextPageToken": { + "type": "string", + "description": "The page token the user must use in the next request if the next page is desired.", + "readOnly": true + } + }, + "description": "The response message for ListStakes." + }, + "v1ParticipantType": { + "type": "string", + "enum": [ + "PARTICIPANT_TYPE_UNSPECIFIED", + "DELEGATOR", + "VALIDATOR" + ], + "default": "PARTICIPANT_TYPE_UNSPECIFIED", + "description": "The participant type of a staking-related address.\n\n - PARTICIPANT_TYPE_UNSPECIFIED: The participant type is unknown.\n - DELEGATOR: Used when the onchain participant type is a delegator\n(i.e. someone who delegates the responsibilities of validating blocks to another address in return for a share of the rewards).\n - VALIDATOR: Used when the onchain participant type is a validator\n(i.e. an address that is directly responsible for performing validation of blocks)." + }, + "v1Reward": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address that earned this reward.", + "readOnly": true + }, + "epoch": { + "type": "string", + "format": "int64", + "description": "A unique identifier for the consensus-cycle of the blockchain.", + "readOnly": true + }, + "date": { + "type": "string", + "description": "The date of the reward in format 'YYYY-MM-DD' in UTC.", + "readOnly": true + }, + "aggregationUnit": { + "$ref": "#/definitions/v1AggregationUnit", + "description": "The unit of time that the reward events were rolled up by.\nCan be either \"epoch\" or \"daily\".", + "readOnly": true + }, + "periodStartTime": { + "type": "string", + "format": "date-time", + "description": "The starting time of this reward period. Returned when querying by epoch.\nTimestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2024-11-13T19:38:36Z).\nField currently unavailable. Coming soon.", + "readOnly": true + }, + "periodEndTime": { + "type": "string", + "format": "date-time", + "description": "The ending time of this reward period. Returned when querying by epoch.\nTimestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2024-11-13T19:38:36Z).", + "readOnly": true + }, + "totalEarnedNativeUnit": { + "$ref": "#/definitions/v1AssetAmount", + "description": "The amount earned in this time period in the native unit of the protocol.", + "readOnly": true + }, + "totalEarnedUsd": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1USDValue" + }, + "description": "The amount earned in this time period in USD. Calculated by getting each individual reward of this\ntime period and summing the USD value of each individual component. USD value is calculate at\nthe time each component was earned.", + "readOnly": true + }, + "endingBalance": { + "$ref": "#/definitions/v1Stake", + "description": "A snapshot of the staking balance the end of this period.\nField currently unavailable. Coming soon.", + "readOnly": true + }, + "protocol": { + "type": "string", + "description": "The protocol on which this reward was earned.", + "readOnly": true + } + }, + "description": "Rewards earned within a particular period of time." + }, + "v1RewardRate": { + "type": "object", + "properties": { + "percentage": { + "type": "string", + "description": "The percentage rate of rewards calculation. Will include two digits after the decimal (ex: 3.05).", + "readOnly": true + }, + "calculatedTime": { + "type": "string", + "format": "date-time", + "description": "The time at which this yield calculation was calculated.\nTimestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2023-11-13T19:38:36Z).", + "readOnly": true + }, + "calculationMethod": { + "$ref": "#/definitions/RewardRateCalculationMethods", + "description": "The method used to calculate this yield. This could include information about which\nrewards we're including in the calculation, how we're estimating the compounding period, etc.", + "readOnly": true + } + }, + "description": "Reward yield calculation at a given point in time." + }, + "v1Stake": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address of the staking balance.", + "readOnly": true + }, + "evaluationTime": { + "type": "string", + "format": "date-time", + "description": "The time at which this balance was evaluated.\nTimestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2023-11-13T19:38:36Z).", + "readOnly": true + }, + "bondedStake": { + "$ref": "#/definitions/v1AssetAmount", + "description": "The total amount of stake that is actively earning rewards to this address.\nIncludes any delegated stake and self-stake.\nFor delegators, this would be only the amount delegated to a validator in most cases.\nOnly includes stake that is *actively contributing to rewards and can't be reduced\nwithout affecting the rewards dynamics*.\n\nPending inactive stake is included.\nPending active stake is not included.", + "readOnly": true + }, + "totalDelegationReceived": { + "$ref": "#/definitions/v1AssetAmount", + "description": "The amount of stake that this address receives from other addresses.\nFor most delegators, this will be 0.", + "readOnly": true + }, + "delegationsReceived": { + "$ref": "#/definitions/StakeDelegation", + "title": "The list of individual delegations this address has received from other addresses", + "readOnly": true + }, + "delegationsGiven": { + "$ref": "#/definitions/StakeDelegation", + "description": "The amount that this address stakes to another address.", + "readOnly": true + }, + "rewardRateCalculations": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1RewardRate" + }, + "description": "An estimated yield of this address.", + "readOnly": true + }, + "participantType": { + "$ref": "#/definitions/v1ParticipantType", + "description": "The participant type at the time of evaluation (i.e. validator, delegator).", + "readOnly": true + }, + "protocol": { + "type": "string", + "description": "The protocol on which this staking balance exists.", + "readOnly": true + }, + "unbondedBalance": { + "$ref": "#/definitions/v1AssetAmount", + "description": "The amount of stake that is not actively earning rewards to this address.\nThis amount includes any native token balance that is under the domain and control of the address in question,\nbut is not actively staked.\n\nPending active stake would be included here.", + "readOnly": true + } + }, + "description": "The representation of a staking activity at a particular point in time." + }, + "v1USDValue": { + "type": "object", + "properties": { + "source": { + "$ref": "#/definitions/USDValueSource", + "description": "The source of the USD price conversion. Could be internal to Coinbase, and external source, or any other source.", + "readOnly": true + }, + "conversionTime": { + "type": "string", + "format": "date-time", + "description": "The timestamp at which the USD value was sourced to convert the value into USD.\nThis value is as close to the time the reward was earned as possible.\nTimestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2024-11-13T19:38:36Z).", + "readOnly": true + }, + "amount": { + "$ref": "#/definitions/v1AssetAmount", + "description": "The USD value of the reward at the conversion time.", + "readOnly": true + }, + "conversionPrice": { + "type": "string", + "description": "The price of the native unit at the conversion time.", + "readOnly": true + } + }, + "description": "Information regarding the USD value of a reward, with necessary context and metadata." + } + } +} diff --git a/examples/cosmos/list-rewards/main.go b/examples/cosmos/list-rewards/main.go new file mode 100644 index 0000000..366f99f --- /dev/null +++ b/examples/cosmos/list-rewards/main.go @@ -0,0 +1,80 @@ +/* + * This example code, demonstrates rewards client library usage for listing rewards + */ + +package main + +import ( + "context" + "errors" + "log" + "time" + + "google.golang.org/api/iterator" + "google.golang.org/protobuf/encoding/protojson" + + "github.com/coinbase/staking-client-library-go/auth" + "github.com/coinbase/staking-client-library-go/client" + "github.com/coinbase/staking-client-library-go/client/options" + rewardsV1 "github.com/coinbase/staking-client-library-go/client/rewards/v1" + rewardspb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1" +) + +const ( + // TODO: Replace address as per your requirement. + address = "cosmos1crqm3598z6qmyn2kkcl9dz7uqs4qdqnrlyn8pq" +) + +// An example function to demonstrate how to use the staking client libraries. +func main() { + ctx := context.Background() + + apiKey, err := auth.NewAPIKey(auth.WithLoadAPIKeyFromFile(true)) + if err != nil { + log.Fatalf("error loading API key: %s", err.Error()) + } + + authOpt := options.WithAPIKey(apiKey) + + // Create a staking client. + stakingClient, err := client.New(ctx, authOpt) + if err != nil { + log.Fatalf("error instantiating staking client: %s", err.Error()) + } + + // List all rewards for the given address, aggregated by day, for epochs that ended in the last 30 days. + + now := time.Now() + nowDateOnly := now.Truncate(24 * time.Hour) + + thirtyDaysAgo := now.AddDate(0, 0, -30) + thirtyDaysAgoDateOnly := thirtyDaysAgo.Truncate(24 * time.Hour) + + rewardsIter := stakingClient.Rewards.ListRewards(ctx, &rewardspb.ListRewardsRequest{ + Parent: rewardspb.ProtocolResourceName{Protocol: "cosmos"}.String(), + PageSize: 20, + Filter: rewardsV1.WithAddress().Eq(address). + And(rewardsV1.WithDate().Gte(thirtyDaysAgoDateOnly.Format("2006-01-02"))). + And(rewardsV1.WithDate().Lt(nowDateOnly.Format("2006-01-02"))).String(), + }) + + count := 0 + for { + reward, err := rewardsIter.Next() + if errors.Is(err, iterator.Done) { + break + } + + if err != nil { + log.Fatalf("error listing rewards: %s", err.Error()) + } + + d, err := protojson.Marshal(reward) + if err != nil { + log.Fatalf("error marshalling reward object: %s", err.Error()) + } + + log.Printf("[%d] Reward details: %s", count, d) + count += 1 + } +} diff --git a/examples/ethereum_kiln/example.go b/examples/ethereum/create-and-process-workflow/main.go similarity index 77% rename from examples/ethereum_kiln/example.go rename to examples/ethereum/create-and-process-workflow/main.go index 9177a4e..c3c4ba6 100644 --- a/examples/ethereum_kiln/example.go +++ b/examples/ethereum/create-and-process-workflow/main.go @@ -14,8 +14,9 @@ import ( "github.com/coinbase/staking-client-library-go/auth" "github.com/coinbase/staking-client-library-go/client" stakingerrors "github.com/coinbase/staking-client-library-go/client/errors" - v1alpha1client "github.com/coinbase/staking-client-library-go/client/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" + "github.com/coinbase/staking-client-library-go/client/options" + v1 "github.com/coinbase/staking-client-library-go/client/orchestration/v1" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1" "github.com/coinbase/staking-client-library-go/internal/signer" ) @@ -26,8 +27,8 @@ const ( // TODO: Replace with your staker addresses and amount. stakerAddress = "" - integratorContractAddress = "" - amount = "10" + integratorContractAddress = "0xA55416de5DE61A0AC1aa8970a280E04388B1dE4b" + amount = "11" currency = "ETH" ) @@ -40,10 +41,10 @@ func main() { log.Fatalf("error loading API key: %s", err.Error()) } - authOpt := client.WithAPIKey(apiKey) + authOpt := options.WithAPIKey(apiKey) // Create a staking client. - stakingClient, err := v1alpha1client.NewStakingServiceClient(ctx, authOpt) + stakingClient, err := client.New(ctx, authOpt) if err != nil { log.Fatalf("error instantiating staking client: %s", err.Error()) } @@ -55,7 +56,7 @@ func main() { req := &stakingpb.CreateWorkflowRequest{ Parent: fmt.Sprintf("projects/%s", projectID), Workflow: &stakingpb.Workflow{ - Action: "protocols/ethereum_kiln/networks/mainnet/actions/stake", + Action: "protocols/ethereum_kiln/networks/holesky/actions/stake", StakingParameters: &stakingpb.Workflow_EthereumKilnStakingParameters{ EthereumKilnStakingParameters: &stakingpb.EthereumKilnStakingParameters{ Parameters: &stakingpb.EthereumKilnStakingParameters_StakeParameters{ @@ -70,11 +71,11 @@ func main() { }, }, }, - SkipBroadcast: false, + SkipBroadcast: true, }, } - workflow, err := stakingClient.CreateWorkflow(ctx, req) + workflow, err := stakingClient.Orchestration.CreateWorkflow(ctx, req) if err != nil { sae := stakingerrors.FromError(err) _ = sae.Print() @@ -86,7 +87,7 @@ func main() { // Run loop until workflow reaches a terminal state for { // Get the latest workflow state - workflow, err = stakingClient.GetWorkflow(ctx, &stakingpb.GetWorkflowRequest{Name: workflow.Name}) + workflow, err = stakingClient.Orchestration.GetWorkflow(ctx, &stakingpb.GetWorkflowRequest{Name: workflow.Name}) if err != nil { log.Fatalf(fmt.Errorf("error getting workflow: %w", err).Error()) } @@ -94,7 +95,7 @@ func main() { printWorkflowProgressDetails(workflow) // If workflow is in WAITING_FOR_SIGNING state, sign the transaction and update the workflow - if v1alpha1client.WorkflowWaitingForSigning(workflow) { + if v1.WorkflowWaitingForSigning(workflow) { unsignedTx := workflow.Steps[workflow.GetCurrentStepId()].GetTxStepOutput().GetUnsignedTx() // Logic to sign the transaction. This can be substituted with any other signing mechanism. @@ -107,7 +108,7 @@ func main() { log.Printf("Returning back signed tx %s ...\n", string(signedTx.Data)) - workflow, err = stakingClient.PerformWorkflowStep(ctx, &stakingpb.PerformWorkflowStepRequest{ + workflow, err = stakingClient.Orchestration.PerformWorkflowStep(ctx, &stakingpb.PerformWorkflowStepRequest{ Name: workflow.Name, Step: workflow.GetCurrentStepId(), Data: string(signedTx.Data), @@ -115,23 +116,12 @@ func main() { if err != nil { log.Fatalf(fmt.Errorf("error updating workflow with signed tx: %w", err).Error()) } - } else if v1alpha1client.WorkflowWaitingForExternalBroadcast(workflow) { + } else if v1.WorkflowWaitingForExternalBroadcast(workflow) { unsignedTx := workflow.Steps[workflow.GetCurrentStepId()].GetTxStepOutput().GetUnsignedTx() fmt.Printf("Please sign and broadcast this unsigned tx %s externally and return back the tx hash via the PerformWorkflowStep API ...\n", unsignedTx) break - } else if v1alpha1client.WorkflowFailedRefreshable(workflow) { - // If workflow is in FAILED_REFRESHABLE state, refresh the transaction and update the workflow - fmt.Printf("Step %d failed but is refreshable, refreshing ...\n", workflow.GetCurrentStepId()) - - workflow, err = stakingClient.RefreshWorkflowStep(ctx, &stakingpb.RefreshWorkflowStepRequest{ - Name: workflow.Name, - Step: workflow.GetCurrentStepId(), - }) - if err != nil { - log.Fatalf(fmt.Errorf("error refreshing transaction: %w", err).Error()) - } - } else if v1alpha1client.WorkflowFinished(workflow) { + } else if v1.WorkflowFinished(workflow) { break } @@ -168,7 +158,7 @@ func printWorkflowProgressDetails(workflow *stakingpb.Workflow) { ) } - if v1alpha1client.WorkflowFinished(workflow) { + if v1.WorkflowFinished(workflow) { log.Printf("Workflow reached end state - step name: %s %s workflow state: %s runtime: %v\n", step.GetName(), stepDetails, diff --git a/examples/ethereum/create-workflow/main.go b/examples/ethereum/create-workflow/main.go new file mode 100644 index 0000000..ef48fe5 --- /dev/null +++ b/examples/ethereum/create-workflow/main.go @@ -0,0 +1,67 @@ +/* + * This example code, demonstrates creating an Ethereum Partial ETH (<32 ETH) workflow, the fundamental process handler for an E2E staking experience. + */ + +package main + +import ( + "context" + "fmt" + "log" + + "github.com/coinbase/staking-client-library-go/auth" + "github.com/coinbase/staking-client-library-go/client" + "github.com/coinbase/staking-client-library-go/client/options" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1" +) + +func main() { + // TODO: Add your project ID found at cloud.coinbase.com or in your API key. + projectID := "" + + ctx := context.Background() + + apiKey, err := auth.NewAPIKey(auth.WithLoadAPIKeyFromFile(true)) + if err != nil { + log.Fatalf("error loading API key: %s", err.Error()) + } + + // Create a staking client. + stakingClient, err := client.New(ctx, options.WithAPIKey(apiKey)) + if err != nil { + log.Fatalf("error instantiating staking client: %s", err.Error()) + } + + if projectID == "" { + log.Fatalf("projectID must be set") + } + + req := &stakingpb.CreateWorkflowRequest{ + Parent: fmt.Sprintf("projects/%s", projectID), + Workflow: &stakingpb.Workflow{ + Action: "protocols/ethereum_kiln/networks/holesky/actions/stake", + StakingParameters: &stakingpb.Workflow_EthereumKilnStakingParameters{ + EthereumKilnStakingParameters: &stakingpb.EthereumKilnStakingParameters{ + Parameters: &stakingpb.EthereumKilnStakingParameters_StakeParameters{ + StakeParameters: &stakingpb.EthereumKilnStakeParameters{ + StakerAddress: "0xdb816889F2a7362EF242E5a717dfD5B38Ae849FE", + IntegratorContractAddress: "0xA55416de5DE61A0AC1aa8970a280E04388B1dE4b", + Amount: &stakingpb.Amount{ + Value: "20", + Currency: "ETH", + }, + }, + }, + }, + }, + SkipBroadcast: true, + }, + } + + workflow, err := stakingClient.Orchestration.CreateWorkflow(ctx, req) + if err != nil { + log.Fatalf("couldn't create workflow: %s", err.Error()) + } + + log.Printf("Workflow created: %s", workflow.Name) +} diff --git a/examples/ethereum/list-rewards/main.go b/examples/ethereum/list-rewards/main.go new file mode 100644 index 0000000..a4a150c --- /dev/null +++ b/examples/ethereum/list-rewards/main.go @@ -0,0 +1,66 @@ +/* + * This example code demonstrates rewards client library usage for listing rewards + */ + +package main + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "log" + "time" + + "google.golang.org/api/iterator" + + "github.com/coinbase/staking-client-library-go/auth" + "github.com/coinbase/staking-client-library-go/client" + "github.com/coinbase/staking-client-library-go/client/options" + rewardsV1 "github.com/coinbase/staking-client-library-go/client/rewards/v1" + rewardspb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1" +) + +func main() { + ctx := context.Background() + + // Loads the API key from the default location. + apiKey, err := auth.NewAPIKey(auth.WithLoadAPIKeyFromFile(true)) + if err != nil { + log.Fatalf("error loading API key: %s", err.Error()) + } + + // Creates the Coinbase Staking API client + stakingClient, err := client.New(ctx, options.WithAPIKey(apiKey)) + if err != nil { + log.Fatalf("error instantiating staking client: %s", err.Error()) + } + + // Lists the rewards for the given address for the previous last 2 days, aggregated by day. + rewardsIter := stakingClient.Rewards.ListRewards(ctx, &rewardspb.ListRewardsRequest{ + Parent: rewardspb.ProtocolResourceName{Protocol: "ethereum"}.String(), + PageSize: 200, + Filter: rewardsV1.WithAddress().Eq("0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474"). + And(rewardsV1.WithPeriodEndTime().Gte(time.Now().AddDate(0, 0, -2))). + And(rewardsV1.WithPeriodEndTime().Lt(time.Now())).String(), + }) + + // Iterates through the rewards and print them. + for { + reward, err := rewardsIter.Next() + if errors.Is(err, iterator.Done) { + break + } + + if err != nil { + log.Fatalf("error listing rewards: %s", err.Error()) + } + + marshaled, err := json.MarshalIndent(reward, "", " ") + if err != nil { + log.Fatalf("error marshaling reward: %s", err.Error()) + } + + fmt.Printf(string(marshaled)) + } +} diff --git a/examples/ethereum/list-stakes/main.go b/examples/ethereum/list-stakes/main.go new file mode 100644 index 0000000..dcefdaf --- /dev/null +++ b/examples/ethereum/list-stakes/main.go @@ -0,0 +1,65 @@ +/* + * This example code demonstrates rewards client library usage for listing staking balances + */ + +package main + +import ( + "context" + "errors" + "log" + + "google.golang.org/api/iterator" + "google.golang.org/protobuf/encoding/protojson" + + "github.com/coinbase/staking-client-library-go/auth" + "github.com/coinbase/staking-client-library-go/client" + "github.com/coinbase/staking-client-library-go/client/options" + rewardspb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1" +) + +// An example function to demonstrate how to use the staking client libraries. +func main() { + ctx := context.Background() + + apiKey, err := auth.NewAPIKey(auth.WithLoadAPIKeyFromFile(true)) + if err != nil { + log.Fatalf("error loading API key: %s", err.Error()) + } + + authOpt := options.WithAPIKey(apiKey) + + // Create a staking client. + stakingClient, err := client.New(ctx, authOpt) + if err != nil { + log.Fatalf("error instantiating staking client: %s", err.Error()) + } + + // List all rewards for the given address, aggregated by epoch, for epochs that ended in the last 30 days. + + rewardsIter := stakingClient.Rewards.ListStakes(ctx, &rewardspb.ListStakesRequest{ + Parent: rewardspb.ProtocolResourceName{Protocol: "ethereum"}.String(), + PageSize: 200, + Filter: `address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474' AND evaluation_time>='2023-12-12T07:25:11-04:00' AND evaluation_time<='2023-12-12T08:20:50-04:00'`, + }) + + count := 0 + for { + reward, err := rewardsIter.Next() + if errors.Is(err, iterator.Done) { + break + } + + if err != nil { + log.Fatalf("error listing rewards: %s", err.Error()) + } + + d, err := protojson.Marshal(reward) + if err != nil { + log.Fatalf("error marshalling reward object: %s", err.Error()) + } + + log.Printf("[%d] Reward details: %s", count, d) + count += 1 + } +} diff --git a/examples/example.go b/examples/hello-world/main.go similarity index 72% rename from examples/example.go rename to examples/hello-world/main.go index 459802d..7c32adf 100644 --- a/examples/example.go +++ b/examples/hello-world/main.go @@ -13,11 +13,11 @@ import ( "github.com/coinbase/staking-client-library-go/auth" "github.com/coinbase/staking-client-library-go/client" - v1alpha1client "github.com/coinbase/staking-client-library-go/client/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" + "github.com/coinbase/staking-client-library-go/client/options" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1" ) -// An example function to demonstrate how to use the staking client libraries. +// An example function that verifies the API key has been configured correctly and you can connect to the Coinbase Staking API. func main() { ctx := context.Background() @@ -26,17 +26,16 @@ func main() { log.Fatalf("error loading API key: %s", err.Error()) } - authOpt := client.WithAPIKey(apiKey) + authOpt := options.WithAPIKey(apiKey) // Create a staking client. - stakingClient, err := v1alpha1client.NewStakingServiceClient(ctx, authOpt) + stakingClient, err := client.New(ctx, authOpt) if err != nil { log.Fatalf("error instantiating staking client: %s", err.Error()) } // List all protocols. - protocols, err := stakingClient.ListProtocols(ctx, &stakingpb.ListProtocolsRequest{}) - + protocols, err := stakingClient.Orchestration.ListProtocols(ctx, &stakingpb.ListProtocolsRequest{}) if err != nil { log.Fatalf("error listing protocols: %s", err.Error()) } @@ -48,10 +47,9 @@ func main() { protocol := "protocols/ethereum_kiln" // List all networks for a supported protocol. - networks, err := stakingClient.ListNetworks(ctx, &stakingpb.ListNetworksRequest{ + networks, err := stakingClient.Orchestration.ListNetworks(ctx, &stakingpb.ListNetworksRequest{ Parent: protocol, }) - if err != nil { log.Fatalf("error listing networks: %s", err.Error()) } @@ -60,10 +58,10 @@ func main() { log.Printf("got network: %s", network.Name) } - network := "protocols/ethereum_kiln/networks/goerli" + network := "protocols/ethereum_kiln/networks/holesky" // List all actions for a supported network. - actions, err := stakingClient.ListActions(ctx, &stakingpb.ListActionsRequest{ + actions, err := stakingClient.Orchestration.ListActions(ctx, &stakingpb.ListActionsRequest{ Parent: network, }) if err != nil { @@ -75,7 +73,7 @@ func main() { } // List all staking targets for a supported network. - iter := stakingClient.ListStakingTargets(ctx, &stakingpb.ListStakingTargetsRequest{ + iter := stakingClient.Orchestration.ListStakingTargets(ctx, &stakingpb.ListStakingTargetsRequest{ Parent: network, }) diff --git a/examples/example_list_workflows.go b/examples/list-workflows/main.go similarity index 80% rename from examples/example_list_workflows.go rename to examples/list-workflows/main.go index 6c1aa68..ab51516 100644 --- a/examples/example_list_workflows.go +++ b/examples/list-workflows/main.go @@ -10,11 +10,12 @@ import ( "fmt" "log" + "google.golang.org/api/iterator" + "github.com/coinbase/staking-client-library-go/auth" "github.com/coinbase/staking-client-library-go/client" - v1alpha1client "github.com/coinbase/staking-client-library-go/client/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" - "google.golang.org/api/iterator" + "github.com/coinbase/staking-client-library-go/client/options" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1" ) const ( @@ -31,10 +32,10 @@ func main() { log.Fatalf("error loading API key: %s", err.Error()) } - authOpt := client.WithAPIKey(apiKey) + authOpt := options.WithAPIKey(apiKey) // Create a staking client. - stakingClient, err := v1alpha1client.NewStakingServiceClient(ctx, authOpt) + stakingClient, err := client.New(ctx, authOpt) if err != nil { log.Fatalf("error instantiating staking client: %s", err.Error()) } @@ -44,7 +45,7 @@ func main() { } // List all workflows for a given project. - workflowIter := stakingClient.ListWorkflows(ctx, &stakingpb.ListWorkflowsRequest{ + workflowIter := stakingClient.Orchestration.ListWorkflows(ctx, &stakingpb.ListWorkflowsRequest{ Parent: fmt.Sprintf("projects/%s", projectID), }) diff --git a/examples/polygon/example.go b/examples/solana/create-workflow/main.go similarity index 51% rename from examples/polygon/example.go rename to examples/solana/create-workflow/main.go index 464a49c..3699a4e 100644 --- a/examples/polygon/example.go +++ b/examples/solana/create-workflow/main.go @@ -1,5 +1,5 @@ /* - * This example code, demonstrates staking client library usage for performing e2e staking on Polygon. + * This example code, demonstrates staking client library usage for performing e2e staking on Solana. */ package main @@ -14,21 +14,20 @@ import ( "github.com/coinbase/staking-client-library-go/auth" "github.com/coinbase/staking-client-library-go/client" stakingerrors "github.com/coinbase/staking-client-library-go/client/errors" - v1alpha1client "github.com/coinbase/staking-client-library-go/client/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" - "github.com/coinbase/staking-client-library-go/internal/signer" + "github.com/coinbase/staking-client-library-go/client/options" + "github.com/coinbase/staking-client-library-go/client/orchestration/v1" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1" ) const ( - // TODO: Replace with your project ID and private key. - projectID = "" - privateKey = "" - - // TODO: Replace with your delegator addresses and amount. - delegatorAddress = "" - validatorAddress = "0x857679d69fE50E7B722f94aCd2629d80C355163d" - amount = "1" - currency = "MATIC" + // TODO: Replace with your project ID. + projectID = "" + + // TODO: Replace with your wallet addresses and amount. + walletAddress = "" + validatorAddress = "GkqYQysEGmuL6V2AJoNnWZUz2ZBGWhzQXsJiXm2CLKAN" + amount = "100000000" + currency = "SOL" ) // An example function to demonstrate how to use the staking client libraries. @@ -40,27 +39,27 @@ func main() { log.Fatalf("error loading API key: %s", err.Error()) } - authOpt := client.WithAPIKey(apiKey) + authOpt := options.WithAPIKey(apiKey) // Create a staking client. - stakingClient, err := v1alpha1client.NewStakingServiceClient(ctx, authOpt) + stakingClient, err := client.New(ctx, authOpt) if err != nil { log.Fatalf("error instantiating staking client: %s", err.Error()) } - if projectID == "" || privateKey == "" || delegatorAddress == "" { - log.Fatalf("projectID, privateKey and delegatorAddress must be set") + if projectID == "" || walletAddress == "" { + log.Fatalf("projectID and walletAddress must be set") } req := &stakingpb.CreateWorkflowRequest{ Parent: fmt.Sprintf("projects/%s", projectID), Workflow: &stakingpb.Workflow{ - Action: "protocols/polygon/networks/mainnet/actions/stake", - StakingParameters: &stakingpb.Workflow_PolygonStakingParameters{ - PolygonStakingParameters: &stakingpb.PolygonStakingParameters{ - Parameters: &stakingpb.PolygonStakingParameters_StakeParameters{ - StakeParameters: &stakingpb.PolygonStakeParameters{ - DelegatorAddress: delegatorAddress, + Action: "protocols/solana/networks/testnet/actions/stake", + StakingParameters: &stakingpb.Workflow_SolanaStakingParameters{ + SolanaStakingParameters: &stakingpb.SolanaStakingParameters{ + Parameters: &stakingpb.SolanaStakingParameters_StakeParameters{ + StakeParameters: &stakingpb.SolanaStakeParameters{ + WalletAddress: walletAddress, ValidatorAddress: validatorAddress, Amount: &stakingpb.Amount{ Value: amount, @@ -70,11 +69,11 @@ func main() { }, }, }, - SkipBroadcast: false, + SkipBroadcast: true, }, } - workflow, err := stakingClient.CreateWorkflow(ctx, req) + workflow, err := stakingClient.Orchestration.CreateWorkflow(ctx, req) if err != nil { sae := stakingerrors.FromError(err) _ = sae.Print() @@ -86,7 +85,7 @@ func main() { // Run loop until workflow reaches a terminal state for { // Get the latest workflow state - workflow, err = stakingClient.GetWorkflow(ctx, &stakingpb.GetWorkflowRequest{Name: workflow.Name}) + workflow, err = stakingClient.Orchestration.GetWorkflow(ctx, &stakingpb.GetWorkflowRequest{Name: workflow.Name}) if err != nil { log.Fatalf(fmt.Errorf("error getting workflow: %w", err).Error()) } @@ -94,44 +93,17 @@ func main() { printWorkflowProgressDetails(workflow) // If workflow is in WAITING_FOR_SIGNING state, sign the transaction and update the workflow - if v1alpha1client.WorkflowWaitingForSigning(workflow) { + if v1.WorkflowWaitingForSigning(workflow) { unsignedTx := workflow.Steps[workflow.GetCurrentStepId()].GetTxStepOutput().GetUnsignedTx() - // Logic to sign the transaction. This can be substituted with any other signing mechanism. - log.Printf("Signing unsigned tx %s ...\n", unsignedTx) - - signedTx, err := signer.New("polygon").SignTransaction(privateKey, &signer.UnsignedTx{Data: []byte(unsignedTx)}) - if err != nil { - log.Fatalf(fmt.Errorf("error signing transaction: %w", err).Error()) - } - - log.Printf("Returning back signed tx %s ...\n", string(signedTx.Data)) - - workflow, err = stakingClient.PerformWorkflowStep(ctx, &stakingpb.PerformWorkflowStepRequest{ - Name: workflow.Name, - Step: workflow.GetCurrentStepId(), - Data: string(signedTx.Data), - }) - if err != nil { - log.Fatalf(fmt.Errorf("error updating workflow with signed tx: %w", err).Error()) - } - } else if v1alpha1client.WorkflowWaitingForExternalBroadcast(workflow) { + fmt.Printf("Please sign this unsigned tx and return back the signed tx via the PerformWorkflowStep API : %s\n", unsignedTx) + break + } else if v1.WorkflowWaitingForExternalBroadcast(workflow) { unsignedTx := workflow.Steps[workflow.GetCurrentStepId()].GetTxStepOutput().GetUnsignedTx() - fmt.Printf("Please sign and broadcast this unsigned tx %s externally and return back the tx hash via the PerformWorkflowStep API ...\n", unsignedTx) + fmt.Printf("Please sign and broadcast this unsigned tx externally and return back the tx hash via the PerformWorkflowStep API : %s\n", unsignedTx) break - } else if v1alpha1client.WorkflowFailedRefreshable(workflow) { - // If workflow is in FAILED_REFRESHABLE state, refresh the transaction and update the workflow - fmt.Printf("Step %d failed but is refreshable, refreshing ...\n", workflow.GetCurrentStepId()) - - workflow, err = stakingClient.RefreshWorkflowStep(ctx, &stakingpb.RefreshWorkflowStepRequest{ - Name: workflow.Name, - Step: workflow.GetCurrentStepId(), - }) - if err != nil { - log.Fatalf(fmt.Errorf("error refreshing transaction: %w", err).Error()) - } - } else if v1alpha1client.WorkflowFinished(workflow) { + } else if v1.WorkflowFinished(workflow) { break } @@ -168,7 +140,7 @@ func printWorkflowProgressDetails(workflow *stakingpb.Workflow) { ) } - if v1alpha1client.WorkflowFinished(workflow) { + if v1.WorkflowFinished(workflow) { log.Printf("Workflow reached end state - step name: %s %s workflow state: %s runtime: %v\n", step.GetName(), stepDetails, diff --git a/examples/solana/list-rewards/main.go b/examples/solana/list-rewards/main.go new file mode 100644 index 0000000..6a92c68 --- /dev/null +++ b/examples/solana/list-rewards/main.go @@ -0,0 +1,76 @@ +/* + * This example code, demonstrates rewards client library usage for listing rewards + */ + +package main + +import ( + "context" + "errors" + "log" + "time" + + "google.golang.org/api/iterator" + "google.golang.org/protobuf/encoding/protojson" + + "github.com/coinbase/staking-client-library-go/auth" + "github.com/coinbase/staking-client-library-go/client" + "github.com/coinbase/staking-client-library-go/client/options" + rewardsV1 "github.com/coinbase/staking-client-library-go/client/rewards/v1" + rewardspb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1" +) + +const ( + // TODO: Replace address as per your requirement. + address = "beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar" +) + +// An example function to demonstrate how to use the staking client libraries. +func main() { + ctx := context.Background() + + apiKey, err := auth.NewAPIKey(auth.WithLoadAPIKeyFromFile(true)) + if err != nil { + log.Fatalf("error loading API key: %s", err.Error()) + } + + authOpt := options.WithAPIKey(apiKey) + + // Create a staking client. + stakingClient, err := client.New(ctx, authOpt) + if err != nil { + log.Fatalf("error instantiating staking client: %s", err.Error()) + } + + // List all rewards for the given address, aggregated by epoch, for epochs that ended in the last 30 days. + now := time.Now() + thirtyDaysAgo := now.AddDate(0, 0, -30) + + rewardsIter := stakingClient.Rewards.ListRewards(ctx, &rewardspb.ListRewardsRequest{ + Parent: rewardspb.ProtocolResourceName{Protocol: "solana"}.String(), + PageSize: 20, + Filter: rewardsV1.WithAddress().Eq(address). + And(rewardsV1.WithPeriodEndTime().Gte(thirtyDaysAgo)). + And(rewardsV1.WithPeriodEndTime().Lt(now)).String(), + }) + + count := 0 + for { + reward, err := rewardsIter.Next() + if errors.Is(err, iterator.Done) { + break + } + + if err != nil { + log.Fatalf("error listing rewards: %s", err.Error()) + } + + d, err := protojson.Marshal(reward) + if err != nil { + log.Fatalf("error marshalling reward object: %s", err.Error()) + } + + log.Printf("[%d] Reward details: %s", count, d) + count += 1 + } +} diff --git a/gen/client/coinbase/staking/v1alpha1/doc.go b/gen/client/coinbase/staking/orchestration/v1/doc.go similarity index 93% rename from gen/client/coinbase/staking/v1alpha1/doc.go rename to gen/client/coinbase/staking/orchestration/v1/doc.go index 2da535d..82cde6d 100644 --- a/gen/client/coinbase/staking/v1alpha1/doc.go +++ b/gen/client/coinbase/staking/orchestration/v1/doc.go @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,8 +14,6 @@ // Code generated by protoc-gen-go_gapic. DO NOT EDIT. -// -// NOTE: This package is in alpha. It is not stable, and is likely to change. // // General documentation // @@ -31,7 +29,7 @@ // // - It may require correct/in-range values for request initialization. // // - It may require specifying regional endpoints when creating the service client as shown in: // // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options -// c, err := v1alpha1.NewStakingClient(ctx) +// c, err := v1.NewStakingClient(ctx) // if err != nil { // // TODO: Handle error. // } @@ -51,7 +49,7 @@ // // - It may require correct/in-range values for request initialization. // // - It may require specifying regional endpoints when creating the service client as shown in: // // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options -// c, err := v1alpha1.NewStakingClient(ctx) +// c, err := v1.NewStakingClient(ctx) // if err != nil { // // TODO: Handle error. // } @@ -59,7 +57,7 @@ // // req := &stakingpb.ListProtocolsRequest{ // // TODO: Fill request struct fields. -// // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#ListProtocolsRequest. +// // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1#ListProtocolsRequest. // } // resp, err := c.ListProtocols(ctx, req) // if err != nil { @@ -75,7 +73,7 @@ // Individual methods on the client use the ctx given to them. // // To close the open connection, use the Close() method. -package v1alpha1 // import "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" +package v1 // import "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/orchestration/v1" import ( "context" diff --git a/gen/client/coinbase/staking/v1alpha1/staking_client.go b/gen/client/coinbase/staking/orchestration/v1/staking_client.go similarity index 91% rename from gen/client/coinbase/staking/v1alpha1/staking_client.go rename to gen/client/coinbase/staking/orchestration/v1/staking_client.go index c5b445a..c14db70 100644 --- a/gen/client/coinbase/staking/v1alpha1/staking_client.go +++ b/gen/client/coinbase/staking/orchestration/v1/staking_client.go @@ -1,4 +1,4 @@ -// Copyright 2023 Google LLC +// Copyright 2024 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go_gapic. DO NOT EDIT. -package v1alpha1 +package v1 import ( "bytes" @@ -26,7 +26,7 @@ import ( "net/http" "net/url" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" + stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1" gax "github.com/googleapis/gax-go/v2" "google.golang.org/api/googleapi" "google.golang.org/api/iterator" @@ -52,7 +52,6 @@ type StakingCallOptions struct { GetWorkflow []gax.CallOption ListWorkflows []gax.CallOption PerformWorkflowStep []gax.CallOption - RefreshWorkflowStep []gax.CallOption ViewStakingContext []gax.CallOption } @@ -86,8 +85,6 @@ func defaultStakingCallOptions() *StakingCallOptions { }, PerformWorkflowStep: []gax.CallOption{ }, - RefreshWorkflowStep: []gax.CallOption{ - }, ViewStakingContext: []gax.CallOption{ }, } @@ -111,8 +108,6 @@ func defaultStakingRESTCallOptions() *StakingCallOptions { }, PerformWorkflowStep: []gax.CallOption{ }, - RefreshWorkflowStep: []gax.CallOption{ - }, ViewStakingContext: []gax.CallOption{ }, } @@ -131,7 +126,6 @@ type internalStakingClient interface { GetWorkflow(context.Context, *stakingpb.GetWorkflowRequest, ...gax.CallOption) (*stakingpb.Workflow, error) ListWorkflows(context.Context, *stakingpb.ListWorkflowsRequest, ...gax.CallOption) *WorkflowIterator PerformWorkflowStep(context.Context, *stakingpb.PerformWorkflowStepRequest, ...gax.CallOption) (*stakingpb.Workflow, error) - RefreshWorkflowStep(context.Context, *stakingpb.RefreshWorkflowStepRequest, ...gax.CallOption) (*stakingpb.Workflow, error) ViewStakingContext(context.Context, *stakingpb.ViewStakingContextRequest, ...gax.CallOption) (*stakingpb.ViewStakingContextResponse, error) } @@ -211,11 +205,6 @@ func (c *StakingClient) PerformWorkflowStep(ctx context.Context, req *stakingpb. return c.internalClient.PerformWorkflowStep(ctx, req, opts...) } -// RefreshWorkflowStep refresh the current step in a workflow. -func (c *StakingClient) RefreshWorkflowStep(ctx context.Context, req *stakingpb.RefreshWorkflowStepRequest, opts ...gax.CallOption) (*stakingpb.Workflow, error) { - return c.internalClient.RefreshWorkflowStep(ctx, req, opts...) -} - // ViewStakingContext view Staking context information given a specific network address. func (c *StakingClient) ViewStakingContext(ctx context.Context, req *stakingpb.ViewStakingContextRequest, opts ...gax.CallOption) (*stakingpb.ViewStakingContextResponse, error) { return c.internalClient.ViewStakingContext(ctx, req, opts...) @@ -551,23 +540,6 @@ func (c *stakingGRPCClient) PerformWorkflowStep(ctx context.Context, req *stakin return resp, nil } -func (c *stakingGRPCClient) RefreshWorkflowStep(ctx context.Context, req *stakingpb.RefreshWorkflowStepRequest, opts ...gax.CallOption) (*stakingpb.Workflow, error) { - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) - - ctx = insertMetadata(ctx, c.xGoogMetadata, md) - opts = append((*c.CallOptions).RefreshWorkflowStep[0:len((*c.CallOptions).RefreshWorkflowStep):len((*c.CallOptions).RefreshWorkflowStep)], opts...) - var resp *stakingpb.Workflow - err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - var err error - resp, err = c.stakingClient.RefreshWorkflowStep(ctx, req, settings.GRPC...) - return err - }, opts...) - if err != nil { - return nil, err - } - return resp, nil -} - func (c *stakingGRPCClient) ViewStakingContext(ctx context.Context, req *stakingpb.ViewStakingContextRequest, opts ...gax.CallOption) (*stakingpb.ViewStakingContextResponse, error) { ctx = insertMetadata(ctx, c.xGoogMetadata) opts = append((*c.CallOptions).ViewStakingContext[0:len((*c.CallOptions).ViewStakingContext):len((*c.CallOptions).ViewStakingContext)], opts...) @@ -589,7 +561,7 @@ func (c *stakingRESTClient) ListProtocols(ctx context.Context, req *stakingpb.Li if err != nil { return nil, err } - baseUrl.Path += fmt.Sprintf("/api/v1alpha1/protocols") + baseUrl.Path += fmt.Sprintf("/v1/protocols") // Build HTTP headers from client and context metadata. headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) @@ -639,7 +611,7 @@ func (c *stakingRESTClient) ListNetworks(ctx context.Context, req *stakingpb.Lis if err != nil { return nil, err } - baseUrl.Path += fmt.Sprintf("/api/v1alpha1/%v/networks", req.GetParent()) + baseUrl.Path += fmt.Sprintf("/v1/%v/networks", req.GetParent()) // Build HTTP headers from client and context metadata. md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) @@ -704,7 +676,7 @@ func (c *stakingRESTClient) ListStakingTargets(ctx context.Context, req *staking if err != nil { return nil, "", err } - baseUrl.Path += fmt.Sprintf("/api/v1alpha1/%v/stakingTargets", req.GetParent()) + baseUrl.Path += fmt.Sprintf("/v1/%v/stakingTargets", req.GetParent()) params := url.Values{} if req.GetPageSize() != 0 { @@ -777,7 +749,7 @@ func (c *stakingRESTClient) ListActions(ctx context.Context, req *stakingpb.List if err != nil { return nil, err } - baseUrl.Path += fmt.Sprintf("/api/v1alpha1/%v/actions", req.GetParent()) + baseUrl.Path += fmt.Sprintf("/v1/%v/actions", req.GetParent()) // Build HTTP headers from client and context metadata. md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) @@ -836,7 +808,7 @@ func (c *stakingRESTClient) CreateWorkflow(ctx context.Context, req *stakingpb.C if err != nil { return nil, err } - baseUrl.Path += fmt.Sprintf("/api/v1alpha1/%v/workflows", req.GetParent()) + baseUrl.Path += fmt.Sprintf("/v1/%v/workflows", req.GetParent()) // Build HTTP headers from client and context metadata. md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) @@ -888,7 +860,7 @@ func (c *stakingRESTClient) GetWorkflow(ctx context.Context, req *stakingpb.GetW if err != nil { return nil, err } - baseUrl.Path += fmt.Sprintf("/api/v1alpha1/%v", req.GetName()) + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) // Build HTTP headers from client and context metadata. md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) @@ -953,7 +925,7 @@ func (c *stakingRESTClient) ListWorkflows(ctx context.Context, req *stakingpb.Li if err != nil { return nil, "", err } - baseUrl.Path += fmt.Sprintf("/api/v1alpha1/%v/workflows", req.GetParent()) + baseUrl.Path += fmt.Sprintf("/v1/%v/workflows", req.GetParent()) params := url.Values{} if req.GetFilter() != "" { @@ -1035,7 +1007,7 @@ func (c *stakingRESTClient) PerformWorkflowStep(ctx context.Context, req *stakin if err != nil { return nil, err } - baseUrl.Path += fmt.Sprintf("/api/v1alpha1/%v/step", req.GetName()) + baseUrl.Path += fmt.Sprintf("/v1/%v/step", req.GetName()) // Build HTTP headers from client and context metadata. md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) @@ -1081,71 +1053,13 @@ func (c *stakingRESTClient) PerformWorkflowStep(ctx context.Context, req *stakin } return resp, nil } -// RefreshWorkflowStep refresh the current step in a workflow. -func (c *stakingRESTClient) RefreshWorkflowStep(ctx context.Context, req *stakingpb.RefreshWorkflowStepRequest, opts ...gax.CallOption) (*stakingpb.Workflow, error) { - m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} - jsonReq, err := m.Marshal(req) - if err != nil { - return nil, err - } - - baseUrl, err := url.Parse(c.endpoint) - if err != nil { - return nil, err - } - baseUrl.Path += fmt.Sprintf("/api/v1alpha1/%v/refresh", req.GetName()) - - // Build HTTP headers from client and context metadata. - md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) - - headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) - opts = append((*c.CallOptions).RefreshWorkflowStep[0:len((*c.CallOptions).RefreshWorkflowStep):len((*c.CallOptions).RefreshWorkflowStep)], opts...) - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - resp := &stakingpb.Workflow{} - e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { - if settings.Path != "" { - baseUrl.Path = settings.Path - } - httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) - if err != nil { - return err - } - httpReq = httpReq.WithContext(ctx) - httpReq.Header = headers - - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil{ - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := ioutil.ReadAll(httpRsp.Body) - if err != nil { - return err - } - - if err := unm.Unmarshal(buf, resp); err != nil { - return maybeUnknownEnum(err) - } - - return nil - }, opts...) - if e != nil { - return nil, e - } - return resp, nil -} // ViewStakingContext view Staking context information given a specific network address. func (c *stakingRESTClient) ViewStakingContext(ctx context.Context, req *stakingpb.ViewStakingContextRequest, opts ...gax.CallOption) (*stakingpb.ViewStakingContextResponse, error) { baseUrl, err := url.Parse(c.endpoint) if err != nil { return nil, err } - baseUrl.Path += fmt.Sprintf("/api/v1alpha1/viewStakingContext:view") + baseUrl.Path += fmt.Sprintf("/v1/viewStakingContext:view") params := url.Values{} params.Add("address", fmt.Sprintf("%v", req.GetAddress())) diff --git a/gen/client/coinbase/staking/rewards/v1/doc.go b/gen/client/coinbase/staking/rewards/v1/doc.go new file mode 100644 index 0000000..811df79 --- /dev/null +++ b/gen/client/coinbase/staking/rewards/v1/doc.go @@ -0,0 +1,185 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// +// NOTE: This package is in alpha. It is not stable, and is likely to change. +// +// General documentation +// +// For information about setting deadlines, reusing contexts, and more +// please visit https://pkg.go.dev/cloud.google.com/go. +// +// Example usage +// +// To get started with this package, create a client. +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := v1.NewRewardClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// Using the Client +// +// The following is an example of making an API call with the newly created client. +// +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := v1.NewRewardRESTClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := &rewardpb.ListRewardsRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1#ListRewardsRequest. +// } +// it := c.ListRewards(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// Use of Context +// +// The ctx passed to NewRewardClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +package v1 // import "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/rewards/v1" + +import ( + "context" + "fmt" + "net/http" + "runtime" + "strings" + "unicode" + + "google.golang.org/api/option" + "google.golang.org/grpc/metadata" +) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { + out, _ := metadata.FromOutgoingContext(ctx) + out = out.Copy() + for _, md := range mds { + for k, v := range md { + out[k] = append(out[k], v...) + } + } + return metadata.NewOutgoingContext(ctx, out) +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "", + } +} + +// versionGo returns the Go runtime version. The returned string +// has no whitespace, suitable for reporting in header. +func versionGo() string { + const develPrefix = "devel +" + + s := runtime.Version() + if strings.HasPrefix(s, develPrefix) { + s = s[len(develPrefix):] + if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { + s = s[:p] + } + return s + } + + notSemverRune := func(r rune) bool { + return !strings.ContainsRune("0123456789.", r) + } + + if strings.HasPrefix(s, "go1") { + s = s[2:] + var prerelease string + if p := strings.IndexFunc(s, notSemverRune); p >= 0 { + s, prerelease = s[:p], s[p:] + } + if strings.HasSuffix(s, ".") { + s += "0" + } else if strings.Count(s, ".") < 2 { + s += ".0" + } + if prerelease != "" { + s += "-" + prerelease + } + return s + } + return "UNKNOWN" +} + +// maybeUnknownEnum wraps the given proto-JSON parsing error if it is the result +// of receiving an unknown enum value. +func maybeUnknownEnum(err error) error { + if strings.Contains(err.Error(), "invalid value for enum type") { + err = fmt.Errorf("received an unknown enum value; a later version of the library may support it: %w", err) + } + return err +} + +// buildHeaders extracts metadata from the outgoing context, joins it with any other +// given metadata, and converts them into a http.Header. +func buildHeaders(ctx context.Context, mds ...metadata.MD) http.Header { + if cmd, ok := metadata.FromOutgoingContext(ctx); ok { + mds = append(mds, cmd) + } + md := metadata.Join(mds...) + return http.Header(md) +} + diff --git a/gen/client/coinbase/staking/rewards/v1/reward_client.go b/gen/client/coinbase/staking/rewards/v1/reward_client.go new file mode 100644 index 0000000..283ace1 --- /dev/null +++ b/gen/client/coinbase/staking/rewards/v1/reward_client.go @@ -0,0 +1,450 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + + +package v1 + +import ( + "context" + "fmt" + "io/ioutil" + "math" + "net/http" + "net/url" + + rewardpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + httptransport "google.golang.org/api/transport/http" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newRewardClientHook clientHook + +// RewardCallOptions contains the retry settings for each method of RewardClient. +type RewardCallOptions struct { + ListRewards []gax.CallOption + ListStakes []gax.CallOption +} + +func defaultRewardRESTCallOptions() *RewardCallOptions { + return &RewardCallOptions{ + ListRewards: []gax.CallOption{ + }, + ListStakes: []gax.CallOption{ + }, + } +} + +// internalRewardClient is an interface that defines the methods available from . +type internalRewardClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListRewards(context.Context, *rewardpb.ListRewardsRequest, ...gax.CallOption) *RewardIterator + ListStakes(context.Context, *rewardpb.ListStakesRequest, ...gax.CallOption) *StakeIterator +} + +// RewardClient is a client for interacting with . +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// RewardService exposes publicly available onchain staking-related rewards data across all supported protocols. +type RewardClient struct { + // The internal transport-dependent client. + internalClient internalRewardClient + + // The call options for this service. + CallOptions *RewardCallOptions + +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *RewardClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *RewardClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *RewardClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListRewards list rewards for a given protocol. +func (c *RewardClient) ListRewards(ctx context.Context, req *rewardpb.ListRewardsRequest, opts ...gax.CallOption) *RewardIterator { + return c.internalClient.ListRewards(ctx, req, opts...) +} + +// ListStakes list staking activities for a given protocol. +func (c *RewardClient) ListStakes(ctx context.Context, req *rewardpb.ListStakesRequest, opts ...gax.CallOption) *StakeIterator { + return c.internalClient.ListStakes(ctx, req, opts...) +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type rewardRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD + + // Points back to the CallOptions field of the containing RewardClient + CallOptions **RewardCallOptions +} + +// NewRewardRESTClient creates a new reward service rest client. +// +// RewardService exposes publicly available onchain staking-related rewards data across all supported protocols. +func NewRewardRESTClient(ctx context.Context, opts ...option.ClientOption) (*RewardClient, error) { + clientOpts := append(defaultRewardRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultRewardRESTCallOptions() + c := &rewardRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + return &RewardClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultRewardRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://api.developer.coinbase.com"), + internaloption.WithDefaultMTLSEndpoint("https://api.developer.coinbase.com"), + internaloption.WithDefaultAudience("https://api.developer.coinbase.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *rewardRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *rewardRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *rewardRESTClient) Connection() *grpc.ClientConn { + return nil +} +// ListRewards list rewards for a given protocol. +func (c *rewardRESTClient) ListRewards(ctx context.Context, req *rewardpb.ListRewardsRequest, opts ...gax.CallOption) *RewardIterator { + it := &RewardIterator{} + req = proto.Clone(req).(*rewardpb.ListRewardsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*rewardpb.Reward, string, error) { + resp := &rewardpb.ListRewardsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/rewards", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil{ + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetRewards(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} +// ListStakes list staking activities for a given protocol. +func (c *rewardRESTClient) ListStakes(ctx context.Context, req *rewardpb.ListStakesRequest, opts ...gax.CallOption) *StakeIterator { + it := &StakeIterator{} + req = proto.Clone(req).(*rewardpb.ListStakesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*rewardpb.Stake, string, error) { + resp := &rewardpb.ListStakesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/stakes", req.GetParent()) + + params := url.Values{} + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + headers := buildHeaders(ctx, c.xGoogMetadata, metadata.Pairs("Content-Type", "application/json")) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil{ + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetStakes(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} +// RewardIterator manages a stream of *rewardpb.Reward. +type RewardIterator struct { + items []*rewardpb.Reward + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*rewardpb.Reward, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *RewardIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *RewardIterator) Next() (*rewardpb.Reward, error) { + var item *rewardpb.Reward + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *RewardIterator) bufLen() int { + return len(it.items) +} + +func (it *RewardIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// StakeIterator manages a stream of *rewardpb.Stake. +type StakeIterator struct { + items []*rewardpb.Stake + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*rewardpb.Stake, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *StakeIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *StakeIterator) Next() (*rewardpb.Stake, error) { + var item *rewardpb.Stake + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *StakeIterator) bufLen() int { + return len(it.items) +} + +func (it *StakeIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/CreateWorkflow/main.go b/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/CreateWorkflow/main.go deleted file mode 100644 index 864eee7..0000000 --- a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/CreateWorkflow/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// [START api_v1alpha1_generated_StakingService_CreateWorkflow_sync] - -package main - -import ( - "context" - - v1alpha1 "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.CreateWorkflowRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#CreateWorkflowRequest. - } - resp, err := c.CreateWorkflow(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END api_v1alpha1_generated_StakingService_CreateWorkflow_sync] diff --git a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/GetWorkflow/main.go b/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/GetWorkflow/main.go deleted file mode 100644 index 4479f4f..0000000 --- a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/GetWorkflow/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// [START api_v1alpha1_generated_StakingService_GetWorkflow_sync] - -package main - -import ( - "context" - - v1alpha1 "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.GetWorkflowRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#GetWorkflowRequest. - } - resp, err := c.GetWorkflow(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END api_v1alpha1_generated_StakingService_GetWorkflow_sync] diff --git a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListActions/main.go b/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListActions/main.go deleted file mode 100644 index 959c72c..0000000 --- a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListActions/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// [START api_v1alpha1_generated_StakingService_ListActions_sync] - -package main - -import ( - "context" - - v1alpha1 "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.ListActionsRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#ListActionsRequest. - } - resp, err := c.ListActions(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END api_v1alpha1_generated_StakingService_ListActions_sync] diff --git a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListNetworks/main.go b/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListNetworks/main.go deleted file mode 100644 index 52f1ee6..0000000 --- a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListNetworks/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// [START api_v1alpha1_generated_StakingService_ListNetworks_sync] - -package main - -import ( - "context" - - v1alpha1 "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.ListNetworksRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#ListNetworksRequest. - } - resp, err := c.ListNetworks(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END api_v1alpha1_generated_StakingService_ListNetworks_sync] diff --git a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListProtocols/main.go b/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListProtocols/main.go deleted file mode 100644 index 7a6637c..0000000 --- a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListProtocols/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// [START api_v1alpha1_generated_StakingService_ListProtocols_sync] - -package main - -import ( - "context" - - v1alpha1 "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.ListProtocolsRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#ListProtocolsRequest. - } - resp, err := c.ListProtocols(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END api_v1alpha1_generated_StakingService_ListProtocols_sync] diff --git a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListStakingTargets/main.go b/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListStakingTargets/main.go deleted file mode 100644 index c2c8f23..0000000 --- a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListStakingTargets/main.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// [START api_v1alpha1_generated_StakingService_ListStakingTargets_sync] - -package main - -import ( - "context" - - v1alpha1 "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.ListStakingTargetsRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#ListStakingTargetsRequest. - } - it := c.ListStakingTargets(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -// [END api_v1alpha1_generated_StakingService_ListStakingTargets_sync] diff --git a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListWorkflows/main.go b/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListWorkflows/main.go deleted file mode 100644 index d495580..0000000 --- a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ListWorkflows/main.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// [START api_v1alpha1_generated_StakingService_ListWorkflows_sync] - -package main - -import ( - "context" - - v1alpha1 "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" - "google.golang.org/api/iterator" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.ListWorkflowsRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#ListWorkflowsRequest. - } - it := c.ListWorkflows(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -// [END api_v1alpha1_generated_StakingService_ListWorkflows_sync] diff --git a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/PerformWorkflowStep/main.go b/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/PerformWorkflowStep/main.go deleted file mode 100644 index 27663bb..0000000 --- a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/PerformWorkflowStep/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// [START api_v1alpha1_generated_StakingService_PerformWorkflowStep_sync] - -package main - -import ( - "context" - - v1alpha1 "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.PerformWorkflowStepRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#PerformWorkflowStepRequest. - } - resp, err := c.PerformWorkflowStep(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END api_v1alpha1_generated_StakingService_PerformWorkflowStep_sync] diff --git a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/RefreshWorkflowStep/main.go b/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/RefreshWorkflowStep/main.go deleted file mode 100644 index f84d74e..0000000 --- a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/RefreshWorkflowStep/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// [START api_v1alpha1_generated_StakingService_RefreshWorkflowStep_sync] - -package main - -import ( - "context" - - v1alpha1 "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.RefreshWorkflowStepRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#RefreshWorkflowStepRequest. - } - resp, err := c.RefreshWorkflowStep(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END api_v1alpha1_generated_StakingService_RefreshWorkflowStep_sync] diff --git a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ViewStakingContext/main.go b/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ViewStakingContext/main.go deleted file mode 100644 index 72eda78..0000000 --- a/gen/client/coinbase/staking/v1alpha1/internal/snippets/StakingClient/ViewStakingContext/main.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - -// [START api_v1alpha1_generated_StakingService_ViewStakingContext_sync] - -package main - -import ( - "context" - - v1alpha1 "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" -) - -func main() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.ViewStakingContextRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#ViewStakingContextRequest. - } - resp, err := c.ViewStakingContext(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -// [END api_v1alpha1_generated_StakingService_ViewStakingContext_sync] diff --git a/gen/client/coinbase/staking/v1alpha1/internal/snippets/snippet_metadata.coinbase.staking.v1alpha1.json b/gen/client/coinbase/staking/v1alpha1/internal/snippets/snippet_metadata.coinbase.staking.v1alpha1.json deleted file mode 100644 index 5397aea..0000000 --- a/gen/client/coinbase/staking/v1alpha1/internal/snippets/snippet_metadata.coinbase.staking.v1alpha1.json +++ /dev/null @@ -1,475 +0,0 @@ -{ - "clientLibrary": { - "name": "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1", - "version": "$VERSION", - "language": "GO", - "apis": [ - { - "id": "coinbase.staking.v1alpha1", - "version": "v1alpha1" - } - ] - }, - "snippets": [ - { - "regionTag": "api_v1alpha1_generated_StakingService_CreateWorkflow_sync", - "title": "api CreateWorkflow Sample", - "description": "CreateWorkflow create a workflow to perform an action.", - "file": "StakingClient/CreateWorkflow/main.go", - "language": "GO", - "clientMethod": { - "shortName": "CreateWorkflow", - "fullName": "coinbase.staking.v1alpha1.StakingClient.CreateWorkflow", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "stakingpb.CreateWorkflowRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*stakingpb.Workflow", - "client": { - "shortName": "StakingClient", - "fullName": "coinbase.staking.v1alpha1.StakingClient" - }, - "method": { - "shortName": "CreateWorkflow", - "fullName": "coinbase.staking.v1alpha1.StakingService.CreateWorkflow", - "service": { - "shortName": "StakingService", - "fullName": "coinbase.staking.v1alpha1.StakingService" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "api_v1alpha1_generated_StakingService_GetWorkflow_sync", - "title": "api GetWorkflow Sample", - "description": "GetWorkflow get the current state of an active workflow.", - "file": "StakingClient/GetWorkflow/main.go", - "language": "GO", - "clientMethod": { - "shortName": "GetWorkflow", - "fullName": "coinbase.staking.v1alpha1.StakingClient.GetWorkflow", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "stakingpb.GetWorkflowRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*stakingpb.Workflow", - "client": { - "shortName": "StakingClient", - "fullName": "coinbase.staking.v1alpha1.StakingClient" - }, - "method": { - "shortName": "GetWorkflow", - "fullName": "coinbase.staking.v1alpha1.StakingService.GetWorkflow", - "service": { - "shortName": "StakingService", - "fullName": "coinbase.staking.v1alpha1.StakingService" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "api_v1alpha1_generated_StakingService_ListActions_sync", - "title": "api ListActions Sample", - "description": "ListActions list supported actions for a given protocol and network.", - "file": "StakingClient/ListActions/main.go", - "language": "GO", - "clientMethod": { - "shortName": "ListActions", - "fullName": "coinbase.staking.v1alpha1.StakingClient.ListActions", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "stakingpb.ListActionsRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*stakingpb.ListActionsResponse", - "client": { - "shortName": "StakingClient", - "fullName": "coinbase.staking.v1alpha1.StakingClient" - }, - "method": { - "shortName": "ListActions", - "fullName": "coinbase.staking.v1alpha1.StakingService.ListActions", - "service": { - "shortName": "StakingService", - "fullName": "coinbase.staking.v1alpha1.StakingService" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "api_v1alpha1_generated_StakingService_ListNetworks_sync", - "title": "api ListNetworks Sample", - "description": "ListNetworks list supported staking networks for a given protocol.", - "file": "StakingClient/ListNetworks/main.go", - "language": "GO", - "clientMethod": { - "shortName": "ListNetworks", - "fullName": "coinbase.staking.v1alpha1.StakingClient.ListNetworks", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "stakingpb.ListNetworksRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*stakingpb.ListNetworksResponse", - "client": { - "shortName": "StakingClient", - "fullName": "coinbase.staking.v1alpha1.StakingClient" - }, - "method": { - "shortName": "ListNetworks", - "fullName": "coinbase.staking.v1alpha1.StakingService.ListNetworks", - "service": { - "shortName": "StakingService", - "fullName": "coinbase.staking.v1alpha1.StakingService" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "api_v1alpha1_generated_StakingService_ListProtocols_sync", - "title": "api ListProtocols Sample", - "description": "ListProtocols list supported protocols.", - "file": "StakingClient/ListProtocols/main.go", - "language": "GO", - "clientMethod": { - "shortName": "ListProtocols", - "fullName": "coinbase.staking.v1alpha1.StakingClient.ListProtocols", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "stakingpb.ListProtocolsRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*stakingpb.ListProtocolsResponse", - "client": { - "shortName": "StakingClient", - "fullName": "coinbase.staking.v1alpha1.StakingClient" - }, - "method": { - "shortName": "ListProtocols", - "fullName": "coinbase.staking.v1alpha1.StakingService.ListProtocols", - "service": { - "shortName": "StakingService", - "fullName": "coinbase.staking.v1alpha1.StakingService" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "api_v1alpha1_generated_StakingService_ListStakingTargets_sync", - "title": "api ListStakingTargets Sample", - "description": "ListStakingTargets list supported staking targets for a given protocol and network.", - "file": "StakingClient/ListStakingTargets/main.go", - "language": "GO", - "clientMethod": { - "shortName": "ListStakingTargets", - "fullName": "coinbase.staking.v1alpha1.StakingClient.ListStakingTargets", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "stakingpb.ListStakingTargetsRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "StakingTargetIterator", - "client": { - "shortName": "StakingClient", - "fullName": "coinbase.staking.v1alpha1.StakingClient" - }, - "method": { - "shortName": "ListStakingTargets", - "fullName": "coinbase.staking.v1alpha1.StakingService.ListStakingTargets", - "service": { - "shortName": "StakingService", - "fullName": "coinbase.staking.v1alpha1.StakingService" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 60, - "type": "FULL" - } - ] - }, - { - "regionTag": "api_v1alpha1_generated_StakingService_ListWorkflows_sync", - "title": "api ListWorkflows Sample", - "description": "ListWorkflows list all workflows in a project.", - "file": "StakingClient/ListWorkflows/main.go", - "language": "GO", - "clientMethod": { - "shortName": "ListWorkflows", - "fullName": "coinbase.staking.v1alpha1.StakingClient.ListWorkflows", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "stakingpb.ListWorkflowsRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "WorkflowIterator", - "client": { - "shortName": "StakingClient", - "fullName": "coinbase.staking.v1alpha1.StakingClient" - }, - "method": { - "shortName": "ListWorkflows", - "fullName": "coinbase.staking.v1alpha1.StakingService.ListWorkflows", - "service": { - "shortName": "StakingService", - "fullName": "coinbase.staking.v1alpha1.StakingService" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 60, - "type": "FULL" - } - ] - }, - { - "regionTag": "api_v1alpha1_generated_StakingService_PerformWorkflowStep_sync", - "title": "api PerformWorkflowStep Sample", - "description": "PerformWorkflowStep perform the next step in a workflow.", - "file": "StakingClient/PerformWorkflowStep/main.go", - "language": "GO", - "clientMethod": { - "shortName": "PerformWorkflowStep", - "fullName": "coinbase.staking.v1alpha1.StakingClient.PerformWorkflowStep", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "stakingpb.PerformWorkflowStepRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*stakingpb.Workflow", - "client": { - "shortName": "StakingClient", - "fullName": "coinbase.staking.v1alpha1.StakingClient" - }, - "method": { - "shortName": "PerformWorkflowStep", - "fullName": "coinbase.staking.v1alpha1.StakingService.PerformWorkflowStep", - "service": { - "shortName": "StakingService", - "fullName": "coinbase.staking.v1alpha1.StakingService" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "api_v1alpha1_generated_StakingService_RefreshWorkflowStep_sync", - "title": "api RefreshWorkflowStep Sample", - "description": "RefreshWorkflowStep refresh the current step in a workflow.", - "file": "StakingClient/RefreshWorkflowStep/main.go", - "language": "GO", - "clientMethod": { - "shortName": "RefreshWorkflowStep", - "fullName": "coinbase.staking.v1alpha1.StakingClient.RefreshWorkflowStep", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "stakingpb.RefreshWorkflowStepRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*stakingpb.Workflow", - "client": { - "shortName": "StakingClient", - "fullName": "coinbase.staking.v1alpha1.StakingClient" - }, - "method": { - "shortName": "RefreshWorkflowStep", - "fullName": "coinbase.staking.v1alpha1.StakingService.RefreshWorkflowStep", - "service": { - "shortName": "StakingService", - "fullName": "coinbase.staking.v1alpha1.StakingService" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - }, - { - "regionTag": "api_v1alpha1_generated_StakingService_ViewStakingContext_sync", - "title": "api ViewStakingContext Sample", - "description": "ViewStakingContext view Staking context information given a specific network address.", - "file": "StakingClient/ViewStakingContext/main.go", - "language": "GO", - "clientMethod": { - "shortName": "ViewStakingContext", - "fullName": "coinbase.staking.v1alpha1.StakingClient.ViewStakingContext", - "parameters": [ - { - "type": "context.Context", - "name": "ctx" - }, - { - "type": "stakingpb.ViewStakingContextRequest", - "name": "req" - }, - { - "type": "...gax.CallOption", - "name": "opts" - } - ], - "resultType": "*stakingpb.ViewStakingContextResponse", - "client": { - "shortName": "StakingClient", - "fullName": "coinbase.staking.v1alpha1.StakingClient" - }, - "method": { - "shortName": "ViewStakingContext", - "fullName": "coinbase.staking.v1alpha1.StakingService.ViewStakingContext", - "service": { - "shortName": "StakingService", - "fullName": "coinbase.staking.v1alpha1.StakingService" - } - } - }, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 18, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/gen/client/coinbase/staking/v1alpha1/staking_client_example_test.go b/gen/client/coinbase/staking/v1alpha1/staking_client_example_test.go deleted file mode 100644 index 4b93c4a..0000000 --- a/gen/client/coinbase/staking/v1alpha1/staking_client_example_test.go +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Code generated by protoc-gen-go_gapic. DO NOT EDIT. - - -package v1alpha1_test - -import ( - "context" - - v1alpha1 "github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1" - stakingpb "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1" - "google.golang.org/api/iterator" -) - -func ExampleNewStakingClient() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - // TODO: Use client. - _ = c -} - -func ExampleNewStakingRESTClient() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingRESTClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - // TODO: Use client. - _ = c -} - -func ExampleStakingClient_ListProtocols() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.ListProtocolsRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#ListProtocolsRequest. - } - resp, err := c.ListProtocols(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -func ExampleStakingClient_ListNetworks() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.ListNetworksRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#ListNetworksRequest. - } - resp, err := c.ListNetworks(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -func ExampleStakingClient_ListStakingTargets() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.ListStakingTargetsRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#ListStakingTargetsRequest. - } - it := c.ListStakingTargets(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -func ExampleStakingClient_ListActions() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.ListActionsRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#ListActionsRequest. - } - resp, err := c.ListActions(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -func ExampleStakingClient_CreateWorkflow() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.CreateWorkflowRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#CreateWorkflowRequest. - } - resp, err := c.CreateWorkflow(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -func ExampleStakingClient_GetWorkflow() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.GetWorkflowRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#GetWorkflowRequest. - } - resp, err := c.GetWorkflow(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -func ExampleStakingClient_ListWorkflows() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.ListWorkflowsRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#ListWorkflowsRequest. - } - it := c.ListWorkflows(ctx, req) - for { - resp, err := it.Next() - if err == iterator.Done { - break - } - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp - } -} - -func ExampleStakingClient_PerformWorkflowStep() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.PerformWorkflowStepRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#PerformWorkflowStepRequest. - } - resp, err := c.PerformWorkflowStep(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -func ExampleStakingClient_RefreshWorkflowStep() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.RefreshWorkflowStepRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#RefreshWorkflowStepRequest. - } - resp, err := c.RefreshWorkflowStep(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} - -func ExampleStakingClient_ViewStakingContext() { - ctx := context.Background() - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in: - // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options - c, err := v1alpha1.NewStakingClient(ctx) - if err != nil { - // TODO: Handle error. - } - defer c.Close() - - req := &stakingpb.ViewStakingContextRequest{ - // TODO: Fill request struct fields. - // See https://pkg.go.dev/github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1#ViewStakingContextRequest. - } - resp, err := c.ViewStakingContext(ctx, req) - if err != nil { - // TODO: Handle error. - } - // TODO: Use resp. - _ = resp -} diff --git a/gen/go/coinbase/staking/v1alpha1/action.pb.go b/gen/go/coinbase/staking/orchestration/v1/action.pb.go similarity index 58% rename from gen/go/coinbase/staking/v1alpha1/action.pb.go rename to gen/go/coinbase/staking/orchestration/v1/action.pb.go index 226102f..3d4a2c8 100644 --- a/gen/go/coinbase/staking/v1alpha1/action.pb.go +++ b/gen/go/coinbase/staking/orchestration/v1/action.pb.go @@ -2,9 +2,9 @@ // versions: // protoc-gen-go v1.30.0 // protoc (unknown) -// source: coinbase/staking/v1alpha1/action.proto +// source: coinbase/staking/orchestration/v1/action.proto -package v1alpha1 +package v1 import ( _ "google.golang.org/genproto/googleapis/api/annotations" @@ -21,8 +21,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// An Action resource, which represents an action you may take on a network, -// posted to a validator (e.g. stake, unstake). +// An Action resource represents an action you may take on a network (e.g. stake, unstake). type Action struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -30,14 +29,14 @@ type Action struct { // The resource name of the Action. // Format: protocols/{protocolName}/networks/{networkName}/actions/{actionName} - // Ex: protocols/polygon/networks/goerli/validators/stake + // Ex: protocols/ethereum_kiln/networks/holesky/validators/stake Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } func (x *Action) Reset() { *x = Action{} if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_action_proto_msgTypes[0] + mi := &file_coinbase_staking_orchestration_v1_action_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -50,7 +49,7 @@ func (x *Action) String() string { func (*Action) ProtoMessage() {} func (x *Action) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_action_proto_msgTypes[0] + mi := &file_coinbase_staking_orchestration_v1_action_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63,7 +62,7 @@ func (x *Action) ProtoReflect() protoreflect.Message { // Deprecated: Use Action.ProtoReflect.Descriptor instead. func (*Action) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_action_proto_rawDescGZIP(), []int{0} + return file_coinbase_staking_orchestration_v1_action_proto_rawDescGZIP(), []int{0} } func (x *Action) GetName() string { @@ -88,7 +87,7 @@ type ListActionsRequest struct { func (x *ListActionsRequest) Reset() { *x = ListActionsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_action_proto_msgTypes[1] + mi := &file_coinbase_staking_orchestration_v1_action_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -101,7 +100,7 @@ func (x *ListActionsRequest) String() string { func (*ListActionsRequest) ProtoMessage() {} func (x *ListActionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_action_proto_msgTypes[1] + mi := &file_coinbase_staking_orchestration_v1_action_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114,7 +113,7 @@ func (x *ListActionsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListActionsRequest.ProtoReflect.Descriptor instead. func (*ListActionsRequest) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_action_proto_rawDescGZIP(), []int{1} + return file_coinbase_staking_orchestration_v1_action_proto_rawDescGZIP(), []int{1} } func (x *ListActionsRequest) GetParent() string { @@ -137,7 +136,7 @@ type ListActionsResponse struct { func (x *ListActionsResponse) Reset() { *x = ListActionsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_action_proto_msgTypes[2] + mi := &file_coinbase_staking_orchestration_v1_action_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -150,7 +149,7 @@ func (x *ListActionsResponse) String() string { func (*ListActionsResponse) ProtoMessage() {} func (x *ListActionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_action_proto_msgTypes[2] + mi := &file_coinbase_staking_orchestration_v1_action_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -163,7 +162,7 @@ func (x *ListActionsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListActionsResponse.ProtoReflect.Descriptor instead. func (*ListActionsResponse) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_action_proto_rawDescGZIP(), []int{2} + return file_coinbase_staking_orchestration_v1_action_proto_rawDescGZIP(), []int{2} } func (x *ListActionsResponse) GetActions() []*Action { @@ -173,14 +172,15 @@ func (x *ListActionsResponse) GetActions() []*Action { return nil } -var File_coinbase_staking_v1alpha1_action_proto protoreflect.FileDescriptor +var File_coinbase_staking_orchestration_v1_action_proto protoreflect.FileDescriptor -var file_coinbase_staking_v1alpha1_action_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, +var file_coinbase_staking_orchestration_v1_action_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x21, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, @@ -197,40 +197,41 @@ var file_coinbase_staking_v1alpha1_action_proto_rawDesc = []byte{ 0x74, 0x12, 0x3b, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1d, 0x12, 0x1b, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x52, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x5a, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x42, 0x50, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, - 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x58, 0x5a, 0x56, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_coinbase_staking_v1alpha1_action_proto_rawDescOnce sync.Once - file_coinbase_staking_v1alpha1_action_proto_rawDescData = file_coinbase_staking_v1alpha1_action_proto_rawDesc + file_coinbase_staking_orchestration_v1_action_proto_rawDescOnce sync.Once + file_coinbase_staking_orchestration_v1_action_proto_rawDescData = file_coinbase_staking_orchestration_v1_action_proto_rawDesc ) -func file_coinbase_staking_v1alpha1_action_proto_rawDescGZIP() []byte { - file_coinbase_staking_v1alpha1_action_proto_rawDescOnce.Do(func() { - file_coinbase_staking_v1alpha1_action_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_v1alpha1_action_proto_rawDescData) +func file_coinbase_staking_orchestration_v1_action_proto_rawDescGZIP() []byte { + file_coinbase_staking_orchestration_v1_action_proto_rawDescOnce.Do(func() { + file_coinbase_staking_orchestration_v1_action_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_orchestration_v1_action_proto_rawDescData) }) - return file_coinbase_staking_v1alpha1_action_proto_rawDescData + return file_coinbase_staking_orchestration_v1_action_proto_rawDescData } -var file_coinbase_staking_v1alpha1_action_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_coinbase_staking_v1alpha1_action_proto_goTypes = []interface{}{ - (*Action)(nil), // 0: coinbase.staking.v1alpha1.Action - (*ListActionsRequest)(nil), // 1: coinbase.staking.v1alpha1.ListActionsRequest - (*ListActionsResponse)(nil), // 2: coinbase.staking.v1alpha1.ListActionsResponse +var file_coinbase_staking_orchestration_v1_action_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_coinbase_staking_orchestration_v1_action_proto_goTypes = []interface{}{ + (*Action)(nil), // 0: coinbase.staking.orchestration.v1.Action + (*ListActionsRequest)(nil), // 1: coinbase.staking.orchestration.v1.ListActionsRequest + (*ListActionsResponse)(nil), // 2: coinbase.staking.orchestration.v1.ListActionsResponse } -var file_coinbase_staking_v1alpha1_action_proto_depIdxs = []int32{ - 0, // 0: coinbase.staking.v1alpha1.ListActionsResponse.actions:type_name -> coinbase.staking.v1alpha1.Action +var file_coinbase_staking_orchestration_v1_action_proto_depIdxs = []int32{ + 0, // 0: coinbase.staking.orchestration.v1.ListActionsResponse.actions:type_name -> coinbase.staking.orchestration.v1.Action 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -238,13 +239,13 @@ var file_coinbase_staking_v1alpha1_action_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_coinbase_staking_v1alpha1_action_proto_init() } -func file_coinbase_staking_v1alpha1_action_proto_init() { - if File_coinbase_staking_v1alpha1_action_proto != nil { +func init() { file_coinbase_staking_orchestration_v1_action_proto_init() } +func file_coinbase_staking_orchestration_v1_action_proto_init() { + if File_coinbase_staking_orchestration_v1_action_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_coinbase_staking_v1alpha1_action_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_coinbase_staking_orchestration_v1_action_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Action); i { case 0: return &v.state @@ -256,7 +257,7 @@ func file_coinbase_staking_v1alpha1_action_proto_init() { return nil } } - file_coinbase_staking_v1alpha1_action_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_coinbase_staking_orchestration_v1_action_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListActionsRequest); i { case 0: return &v.state @@ -268,7 +269,7 @@ func file_coinbase_staking_v1alpha1_action_proto_init() { return nil } } - file_coinbase_staking_v1alpha1_action_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_coinbase_staking_orchestration_v1_action_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListActionsResponse); i { case 0: return &v.state @@ -285,18 +286,18 @@ func file_coinbase_staking_v1alpha1_action_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_coinbase_staking_v1alpha1_action_proto_rawDesc, + RawDescriptor: file_coinbase_staking_orchestration_v1_action_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_coinbase_staking_v1alpha1_action_proto_goTypes, - DependencyIndexes: file_coinbase_staking_v1alpha1_action_proto_depIdxs, - MessageInfos: file_coinbase_staking_v1alpha1_action_proto_msgTypes, + GoTypes: file_coinbase_staking_orchestration_v1_action_proto_goTypes, + DependencyIndexes: file_coinbase_staking_orchestration_v1_action_proto_depIdxs, + MessageInfos: file_coinbase_staking_orchestration_v1_action_proto_msgTypes, }.Build() - File_coinbase_staking_v1alpha1_action_proto = out.File - file_coinbase_staking_v1alpha1_action_proto_rawDesc = nil - file_coinbase_staking_v1alpha1_action_proto_goTypes = nil - file_coinbase_staking_v1alpha1_action_proto_depIdxs = nil + File_coinbase_staking_orchestration_v1_action_proto = out.File + file_coinbase_staking_orchestration_v1_action_proto_rawDesc = nil + file_coinbase_staking_orchestration_v1_action_proto_goTypes = nil + file_coinbase_staking_orchestration_v1_action_proto_depIdxs = nil } diff --git a/gen/go/coinbase/staking/v1alpha1/action_aip.go b/gen/go/coinbase/staking/orchestration/v1/action_aip.go similarity index 97% rename from gen/go/coinbase/staking/v1alpha1/action_aip.go rename to gen/go/coinbase/staking/orchestration/v1/action_aip.go index 1eca2ca..a008935 100644 --- a/gen/go/coinbase/staking/v1alpha1/action_aip.go +++ b/gen/go/coinbase/staking/orchestration/v1/action_aip.go @@ -3,9 +3,9 @@ // versions: // protoc-gen-go-aip development // protoc (unknown) -// source: coinbase/staking/v1alpha1/action.proto +// source: coinbase/staking/orchestration/v1/action.proto -package v1alpha1 +package v1 import ( fmt "fmt" diff --git a/gen/go/coinbase/staking/orchestration/v1/api.pb.go b/gen/go/coinbase/staking/orchestration/v1/api.pb.go new file mode 100644 index 0000000..dd37ceb --- /dev/null +++ b/gen/go/coinbase/staking/orchestration/v1/api.pb.go @@ -0,0 +1,357 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: coinbase/staking/orchestration/v1/api.proto + +package v1 + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_coinbase_staking_orchestration_v1_api_proto protoreflect.FileDescriptor + +var file_coinbase_staking_orchestration_v1_api_proto_rawDesc = []byte{ + 0x0a, 0x2b, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x63, + 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, + 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, + 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, + 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x63, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, + 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x63, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, + 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x30, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x37, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x86, 0x14, + 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0xf9, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x6f, + 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x75, 0x92, 0x41, 0x5a, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x1a, 0x18, + 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x2a, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, + 0x0a, 0x02, 0x4f, 0x4b, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, + 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x8d, 0x02, 0x0a, + 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x12, 0x36, 0x2e, + 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8b, + 0x01, 0x92, 0x41, 0x56, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x17, 0x4c, + 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x1a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x2a, + 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x4a, 0x0b, 0x0a, + 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, 0x0a, 0x02, 0x4f, 0x4b, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x12, 0xca, 0x02, 0x0a, + 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x73, 0x12, 0x3c, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x3d, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xb6, 0x01, 0x92, 0x41, 0x70, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x73, 0x1a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x73, 0x2a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, + 0x12, 0x04, 0x0a, 0x02, 0x4f, 0x4b, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x2f, 0x2a, 0x2f, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x90, 0x02, 0x0a, 0x0b, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x2e, 0x63, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, + 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x36, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x91, 0x01, 0x92, 0x41, 0x52, 0x0a, 0x06, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x16, + 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, 0x0a, 0x02, 0x4f, 0x4b, + 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, + 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x2f, 0x2a, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xfa, 0x01, 0x0a, + 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, + 0x38, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, + 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x80, 0x01, 0x92, 0x41, 0x38, 0x0a, 0x08, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, + 0x0a, 0x02, 0x4f, 0x4b, 0xda, 0x41, 0x0f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x08, 0x77, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, + 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0xd8, 0x01, 0x0a, 0x0b, 0x47, 0x65, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x35, 0x2e, 0x63, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, + 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x65, 0x92, + 0x41, 0x32, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x0c, 0x47, 0x65, + 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2a, 0x0b, 0x67, 0x65, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, + 0x0a, 0x02, 0x4f, 0x4b, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x23, 0x12, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xf9, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x38, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x75, 0x92, 0x41, 0x40, 0x0a, 0x08, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x73, 0x2a, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x73, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, 0x0a, 0x02, 0x4f, 0x4b, 0xda, 0x41, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, + 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, + 0x12, 0xa9, 0x02, 0x0a, 0x13, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x65, 0x70, 0x12, 0x3d, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, + 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, + 0x66, 0x6f, 0x72, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x65, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x22, 0xa5, 0x01, 0x92, 0x41, 0x71, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x23, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x6e, 0x65, 0x78, 0x74, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x69, 0x6e, 0x20, 0x61, + 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x1a, 0x23, 0x50, 0x65, 0x72, 0x66, 0x6f, + 0x72, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x78, 0x74, 0x20, 0x73, 0x74, 0x65, 0x70, + 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2a, 0x0e, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4a, 0x0b, + 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, 0x0a, 0x02, 0x4f, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x2b, 0x3a, 0x01, 0x2a, 0x22, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x74, 0x65, 0x70, 0x12, 0xe8, 0x02, 0x0a, + 0x12, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x12, 0x3c, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x3d, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xd4, 0x01, 0x92, 0x41, 0xad, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x3c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, + 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2d, 0x69, 0x6e, 0x2d, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x3c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x2d, 0x69, 0x6e, 0x2d, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, + 0x64, 0x61, 0x74, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x2a, 0x12, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, + 0x0a, 0x02, 0x4f, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x76, 0x31, 0x2f, + 0x76, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x3a, 0x76, 0x69, 0x65, 0x77, 0x1a, 0x1d, 0xca, 0x41, 0x1a, 0x61, 0x70, 0x69, 0x2e, + 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x42, 0xf5, 0x07, 0x92, 0x41, 0x99, 0x07, 0x12, 0x65, 0x0a, + 0x15, 0x4f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, + 0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x20, 0x6e, + 0x6f, 0x6e, 0x2d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x69, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, + 0x20, 0x66, 0x6f, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, + 0x32, 0x02, 0x76, 0x31, 0x1a, 0x1a, 0x61, 0x70, 0x69, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, + 0x22, 0x08, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, + 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, + 0x6e, 0x52, 0x52, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, 0x4b, 0x0a, 0x2c, 0x54, 0x68, 0x65, 0x20, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65, + 0x64, 0x20, 0x68, 0x61, 0x73, 0x20, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x19, 0x1a, 0x17, 0x23, 0x2f, + 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x57, 0x0a, 0x03, 0x34, 0x30, 0x31, 0x12, 0x50, 0x0a, 0x31, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x66, 0x20, 0x61, 0x75, 0x74, 0x68, + 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x12, 0x1b, 0x0a, 0x19, 0x1a, 0x17, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x64, + 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x5d, 0x0a, 0x3e, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, + 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, + 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x12, 0x1b, 0x0a, 0x19, 0x1a, 0x17, 0x23, 0x2f, 0x64, + 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x4c, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x45, 0x0a, 0x26, 0x52, + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x20, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, + 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x12, 0x1b, 0x0a, 0x19, 0x1a, 0x17, 0x23, 0x2f, 0x64, 0x65, 0x66, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x56, 0x0a, 0x03, 0x34, 0x32, 0x39, 0x12, 0x4f, 0x0a, 0x30, 0x52, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x20, 0x68, 0x61, 0x73, 0x20, + 0x62, 0x65, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64, 0x2e, 0x12, 0x1b, 0x0a, + 0x19, 0x1a, 0x17, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x55, 0x0a, 0x03, 0x35, 0x30, + 0x30, 0x12, 0x4e, 0x0a, 0x2f, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, + 0x65, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x68, 0x61, 0x70, 0x70, + 0x65, 0x6e, 0x73, 0x2e, 0x12, 0x1b, 0x0a, 0x19, 0x1a, 0x17, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x6a, 0x1d, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x11, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x6a, 0x1b, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x10, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x6a, 0x19, 0x0a, + 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x6a, 0x28, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x17, 0x53, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x6a, 0x29, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x12, 0x17, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x6a, 0x27, 0x0a, + 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1b, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x64, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, + 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, + 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, + 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_coinbase_staking_orchestration_v1_api_proto_goTypes = []interface{}{ + (*ListProtocolsRequest)(nil), // 0: coinbase.staking.orchestration.v1.ListProtocolsRequest + (*ListNetworksRequest)(nil), // 1: coinbase.staking.orchestration.v1.ListNetworksRequest + (*ListStakingTargetsRequest)(nil), // 2: coinbase.staking.orchestration.v1.ListStakingTargetsRequest + (*ListActionsRequest)(nil), // 3: coinbase.staking.orchestration.v1.ListActionsRequest + (*CreateWorkflowRequest)(nil), // 4: coinbase.staking.orchestration.v1.CreateWorkflowRequest + (*GetWorkflowRequest)(nil), // 5: coinbase.staking.orchestration.v1.GetWorkflowRequest + (*ListWorkflowsRequest)(nil), // 6: coinbase.staking.orchestration.v1.ListWorkflowsRequest + (*PerformWorkflowStepRequest)(nil), // 7: coinbase.staking.orchestration.v1.PerformWorkflowStepRequest + (*ViewStakingContextRequest)(nil), // 8: coinbase.staking.orchestration.v1.ViewStakingContextRequest + (*ListProtocolsResponse)(nil), // 9: coinbase.staking.orchestration.v1.ListProtocolsResponse + (*ListNetworksResponse)(nil), // 10: coinbase.staking.orchestration.v1.ListNetworksResponse + (*ListStakingTargetsResponse)(nil), // 11: coinbase.staking.orchestration.v1.ListStakingTargetsResponse + (*ListActionsResponse)(nil), // 12: coinbase.staking.orchestration.v1.ListActionsResponse + (*Workflow)(nil), // 13: coinbase.staking.orchestration.v1.Workflow + (*ListWorkflowsResponse)(nil), // 14: coinbase.staking.orchestration.v1.ListWorkflowsResponse + (*ViewStakingContextResponse)(nil), // 15: coinbase.staking.orchestration.v1.ViewStakingContextResponse +} +var file_coinbase_staking_orchestration_v1_api_proto_depIdxs = []int32{ + 0, // 0: coinbase.staking.orchestration.v1.StakingService.ListProtocols:input_type -> coinbase.staking.orchestration.v1.ListProtocolsRequest + 1, // 1: coinbase.staking.orchestration.v1.StakingService.ListNetworks:input_type -> coinbase.staking.orchestration.v1.ListNetworksRequest + 2, // 2: coinbase.staking.orchestration.v1.StakingService.ListStakingTargets:input_type -> coinbase.staking.orchestration.v1.ListStakingTargetsRequest + 3, // 3: coinbase.staking.orchestration.v1.StakingService.ListActions:input_type -> coinbase.staking.orchestration.v1.ListActionsRequest + 4, // 4: coinbase.staking.orchestration.v1.StakingService.CreateWorkflow:input_type -> coinbase.staking.orchestration.v1.CreateWorkflowRequest + 5, // 5: coinbase.staking.orchestration.v1.StakingService.GetWorkflow:input_type -> coinbase.staking.orchestration.v1.GetWorkflowRequest + 6, // 6: coinbase.staking.orchestration.v1.StakingService.ListWorkflows:input_type -> coinbase.staking.orchestration.v1.ListWorkflowsRequest + 7, // 7: coinbase.staking.orchestration.v1.StakingService.PerformWorkflowStep:input_type -> coinbase.staking.orchestration.v1.PerformWorkflowStepRequest + 8, // 8: coinbase.staking.orchestration.v1.StakingService.ViewStakingContext:input_type -> coinbase.staking.orchestration.v1.ViewStakingContextRequest + 9, // 9: coinbase.staking.orchestration.v1.StakingService.ListProtocols:output_type -> coinbase.staking.orchestration.v1.ListProtocolsResponse + 10, // 10: coinbase.staking.orchestration.v1.StakingService.ListNetworks:output_type -> coinbase.staking.orchestration.v1.ListNetworksResponse + 11, // 11: coinbase.staking.orchestration.v1.StakingService.ListStakingTargets:output_type -> coinbase.staking.orchestration.v1.ListStakingTargetsResponse + 12, // 12: coinbase.staking.orchestration.v1.StakingService.ListActions:output_type -> coinbase.staking.orchestration.v1.ListActionsResponse + 13, // 13: coinbase.staking.orchestration.v1.StakingService.CreateWorkflow:output_type -> coinbase.staking.orchestration.v1.Workflow + 13, // 14: coinbase.staking.orchestration.v1.StakingService.GetWorkflow:output_type -> coinbase.staking.orchestration.v1.Workflow + 14, // 15: coinbase.staking.orchestration.v1.StakingService.ListWorkflows:output_type -> coinbase.staking.orchestration.v1.ListWorkflowsResponse + 13, // 16: coinbase.staking.orchestration.v1.StakingService.PerformWorkflowStep:output_type -> coinbase.staking.orchestration.v1.Workflow + 15, // 17: coinbase.staking.orchestration.v1.StakingService.ViewStakingContext:output_type -> coinbase.staking.orchestration.v1.ViewStakingContextResponse + 9, // [9:18] is the sub-list for method output_type + 0, // [0:9] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_coinbase_staking_orchestration_v1_api_proto_init() } +func file_coinbase_staking_orchestration_v1_api_proto_init() { + if File_coinbase_staking_orchestration_v1_api_proto != nil { + return + } + file_coinbase_staking_orchestration_v1_protocol_proto_init() + file_coinbase_staking_orchestration_v1_network_proto_init() + file_coinbase_staking_orchestration_v1_action_proto_init() + file_coinbase_staking_orchestration_v1_staking_target_proto_init() + file_coinbase_staking_orchestration_v1_workflow_proto_init() + file_coinbase_staking_orchestration_v1_staking_context_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_coinbase_staking_orchestration_v1_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_coinbase_staking_orchestration_v1_api_proto_goTypes, + DependencyIndexes: file_coinbase_staking_orchestration_v1_api_proto_depIdxs, + }.Build() + File_coinbase_staking_orchestration_v1_api_proto = out.File + file_coinbase_staking_orchestration_v1_api_proto_rawDesc = nil + file_coinbase_staking_orchestration_v1_api_proto_goTypes = nil + file_coinbase_staking_orchestration_v1_api_proto_depIdxs = nil +} diff --git a/gen/go/coinbase/staking/v1alpha1/api.pb.gw.go b/gen/go/coinbase/staking/orchestration/v1/api.pb.gw.go similarity index 81% rename from gen/go/coinbase/staking/v1alpha1/api.pb.gw.go rename to gen/go/coinbase/staking/orchestration/v1/api.pb.gw.go index 9ec2d88..644a627 100644 --- a/gen/go/coinbase/staking/v1alpha1/api.pb.gw.go +++ b/gen/go/coinbase/staking/orchestration/v1/api.pb.gw.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: coinbase/staking/v1alpha1/api.proto +// source: coinbase/staking/orchestration/v1/api.proto /* -Package v1alpha1 is a reverse proxy. +Package v1 is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package v1alpha1 +package v1 import ( "context" @@ -481,74 +481,6 @@ func local_request_StakingService_PerformWorkflowStep_0(ctx context.Context, mar } -func request_StakingService_RefreshWorkflowStep_0(ctx context.Context, marshaler runtime.Marshaler, client StakingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RefreshWorkflowStepRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - msg, err := client.RefreshWorkflowStep(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_StakingService_RefreshWorkflowStep_0(ctx context.Context, marshaler runtime.Marshaler, server StakingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RefreshWorkflowStepRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - msg, err := server.RefreshWorkflowStep(ctx, &protoReq) - return msg, metadata, err - -} - var ( filter_StakingService_ViewStakingContext_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -599,7 +531,7 @@ func RegisterStakingServiceHandlerServer(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/ListProtocols", runtime.WithHTTPPathPattern("/api/v1alpha1/protocols")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/ListProtocols", runtime.WithHTTPPathPattern("/v1/protocols")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -624,7 +556,7 @@ func RegisterStakingServiceHandlerServer(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/ListNetworks", runtime.WithHTTPPathPattern("/api/v1alpha1/{parent=protocols/*}/networks")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/ListNetworks", runtime.WithHTTPPathPattern("/v1/{parent=protocols/*}/networks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -649,7 +581,7 @@ func RegisterStakingServiceHandlerServer(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/ListStakingTargets", runtime.WithHTTPPathPattern("/api/v1alpha1/{parent=protocols/*/networks/*}/stakingTargets")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/ListStakingTargets", runtime.WithHTTPPathPattern("/v1/{parent=protocols/*/networks/*}/stakingTargets")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -674,7 +606,7 @@ func RegisterStakingServiceHandlerServer(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/ListActions", runtime.WithHTTPPathPattern("/api/v1alpha1/{parent=protocols/*/networks/*}/actions")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/ListActions", runtime.WithHTTPPathPattern("/v1/{parent=protocols/*/networks/*}/actions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -699,7 +631,7 @@ func RegisterStakingServiceHandlerServer(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/CreateWorkflow", runtime.WithHTTPPathPattern("/api/v1alpha1/{parent=projects/*}/workflows")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/CreateWorkflow", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/workflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -724,7 +656,7 @@ func RegisterStakingServiceHandlerServer(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/GetWorkflow", runtime.WithHTTPPathPattern("/api/v1alpha1/{name=projects/*/workflows/*}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/GetWorkflow", runtime.WithHTTPPathPattern("/v1/{name=projects/*/workflows/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -749,7 +681,7 @@ func RegisterStakingServiceHandlerServer(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/ListWorkflows", runtime.WithHTTPPathPattern("/api/v1alpha1/{parent=projects/*}/workflows")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/ListWorkflows", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/workflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -774,7 +706,7 @@ func RegisterStakingServiceHandlerServer(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/PerformWorkflowStep", runtime.WithHTTPPathPattern("/api/v1alpha1/{name=projects/*/workflows/*}/step")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/PerformWorkflowStep", runtime.WithHTTPPathPattern("/v1/{name=projects/*/workflows/*}/step")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -791,31 +723,6 @@ func RegisterStakingServiceHandlerServer(ctx context.Context, mux *runtime.Serve }) - mux.Handle("POST", pattern_StakingService_RefreshWorkflowStep_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/RefreshWorkflowStep", runtime.WithHTTPPathPattern("/api/v1alpha1/{name=projects/*/workflows/*}/refresh")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_StakingService_RefreshWorkflowStep_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_StakingService_RefreshWorkflowStep_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_StakingService_ViewStakingContext_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -824,7 +731,7 @@ func RegisterStakingServiceHandlerServer(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/ViewStakingContext", runtime.WithHTTPPathPattern("/api/v1alpha1/viewStakingContext:view")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/ViewStakingContext", runtime.WithHTTPPathPattern("/v1/viewStakingContext:view")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -888,7 +795,7 @@ func RegisterStakingServiceHandlerClient(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/ListProtocols", runtime.WithHTTPPathPattern("/api/v1alpha1/protocols")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/ListProtocols", runtime.WithHTTPPathPattern("/v1/protocols")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -910,7 +817,7 @@ func RegisterStakingServiceHandlerClient(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/ListNetworks", runtime.WithHTTPPathPattern("/api/v1alpha1/{parent=protocols/*}/networks")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/ListNetworks", runtime.WithHTTPPathPattern("/v1/{parent=protocols/*}/networks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -932,7 +839,7 @@ func RegisterStakingServiceHandlerClient(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/ListStakingTargets", runtime.WithHTTPPathPattern("/api/v1alpha1/{parent=protocols/*/networks/*}/stakingTargets")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/ListStakingTargets", runtime.WithHTTPPathPattern("/v1/{parent=protocols/*/networks/*}/stakingTargets")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -954,7 +861,7 @@ func RegisterStakingServiceHandlerClient(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/ListActions", runtime.WithHTTPPathPattern("/api/v1alpha1/{parent=protocols/*/networks/*}/actions")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/ListActions", runtime.WithHTTPPathPattern("/v1/{parent=protocols/*/networks/*}/actions")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -976,7 +883,7 @@ func RegisterStakingServiceHandlerClient(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/CreateWorkflow", runtime.WithHTTPPathPattern("/api/v1alpha1/{parent=projects/*}/workflows")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/CreateWorkflow", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/workflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -998,7 +905,7 @@ func RegisterStakingServiceHandlerClient(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/GetWorkflow", runtime.WithHTTPPathPattern("/api/v1alpha1/{name=projects/*/workflows/*}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/GetWorkflow", runtime.WithHTTPPathPattern("/v1/{name=projects/*/workflows/*}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1020,7 +927,7 @@ func RegisterStakingServiceHandlerClient(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/ListWorkflows", runtime.WithHTTPPathPattern("/api/v1alpha1/{parent=projects/*}/workflows")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/ListWorkflows", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/workflows")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1042,7 +949,7 @@ func RegisterStakingServiceHandlerClient(ctx context.Context, mux *runtime.Serve inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/PerformWorkflowStep", runtime.WithHTTPPathPattern("/api/v1alpha1/{name=projects/*/workflows/*}/step")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/PerformWorkflowStep", runtime.WithHTTPPathPattern("/v1/{name=projects/*/workflows/*}/step")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1058,35 +965,13 @@ func RegisterStakingServiceHandlerClient(ctx context.Context, mux *runtime.Serve }) - mux.Handle("POST", pattern_StakingService_RefreshWorkflowStep_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/RefreshWorkflowStep", runtime.WithHTTPPathPattern("/api/v1alpha1/{name=projects/*/workflows/*}/refresh")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_StakingService_RefreshWorkflowStep_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_StakingService_RefreshWorkflowStep_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_StakingService_ViewStakingContext_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) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.v1alpha1.StakingService/ViewStakingContext", runtime.WithHTTPPathPattern("/api/v1alpha1/viewStakingContext:view")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.orchestration.v1.StakingService/ViewStakingContext", runtime.WithHTTPPathPattern("/v1/viewStakingContext:view")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -1106,25 +991,23 @@ func RegisterStakingServiceHandlerClient(ctx context.Context, mux *runtime.Serve } var ( - pattern_StakingService_ListProtocols_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1alpha1", "protocols"}, "")) - - pattern_StakingService_ListNetworks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1alpha1", "protocols", "parent", "networks"}, "")) + pattern_StakingService_ListProtocols_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "protocols"}, "")) - pattern_StakingService_ListStakingTargets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 2, 3, 1, 0, 4, 4, 5, 4, 2, 5}, []string{"api", "v1alpha1", "protocols", "networks", "parent", "stakingTargets"}, "")) + pattern_StakingService_ListNetworks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "protocols", "parent", "networks"}, "")) - pattern_StakingService_ListActions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 2, 3, 1, 0, 4, 4, 5, 4, 2, 5}, []string{"api", "v1alpha1", "protocols", "networks", "parent", "actions"}, "")) + pattern_StakingService_ListStakingTargets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "protocols", "networks", "parent", "stakingTargets"}, "")) - pattern_StakingService_CreateWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1alpha1", "projects", "parent", "workflows"}, "")) + pattern_StakingService_ListActions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "protocols", "networks", "parent", "actions"}, "")) - pattern_StakingService_GetWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 2, 3, 1, 0, 4, 4, 5, 4}, []string{"api", "v1alpha1", "projects", "workflows", "name"}, "")) + pattern_StakingService_CreateWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "workflows"}, "")) - pattern_StakingService_ListWorkflows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 2, 5, 3, 2, 4}, []string{"api", "v1alpha1", "projects", "parent", "workflows"}, "")) + pattern_StakingService_GetWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "workflows", "name"}, "")) - pattern_StakingService_PerformWorkflowStep_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 2, 3, 1, 0, 4, 4, 5, 4, 2, 5}, []string{"api", "v1alpha1", "projects", "workflows", "name", "step"}, "")) + pattern_StakingService_ListWorkflows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "workflows"}, "")) - pattern_StakingService_RefreshWorkflowStep_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 2, 3, 1, 0, 4, 4, 5, 4, 2, 5}, []string{"api", "v1alpha1", "projects", "workflows", "name", "refresh"}, "")) + pattern_StakingService_PerformWorkflowStep_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "projects", "workflows", "name", "step"}, "")) - pattern_StakingService_ViewStakingContext_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1alpha1", "viewStakingContext"}, "view")) + pattern_StakingService_ViewStakingContext_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "viewStakingContext"}, "view")) ) var ( @@ -1144,7 +1027,5 @@ var ( forward_StakingService_PerformWorkflowStep_0 = runtime.ForwardResponseMessage - forward_StakingService_RefreshWorkflowStep_0 = runtime.ForwardResponseMessage - forward_StakingService_ViewStakingContext_0 = runtime.ForwardResponseMessage ) diff --git a/gen/go/coinbase/staking/v1alpha1/api_grpc.pb.go b/gen/go/coinbase/staking/orchestration/v1/api_grpc.pb.go similarity index 88% rename from gen/go/coinbase/staking/v1alpha1/api_grpc.pb.go rename to gen/go/coinbase/staking/orchestration/v1/api_grpc.pb.go index 3d9b31b..672788c 100644 --- a/gen/go/coinbase/staking/v1alpha1/api_grpc.pb.go +++ b/gen/go/coinbase/staking/orchestration/v1/api_grpc.pb.go @@ -2,9 +2,9 @@ // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) -// source: coinbase/staking/v1alpha1/api.proto +// source: coinbase/staking/orchestration/v1/api.proto -package v1alpha1 +package v1 import ( context "context" @@ -19,16 +19,15 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - StakingService_ListProtocols_FullMethodName = "/coinbase.staking.v1alpha1.StakingService/ListProtocols" - StakingService_ListNetworks_FullMethodName = "/coinbase.staking.v1alpha1.StakingService/ListNetworks" - StakingService_ListStakingTargets_FullMethodName = "/coinbase.staking.v1alpha1.StakingService/ListStakingTargets" - StakingService_ListActions_FullMethodName = "/coinbase.staking.v1alpha1.StakingService/ListActions" - StakingService_CreateWorkflow_FullMethodName = "/coinbase.staking.v1alpha1.StakingService/CreateWorkflow" - StakingService_GetWorkflow_FullMethodName = "/coinbase.staking.v1alpha1.StakingService/GetWorkflow" - StakingService_ListWorkflows_FullMethodName = "/coinbase.staking.v1alpha1.StakingService/ListWorkflows" - StakingService_PerformWorkflowStep_FullMethodName = "/coinbase.staking.v1alpha1.StakingService/PerformWorkflowStep" - StakingService_RefreshWorkflowStep_FullMethodName = "/coinbase.staking.v1alpha1.StakingService/RefreshWorkflowStep" - StakingService_ViewStakingContext_FullMethodName = "/coinbase.staking.v1alpha1.StakingService/ViewStakingContext" + StakingService_ListProtocols_FullMethodName = "/coinbase.staking.orchestration.v1.StakingService/ListProtocols" + StakingService_ListNetworks_FullMethodName = "/coinbase.staking.orchestration.v1.StakingService/ListNetworks" + StakingService_ListStakingTargets_FullMethodName = "/coinbase.staking.orchestration.v1.StakingService/ListStakingTargets" + StakingService_ListActions_FullMethodName = "/coinbase.staking.orchestration.v1.StakingService/ListActions" + StakingService_CreateWorkflow_FullMethodName = "/coinbase.staking.orchestration.v1.StakingService/CreateWorkflow" + StakingService_GetWorkflow_FullMethodName = "/coinbase.staking.orchestration.v1.StakingService/GetWorkflow" + StakingService_ListWorkflows_FullMethodName = "/coinbase.staking.orchestration.v1.StakingService/ListWorkflows" + StakingService_PerformWorkflowStep_FullMethodName = "/coinbase.staking.orchestration.v1.StakingService/PerformWorkflowStep" + StakingService_ViewStakingContext_FullMethodName = "/coinbase.staking.orchestration.v1.StakingService/ViewStakingContext" ) // StakingServiceClient is the client API for StakingService service. @@ -51,8 +50,6 @@ type StakingServiceClient interface { ListWorkflows(ctx context.Context, in *ListWorkflowsRequest, opts ...grpc.CallOption) (*ListWorkflowsResponse, error) // Perform the next step in a workflow. PerformWorkflowStep(ctx context.Context, in *PerformWorkflowStepRequest, opts ...grpc.CallOption) (*Workflow, error) - // Refresh the current step in a workflow. - RefreshWorkflowStep(ctx context.Context, in *RefreshWorkflowStepRequest, opts ...grpc.CallOption) (*Workflow, error) // View Staking context information given a specific network address. ViewStakingContext(ctx context.Context, in *ViewStakingContextRequest, opts ...grpc.CallOption) (*ViewStakingContextResponse, error) } @@ -137,15 +134,6 @@ func (c *stakingServiceClient) PerformWorkflowStep(ctx context.Context, in *Perf return out, nil } -func (c *stakingServiceClient) RefreshWorkflowStep(ctx context.Context, in *RefreshWorkflowStepRequest, opts ...grpc.CallOption) (*Workflow, error) { - out := new(Workflow) - err := c.cc.Invoke(ctx, StakingService_RefreshWorkflowStep_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *stakingServiceClient) ViewStakingContext(ctx context.Context, in *ViewStakingContextRequest, opts ...grpc.CallOption) (*ViewStakingContextResponse, error) { out := new(ViewStakingContextResponse) err := c.cc.Invoke(ctx, StakingService_ViewStakingContext_FullMethodName, in, out, opts...) @@ -175,8 +163,6 @@ type StakingServiceServer interface { ListWorkflows(context.Context, *ListWorkflowsRequest) (*ListWorkflowsResponse, error) // Perform the next step in a workflow. PerformWorkflowStep(context.Context, *PerformWorkflowStepRequest) (*Workflow, error) - // Refresh the current step in a workflow. - RefreshWorkflowStep(context.Context, *RefreshWorkflowStepRequest) (*Workflow, error) // View Staking context information given a specific network address. ViewStakingContext(context.Context, *ViewStakingContextRequest) (*ViewStakingContextResponse, error) mustEmbedUnimplementedStakingServiceServer() @@ -210,9 +196,6 @@ func (UnimplementedStakingServiceServer) ListWorkflows(context.Context, *ListWor func (UnimplementedStakingServiceServer) PerformWorkflowStep(context.Context, *PerformWorkflowStepRequest) (*Workflow, error) { return nil, status.Errorf(codes.Unimplemented, "method PerformWorkflowStep not implemented") } -func (UnimplementedStakingServiceServer) RefreshWorkflowStep(context.Context, *RefreshWorkflowStepRequest) (*Workflow, error) { - return nil, status.Errorf(codes.Unimplemented, "method RefreshWorkflowStep not implemented") -} func (UnimplementedStakingServiceServer) ViewStakingContext(context.Context, *ViewStakingContextRequest) (*ViewStakingContextResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ViewStakingContext not implemented") } @@ -373,24 +356,6 @@ func _StakingService_PerformWorkflowStep_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } -func _StakingService_RefreshWorkflowStep_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RefreshWorkflowStepRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StakingServiceServer).RefreshWorkflowStep(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: StakingService_RefreshWorkflowStep_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StakingServiceServer).RefreshWorkflowStep(ctx, req.(*RefreshWorkflowStepRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _StakingService_ViewStakingContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ViewStakingContextRequest) if err := dec(in); err != nil { @@ -413,7 +378,7 @@ func _StakingService_ViewStakingContext_Handler(srv interface{}, ctx context.Con // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var StakingService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "coinbase.staking.v1alpha1.StakingService", + ServiceName: "coinbase.staking.orchestration.v1.StakingService", HandlerType: (*StakingServiceServer)(nil), Methods: []grpc.MethodDesc{ { @@ -448,15 +413,11 @@ var StakingService_ServiceDesc = grpc.ServiceDesc{ MethodName: "PerformWorkflowStep", Handler: _StakingService_PerformWorkflowStep_Handler, }, - { - MethodName: "RefreshWorkflowStep", - Handler: _StakingService_RefreshWorkflowStep_Handler, - }, { MethodName: "ViewStakingContext", Handler: _StakingService_ViewStakingContext_Handler, }, }, Streams: []grpc.StreamDesc{}, - Metadata: "coinbase/staking/v1alpha1/api.proto", + Metadata: "coinbase/staking/orchestration/v1/api.proto", } diff --git a/gen/go/coinbase/staking/v1alpha1/common.pb.go b/gen/go/coinbase/staking/orchestration/v1/common.pb.go similarity index 55% rename from gen/go/coinbase/staking/v1alpha1/common.pb.go rename to gen/go/coinbase/staking/orchestration/v1/common.pb.go index 2a89c43..cf91781 100644 --- a/gen/go/coinbase/staking/v1alpha1/common.pb.go +++ b/gen/go/coinbase/staking/orchestration/v1/common.pb.go @@ -2,9 +2,9 @@ // versions: // protoc-gen-go v1.30.0 // protoc (unknown) -// source: coinbase/staking/v1alpha1/common.proto +// source: coinbase/staking/orchestration/v1/common.proto -package v1alpha1 +package v1 import ( _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" @@ -37,7 +37,7 @@ type Amount struct { func (x *Amount) Reset() { *x = Amount{} if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_common_proto_msgTypes[0] + mi := &file_coinbase_staking_orchestration_v1_common_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -50,7 +50,7 @@ func (x *Amount) String() string { func (*Amount) ProtoMessage() {} func (x *Amount) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_common_proto_msgTypes[0] + mi := &file_coinbase_staking_orchestration_v1_common_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63,7 +63,7 @@ func (x *Amount) ProtoReflect() protoreflect.Message { // Deprecated: Use Amount.ProtoReflect.Descriptor instead. func (*Amount) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_common_proto_rawDescGZIP(), []int{0} + return file_coinbase_staking_orchestration_v1_common_proto_rawDescGZIP(), []int{0} } func (x *Amount) GetValue() string { @@ -80,14 +80,15 @@ func (x *Amount) GetCurrency() string { return "" } -var File_coinbase_staking_v1alpha1_common_proto protoreflect.FileDescriptor +var File_coinbase_staking_orchestration_v1_common_proto protoreflect.FileDescriptor -var file_coinbase_staking_v1alpha1_common_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, +var file_coinbase_staking_orchestration_v1_common_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x21, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, @@ -96,31 +97,32 @@ var file_coinbase_staking_v1alpha1_common_proto_rawDesc = []byte{ 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0x92, 0x41, 0x1b, 0x32, 0x19, 0x54, 0x68, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x42, - 0x50, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x58, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( - file_coinbase_staking_v1alpha1_common_proto_rawDescOnce sync.Once - file_coinbase_staking_v1alpha1_common_proto_rawDescData = file_coinbase_staking_v1alpha1_common_proto_rawDesc + file_coinbase_staking_orchestration_v1_common_proto_rawDescOnce sync.Once + file_coinbase_staking_orchestration_v1_common_proto_rawDescData = file_coinbase_staking_orchestration_v1_common_proto_rawDesc ) -func file_coinbase_staking_v1alpha1_common_proto_rawDescGZIP() []byte { - file_coinbase_staking_v1alpha1_common_proto_rawDescOnce.Do(func() { - file_coinbase_staking_v1alpha1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_v1alpha1_common_proto_rawDescData) +func file_coinbase_staking_orchestration_v1_common_proto_rawDescGZIP() []byte { + file_coinbase_staking_orchestration_v1_common_proto_rawDescOnce.Do(func() { + file_coinbase_staking_orchestration_v1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_orchestration_v1_common_proto_rawDescData) }) - return file_coinbase_staking_v1alpha1_common_proto_rawDescData + return file_coinbase_staking_orchestration_v1_common_proto_rawDescData } -var file_coinbase_staking_v1alpha1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_coinbase_staking_v1alpha1_common_proto_goTypes = []interface{}{ - (*Amount)(nil), // 0: coinbase.staking.v1alpha1.Amount +var file_coinbase_staking_orchestration_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_coinbase_staking_orchestration_v1_common_proto_goTypes = []interface{}{ + (*Amount)(nil), // 0: coinbase.staking.orchestration.v1.Amount } -var file_coinbase_staking_v1alpha1_common_proto_depIdxs = []int32{ +var file_coinbase_staking_orchestration_v1_common_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -128,13 +130,13 @@ var file_coinbase_staking_v1alpha1_common_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_coinbase_staking_v1alpha1_common_proto_init() } -func file_coinbase_staking_v1alpha1_common_proto_init() { - if File_coinbase_staking_v1alpha1_common_proto != nil { +func init() { file_coinbase_staking_orchestration_v1_common_proto_init() } +func file_coinbase_staking_orchestration_v1_common_proto_init() { + if File_coinbase_staking_orchestration_v1_common_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_coinbase_staking_v1alpha1_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_coinbase_staking_orchestration_v1_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Amount); i { case 0: return &v.state @@ -151,18 +153,18 @@ func file_coinbase_staking_v1alpha1_common_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_coinbase_staking_v1alpha1_common_proto_rawDesc, + RawDescriptor: file_coinbase_staking_orchestration_v1_common_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_coinbase_staking_v1alpha1_common_proto_goTypes, - DependencyIndexes: file_coinbase_staking_v1alpha1_common_proto_depIdxs, - MessageInfos: file_coinbase_staking_v1alpha1_common_proto_msgTypes, + GoTypes: file_coinbase_staking_orchestration_v1_common_proto_goTypes, + DependencyIndexes: file_coinbase_staking_orchestration_v1_common_proto_depIdxs, + MessageInfos: file_coinbase_staking_orchestration_v1_common_proto_msgTypes, }.Build() - File_coinbase_staking_v1alpha1_common_proto = out.File - file_coinbase_staking_v1alpha1_common_proto_rawDesc = nil - file_coinbase_staking_v1alpha1_common_proto_goTypes = nil - file_coinbase_staking_v1alpha1_common_proto_depIdxs = nil + File_coinbase_staking_orchestration_v1_common_proto = out.File + file_coinbase_staking_orchestration_v1_common_proto_rawDesc = nil + file_coinbase_staking_orchestration_v1_common_proto_goTypes = nil + file_coinbase_staking_orchestration_v1_common_proto_depIdxs = nil } diff --git a/gen/go/coinbase/staking/orchestration/v1/ethereum_kiln.pb.go b/gen/go/coinbase/staking/orchestration/v1/ethereum_kiln.pb.go new file mode 100644 index 0000000..2d79b55 --- /dev/null +++ b/gen/go/coinbase/staking/orchestration/v1/ethereum_kiln.pb.go @@ -0,0 +1,761 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: coinbase/staking/orchestration/v1/ethereum_kiln.proto + +package v1 + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The parameters required for the stake action on Ethereum Kiln. +type EthereumKilnStakeParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address you wish to stake from. + StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` + // The address of the integrator contract. + IntegratorContractAddress string `protobuf:"bytes,2,opt,name=integrator_contract_address,json=integratorContractAddress,proto3" json:"integrator_contract_address,omitempty"` + // The amount of Ethereum to stake in wei. + Amount *Amount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *EthereumKilnStakeParameters) Reset() { + *x = EthereumKilnStakeParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EthereumKilnStakeParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumKilnStakeParameters) ProtoMessage() {} + +func (x *EthereumKilnStakeParameters) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumKilnStakeParameters.ProtoReflect.Descriptor instead. +func (*EthereumKilnStakeParameters) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDescGZIP(), []int{0} +} + +func (x *EthereumKilnStakeParameters) GetStakerAddress() string { + if x != nil { + return x.StakerAddress + } + return "" +} + +func (x *EthereumKilnStakeParameters) GetIntegratorContractAddress() string { + if x != nil { + return x.IntegratorContractAddress + } + return "" +} + +func (x *EthereumKilnStakeParameters) GetAmount() *Amount { + if x != nil { + return x.Amount + } + return nil +} + +// The parameters required for the unstake action on Ethereum Kiln. +type EthereumKilnUnstakeParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address you wish to unstake from. + StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` + // The address of the integrator contract. + IntegratorContractAddress string `protobuf:"bytes,2,opt,name=integrator_contract_address,json=integratorContractAddress,proto3" json:"integrator_contract_address,omitempty"` + // The amount of Ethereum to unstake in wei. + Amount *Amount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *EthereumKilnUnstakeParameters) Reset() { + *x = EthereumKilnUnstakeParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EthereumKilnUnstakeParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumKilnUnstakeParameters) ProtoMessage() {} + +func (x *EthereumKilnUnstakeParameters) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumKilnUnstakeParameters.ProtoReflect.Descriptor instead. +func (*EthereumKilnUnstakeParameters) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDescGZIP(), []int{1} +} + +func (x *EthereumKilnUnstakeParameters) GetStakerAddress() string { + if x != nil { + return x.StakerAddress + } + return "" +} + +func (x *EthereumKilnUnstakeParameters) GetIntegratorContractAddress() string { + if x != nil { + return x.IntegratorContractAddress + } + return "" +} + +func (x *EthereumKilnUnstakeParameters) GetAmount() *Amount { + if x != nil { + return x.Amount + } + return nil +} + +// The parameters required for the claim stake action on Ethereum Kiln. +type EthereumKilnClaimStakeParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address you wish to claim stake for. + StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` + // The address of the integrator contract + IntegratorContractAddress string `protobuf:"bytes,2,opt,name=integrator_contract_address,json=integratorContractAddress,proto3" json:"integrator_contract_address,omitempty"` +} + +func (x *EthereumKilnClaimStakeParameters) Reset() { + *x = EthereumKilnClaimStakeParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EthereumKilnClaimStakeParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumKilnClaimStakeParameters) ProtoMessage() {} + +func (x *EthereumKilnClaimStakeParameters) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumKilnClaimStakeParameters.ProtoReflect.Descriptor instead. +func (*EthereumKilnClaimStakeParameters) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDescGZIP(), []int{2} +} + +func (x *EthereumKilnClaimStakeParameters) GetStakerAddress() string { + if x != nil { + return x.StakerAddress + } + return "" +} + +func (x *EthereumKilnClaimStakeParameters) GetIntegratorContractAddress() string { + if x != nil { + return x.IntegratorContractAddress + } + return "" +} + +// The parameters needed for staking on Ethereum via Kiln. +type EthereumKilnStakingParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Parameters: + // + // *EthereumKilnStakingParameters_StakeParameters + // *EthereumKilnStakingParameters_UnstakeParameters + // *EthereumKilnStakingParameters_ClaimStakeParameters + Parameters isEthereumKilnStakingParameters_Parameters `protobuf_oneof:"parameters"` +} + +func (x *EthereumKilnStakingParameters) Reset() { + *x = EthereumKilnStakingParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EthereumKilnStakingParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumKilnStakingParameters) ProtoMessage() {} + +func (x *EthereumKilnStakingParameters) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumKilnStakingParameters.ProtoReflect.Descriptor instead. +func (*EthereumKilnStakingParameters) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDescGZIP(), []int{3} +} + +func (m *EthereumKilnStakingParameters) GetParameters() isEthereumKilnStakingParameters_Parameters { + if m != nil { + return m.Parameters + } + return nil +} + +func (x *EthereumKilnStakingParameters) GetStakeParameters() *EthereumKilnStakeParameters { + if x, ok := x.GetParameters().(*EthereumKilnStakingParameters_StakeParameters); ok { + return x.StakeParameters + } + return nil +} + +func (x *EthereumKilnStakingParameters) GetUnstakeParameters() *EthereumKilnUnstakeParameters { + if x, ok := x.GetParameters().(*EthereumKilnStakingParameters_UnstakeParameters); ok { + return x.UnstakeParameters + } + return nil +} + +func (x *EthereumKilnStakingParameters) GetClaimStakeParameters() *EthereumKilnClaimStakeParameters { + if x, ok := x.GetParameters().(*EthereumKilnStakingParameters_ClaimStakeParameters); ok { + return x.ClaimStakeParameters + } + return nil +} + +type isEthereumKilnStakingParameters_Parameters interface { + isEthereumKilnStakingParameters_Parameters() +} + +type EthereumKilnStakingParameters_StakeParameters struct { + // The parameters for stake action on Ethereum Kiln. + StakeParameters *EthereumKilnStakeParameters `protobuf:"bytes,1,opt,name=stake_parameters,json=stakeParameters,proto3,oneof"` +} + +type EthereumKilnStakingParameters_UnstakeParameters struct { + // The parameters for unstake action on Ethereum Kiln. + UnstakeParameters *EthereumKilnUnstakeParameters `protobuf:"bytes,2,opt,name=unstake_parameters,json=unstakeParameters,proto3,oneof"` +} + +type EthereumKilnStakingParameters_ClaimStakeParameters struct { + // The parameters for claim stake action on Ethereum Kiln. + ClaimStakeParameters *EthereumKilnClaimStakeParameters `protobuf:"bytes,4,opt,name=claim_stake_parameters,json=claimStakeParameters,proto3,oneof"` +} + +func (*EthereumKilnStakingParameters_StakeParameters) isEthereumKilnStakingParameters_Parameters() {} + +func (*EthereumKilnStakingParameters_UnstakeParameters) isEthereumKilnStakingParameters_Parameters() { +} + +func (*EthereumKilnStakingParameters_ClaimStakeParameters) isEthereumKilnStakingParameters_Parameters() { +} + +// The protocol specific parameters required for fetching a staking context. +type EthereumKilnStakingContextParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Integrator contract address. + IntegratorContractAddress string `protobuf:"bytes,1,opt,name=integrator_contract_address,json=integratorContractAddress,proto3" json:"integrator_contract_address,omitempty"` +} + +func (x *EthereumKilnStakingContextParameters) Reset() { + *x = EthereumKilnStakingContextParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EthereumKilnStakingContextParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumKilnStakingContextParameters) ProtoMessage() {} + +func (x *EthereumKilnStakingContextParameters) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumKilnStakingContextParameters.ProtoReflect.Descriptor instead. +func (*EthereumKilnStakingContextParameters) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDescGZIP(), []int{4} +} + +func (x *EthereumKilnStakingContextParameters) GetIntegratorContractAddress() string { + if x != nil { + return x.IntegratorContractAddress + } + return "" +} + +// The protocol specific details for an Ethereum Kiln staking context. +type EthereumKilnStakingContextDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The Ethereum balance of the address. + // This can be used to gate the stake action to make sure the requested stake amount + // is less than ethereum_balance. + EthereumBalance *Amount `protobuf:"bytes,1,opt,name=ethereum_balance,json=ethereumBalance,proto3" json:"ethereum_balance,omitempty"` + // The number of integrator shares owned by the address. + IntegratorShareBalance *Amount `protobuf:"bytes,2,opt,name=integrator_share_balance,json=integratorShareBalance,proto3" json:"integrator_share_balance,omitempty"` + // The total Ethereum you can exchange for your integrator shares. + // This can be used to gate the unstake action to make sure the requested unstake amount + // is less than integrator_share_underlying_balance + IntegratorShareUnderlyingBalance *Amount `protobuf:"bytes,3,opt,name=integrator_share_underlying_balance,json=integratorShareUnderlyingBalance,proto3" json:"integrator_share_underlying_balance,omitempty"` + // The total amount of Ethereum you can redeem for all non-claimed vPool shares. + // This along with the condition total_shares_pending_exit == fulfillable_share_count + // can be used to gate the claim_stake action. + TotalExitableEth *Amount `protobuf:"bytes,4,opt,name=total_exitable_eth,json=totalExitableEth,proto3" json:"total_exitable_eth,omitempty"` + // The number of vPool shares are eligible to receive now or at a later point in time. + TotalSharesPendingExit *Amount `protobuf:"bytes,5,opt,name=total_shares_pending_exit,json=totalSharesPendingExit,proto3" json:"total_shares_pending_exit,omitempty"` + // The number of vPool shares you are able to claim now. + FulfillableShareCount *Amount `protobuf:"bytes,6,opt,name=fulfillable_share_count,json=fulfillableShareCount,proto3" json:"fulfillable_share_count,omitempty"` +} + +func (x *EthereumKilnStakingContextDetails) Reset() { + *x = EthereumKilnStakingContextDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EthereumKilnStakingContextDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EthereumKilnStakingContextDetails) ProtoMessage() {} + +func (x *EthereumKilnStakingContextDetails) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EthereumKilnStakingContextDetails.ProtoReflect.Descriptor instead. +func (*EthereumKilnStakingContextDetails) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDescGZIP(), []int{5} +} + +func (x *EthereumKilnStakingContextDetails) GetEthereumBalance() *Amount { + if x != nil { + return x.EthereumBalance + } + return nil +} + +func (x *EthereumKilnStakingContextDetails) GetIntegratorShareBalance() *Amount { + if x != nil { + return x.IntegratorShareBalance + } + return nil +} + +func (x *EthereumKilnStakingContextDetails) GetIntegratorShareUnderlyingBalance() *Amount { + if x != nil { + return x.IntegratorShareUnderlyingBalance + } + return nil +} + +func (x *EthereumKilnStakingContextDetails) GetTotalExitableEth() *Amount { + if x != nil { + return x.TotalExitableEth + } + return nil +} + +func (x *EthereumKilnStakingContextDetails) GetTotalSharesPendingExit() *Amount { + if x != nil { + return x.TotalSharesPendingExit + } + return nil +} + +func (x *EthereumKilnStakingContextDetails) GetFulfillableShareCount() *Amount { + if x != nil { + return x.FulfillableShareCount + } + return nil +} + +var File_coinbase_staking_orchestration_v1_ethereum_kiln_proto protoreflect.FileDescriptor + +var file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDesc = []byte{ + 0x0a, 0x35, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x69, 0x6c, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x2e, 0x63, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, + 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, + 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, + 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfd, 0x01, 0x0a, 0x1b, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x0e, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x1b, 0x69, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, + 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x25, 0x92, 0x41, 0x22, 0x0a, 0x20, 0x2a, 0x1e, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x3a, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x65, + 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x81, 0x02, 0x0a, 0x1d, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x55, 0x6e, 0x73, 0x74, + 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, + 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x6b, + 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x1b, 0x69, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x27, 0x92, 0x41, 0x24, 0x0a, 0x22, 0x2a, 0x20, 0x45, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x3a, 0x20, 0x55, 0x6e, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, + 0xc0, 0x01, 0x0a, 0x20, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, + 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x43, 0x0a, 0x1b, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x19, 0x69, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x2b, 0x92, 0x41, 0x28, 0x0a, 0x26, 0x2a, 0x24, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x3a, 0x20, 0x43, 0x6c, 0x61, 0x69, + 0x6d, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x22, 0xb9, 0x03, 0x0a, 0x1d, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, + 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x6b, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, + 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, + 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, 0x00, + 0x52, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x71, 0x0a, 0x12, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, + 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x55, 0x6e, + 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, + 0x00, 0x52, 0x11, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x7b, 0x0a, 0x16, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x73, 0x74, + 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x14, 0x63, 0x6c, 0x61, + 0x69, 0x6d, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x3a, 0x27, 0x92, 0x41, 0x24, 0x0a, 0x22, 0x2a, 0x20, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x3a, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x97, + 0x01, 0x0a, 0x24, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x1b, 0x69, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x69, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x2f, 0x92, 0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x28, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x3a, 0x20, 0x53, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xa8, 0x05, 0x0a, 0x21, 0x45, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x54, + 0x0a, 0x10, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, + 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x18, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x68, 0x61, + 0x72, 0x65, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x23, 0x69, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x75, 0x6e, + 0x64, 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x68, 0x61, + 0x72, 0x65, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x12, 0x57, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x69, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x65, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x45, 0x78, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x74, 0x68, 0x12, 0x64, 0x0a, 0x19, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x16, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x78, + 0x69, 0x74, 0x12, 0x61, 0x0a, 0x17, 0x66, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x15, + 0x66, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x2c, 0x92, 0x41, 0x29, 0x0a, 0x27, 0x2a, 0x25, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x3a, 0x20, 0x53, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x42, 0x58, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, + 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, + 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDescOnce sync.Once + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDescData = file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDesc +) + +func file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDescGZIP() []byte { + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDescOnce.Do(func() { + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDescData) + }) + return file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDescData +} + +var file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_goTypes = []interface{}{ + (*EthereumKilnStakeParameters)(nil), // 0: coinbase.staking.orchestration.v1.EthereumKilnStakeParameters + (*EthereumKilnUnstakeParameters)(nil), // 1: coinbase.staking.orchestration.v1.EthereumKilnUnstakeParameters + (*EthereumKilnClaimStakeParameters)(nil), // 2: coinbase.staking.orchestration.v1.EthereumKilnClaimStakeParameters + (*EthereumKilnStakingParameters)(nil), // 3: coinbase.staking.orchestration.v1.EthereumKilnStakingParameters + (*EthereumKilnStakingContextParameters)(nil), // 4: coinbase.staking.orchestration.v1.EthereumKilnStakingContextParameters + (*EthereumKilnStakingContextDetails)(nil), // 5: coinbase.staking.orchestration.v1.EthereumKilnStakingContextDetails + (*Amount)(nil), // 6: coinbase.staking.orchestration.v1.Amount +} +var file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_depIdxs = []int32{ + 6, // 0: coinbase.staking.orchestration.v1.EthereumKilnStakeParameters.amount:type_name -> coinbase.staking.orchestration.v1.Amount + 6, // 1: coinbase.staking.orchestration.v1.EthereumKilnUnstakeParameters.amount:type_name -> coinbase.staking.orchestration.v1.Amount + 0, // 2: coinbase.staking.orchestration.v1.EthereumKilnStakingParameters.stake_parameters:type_name -> coinbase.staking.orchestration.v1.EthereumKilnStakeParameters + 1, // 3: coinbase.staking.orchestration.v1.EthereumKilnStakingParameters.unstake_parameters:type_name -> coinbase.staking.orchestration.v1.EthereumKilnUnstakeParameters + 2, // 4: coinbase.staking.orchestration.v1.EthereumKilnStakingParameters.claim_stake_parameters:type_name -> coinbase.staking.orchestration.v1.EthereumKilnClaimStakeParameters + 6, // 5: coinbase.staking.orchestration.v1.EthereumKilnStakingContextDetails.ethereum_balance:type_name -> coinbase.staking.orchestration.v1.Amount + 6, // 6: coinbase.staking.orchestration.v1.EthereumKilnStakingContextDetails.integrator_share_balance:type_name -> coinbase.staking.orchestration.v1.Amount + 6, // 7: coinbase.staking.orchestration.v1.EthereumKilnStakingContextDetails.integrator_share_underlying_balance:type_name -> coinbase.staking.orchestration.v1.Amount + 6, // 8: coinbase.staking.orchestration.v1.EthereumKilnStakingContextDetails.total_exitable_eth:type_name -> coinbase.staking.orchestration.v1.Amount + 6, // 9: coinbase.staking.orchestration.v1.EthereumKilnStakingContextDetails.total_shares_pending_exit:type_name -> coinbase.staking.orchestration.v1.Amount + 6, // 10: coinbase.staking.orchestration.v1.EthereumKilnStakingContextDetails.fulfillable_share_count:type_name -> coinbase.staking.orchestration.v1.Amount + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_init() } +func file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_init() { + if File_coinbase_staking_orchestration_v1_ethereum_kiln_proto != nil { + return + } + file_coinbase_staking_orchestration_v1_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthereumKilnStakeParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthereumKilnUnstakeParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthereumKilnClaimStakeParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthereumKilnStakingParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthereumKilnStakingContextParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EthereumKilnStakingContextDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*EthereumKilnStakingParameters_StakeParameters)(nil), + (*EthereumKilnStakingParameters_UnstakeParameters)(nil), + (*EthereumKilnStakingParameters_ClaimStakeParameters)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_goTypes, + DependencyIndexes: file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_depIdxs, + MessageInfos: file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_msgTypes, + }.Build() + File_coinbase_staking_orchestration_v1_ethereum_kiln_proto = out.File + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_rawDesc = nil + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_goTypes = nil + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_depIdxs = nil +} diff --git a/gen/go/coinbase/staking/orchestration/v1/network.pb.go b/gen/go/coinbase/staking/orchestration/v1/network.pb.go new file mode 100644 index 0000000..0150098 --- /dev/null +++ b/gen/go/coinbase/staking/orchestration/v1/network.pb.go @@ -0,0 +1,303 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: coinbase/staking/orchestration/v1/network.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A Network resource represents a blockchain network e.g. mainnet, testnet, etc. +type Network struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the Network. + // Format: protocols/{protocolName}/networks/{networkName} + // Ex: protocols/ethereum_kiln/networks/holesky + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Network) Reset() { + *x = Network{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_network_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Network) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Network) ProtoMessage() {} + +func (x *Network) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_network_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Network.ProtoReflect.Descriptor instead. +func (*Network) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_network_proto_rawDescGZIP(), []int{0} +} + +func (x *Network) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request message for ListNetworks. +type ListNetworksRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the parent that owns + // the collection of networks. + // Format: protocols/{protocol} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` +} + +func (x *ListNetworksRequest) Reset() { + *x = ListNetworksRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_network_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNetworksRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNetworksRequest) ProtoMessage() {} + +func (x *ListNetworksRequest) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_network_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNetworksRequest.ProtoReflect.Descriptor instead. +func (*ListNetworksRequest) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_network_proto_rawDescGZIP(), []int{1} +} + +func (x *ListNetworksRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +// The response message for ListNetworks. +type ListNetworksResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of networks. + Networks []*Network `protobuf:"bytes,1,rep,name=networks,proto3" json:"networks,omitempty"` +} + +func (x *ListNetworksResponse) Reset() { + *x = ListNetworksResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_network_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNetworksResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNetworksResponse) ProtoMessage() {} + +func (x *ListNetworksResponse) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_network_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNetworksResponse.ProtoReflect.Descriptor instead. +func (*ListNetworksResponse) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_network_proto_rawDescGZIP(), []int{2} +} + +func (x *ListNetworksResponse) GetNetworks() []*Network { + if x != nil { + return x.Networks + } + return nil +} + +var File_coinbase_staking_orchestration_v1_network_proto protoreflect.FileDescriptor + +var file_coinbase_staking_orchestration_v1_network_proto_rawDesc = []byte{ + 0x0a, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x21, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x82, 0x01, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x3a, 0x5d, 0xea, 0x41, 0x5a, 0x0a, 0x1c, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x63, + 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x12, 0x27, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x7d, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x73, 0x2f, 0x7b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x7d, 0x2a, 0x08, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x32, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x4a, + 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x53, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x1e, 0x12, 0x1c, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, + 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x5e, 0x0a, 0x14, 0x4c, 0x69, + 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x46, 0x0a, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x52, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x42, 0x58, 0x5a, 0x56, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_coinbase_staking_orchestration_v1_network_proto_rawDescOnce sync.Once + file_coinbase_staking_orchestration_v1_network_proto_rawDescData = file_coinbase_staking_orchestration_v1_network_proto_rawDesc +) + +func file_coinbase_staking_orchestration_v1_network_proto_rawDescGZIP() []byte { + file_coinbase_staking_orchestration_v1_network_proto_rawDescOnce.Do(func() { + file_coinbase_staking_orchestration_v1_network_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_orchestration_v1_network_proto_rawDescData) + }) + return file_coinbase_staking_orchestration_v1_network_proto_rawDescData +} + +var file_coinbase_staking_orchestration_v1_network_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_coinbase_staking_orchestration_v1_network_proto_goTypes = []interface{}{ + (*Network)(nil), // 0: coinbase.staking.orchestration.v1.Network + (*ListNetworksRequest)(nil), // 1: coinbase.staking.orchestration.v1.ListNetworksRequest + (*ListNetworksResponse)(nil), // 2: coinbase.staking.orchestration.v1.ListNetworksResponse +} +var file_coinbase_staking_orchestration_v1_network_proto_depIdxs = []int32{ + 0, // 0: coinbase.staking.orchestration.v1.ListNetworksResponse.networks:type_name -> coinbase.staking.orchestration.v1.Network + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_coinbase_staking_orchestration_v1_network_proto_init() } +func file_coinbase_staking_orchestration_v1_network_proto_init() { + if File_coinbase_staking_orchestration_v1_network_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_coinbase_staking_orchestration_v1_network_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Network); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_network_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNetworksRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_network_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNetworksResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_coinbase_staking_orchestration_v1_network_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_coinbase_staking_orchestration_v1_network_proto_goTypes, + DependencyIndexes: file_coinbase_staking_orchestration_v1_network_proto_depIdxs, + MessageInfos: file_coinbase_staking_orchestration_v1_network_proto_msgTypes, + }.Build() + File_coinbase_staking_orchestration_v1_network_proto = out.File + file_coinbase_staking_orchestration_v1_network_proto_rawDesc = nil + file_coinbase_staking_orchestration_v1_network_proto_goTypes = nil + file_coinbase_staking_orchestration_v1_network_proto_depIdxs = nil +} diff --git a/gen/go/coinbase/staking/v1alpha1/network_aip.go b/gen/go/coinbase/staking/orchestration/v1/network_aip.go similarity index 95% rename from gen/go/coinbase/staking/v1alpha1/network_aip.go rename to gen/go/coinbase/staking/orchestration/v1/network_aip.go index 0194383..684b698 100644 --- a/gen/go/coinbase/staking/v1alpha1/network_aip.go +++ b/gen/go/coinbase/staking/orchestration/v1/network_aip.go @@ -3,9 +3,9 @@ // versions: // protoc-gen-go-aip development // protoc (unknown) -// source: coinbase/staking/v1alpha1/network.proto +// source: coinbase/staking/orchestration/v1/network.proto -package v1alpha1 +package v1 import ( fmt "fmt" diff --git a/gen/go/coinbase/staking/v1alpha1/protocol.pb.go b/gen/go/coinbase/staking/orchestration/v1/protocol.pb.go similarity index 54% rename from gen/go/coinbase/staking/v1alpha1/protocol.pb.go rename to gen/go/coinbase/staking/orchestration/v1/protocol.pb.go index f708e69..b1e8add 100644 --- a/gen/go/coinbase/staking/v1alpha1/protocol.pb.go +++ b/gen/go/coinbase/staking/orchestration/v1/protocol.pb.go @@ -2,9 +2,9 @@ // versions: // protoc-gen-go v1.30.0 // protoc (unknown) -// source: coinbase/staking/v1alpha1/protocol.proto +// source: coinbase/staking/orchestration/v1/protocol.proto -package v1alpha1 +package v1 import ( _ "google.golang.org/genproto/googleapis/api/annotations" @@ -21,7 +21,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// A Protocol resource (e.g. polygon, ethereum, etc.). +// A Protocol resource (e.g. ethereum_kiln, solana etc.). type Protocol struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -29,14 +29,14 @@ type Protocol struct { // The resource name of the Protocol. // Format: protocols/{protocolName} - // Ex: protocols/polygon + // Ex: protocols/ethereum_kiln Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } func (x *Protocol) Reset() { *x = Protocol{} if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_protocol_proto_msgTypes[0] + mi := &file_coinbase_staking_orchestration_v1_protocol_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -49,7 +49,7 @@ func (x *Protocol) String() string { func (*Protocol) ProtoMessage() {} func (x *Protocol) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_protocol_proto_msgTypes[0] + mi := &file_coinbase_staking_orchestration_v1_protocol_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62,7 +62,7 @@ func (x *Protocol) ProtoReflect() protoreflect.Message { // Deprecated: Use Protocol.ProtoReflect.Descriptor instead. func (*Protocol) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_protocol_proto_rawDescGZIP(), []int{0} + return file_coinbase_staking_orchestration_v1_protocol_proto_rawDescGZIP(), []int{0} } func (x *Protocol) GetName() string { @@ -82,7 +82,7 @@ type ListProtocolsRequest struct { func (x *ListProtocolsRequest) Reset() { *x = ListProtocolsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_protocol_proto_msgTypes[1] + mi := &file_coinbase_staking_orchestration_v1_protocol_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -95,7 +95,7 @@ func (x *ListProtocolsRequest) String() string { func (*ListProtocolsRequest) ProtoMessage() {} func (x *ListProtocolsRequest) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_protocol_proto_msgTypes[1] + mi := &file_coinbase_staking_orchestration_v1_protocol_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -108,7 +108,7 @@ func (x *ListProtocolsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListProtocolsRequest.ProtoReflect.Descriptor instead. func (*ListProtocolsRequest) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_protocol_proto_rawDescGZIP(), []int{1} + return file_coinbase_staking_orchestration_v1_protocol_proto_rawDescGZIP(), []int{1} } // The response message for ListProtocols. @@ -124,7 +124,7 @@ type ListProtocolsResponse struct { func (x *ListProtocolsResponse) Reset() { *x = ListProtocolsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_protocol_proto_msgTypes[2] + mi := &file_coinbase_staking_orchestration_v1_protocol_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -137,7 +137,7 @@ func (x *ListProtocolsResponse) String() string { func (*ListProtocolsResponse) ProtoMessage() {} func (x *ListProtocolsResponse) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_protocol_proto_msgTypes[2] + mi := &file_coinbase_staking_orchestration_v1_protocol_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -150,7 +150,7 @@ func (x *ListProtocolsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListProtocolsResponse.ProtoReflect.Descriptor instead. func (*ListProtocolsResponse) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_protocol_proto_rawDescGZIP(), []int{2} + return file_coinbase_staking_orchestration_v1_protocol_proto_rawDescGZIP(), []int{2} } func (x *ListProtocolsResponse) GetProtocols() []*Protocol { @@ -160,14 +160,15 @@ func (x *ListProtocolsResponse) GetProtocols() []*Protocol { return nil } -var File_coinbase_staking_v1alpha1_protocol_proto protoreflect.FileDescriptor +var File_coinbase_staking_orchestration_v1_protocol_proto protoreflect.FileDescriptor -var file_coinbase_staking_v1alpha1_protocol_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, +var file_coinbase_staking_orchestration_v1_protocol_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x21, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6d, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, @@ -177,40 +178,41 @@ var file_coinbase_staking_v1alpha1_protocol_proto_rawDesc = []byte{ 0x7b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x7d, 0x2a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x32, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x16, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5a, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x62, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x41, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x73, 0x42, 0x50, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, - 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x49, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x42, 0x58, 0x5a, 0x56, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, + 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_coinbase_staking_v1alpha1_protocol_proto_rawDescOnce sync.Once - file_coinbase_staking_v1alpha1_protocol_proto_rawDescData = file_coinbase_staking_v1alpha1_protocol_proto_rawDesc + file_coinbase_staking_orchestration_v1_protocol_proto_rawDescOnce sync.Once + file_coinbase_staking_orchestration_v1_protocol_proto_rawDescData = file_coinbase_staking_orchestration_v1_protocol_proto_rawDesc ) -func file_coinbase_staking_v1alpha1_protocol_proto_rawDescGZIP() []byte { - file_coinbase_staking_v1alpha1_protocol_proto_rawDescOnce.Do(func() { - file_coinbase_staking_v1alpha1_protocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_v1alpha1_protocol_proto_rawDescData) +func file_coinbase_staking_orchestration_v1_protocol_proto_rawDescGZIP() []byte { + file_coinbase_staking_orchestration_v1_protocol_proto_rawDescOnce.Do(func() { + file_coinbase_staking_orchestration_v1_protocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_orchestration_v1_protocol_proto_rawDescData) }) - return file_coinbase_staking_v1alpha1_protocol_proto_rawDescData + return file_coinbase_staking_orchestration_v1_protocol_proto_rawDescData } -var file_coinbase_staking_v1alpha1_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_coinbase_staking_v1alpha1_protocol_proto_goTypes = []interface{}{ - (*Protocol)(nil), // 0: coinbase.staking.v1alpha1.Protocol - (*ListProtocolsRequest)(nil), // 1: coinbase.staking.v1alpha1.ListProtocolsRequest - (*ListProtocolsResponse)(nil), // 2: coinbase.staking.v1alpha1.ListProtocolsResponse +var file_coinbase_staking_orchestration_v1_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_coinbase_staking_orchestration_v1_protocol_proto_goTypes = []interface{}{ + (*Protocol)(nil), // 0: coinbase.staking.orchestration.v1.Protocol + (*ListProtocolsRequest)(nil), // 1: coinbase.staking.orchestration.v1.ListProtocolsRequest + (*ListProtocolsResponse)(nil), // 2: coinbase.staking.orchestration.v1.ListProtocolsResponse } -var file_coinbase_staking_v1alpha1_protocol_proto_depIdxs = []int32{ - 0, // 0: coinbase.staking.v1alpha1.ListProtocolsResponse.protocols:type_name -> coinbase.staking.v1alpha1.Protocol +var file_coinbase_staking_orchestration_v1_protocol_proto_depIdxs = []int32{ + 0, // 0: coinbase.staking.orchestration.v1.ListProtocolsResponse.protocols:type_name -> coinbase.staking.orchestration.v1.Protocol 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -218,13 +220,13 @@ var file_coinbase_staking_v1alpha1_protocol_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_coinbase_staking_v1alpha1_protocol_proto_init() } -func file_coinbase_staking_v1alpha1_protocol_proto_init() { - if File_coinbase_staking_v1alpha1_protocol_proto != nil { +func init() { file_coinbase_staking_orchestration_v1_protocol_proto_init() } +func file_coinbase_staking_orchestration_v1_protocol_proto_init() { + if File_coinbase_staking_orchestration_v1_protocol_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_coinbase_staking_v1alpha1_protocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_coinbase_staking_orchestration_v1_protocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Protocol); i { case 0: return &v.state @@ -236,7 +238,7 @@ func file_coinbase_staking_v1alpha1_protocol_proto_init() { return nil } } - file_coinbase_staking_v1alpha1_protocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_coinbase_staking_orchestration_v1_protocol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListProtocolsRequest); i { case 0: return &v.state @@ -248,7 +250,7 @@ func file_coinbase_staking_v1alpha1_protocol_proto_init() { return nil } } - file_coinbase_staking_v1alpha1_protocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_coinbase_staking_orchestration_v1_protocol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListProtocolsResponse); i { case 0: return &v.state @@ -265,18 +267,18 @@ func file_coinbase_staking_v1alpha1_protocol_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_coinbase_staking_v1alpha1_protocol_proto_rawDesc, + RawDescriptor: file_coinbase_staking_orchestration_v1_protocol_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_coinbase_staking_v1alpha1_protocol_proto_goTypes, - DependencyIndexes: file_coinbase_staking_v1alpha1_protocol_proto_depIdxs, - MessageInfos: file_coinbase_staking_v1alpha1_protocol_proto_msgTypes, + GoTypes: file_coinbase_staking_orchestration_v1_protocol_proto_goTypes, + DependencyIndexes: file_coinbase_staking_orchestration_v1_protocol_proto_depIdxs, + MessageInfos: file_coinbase_staking_orchestration_v1_protocol_proto_msgTypes, }.Build() - File_coinbase_staking_v1alpha1_protocol_proto = out.File - file_coinbase_staking_v1alpha1_protocol_proto_rawDesc = nil - file_coinbase_staking_v1alpha1_protocol_proto_goTypes = nil - file_coinbase_staking_v1alpha1_protocol_proto_depIdxs = nil + File_coinbase_staking_orchestration_v1_protocol_proto = out.File + file_coinbase_staking_orchestration_v1_protocol_proto_rawDesc = nil + file_coinbase_staking_orchestration_v1_protocol_proto_goTypes = nil + file_coinbase_staking_orchestration_v1_protocol_proto_depIdxs = nil } diff --git a/gen/go/coinbase/staking/orchestration/v1/protocol_aip.go b/gen/go/coinbase/staking/orchestration/v1/protocol_aip.go new file mode 100644 index 0000000..302c422 --- /dev/null +++ b/gen/go/coinbase/staking/orchestration/v1/protocol_aip.go @@ -0,0 +1,54 @@ +// Code generated by protoc-gen-go-aip. DO NOT EDIT. +// +// versions: +// protoc-gen-go-aip development +// protoc (unknown) +// source: coinbase/staking/orchestration/v1/protocol.proto + +package v1 + +import ( + fmt "fmt" + resourcename "go.einride.tech/aip/resourcename" + strings "strings" +) + +type ProtocolResourceName struct { + Protocol string +} + +func (n ProtocolResourceName) Validate() error { + if n.Protocol == "" { + return fmt.Errorf("protocol: empty") + } + if strings.IndexByte(n.Protocol, '/') != -1 { + return fmt.Errorf("protocol: contains illegal character '/'") + } + return nil +} + +func (n ProtocolResourceName) ContainsWildcard() bool { + return false || n.Protocol == "-" +} + +func (n ProtocolResourceName) String() string { + return resourcename.Sprint( + "protocols/{protocol}", + n.Protocol, + ) +} + +func (n ProtocolResourceName) MarshalString() (string, error) { + if err := n.Validate(); err != nil { + return "", err + } + return n.String(), nil +} + +func (n *ProtocolResourceName) UnmarshalString(name string) error { + return resourcename.Sscan( + name, + "protocols/{protocol}", + &n.Protocol, + ) +} diff --git a/gen/go/coinbase/staking/orchestration/v1/solana.pb.go b/gen/go/coinbase/staking/orchestration/v1/solana.pb.go new file mode 100644 index 0000000..24b9d04 --- /dev/null +++ b/gen/go/coinbase/staking/orchestration/v1/solana.pb.go @@ -0,0 +1,1039 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: coinbase/staking/orchestration/v1/solana.proto + +package v1 + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Represents the different states a stake account balance can have. +// Used to check to see if stake is actively earning rewards or ready to be withdrawn. +type StakeAccount_BalanceState int32 + +const ( + // The balance is not known. + StakeAccount_BALANCE_STATE_UNSPECIFIED StakeAccount_BalanceState = 0 + // The balance is not actively staking. + StakeAccount_BALANCE_STATE_INACTIVE StakeAccount_BalanceState = 1 + // The balance is in a warm up period and will activate in the next epoch. + StakeAccount_BALANCE_STATE_ACTIVATING StakeAccount_BalanceState = 2 + // The balance is actively staking and earning rewards. + StakeAccount_BALANCE_STATE_ACTIVE StakeAccount_BalanceState = 3 + // The balance is in a cool down period and will be deactivated in the next epoch. + StakeAccount_BALANCE_STATE_DEACTIVATING StakeAccount_BalanceState = 4 +) + +// Enum value maps for StakeAccount_BalanceState. +var ( + StakeAccount_BalanceState_name = map[int32]string{ + 0: "BALANCE_STATE_UNSPECIFIED", + 1: "BALANCE_STATE_INACTIVE", + 2: "BALANCE_STATE_ACTIVATING", + 3: "BALANCE_STATE_ACTIVE", + 4: "BALANCE_STATE_DEACTIVATING", + } + StakeAccount_BalanceState_value = map[string]int32{ + "BALANCE_STATE_UNSPECIFIED": 0, + "BALANCE_STATE_INACTIVE": 1, + "BALANCE_STATE_ACTIVATING": 2, + "BALANCE_STATE_ACTIVE": 3, + "BALANCE_STATE_DEACTIVATING": 4, + } +) + +func (x StakeAccount_BalanceState) Enum() *StakeAccount_BalanceState { + p := new(StakeAccount_BalanceState) + *p = x + return p +} + +func (x StakeAccount_BalanceState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StakeAccount_BalanceState) Descriptor() protoreflect.EnumDescriptor { + return file_coinbase_staking_orchestration_v1_solana_proto_enumTypes[0].Descriptor() +} + +func (StakeAccount_BalanceState) Type() protoreflect.EnumType { + return &file_coinbase_staking_orchestration_v1_solana_proto_enumTypes[0] +} + +func (x StakeAccount_BalanceState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StakeAccount_BalanceState.Descriptor instead. +func (StakeAccount_BalanceState) EnumDescriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_solana_proto_rawDescGZIP(), []int{6, 0} +} + +// A prioritization fee that can be added to a Solana transaction. +type PriorityFee struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The maximum number of compute units a transaction is allowed to consume. + ComputeUnitLimit int64 `protobuf:"varint,1,opt,name=compute_unit_limit,json=computeUnitLimit,proto3" json:"compute_unit_limit,omitempty"` + // The price to pay per compute unit. + UnitPrice int64 `protobuf:"varint,2,opt,name=unit_price,json=unitPrice,proto3" json:"unit_price,omitempty"` +} + +func (x *PriorityFee) Reset() { + *x = PriorityFee{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PriorityFee) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PriorityFee) ProtoMessage() {} + +func (x *PriorityFee) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PriorityFee.ProtoReflect.Descriptor instead. +func (*PriorityFee) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_solana_proto_rawDescGZIP(), []int{0} +} + +func (x *PriorityFee) GetComputeUnitLimit() int64 { + if x != nil { + return x.ComputeUnitLimit + } + return 0 +} + +func (x *PriorityFee) GetUnitPrice() int64 { + if x != nil { + return x.UnitPrice + } + return 0 +} + +// The parameters required to perform a stake operation on Solana. +type SolanaStakeParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address where the funds are coming from to stake. + WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` + // The address of the validator. + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // The amount of Solana to stake in lamports. (1 lamport = 0.000000001 SOL) + Amount *Amount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + // The option to set a priority fee for the transaction. + PriorityFee *PriorityFee `protobuf:"bytes,4,opt,name=priority_fee,json=priorityFee,proto3" json:"priority_fee,omitempty"` +} + +func (x *SolanaStakeParameters) Reset() { + *x = SolanaStakeParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SolanaStakeParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SolanaStakeParameters) ProtoMessage() {} + +func (x *SolanaStakeParameters) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SolanaStakeParameters.ProtoReflect.Descriptor instead. +func (*SolanaStakeParameters) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_solana_proto_rawDescGZIP(), []int{1} +} + +func (x *SolanaStakeParameters) GetWalletAddress() string { + if x != nil { + return x.WalletAddress + } + return "" +} + +func (x *SolanaStakeParameters) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *SolanaStakeParameters) GetAmount() *Amount { + if x != nil { + return x.Amount + } + return nil +} + +func (x *SolanaStakeParameters) GetPriorityFee() *PriorityFee { + if x != nil { + return x.PriorityFee + } + return nil +} + +// The parameters required to perform a unstake operation on Solana. +type SolanaUnstakeParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address which is the signing authority to unstake. + WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` + // The address of the stake account to unstake from. + StakeAccountAddress string `protobuf:"bytes,2,opt,name=stake_account_address,json=stakeAccountAddress,proto3" json:"stake_account_address,omitempty"` + // The amount of Solana to unstake in lamports. (1 lamport = 0.000000001 SOL) + Amount *Amount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + // The option to set a priority fee for the transaction. + PriorityFee *PriorityFee `protobuf:"bytes,4,opt,name=priority_fee,json=priorityFee,proto3" json:"priority_fee,omitempty"` +} + +func (x *SolanaUnstakeParameters) Reset() { + *x = SolanaUnstakeParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SolanaUnstakeParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SolanaUnstakeParameters) ProtoMessage() {} + +func (x *SolanaUnstakeParameters) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SolanaUnstakeParameters.ProtoReflect.Descriptor instead. +func (*SolanaUnstakeParameters) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_solana_proto_rawDescGZIP(), []int{2} +} + +func (x *SolanaUnstakeParameters) GetWalletAddress() string { + if x != nil { + return x.WalletAddress + } + return "" +} + +func (x *SolanaUnstakeParameters) GetStakeAccountAddress() string { + if x != nil { + return x.StakeAccountAddress + } + return "" +} + +func (x *SolanaUnstakeParameters) GetAmount() *Amount { + if x != nil { + return x.Amount + } + return nil +} + +func (x *SolanaUnstakeParameters) GetPriorityFee() *PriorityFee { + if x != nil { + return x.PriorityFee + } + return nil +} + +// The parameters required to perform a claim stake operation on Solana. +type SolanaClaimStakeParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address which is the signing authority to claim stake. + WalletAddress string `protobuf:"bytes,1,opt,name=wallet_address,json=walletAddress,proto3" json:"wallet_address,omitempty"` + // The address of the stake account to claim stake from. + StakeAccountAddress string `protobuf:"bytes,2,opt,name=stake_account_address,json=stakeAccountAddress,proto3" json:"stake_account_address,omitempty"` + // The option to set a priority fee for the transaction. + PriorityFee *PriorityFee `protobuf:"bytes,3,opt,name=priority_fee,json=priorityFee,proto3" json:"priority_fee,omitempty"` +} + +func (x *SolanaClaimStakeParameters) Reset() { + *x = SolanaClaimStakeParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SolanaClaimStakeParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SolanaClaimStakeParameters) ProtoMessage() {} + +func (x *SolanaClaimStakeParameters) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SolanaClaimStakeParameters.ProtoReflect.Descriptor instead. +func (*SolanaClaimStakeParameters) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_solana_proto_rawDescGZIP(), []int{3} +} + +func (x *SolanaClaimStakeParameters) GetWalletAddress() string { + if x != nil { + return x.WalletAddress + } + return "" +} + +func (x *SolanaClaimStakeParameters) GetStakeAccountAddress() string { + if x != nil { + return x.StakeAccountAddress + } + return "" +} + +func (x *SolanaClaimStakeParameters) GetPriorityFee() *PriorityFee { + if x != nil { + return x.PriorityFee + } + return nil +} + +// The protocol specific parameters required for fetching a staking context. +type SolanaStakingContextParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SolanaStakingContextParameters) Reset() { + *x = SolanaStakingContextParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SolanaStakingContextParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SolanaStakingContextParameters) ProtoMessage() {} + +func (x *SolanaStakingContextParameters) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SolanaStakingContextParameters.ProtoReflect.Descriptor instead. +func (*SolanaStakingContextParameters) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_solana_proto_rawDescGZIP(), []int{4} +} + +// The protocol specific details for a Solana staking context. +type SolanaStakingContextDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The total balance of the main wallet address (system account). + // Used to check the balance for any future staking or transaction to send. + Balance *Amount `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` + // The current epoch that the Solana blockchain is in. + // Used as a frame of reference for future stake activations and deactivations. + CurrentEpoch int64 `protobuf:"varint,2,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"` + // How much of the epoch has passed as a percentage. + // Used to inform how much time is left before a stake is activated or deactivated. + EpochCompletionPercentage string `protobuf:"bytes,3,opt,name=epoch_completion_percentage,json=epochCompletionPercentage,proto3" json:"epoch_completion_percentage,omitempty"` + // The list of staking accounts that are linked to the main wallet address (system account). + // Used to check for statuses and balances of all stake accounts related to the main wallet address that + // they're linked to. + StakeAccounts []*StakeAccount `protobuf:"bytes,4,rep,name=stake_accounts,json=stakeAccounts,proto3" json:"stake_accounts,omitempty"` +} + +func (x *SolanaStakingContextDetails) Reset() { + *x = SolanaStakingContextDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SolanaStakingContextDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SolanaStakingContextDetails) ProtoMessage() {} + +func (x *SolanaStakingContextDetails) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SolanaStakingContextDetails.ProtoReflect.Descriptor instead. +func (*SolanaStakingContextDetails) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_solana_proto_rawDescGZIP(), []int{5} +} + +func (x *SolanaStakingContextDetails) GetBalance() *Amount { + if x != nil { + return x.Balance + } + return nil +} + +func (x *SolanaStakingContextDetails) GetCurrentEpoch() int64 { + if x != nil { + return x.CurrentEpoch + } + return 0 +} + +func (x *SolanaStakingContextDetails) GetEpochCompletionPercentage() string { + if x != nil { + return x.EpochCompletionPercentage + } + return "" +} + +func (x *SolanaStakingContextDetails) GetStakeAccounts() []*StakeAccount { + if x != nil { + return x.StakeAccounts + } + return nil +} + +// The balance information for a stake account. +type StakeAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the stake account. + // Used to hold the staked funds transferred over from the main wallet. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // The bonded balance in lamports on the stake account (rent is not included in bonded amount). + // Used to check the amount that is currently staked. + BondedStake *Amount `protobuf:"bytes,2,opt,name=bonded_stake,json=bondedStake,proto3" json:"bonded_stake,omitempty"` + // The rent amount for the stake account in lamports. + // Used to highlight the amount used as the rent to maintain the address on the Solana blockchain. + RentReserve *Amount `protobuf:"bytes,3,opt,name=rent_reserve,json=rentReserve,proto3" json:"rent_reserve,omitempty"` + // The total balance on the address in lamports. + // Used to check the total balance for the stake account. + Balance *Amount `protobuf:"bytes,4,opt,name=balance,proto3" json:"balance,omitempty"` + // The balance state of the stake account. + // Used to show what state the currently staked funds are in. + BalanceState StakeAccount_BalanceState `protobuf:"varint,5,opt,name=balance_state,json=balanceState,proto3,enum=coinbase.staking.orchestration.v1.StakeAccount_BalanceState" json:"balance_state,omitempty"` + // The validator (vote account) that the stake account is assigned to stake to. + // Used to show where the staked funds are staked to. + Validator string `protobuf:"bytes,6,opt,name=validator,proto3" json:"validator,omitempty"` +} + +func (x *StakeAccount) Reset() { + *x = StakeAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StakeAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StakeAccount) ProtoMessage() {} + +func (x *StakeAccount) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StakeAccount.ProtoReflect.Descriptor instead. +func (*StakeAccount) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_solana_proto_rawDescGZIP(), []int{6} +} + +func (x *StakeAccount) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *StakeAccount) GetBondedStake() *Amount { + if x != nil { + return x.BondedStake + } + return nil +} + +func (x *StakeAccount) GetRentReserve() *Amount { + if x != nil { + return x.RentReserve + } + return nil +} + +func (x *StakeAccount) GetBalance() *Amount { + if x != nil { + return x.Balance + } + return nil +} + +func (x *StakeAccount) GetBalanceState() StakeAccount_BalanceState { + if x != nil { + return x.BalanceState + } + return StakeAccount_BALANCE_STATE_UNSPECIFIED +} + +func (x *StakeAccount) GetValidator() string { + if x != nil { + return x.Validator + } + return "" +} + +// The parameters needed for staking on Solana. +type SolanaStakingParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Parameters: + // + // *SolanaStakingParameters_StakeParameters + // *SolanaStakingParameters_UnstakeParameters + // *SolanaStakingParameters_ClaimStakeParameters + Parameters isSolanaStakingParameters_Parameters `protobuf_oneof:"parameters"` +} + +func (x *SolanaStakingParameters) Reset() { + *x = SolanaStakingParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SolanaStakingParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SolanaStakingParameters) ProtoMessage() {} + +func (x *SolanaStakingParameters) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SolanaStakingParameters.ProtoReflect.Descriptor instead. +func (*SolanaStakingParameters) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_solana_proto_rawDescGZIP(), []int{7} +} + +func (m *SolanaStakingParameters) GetParameters() isSolanaStakingParameters_Parameters { + if m != nil { + return m.Parameters + } + return nil +} + +func (x *SolanaStakingParameters) GetStakeParameters() *SolanaStakeParameters { + if x, ok := x.GetParameters().(*SolanaStakingParameters_StakeParameters); ok { + return x.StakeParameters + } + return nil +} + +func (x *SolanaStakingParameters) GetUnstakeParameters() *SolanaUnstakeParameters { + if x, ok := x.GetParameters().(*SolanaStakingParameters_UnstakeParameters); ok { + return x.UnstakeParameters + } + return nil +} + +func (x *SolanaStakingParameters) GetClaimStakeParameters() *SolanaClaimStakeParameters { + if x, ok := x.GetParameters().(*SolanaStakingParameters_ClaimStakeParameters); ok { + return x.ClaimStakeParameters + } + return nil +} + +type isSolanaStakingParameters_Parameters interface { + isSolanaStakingParameters_Parameters() +} + +type SolanaStakingParameters_StakeParameters struct { + // The parameters for stake action on Solana. + StakeParameters *SolanaStakeParameters `protobuf:"bytes,7,opt,name=stake_parameters,json=stakeParameters,proto3,oneof"` +} + +type SolanaStakingParameters_UnstakeParameters struct { + // The parameters for unstake action on Solana. + UnstakeParameters *SolanaUnstakeParameters `protobuf:"bytes,8,opt,name=unstake_parameters,json=unstakeParameters,proto3,oneof"` +} + +type SolanaStakingParameters_ClaimStakeParameters struct { + // The parameters for claim stake action on Solana. + ClaimStakeParameters *SolanaClaimStakeParameters `protobuf:"bytes,9,opt,name=claim_stake_parameters,json=claimStakeParameters,proto3,oneof"` +} + +func (*SolanaStakingParameters_StakeParameters) isSolanaStakingParameters_Parameters() {} + +func (*SolanaStakingParameters_UnstakeParameters) isSolanaStakingParameters_Parameters() {} + +func (*SolanaStakingParameters_ClaimStakeParameters) isSolanaStakingParameters_Parameters() {} + +var File_coinbase_staking_orchestration_v1_solana_proto protoreflect.FileDescriptor + +var file_coinbase_staking_orchestration_v1_solana_proto_rawDesc = []byte{ + 0x0a, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x21, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x1a, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, + 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x0b, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x46, 0x65, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x5f, 0x75, + 0x6e, 0x69, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x6e, 0x69, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x6e, 0x69, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x22, 0xa2, 0x02, 0x0a, 0x15, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x53, 0x74, 0x61, 0x6b, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x41, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, + 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x51, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x46, 0x65, 0x65, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x46, 0x65, 0x65, 0x3a, 0x1f, 0x92, 0x41, 0x1c, 0x0a, 0x1a, 0x2a, 0x18, 0x53, 0x6f, 0x6c, + 0x61, 0x6e, 0x61, 0x3a, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xad, 0x02, 0x0a, 0x17, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, + 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6b, + 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x41, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, + 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x51, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x46, 0x65, 0x65, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, + 0x65, 0x65, 0x3a, 0x21, 0x92, 0x41, 0x1e, 0x0a, 0x1c, 0x2a, 0x1a, 0x53, 0x6f, 0x6c, 0x61, 0x6e, + 0x61, 0x3a, 0x20, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xf1, 0x01, 0x0a, 0x1a, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, + 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6b, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x51, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x66, 0x65, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x46, 0x65, 0x65, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x46, + 0x65, 0x65, 0x3a, 0x25, 0x92, 0x41, 0x22, 0x0a, 0x20, 0x2a, 0x1e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, + 0x61, 0x3a, 0x20, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x4b, 0x0a, 0x1e, 0x53, 0x6f, 0x6c, + 0x61, 0x6e, 0x61, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x29, 0x92, 0x41, 0x26, + 0x0a, 0x24, 0x2a, 0x22, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x3a, 0x20, 0x53, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xc7, 0x02, 0x0a, 0x1b, 0x53, 0x6f, 0x6c, 0x61, 0x6e, + 0x61, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x43, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, + 0x12, 0x3e, 0x0a, 0x1b, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x43, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, + 0x12, 0x56, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, + 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, + 0x6b, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x3a, 0x26, 0x92, 0x41, 0x23, 0x0a, 0x21, 0x2a, + 0x1f, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x3a, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x22, 0xb3, 0x04, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x0c, 0x62, + 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0b, 0x62, 0x6f, + 0x6e, 0x64, 0x65, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x4c, 0x0a, 0x0c, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0b, 0x72, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x12, 0x43, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, + 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x0d, + 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x22, 0xa1, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1c, + 0x0a, 0x18, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x41, 0x43, 0x54, 0x49, 0x56, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, + 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x41, 0x43, + 0x54, 0x49, 0x56, 0x45, 0x10, 0x03, 0x12, 0x1e, 0x0a, 0x1a, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, + 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x44, 0x45, 0x41, 0x43, 0x54, 0x49, 0x56, 0x41, + 0x54, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x22, 0xb7, 0x04, 0x0a, 0x17, 0x53, 0x6f, 0x6c, 0x61, 0x6e, + 0x61, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x12, 0x65, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, + 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x6b, 0x0a, 0x12, 0x75, 0x6e, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, + 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x48, 0x00, 0x52, 0x11, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x75, 0x0a, 0x16, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, + 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, + 0x61, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x14, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x74, + 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x21, 0x92, + 0x41, 0x1e, 0x0a, 0x1c, 0x2a, 0x1a, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x3a, 0x20, 0x53, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x42, 0x0c, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x4a, 0x04, + 0x08, 0x01, 0x10, 0x07, 0x52, 0x17, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, + 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x19, 0x64, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x1b, 0x64, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x19, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, + 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x52, 0x16, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x16, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, + 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x42, 0x58, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, + 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_coinbase_staking_orchestration_v1_solana_proto_rawDescOnce sync.Once + file_coinbase_staking_orchestration_v1_solana_proto_rawDescData = file_coinbase_staking_orchestration_v1_solana_proto_rawDesc +) + +func file_coinbase_staking_orchestration_v1_solana_proto_rawDescGZIP() []byte { + file_coinbase_staking_orchestration_v1_solana_proto_rawDescOnce.Do(func() { + file_coinbase_staking_orchestration_v1_solana_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_orchestration_v1_solana_proto_rawDescData) + }) + return file_coinbase_staking_orchestration_v1_solana_proto_rawDescData +} + +var file_coinbase_staking_orchestration_v1_solana_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_coinbase_staking_orchestration_v1_solana_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_coinbase_staking_orchestration_v1_solana_proto_goTypes = []interface{}{ + (StakeAccount_BalanceState)(0), // 0: coinbase.staking.orchestration.v1.StakeAccount.BalanceState + (*PriorityFee)(nil), // 1: coinbase.staking.orchestration.v1.PriorityFee + (*SolanaStakeParameters)(nil), // 2: coinbase.staking.orchestration.v1.SolanaStakeParameters + (*SolanaUnstakeParameters)(nil), // 3: coinbase.staking.orchestration.v1.SolanaUnstakeParameters + (*SolanaClaimStakeParameters)(nil), // 4: coinbase.staking.orchestration.v1.SolanaClaimStakeParameters + (*SolanaStakingContextParameters)(nil), // 5: coinbase.staking.orchestration.v1.SolanaStakingContextParameters + (*SolanaStakingContextDetails)(nil), // 6: coinbase.staking.orchestration.v1.SolanaStakingContextDetails + (*StakeAccount)(nil), // 7: coinbase.staking.orchestration.v1.StakeAccount + (*SolanaStakingParameters)(nil), // 8: coinbase.staking.orchestration.v1.SolanaStakingParameters + (*Amount)(nil), // 9: coinbase.staking.orchestration.v1.Amount +} +var file_coinbase_staking_orchestration_v1_solana_proto_depIdxs = []int32{ + 9, // 0: coinbase.staking.orchestration.v1.SolanaStakeParameters.amount:type_name -> coinbase.staking.orchestration.v1.Amount + 1, // 1: coinbase.staking.orchestration.v1.SolanaStakeParameters.priority_fee:type_name -> coinbase.staking.orchestration.v1.PriorityFee + 9, // 2: coinbase.staking.orchestration.v1.SolanaUnstakeParameters.amount:type_name -> coinbase.staking.orchestration.v1.Amount + 1, // 3: coinbase.staking.orchestration.v1.SolanaUnstakeParameters.priority_fee:type_name -> coinbase.staking.orchestration.v1.PriorityFee + 1, // 4: coinbase.staking.orchestration.v1.SolanaClaimStakeParameters.priority_fee:type_name -> coinbase.staking.orchestration.v1.PriorityFee + 9, // 5: coinbase.staking.orchestration.v1.SolanaStakingContextDetails.balance:type_name -> coinbase.staking.orchestration.v1.Amount + 7, // 6: coinbase.staking.orchestration.v1.SolanaStakingContextDetails.stake_accounts:type_name -> coinbase.staking.orchestration.v1.StakeAccount + 9, // 7: coinbase.staking.orchestration.v1.StakeAccount.bonded_stake:type_name -> coinbase.staking.orchestration.v1.Amount + 9, // 8: coinbase.staking.orchestration.v1.StakeAccount.rent_reserve:type_name -> coinbase.staking.orchestration.v1.Amount + 9, // 9: coinbase.staking.orchestration.v1.StakeAccount.balance:type_name -> coinbase.staking.orchestration.v1.Amount + 0, // 10: coinbase.staking.orchestration.v1.StakeAccount.balance_state:type_name -> coinbase.staking.orchestration.v1.StakeAccount.BalanceState + 2, // 11: coinbase.staking.orchestration.v1.SolanaStakingParameters.stake_parameters:type_name -> coinbase.staking.orchestration.v1.SolanaStakeParameters + 3, // 12: coinbase.staking.orchestration.v1.SolanaStakingParameters.unstake_parameters:type_name -> coinbase.staking.orchestration.v1.SolanaUnstakeParameters + 4, // 13: coinbase.staking.orchestration.v1.SolanaStakingParameters.claim_stake_parameters:type_name -> coinbase.staking.orchestration.v1.SolanaClaimStakeParameters + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_coinbase_staking_orchestration_v1_solana_proto_init() } +func file_coinbase_staking_orchestration_v1_solana_proto_init() { + if File_coinbase_staking_orchestration_v1_solana_proto != nil { + return + } + file_coinbase_staking_orchestration_v1_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PriorityFee); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SolanaStakeParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SolanaUnstakeParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SolanaClaimStakeParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SolanaStakingContextParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SolanaStakingContextDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StakeAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SolanaStakingParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_coinbase_staking_orchestration_v1_solana_proto_msgTypes[7].OneofWrappers = []interface{}{ + (*SolanaStakingParameters_StakeParameters)(nil), + (*SolanaStakingParameters_UnstakeParameters)(nil), + (*SolanaStakingParameters_ClaimStakeParameters)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_coinbase_staking_orchestration_v1_solana_proto_rawDesc, + NumEnums: 1, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_coinbase_staking_orchestration_v1_solana_proto_goTypes, + DependencyIndexes: file_coinbase_staking_orchestration_v1_solana_proto_depIdxs, + EnumInfos: file_coinbase_staking_orchestration_v1_solana_proto_enumTypes, + MessageInfos: file_coinbase_staking_orchestration_v1_solana_proto_msgTypes, + }.Build() + File_coinbase_staking_orchestration_v1_solana_proto = out.File + file_coinbase_staking_orchestration_v1_solana_proto_rawDesc = nil + file_coinbase_staking_orchestration_v1_solana_proto_goTypes = nil + file_coinbase_staking_orchestration_v1_solana_proto_depIdxs = nil +} diff --git a/gen/go/coinbase/staking/orchestration/v1/staking_context.pb.go b/gen/go/coinbase/staking/orchestration/v1/staking_context.pb.go new file mode 100644 index 0000000..4373746 --- /dev/null +++ b/gen/go/coinbase/staking/orchestration/v1/staking_context.pb.go @@ -0,0 +1,397 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: coinbase/staking/orchestration/v1/staking_context.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The request message for the ViewStakingContext request. +type ViewStakingContextRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address to fetch staking context for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // The network to fetch staking context for. + Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` + // The protocol specific parameters needed to fetch a staking context. + // + // Types that are assignable to StakingContextParameters: + // + // *ViewStakingContextRequest_EthereumKilnStakingContextParameters + // *ViewStakingContextRequest_SolanaStakingContextParameters + StakingContextParameters isViewStakingContextRequest_StakingContextParameters `protobuf_oneof:"staking_context_parameters"` +} + +func (x *ViewStakingContextRequest) Reset() { + *x = ViewStakingContextRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_staking_context_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ViewStakingContextRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ViewStakingContextRequest) ProtoMessage() {} + +func (x *ViewStakingContextRequest) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_staking_context_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ViewStakingContextRequest.ProtoReflect.Descriptor instead. +func (*ViewStakingContextRequest) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_staking_context_proto_rawDescGZIP(), []int{0} +} + +func (x *ViewStakingContextRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *ViewStakingContextRequest) GetNetwork() string { + if x != nil { + return x.Network + } + return "" +} + +func (m *ViewStakingContextRequest) GetStakingContextParameters() isViewStakingContextRequest_StakingContextParameters { + if m != nil { + return m.StakingContextParameters + } + return nil +} + +func (x *ViewStakingContextRequest) GetEthereumKilnStakingContextParameters() *EthereumKilnStakingContextParameters { + if x, ok := x.GetStakingContextParameters().(*ViewStakingContextRequest_EthereumKilnStakingContextParameters); ok { + return x.EthereumKilnStakingContextParameters + } + return nil +} + +func (x *ViewStakingContextRequest) GetSolanaStakingContextParameters() *SolanaStakingContextParameters { + if x, ok := x.GetStakingContextParameters().(*ViewStakingContextRequest_SolanaStakingContextParameters); ok { + return x.SolanaStakingContextParameters + } + return nil +} + +type isViewStakingContextRequest_StakingContextParameters interface { + isViewStakingContextRequest_StakingContextParameters() +} + +type ViewStakingContextRequest_EthereumKilnStakingContextParameters struct { + // EthereumKiln staking context parameters. + EthereumKilnStakingContextParameters *EthereumKilnStakingContextParameters `protobuf:"bytes,3,opt,name=ethereum_kiln_staking_context_parameters,json=ethereumKilnStakingContextParameters,proto3,oneof"` +} + +type ViewStakingContextRequest_SolanaStakingContextParameters struct { + // Solana staking context parameters. + SolanaStakingContextParameters *SolanaStakingContextParameters `protobuf:"bytes,4,opt,name=solana_staking_context_parameters,json=solanaStakingContextParameters,proto3,oneof"` +} + +func (*ViewStakingContextRequest_EthereumKilnStakingContextParameters) isViewStakingContextRequest_StakingContextParameters() { +} + +func (*ViewStakingContextRequest_SolanaStakingContextParameters) isViewStakingContextRequest_StakingContextParameters() { +} + +// The response message for the ViewStakingContext request. +type ViewStakingContextResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address you are getting a staking context for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // The protocol specific details of the staking context. + // + // Types that are assignable to StakingContextDetails: + // + // *ViewStakingContextResponse_EthereumKilnStakingContextDetails + // *ViewStakingContextResponse_SolanaStakingContextDetails + StakingContextDetails isViewStakingContextResponse_StakingContextDetails `protobuf_oneof:"staking_context_details"` +} + +func (x *ViewStakingContextResponse) Reset() { + *x = ViewStakingContextResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_staking_context_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ViewStakingContextResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ViewStakingContextResponse) ProtoMessage() {} + +func (x *ViewStakingContextResponse) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_staking_context_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ViewStakingContextResponse.ProtoReflect.Descriptor instead. +func (*ViewStakingContextResponse) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_staking_context_proto_rawDescGZIP(), []int{1} +} + +func (x *ViewStakingContextResponse) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (m *ViewStakingContextResponse) GetStakingContextDetails() isViewStakingContextResponse_StakingContextDetails { + if m != nil { + return m.StakingContextDetails + } + return nil +} + +func (x *ViewStakingContextResponse) GetEthereumKilnStakingContextDetails() *EthereumKilnStakingContextDetails { + if x, ok := x.GetStakingContextDetails().(*ViewStakingContextResponse_EthereumKilnStakingContextDetails); ok { + return x.EthereumKilnStakingContextDetails + } + return nil +} + +func (x *ViewStakingContextResponse) GetSolanaStakingContextDetails() *SolanaStakingContextDetails { + if x, ok := x.GetStakingContextDetails().(*ViewStakingContextResponse_SolanaStakingContextDetails); ok { + return x.SolanaStakingContextDetails + } + return nil +} + +type isViewStakingContextResponse_StakingContextDetails interface { + isViewStakingContextResponse_StakingContextDetails() +} + +type ViewStakingContextResponse_EthereumKilnStakingContextDetails struct { + // EthereumKiln staking context details. + EthereumKilnStakingContextDetails *EthereumKilnStakingContextDetails `protobuf:"bytes,2,opt,name=ethereum_kiln_staking_context_details,json=ethereumKilnStakingContextDetails,proto3,oneof"` +} + +type ViewStakingContextResponse_SolanaStakingContextDetails struct { + // Solana staking context details. + SolanaStakingContextDetails *SolanaStakingContextDetails `protobuf:"bytes,3,opt,name=solana_staking_context_details,json=solanaStakingContextDetails,proto3,oneof"` +} + +func (*ViewStakingContextResponse_EthereumKilnStakingContextDetails) isViewStakingContextResponse_StakingContextDetails() { +} + +func (*ViewStakingContextResponse_SolanaStakingContextDetails) isViewStakingContextResponse_StakingContextDetails() { +} + +var File_coinbase_staking_orchestration_v1_staking_context_proto protoreflect.FileDescriptor + +var file_coinbase_staking_orchestration_v1_staking_context_proto_rawDesc = []byte{ + 0x0a, 0x37, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x63, 0x6f, 0x69, 0x6e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, + 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x35, 0x63, + 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, + 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, + 0x2f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x69, 0x6c, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb6, 0x03, 0x0a, 0x19, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x12, 0xa6, 0x01, 0x0a, 0x28, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x69, + 0x6c, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x48, 0x00, 0x52, 0x24, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, + 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x93, 0x01, 0x0a, 0x21, 0x73, 0x6f, + 0x6c, 0x61, 0x6e, 0x61, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, + 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x48, 0x00, 0x52, + 0x1e, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, + 0x1c, 0x0a, 0x1a, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x83, 0x03, + 0x0a, 0x1a, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x9d, 0x01, 0x0a, 0x25, + 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x69, 0x6c, 0x6e, 0x5f, 0x73, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x64, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x63, 0x6f, + 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x48, 0x00, 0x52, 0x21, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x8a, 0x01, 0x0a, 0x1e, + 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x53, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x48, 0x00, 0x52, 0x1b, 0x73, 0x6f, 0x6c, + 0x61, 0x6e, 0x61, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x19, 0x0a, 0x17, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x42, 0x58, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, + 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, + 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_coinbase_staking_orchestration_v1_staking_context_proto_rawDescOnce sync.Once + file_coinbase_staking_orchestration_v1_staking_context_proto_rawDescData = file_coinbase_staking_orchestration_v1_staking_context_proto_rawDesc +) + +func file_coinbase_staking_orchestration_v1_staking_context_proto_rawDescGZIP() []byte { + file_coinbase_staking_orchestration_v1_staking_context_proto_rawDescOnce.Do(func() { + file_coinbase_staking_orchestration_v1_staking_context_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_orchestration_v1_staking_context_proto_rawDescData) + }) + return file_coinbase_staking_orchestration_v1_staking_context_proto_rawDescData +} + +var file_coinbase_staking_orchestration_v1_staking_context_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_coinbase_staking_orchestration_v1_staking_context_proto_goTypes = []interface{}{ + (*ViewStakingContextRequest)(nil), // 0: coinbase.staking.orchestration.v1.ViewStakingContextRequest + (*ViewStakingContextResponse)(nil), // 1: coinbase.staking.orchestration.v1.ViewStakingContextResponse + (*EthereumKilnStakingContextParameters)(nil), // 2: coinbase.staking.orchestration.v1.EthereumKilnStakingContextParameters + (*SolanaStakingContextParameters)(nil), // 3: coinbase.staking.orchestration.v1.SolanaStakingContextParameters + (*EthereumKilnStakingContextDetails)(nil), // 4: coinbase.staking.orchestration.v1.EthereumKilnStakingContextDetails + (*SolanaStakingContextDetails)(nil), // 5: coinbase.staking.orchestration.v1.SolanaStakingContextDetails +} +var file_coinbase_staking_orchestration_v1_staking_context_proto_depIdxs = []int32{ + 2, // 0: coinbase.staking.orchestration.v1.ViewStakingContextRequest.ethereum_kiln_staking_context_parameters:type_name -> coinbase.staking.orchestration.v1.EthereumKilnStakingContextParameters + 3, // 1: coinbase.staking.orchestration.v1.ViewStakingContextRequest.solana_staking_context_parameters:type_name -> coinbase.staking.orchestration.v1.SolanaStakingContextParameters + 4, // 2: coinbase.staking.orchestration.v1.ViewStakingContextResponse.ethereum_kiln_staking_context_details:type_name -> coinbase.staking.orchestration.v1.EthereumKilnStakingContextDetails + 5, // 3: coinbase.staking.orchestration.v1.ViewStakingContextResponse.solana_staking_context_details:type_name -> coinbase.staking.orchestration.v1.SolanaStakingContextDetails + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_coinbase_staking_orchestration_v1_staking_context_proto_init() } +func file_coinbase_staking_orchestration_v1_staking_context_proto_init() { + if File_coinbase_staking_orchestration_v1_staking_context_proto != nil { + return + } + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_init() + file_coinbase_staking_orchestration_v1_solana_proto_init() + if !protoimpl.UnsafeEnabled { + file_coinbase_staking_orchestration_v1_staking_context_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ViewStakingContextRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_staking_context_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ViewStakingContextResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_coinbase_staking_orchestration_v1_staking_context_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*ViewStakingContextRequest_EthereumKilnStakingContextParameters)(nil), + (*ViewStakingContextRequest_SolanaStakingContextParameters)(nil), + } + file_coinbase_staking_orchestration_v1_staking_context_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*ViewStakingContextResponse_EthereumKilnStakingContextDetails)(nil), + (*ViewStakingContextResponse_SolanaStakingContextDetails)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_coinbase_staking_orchestration_v1_staking_context_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_coinbase_staking_orchestration_v1_staking_context_proto_goTypes, + DependencyIndexes: file_coinbase_staking_orchestration_v1_staking_context_proto_depIdxs, + MessageInfos: file_coinbase_staking_orchestration_v1_staking_context_proto_msgTypes, + }.Build() + File_coinbase_staking_orchestration_v1_staking_context_proto = out.File + file_coinbase_staking_orchestration_v1_staking_context_proto_rawDesc = nil + file_coinbase_staking_orchestration_v1_staking_context_proto_goTypes = nil + file_coinbase_staking_orchestration_v1_staking_context_proto_depIdxs = nil +} diff --git a/gen/go/coinbase/staking/v1alpha1/staking_target.pb.go b/gen/go/coinbase/staking/orchestration/v1/staking_target.pb.go similarity index 67% rename from gen/go/coinbase/staking/v1alpha1/staking_target.pb.go rename to gen/go/coinbase/staking/orchestration/v1/staking_target.pb.go index 223ff58..fdcb476 100644 --- a/gen/go/coinbase/staking/v1alpha1/staking_target.pb.go +++ b/gen/go/coinbase/staking/orchestration/v1/staking_target.pb.go @@ -2,9 +2,9 @@ // versions: // protoc-gen-go v1.30.0 // protoc (unknown) -// source: coinbase/staking/v1alpha1/staking_target.proto +// source: coinbase/staking/orchestration/v1/staking_target.proto -package v1alpha1 +package v1 import ( _ "google.golang.org/genproto/googleapis/api/annotations" @@ -29,7 +29,7 @@ type Validator struct { // The resource name of the Validator. // Format: protocols/{protocolName}/networks/{networkName}/stakingTargets/{validatorName} - // Ex: protocols/polygon/networks/goerli/stakingTargets/0x857679d69fE50E7B722f94aCd2629d80C355163d + // Ex: protocols/solana/networks/testnet/stakingTargets/GkqYQysEGmuL6V2AJoNnWZUz2ZBGWhzQXsJiXm2CLKAN Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The public address of the validator. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` @@ -40,7 +40,7 @@ type Validator struct { func (x *Validator) Reset() { *x = Validator{} if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[0] + mi := &file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -53,7 +53,7 @@ func (x *Validator) String() string { func (*Validator) ProtoMessage() {} func (x *Validator) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[0] + mi := &file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -66,7 +66,7 @@ func (x *Validator) ProtoReflect() protoreflect.Message { // Deprecated: Use Validator.ProtoReflect.Descriptor instead. func (*Validator) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_staking_target_proto_rawDescGZIP(), []int{0} + return file_coinbase_staking_orchestration_v1_staking_target_proto_rawDescGZIP(), []int{0} } func (x *Validator) GetName() string { @@ -100,7 +100,7 @@ type Contract struct { // The resource name of the Contract Address. // Format: protocols/{protocolName}/networks/{networkName}/stakingTargets/{contractName} - // Ex: protocols/polygon/networks/goerli/stakingTargets/0x857679d69fE50E7B722f94aCd2629d80C355163d + // Ex: protocols/ethereum_kiln/networks/holesky/stakingTargets/0xA55416de5DE61A0AC1aa8970a280E04388B1dE4b Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The contract address you may submit actions to. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` @@ -109,7 +109,7 @@ type Contract struct { func (x *Contract) Reset() { *x = Contract{} if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[1] + mi := &file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -122,7 +122,7 @@ func (x *Contract) String() string { func (*Contract) ProtoMessage() {} func (x *Contract) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[1] + mi := &file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -135,7 +135,7 @@ func (x *Contract) ProtoReflect() protoreflect.Message { // Deprecated: Use Contract.ProtoReflect.Descriptor instead. func (*Contract) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_staking_target_proto_rawDescGZIP(), []int{1} + return file_coinbase_staking_orchestration_v1_staking_target_proto_rawDescGZIP(), []int{1} } func (x *Contract) GetName() string { @@ -168,7 +168,7 @@ type StakingTarget struct { func (x *StakingTarget) Reset() { *x = StakingTarget{} if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[2] + mi := &file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -181,7 +181,7 @@ func (x *StakingTarget) String() string { func (*StakingTarget) ProtoMessage() {} func (x *StakingTarget) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[2] + mi := &file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -194,7 +194,7 @@ func (x *StakingTarget) ProtoReflect() protoreflect.Message { // Deprecated: Use StakingTarget.ProtoReflect.Descriptor instead. func (*StakingTarget) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_staking_target_proto_rawDescGZIP(), []int{2} + return file_coinbase_staking_orchestration_v1_staking_target_proto_rawDescGZIP(), []int{2} } func (m *StakingTarget) GetStakingTargets() isStakingTarget_StakingTargets { @@ -263,7 +263,7 @@ type ListStakingTargetsRequest struct { func (x *ListStakingTargetsRequest) Reset() { *x = ListStakingTargetsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[3] + mi := &file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -276,7 +276,7 @@ func (x *ListStakingTargetsRequest) String() string { func (*ListStakingTargetsRequest) ProtoMessage() {} func (x *ListStakingTargetsRequest) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[3] + mi := &file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -289,7 +289,7 @@ func (x *ListStakingTargetsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListStakingTargetsRequest.ProtoReflect.Descriptor instead. func (*ListStakingTargetsRequest) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_staking_target_proto_rawDescGZIP(), []int{3} + return file_coinbase_staking_orchestration_v1_staking_target_proto_rawDescGZIP(), []int{3} } func (x *ListStakingTargetsRequest) GetParent() string { @@ -329,7 +329,7 @@ type ListStakingTargetsResponse struct { func (x *ListStakingTargetsResponse) Reset() { *x = ListStakingTargetsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[4] + mi := &file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -342,7 +342,7 @@ func (x *ListStakingTargetsResponse) String() string { func (*ListStakingTargetsResponse) ProtoMessage() {} func (x *ListStakingTargetsResponse) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[4] + mi := &file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -355,7 +355,7 @@ func (x *ListStakingTargetsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListStakingTargetsResponse.ProtoReflect.Descriptor instead. func (*ListStakingTargetsResponse) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_staking_target_proto_rawDescGZIP(), []int{4} + return file_coinbase_staking_orchestration_v1_staking_target_proto_rawDescGZIP(), []int{4} } func (x *ListStakingTargetsResponse) GetStakingTargets() []*StakingTarget { @@ -372,14 +372,15 @@ func (x *ListStakingTargetsResponse) GetNextPageToken() string { return "" } -var File_coinbase_staking_v1alpha1_staking_target_proto protoreflect.FileDescriptor +var File_coinbase_staking_orchestration_v1_staking_target_proto protoreflect.FileDescriptor -var file_coinbase_staking_v1alpha1_staking_target_proto_rawDesc = []byte{ - 0x0a, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x19, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, +var file_coinbase_staking_orchestration_v1_staking_target_proto_rawDesc = []byte{ + 0x0a, 0x36, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, @@ -409,15 +410,16 @@ var file_coinbase_staking_v1alpha1_staking_target_proto_rawDesc = []byte{ 0x6f, 0x72, 0x6b, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x7d, 0x2a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x73, 0x32, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x22, 0xab, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x00, - 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x08, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x61, 0x63, 0x74, 0x22, 0xbb, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x4c, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, + 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x12, 0x49, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x42, 0x11, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, @@ -430,48 +432,49 @@ var file_coinbase_staking_v1alpha1_staking_target_proto_rawDesc = []byte{ 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, - 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x1a, 0x4c, 0x69, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9f, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x0e, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, - 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x42, 0x50, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, - 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x0b, 0x32, 0x30, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, + 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x58, 0x5a, 0x56, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, + 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, + 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_coinbase_staking_v1alpha1_staking_target_proto_rawDescOnce sync.Once - file_coinbase_staking_v1alpha1_staking_target_proto_rawDescData = file_coinbase_staking_v1alpha1_staking_target_proto_rawDesc + file_coinbase_staking_orchestration_v1_staking_target_proto_rawDescOnce sync.Once + file_coinbase_staking_orchestration_v1_staking_target_proto_rawDescData = file_coinbase_staking_orchestration_v1_staking_target_proto_rawDesc ) -func file_coinbase_staking_v1alpha1_staking_target_proto_rawDescGZIP() []byte { - file_coinbase_staking_v1alpha1_staking_target_proto_rawDescOnce.Do(func() { - file_coinbase_staking_v1alpha1_staking_target_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_v1alpha1_staking_target_proto_rawDescData) +func file_coinbase_staking_orchestration_v1_staking_target_proto_rawDescGZIP() []byte { + file_coinbase_staking_orchestration_v1_staking_target_proto_rawDescOnce.Do(func() { + file_coinbase_staking_orchestration_v1_staking_target_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_orchestration_v1_staking_target_proto_rawDescData) }) - return file_coinbase_staking_v1alpha1_staking_target_proto_rawDescData + return file_coinbase_staking_orchestration_v1_staking_target_proto_rawDescData } -var file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_coinbase_staking_v1alpha1_staking_target_proto_goTypes = []interface{}{ - (*Validator)(nil), // 0: coinbase.staking.v1alpha1.Validator - (*Contract)(nil), // 1: coinbase.staking.v1alpha1.Contract - (*StakingTarget)(nil), // 2: coinbase.staking.v1alpha1.StakingTarget - (*ListStakingTargetsRequest)(nil), // 3: coinbase.staking.v1alpha1.ListStakingTargetsRequest - (*ListStakingTargetsResponse)(nil), // 4: coinbase.staking.v1alpha1.ListStakingTargetsResponse +var file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_coinbase_staking_orchestration_v1_staking_target_proto_goTypes = []interface{}{ + (*Validator)(nil), // 0: coinbase.staking.orchestration.v1.Validator + (*Contract)(nil), // 1: coinbase.staking.orchestration.v1.Contract + (*StakingTarget)(nil), // 2: coinbase.staking.orchestration.v1.StakingTarget + (*ListStakingTargetsRequest)(nil), // 3: coinbase.staking.orchestration.v1.ListStakingTargetsRequest + (*ListStakingTargetsResponse)(nil), // 4: coinbase.staking.orchestration.v1.ListStakingTargetsResponse } -var file_coinbase_staking_v1alpha1_staking_target_proto_depIdxs = []int32{ - 0, // 0: coinbase.staking.v1alpha1.StakingTarget.validator:type_name -> coinbase.staking.v1alpha1.Validator - 1, // 1: coinbase.staking.v1alpha1.StakingTarget.contract:type_name -> coinbase.staking.v1alpha1.Contract - 2, // 2: coinbase.staking.v1alpha1.ListStakingTargetsResponse.staking_targets:type_name -> coinbase.staking.v1alpha1.StakingTarget +var file_coinbase_staking_orchestration_v1_staking_target_proto_depIdxs = []int32{ + 0, // 0: coinbase.staking.orchestration.v1.StakingTarget.validator:type_name -> coinbase.staking.orchestration.v1.Validator + 1, // 1: coinbase.staking.orchestration.v1.StakingTarget.contract:type_name -> coinbase.staking.orchestration.v1.Contract + 2, // 2: coinbase.staking.orchestration.v1.ListStakingTargetsResponse.staking_targets:type_name -> coinbase.staking.orchestration.v1.StakingTarget 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name @@ -479,13 +482,13 @@ var file_coinbase_staking_v1alpha1_staking_target_proto_depIdxs = []int32{ 0, // [0:3] is the sub-list for field type_name } -func init() { file_coinbase_staking_v1alpha1_staking_target_proto_init() } -func file_coinbase_staking_v1alpha1_staking_target_proto_init() { - if File_coinbase_staking_v1alpha1_staking_target_proto != nil { +func init() { file_coinbase_staking_orchestration_v1_staking_target_proto_init() } +func file_coinbase_staking_orchestration_v1_staking_target_proto_init() { + if File_coinbase_staking_orchestration_v1_staking_target_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Validator); i { case 0: return &v.state @@ -497,7 +500,7 @@ func file_coinbase_staking_v1alpha1_staking_target_proto_init() { return nil } } - file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Contract); i { case 0: return &v.state @@ -509,7 +512,7 @@ func file_coinbase_staking_v1alpha1_staking_target_proto_init() { return nil } } - file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StakingTarget); i { case 0: return &v.state @@ -521,7 +524,7 @@ func file_coinbase_staking_v1alpha1_staking_target_proto_init() { return nil } } - file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListStakingTargetsRequest); i { case 0: return &v.state @@ -533,7 +536,7 @@ func file_coinbase_staking_v1alpha1_staking_target_proto_init() { return nil } } - file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListStakingTargetsResponse); i { case 0: return &v.state @@ -546,7 +549,7 @@ func file_coinbase_staking_v1alpha1_staking_target_proto_init() { } } } - file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes[2].OneofWrappers = []interface{}{ + file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes[2].OneofWrappers = []interface{}{ (*StakingTarget_Validator)(nil), (*StakingTarget_Contract)(nil), } @@ -554,18 +557,18 @@ func file_coinbase_staking_v1alpha1_staking_target_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_coinbase_staking_v1alpha1_staking_target_proto_rawDesc, + RawDescriptor: file_coinbase_staking_orchestration_v1_staking_target_proto_rawDesc, NumEnums: 0, NumMessages: 5, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_coinbase_staking_v1alpha1_staking_target_proto_goTypes, - DependencyIndexes: file_coinbase_staking_v1alpha1_staking_target_proto_depIdxs, - MessageInfos: file_coinbase_staking_v1alpha1_staking_target_proto_msgTypes, + GoTypes: file_coinbase_staking_orchestration_v1_staking_target_proto_goTypes, + DependencyIndexes: file_coinbase_staking_orchestration_v1_staking_target_proto_depIdxs, + MessageInfos: file_coinbase_staking_orchestration_v1_staking_target_proto_msgTypes, }.Build() - File_coinbase_staking_v1alpha1_staking_target_proto = out.File - file_coinbase_staking_v1alpha1_staking_target_proto_rawDesc = nil - file_coinbase_staking_v1alpha1_staking_target_proto_goTypes = nil - file_coinbase_staking_v1alpha1_staking_target_proto_depIdxs = nil + File_coinbase_staking_orchestration_v1_staking_target_proto = out.File + file_coinbase_staking_orchestration_v1_staking_target_proto_rawDesc = nil + file_coinbase_staking_orchestration_v1_staking_target_proto_goTypes = nil + file_coinbase_staking_orchestration_v1_staking_target_proto_depIdxs = nil } diff --git a/gen/go/coinbase/staking/v1alpha1/staking_target_aip.go b/gen/go/coinbase/staking/orchestration/v1/staking_target_aip.go similarity index 98% rename from gen/go/coinbase/staking/v1alpha1/staking_target_aip.go rename to gen/go/coinbase/staking/orchestration/v1/staking_target_aip.go index 620ee18..a0ab564 100644 --- a/gen/go/coinbase/staking/v1alpha1/staking_target_aip.go +++ b/gen/go/coinbase/staking/orchestration/v1/staking_target_aip.go @@ -3,9 +3,9 @@ // versions: // protoc-gen-go-aip development // protoc (unknown) -// source: coinbase/staking/v1alpha1/staking_target.proto +// source: coinbase/staking/orchestration/v1/staking_target.proto -package v1alpha1 +package v1 import ( fmt "fmt" diff --git a/gen/go/coinbase/staking/orchestration/v1/workflow.pb.go b/gen/go/coinbase/staking/orchestration/v1/workflow.pb.go new file mode 100644 index 0000000..b41b778 --- /dev/null +++ b/gen/go/coinbase/staking/orchestration/v1/workflow.pb.go @@ -0,0 +1,1497 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: coinbase/staking/orchestration/v1/workflow.proto + +package v1 + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// State defines an enumeration of states for a staking transaction. +type TxStepOutput_State int32 + +const ( + // Unspecified transaction state, this is for backwards compatibility. + TxStepOutput_STATE_UNSPECIFIED TxStepOutput_State = 0 + // Tx has not yet been constructed in the backend. + TxStepOutput_STATE_NOT_CONSTRUCTED TxStepOutput_State = 1 + // Tx construction is over in the backend. + TxStepOutput_STATE_CONSTRUCTED TxStepOutput_State = 2 + // Tx is waiting to be signed. + TxStepOutput_STATE_PENDING_SIGNING TxStepOutput_State = 3 + // Tx has been signed and returned to the backend. + TxStepOutput_STATE_SIGNED TxStepOutput_State = 4 + // Tx is being broadcasted to the network. + TxStepOutput_STATE_BROADCASTING TxStepOutput_State = 5 + // Tx is waiting for confirmation. + TxStepOutput_STATE_CONFIRMING TxStepOutput_State = 6 + // Tx has been confirmed to be included in a block. + TxStepOutput_STATE_CONFIRMED TxStepOutput_State = 7 + // Tx has been finalized. + TxStepOutput_STATE_FINALIZED TxStepOutput_State = 8 + // Tx construction or broadcasting failed. + TxStepOutput_STATE_FAILED TxStepOutput_State = 9 + // Tx has been successfully executed. + TxStepOutput_STATE_SUCCESS TxStepOutput_State = 10 + // Tx is waiting to be externally broadcasted by the customer. + TxStepOutput_STATE_PENDING_EXT_BROADCAST TxStepOutput_State = 16 +) + +// Enum value maps for TxStepOutput_State. +var ( + TxStepOutput_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "STATE_NOT_CONSTRUCTED", + 2: "STATE_CONSTRUCTED", + 3: "STATE_PENDING_SIGNING", + 4: "STATE_SIGNED", + 5: "STATE_BROADCASTING", + 6: "STATE_CONFIRMING", + 7: "STATE_CONFIRMED", + 8: "STATE_FINALIZED", + 9: "STATE_FAILED", + 10: "STATE_SUCCESS", + 16: "STATE_PENDING_EXT_BROADCAST", + } + TxStepOutput_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "STATE_NOT_CONSTRUCTED": 1, + "STATE_CONSTRUCTED": 2, + "STATE_PENDING_SIGNING": 3, + "STATE_SIGNED": 4, + "STATE_BROADCASTING": 5, + "STATE_CONFIRMING": 6, + "STATE_CONFIRMED": 7, + "STATE_FINALIZED": 8, + "STATE_FAILED": 9, + "STATE_SUCCESS": 10, + "STATE_PENDING_EXT_BROADCAST": 16, + } +) + +func (x TxStepOutput_State) Enum() *TxStepOutput_State { + p := new(TxStepOutput_State) + *p = x + return p +} + +func (x TxStepOutput_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TxStepOutput_State) Descriptor() protoreflect.EnumDescriptor { + return file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[0].Descriptor() +} + +func (TxStepOutput_State) Type() protoreflect.EnumType { + return &file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[0] +} + +func (x TxStepOutput_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TxStepOutput_State.Descriptor instead. +func (TxStepOutput_State) EnumDescriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{0, 0} +} + +// The unit of wait time. +type WaitStepOutput_WaitUnit int32 + +const ( + // Unspecified wait time. + WaitStepOutput_WAIT_UNIT_UNSPECIFIED WaitStepOutput_WaitUnit = 0 + // Wait time measured in seconds. + WaitStepOutput_WAIT_UNIT_SECONDS WaitStepOutput_WaitUnit = 1 + // Wait time measured in blocks. + WaitStepOutput_WAIT_UNIT_BLOCKS WaitStepOutput_WaitUnit = 2 + // Wait time measured in epochs. + WaitStepOutput_WAIT_UNIT_EPOCHS WaitStepOutput_WaitUnit = 3 + // Wait time measured in checkpoints. + WaitStepOutput_WAIT_UNIT_CHECKPOINTS WaitStepOutput_WaitUnit = 4 +) + +// Enum value maps for WaitStepOutput_WaitUnit. +var ( + WaitStepOutput_WaitUnit_name = map[int32]string{ + 0: "WAIT_UNIT_UNSPECIFIED", + 1: "WAIT_UNIT_SECONDS", + 2: "WAIT_UNIT_BLOCKS", + 3: "WAIT_UNIT_EPOCHS", + 4: "WAIT_UNIT_CHECKPOINTS", + } + WaitStepOutput_WaitUnit_value = map[string]int32{ + "WAIT_UNIT_UNSPECIFIED": 0, + "WAIT_UNIT_SECONDS": 1, + "WAIT_UNIT_BLOCKS": 2, + "WAIT_UNIT_EPOCHS": 3, + "WAIT_UNIT_CHECKPOINTS": 4, + } +) + +func (x WaitStepOutput_WaitUnit) Enum() *WaitStepOutput_WaitUnit { + p := new(WaitStepOutput_WaitUnit) + *p = x + return p +} + +func (x WaitStepOutput_WaitUnit) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WaitStepOutput_WaitUnit) Descriptor() protoreflect.EnumDescriptor { + return file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[1].Descriptor() +} + +func (WaitStepOutput_WaitUnit) Type() protoreflect.EnumType { + return &file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[1] +} + +func (x WaitStepOutput_WaitUnit) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WaitStepOutput_WaitUnit.Descriptor instead. +func (WaitStepOutput_WaitUnit) EnumDescriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{1, 0} +} + +// WaitStepState defines an enumeration of states for a wait step. +type WaitStepOutput_State int32 + +const ( + // Unspecified wait step state. + WaitStepOutput_STATE_UNSPECIFIED WaitStepOutput_State = 0 + // Wait step has not started. + WaitStepOutput_STATE_NOT_STARTED WaitStepOutput_State = 1 + // Wait step is in-progress. + WaitStepOutput_STATE_IN_PROGRESS WaitStepOutput_State = 2 + // Wait step completed. + WaitStepOutput_STATE_COMPLETED WaitStepOutput_State = 3 +) + +// Enum value maps for WaitStepOutput_State. +var ( + WaitStepOutput_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "STATE_NOT_STARTED", + 2: "STATE_IN_PROGRESS", + 3: "STATE_COMPLETED", + } + WaitStepOutput_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "STATE_NOT_STARTED": 1, + "STATE_IN_PROGRESS": 2, + "STATE_COMPLETED": 3, + } +) + +func (x WaitStepOutput_State) Enum() *WaitStepOutput_State { + p := new(WaitStepOutput_State) + *p = x + return p +} + +func (x WaitStepOutput_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WaitStepOutput_State) Descriptor() protoreflect.EnumDescriptor { + return file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[2].Descriptor() +} + +func (WaitStepOutput_State) Type() protoreflect.EnumType { + return &file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[2] +} + +func (x WaitStepOutput_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WaitStepOutput_State.Descriptor instead. +func (WaitStepOutput_State) EnumDescriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{1, 1} +} + +// The state of a workflow +type Workflow_State int32 + +const ( + // Unspecified workflow state, this is for backwards compatibility. + Workflow_STATE_UNSPECIFIED Workflow_State = 0 + // In Progress represents a workflow that is currently in progress. + Workflow_STATE_IN_PROGRESS Workflow_State = 1 + // Waiting for signing represents the workflow is waiting on the consumer to sign and return the corresponding signed tx. + Workflow_STATE_WAITING_FOR_SIGNING Workflow_State = 2 + // Completed represents the workflow has completed. + Workflow_STATE_COMPLETED Workflow_State = 3 + // Failed represents the workflow has failed. + Workflow_STATE_FAILED Workflow_State = 4 + // Waiting for external broadcast represents the workflow is waiting for the customer to broadcast a tx and return its corresponding tx hash. + Workflow_STATE_WAITING_FOR_EXT_BROADCAST Workflow_State = 9 +) + +// Enum value maps for Workflow_State. +var ( + Workflow_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "STATE_IN_PROGRESS", + 2: "STATE_WAITING_FOR_SIGNING", + 3: "STATE_COMPLETED", + 4: "STATE_FAILED", + 9: "STATE_WAITING_FOR_EXT_BROADCAST", + } + Workflow_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "STATE_IN_PROGRESS": 1, + "STATE_WAITING_FOR_SIGNING": 2, + "STATE_COMPLETED": 3, + "STATE_FAILED": 4, + "STATE_WAITING_FOR_EXT_BROADCAST": 9, + } +) + +func (x Workflow_State) Enum() *Workflow_State { + p := new(Workflow_State) + *p = x + return p +} + +func (x Workflow_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Workflow_State) Descriptor() protoreflect.EnumDescriptor { + return file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[3].Descriptor() +} + +func (Workflow_State) Type() protoreflect.EnumType { + return &file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes[3] +} + +func (x Workflow_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Workflow_State.Descriptor instead. +func (Workflow_State) EnumDescriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{3, 0} +} + +// The details of a transaction being constructed and broadcasted to the network. +type TxStepOutput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unsigned transaction which was signed in order to be broadcasted. + UnsignedTx string `protobuf:"bytes,1,opt,name=unsigned_tx,json=unsignedTx,proto3" json:"unsigned_tx,omitempty"` + // The signed transaction which was asked to be broadcasted. + SignedTx string `protobuf:"bytes,2,opt,name=signed_tx,json=signedTx,proto3" json:"signed_tx,omitempty"` + // The hash of the broadcasted transaction. + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + // The state of the transaction step. + State TxStepOutput_State `protobuf:"varint,4,opt,name=state,proto3,enum=coinbase.staking.orchestration.v1.TxStepOutput_State" json:"state,omitempty"` + // The error message if the transaction step failed. + ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` +} + +func (x *TxStepOutput) Reset() { + *x = TxStepOutput{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TxStepOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TxStepOutput) ProtoMessage() {} + +func (x *TxStepOutput) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TxStepOutput.ProtoReflect.Descriptor instead. +func (*TxStepOutput) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{0} +} + +func (x *TxStepOutput) GetUnsignedTx() string { + if x != nil { + return x.UnsignedTx + } + return "" +} + +func (x *TxStepOutput) GetSignedTx() string { + if x != nil { + return x.SignedTx + } + return "" +} + +func (x *TxStepOutput) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +func (x *TxStepOutput) GetState() TxStepOutput_State { + if x != nil { + return x.State + } + return TxStepOutput_STATE_UNSPECIFIED +} + +func (x *TxStepOutput) GetErrorMessage() string { + if x != nil { + return x.ErrorMessage + } + return "" +} + +// The output details of a step where we wait for some kind of on-chain activity to finish like reaching a certain checkpoint, epoch or block. +type WaitStepOutput struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The beginning of wait period. + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + // The current wait progress. + Current int64 `protobuf:"varint,2,opt,name=current,proto3" json:"current,omitempty"` + // The target wait end point. + Target int64 `protobuf:"varint,3,opt,name=target,proto3" json:"target,omitempty"` + // The wait unit (like checkpoint, block, epoch etc). + Unit WaitStepOutput_WaitUnit `protobuf:"varint,4,opt,name=unit,proto3,enum=coinbase.staking.orchestration.v1.WaitStepOutput_WaitUnit" json:"unit,omitempty"` + // The state of the wait step. + State WaitStepOutput_State `protobuf:"varint,5,opt,name=state,proto3,enum=coinbase.staking.orchestration.v1.WaitStepOutput_State" json:"state,omitempty"` +} + +func (x *WaitStepOutput) Reset() { + *x = WaitStepOutput{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WaitStepOutput) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WaitStepOutput) ProtoMessage() {} + +func (x *WaitStepOutput) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WaitStepOutput.ProtoReflect.Descriptor instead. +func (*WaitStepOutput) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{1} +} + +func (x *WaitStepOutput) GetStart() int64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *WaitStepOutput) GetCurrent() int64 { + if x != nil { + return x.Current + } + return 0 +} + +func (x *WaitStepOutput) GetTarget() int64 { + if x != nil { + return x.Target + } + return 0 +} + +func (x *WaitStepOutput) GetUnit() WaitStepOutput_WaitUnit { + if x != nil { + return x.Unit + } + return WaitStepOutput_WAIT_UNIT_UNSPECIFIED +} + +func (x *WaitStepOutput) GetState() WaitStepOutput_State { + if x != nil { + return x.State + } + return WaitStepOutput_STATE_UNSPECIFIED +} + +// The information for a step in the workflow. +type WorkflowStep struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The human readable name of the step. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The output of the current step. It can be of tx or wait type. + // + // Types that are assignable to Output: + // + // *WorkflowStep_TxStepOutput + // *WorkflowStep_WaitStepOutput + Output isWorkflowStep_Output `protobuf_oneof:"output"` +} + +func (x *WorkflowStep) Reset() { + *x = WorkflowStep{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowStep) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowStep) ProtoMessage() {} + +func (x *WorkflowStep) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowStep.ProtoReflect.Descriptor instead. +func (*WorkflowStep) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{2} +} + +func (x *WorkflowStep) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (m *WorkflowStep) GetOutput() isWorkflowStep_Output { + if m != nil { + return m.Output + } + return nil +} + +func (x *WorkflowStep) GetTxStepOutput() *TxStepOutput { + if x, ok := x.GetOutput().(*WorkflowStep_TxStepOutput); ok { + return x.TxStepOutput + } + return nil +} + +func (x *WorkflowStep) GetWaitStepOutput() *WaitStepOutput { + if x, ok := x.GetOutput().(*WorkflowStep_WaitStepOutput); ok { + return x.WaitStepOutput + } + return nil +} + +type isWorkflowStep_Output interface { + isWorkflowStep_Output() +} + +type WorkflowStep_TxStepOutput struct { + // The tx step output (e.g. transaction metadata such as unsigned tx, signed tx etc). + TxStepOutput *TxStepOutput `protobuf:"bytes,2,opt,name=tx_step_output,json=txStepOutput,proto3,oneof"` +} + +type WorkflowStep_WaitStepOutput struct { + // The waiting details for any kind like how many checkpoints away for unbonding etc. + WaitStepOutput *WaitStepOutput `protobuf:"bytes,3,opt,name=wait_step_output,json=waitStepOutput,proto3,oneof"` +} + +func (*WorkflowStep_TxStepOutput) isWorkflowStep_Output() {} + +func (*WorkflowStep_WaitStepOutput) isWorkflowStep_Output() {} + +// A Workflow resource. +type Workflow struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the workflow. + // Format: projects/{projectUUID}/workflows/{workflowUUID} + // Ex: projects/ 123e4567-e89b-12d3-a456-426614174000/workflows/123e4567-e89b-12d3-a456-426614174000 + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The resource name of the action being + // performed. + // Format: protocols/{protocol}/networks/{network}/actions/{action} + Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` + // The parameters of the action to take. + // + // Types that are assignable to StakingParameters: + // + // *Workflow_SolanaStakingParameters + // *Workflow_EthereumKilnStakingParameters + StakingParameters isWorkflow_StakingParameters `protobuf_oneof:"staking_parameters"` + // The current state of the workflow. + State Workflow_State `protobuf:"varint,4,opt,name=state,proto3,enum=coinbase.staking.orchestration.v1.Workflow_State" json:"state,omitempty"` + // The index of the current step. + CurrentStepId int32 `protobuf:"varint,5,opt,name=current_step_id,json=currentStepId,proto3" json:"current_step_id,omitempty"` + // The list of steps for this workflow. + Steps []*WorkflowStep `protobuf:"bytes,6,rep,name=steps,proto3" json:"steps,omitempty"` + // The timestamp the workflow was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // The timestamp the workflow was last updated. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Flag to skip tx broadcast to network on behalf of the user. Use this flag if you instead prefer to broadcast signed txs on your own. + SkipBroadcast bool `protobuf:"varint,11,opt,name=skip_broadcast,json=skipBroadcast,proto3" json:"skip_broadcast,omitempty"` + // The timestamp the workflow completed. + CompleteTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=complete_time,json=completeTime,proto3" json:"complete_time,omitempty"` +} + +func (x *Workflow) Reset() { + *x = Workflow{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Workflow) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Workflow) ProtoMessage() {} + +func (x *Workflow) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Workflow.ProtoReflect.Descriptor instead. +func (*Workflow) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{3} +} + +func (x *Workflow) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Workflow) GetAction() string { + if x != nil { + return x.Action + } + return "" +} + +func (m *Workflow) GetStakingParameters() isWorkflow_StakingParameters { + if m != nil { + return m.StakingParameters + } + return nil +} + +func (x *Workflow) GetSolanaStakingParameters() *SolanaStakingParameters { + if x, ok := x.GetStakingParameters().(*Workflow_SolanaStakingParameters); ok { + return x.SolanaStakingParameters + } + return nil +} + +func (x *Workflow) GetEthereumKilnStakingParameters() *EthereumKilnStakingParameters { + if x, ok := x.GetStakingParameters().(*Workflow_EthereumKilnStakingParameters); ok { + return x.EthereumKilnStakingParameters + } + return nil +} + +func (x *Workflow) GetState() Workflow_State { + if x != nil { + return x.State + } + return Workflow_STATE_UNSPECIFIED +} + +func (x *Workflow) GetCurrentStepId() int32 { + if x != nil { + return x.CurrentStepId + } + return 0 +} + +func (x *Workflow) GetSteps() []*WorkflowStep { + if x != nil { + return x.Steps + } + return nil +} + +func (x *Workflow) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Workflow) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Workflow) GetSkipBroadcast() bool { + if x != nil { + return x.SkipBroadcast + } + return false +} + +func (x *Workflow) GetCompleteTime() *timestamppb.Timestamp { + if x != nil { + return x.CompleteTime + } + return nil +} + +type isWorkflow_StakingParameters interface { + isWorkflow_StakingParameters() +} + +type Workflow_SolanaStakingParameters struct { + // Solana staking parameters. + SolanaStakingParameters *SolanaStakingParameters `protobuf:"bytes,9,opt,name=solana_staking_parameters,json=solanaStakingParameters,proto3,oneof"` +} + +type Workflow_EthereumKilnStakingParameters struct { + // EthereumKiln staking parameters. + EthereumKilnStakingParameters *EthereumKilnStakingParameters `protobuf:"bytes,10,opt,name=ethereum_kiln_staking_parameters,json=ethereumKilnStakingParameters,proto3,oneof"` +} + +func (*Workflow_SolanaStakingParameters) isWorkflow_StakingParameters() {} + +func (*Workflow_EthereumKilnStakingParameters) isWorkflow_StakingParameters() {} + +// The request message for CreateWorkflow. +type CreateWorkflowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the parent that owns + // the workflow. + // Format: projects/{project} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The workflow to create. + Workflow *Workflow `protobuf:"bytes,2,opt,name=workflow,proto3" json:"workflow,omitempty"` +} + +func (x *CreateWorkflowRequest) Reset() { + *x = CreateWorkflowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateWorkflowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWorkflowRequest) ProtoMessage() {} + +func (x *CreateWorkflowRequest) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateWorkflowRequest.ProtoReflect.Descriptor instead. +func (*CreateWorkflowRequest) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateWorkflowRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateWorkflowRequest) GetWorkflow() *Workflow { + if x != nil { + return x.Workflow + } + return nil +} + +// The message for GetWorkflow. +type GetWorkflowRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the workflow. + // Format: projects/{project}/workflows/{workflow} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetWorkflowRequest) Reset() { + *x = GetWorkflowRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetWorkflowRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWorkflowRequest) ProtoMessage() {} + +func (x *GetWorkflowRequest) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWorkflowRequest.ProtoReflect.Descriptor instead. +func (*GetWorkflowRequest) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{5} +} + +func (x *GetWorkflowRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The message for ListWorkflows. +type ListWorkflowsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the parent that owns + // the collection of networks. + // Format: projects/{project} + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // [AIP-160](https://google.aip.dev/160) filter + // Supported fields: + // - string action: "stake", "unstake" + // - string protocol: "ethereum_kiln" + // - string network: "holesky", "mainnet" + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // The maximum number of workflows to return. The service may + // + // return fewer than this value. + // + // If unspecified, 100 workflows will be returned. + // The maximum value is 1000; values over 1000 will be floored to 1000. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token as part of the response of a previous call. + // Provide this to retrieve the next page. + // + // When paginating, all other parameters must match the previous + // request to list resources. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListWorkflowsRequest) Reset() { + *x = ListWorkflowsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkflowsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkflowsRequest) ProtoMessage() {} + +func (x *ListWorkflowsRequest) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkflowsRequest.ProtoReflect.Descriptor instead. +func (*ListWorkflowsRequest) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{6} +} + +func (x *ListWorkflowsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListWorkflowsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListWorkflowsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListWorkflowsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response message for ListWorkflows. +type ListWorkflowsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The list of workflows. + Workflows []*Workflow `protobuf:"bytes,1,rep,name=workflows,proto3" json:"workflows,omitempty"` + // A token which can be provided as `page_token` to retrieve the next page. + // If this field is omitted, there are no additional pages. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListWorkflowsResponse) Reset() { + *x = ListWorkflowsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListWorkflowsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListWorkflowsResponse) ProtoMessage() {} + +func (x *ListWorkflowsResponse) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListWorkflowsResponse.ProtoReflect.Descriptor instead. +func (*ListWorkflowsResponse) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{7} +} + +func (x *ListWorkflowsResponse) GetWorkflows() []*Workflow { + if x != nil { + return x.Workflows + } + return nil +} + +func (x *ListWorkflowsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request message for PerformWorkflowStep. +type PerformWorkflowStepRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the workflow. + // Format: projects/{project}/workflows/{workflow} + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The index of the step to be performed. + Step int32 `protobuf:"varint,2,opt,name=step,proto3" json:"step,omitempty"` + // Transaction metadata. This is either the signed transaction or transaction hash depending on the workflow's broadcast method. + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` +} + +func (x *PerformWorkflowStepRequest) Reset() { + *x = PerformWorkflowStepRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PerformWorkflowStepRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PerformWorkflowStepRequest) ProtoMessage() {} + +func (x *PerformWorkflowStepRequest) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PerformWorkflowStepRequest.ProtoReflect.Descriptor instead. +func (*PerformWorkflowStepRequest) Descriptor() ([]byte, []int) { + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP(), []int{8} +} + +func (x *PerformWorkflowStepRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *PerformWorkflowStepRequest) GetStep() int32 { + if x != nil { + return x.Step + } + return 0 +} + +func (x *PerformWorkflowStepRequest) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +var File_coinbase_staking_orchestration_v1_workflow_proto protoreflect.FileDescriptor + +var file_coinbase_staking_orchestration_v1_workflow_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x21, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x35, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, + 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x5f, 0x6b, 0x69, 0x6c, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x63, 0x6f, + 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6f, + 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, + 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x04, 0x0a, 0x0c, 0x54, 0x78, + 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x75, 0x6e, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x78, + 0x12, 0x20, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x54, 0x78, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x50, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x35, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x83, 0x03, 0x0a, + 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, + 0x15, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x54, + 0x52, 0x55, 0x43, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, + 0x19, 0x0a, 0x15, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, + 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x49, + 0x4e, 0x47, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4f, + 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x07, 0x12, + 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, + 0x45, 0x44, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x0a, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x58, 0x54, 0x5f, 0x42, + 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x10, 0x10, 0x22, 0x04, 0x08, 0x0b, 0x10, 0x0f, + 0x2a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x49, 0x4e, + 0x47, 0x2a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, + 0x44, 0x2a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, + 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x2a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x52, 0x45, 0x53, 0x48, 0x41, 0x42, 0x4c, 0x45, + 0x2a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x52, 0x45, 0x53, 0x48, 0x49, + 0x4e, 0x47, 0x22, 0xf9, 0x03, 0x0a, 0x0e, 0x57, 0x61, 0x69, 0x74, 0x53, 0x74, 0x65, 0x70, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x1b, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x53, 0x0a, 0x04, + 0x75, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x63, 0x6f, 0x69, + 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, + 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, + 0x61, 0x69, 0x74, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x57, 0x61, + 0x69, 0x74, 0x55, 0x6e, 0x69, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x75, 0x6e, 0x69, + 0x74, 0x12, 0x52, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x37, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x08, 0x57, 0x61, 0x69, 0x74, 0x55, 0x6e, + 0x69, 0x74, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, + 0x11, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, + 0x44, 0x53, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x49, + 0x54, 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x41, + 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x45, 0x50, 0x4f, 0x43, 0x48, 0x53, 0x10, 0x03, + 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x43, 0x48, + 0x45, 0x43, 0x4b, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x53, 0x10, 0x04, 0x22, 0x61, 0x0a, 0x05, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x50, + 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x22, 0xa6, + 0x02, 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x65, 0x70, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x5c, 0x0a, 0x0e, 0x74, 0x78, 0x5f, 0x73, + 0x74, 0x65, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x0c, 0x74, 0x78, 0x53, 0x74, 0x65, 0x70, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x62, 0x0a, 0x10, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x73, + 0x74, 0x65, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x31, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x0e, 0x77, 0x61, 0x69, 0x74, + 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x3a, 0x31, 0x92, 0x41, 0x2e, 0x0a, + 0x2c, 0x2a, 0x2a, 0x54, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x69, 0x6e, + 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x08, 0x0a, + 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x86, 0x09, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, + 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7d, 0x0a, 0x19, 0x73, 0x6f, + 0x6c, 0x61, 0x6e, 0x61, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, + 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x48, 0x00, + 0x52, 0x17, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x90, 0x01, 0x0a, 0x20, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x69, 0x6c, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x48, 0x00, 0x52, 0x1d, 0x65, + 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x4c, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x63, 0x6f, + 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x0f, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x65, 0x70, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x65, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, + 0x65, 0x70, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x6b, 0x69, 0x70, 0x5f, + 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, + 0x61, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x6d, + 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xf6, 0x01, 0x0a, 0x05, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, + 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, + 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x49, + 0x4e, 0x47, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, + 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, + 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, + 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x23, 0x0a, 0x1f, 0x53, 0x54, 0x41, 0x54, 0x45, + 0x5f, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x54, + 0x5f, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x10, 0x09, 0x22, 0x04, 0x08, 0x05, + 0x10, 0x08, 0x2a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, + 0x49, 0x4e, 0x47, 0x2a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, + 0x4c, 0x45, 0x44, 0x2a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, + 0x4c, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x2a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x52, 0x45, 0x53, 0x48, 0x41, 0x42, + 0x4c, 0x45, 0x3a, 0x60, 0xea, 0x41, 0x5d, 0x0a, 0x1d, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x7d, 0x2a, + 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x32, 0x08, 0x77, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x14, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, + 0x22, 0xa4, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x1f, 0x12, 0x1d, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x08, 0x77, 0x6f, 0x72, + 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, + 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6f, + 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x4f, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x57, 0x6f, + 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x69, + 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb8, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, + 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x12, 0x1d, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x8a, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, + 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, + 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x09, 0x77, + 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x22, 0x67, 0x0a, 0x1a, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x66, + 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x65, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, + 0x12, 0x17, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x58, 0x5a, 0x56, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, + 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, + 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x6f, 0x72, 0x63, 0x68, 0x65, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_coinbase_staking_orchestration_v1_workflow_proto_rawDescOnce sync.Once + file_coinbase_staking_orchestration_v1_workflow_proto_rawDescData = file_coinbase_staking_orchestration_v1_workflow_proto_rawDesc +) + +func file_coinbase_staking_orchestration_v1_workflow_proto_rawDescGZIP() []byte { + file_coinbase_staking_orchestration_v1_workflow_proto_rawDescOnce.Do(func() { + file_coinbase_staking_orchestration_v1_workflow_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_orchestration_v1_workflow_proto_rawDescData) + }) + return file_coinbase_staking_orchestration_v1_workflow_proto_rawDescData +} + +var file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_coinbase_staking_orchestration_v1_workflow_proto_goTypes = []interface{}{ + (TxStepOutput_State)(0), // 0: coinbase.staking.orchestration.v1.TxStepOutput.State + (WaitStepOutput_WaitUnit)(0), // 1: coinbase.staking.orchestration.v1.WaitStepOutput.WaitUnit + (WaitStepOutput_State)(0), // 2: coinbase.staking.orchestration.v1.WaitStepOutput.State + (Workflow_State)(0), // 3: coinbase.staking.orchestration.v1.Workflow.State + (*TxStepOutput)(nil), // 4: coinbase.staking.orchestration.v1.TxStepOutput + (*WaitStepOutput)(nil), // 5: coinbase.staking.orchestration.v1.WaitStepOutput + (*WorkflowStep)(nil), // 6: coinbase.staking.orchestration.v1.WorkflowStep + (*Workflow)(nil), // 7: coinbase.staking.orchestration.v1.Workflow + (*CreateWorkflowRequest)(nil), // 8: coinbase.staking.orchestration.v1.CreateWorkflowRequest + (*GetWorkflowRequest)(nil), // 9: coinbase.staking.orchestration.v1.GetWorkflowRequest + (*ListWorkflowsRequest)(nil), // 10: coinbase.staking.orchestration.v1.ListWorkflowsRequest + (*ListWorkflowsResponse)(nil), // 11: coinbase.staking.orchestration.v1.ListWorkflowsResponse + (*PerformWorkflowStepRequest)(nil), // 12: coinbase.staking.orchestration.v1.PerformWorkflowStepRequest + (*SolanaStakingParameters)(nil), // 13: coinbase.staking.orchestration.v1.SolanaStakingParameters + (*EthereumKilnStakingParameters)(nil), // 14: coinbase.staking.orchestration.v1.EthereumKilnStakingParameters + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp +} +var file_coinbase_staking_orchestration_v1_workflow_proto_depIdxs = []int32{ + 0, // 0: coinbase.staking.orchestration.v1.TxStepOutput.state:type_name -> coinbase.staking.orchestration.v1.TxStepOutput.State + 1, // 1: coinbase.staking.orchestration.v1.WaitStepOutput.unit:type_name -> coinbase.staking.orchestration.v1.WaitStepOutput.WaitUnit + 2, // 2: coinbase.staking.orchestration.v1.WaitStepOutput.state:type_name -> coinbase.staking.orchestration.v1.WaitStepOutput.State + 4, // 3: coinbase.staking.orchestration.v1.WorkflowStep.tx_step_output:type_name -> coinbase.staking.orchestration.v1.TxStepOutput + 5, // 4: coinbase.staking.orchestration.v1.WorkflowStep.wait_step_output:type_name -> coinbase.staking.orchestration.v1.WaitStepOutput + 13, // 5: coinbase.staking.orchestration.v1.Workflow.solana_staking_parameters:type_name -> coinbase.staking.orchestration.v1.SolanaStakingParameters + 14, // 6: coinbase.staking.orchestration.v1.Workflow.ethereum_kiln_staking_parameters:type_name -> coinbase.staking.orchestration.v1.EthereumKilnStakingParameters + 3, // 7: coinbase.staking.orchestration.v1.Workflow.state:type_name -> coinbase.staking.orchestration.v1.Workflow.State + 6, // 8: coinbase.staking.orchestration.v1.Workflow.steps:type_name -> coinbase.staking.orchestration.v1.WorkflowStep + 15, // 9: coinbase.staking.orchestration.v1.Workflow.create_time:type_name -> google.protobuf.Timestamp + 15, // 10: coinbase.staking.orchestration.v1.Workflow.update_time:type_name -> google.protobuf.Timestamp + 15, // 11: coinbase.staking.orchestration.v1.Workflow.complete_time:type_name -> google.protobuf.Timestamp + 7, // 12: coinbase.staking.orchestration.v1.CreateWorkflowRequest.workflow:type_name -> coinbase.staking.orchestration.v1.Workflow + 7, // 13: coinbase.staking.orchestration.v1.ListWorkflowsResponse.workflows:type_name -> coinbase.staking.orchestration.v1.Workflow + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_coinbase_staking_orchestration_v1_workflow_proto_init() } +func file_coinbase_staking_orchestration_v1_workflow_proto_init() { + if File_coinbase_staking_orchestration_v1_workflow_proto != nil { + return + } + file_coinbase_staking_orchestration_v1_ethereum_kiln_proto_init() + file_coinbase_staking_orchestration_v1_solana_proto_init() + if !protoimpl.UnsafeEnabled { + file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TxStepOutput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WaitStepOutput); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WorkflowStep); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Workflow); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateWorkflowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetWorkflowRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkflowsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListWorkflowsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PerformWorkflowStepRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*WorkflowStep_TxStepOutput)(nil), + (*WorkflowStep_WaitStepOutput)(nil), + } + file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*Workflow_SolanaStakingParameters)(nil), + (*Workflow_EthereumKilnStakingParameters)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_coinbase_staking_orchestration_v1_workflow_proto_rawDesc, + NumEnums: 4, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_coinbase_staking_orchestration_v1_workflow_proto_goTypes, + DependencyIndexes: file_coinbase_staking_orchestration_v1_workflow_proto_depIdxs, + EnumInfos: file_coinbase_staking_orchestration_v1_workflow_proto_enumTypes, + MessageInfos: file_coinbase_staking_orchestration_v1_workflow_proto_msgTypes, + }.Build() + File_coinbase_staking_orchestration_v1_workflow_proto = out.File + file_coinbase_staking_orchestration_v1_workflow_proto_rawDesc = nil + file_coinbase_staking_orchestration_v1_workflow_proto_goTypes = nil + file_coinbase_staking_orchestration_v1_workflow_proto_depIdxs = nil +} diff --git a/gen/go/coinbase/staking/v1alpha1/workflow_aip.go b/gen/go/coinbase/staking/orchestration/v1/workflow_aip.go similarity index 94% rename from gen/go/coinbase/staking/v1alpha1/workflow_aip.go rename to gen/go/coinbase/staking/orchestration/v1/workflow_aip.go index da47662..e2dad6f 100644 --- a/gen/go/coinbase/staking/v1alpha1/workflow_aip.go +++ b/gen/go/coinbase/staking/orchestration/v1/workflow_aip.go @@ -3,9 +3,9 @@ // versions: // protoc-gen-go-aip development // protoc (unknown) -// source: coinbase/staking/v1alpha1/workflow.proto +// source: coinbase/staking/orchestration/v1/workflow.proto -package v1alpha1 +package v1 import ( fmt "fmt" diff --git a/gen/go/coinbase/staking/rewards/v1/common.pb.go b/gen/go/coinbase/staking/rewards/v1/common.pb.go new file mode 100644 index 0000000..fbda09a --- /dev/null +++ b/gen/go/coinbase/staking/rewards/v1/common.pb.go @@ -0,0 +1,191 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: coinbase/staking/rewards/v1/common.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Amount encapsulation for a given asset. +type AssetAmount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The amount of the asset in the most common denomination. + // Ex: ETH (converted from gwei) + // Ex: USD (converted from fractional pennies) + Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` + // The number of decimals needed to convert from the raw numeric value to the most + // common denomination. + Exp string `protobuf:"bytes,2,opt,name=exp,proto3" json:"exp,omitempty"` + // The ticker of this asset (ex: USD, ETH, SOL). + Ticker string `protobuf:"bytes,3,opt,name=ticker,proto3" json:"ticker,omitempty"` + // The raw, unadulterated numeric value. + // Ex: Wei (in Ethereum) and Lamports (in Solana). + RawNumeric string `protobuf:"bytes,4,opt,name=raw_numeric,json=rawNumeric,proto3" json:"raw_numeric,omitempty"` +} + +func (x *AssetAmount) Reset() { + *x = AssetAmount{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_rewards_v1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssetAmount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssetAmount) ProtoMessage() {} + +func (x *AssetAmount) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_rewards_v1_common_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssetAmount.ProtoReflect.Descriptor instead. +func (*AssetAmount) Descriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_common_proto_rawDescGZIP(), []int{0} +} + +func (x *AssetAmount) GetAmount() string { + if x != nil { + return x.Amount + } + return "" +} + +func (x *AssetAmount) GetExp() string { + if x != nil { + return x.Exp + } + return "" +} + +func (x *AssetAmount) GetTicker() string { + if x != nil { + return x.Ticker + } + return "" +} + +func (x *AssetAmount) GetRawNumeric() string { + if x != nil { + return x.RawNumeric + } + return "" +} + +var File_coinbase_staking_rewards_v1_common_proto protoreflect.FileDescriptor + +var file_coinbase_staking_rewards_v1_common_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x63, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84, 0x01, 0x0a, 0x0b, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x15, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x1b, 0x0a, 0x06, + 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0b, 0x72, 0x61, 0x77, + 0x5f, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x72, 0x61, 0x77, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x42, + 0x52, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, + 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_coinbase_staking_rewards_v1_common_proto_rawDescOnce sync.Once + file_coinbase_staking_rewards_v1_common_proto_rawDescData = file_coinbase_staking_rewards_v1_common_proto_rawDesc +) + +func file_coinbase_staking_rewards_v1_common_proto_rawDescGZIP() []byte { + file_coinbase_staking_rewards_v1_common_proto_rawDescOnce.Do(func() { + file_coinbase_staking_rewards_v1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_rewards_v1_common_proto_rawDescData) + }) + return file_coinbase_staking_rewards_v1_common_proto_rawDescData +} + +var file_coinbase_staking_rewards_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_coinbase_staking_rewards_v1_common_proto_goTypes = []interface{}{ + (*AssetAmount)(nil), // 0: coinbase.staking.rewards.v1.AssetAmount +} +var file_coinbase_staking_rewards_v1_common_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_coinbase_staking_rewards_v1_common_proto_init() } +func file_coinbase_staking_rewards_v1_common_proto_init() { + if File_coinbase_staking_rewards_v1_common_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_coinbase_staking_rewards_v1_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssetAmount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_coinbase_staking_rewards_v1_common_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_coinbase_staking_rewards_v1_common_proto_goTypes, + DependencyIndexes: file_coinbase_staking_rewards_v1_common_proto_depIdxs, + MessageInfos: file_coinbase_staking_rewards_v1_common_proto_msgTypes, + }.Build() + File_coinbase_staking_rewards_v1_common_proto = out.File + file_coinbase_staking_rewards_v1_common_proto_rawDesc = nil + file_coinbase_staking_rewards_v1_common_proto_goTypes = nil + file_coinbase_staking_rewards_v1_common_proto_depIdxs = nil +} diff --git a/gen/go/coinbase/staking/rewards/v1/protocol.pb.go b/gen/go/coinbase/staking/rewards/v1/protocol.pb.go new file mode 100644 index 0000000..259dcb4 --- /dev/null +++ b/gen/go/coinbase/staking/rewards/v1/protocol.pb.go @@ -0,0 +1,161 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: coinbase/staking/rewards/v1/protocol.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A resource for a protocol. +type Protocol struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the protocol (eg. ethereum, solana, cosmos, etc.). + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Protocol) Reset() { + *x = Protocol{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_rewards_v1_protocol_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Protocol) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Protocol) ProtoMessage() {} + +func (x *Protocol) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_rewards_v1_protocol_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Protocol.ProtoReflect.Descriptor instead. +func (*Protocol) Descriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_protocol_proto_rawDescGZIP(), []int{0} +} + +func (x *Protocol) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +var File_coinbase_staking_rewards_v1_protocol_proto protoreflect.FileDescriptor + +var file_coinbase_staking_rewards_v1_protocol_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x63, 0x6f, + 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, + 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x76, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x51, 0xea, 0x41, 0x4e, 0x0a, + 0x21, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x12, 0x14, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x7d, 0x2a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x73, 0x32, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x52, 0x5a, + 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, + 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x76, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_coinbase_staking_rewards_v1_protocol_proto_rawDescOnce sync.Once + file_coinbase_staking_rewards_v1_protocol_proto_rawDescData = file_coinbase_staking_rewards_v1_protocol_proto_rawDesc +) + +func file_coinbase_staking_rewards_v1_protocol_proto_rawDescGZIP() []byte { + file_coinbase_staking_rewards_v1_protocol_proto_rawDescOnce.Do(func() { + file_coinbase_staking_rewards_v1_protocol_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_rewards_v1_protocol_proto_rawDescData) + }) + return file_coinbase_staking_rewards_v1_protocol_proto_rawDescData +} + +var file_coinbase_staking_rewards_v1_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_coinbase_staking_rewards_v1_protocol_proto_goTypes = []interface{}{ + (*Protocol)(nil), // 0: coinbase.staking.rewards.v1.Protocol +} +var file_coinbase_staking_rewards_v1_protocol_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_coinbase_staking_rewards_v1_protocol_proto_init() } +func file_coinbase_staking_rewards_v1_protocol_proto_init() { + if File_coinbase_staking_rewards_v1_protocol_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_coinbase_staking_rewards_v1_protocol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Protocol); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_coinbase_staking_rewards_v1_protocol_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_coinbase_staking_rewards_v1_protocol_proto_goTypes, + DependencyIndexes: file_coinbase_staking_rewards_v1_protocol_proto_depIdxs, + MessageInfos: file_coinbase_staking_rewards_v1_protocol_proto_msgTypes, + }.Build() + File_coinbase_staking_rewards_v1_protocol_proto = out.File + file_coinbase_staking_rewards_v1_protocol_proto_rawDesc = nil + file_coinbase_staking_rewards_v1_protocol_proto_goTypes = nil + file_coinbase_staking_rewards_v1_protocol_proto_depIdxs = nil +} diff --git a/gen/go/coinbase/staking/v1alpha1/protocol_aip.go b/gen/go/coinbase/staking/rewards/v1/protocol_aip.go similarity index 93% rename from gen/go/coinbase/staking/v1alpha1/protocol_aip.go rename to gen/go/coinbase/staking/rewards/v1/protocol_aip.go index 378b17e..b8d4491 100644 --- a/gen/go/coinbase/staking/v1alpha1/protocol_aip.go +++ b/gen/go/coinbase/staking/rewards/v1/protocol_aip.go @@ -3,9 +3,9 @@ // versions: // protoc-gen-go-aip development // protoc (unknown) -// source: coinbase/staking/v1alpha1/protocol.proto +// source: coinbase/staking/rewards/v1/protocol.proto -package v1alpha1 +package v1 import ( fmt "fmt" diff --git a/gen/go/coinbase/staking/rewards/v1/reward.pb.go b/gen/go/coinbase/staking/rewards/v1/reward.pb.go new file mode 100644 index 0000000..5d0e614 --- /dev/null +++ b/gen/go/coinbase/staking/rewards/v1/reward.pb.go @@ -0,0 +1,788 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: coinbase/staking/rewards/v1/reward.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The unit of time that the reward events were aggregated by. +type AggregationUnit int32 + +const ( + // Aggregation unit is unknown or unspecified. + AggregationUnit_AGGREGATION_UNIT_UNSPECIFIED AggregationUnit = 0 + // Indicates the rewards are aggregated by epoch. This means there will be a 'epoch' field displaying the epoch on this resource. + AggregationUnit_EPOCH AggregationUnit = 1 + // Indicates the rewards are aggregated by day. This means there will be a 'date' field displaying the date on this resource. + AggregationUnit_DAY AggregationUnit = 2 +) + +// Enum value maps for AggregationUnit. +var ( + AggregationUnit_name = map[int32]string{ + 0: "AGGREGATION_UNIT_UNSPECIFIED", + 1: "EPOCH", + 2: "DAY", + } + AggregationUnit_value = map[string]int32{ + "AGGREGATION_UNIT_UNSPECIFIED": 0, + "EPOCH": 1, + "DAY": 2, + } +) + +func (x AggregationUnit) Enum() *AggregationUnit { + p := new(AggregationUnit) + *p = x + return p +} + +func (x AggregationUnit) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AggregationUnit) Descriptor() protoreflect.EnumDescriptor { + return file_coinbase_staking_rewards_v1_reward_proto_enumTypes[0].Descriptor() +} + +func (AggregationUnit) Type() protoreflect.EnumType { + return &file_coinbase_staking_rewards_v1_reward_proto_enumTypes[0] +} + +func (x AggregationUnit) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AggregationUnit.Descriptor instead. +func (AggregationUnit) EnumDescriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_reward_proto_rawDescGZIP(), []int{0} +} + +// The source of the USD price conversion. +type USDValue_Source int32 + +const ( + // The USD value source is unknown or unspecified. + USDValue_SOURCE_UNSPECIFIED USDValue_Source = 0 + // The USD value source is the Coinbase exchange. + USDValue_COINBASE_EXCHANGE USDValue_Source = 1 +) + +// Enum value maps for USDValue_Source. +var ( + USDValue_Source_name = map[int32]string{ + 0: "SOURCE_UNSPECIFIED", + 1: "COINBASE_EXCHANGE", + } + USDValue_Source_value = map[string]int32{ + "SOURCE_UNSPECIFIED": 0, + "COINBASE_EXCHANGE": 1, + } +) + +func (x USDValue_Source) Enum() *USDValue_Source { + p := new(USDValue_Source) + *p = x + return p +} + +func (x USDValue_Source) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (USDValue_Source) Descriptor() protoreflect.EnumDescriptor { + return file_coinbase_staking_rewards_v1_reward_proto_enumTypes[1].Descriptor() +} + +func (USDValue_Source) Type() protoreflect.EnumType { + return &file_coinbase_staking_rewards_v1_reward_proto_enumTypes[1] +} + +func (x USDValue_Source) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use USDValue_Source.Descriptor instead. +func (USDValue_Source) EnumDescriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_reward_proto_rawDescGZIP(), []int{1, 0} +} + +// Rewards earned within a particular period of time. +// (-- api-linter: core::0123::resource-name-field=disabled +// +// aip.dev/not-precedent: Not including a 'name' field till our data sources support a unique identifier --) +type Reward struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address that earned this reward. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // The period identifier of this reward aggregation. ex: epoch number, date. + // + // Types that are assignable to PeriodIdentifier: + // + // *Reward_Epoch + // *Reward_Date + PeriodIdentifier isReward_PeriodIdentifier `protobuf_oneof:"period_identifier"` + // The unit of time that the reward events were rolled up by. + // Can be either "epoch" or "daily". + AggregationUnit AggregationUnit `protobuf:"varint,4,opt,name=aggregation_unit,json=aggregationUnit,proto3,enum=coinbase.staking.rewards.v1.AggregationUnit" json:"aggregation_unit,omitempty"` + // The starting time of this reward period. Returned when querying by epoch. + // Timestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2024-11-13T19:38:36Z). + // Field currently unavailable. Coming soon. + PeriodStartTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=period_start_time,json=periodStartTime,proto3" json:"period_start_time,omitempty"` + // The ending time of this reward period. Returned when querying by epoch. + // Timestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2024-11-13T19:38:36Z). + PeriodEndTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=period_end_time,json=periodEndTime,proto3" json:"period_end_time,omitempty"` + // The amount earned in this time period in the native unit of the protocol. + TotalEarnedNativeUnit *AssetAmount `protobuf:"bytes,7,opt,name=total_earned_native_unit,json=totalEarnedNativeUnit,proto3" json:"total_earned_native_unit,omitempty"` + // The amount earned in this time period in USD. Calculated by getting each individual reward of this + // time period and summing the USD value of each individual component. USD value is calculate at + // the time each component was earned. + TotalEarnedUsd []*USDValue `protobuf:"bytes,8,rep,name=total_earned_usd,json=totalEarnedUsd,proto3" json:"total_earned_usd,omitempty"` + // A snapshot of the staking balance the end of this period. + // Field currently unavailable. Coming soon. + EndingBalance *Stake `protobuf:"bytes,9,opt,name=ending_balance,json=endingBalance,proto3" json:"ending_balance,omitempty"` + // The protocol on which this reward was earned. + Protocol string `protobuf:"bytes,11,opt,name=protocol,proto3" json:"protocol,omitempty"` +} + +func (x *Reward) Reset() { + *x = Reward{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_rewards_v1_reward_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Reward) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Reward) ProtoMessage() {} + +func (x *Reward) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_rewards_v1_reward_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Reward.ProtoReflect.Descriptor instead. +func (*Reward) Descriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_reward_proto_rawDescGZIP(), []int{0} +} + +func (x *Reward) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (m *Reward) GetPeriodIdentifier() isReward_PeriodIdentifier { + if m != nil { + return m.PeriodIdentifier + } + return nil +} + +func (x *Reward) GetEpoch() int64 { + if x, ok := x.GetPeriodIdentifier().(*Reward_Epoch); ok { + return x.Epoch + } + return 0 +} + +func (x *Reward) GetDate() string { + if x, ok := x.GetPeriodIdentifier().(*Reward_Date); ok { + return x.Date + } + return "" +} + +func (x *Reward) GetAggregationUnit() AggregationUnit { + if x != nil { + return x.AggregationUnit + } + return AggregationUnit_AGGREGATION_UNIT_UNSPECIFIED +} + +func (x *Reward) GetPeriodStartTime() *timestamppb.Timestamp { + if x != nil { + return x.PeriodStartTime + } + return nil +} + +func (x *Reward) GetPeriodEndTime() *timestamppb.Timestamp { + if x != nil { + return x.PeriodEndTime + } + return nil +} + +func (x *Reward) GetTotalEarnedNativeUnit() *AssetAmount { + if x != nil { + return x.TotalEarnedNativeUnit + } + return nil +} + +func (x *Reward) GetTotalEarnedUsd() []*USDValue { + if x != nil { + return x.TotalEarnedUsd + } + return nil +} + +func (x *Reward) GetEndingBalance() *Stake { + if x != nil { + return x.EndingBalance + } + return nil +} + +func (x *Reward) GetProtocol() string { + if x != nil { + return x.Protocol + } + return "" +} + +type isReward_PeriodIdentifier interface { + isReward_PeriodIdentifier() +} + +type Reward_Epoch struct { + // A unique identifier for the consensus-cycle of the blockchain. + Epoch int64 `protobuf:"varint,13,opt,name=epoch,proto3,oneof"` +} + +type Reward_Date struct { + // The date of the reward in format 'YYYY-MM-DD' in UTC. + // (-- api-linter: core::0142::time-field-type=disabled False positive. This isn't a timestamp, but a YYYY-MM-DD field --) + Date string `protobuf:"bytes,14,opt,name=date,proto3,oneof"` +} + +func (*Reward_Epoch) isReward_PeriodIdentifier() {} + +func (*Reward_Date) isReward_PeriodIdentifier() {} + +// Information regarding the USD value of a reward, with necessary context and metadata. +type USDValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The source of the USD price conversion. Could be internal to Coinbase, and external source, or any other source. + Source USDValue_Source `protobuf:"varint,1,opt,name=source,proto3,enum=coinbase.staking.rewards.v1.USDValue_Source" json:"source,omitempty"` + // The timestamp at which the USD value was sourced to convert the value into USD. + // This value is as close to the time the reward was earned as possible. + // Timestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2024-11-13T19:38:36Z). + ConversionTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=conversion_time,json=conversionTime,proto3" json:"conversion_time,omitempty"` + // The USD value of the reward at the conversion time. + Amount *AssetAmount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + // The price of the native unit at the conversion time. + ConversionPrice string `protobuf:"bytes,4,opt,name=conversion_price,json=conversionPrice,proto3" json:"conversion_price,omitempty"` +} + +func (x *USDValue) Reset() { + *x = USDValue{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_rewards_v1_reward_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *USDValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*USDValue) ProtoMessage() {} + +func (x *USDValue) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_rewards_v1_reward_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use USDValue.ProtoReflect.Descriptor instead. +func (*USDValue) Descriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_reward_proto_rawDescGZIP(), []int{1} +} + +func (x *USDValue) GetSource() USDValue_Source { + if x != nil { + return x.Source + } + return USDValue_SOURCE_UNSPECIFIED +} + +func (x *USDValue) GetConversionTime() *timestamppb.Timestamp { + if x != nil { + return x.ConversionTime + } + return nil +} + +func (x *USDValue) GetAmount() *AssetAmount { + if x != nil { + return x.Amount + } + return nil +} + +func (x *USDValue) GetConversionPrice() string { + if x != nil { + return x.ConversionPrice + } + return "" +} + +// The request message for ListRewards. +type ListRewardsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The protocol that the rewards were earned on. + // The response will only include rewards for the protocol specified here. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of items to return. Maximum size of this value is 500. + // If user supplies a value > 500, the API will truncate to 500. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token as part of the response of a previous call. + // Provide this to retrieve the next page. + // + // When paginating, all other parameters must match the previous + // request to list resources correctly. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // [AIP-160](https://google.aip.dev/160) format compliant filter. Supported protocols are 'ethereum', 'solana', and 'cosmos'. + // Supplying other protocols will return an error. + // * **Ethereum**: + // - Fields: + // - `address` - A ethereum validator public key. + // - `date` - A date in format 'YYYY-MM-DD'. Supports multiple comparisons (ex: '2024-01-15). + // - `period_end_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z'). + // - Example(s): + // - `"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474' AND date >= '2024-01-01' AND date < '2024-01-15'"` + // - `"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474' AND period_end_time >= '2024-01-01T00:00:00Z' AND period_end_time < '2024-01-15T00:00:00Z'"` + // - `"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474' AND date = '2024-01-01'"` + // + // * **Solana**: + // - Fields: + // - `address` - A solana validator or delegator address. + // - `epoch` - A solana epoch. Supports epoch comparisons (ex: `epoch >= 1000 AND epoch <= 2000`). + // - `period_end_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z'). + // - Example(s): + // - `"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar' AND epoch >= 540 AND epoch < 550"` + // - `"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar' AND period_end_time >= '2024-01-01T00:00:00Z' AND period_end_time < '2024-01-15T00:00:00Z'"` + // - `"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar' AND epoch = 550"` + // + // * **Cosmos**: + // - Fields: + // - `address` - A cosmos validator or delegator address (ex: `cosmosvaloper1c4k24jzduc365kywrsvf5ujz4ya6mwympnc4en` and `cosmos1c4k24jzduc365kywrsvf5ujz4ya6mwymy8vq4q`) + // - `date` - A date in format 'YYYY-MM-DD'. Supports multiple comparisons (ex: '2024-01-15). + // - `period_end_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z'). + // - Example(s): + // - `"address='cosmos1mfduj0qax6ut8rd6cfc4j0ds06z0mwlhrljhqh' AND date = '2024-11-16'"` + // - `"address='cosmos1mfduj0qax6ut8rd6cfc4j0ds06z0mwlhrljhqh' AND period_end_time >= '2024-01-01T00:00:00Z' AND period_end_time < '2024-01-15T00:00:00Z'"` + // - `"address='cosmos1mfduj0qax6ut8rd6cfc4j0ds06z0mwlhrljhqh' AND date = '2024-01-01'"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListRewardsRequest) Reset() { + *x = ListRewardsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_rewards_v1_reward_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRewardsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRewardsRequest) ProtoMessage() {} + +func (x *ListRewardsRequest) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_rewards_v1_reward_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRewardsRequest.ProtoReflect.Descriptor instead. +func (*ListRewardsRequest) Descriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_reward_proto_rawDescGZIP(), []int{2} +} + +func (x *ListRewardsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListRewardsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListRewardsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListRewardsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// The response message for ListRewards. +type ListRewardsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The rewards returned in this response. + Rewards []*Reward `protobuf:"bytes,1,rep,name=rewards,proto3" json:"rewards,omitempty"` + // The page token the user must use in the next request if the next page is desired. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListRewardsResponse) Reset() { + *x = ListRewardsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_rewards_v1_reward_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListRewardsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListRewardsResponse) ProtoMessage() {} + +func (x *ListRewardsResponse) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_rewards_v1_reward_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListRewardsResponse.ProtoReflect.Descriptor instead. +func (*ListRewardsResponse) Descriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_reward_proto_rawDescGZIP(), []int{3} +} + +func (x *ListRewardsResponse) GetRewards() []*Reward { + if x != nil { + return x.Rewards + } + return nil +} + +func (x *ListRewardsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +var File_coinbase_staking_rewards_v1_reward_proto protoreflect.FileDescriptor + +var file_coinbase_staking_rewards_v1_reward_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x63, 0x6f, 0x69, 0x6e, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x28, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x27, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, + 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x06, 0x0a, 0x06, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x1b, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x19, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, 0x12, 0x5c, 0x0a, 0x10, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x69, + 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x4b, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x69, 0x6f, + 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x65, + 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, + 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x66, 0x0a, + 0x18, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x5f, 0x6e, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x15, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x4e, 0x61, 0x74, 0x69, 0x76, + 0x65, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x54, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, + 0x61, 0x72, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x53, + 0x44, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x45, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x55, 0x73, 0x64, 0x12, 0x4e, 0x0a, 0x0e, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x3a, 0x5c, 0xea, 0x41, + 0x59, 0x0a, 0x1f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x12, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x7d, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x2f, 0x7b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x7d, 0x2a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x32, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x13, 0x0a, 0x11, 0x70, 0x65, + 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x4a, + 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0xcf, 0x02, + 0x0a, 0x08, 0x55, 0x53, 0x44, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x49, 0x0a, 0x06, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x69, + 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x53, 0x44, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x45, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x28, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x37, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x16, 0x0a, 0x12, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x49, 0x4e, + 0x42, 0x41, 0x53, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x01, 0x22, + 0xba, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, + 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x86, 0x01, 0x0a, + 0x13, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x07, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x2b, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, + 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2a, 0x47, 0x0a, 0x0f, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x47, 0x47, 0x52, + 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x50, + 0x4f, 0x43, 0x48, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x41, 0x59, 0x10, 0x02, 0x42, 0x52, + 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, + 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, + 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, + 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_coinbase_staking_rewards_v1_reward_proto_rawDescOnce sync.Once + file_coinbase_staking_rewards_v1_reward_proto_rawDescData = file_coinbase_staking_rewards_v1_reward_proto_rawDesc +) + +func file_coinbase_staking_rewards_v1_reward_proto_rawDescGZIP() []byte { + file_coinbase_staking_rewards_v1_reward_proto_rawDescOnce.Do(func() { + file_coinbase_staking_rewards_v1_reward_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_rewards_v1_reward_proto_rawDescData) + }) + return file_coinbase_staking_rewards_v1_reward_proto_rawDescData +} + +var file_coinbase_staking_rewards_v1_reward_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_coinbase_staking_rewards_v1_reward_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_coinbase_staking_rewards_v1_reward_proto_goTypes = []interface{}{ + (AggregationUnit)(0), // 0: coinbase.staking.rewards.v1.AggregationUnit + (USDValue_Source)(0), // 1: coinbase.staking.rewards.v1.USDValue.Source + (*Reward)(nil), // 2: coinbase.staking.rewards.v1.Reward + (*USDValue)(nil), // 3: coinbase.staking.rewards.v1.USDValue + (*ListRewardsRequest)(nil), // 4: coinbase.staking.rewards.v1.ListRewardsRequest + (*ListRewardsResponse)(nil), // 5: coinbase.staking.rewards.v1.ListRewardsResponse + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*AssetAmount)(nil), // 7: coinbase.staking.rewards.v1.AssetAmount + (*Stake)(nil), // 8: coinbase.staking.rewards.v1.Stake +} +var file_coinbase_staking_rewards_v1_reward_proto_depIdxs = []int32{ + 0, // 0: coinbase.staking.rewards.v1.Reward.aggregation_unit:type_name -> coinbase.staking.rewards.v1.AggregationUnit + 6, // 1: coinbase.staking.rewards.v1.Reward.period_start_time:type_name -> google.protobuf.Timestamp + 6, // 2: coinbase.staking.rewards.v1.Reward.period_end_time:type_name -> google.protobuf.Timestamp + 7, // 3: coinbase.staking.rewards.v1.Reward.total_earned_native_unit:type_name -> coinbase.staking.rewards.v1.AssetAmount + 3, // 4: coinbase.staking.rewards.v1.Reward.total_earned_usd:type_name -> coinbase.staking.rewards.v1.USDValue + 8, // 5: coinbase.staking.rewards.v1.Reward.ending_balance:type_name -> coinbase.staking.rewards.v1.Stake + 1, // 6: coinbase.staking.rewards.v1.USDValue.source:type_name -> coinbase.staking.rewards.v1.USDValue.Source + 6, // 7: coinbase.staking.rewards.v1.USDValue.conversion_time:type_name -> google.protobuf.Timestamp + 7, // 8: coinbase.staking.rewards.v1.USDValue.amount:type_name -> coinbase.staking.rewards.v1.AssetAmount + 2, // 9: coinbase.staking.rewards.v1.ListRewardsResponse.rewards:type_name -> coinbase.staking.rewards.v1.Reward + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_coinbase_staking_rewards_v1_reward_proto_init() } +func file_coinbase_staking_rewards_v1_reward_proto_init() { + if File_coinbase_staking_rewards_v1_reward_proto != nil { + return + } + file_coinbase_staking_rewards_v1_common_proto_init() + file_coinbase_staking_rewards_v1_stake_proto_init() + if !protoimpl.UnsafeEnabled { + file_coinbase_staking_rewards_v1_reward_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Reward); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_rewards_v1_reward_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*USDValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_rewards_v1_reward_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRewardsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_rewards_v1_reward_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListRewardsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_coinbase_staking_rewards_v1_reward_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*Reward_Epoch)(nil), + (*Reward_Date)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_coinbase_staking_rewards_v1_reward_proto_rawDesc, + NumEnums: 2, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_coinbase_staking_rewards_v1_reward_proto_goTypes, + DependencyIndexes: file_coinbase_staking_rewards_v1_reward_proto_depIdxs, + EnumInfos: file_coinbase_staking_rewards_v1_reward_proto_enumTypes, + MessageInfos: file_coinbase_staking_rewards_v1_reward_proto_msgTypes, + }.Build() + File_coinbase_staking_rewards_v1_reward_proto = out.File + file_coinbase_staking_rewards_v1_reward_proto_rawDesc = nil + file_coinbase_staking_rewards_v1_reward_proto_goTypes = nil + file_coinbase_staking_rewards_v1_reward_proto_depIdxs = nil +} diff --git a/gen/go/coinbase/staking/rewards/v1/reward_aip.go b/gen/go/coinbase/staking/rewards/v1/reward_aip.go new file mode 100644 index 0000000..dbb7053 --- /dev/null +++ b/gen/go/coinbase/staking/rewards/v1/reward_aip.go @@ -0,0 +1,78 @@ +// Code generated by protoc-gen-go-aip. DO NOT EDIT. +// +// versions: +// protoc-gen-go-aip development +// protoc (unknown) +// source: coinbase/staking/rewards/v1/reward.proto + +package v1 + +import ( + fmt "fmt" + resourcename "go.einride.tech/aip/resourcename" + strings "strings" +) + +type RewardResourceName struct { + Protocol string + Reward string +} + +func (n ProtocolResourceName) RewardResourceName( + reward string, +) RewardResourceName { + return RewardResourceName{ + Protocol: n.Protocol, + Reward: reward, + } +} + +func (n RewardResourceName) Validate() error { + if n.Protocol == "" { + return fmt.Errorf("protocol: empty") + } + if strings.IndexByte(n.Protocol, '/') != -1 { + return fmt.Errorf("protocol: contains illegal character '/'") + } + if n.Reward == "" { + return fmt.Errorf("reward: empty") + } + if strings.IndexByte(n.Reward, '/') != -1 { + return fmt.Errorf("reward: contains illegal character '/'") + } + return nil +} + +func (n RewardResourceName) ContainsWildcard() bool { + return false || n.Protocol == "-" || n.Reward == "-" +} + +func (n RewardResourceName) String() string { + return resourcename.Sprint( + "protocols/{protocol}/rewards/{reward}", + n.Protocol, + n.Reward, + ) +} + +func (n RewardResourceName) MarshalString() (string, error) { + if err := n.Validate(); err != nil { + return "", err + } + return n.String(), nil +} + +func (n *RewardResourceName) UnmarshalString(name string) error { + return resourcename.Sscan( + name, + "protocols/{protocol}/rewards/{reward}", + &n.Protocol, + &n.Reward, + ) +} + +func (n RewardResourceName) ProtocolResourceName() ProtocolResourceName { + return ProtocolResourceName{ + Protocol: n.Protocol, + } +} diff --git a/gen/go/coinbase/staking/rewards/v1/reward_service.pb.go b/gen/go/coinbase/staking/rewards/v1/reward_service.pb.go new file mode 100644 index 0000000..69de992 --- /dev/null +++ b/gen/go/coinbase/staking/rewards/v1/reward_service.pb.go @@ -0,0 +1,244 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: coinbase/staking/rewards/v1/reward_service.proto + +package v1 + +import ( + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_coinbase_staking_rewards_v1_reward_service_proto protoreflect.FileDescriptor + +var file_coinbase_staking_rewards_v1_reward_service_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1b, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x1a, + 0x28, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, + 0x67, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x63, 0x6f, 0x69, 0x6e, 0x62, + 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x84, 0x0e, 0x0a, 0x0d, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xdd, 0x09, 0x0a, 0x0b, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, + 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, + 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xea, + 0x08, 0x92, 0x41, 0xb5, 0x08, 0x0a, 0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x17, 0x4c, + 0x69, 0x73, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x72, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x1a, 0x80, 0x01, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x20, 0x6f, + 0x6e, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x20, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x20, 0x6f, + 0x66, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x66, 0x6f, 0x72, + 0x20, 0x61, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x61, 0x6c, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, + 0x74, 0x69, 0x6d, 0x65, 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2c, 0x20, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x2e, 0x4a, 0xf5, 0x05, 0x0a, 0x03, 0x32, 0x30, + 0x30, 0x12, 0xed, 0x05, 0x0a, 0x02, 0x4f, 0x4b, 0x12, 0xe6, 0x05, 0x32, 0xe3, 0x05, 0x7b, 0x22, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x62, 0x65, 0x65, 0x66, 0x4b, 0x47, 0x42, 0x57, 0x65, 0x53, + 0x70, 0x48, 0x7a, 0x59, 0x42, 0x48, 0x5a, 0x58, 0x77, 0x70, 0x35, 0x53, 0x6f, 0x37, 0x77, 0x64, + 0x51, 0x47, 0x58, 0x36, 0x6d, 0x75, 0x34, 0x5a, 0x48, 0x43, 0x73, 0x48, 0x33, 0x75, 0x54, 0x61, + 0x72, 0x22, 0x2c, 0x22, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x3a, 0x22, 0x35, 0x33, 0x33, 0x22, + 0x2c, 0x22, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x6e, 0x69, + 0x74, 0x22, 0x3a, 0x22, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x2c, 0x22, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x6e, 0x75, 0x6c, + 0x6c, 0x2c, 0x22, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x3a, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x31, 0x2d, 0x31, 0x36, 0x54, 0x30, 0x30, + 0x3a, 0x31, 0x33, 0x3a, 0x34, 0x34, 0x5a, 0x22, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, + 0x61, 0x72, 0x6e, 0x65, 0x64, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x22, + 0x3a, 0x7b, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, 0x22, 0x32, 0x32, 0x34, 0x2e, + 0x37, 0x30, 0x39, 0x38, 0x31, 0x34, 0x35, 0x22, 0x2c, 0x22, 0x65, 0x78, 0x70, 0x22, 0x3a, 0x22, + 0x39, 0x22, 0x2c, 0x22, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x22, 0x3a, 0x22, 0x53, 0x4f, 0x4c, + 0x22, 0x2c, 0x22, 0x72, 0x61, 0x77, 0x4e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x22, 0x3a, 0x22, + 0x32, 0x32, 0x34, 0x37, 0x30, 0x39, 0x38, 0x31, 0x34, 0x35, 0x30, 0x39, 0x22, 0x7d, 0x2c, 0x22, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x55, 0x73, 0x64, 0x22, 0x3a, + 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x22, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x22, 0x3a, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x22, 0x3a, 0x22, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x22, 0x7d, 0x2c, 0x7b, + 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x3a, 0x22, 0x62, 0x65, 0x65, 0x66, 0x4b, + 0x47, 0x42, 0x57, 0x65, 0x53, 0x70, 0x48, 0x7a, 0x59, 0x42, 0x48, 0x5a, 0x58, 0x77, 0x70, 0x35, + 0x53, 0x6f, 0x37, 0x77, 0x64, 0x51, 0x47, 0x58, 0x36, 0x6d, 0x75, 0x34, 0x5a, 0x48, 0x43, 0x73, + 0x48, 0x33, 0x75, 0x54, 0x61, 0x72, 0x22, 0x2c, 0x22, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x3a, + 0x22, 0x35, 0x33, 0x32, 0x22, 0x2c, 0x22, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x55, 0x6e, 0x69, 0x74, 0x22, 0x3a, 0x22, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x22, 0x2c, + 0x22, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x3a, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x22, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x45, 0x6e, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x32, 0x30, 0x32, 0x33, 0x2d, 0x31, 0x31, 0x2d, + 0x31, 0x33, 0x54, 0x31, 0x39, 0x3a, 0x33, 0x38, 0x3a, 0x33, 0x36, 0x5a, 0x22, 0x2c, 0x22, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x61, 0x72, 0x6e, 0x65, 0x64, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, + 0x55, 0x6e, 0x69, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3a, + 0x22, 0x32, 0x32, 0x35, 0x2e, 0x30, 0x37, 0x39, 0x34, 0x32, 0x34, 0x31, 0x22, 0x2c, 0x22, 0x65, + 0x78, 0x70, 0x22, 0x3a, 0x22, 0x39, 0x22, 0x2c, 0x22, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x22, + 0x3a, 0x22, 0x53, 0x4f, 0x4c, 0x22, 0x2c, 0x22, 0x72, 0x61, 0x77, 0x4e, 0x75, 0x6d, 0x65, 0x72, + 0x69, 0x63, 0x22, 0x3a, 0x22, 0x32, 0x32, 0x35, 0x30, 0x37, 0x39, 0x34, 0x32, 0x34, 0x30, 0x39, + 0x34, 0x22, 0x7d, 0x2c, 0x22, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x61, 0x72, 0x6e, 0x65, 0x64, + 0x55, 0x73, 0x64, 0x22, 0x3a, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x22, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x3a, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x22, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0x3a, 0x22, 0x73, 0x6f, 0x6c, 0x61, 0x6e, + 0x61, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0x3a, 0x22, 0x56, 0x41, 0x71, 0x6c, 0x2d, 0x77, 0x74, 0x64, 0x69, 0x4a, + 0x57, 0x6b, 0x57, 0x49, 0x49, 0x39, 0x62, 0x4a, 0x42, 0x44, 0x6e, 0x45, 0x39, 0x6f, 0x45, 0x63, + 0x2d, 0x38, 0x49, 0x6c, 0x67, 0x55, 0x30, 0x44, 0x74, 0x4b, 0x62, 0x78, 0x53, 0x44, 0x74, 0x42, + 0x67, 0x3d, 0x3a, 0x31, 0x3a, 0x31, 0x37, 0x30, 0x30, 0x32, 0x34, 0x31, 0x32, 0x37, 0x37, 0x22, + 0x7d, 0x4a, 0x96, 0x01, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, 0x8e, 0x01, 0x0a, 0x2c, 0x54, 0x68, + 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x65, 0x64, 0x20, 0x68, 0x61, 0x73, 0x20, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5e, 0x32, 0x5c, 0x7b, 0x22, + 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3a, 0x33, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0x3a, 0x22, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x2e, 0x20, 0x3c, 0x52, 0x65, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x73, 0x73, 0x69, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x3e, 0x2e, 0x22, 0x2c, 0x22, 0x64, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, + 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0xf3, 0x03, 0x0a, 0x0a, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x69, + 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, + 0x6b, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x69, + 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, + 0x6b, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x83, 0x03, 0x92, 0x41, + 0xcf, 0x02, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x20, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x1a, 0x56, 0x4c, 0x69, 0x73, + 0x74, 0x73, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x69, 0x6d, 0x65, + 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x2e, 0x4a, 0x33, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x2c, 0x0a, 0x02, 0x4f, 0x4b, + 0x12, 0x26, 0x0a, 0x24, 0x1a, 0x22, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4a, 0x96, 0x01, 0x0a, 0x03, 0x34, 0x30, 0x30, + 0x12, 0x8e, 0x01, 0x0a, 0x2c, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x20, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x65, 0x64, 0x20, 0x68, 0x61, 0x73, 0x20, 0x69, + 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x5e, 0x32, 0x5c, 0x7b, 0x22, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3a, 0x33, 0x2c, 0x22, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3a, 0x22, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x61, 0x69, 0x6c, + 0x65, 0x64, 0x2e, 0x20, 0x3c, 0x52, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x20, 0x61, 0x73, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, + 0x3e, 0x2e, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, + 0x7d, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, + 0x12, 0x1f, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x73, 0x1a, 0x1d, 0xca, 0x41, 0x1a, 0x61, 0x70, 0x69, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, + 0x70, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, + 0x42, 0xa7, 0x05, 0x92, 0x41, 0xd1, 0x04, 0x12, 0x5d, 0x0a, 0x0f, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x46, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x73, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x6e, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2c, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x65, 0x64, 0x20, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x20, 0x64, 0x61, 0x74, + 0x61, 0x2e, 0x32, 0x02, 0x76, 0x31, 0x1a, 0x1a, 0x61, 0x70, 0x69, 0x2e, 0x64, 0x65, 0x76, 0x65, + 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, + 0x6f, 0x6d, 0x22, 0x08, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2a, 0x01, 0x02, 0x32, + 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, + 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, + 0x73, 0x6f, 0x6e, 0x52, 0x4c, 0x0a, 0x03, 0x34, 0x30, 0x31, 0x12, 0x45, 0x0a, 0x31, 0x52, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x66, 0x20, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, + 0x10, 0x32, 0x0e, 0x22, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, + 0x22, 0x52, 0x76, 0x0a, 0x03, 0x35, 0x30, 0x30, 0x12, 0x6f, 0x0a, 0x2f, 0x52, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x20, 0x68, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x73, 0x2e, 0x12, 0x3c, 0x32, 0x3a, 0x7b, + 0x22, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3a, 0x33, 0x2c, 0x22, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x22, 0x3a, 0x22, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x22, 0x2c, 0x22, 0x64, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x6a, 0x6c, 0x0a, 0x06, 0x52, 0x65, 0x77, + 0x61, 0x72, 0x64, 0x12, 0x62, 0x41, 0x20, 0x68, 0x69, 0x67, 0x68, 0x2d, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x20, 0x76, 0x69, 0x65, 0x77, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x27, 0x73, 0x20, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x20, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x73, + 0x6f, 0x6d, 0x65, 0x20, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x69, + 0x6d, 0x65, 0x20, 0x28, 0x65, 0x78, 0x3a, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x61, 0x6e, 0x20, + 0x45, 0x70, 0x6f, 0x63, 0x68, 0x29, 0x2e, 0x6a, 0x6f, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x6b, 0x65, + 0x12, 0x66, 0x41, 0x20, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x20, 0x6f, 0x66, 0x20, + 0x61, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x27, 0x73, 0x20, 0x73, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x20, 0x61, 0x74, 0x20, 0x61, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, + 0x75, 0x6c, 0x61, 0x72, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x20, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x69, + 0x6e, 0x67, 0x20, 0x73, 0x6f, 0x6f, 0x6e, 0x2e, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, + 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, + 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, + 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var file_coinbase_staking_rewards_v1_reward_service_proto_goTypes = []interface{}{ + (*ListRewardsRequest)(nil), // 0: coinbase.staking.rewards.v1.ListRewardsRequest + (*ListStakesRequest)(nil), // 1: coinbase.staking.rewards.v1.ListStakesRequest + (*ListRewardsResponse)(nil), // 2: coinbase.staking.rewards.v1.ListRewardsResponse + (*ListStakesResponse)(nil), // 3: coinbase.staking.rewards.v1.ListStakesResponse +} +var file_coinbase_staking_rewards_v1_reward_service_proto_depIdxs = []int32{ + 0, // 0: coinbase.staking.rewards.v1.RewardService.ListRewards:input_type -> coinbase.staking.rewards.v1.ListRewardsRequest + 1, // 1: coinbase.staking.rewards.v1.RewardService.ListStakes:input_type -> coinbase.staking.rewards.v1.ListStakesRequest + 2, // 2: coinbase.staking.rewards.v1.RewardService.ListRewards:output_type -> coinbase.staking.rewards.v1.ListRewardsResponse + 3, // 3: coinbase.staking.rewards.v1.RewardService.ListStakes:output_type -> coinbase.staking.rewards.v1.ListStakesResponse + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_coinbase_staking_rewards_v1_reward_service_proto_init() } +func file_coinbase_staking_rewards_v1_reward_service_proto_init() { + if File_coinbase_staking_rewards_v1_reward_service_proto != nil { + return + } + file_coinbase_staking_rewards_v1_reward_proto_init() + file_coinbase_staking_rewards_v1_stake_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_coinbase_staking_rewards_v1_reward_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_coinbase_staking_rewards_v1_reward_service_proto_goTypes, + DependencyIndexes: file_coinbase_staking_rewards_v1_reward_service_proto_depIdxs, + }.Build() + File_coinbase_staking_rewards_v1_reward_service_proto = out.File + file_coinbase_staking_rewards_v1_reward_service_proto_rawDesc = nil + file_coinbase_staking_rewards_v1_reward_service_proto_goTypes = nil + file_coinbase_staking_rewards_v1_reward_service_proto_depIdxs = nil +} diff --git a/gen/go/coinbase/staking/rewards/v1/reward_service.pb.gw.go b/gen/go/coinbase/staking/rewards/v1/reward_service.pb.gw.go new file mode 100644 index 0000000..8922b61 --- /dev/null +++ b/gen/go/coinbase/staking/rewards/v1/reward_service.pb.gw.go @@ -0,0 +1,328 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: coinbase/staking/rewards/v1/reward_service.proto + +/* +Package v1 is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package v1 + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_RewardService_ListRewards_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} +) + +func request_RewardService_ListRewards_0(ctx context.Context, marshaler runtime.Marshaler, client RewardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListRewardsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RewardService_ListRewards_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListRewards(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_RewardService_ListRewards_0(ctx context.Context, marshaler runtime.Marshaler, server RewardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListRewardsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RewardService_ListRewards_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListRewards(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_RewardService_ListStakes_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} +) + +func request_RewardService_ListStakes_0(ctx context.Context, marshaler runtime.Marshaler, client RewardServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListStakesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RewardService_ListStakes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListStakes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_RewardService_ListStakes_0(ctx context.Context, marshaler runtime.Marshaler, server RewardServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListStakesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_RewardService_ListStakes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListStakes(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterRewardServiceHandlerServer registers the http handlers for service RewardService to "mux". +// UnaryRPC :call RewardServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRewardServiceHandlerFromEndpoint instead. +func RegisterRewardServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RewardServiceServer) error { + + mux.Handle("GET", pattern_RewardService_ListRewards_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.rewards.v1.RewardService/ListRewards", runtime.WithHTTPPathPattern("/v1/{parent=protocols/*}/rewards")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RewardService_ListRewards_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RewardService_ListRewards_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RewardService_ListStakes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/coinbase.staking.rewards.v1.RewardService/ListStakes", runtime.WithHTTPPathPattern("/v1/{parent=protocols/*}/stakes")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RewardService_ListStakes_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RewardService_ListStakes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterRewardServiceHandlerFromEndpoint is same as RegisterRewardServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterRewardServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterRewardServiceHandler(ctx, mux, conn) +} + +// RegisterRewardServiceHandler registers the http handlers for service RewardService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterRewardServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterRewardServiceHandlerClient(ctx, mux, NewRewardServiceClient(conn)) +} + +// RegisterRewardServiceHandlerClient registers the http handlers for service RewardService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RewardServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RewardServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "RewardServiceClient" to call the correct interceptors. +func RegisterRewardServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RewardServiceClient) error { + + mux.Handle("GET", pattern_RewardService_ListRewards_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.rewards.v1.RewardService/ListRewards", runtime.WithHTTPPathPattern("/v1/{parent=protocols/*}/rewards")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RewardService_ListRewards_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RewardService_ListRewards_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_RewardService_ListStakes_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) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/coinbase.staking.rewards.v1.RewardService/ListStakes", runtime.WithHTTPPathPattern("/v1/{parent=protocols/*}/stakes")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RewardService_ListStakes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_RewardService_ListStakes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_RewardService_ListRewards_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "protocols", "parent", "rewards"}, "")) + + pattern_RewardService_ListStakes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "protocols", "parent", "stakes"}, "")) +) + +var ( + forward_RewardService_ListRewards_0 = runtime.ForwardResponseMessage + + forward_RewardService_ListStakes_0 = runtime.ForwardResponseMessage +) diff --git a/gen/go/coinbase/staking/rewards/v1/reward_service_grpc.pb.go b/gen/go/coinbase/staking/rewards/v1/reward_service_grpc.pb.go new file mode 100644 index 0000000..2204c99 --- /dev/null +++ b/gen/go/coinbase/staking/rewards/v1/reward_service_grpc.pb.go @@ -0,0 +1,150 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: coinbase/staking/rewards/v1/reward_service.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + RewardService_ListRewards_FullMethodName = "/coinbase.staking.rewards.v1.RewardService/ListRewards" + RewardService_ListStakes_FullMethodName = "/coinbase.staking.rewards.v1.RewardService/ListStakes" +) + +// RewardServiceClient is the client API for RewardService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type RewardServiceClient interface { + // List rewards for a given protocol. + ListRewards(ctx context.Context, in *ListRewardsRequest, opts ...grpc.CallOption) (*ListRewardsResponse, error) + // List staking activities for a given protocol. + ListStakes(ctx context.Context, in *ListStakesRequest, opts ...grpc.CallOption) (*ListStakesResponse, error) +} + +type rewardServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewRewardServiceClient(cc grpc.ClientConnInterface) RewardServiceClient { + return &rewardServiceClient{cc} +} + +func (c *rewardServiceClient) ListRewards(ctx context.Context, in *ListRewardsRequest, opts ...grpc.CallOption) (*ListRewardsResponse, error) { + out := new(ListRewardsResponse) + err := c.cc.Invoke(ctx, RewardService_ListRewards_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *rewardServiceClient) ListStakes(ctx context.Context, in *ListStakesRequest, opts ...grpc.CallOption) (*ListStakesResponse, error) { + out := new(ListStakesResponse) + err := c.cc.Invoke(ctx, RewardService_ListStakes_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// RewardServiceServer is the server API for RewardService service. +// All implementations must embed UnimplementedRewardServiceServer +// for forward compatibility +type RewardServiceServer interface { + // List rewards for a given protocol. + ListRewards(context.Context, *ListRewardsRequest) (*ListRewardsResponse, error) + // List staking activities for a given protocol. + ListStakes(context.Context, *ListStakesRequest) (*ListStakesResponse, error) + mustEmbedUnimplementedRewardServiceServer() +} + +// UnimplementedRewardServiceServer must be embedded to have forward compatible implementations. +type UnimplementedRewardServiceServer struct { +} + +func (UnimplementedRewardServiceServer) ListRewards(context.Context, *ListRewardsRequest) (*ListRewardsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListRewards not implemented") +} +func (UnimplementedRewardServiceServer) ListStakes(context.Context, *ListStakesRequest) (*ListStakesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListStakes not implemented") +} +func (UnimplementedRewardServiceServer) mustEmbedUnimplementedRewardServiceServer() {} + +// UnsafeRewardServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to RewardServiceServer will +// result in compilation errors. +type UnsafeRewardServiceServer interface { + mustEmbedUnimplementedRewardServiceServer() +} + +func RegisterRewardServiceServer(s grpc.ServiceRegistrar, srv RewardServiceServer) { + s.RegisterService(&RewardService_ServiceDesc, srv) +} + +func _RewardService_ListRewards_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListRewardsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RewardServiceServer).ListRewards(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RewardService_ListRewards_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RewardServiceServer).ListRewards(ctx, req.(*ListRewardsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _RewardService_ListStakes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListStakesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RewardServiceServer).ListStakes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: RewardService_ListStakes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RewardServiceServer).ListStakes(ctx, req.(*ListStakesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// RewardService_ServiceDesc is the grpc.ServiceDesc for RewardService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var RewardService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "coinbase.staking.rewards.v1.RewardService", + HandlerType: (*RewardServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListRewards", + Handler: _RewardService_ListRewards_Handler, + }, + { + MethodName: "ListStakes", + Handler: _RewardService_ListStakes_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "coinbase/staking/rewards/v1/reward_service.proto", +} diff --git a/gen/go/coinbase/staking/rewards/v1/stake.pb.go b/gen/go/coinbase/staking/rewards/v1/stake.pb.go new file mode 100644 index 0000000..901bba3 --- /dev/null +++ b/gen/go/coinbase/staking/rewards/v1/stake.pb.go @@ -0,0 +1,865 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: coinbase/staking/rewards/v1/stake.proto + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/descriptorpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The participant type of a staking-related address. +type ParticipantType int32 + +const ( + // The participant type is unknown. + ParticipantType_PARTICIPANT_TYPE_UNSPECIFIED ParticipantType = 0 + // Used when the onchain participant type is a delegator + // (i.e. someone who delegates the responsibilities of validating blocks to another address in return for a share of the rewards). + ParticipantType_DELEGATOR ParticipantType = 1 + // Used when the onchain participant type is a validator + // (i.e. an address that is directly responsible for performing validation of blocks). + ParticipantType_VALIDATOR ParticipantType = 2 +) + +// Enum value maps for ParticipantType. +var ( + ParticipantType_name = map[int32]string{ + 0: "PARTICIPANT_TYPE_UNSPECIFIED", + 1: "DELEGATOR", + 2: "VALIDATOR", + } + ParticipantType_value = map[string]int32{ + "PARTICIPANT_TYPE_UNSPECIFIED": 0, + "DELEGATOR": 1, + "VALIDATOR": 2, + } +) + +func (x ParticipantType) Enum() *ParticipantType { + p := new(ParticipantType) + *p = x + return p +} + +func (x ParticipantType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ParticipantType) Descriptor() protoreflect.EnumDescriptor { + return file_coinbase_staking_rewards_v1_stake_proto_enumTypes[0].Descriptor() +} + +func (ParticipantType) Type() protoreflect.EnumType { + return &file_coinbase_staking_rewards_v1_stake_proto_enumTypes[0] +} + +func (x ParticipantType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ParticipantType.Descriptor instead. +func (ParticipantType) EnumDescriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_stake_proto_rawDescGZIP(), []int{0} +} + +// Representing the different methods of calculating yield. +type RewardRate_CalculationMethods int32 + +const ( + // Calculation method is unknown or unspecified. + RewardRate_CALCULATION_METHODS_UNSPECIFIED RewardRate_CalculationMethods = 0 + // A single Ethereum validator acting in isolation is currently not able to compound earned rewards because + // Ethereum only allows validators to stake 32 ETH precisely. + // This percentage yield is assuming that the rewards never compound, mimicking the behavior of a solo staker. + RewardRate_SOLO_STAKER RewardRate_CalculationMethods = 1 + // A pool of Ethereum validators of sufficient size is able to compound rewards almost immediately. + // This percentage yield is assuming rewards compound immediately, mimicking the behavior of a sufficiently large pool. + RewardRate_POOLED_STAKER RewardRate_CalculationMethods = 2 + // A Solana delegator's staking rewards are staked (and therefore auto-compound) when rewards are paid out between epochs. + // This percentage yield is assuming the rewards are auto-compounded on that schedule, mimicking a Solana delegator. + RewardRate_EPOCH_AUTO_COMPOUNDING RewardRate_CalculationMethods = 3 + // A Solana validator's rewards accumulate in a separate account from the validator's active stake. + // This percentage yield is assuming the rewards are not auto-compounded at any point, mimicking a Solana validator who never staked their rewards. + RewardRate_NO_AUTO_COMPOUNDING RewardRate_CalculationMethods = 4 +) + +// Enum value maps for RewardRate_CalculationMethods. +var ( + RewardRate_CalculationMethods_name = map[int32]string{ + 0: "CALCULATION_METHODS_UNSPECIFIED", + 1: "SOLO_STAKER", + 2: "POOLED_STAKER", + 3: "EPOCH_AUTO_COMPOUNDING", + 4: "NO_AUTO_COMPOUNDING", + } + RewardRate_CalculationMethods_value = map[string]int32{ + "CALCULATION_METHODS_UNSPECIFIED": 0, + "SOLO_STAKER": 1, + "POOLED_STAKER": 2, + "EPOCH_AUTO_COMPOUNDING": 3, + "NO_AUTO_COMPOUNDING": 4, + } +) + +func (x RewardRate_CalculationMethods) Enum() *RewardRate_CalculationMethods { + p := new(RewardRate_CalculationMethods) + *p = x + return p +} + +func (x RewardRate_CalculationMethods) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RewardRate_CalculationMethods) Descriptor() protoreflect.EnumDescriptor { + return file_coinbase_staking_rewards_v1_stake_proto_enumTypes[1].Descriptor() +} + +func (RewardRate_CalculationMethods) Type() protoreflect.EnumType { + return &file_coinbase_staking_rewards_v1_stake_proto_enumTypes[1] +} + +func (x RewardRate_CalculationMethods) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RewardRate_CalculationMethods.Descriptor instead. +func (RewardRate_CalculationMethods) EnumDescriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_stake_proto_rawDescGZIP(), []int{1, 0} +} + +// The representation of a staking activity at a particular point in time. +// (-- api-linter: core::0123::resource-name-field=disabled +// +// aip.dev/not-precedent: Not including a 'name' field till our data sources support a unique identifier --) +type Stake struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the staking balance. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // The time at which this balance was evaluated. + // Timestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2023-11-13T19:38:36Z). + EvaluationTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=evaluation_time,json=evaluationTime,proto3" json:"evaluation_time,omitempty"` + // The total amount of stake that is actively earning rewards to this address. + // Includes any delegated stake and self-stake. + // For delegators, this would be only the amount delegated to a validator in most cases. + // Only includes stake that is *actively contributing to rewards and can't be reduced + // without affecting the rewards dynamics*. + // + // Pending inactive stake is included. + // Pending active stake is not included. + BondedStake *AssetAmount `protobuf:"bytes,4,opt,name=bonded_stake,json=bondedStake,proto3" json:"bonded_stake,omitempty"` + // The amount of stake that this address receives from other addresses. + // For most delegators, this will be 0. + TotalDelegationReceived *AssetAmount `protobuf:"bytes,5,opt,name=total_delegation_received,json=totalDelegationReceived,proto3" json:"total_delegation_received,omitempty"` + // The list of individual delegations this address has received from other addresses + DelegationsReceived *Stake_Delegation `protobuf:"bytes,6,opt,name=delegations_received,json=delegationsReceived,proto3,oneof" json:"delegations_received,omitempty"` + // The amount that this address stakes to another address. + DelegationsGiven *Stake_Delegation `protobuf:"bytes,7,opt,name=delegations_given,json=delegationsGiven,proto3,oneof" json:"delegations_given,omitempty"` + // An estimated yield of this address. + RewardRateCalculations []*RewardRate `protobuf:"bytes,9,rep,name=reward_rate_calculations,json=rewardRateCalculations,proto3" json:"reward_rate_calculations,omitempty"` + // The participant type at the time of evaluation (i.e. validator, delegator). + ParticipantType ParticipantType `protobuf:"varint,10,opt,name=participant_type,json=participantType,proto3,enum=coinbase.staking.rewards.v1.ParticipantType" json:"participant_type,omitempty"` + // The protocol on which this staking balance exists. + Protocol string `protobuf:"bytes,12,opt,name=protocol,proto3" json:"protocol,omitempty"` + // The amount of stake that is not actively earning rewards to this address. + // This amount includes any native token balance that is under the domain and control of the address in question, + // but is not actively staked. + // + // Pending active stake would be included here. + UnbondedBalance *AssetAmount `protobuf:"bytes,13,opt,name=unbonded_balance,json=unbondedBalance,proto3" json:"unbonded_balance,omitempty"` +} + +func (x *Stake) Reset() { + *x = Stake{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_rewards_v1_stake_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Stake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Stake) ProtoMessage() {} + +func (x *Stake) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_rewards_v1_stake_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Stake.ProtoReflect.Descriptor instead. +func (*Stake) Descriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_stake_proto_rawDescGZIP(), []int{0} +} + +func (x *Stake) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *Stake) GetEvaluationTime() *timestamppb.Timestamp { + if x != nil { + return x.EvaluationTime + } + return nil +} + +func (x *Stake) GetBondedStake() *AssetAmount { + if x != nil { + return x.BondedStake + } + return nil +} + +func (x *Stake) GetTotalDelegationReceived() *AssetAmount { + if x != nil { + return x.TotalDelegationReceived + } + return nil +} + +func (x *Stake) GetDelegationsReceived() *Stake_Delegation { + if x != nil { + return x.DelegationsReceived + } + return nil +} + +func (x *Stake) GetDelegationsGiven() *Stake_Delegation { + if x != nil { + return x.DelegationsGiven + } + return nil +} + +func (x *Stake) GetRewardRateCalculations() []*RewardRate { + if x != nil { + return x.RewardRateCalculations + } + return nil +} + +func (x *Stake) GetParticipantType() ParticipantType { + if x != nil { + return x.ParticipantType + } + return ParticipantType_PARTICIPANT_TYPE_UNSPECIFIED +} + +func (x *Stake) GetProtocol() string { + if x != nil { + return x.Protocol + } + return "" +} + +func (x *Stake) GetUnbondedBalance() *AssetAmount { + if x != nil { + return x.UnbondedBalance + } + return nil +} + +// Reward yield calculation at a given point in time. +type RewardRate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The percentage rate of rewards calculation. Will include two digits after the decimal (ex: 3.05). + Percentage string `protobuf:"bytes,1,opt,name=percentage,proto3" json:"percentage,omitempty"` + // The time at which this yield calculation was calculated. + // Timestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2023-11-13T19:38:36Z). + CalculatedTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=calculated_time,json=calculatedTime,proto3" json:"calculated_time,omitempty"` + // The method used to calculate this yield. This could include information about which + // rewards we're including in the calculation, how we're estimating the compounding period, etc. + CalculationMethod RewardRate_CalculationMethods `protobuf:"varint,3,opt,name=calculation_method,json=calculationMethod,proto3,enum=coinbase.staking.rewards.v1.RewardRate_CalculationMethods" json:"calculation_method,omitempty"` +} + +func (x *RewardRate) Reset() { + *x = RewardRate{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_rewards_v1_stake_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RewardRate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RewardRate) ProtoMessage() {} + +func (x *RewardRate) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_rewards_v1_stake_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RewardRate.ProtoReflect.Descriptor instead. +func (*RewardRate) Descriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_stake_proto_rawDescGZIP(), []int{1} +} + +func (x *RewardRate) GetPercentage() string { + if x != nil { + return x.Percentage + } + return "" +} + +func (x *RewardRate) GetCalculatedTime() *timestamppb.Timestamp { + if x != nil { + return x.CalculatedTime + } + return nil +} + +func (x *RewardRate) GetCalculationMethod() RewardRate_CalculationMethods { + if x != nil { + return x.CalculationMethod + } + return RewardRate_CALCULATION_METHODS_UNSPECIFIED +} + +// The request message for ListStakes. +type ListStakesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The protocol that the staking balance exists on. + // The response will only include staking balances for the protocol specified here. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of items to return. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token as part of the response of a previous call. + // Provide this to retrieve the next page. + // + // When paginating, all other parameters must match the previous + // request to list resources. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // [AIP-160](https://google.aip.dev/160) format compliant filter. Supported protocols are 'ethereum', 'solana'. + // Supplying other protocols will return an error. + // * **Ethereum**: + // - Fields: + // - `address` - A ethereum validator public key. + // - `evaluation_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z'). + // - Example(s): + // - `"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474'"` + // - `"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474' AND evaluation_time >= '2024-01-01T00:00:00Z' AND evaluation_time < '2024-01-15T00:00:00Z'"` + // + // * **Solana**: + // - Fields: + // - `address` - A solana staking address. + // - `evaluation_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z'). + // - Example(s): + // - `"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar'"` + // - `"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar' AND evaluation_time >= '2024-01-01T00:00:00Z' AND evaluation_time < '2024-01-15T00:00:00Z'"` + Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListStakesRequest) Reset() { + *x = ListStakesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_rewards_v1_stake_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStakesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStakesRequest) ProtoMessage() {} + +func (x *ListStakesRequest) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_rewards_v1_stake_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStakesRequest.ProtoReflect.Descriptor instead. +func (*ListStakesRequest) Descriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_stake_proto_rawDescGZIP(), []int{2} +} + +func (x *ListStakesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListStakesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListStakesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListStakesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// The response message for ListStakes. +type ListStakesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The staking balances returned in this response. + Stakes []*Stake `protobuf:"bytes,1,rep,name=stakes,proto3" json:"stakes,omitempty"` + // The page token the user must use in the next request if the next page is desired. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListStakesResponse) Reset() { + *x = ListStakesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_rewards_v1_stake_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStakesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStakesResponse) ProtoMessage() {} + +func (x *ListStakesResponse) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_rewards_v1_stake_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStakesResponse.ProtoReflect.Descriptor instead. +func (*ListStakesResponse) Descriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_stake_proto_rawDescGZIP(), []int{3} +} + +func (x *ListStakesResponse) GetStakes() []*Stake { + if x != nil { + return x.Stakes + } + return nil +} + +func (x *ListStakesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// A single delegation from one address to another. +type Stake_Delegation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Address associated to the delegation + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Amount of delegation received or given + Amount *AssetAmount `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + // Commission rate for delegation + CommissionRate string `protobuf:"bytes,3,opt,name=commission_rate,json=commissionRate,proto3" json:"commission_rate,omitempty"` +} + +func (x *Stake_Delegation) Reset() { + *x = Stake_Delegation{} + if protoimpl.UnsafeEnabled { + mi := &file_coinbase_staking_rewards_v1_stake_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Stake_Delegation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Stake_Delegation) ProtoMessage() {} + +func (x *Stake_Delegation) ProtoReflect() protoreflect.Message { + mi := &file_coinbase_staking_rewards_v1_stake_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Stake_Delegation.ProtoReflect.Descriptor instead. +func (*Stake_Delegation) Descriptor() ([]byte, []int) { + return file_coinbase_staking_rewards_v1_stake_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Stake_Delegation) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *Stake_Delegation) GetAmount() *AssetAmount { + if x != nil { + return x.Amount + } + return nil +} + +func (x *Stake_Delegation) GetCommissionRate() string { + if x != nil { + return x.CommissionRate + } + return "" +} + +var File_coinbase_staking_rewards_v1_stake_proto protoreflect.FileDescriptor + +var file_coinbase_staking_rewards_v1_stake_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, + 0x61, 0x6b, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x63, 0x6f, 0x69, 0x6e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x28, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, + 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, + 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x8b, 0x09, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x48, 0x0a, 0x0f, 0x65, 0x76, 0x61, 0x6c, + 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x0e, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x50, 0x0a, 0x0c, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, + 0x6b, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x53, + 0x74, 0x61, 0x6b, 0x65, 0x12, 0x69, 0x0a, 0x19, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x17, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, + 0x6a, 0x0a, 0x14, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, + 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, + 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x48, 0x00, 0x52, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x64, 0x0a, 0x11, 0x64, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x67, 0x69, 0x76, 0x65, 0x6e, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, + 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x01, 0x52, 0x10, 0x64, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x47, 0x69, 0x76, 0x65, 0x6e, 0x88, 0x01, + 0x01, 0x12, 0x66, 0x0a, 0x18, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x5f, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x16, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, + 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x10, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, + 0x61, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x58, 0x0a, 0x10, 0x75, 0x6e, 0x62, 0x6f, + 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, + 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x0f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x1a, 0x91, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, + 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, + 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x3a, 0x57, 0xea, 0x41, 0x54, 0x0a, 0x1e, 0x63, 0x6f, 0x69, + 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x23, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x7d, + 0x2a, 0x06, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x32, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x42, + 0x17, 0x0a, 0x15, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, + 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x64, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x4a, 0x04, + 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, + 0x52, 0x02, 0x69, 0x64, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x0f, 0x70, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x22, 0x80, 0x03, + 0x0a, 0x0a, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x61, 0x74, 0x65, 0x12, 0x23, 0x0a, 0x0a, + 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, + 0x65, 0x12, 0x48, 0x0a, 0x0f, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x63, 0x61, 0x6c, + 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x6e, 0x0a, 0x12, 0x63, + 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x61, 0x74, 0x65, + 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x11, 0x63, 0x61, 0x6c, 0x63, 0x75, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x92, 0x01, 0x0a, 0x12, + 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x41, 0x4c, 0x43, 0x55, 0x4c, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x4f, 0x4c, 0x4f, 0x5f, + 0x53, 0x54, 0x41, 0x4b, 0x45, 0x52, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x4f, 0x4f, 0x4c, + 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x4b, 0x45, 0x52, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x45, + 0x50, 0x4f, 0x43, 0x48, 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x55, + 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x4f, 0x5f, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x55, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x04, + 0x22, 0xb9, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, + 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, + 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x82, 0x01, 0x0a, + 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x6b, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, + 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x2a, 0x51, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, + 0x41, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x45, 0x47, 0x41, + 0x54, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, + 0x4f, 0x52, 0x10, 0x02, 0x42, 0x52, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, + 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, + 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, + 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_coinbase_staking_rewards_v1_stake_proto_rawDescOnce sync.Once + file_coinbase_staking_rewards_v1_stake_proto_rawDescData = file_coinbase_staking_rewards_v1_stake_proto_rawDesc +) + +func file_coinbase_staking_rewards_v1_stake_proto_rawDescGZIP() []byte { + file_coinbase_staking_rewards_v1_stake_proto_rawDescOnce.Do(func() { + file_coinbase_staking_rewards_v1_stake_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_rewards_v1_stake_proto_rawDescData) + }) + return file_coinbase_staking_rewards_v1_stake_proto_rawDescData +} + +var file_coinbase_staking_rewards_v1_stake_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_coinbase_staking_rewards_v1_stake_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_coinbase_staking_rewards_v1_stake_proto_goTypes = []interface{}{ + (ParticipantType)(0), // 0: coinbase.staking.rewards.v1.ParticipantType + (RewardRate_CalculationMethods)(0), // 1: coinbase.staking.rewards.v1.RewardRate.CalculationMethods + (*Stake)(nil), // 2: coinbase.staking.rewards.v1.Stake + (*RewardRate)(nil), // 3: coinbase.staking.rewards.v1.RewardRate + (*ListStakesRequest)(nil), // 4: coinbase.staking.rewards.v1.ListStakesRequest + (*ListStakesResponse)(nil), // 5: coinbase.staking.rewards.v1.ListStakesResponse + (*Stake_Delegation)(nil), // 6: coinbase.staking.rewards.v1.Stake.Delegation + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*AssetAmount)(nil), // 8: coinbase.staking.rewards.v1.AssetAmount +} +var file_coinbase_staking_rewards_v1_stake_proto_depIdxs = []int32{ + 7, // 0: coinbase.staking.rewards.v1.Stake.evaluation_time:type_name -> google.protobuf.Timestamp + 8, // 1: coinbase.staking.rewards.v1.Stake.bonded_stake:type_name -> coinbase.staking.rewards.v1.AssetAmount + 8, // 2: coinbase.staking.rewards.v1.Stake.total_delegation_received:type_name -> coinbase.staking.rewards.v1.AssetAmount + 6, // 3: coinbase.staking.rewards.v1.Stake.delegations_received:type_name -> coinbase.staking.rewards.v1.Stake.Delegation + 6, // 4: coinbase.staking.rewards.v1.Stake.delegations_given:type_name -> coinbase.staking.rewards.v1.Stake.Delegation + 3, // 5: coinbase.staking.rewards.v1.Stake.reward_rate_calculations:type_name -> coinbase.staking.rewards.v1.RewardRate + 0, // 6: coinbase.staking.rewards.v1.Stake.participant_type:type_name -> coinbase.staking.rewards.v1.ParticipantType + 8, // 7: coinbase.staking.rewards.v1.Stake.unbonded_balance:type_name -> coinbase.staking.rewards.v1.AssetAmount + 7, // 8: coinbase.staking.rewards.v1.RewardRate.calculated_time:type_name -> google.protobuf.Timestamp + 1, // 9: coinbase.staking.rewards.v1.RewardRate.calculation_method:type_name -> coinbase.staking.rewards.v1.RewardRate.CalculationMethods + 2, // 10: coinbase.staking.rewards.v1.ListStakesResponse.stakes:type_name -> coinbase.staking.rewards.v1.Stake + 8, // 11: coinbase.staking.rewards.v1.Stake.Delegation.amount:type_name -> coinbase.staking.rewards.v1.AssetAmount + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_coinbase_staking_rewards_v1_stake_proto_init() } +func file_coinbase_staking_rewards_v1_stake_proto_init() { + if File_coinbase_staking_rewards_v1_stake_proto != nil { + return + } + file_coinbase_staking_rewards_v1_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_coinbase_staking_rewards_v1_stake_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Stake); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_rewards_v1_stake_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RewardRate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_rewards_v1_stake_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListStakesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_rewards_v1_stake_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListStakesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_coinbase_staking_rewards_v1_stake_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Stake_Delegation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_coinbase_staking_rewards_v1_stake_proto_msgTypes[0].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_coinbase_staking_rewards_v1_stake_proto_rawDesc, + NumEnums: 2, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_coinbase_staking_rewards_v1_stake_proto_goTypes, + DependencyIndexes: file_coinbase_staking_rewards_v1_stake_proto_depIdxs, + EnumInfos: file_coinbase_staking_rewards_v1_stake_proto_enumTypes, + MessageInfos: file_coinbase_staking_rewards_v1_stake_proto_msgTypes, + }.Build() + File_coinbase_staking_rewards_v1_stake_proto = out.File + file_coinbase_staking_rewards_v1_stake_proto_rawDesc = nil + file_coinbase_staking_rewards_v1_stake_proto_goTypes = nil + file_coinbase_staking_rewards_v1_stake_proto_depIdxs = nil +} diff --git a/gen/go/coinbase/staking/rewards/v1/stake_aip.go b/gen/go/coinbase/staking/rewards/v1/stake_aip.go new file mode 100644 index 0000000..7b7df58 --- /dev/null +++ b/gen/go/coinbase/staking/rewards/v1/stake_aip.go @@ -0,0 +1,78 @@ +// Code generated by protoc-gen-go-aip. DO NOT EDIT. +// +// versions: +// protoc-gen-go-aip development +// protoc (unknown) +// source: coinbase/staking/rewards/v1/stake.proto + +package v1 + +import ( + fmt "fmt" + resourcename "go.einride.tech/aip/resourcename" + strings "strings" +) + +type StakeResourceName struct { + Protocol string + Stake string +} + +func (n ProtocolResourceName) StakeResourceName( + stake string, +) StakeResourceName { + return StakeResourceName{ + Protocol: n.Protocol, + Stake: stake, + } +} + +func (n StakeResourceName) Validate() error { + if n.Protocol == "" { + return fmt.Errorf("protocol: empty") + } + if strings.IndexByte(n.Protocol, '/') != -1 { + return fmt.Errorf("protocol: contains illegal character '/'") + } + if n.Stake == "" { + return fmt.Errorf("stake: empty") + } + if strings.IndexByte(n.Stake, '/') != -1 { + return fmt.Errorf("stake: contains illegal character '/'") + } + return nil +} + +func (n StakeResourceName) ContainsWildcard() bool { + return false || n.Protocol == "-" || n.Stake == "-" +} + +func (n StakeResourceName) String() string { + return resourcename.Sprint( + "protocols/{protocol}/stakes/{stake}", + n.Protocol, + n.Stake, + ) +} + +func (n StakeResourceName) MarshalString() (string, error) { + if err := n.Validate(); err != nil { + return "", err + } + return n.String(), nil +} + +func (n *StakeResourceName) UnmarshalString(name string) error { + return resourcename.Sscan( + name, + "protocols/{protocol}/stakes/{stake}", + &n.Protocol, + &n.Stake, + ) +} + +func (n StakeResourceName) ProtocolResourceName() ProtocolResourceName { + return ProtocolResourceName{ + Protocol: n.Protocol, + } +} diff --git a/gen/go/coinbase/staking/v1alpha1/api.pb.go b/gen/go/coinbase/staking/v1alpha1/api.pb.go deleted file mode 100644 index b827378..0000000 --- a/gen/go/coinbase/staking/v1alpha1/api.pb.go +++ /dev/null @@ -1,371 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: coinbase/staking/v1alpha1/api.proto - -package v1alpha1 - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_coinbase_staking_v1alpha1_api_proto protoreflect.FileDescriptor - -var file_coinbase_staking_v1alpha1_api_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, - 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, - 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x27, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x63, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x28, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x63, 0x6f, - 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x80, 0x16, - 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0xf3, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7f, 0x92, 0x41, 0x5a, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x1a, 0x18, - 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x2a, 0x0d, 0x6c, 0x69, 0x73, 0x74, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, - 0x0a, 0x02, 0x4f, 0x4b, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x87, 0x02, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x95, 0x01, 0x92, 0x41, 0x56, 0x0a, 0x07, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, - 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, - 0x1a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, - 0x20, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x2a, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, - 0x0a, 0x02, 0x4f, 0x4b, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, - 0x12, 0xc4, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, - 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc0, 0x01, 0x92, 0x41, 0x70, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x20, - 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x1a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x20, - 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x53, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x4a, 0x0b, 0x0a, - 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, 0x0a, 0x02, 0x4f, 0x4b, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x3d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x2f, 0x2a, 0x2f, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x8a, 0x02, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x92, 0x41, 0x52, 0x0a, 0x06, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x16, 0x4c, 0x69, - 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, 0x0a, 0x02, 0x4f, 0x4b, 0xda, 0x41, - 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x2f, 0x2a, - 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xf4, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x8a, - 0x01, 0x92, 0x41, 0x38, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x0f, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2a, - 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4a, - 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, 0x0a, 0x02, 0x4f, 0x4b, 0xda, 0x41, 0x0f, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x37, 0x3a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x2b, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, - 0x7d, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0xd2, 0x01, 0x0a, 0x0b, - 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x2d, 0x2e, 0x63, 0x6f, - 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x69, - 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, - 0x6f, 0x92, 0x41, 0x32, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x0c, - 0x47, 0x65, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2a, 0x0b, 0x67, 0x65, - 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, - 0x12, 0x04, 0x0a, 0x02, 0x4f, 0x4b, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x2a, 0x7d, - 0x12, 0xf3, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x73, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7f, 0x92, 0x41, 0x40, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2a, 0x0d, - 0x6c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x4a, 0x0b, 0x0a, - 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, 0x0a, 0x02, 0x4f, 0x4b, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0xa3, 0x02, 0x0a, 0x13, 0x50, 0x65, 0x72, 0x66, 0x6f, - 0x72, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x65, 0x70, 0x12, 0x35, - 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x6f, - 0x72, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x65, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0xaf, 0x01, 0x92, 0x41, 0x71, - 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x23, 0x50, 0x65, 0x72, 0x66, - 0x6f, 0x72, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x78, 0x74, 0x20, 0x73, 0x74, 0x65, - 0x70, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x1a, - 0x23, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x78, - 0x74, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x2a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, 0x0a, 0x02, 0x4f, - 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x01, 0x2a, 0x22, 0x30, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x74, 0x65, 0x70, 0x12, 0xad, 0x02, 0x0a, - 0x13, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x53, 0x74, 0x65, 0x70, 0x12, 0x35, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x53, 0x74, 0x65, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, - 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x22, 0xb9, 0x01, 0x92, 0x41, 0x78, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x12, 0x26, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, - 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x1a, 0x26, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x74, - 0x65, 0x70, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x2a, 0x0f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, 0x0a, 0x02, 0x4f, 0x4b, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x38, 0x3a, 0x01, 0x2a, 0x22, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0xe2, 0x02, 0x0a, - 0x12, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x12, 0x34, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xde, 0x01, 0x92, 0x41, 0xad, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x3c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, - 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2d, 0x69, 0x6e, 0x2d, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x3c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x2d, 0x69, 0x6e, 0x2d, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, - 0x64, 0x61, 0x74, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x2a, 0x12, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4a, 0x0b, 0x0a, 0x03, 0x32, 0x30, 0x30, 0x12, 0x04, - 0x0a, 0x02, 0x4f, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x76, 0x69, 0x65, 0x77, 0x53, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x3a, 0x76, 0x69, 0x65, - 0x77, 0x1a, 0x1d, 0xca, 0x41, 0x1a, 0x61, 0x70, 0x69, 0x2e, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, - 0x70, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, - 0x42, 0xf4, 0x07, 0x92, 0x41, 0xa0, 0x07, 0x12, 0x9f, 0x01, 0x0a, 0x22, 0x43, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x20, 0x4e, 0x6f, 0x6e, 0x2d, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x69, - 0x61, 0x6c, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x50, 0x49, 0x12, 0x6f, - 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, - 0x69, 0x73, 0x20, 0x61, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x64, 0x69, - 0x61, 0x6c, 0x20, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x69, 0x6d, 0x73, 0x20, 0x74, 0x6f, 0x20, - 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, - 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x2e, 0x32, - 0x08, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1a, 0x61, 0x70, 0x69, 0x2e, 0x64, - 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x08, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2a, - 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x52, 0x0a, 0x03, 0x34, 0x30, 0x30, 0x12, 0x4b, 0x0a, - 0x2c, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x61, 0x74, 0x74, - 0x65, 0x6d, 0x70, 0x74, 0x65, 0x64, 0x20, 0x68, 0x61, 0x73, 0x20, 0x69, 0x6e, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x0a, - 0x19, 0x1a, 0x17, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x57, 0x0a, 0x03, 0x34, 0x30, - 0x31, 0x12, 0x50, 0x0a, 0x31, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x66, - 0x20, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, - 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x69, - 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x19, 0x1a, 0x17, 0x23, 0x2f, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x64, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x5d, 0x0a, 0x3e, 0x52, 0x65, - 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x20, 0x75, 0x73, - 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, - 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x12, 0x1b, 0x0a, 0x19, - 0x1a, 0x17, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x4c, 0x0a, 0x03, 0x34, 0x30, 0x34, - 0x12, 0x45, 0x0a, 0x26, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, - 0x6e, 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x69, 0x73, 0x20, - 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x12, 0x1b, 0x0a, 0x19, 0x1a, 0x17, - 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x70, - 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x56, 0x0a, 0x03, 0x34, 0x32, 0x39, 0x12, 0x4f, - 0x0a, 0x30, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, - 0x61, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x20, 0x68, 0x61, 0x73, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x61, 0x63, 0x68, 0x65, - 0x64, 0x2e, 0x12, 0x1b, 0x0a, 0x19, 0x1a, 0x17, 0x23, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x55, 0x0a, 0x03, 0x35, 0x30, 0x30, 0x12, 0x4e, 0x0a, 0x2f, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x20, 0x68, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x73, 0x2e, 0x12, 0x1b, 0x0a, 0x19, 0x1a, 0x17, 0x23, - 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x70, 0x63, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x6a, 0x1d, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x12, 0x11, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x20, 0x64, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x6a, 0x1b, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x12, 0x10, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x6a, 0x1f, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x12, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x64, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x6a, 0x19, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x41, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x6a, 0x27, - 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1b, 0x57, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, - 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, - 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, - 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_coinbase_staking_v1alpha1_api_proto_goTypes = []interface{}{ - (*ListProtocolsRequest)(nil), // 0: coinbase.staking.v1alpha1.ListProtocolsRequest - (*ListNetworksRequest)(nil), // 1: coinbase.staking.v1alpha1.ListNetworksRequest - (*ListStakingTargetsRequest)(nil), // 2: coinbase.staking.v1alpha1.ListStakingTargetsRequest - (*ListActionsRequest)(nil), // 3: coinbase.staking.v1alpha1.ListActionsRequest - (*CreateWorkflowRequest)(nil), // 4: coinbase.staking.v1alpha1.CreateWorkflowRequest - (*GetWorkflowRequest)(nil), // 5: coinbase.staking.v1alpha1.GetWorkflowRequest - (*ListWorkflowsRequest)(nil), // 6: coinbase.staking.v1alpha1.ListWorkflowsRequest - (*PerformWorkflowStepRequest)(nil), // 7: coinbase.staking.v1alpha1.PerformWorkflowStepRequest - (*RefreshWorkflowStepRequest)(nil), // 8: coinbase.staking.v1alpha1.RefreshWorkflowStepRequest - (*ViewStakingContextRequest)(nil), // 9: coinbase.staking.v1alpha1.ViewStakingContextRequest - (*ListProtocolsResponse)(nil), // 10: coinbase.staking.v1alpha1.ListProtocolsResponse - (*ListNetworksResponse)(nil), // 11: coinbase.staking.v1alpha1.ListNetworksResponse - (*ListStakingTargetsResponse)(nil), // 12: coinbase.staking.v1alpha1.ListStakingTargetsResponse - (*ListActionsResponse)(nil), // 13: coinbase.staking.v1alpha1.ListActionsResponse - (*Workflow)(nil), // 14: coinbase.staking.v1alpha1.Workflow - (*ListWorkflowsResponse)(nil), // 15: coinbase.staking.v1alpha1.ListWorkflowsResponse - (*ViewStakingContextResponse)(nil), // 16: coinbase.staking.v1alpha1.ViewStakingContextResponse -} -var file_coinbase_staking_v1alpha1_api_proto_depIdxs = []int32{ - 0, // 0: coinbase.staking.v1alpha1.StakingService.ListProtocols:input_type -> coinbase.staking.v1alpha1.ListProtocolsRequest - 1, // 1: coinbase.staking.v1alpha1.StakingService.ListNetworks:input_type -> coinbase.staking.v1alpha1.ListNetworksRequest - 2, // 2: coinbase.staking.v1alpha1.StakingService.ListStakingTargets:input_type -> coinbase.staking.v1alpha1.ListStakingTargetsRequest - 3, // 3: coinbase.staking.v1alpha1.StakingService.ListActions:input_type -> coinbase.staking.v1alpha1.ListActionsRequest - 4, // 4: coinbase.staking.v1alpha1.StakingService.CreateWorkflow:input_type -> coinbase.staking.v1alpha1.CreateWorkflowRequest - 5, // 5: coinbase.staking.v1alpha1.StakingService.GetWorkflow:input_type -> coinbase.staking.v1alpha1.GetWorkflowRequest - 6, // 6: coinbase.staking.v1alpha1.StakingService.ListWorkflows:input_type -> coinbase.staking.v1alpha1.ListWorkflowsRequest - 7, // 7: coinbase.staking.v1alpha1.StakingService.PerformWorkflowStep:input_type -> coinbase.staking.v1alpha1.PerformWorkflowStepRequest - 8, // 8: coinbase.staking.v1alpha1.StakingService.RefreshWorkflowStep:input_type -> coinbase.staking.v1alpha1.RefreshWorkflowStepRequest - 9, // 9: coinbase.staking.v1alpha1.StakingService.ViewStakingContext:input_type -> coinbase.staking.v1alpha1.ViewStakingContextRequest - 10, // 10: coinbase.staking.v1alpha1.StakingService.ListProtocols:output_type -> coinbase.staking.v1alpha1.ListProtocolsResponse - 11, // 11: coinbase.staking.v1alpha1.StakingService.ListNetworks:output_type -> coinbase.staking.v1alpha1.ListNetworksResponse - 12, // 12: coinbase.staking.v1alpha1.StakingService.ListStakingTargets:output_type -> coinbase.staking.v1alpha1.ListStakingTargetsResponse - 13, // 13: coinbase.staking.v1alpha1.StakingService.ListActions:output_type -> coinbase.staking.v1alpha1.ListActionsResponse - 14, // 14: coinbase.staking.v1alpha1.StakingService.CreateWorkflow:output_type -> coinbase.staking.v1alpha1.Workflow - 14, // 15: coinbase.staking.v1alpha1.StakingService.GetWorkflow:output_type -> coinbase.staking.v1alpha1.Workflow - 15, // 16: coinbase.staking.v1alpha1.StakingService.ListWorkflows:output_type -> coinbase.staking.v1alpha1.ListWorkflowsResponse - 14, // 17: coinbase.staking.v1alpha1.StakingService.PerformWorkflowStep:output_type -> coinbase.staking.v1alpha1.Workflow - 14, // 18: coinbase.staking.v1alpha1.StakingService.RefreshWorkflowStep:output_type -> coinbase.staking.v1alpha1.Workflow - 16, // 19: coinbase.staking.v1alpha1.StakingService.ViewStakingContext:output_type -> coinbase.staking.v1alpha1.ViewStakingContextResponse - 10, // [10:20] is the sub-list for method output_type - 0, // [0:10] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_coinbase_staking_v1alpha1_api_proto_init() } -func file_coinbase_staking_v1alpha1_api_proto_init() { - if File_coinbase_staking_v1alpha1_api_proto != nil { - return - } - file_coinbase_staking_v1alpha1_protocol_proto_init() - file_coinbase_staking_v1alpha1_network_proto_init() - file_coinbase_staking_v1alpha1_action_proto_init() - file_coinbase_staking_v1alpha1_staking_target_proto_init() - file_coinbase_staking_v1alpha1_workflow_proto_init() - file_coinbase_staking_v1alpha1_staking_context_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_coinbase_staking_v1alpha1_api_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_coinbase_staking_v1alpha1_api_proto_goTypes, - DependencyIndexes: file_coinbase_staking_v1alpha1_api_proto_depIdxs, - }.Build() - File_coinbase_staking_v1alpha1_api_proto = out.File - file_coinbase_staking_v1alpha1_api_proto_rawDesc = nil - file_coinbase_staking_v1alpha1_api_proto_goTypes = nil - file_coinbase_staking_v1alpha1_api_proto_depIdxs = nil -} diff --git a/gen/go/coinbase/staking/v1alpha1/ethereum_kiln.pb.go b/gen/go/coinbase/staking/v1alpha1/ethereum_kiln.pb.go deleted file mode 100644 index bb5dd4c..0000000 --- a/gen/go/coinbase/staking/v1alpha1/ethereum_kiln.pb.go +++ /dev/null @@ -1,864 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: coinbase/staking/v1alpha1/ethereum_kiln.proto - -package v1alpha1 - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The parameters required for the stake action on Ethereum Kiln. -type EthereumKilnStakeParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address you wish to stake from. - StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` - // The address of the integrator contract. - IntegratorContractAddress string `protobuf:"bytes,2,opt,name=integrator_contract_address,json=integratorContractAddress,proto3" json:"integrator_contract_address,omitempty"` - // The amount of Ethereum to stake in wei. - Amount *Amount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *EthereumKilnStakeParameters) Reset() { - *x = EthereumKilnStakeParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EthereumKilnStakeParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EthereumKilnStakeParameters) ProtoMessage() {} - -func (x *EthereumKilnStakeParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EthereumKilnStakeParameters.ProtoReflect.Descriptor instead. -func (*EthereumKilnStakeParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescGZIP(), []int{0} -} - -func (x *EthereumKilnStakeParameters) GetStakerAddress() string { - if x != nil { - return x.StakerAddress - } - return "" -} - -func (x *EthereumKilnStakeParameters) GetIntegratorContractAddress() string { - if x != nil { - return x.IntegratorContractAddress - } - return "" -} - -func (x *EthereumKilnStakeParameters) GetAmount() *Amount { - if x != nil { - return x.Amount - } - return nil -} - -// The parameters required for the unstake action on Ethereum Kiln. -type EthereumKilnUnstakeParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address you wish to unstake from. - StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` - // The address of the integrator contract. - IntegratorContractAddress string `protobuf:"bytes,2,opt,name=integrator_contract_address,json=integratorContractAddress,proto3" json:"integrator_contract_address,omitempty"` - // The amount of Ethereum to unstake in wei. - Amount *Amount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *EthereumKilnUnstakeParameters) Reset() { - *x = EthereumKilnUnstakeParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EthereumKilnUnstakeParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EthereumKilnUnstakeParameters) ProtoMessage() {} - -func (x *EthereumKilnUnstakeParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EthereumKilnUnstakeParameters.ProtoReflect.Descriptor instead. -func (*EthereumKilnUnstakeParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescGZIP(), []int{1} -} - -func (x *EthereumKilnUnstakeParameters) GetStakerAddress() string { - if x != nil { - return x.StakerAddress - } - return "" -} - -func (x *EthereumKilnUnstakeParameters) GetIntegratorContractAddress() string { - if x != nil { - return x.IntegratorContractAddress - } - return "" -} - -func (x *EthereumKilnUnstakeParameters) GetAmount() *Amount { - if x != nil { - return x.Amount - } - return nil -} - -// The parameters required for the claim rewards action on Ethereum Kiln. -// -// Deprecated: Marked as deprecated in coinbase/staking/v1alpha1/ethereum_kiln.proto. -type EthereumKilnClaimRewardsParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address you wish to claim rewards for. - StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` - // The address of the integrator contract. - IntegratorContractAddress string `protobuf:"bytes,2,opt,name=integrator_contract_address,json=integratorContractAddress,proto3" json:"integrator_contract_address,omitempty"` -} - -func (x *EthereumKilnClaimRewardsParameters) Reset() { - *x = EthereumKilnClaimRewardsParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EthereumKilnClaimRewardsParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EthereumKilnClaimRewardsParameters) ProtoMessage() {} - -func (x *EthereumKilnClaimRewardsParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EthereumKilnClaimRewardsParameters.ProtoReflect.Descriptor instead. -func (*EthereumKilnClaimRewardsParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescGZIP(), []int{2} -} - -func (x *EthereumKilnClaimRewardsParameters) GetStakerAddress() string { - if x != nil { - return x.StakerAddress - } - return "" -} - -func (x *EthereumKilnClaimRewardsParameters) GetIntegratorContractAddress() string { - if x != nil { - return x.IntegratorContractAddress - } - return "" -} - -// The parameters required for the claim stake action on Ethereum Kiln. -type EthereumKilnClaimStakeParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address you wish to claim stake for. - StakerAddress string `protobuf:"bytes,1,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` - // The address of the integrator contract - IntegratorContractAddress string `protobuf:"bytes,2,opt,name=integrator_contract_address,json=integratorContractAddress,proto3" json:"integrator_contract_address,omitempty"` -} - -func (x *EthereumKilnClaimStakeParameters) Reset() { - *x = EthereumKilnClaimStakeParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EthereumKilnClaimStakeParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EthereumKilnClaimStakeParameters) ProtoMessage() {} - -func (x *EthereumKilnClaimStakeParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EthereumKilnClaimStakeParameters.ProtoReflect.Descriptor instead. -func (*EthereumKilnClaimStakeParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescGZIP(), []int{3} -} - -func (x *EthereumKilnClaimStakeParameters) GetStakerAddress() string { - if x != nil { - return x.StakerAddress - } - return "" -} - -func (x *EthereumKilnClaimStakeParameters) GetIntegratorContractAddress() string { - if x != nil { - return x.IntegratorContractAddress - } - return "" -} - -// The parameters needed for staking on Ethereum via Kiln. -type EthereumKilnStakingParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Parameters: - // - // *EthereumKilnStakingParameters_StakeParameters - // *EthereumKilnStakingParameters_UnstakeParameters - // *EthereumKilnStakingParameters_ClaimRewardsParameters - // *EthereumKilnStakingParameters_ClaimStakeParameters - Parameters isEthereumKilnStakingParameters_Parameters `protobuf_oneof:"parameters"` -} - -func (x *EthereumKilnStakingParameters) Reset() { - *x = EthereumKilnStakingParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EthereumKilnStakingParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EthereumKilnStakingParameters) ProtoMessage() {} - -func (x *EthereumKilnStakingParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EthereumKilnStakingParameters.ProtoReflect.Descriptor instead. -func (*EthereumKilnStakingParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescGZIP(), []int{4} -} - -func (m *EthereumKilnStakingParameters) GetParameters() isEthereumKilnStakingParameters_Parameters { - if m != nil { - return m.Parameters - } - return nil -} - -func (x *EthereumKilnStakingParameters) GetStakeParameters() *EthereumKilnStakeParameters { - if x, ok := x.GetParameters().(*EthereumKilnStakingParameters_StakeParameters); ok { - return x.StakeParameters - } - return nil -} - -func (x *EthereumKilnStakingParameters) GetUnstakeParameters() *EthereumKilnUnstakeParameters { - if x, ok := x.GetParameters().(*EthereumKilnStakingParameters_UnstakeParameters); ok { - return x.UnstakeParameters - } - return nil -} - -func (x *EthereumKilnStakingParameters) GetClaimRewardsParameters() *EthereumKilnClaimRewardsParameters { - if x, ok := x.GetParameters().(*EthereumKilnStakingParameters_ClaimRewardsParameters); ok { - return x.ClaimRewardsParameters - } - return nil -} - -func (x *EthereumKilnStakingParameters) GetClaimStakeParameters() *EthereumKilnClaimStakeParameters { - if x, ok := x.GetParameters().(*EthereumKilnStakingParameters_ClaimStakeParameters); ok { - return x.ClaimStakeParameters - } - return nil -} - -type isEthereumKilnStakingParameters_Parameters interface { - isEthereumKilnStakingParameters_Parameters() -} - -type EthereumKilnStakingParameters_StakeParameters struct { - // The parameters for stake action on Ethereum Kiln. - StakeParameters *EthereumKilnStakeParameters `protobuf:"bytes,1,opt,name=stake_parameters,json=stakeParameters,proto3,oneof"` -} - -type EthereumKilnStakingParameters_UnstakeParameters struct { - // The parameters for unstake action on Ethereum Kiln. - UnstakeParameters *EthereumKilnUnstakeParameters `protobuf:"bytes,2,opt,name=unstake_parameters,json=unstakeParameters,proto3,oneof"` -} - -type EthereumKilnStakingParameters_ClaimRewardsParameters struct { - // The parameters for claim rewards action on Ethereum Kiln. - ClaimRewardsParameters *EthereumKilnClaimRewardsParameters `protobuf:"bytes,3,opt,name=claim_rewards_parameters,json=claimRewardsParameters,proto3,oneof"` -} - -type EthereumKilnStakingParameters_ClaimStakeParameters struct { - // The parameters for claim stake action on Ethereum Kiln. - ClaimStakeParameters *EthereumKilnClaimStakeParameters `protobuf:"bytes,4,opt,name=claim_stake_parameters,json=claimStakeParameters,proto3,oneof"` -} - -func (*EthereumKilnStakingParameters_StakeParameters) isEthereumKilnStakingParameters_Parameters() {} - -func (*EthereumKilnStakingParameters_UnstakeParameters) isEthereumKilnStakingParameters_Parameters() { -} - -func (*EthereumKilnStakingParameters_ClaimRewardsParameters) isEthereumKilnStakingParameters_Parameters() { -} - -func (*EthereumKilnStakingParameters_ClaimStakeParameters) isEthereumKilnStakingParameters_Parameters() { -} - -// The protocol specific parameters required for fetching a staking context. -type EthereumKilnStakingContextParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Integrator contract address. - IntegratorContractAddress string `protobuf:"bytes,1,opt,name=integrator_contract_address,json=integratorContractAddress,proto3" json:"integrator_contract_address,omitempty"` -} - -func (x *EthereumKilnStakingContextParameters) Reset() { - *x = EthereumKilnStakingContextParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EthereumKilnStakingContextParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EthereumKilnStakingContextParameters) ProtoMessage() {} - -func (x *EthereumKilnStakingContextParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EthereumKilnStakingContextParameters.ProtoReflect.Descriptor instead. -func (*EthereumKilnStakingContextParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescGZIP(), []int{5} -} - -func (x *EthereumKilnStakingContextParameters) GetIntegratorContractAddress() string { - if x != nil { - return x.IntegratorContractAddress - } - return "" -} - -// The protocol specific details for an Ethereum Kiln staking context. -type EthereumKilnStakingContextDetails struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The Ethereum balance of the address. - // This can be used to gate the stake action to make sure the requested stake amount - // is less than ethereum_balance. - EthereumBalance *Amount `protobuf:"bytes,1,opt,name=ethereum_balance,json=ethereumBalance,proto3" json:"ethereum_balance,omitempty"` - // The number of integrator shares owned by the address. - IntegratorShareBalance *Amount `protobuf:"bytes,2,opt,name=integrator_share_balance,json=integratorShareBalance,proto3" json:"integrator_share_balance,omitempty"` - // The total Ethereum you can exchange for your integrator shares. - // This can be used to gate the unstake action to make sure the requested unstake amount - // is less than integrator_share_underlying_balance - IntegratorShareUnderlyingBalance *Amount `protobuf:"bytes,3,opt,name=integrator_share_underlying_balance,json=integratorShareUnderlyingBalance,proto3" json:"integrator_share_underlying_balance,omitempty"` - // The total amount of Ethereum you can redeem for all non-claimed vPool shares. - // This along with the condition total_shares_pending_exit == fulfillable_share_count - // can be used to gate the claim_stake action. - TotalExitableEth *Amount `protobuf:"bytes,4,opt,name=total_exitable_eth,json=totalExitableEth,proto3" json:"total_exitable_eth,omitempty"` - // The number of vPool shares are eligible to receive now or at a later point in time. - TotalSharesPendingExit *Amount `protobuf:"bytes,5,opt,name=total_shares_pending_exit,json=totalSharesPendingExit,proto3" json:"total_shares_pending_exit,omitempty"` - // The number of vPool shares you are able to claim now. - FulfillableShareCount *Amount `protobuf:"bytes,6,opt,name=fulfillable_share_count,json=fulfillableShareCount,proto3" json:"fulfillable_share_count,omitempty"` -} - -func (x *EthereumKilnStakingContextDetails) Reset() { - *x = EthereumKilnStakingContextDetails{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EthereumKilnStakingContextDetails) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EthereumKilnStakingContextDetails) ProtoMessage() {} - -func (x *EthereumKilnStakingContextDetails) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EthereumKilnStakingContextDetails.ProtoReflect.Descriptor instead. -func (*EthereumKilnStakingContextDetails) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescGZIP(), []int{6} -} - -func (x *EthereumKilnStakingContextDetails) GetEthereumBalance() *Amount { - if x != nil { - return x.EthereumBalance - } - return nil -} - -func (x *EthereumKilnStakingContextDetails) GetIntegratorShareBalance() *Amount { - if x != nil { - return x.IntegratorShareBalance - } - return nil -} - -func (x *EthereumKilnStakingContextDetails) GetIntegratorShareUnderlyingBalance() *Amount { - if x != nil { - return x.IntegratorShareUnderlyingBalance - } - return nil -} - -func (x *EthereumKilnStakingContextDetails) GetTotalExitableEth() *Amount { - if x != nil { - return x.TotalExitableEth - } - return nil -} - -func (x *EthereumKilnStakingContextDetails) GetTotalSharesPendingExit() *Amount { - if x != nil { - return x.TotalSharesPendingExit - } - return nil -} - -func (x *EthereumKilnStakingContextDetails) GetFulfillableShareCount() *Amount { - if x != nil { - return x.FulfillableShareCount - } - return nil -} - -var File_coinbase_staking_v1alpha1_ethereum_kiln_proto protoreflect.FileDescriptor - -var file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDesc = []byte{ - 0x0a, 0x2d, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x69, 0x6c, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x19, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x26, 0x63, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xf5, 0x01, 0x0a, 0x1b, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, - 0x52, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x43, 0x0a, 0x1b, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x25, 0x92, 0x41, 0x22, 0x0a, 0x20, 0x2a, 0x1e, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x3a, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x65, - 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xf9, 0x01, 0x0a, 0x1d, - 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x55, 0x6e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, - 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x1b, 0x69, 0x6e, 0x74, - 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, - 0xe0, 0x41, 0x02, 0x52, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3e, - 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x27, - 0x92, 0x41, 0x24, 0x0a, 0x22, 0x2a, 0x20, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, - 0x69, 0x6c, 0x6e, 0x3a, 0x20, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x22, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, - 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0d, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x1b, 0x69, 0x6e, - 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, - 0x2f, 0x92, 0x41, 0x2a, 0x0a, 0x28, 0x2a, 0x26, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x4b, 0x69, 0x6c, 0x6e, 0x3a, 0x20, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x20, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, - 0x22, 0xc0, 0x01, 0x0a, 0x20, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, - 0x6e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x02, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x43, 0x0a, 0x1b, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x19, 0x69, 0x6e, 0x74, - 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x2b, 0x92, 0x41, 0x28, 0x0a, 0x26, 0x2a, 0x24, 0x45, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x3a, 0x20, 0x43, 0x6c, 0x61, - 0x69, 0x6d, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x22, 0x96, 0x04, 0x0a, 0x1d, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x63, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x36, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x69, 0x0a, 0x12, 0x75, 0x6e, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x55, - 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x48, 0x00, 0x52, 0x11, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x79, 0x0a, 0x18, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, - 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x16, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x52, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x73, 0x0a, 0x16, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x3b, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, - 0x14, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x27, 0x92, 0x41, 0x24, 0x0a, 0x22, 0x2a, 0x20, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x3a, 0x20, 0x53, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x0c, - 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x97, 0x01, 0x0a, - 0x24, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x1b, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x69, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x2f, 0x92, 0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x28, 0x45, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x3a, 0x20, 0x53, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xf8, 0x04, 0x0a, 0x21, 0x45, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x4c, 0x0a, 0x10, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x18, 0x69, 0x6e, - 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x62, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, - 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x16, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x23, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x75, 0x6e, 0x64, 0x65, - 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x79, 0x69, - 0x6e, 0x67, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x4f, 0x0a, 0x12, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x65, 0x74, 0x68, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, - 0x78, 0x69, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x74, 0x68, 0x12, 0x5c, 0x0a, 0x19, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x16, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x50, 0x65, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x45, 0x78, 0x69, 0x74, 0x12, 0x59, 0x0a, 0x17, 0x66, 0x75, 0x6c, 0x66, - 0x69, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x15, 0x66, 0x75, - 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x3a, 0x2c, 0x92, 0x41, 0x29, 0x0a, 0x27, 0x2a, 0x25, 0x45, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x3a, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x73, 0x42, 0x50, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, - 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescOnce sync.Once - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescData = file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDesc -) - -func file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescGZIP() []byte { - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescOnce.Do(func() { - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescData) - }) - return file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDescData -} - -var file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_coinbase_staking_v1alpha1_ethereum_kiln_proto_goTypes = []interface{}{ - (*EthereumKilnStakeParameters)(nil), // 0: coinbase.staking.v1alpha1.EthereumKilnStakeParameters - (*EthereumKilnUnstakeParameters)(nil), // 1: coinbase.staking.v1alpha1.EthereumKilnUnstakeParameters - (*EthereumKilnClaimRewardsParameters)(nil), // 2: coinbase.staking.v1alpha1.EthereumKilnClaimRewardsParameters - (*EthereumKilnClaimStakeParameters)(nil), // 3: coinbase.staking.v1alpha1.EthereumKilnClaimStakeParameters - (*EthereumKilnStakingParameters)(nil), // 4: coinbase.staking.v1alpha1.EthereumKilnStakingParameters - (*EthereumKilnStakingContextParameters)(nil), // 5: coinbase.staking.v1alpha1.EthereumKilnStakingContextParameters - (*EthereumKilnStakingContextDetails)(nil), // 6: coinbase.staking.v1alpha1.EthereumKilnStakingContextDetails - (*Amount)(nil), // 7: coinbase.staking.v1alpha1.Amount -} -var file_coinbase_staking_v1alpha1_ethereum_kiln_proto_depIdxs = []int32{ - 7, // 0: coinbase.staking.v1alpha1.EthereumKilnStakeParameters.amount:type_name -> coinbase.staking.v1alpha1.Amount - 7, // 1: coinbase.staking.v1alpha1.EthereumKilnUnstakeParameters.amount:type_name -> coinbase.staking.v1alpha1.Amount - 0, // 2: coinbase.staking.v1alpha1.EthereumKilnStakingParameters.stake_parameters:type_name -> coinbase.staking.v1alpha1.EthereumKilnStakeParameters - 1, // 3: coinbase.staking.v1alpha1.EthereumKilnStakingParameters.unstake_parameters:type_name -> coinbase.staking.v1alpha1.EthereumKilnUnstakeParameters - 2, // 4: coinbase.staking.v1alpha1.EthereumKilnStakingParameters.claim_rewards_parameters:type_name -> coinbase.staking.v1alpha1.EthereumKilnClaimRewardsParameters - 3, // 5: coinbase.staking.v1alpha1.EthereumKilnStakingParameters.claim_stake_parameters:type_name -> coinbase.staking.v1alpha1.EthereumKilnClaimStakeParameters - 7, // 6: coinbase.staking.v1alpha1.EthereumKilnStakingContextDetails.ethereum_balance:type_name -> coinbase.staking.v1alpha1.Amount - 7, // 7: coinbase.staking.v1alpha1.EthereumKilnStakingContextDetails.integrator_share_balance:type_name -> coinbase.staking.v1alpha1.Amount - 7, // 8: coinbase.staking.v1alpha1.EthereumKilnStakingContextDetails.integrator_share_underlying_balance:type_name -> coinbase.staking.v1alpha1.Amount - 7, // 9: coinbase.staking.v1alpha1.EthereumKilnStakingContextDetails.total_exitable_eth:type_name -> coinbase.staking.v1alpha1.Amount - 7, // 10: coinbase.staking.v1alpha1.EthereumKilnStakingContextDetails.total_shares_pending_exit:type_name -> coinbase.staking.v1alpha1.Amount - 7, // 11: coinbase.staking.v1alpha1.EthereumKilnStakingContextDetails.fulfillable_share_count:type_name -> coinbase.staking.v1alpha1.Amount - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name -} - -func init() { file_coinbase_staking_v1alpha1_ethereum_kiln_proto_init() } -func file_coinbase_staking_v1alpha1_ethereum_kiln_proto_init() { - if File_coinbase_staking_v1alpha1_ethereum_kiln_proto != nil { - return - } - file_coinbase_staking_v1alpha1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthereumKilnStakeParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthereumKilnUnstakeParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthereumKilnClaimRewardsParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthereumKilnClaimStakeParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthereumKilnStakingParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthereumKilnStakingContextParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EthereumKilnStakingContextDetails); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*EthereumKilnStakingParameters_StakeParameters)(nil), - (*EthereumKilnStakingParameters_UnstakeParameters)(nil), - (*EthereumKilnStakingParameters_ClaimRewardsParameters)(nil), - (*EthereumKilnStakingParameters_ClaimStakeParameters)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDesc, - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_coinbase_staking_v1alpha1_ethereum_kiln_proto_goTypes, - DependencyIndexes: file_coinbase_staking_v1alpha1_ethereum_kiln_proto_depIdxs, - MessageInfos: file_coinbase_staking_v1alpha1_ethereum_kiln_proto_msgTypes, - }.Build() - File_coinbase_staking_v1alpha1_ethereum_kiln_proto = out.File - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_rawDesc = nil - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_goTypes = nil - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_depIdxs = nil -} diff --git a/gen/go/coinbase/staking/v1alpha1/network.pb.go b/gen/go/coinbase/staking/v1alpha1/network.pb.go deleted file mode 100644 index 90c1359..0000000 --- a/gen/go/coinbase/staking/v1alpha1/network.pb.go +++ /dev/null @@ -1,314 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: coinbase/staking/v1alpha1/network.proto - -package v1alpha1 - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A Network resource, which represents a blockchain network. -// (e.g. mainnet, testnet, etc.) -type Network struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource name of the Network. - // Format: protocols/{protocolName}/networks/{networkName} - // Ex: protocols/polygon/networks/goerli - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Represents if the network is the mainnet network - // for the given protocol. - IsMainnet bool `protobuf:"varint,2,opt,name=is_mainnet,json=isMainnet,proto3" json:"is_mainnet,omitempty"` -} - -func (x *Network) Reset() { - *x = Network{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_network_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Network) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Network) ProtoMessage() {} - -func (x *Network) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_network_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Network.ProtoReflect.Descriptor instead. -func (*Network) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_network_proto_rawDescGZIP(), []int{0} -} - -func (x *Network) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Network) GetIsMainnet() bool { - if x != nil { - return x.IsMainnet - } - return false -} - -// The request message for ListNetworks. -type ListNetworksRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource name of the parent that owns - // the collection of networks. - // Format: protocols/{protocol} - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` -} - -func (x *ListNetworksRequest) Reset() { - *x = ListNetworksRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_network_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNetworksRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNetworksRequest) ProtoMessage() {} - -func (x *ListNetworksRequest) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_network_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListNetworksRequest.ProtoReflect.Descriptor instead. -func (*ListNetworksRequest) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_network_proto_rawDescGZIP(), []int{1} -} - -func (x *ListNetworksRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -// The response message for ListNetworks. -type ListNetworksResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The list of networks. - Networks []*Network `protobuf:"bytes,1,rep,name=networks,proto3" json:"networks,omitempty"` -} - -func (x *ListNetworksResponse) Reset() { - *x = ListNetworksResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_network_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNetworksResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNetworksResponse) ProtoMessage() {} - -func (x *ListNetworksResponse) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_network_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListNetworksResponse.ProtoReflect.Descriptor instead. -func (*ListNetworksResponse) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_network_proto_rawDescGZIP(), []int{2} -} - -func (x *ListNetworksResponse) GetNetworks() []*Network { - if x != nil { - return x.Networks - } - return nil -} - -var File_coinbase_staking_v1alpha1_network_proto protoreflect.FileDescriptor - -var file_coinbase_staking_v1alpha1_network_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x69, 0x6e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x9b, 0x01, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x6d, 0x61, 0x69, 0x6e, 0x6e, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x4d, 0x61, 0x69, 0x6e, 0x6e, 0x65, 0x74, 0x3a, - 0x5d, 0xea, 0x41, 0x5a, 0x0a, 0x1c, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, - 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x12, 0x27, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x2f, 0x7b, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x7d, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x73, 0x2f, 0x7b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x7d, 0x2a, 0x08, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x32, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x53, - 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1e, 0x12, 0x1c, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x22, 0x56, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, - 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x52, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x42, 0x50, 0x5a, 0x4e, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x2d, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, - 0x2f, 0x67, 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_coinbase_staking_v1alpha1_network_proto_rawDescOnce sync.Once - file_coinbase_staking_v1alpha1_network_proto_rawDescData = file_coinbase_staking_v1alpha1_network_proto_rawDesc -) - -func file_coinbase_staking_v1alpha1_network_proto_rawDescGZIP() []byte { - file_coinbase_staking_v1alpha1_network_proto_rawDescOnce.Do(func() { - file_coinbase_staking_v1alpha1_network_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_v1alpha1_network_proto_rawDescData) - }) - return file_coinbase_staking_v1alpha1_network_proto_rawDescData -} - -var file_coinbase_staking_v1alpha1_network_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_coinbase_staking_v1alpha1_network_proto_goTypes = []interface{}{ - (*Network)(nil), // 0: coinbase.staking.v1alpha1.Network - (*ListNetworksRequest)(nil), // 1: coinbase.staking.v1alpha1.ListNetworksRequest - (*ListNetworksResponse)(nil), // 2: coinbase.staking.v1alpha1.ListNetworksResponse -} -var file_coinbase_staking_v1alpha1_network_proto_depIdxs = []int32{ - 0, // 0: coinbase.staking.v1alpha1.ListNetworksResponse.networks:type_name -> coinbase.staking.v1alpha1.Network - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_coinbase_staking_v1alpha1_network_proto_init() } -func file_coinbase_staking_v1alpha1_network_proto_init() { - if File_coinbase_staking_v1alpha1_network_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_coinbase_staking_v1alpha1_network_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Network); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_network_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNetworksRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_network_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNetworksResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_coinbase_staking_v1alpha1_network_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_coinbase_staking_v1alpha1_network_proto_goTypes, - DependencyIndexes: file_coinbase_staking_v1alpha1_network_proto_depIdxs, - MessageInfos: file_coinbase_staking_v1alpha1_network_proto_msgTypes, - }.Build() - File_coinbase_staking_v1alpha1_network_proto = out.File - file_coinbase_staking_v1alpha1_network_proto_rawDesc = nil - file_coinbase_staking_v1alpha1_network_proto_goTypes = nil - file_coinbase_staking_v1alpha1_network_proto_depIdxs = nil -} diff --git a/gen/go/coinbase/staking/v1alpha1/polygon.pb.go b/gen/go/coinbase/staking/v1alpha1/polygon.pb.go deleted file mode 100644 index a270e1c..0000000 --- a/gen/go/coinbase/staking/v1alpha1/polygon.pb.go +++ /dev/null @@ -1,632 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: coinbase/staking/v1alpha1/polygon.proto - -package v1alpha1 - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The parameters required for stake action on Polygon. -type PolygonStakeParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The public address of the delegator you wish to - // interact with. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // The public address of the validator you wish to - // perform the action to. - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // The amount of the asset. For native assets or ERC-20 contracts, this is presented in terms of - // atomic units (e.g., Wei for Ether) as a base-10 number. - Amount *Amount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *PolygonStakeParameters) Reset() { - *x = PolygonStakeParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PolygonStakeParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PolygonStakeParameters) ProtoMessage() {} - -func (x *PolygonStakeParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PolygonStakeParameters.ProtoReflect.Descriptor instead. -func (*PolygonStakeParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_polygon_proto_rawDescGZIP(), []int{0} -} - -func (x *PolygonStakeParameters) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *PolygonStakeParameters) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *PolygonStakeParameters) GetAmount() *Amount { - if x != nil { - return x.Amount - } - return nil -} - -// The parameters required for unstake action on Polygon. -type PolygonUnstakeParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The public address of the delegator you wish to - // interact with. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // The public address of the validator you wish to - // perform the action to. - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // The amount of the asset. For native assets or ERC-20 contracts, this is presented in terms of - // atomic units (e.g., Wei for Ether) as a base-10 number. - Amount *Amount `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *PolygonUnstakeParameters) Reset() { - *x = PolygonUnstakeParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PolygonUnstakeParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PolygonUnstakeParameters) ProtoMessage() {} - -func (x *PolygonUnstakeParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PolygonUnstakeParameters.ProtoReflect.Descriptor instead. -func (*PolygonUnstakeParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_polygon_proto_rawDescGZIP(), []int{1} -} - -func (x *PolygonUnstakeParameters) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *PolygonUnstakeParameters) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *PolygonUnstakeParameters) GetAmount() *Amount { - if x != nil { - return x.Amount - } - return nil -} - -// The parameters required for unstake action on Polygon. -type PolygonRestakeParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The public address of the delegator you wish to - // interact with. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // The public address of the validator you wish to - // perform the action to. - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` -} - -func (x *PolygonRestakeParameters) Reset() { - *x = PolygonRestakeParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PolygonRestakeParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PolygonRestakeParameters) ProtoMessage() {} - -func (x *PolygonRestakeParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PolygonRestakeParameters.ProtoReflect.Descriptor instead. -func (*PolygonRestakeParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_polygon_proto_rawDescGZIP(), []int{2} -} - -func (x *PolygonRestakeParameters) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *PolygonRestakeParameters) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -// The parameters required for claim rewards action on Polygon. -type PolygonClaimRewardsParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The public address of the delegator you wish to - // interact with. - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` - // The public address of the validator you wish to - // perform the action to. - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` -} - -func (x *PolygonClaimRewardsParameters) Reset() { - *x = PolygonClaimRewardsParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PolygonClaimRewardsParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PolygonClaimRewardsParameters) ProtoMessage() {} - -func (x *PolygonClaimRewardsParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PolygonClaimRewardsParameters.ProtoReflect.Descriptor instead. -func (*PolygonClaimRewardsParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_polygon_proto_rawDescGZIP(), []int{3} -} - -func (x *PolygonClaimRewardsParameters) GetDelegatorAddress() string { - if x != nil { - return x.DelegatorAddress - } - return "" -} - -func (x *PolygonClaimRewardsParameters) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -// The parameters needed for staking on Polygon. -type PolygonStakingParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Parameters: - // - // *PolygonStakingParameters_StakeParameters - // *PolygonStakingParameters_UnstakeParameters - // *PolygonStakingParameters_RestakeParameters - // *PolygonStakingParameters_ClaimRewardsParameters - Parameters isPolygonStakingParameters_Parameters `protobuf_oneof:"parameters"` -} - -func (x *PolygonStakingParameters) Reset() { - *x = PolygonStakingParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PolygonStakingParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PolygonStakingParameters) ProtoMessage() {} - -func (x *PolygonStakingParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PolygonStakingParameters.ProtoReflect.Descriptor instead. -func (*PolygonStakingParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_polygon_proto_rawDescGZIP(), []int{4} -} - -func (m *PolygonStakingParameters) GetParameters() isPolygonStakingParameters_Parameters { - if m != nil { - return m.Parameters - } - return nil -} - -func (x *PolygonStakingParameters) GetStakeParameters() *PolygonStakeParameters { - if x, ok := x.GetParameters().(*PolygonStakingParameters_StakeParameters); ok { - return x.StakeParameters - } - return nil -} - -func (x *PolygonStakingParameters) GetUnstakeParameters() *PolygonUnstakeParameters { - if x, ok := x.GetParameters().(*PolygonStakingParameters_UnstakeParameters); ok { - return x.UnstakeParameters - } - return nil -} - -func (x *PolygonStakingParameters) GetRestakeParameters() *PolygonRestakeParameters { - if x, ok := x.GetParameters().(*PolygonStakingParameters_RestakeParameters); ok { - return x.RestakeParameters - } - return nil -} - -func (x *PolygonStakingParameters) GetClaimRewardsParameters() *PolygonClaimRewardsParameters { - if x, ok := x.GetParameters().(*PolygonStakingParameters_ClaimRewardsParameters); ok { - return x.ClaimRewardsParameters - } - return nil -} - -type isPolygonStakingParameters_Parameters interface { - isPolygonStakingParameters_Parameters() -} - -type PolygonStakingParameters_StakeParameters struct { - // The parameters for stake action on Polygon. - StakeParameters *PolygonStakeParameters `protobuf:"bytes,1,opt,name=stake_parameters,json=stakeParameters,proto3,oneof"` -} - -type PolygonStakingParameters_UnstakeParameters struct { - // The parameters for unstake action on Polygon. - UnstakeParameters *PolygonUnstakeParameters `protobuf:"bytes,2,opt,name=unstake_parameters,json=unstakeParameters,proto3,oneof"` -} - -type PolygonStakingParameters_RestakeParameters struct { - // The parameters for restake action on Polygon. - RestakeParameters *PolygonRestakeParameters `protobuf:"bytes,3,opt,name=restake_parameters,json=restakeParameters,proto3,oneof"` -} - -type PolygonStakingParameters_ClaimRewardsParameters struct { - // The parameters for claim rewards action on Polygon. - ClaimRewardsParameters *PolygonClaimRewardsParameters `protobuf:"bytes,4,opt,name=claim_rewards_parameters,json=claimRewardsParameters,proto3,oneof"` -} - -func (*PolygonStakingParameters_StakeParameters) isPolygonStakingParameters_Parameters() {} - -func (*PolygonStakingParameters_UnstakeParameters) isPolygonStakingParameters_Parameters() {} - -func (*PolygonStakingParameters_RestakeParameters) isPolygonStakingParameters_Parameters() {} - -func (*PolygonStakingParameters_ClaimRewardsParameters) isPolygonStakingParameters_Parameters() {} - -var File_coinbase_staking_v1alpha1_polygon_proto protoreflect.FileDescriptor - -var file_coinbase_staking_v1alpha1_polygon_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x79, - 0x67, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x69, 0x6e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, - 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xef, 0x01, - 0x0a, 0x16, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x11, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3e, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, - 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x31, 0x92, 0x41, - 0x2e, 0x0a, 0x2c, 0x2a, 0x2a, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x20, 0x6f, 0x6e, 0x20, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x2e, 0x22, - 0xf3, 0x01, 0x0a, 0x18, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x55, 0x6e, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, 0x11, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, - 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x3e, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x2c, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, 0x74, - 0x6f, 0x20, 0x75, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x6f, 0x6e, 0x20, 0x50, 0x6f, 0x6c, - 0x79, 0x67, 0x6f, 0x6e, 0x2e, 0x22, 0xb3, 0x01, 0x0a, 0x18, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x12, 0x30, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x02, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x33, 0x92, 0x41, 0x30, 0x0a, 0x2e, 0x2a, 0x2c, 0x54, - 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x20, 0x6e, 0x65, - 0x65, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x20, - 0x6f, 0x6e, 0x20, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x2e, 0x22, 0xbe, 0x01, 0x0a, 0x1d, - 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x30, 0x0a, - 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x30, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, - 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x3a, 0x39, 0x92, 0x41, 0x36, 0x0a, 0x34, 0x2a, 0x32, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, - 0x74, 0x6f, 0x20, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x20, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, - 0x20, 0x6f, 0x6e, 0x20, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x2e, 0x22, 0xca, 0x03, 0x0a, - 0x18, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5e, 0x0a, 0x10, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x64, 0x0a, 0x12, 0x75, 0x6e, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x11, 0x75, 0x6e, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x64, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x63, 0x6f, - 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x48, 0x00, 0x52, 0x11, 0x72, 0x65, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x74, 0x0a, 0x18, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x43, 0x6c, 0x61, 0x69, 0x6d, - 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x48, 0x00, 0x52, 0x16, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x50, 0x5a, 0x4e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, - 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, - 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_coinbase_staking_v1alpha1_polygon_proto_rawDescOnce sync.Once - file_coinbase_staking_v1alpha1_polygon_proto_rawDescData = file_coinbase_staking_v1alpha1_polygon_proto_rawDesc -) - -func file_coinbase_staking_v1alpha1_polygon_proto_rawDescGZIP() []byte { - file_coinbase_staking_v1alpha1_polygon_proto_rawDescOnce.Do(func() { - file_coinbase_staking_v1alpha1_polygon_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_v1alpha1_polygon_proto_rawDescData) - }) - return file_coinbase_staking_v1alpha1_polygon_proto_rawDescData -} - -var file_coinbase_staking_v1alpha1_polygon_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_coinbase_staking_v1alpha1_polygon_proto_goTypes = []interface{}{ - (*PolygonStakeParameters)(nil), // 0: coinbase.staking.v1alpha1.PolygonStakeParameters - (*PolygonUnstakeParameters)(nil), // 1: coinbase.staking.v1alpha1.PolygonUnstakeParameters - (*PolygonRestakeParameters)(nil), // 2: coinbase.staking.v1alpha1.PolygonRestakeParameters - (*PolygonClaimRewardsParameters)(nil), // 3: coinbase.staking.v1alpha1.PolygonClaimRewardsParameters - (*PolygonStakingParameters)(nil), // 4: coinbase.staking.v1alpha1.PolygonStakingParameters - (*Amount)(nil), // 5: coinbase.staking.v1alpha1.Amount -} -var file_coinbase_staking_v1alpha1_polygon_proto_depIdxs = []int32{ - 5, // 0: coinbase.staking.v1alpha1.PolygonStakeParameters.amount:type_name -> coinbase.staking.v1alpha1.Amount - 5, // 1: coinbase.staking.v1alpha1.PolygonUnstakeParameters.amount:type_name -> coinbase.staking.v1alpha1.Amount - 0, // 2: coinbase.staking.v1alpha1.PolygonStakingParameters.stake_parameters:type_name -> coinbase.staking.v1alpha1.PolygonStakeParameters - 1, // 3: coinbase.staking.v1alpha1.PolygonStakingParameters.unstake_parameters:type_name -> coinbase.staking.v1alpha1.PolygonUnstakeParameters - 2, // 4: coinbase.staking.v1alpha1.PolygonStakingParameters.restake_parameters:type_name -> coinbase.staking.v1alpha1.PolygonRestakeParameters - 3, // 5: coinbase.staking.v1alpha1.PolygonStakingParameters.claim_rewards_parameters:type_name -> coinbase.staking.v1alpha1.PolygonClaimRewardsParameters - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_coinbase_staking_v1alpha1_polygon_proto_init() } -func file_coinbase_staking_v1alpha1_polygon_proto_init() { - if File_coinbase_staking_v1alpha1_polygon_proto != nil { - return - } - file_coinbase_staking_v1alpha1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PolygonStakeParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PolygonUnstakeParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PolygonRestakeParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PolygonClaimRewardsParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PolygonStakingParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_coinbase_staking_v1alpha1_polygon_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*PolygonStakingParameters_StakeParameters)(nil), - (*PolygonStakingParameters_UnstakeParameters)(nil), - (*PolygonStakingParameters_RestakeParameters)(nil), - (*PolygonStakingParameters_ClaimRewardsParameters)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_coinbase_staking_v1alpha1_polygon_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_coinbase_staking_v1alpha1_polygon_proto_goTypes, - DependencyIndexes: file_coinbase_staking_v1alpha1_polygon_proto_depIdxs, - MessageInfos: file_coinbase_staking_v1alpha1_polygon_proto_msgTypes, - }.Build() - File_coinbase_staking_v1alpha1_polygon_proto = out.File - file_coinbase_staking_v1alpha1_polygon_proto_rawDesc = nil - file_coinbase_staking_v1alpha1_polygon_proto_goTypes = nil - file_coinbase_staking_v1alpha1_polygon_proto_depIdxs = nil -} diff --git a/gen/go/coinbase/staking/v1alpha1/solana.pb.go b/gen/go/coinbase/staking/v1alpha1/solana.pb.go deleted file mode 100644 index 549547d..0000000 --- a/gen/go/coinbase/staking/v1alpha1/solana.pb.go +++ /dev/null @@ -1,1109 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: coinbase/staking/v1alpha1/solana.proto - -package v1alpha1 - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The parameters required to use a durable transaction nonce for Solana transactions. -type NonceOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The blockhash stored in the nonce account. - Nonce string `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` - // The address of the nonce account. - NonceAccount string `protobuf:"bytes,2,opt,name=nonce_account,json=nonceAccount,proto3" json:"nonce_account,omitempty"` - // The address of the nonce authority. If not provided, defaults to the nonce_account_address. Signs the transaction. - NonceAuthority string `protobuf:"bytes,3,opt,name=nonce_authority,json=nonceAuthority,proto3" json:"nonce_authority,omitempty"` -} - -func (x *NonceOptions) Reset() { - *x = NonceOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NonceOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NonceOptions) ProtoMessage() {} - -func (x *NonceOptions) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use NonceOptions.ProtoReflect.Descriptor instead. -func (*NonceOptions) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_solana_proto_rawDescGZIP(), []int{0} -} - -func (x *NonceOptions) GetNonce() string { - if x != nil { - return x.Nonce - } - return "" -} - -func (x *NonceOptions) GetNonceAccount() string { - if x != nil { - return x.NonceAccount - } - return "" -} - -func (x *NonceOptions) GetNonceAuthority() string { - if x != nil { - return x.NonceAuthority - } - return "" -} - -// The parameters required for the create stake account action on Solana. -type SolanaCreateStakeAccountParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the new stake account which will be created. This address must not already exist. Signs the transaction. - StakeAccountAddress string `protobuf:"bytes,1,opt,name=stake_account_address,json=stakeAccountAddress,proto3" json:"stake_account_address,omitempty"` - // The address of the account which will fund the stake account. Pays the transaction fee. Signs the transaction. - FromAddress string `protobuf:"bytes,2,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - // The address of the account which will be granted signing authority over staking operations on the new stake account. If not provided, defaults to the from_address. - StakeAuthority string `protobuf:"bytes,3,opt,name=stake_authority,json=stakeAuthority,proto3" json:"stake_authority,omitempty"` - // The address of the account which will be granted signing authority over withdrawing inactive stake from the new stake account. If not provided, defaults to the from_address. - WithdrawAuthority string `protobuf:"bytes,4,opt,name=withdraw_authority,json=withdrawAuthority,proto3" json:"withdraw_authority,omitempty"` - // The amount to fund the stake account with, in Lamports. - Amount *Amount `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` - // The parameters required to use a durable transaction nonce for Solana transactions. - NonceOptions *NonceOptions `protobuf:"bytes,6,opt,name=nonce_options,json=nonceOptions,proto3" json:"nonce_options,omitempty"` -} - -func (x *SolanaCreateStakeAccountParameters) Reset() { - *x = SolanaCreateStakeAccountParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SolanaCreateStakeAccountParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SolanaCreateStakeAccountParameters) ProtoMessage() {} - -func (x *SolanaCreateStakeAccountParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SolanaCreateStakeAccountParameters.ProtoReflect.Descriptor instead. -func (*SolanaCreateStakeAccountParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_solana_proto_rawDescGZIP(), []int{1} -} - -func (x *SolanaCreateStakeAccountParameters) GetStakeAccountAddress() string { - if x != nil { - return x.StakeAccountAddress - } - return "" -} - -func (x *SolanaCreateStakeAccountParameters) GetFromAddress() string { - if x != nil { - return x.FromAddress - } - return "" -} - -func (x *SolanaCreateStakeAccountParameters) GetStakeAuthority() string { - if x != nil { - return x.StakeAuthority - } - return "" -} - -func (x *SolanaCreateStakeAccountParameters) GetWithdrawAuthority() string { - if x != nil { - return x.WithdrawAuthority - } - return "" -} - -func (x *SolanaCreateStakeAccountParameters) GetAmount() *Amount { - if x != nil { - return x.Amount - } - return nil -} - -func (x *SolanaCreateStakeAccountParameters) GetNonceOptions() *NonceOptions { - if x != nil { - return x.NonceOptions - } - return nil -} - -// The parameters required for the delegate stake action on Solana. -type SolanaDelegateStakeParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the stake account which will be delegating its stake. - StakeAccountAddress string `protobuf:"bytes,1,opt,name=stake_account_address,json=stakeAccountAddress,proto3" json:"stake_account_address,omitempty"` - // The address of the validator's vote account to which the stake will be delegated. - VoteAccountAddress string `protobuf:"bytes,2,opt,name=vote_account_address,json=voteAccountAddress,proto3" json:"vote_account_address,omitempty"` - // The address of the account which has signing authority over staking operations on the stake account. Signs the transaction. - StakeAuthority string `protobuf:"bytes,3,opt,name=stake_authority,json=stakeAuthority,proto3" json:"stake_authority,omitempty"` - // The parameters required to use a durable transaction nonce for Solana transactions. - NonceOptions *NonceOptions `protobuf:"bytes,4,opt,name=nonce_options,json=nonceOptions,proto3" json:"nonce_options,omitempty"` -} - -func (x *SolanaDelegateStakeParameters) Reset() { - *x = SolanaDelegateStakeParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SolanaDelegateStakeParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SolanaDelegateStakeParameters) ProtoMessage() {} - -func (x *SolanaDelegateStakeParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SolanaDelegateStakeParameters.ProtoReflect.Descriptor instead. -func (*SolanaDelegateStakeParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_solana_proto_rawDescGZIP(), []int{2} -} - -func (x *SolanaDelegateStakeParameters) GetStakeAccountAddress() string { - if x != nil { - return x.StakeAccountAddress - } - return "" -} - -func (x *SolanaDelegateStakeParameters) GetVoteAccountAddress() string { - if x != nil { - return x.VoteAccountAddress - } - return "" -} - -func (x *SolanaDelegateStakeParameters) GetStakeAuthority() string { - if x != nil { - return x.StakeAuthority - } - return "" -} - -func (x *SolanaDelegateStakeParameters) GetNonceOptions() *NonceOptions { - if x != nil { - return x.NonceOptions - } - return nil -} - -// The parameters required for the deactivate stake action on Solana. -type SolanaDeactivateStakeParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the stake account which will have its stake deactivated. Stake must be currently active. - StakeAccountAddress string `protobuf:"bytes,1,opt,name=stake_account_address,json=stakeAccountAddress,proto3" json:"stake_account_address,omitempty"` - // The address of the account which has signing authority over staking operations on the stake account. Signs the transaction. - StakeAuthority string `protobuf:"bytes,2,opt,name=stake_authority,json=stakeAuthority,proto3" json:"stake_authority,omitempty"` - // The parameters required to use a durable transaction nonce for Solana transactions. - NonceOptions *NonceOptions `protobuf:"bytes,3,opt,name=nonce_options,json=nonceOptions,proto3" json:"nonce_options,omitempty"` -} - -func (x *SolanaDeactivateStakeParameters) Reset() { - *x = SolanaDeactivateStakeParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SolanaDeactivateStakeParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SolanaDeactivateStakeParameters) ProtoMessage() {} - -func (x *SolanaDeactivateStakeParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SolanaDeactivateStakeParameters.ProtoReflect.Descriptor instead. -func (*SolanaDeactivateStakeParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_solana_proto_rawDescGZIP(), []int{3} -} - -func (x *SolanaDeactivateStakeParameters) GetStakeAccountAddress() string { - if x != nil { - return x.StakeAccountAddress - } - return "" -} - -func (x *SolanaDeactivateStakeParameters) GetStakeAuthority() string { - if x != nil { - return x.StakeAuthority - } - return "" -} - -func (x *SolanaDeactivateStakeParameters) GetNonceOptions() *NonceOptions { - if x != nil { - return x.NonceOptions - } - return nil -} - -// The parameters required for the withdraw stake action on Solana. -type SolanaWithdrawStakeParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the stake account from which stake will be withdrawn. Stake must be currently inactive. - StakeAccountAddress string `protobuf:"bytes,1,opt,name=stake_account_address,json=stakeAccountAddress,proto3" json:"stake_account_address,omitempty"` - // The address of the recipient account which will receive the withdrawn stake. - RecipientAddress string `protobuf:"bytes,2,opt,name=recipient_address,json=recipientAddress,proto3" json:"recipient_address,omitempty"` - // The address of the account which has signing authority over withdrawing inactive stake from the stake account. Signs the transaction. - WithdrawAuthority string `protobuf:"bytes,3,opt,name=withdraw_authority,json=withdrawAuthority,proto3" json:"withdraw_authority,omitempty"` - // The amount to withdraw from the stake account, in Lamports. - Amount *Amount `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` - // The parameters required to use a durable transaction nonce for Solana transactions. - NonceOptions *NonceOptions `protobuf:"bytes,5,opt,name=nonce_options,json=nonceOptions,proto3" json:"nonce_options,omitempty"` -} - -func (x *SolanaWithdrawStakeParameters) Reset() { - *x = SolanaWithdrawStakeParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SolanaWithdrawStakeParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SolanaWithdrawStakeParameters) ProtoMessage() {} - -func (x *SolanaWithdrawStakeParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SolanaWithdrawStakeParameters.ProtoReflect.Descriptor instead. -func (*SolanaWithdrawStakeParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_solana_proto_rawDescGZIP(), []int{4} -} - -func (x *SolanaWithdrawStakeParameters) GetStakeAccountAddress() string { - if x != nil { - return x.StakeAccountAddress - } - return "" -} - -func (x *SolanaWithdrawStakeParameters) GetRecipientAddress() string { - if x != nil { - return x.RecipientAddress - } - return "" -} - -func (x *SolanaWithdrawStakeParameters) GetWithdrawAuthority() string { - if x != nil { - return x.WithdrawAuthority - } - return "" -} - -func (x *SolanaWithdrawStakeParameters) GetAmount() *Amount { - if x != nil { - return x.Amount - } - return nil -} - -func (x *SolanaWithdrawStakeParameters) GetNonceOptions() *NonceOptions { - if x != nil { - return x.NonceOptions - } - return nil -} - -// The parameters required for split stake action on Solana. -type SolanaSplitStakeParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the stake account will be split and have its stake removed. - StakeAccountAddress string `protobuf:"bytes,1,opt,name=stake_account_address,json=stakeAccountAddress,proto3" json:"stake_account_address,omitempty"` - // The address of the new stake account which will be created and have the stake added to it. - NewStakeAccountAddress string `protobuf:"bytes,2,opt,name=new_stake_account_address,json=newStakeAccountAddress,proto3" json:"new_stake_account_address,omitempty"` - // The address of the account which has signing authority over staking operations on the stake account. Signs the transaction. - StakeAuthority string `protobuf:"bytes,3,opt,name=stake_authority,json=stakeAuthority,proto3" json:"stake_authority,omitempty"` - // The amount of stake to split, in Lamports. - Amount *Amount `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` - // The parameters required to use a durable transaction nonce for Solana transactions. - NonceOptions *NonceOptions `protobuf:"bytes,5,opt,name=nonce_options,json=nonceOptions,proto3" json:"nonce_options,omitempty"` -} - -func (x *SolanaSplitStakeParameters) Reset() { - *x = SolanaSplitStakeParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SolanaSplitStakeParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SolanaSplitStakeParameters) ProtoMessage() {} - -func (x *SolanaSplitStakeParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SolanaSplitStakeParameters.ProtoReflect.Descriptor instead. -func (*SolanaSplitStakeParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_solana_proto_rawDescGZIP(), []int{5} -} - -func (x *SolanaSplitStakeParameters) GetStakeAccountAddress() string { - if x != nil { - return x.StakeAccountAddress - } - return "" -} - -func (x *SolanaSplitStakeParameters) GetNewStakeAccountAddress() string { - if x != nil { - return x.NewStakeAccountAddress - } - return "" -} - -func (x *SolanaSplitStakeParameters) GetStakeAuthority() string { - if x != nil { - return x.StakeAuthority - } - return "" -} - -func (x *SolanaSplitStakeParameters) GetAmount() *Amount { - if x != nil { - return x.Amount - } - return nil -} - -func (x *SolanaSplitStakeParameters) GetNonceOptions() *NonceOptions { - if x != nil { - return x.NonceOptions - } - return nil -} - -// The parameters required for merge stake action on Solana. -type SolanaMergeStakeParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the stake account will be merged into and have stake added to it. - StakeAccountAddress string `protobuf:"bytes,1,opt,name=stake_account_address,json=stakeAccountAddress,proto3" json:"stake_account_address,omitempty"` - // The address of the source stake account which will have no longer exist after the merge. - SourceStakeAccountAddress string `protobuf:"bytes,2,opt,name=source_stake_account_address,json=sourceStakeAccountAddress,proto3" json:"source_stake_account_address,omitempty"` - // The address of the account which has signing authority over staking operations on the stake account. Signs the transaction. - StakeAuthority string `protobuf:"bytes,3,opt,name=stake_authority,json=stakeAuthority,proto3" json:"stake_authority,omitempty"` - // The parameters required to use a durable transaction nonce for Solana transactions. - NonceOptions *NonceOptions `protobuf:"bytes,4,opt,name=nonce_options,json=nonceOptions,proto3" json:"nonce_options,omitempty"` -} - -func (x *SolanaMergeStakeParameters) Reset() { - *x = SolanaMergeStakeParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SolanaMergeStakeParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SolanaMergeStakeParameters) ProtoMessage() {} - -func (x *SolanaMergeStakeParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SolanaMergeStakeParameters.ProtoReflect.Descriptor instead. -func (*SolanaMergeStakeParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_solana_proto_rawDescGZIP(), []int{6} -} - -func (x *SolanaMergeStakeParameters) GetStakeAccountAddress() string { - if x != nil { - return x.StakeAccountAddress - } - return "" -} - -func (x *SolanaMergeStakeParameters) GetSourceStakeAccountAddress() string { - if x != nil { - return x.SourceStakeAccountAddress - } - return "" -} - -func (x *SolanaMergeStakeParameters) GetStakeAuthority() string { - if x != nil { - return x.StakeAuthority - } - return "" -} - -func (x *SolanaMergeStakeParameters) GetNonceOptions() *NonceOptions { - if x != nil { - return x.NonceOptions - } - return nil -} - -// The parameters needed for staking on Solana. -type SolanaStakingParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Parameters: - // - // *SolanaStakingParameters_CreateStakeParameters - // *SolanaStakingParameters_DelegateStakeParameters - // *SolanaStakingParameters_DeactivateStakeParameters - // *SolanaStakingParameters_WithdrawStakeParameters - // *SolanaStakingParameters_SplitStakeParameters - // *SolanaStakingParameters_MergeStakeParameters - Parameters isSolanaStakingParameters_Parameters `protobuf_oneof:"parameters"` -} - -func (x *SolanaStakingParameters) Reset() { - *x = SolanaStakingParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SolanaStakingParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SolanaStakingParameters) ProtoMessage() {} - -func (x *SolanaStakingParameters) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_solana_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SolanaStakingParameters.ProtoReflect.Descriptor instead. -func (*SolanaStakingParameters) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_solana_proto_rawDescGZIP(), []int{7} -} - -func (m *SolanaStakingParameters) GetParameters() isSolanaStakingParameters_Parameters { - if m != nil { - return m.Parameters - } - return nil -} - -func (x *SolanaStakingParameters) GetCreateStakeParameters() *SolanaCreateStakeAccountParameters { - if x, ok := x.GetParameters().(*SolanaStakingParameters_CreateStakeParameters); ok { - return x.CreateStakeParameters - } - return nil -} - -func (x *SolanaStakingParameters) GetDelegateStakeParameters() *SolanaDelegateStakeParameters { - if x, ok := x.GetParameters().(*SolanaStakingParameters_DelegateStakeParameters); ok { - return x.DelegateStakeParameters - } - return nil -} - -func (x *SolanaStakingParameters) GetDeactivateStakeParameters() *SolanaDeactivateStakeParameters { - if x, ok := x.GetParameters().(*SolanaStakingParameters_DeactivateStakeParameters); ok { - return x.DeactivateStakeParameters - } - return nil -} - -func (x *SolanaStakingParameters) GetWithdrawStakeParameters() *SolanaWithdrawStakeParameters { - if x, ok := x.GetParameters().(*SolanaStakingParameters_WithdrawStakeParameters); ok { - return x.WithdrawStakeParameters - } - return nil -} - -func (x *SolanaStakingParameters) GetSplitStakeParameters() *SolanaSplitStakeParameters { - if x, ok := x.GetParameters().(*SolanaStakingParameters_SplitStakeParameters); ok { - return x.SplitStakeParameters - } - return nil -} - -func (x *SolanaStakingParameters) GetMergeStakeParameters() *SolanaMergeStakeParameters { - if x, ok := x.GetParameters().(*SolanaStakingParameters_MergeStakeParameters); ok { - return x.MergeStakeParameters - } - return nil -} - -type isSolanaStakingParameters_Parameters interface { - isSolanaStakingParameters_Parameters() -} - -type SolanaStakingParameters_CreateStakeParameters struct { - // The parameters for create stake account action on Solana. - CreateStakeParameters *SolanaCreateStakeAccountParameters `protobuf:"bytes,1,opt,name=create_stake_parameters,json=createStakeParameters,proto3,oneof"` -} - -type SolanaStakingParameters_DelegateStakeParameters struct { - // The parameters for delegate stake action on Solana. - DelegateStakeParameters *SolanaDelegateStakeParameters `protobuf:"bytes,2,opt,name=delegate_stake_parameters,json=delegateStakeParameters,proto3,oneof"` -} - -type SolanaStakingParameters_DeactivateStakeParameters struct { - // The parameters for deactivate stake action on Solana. - DeactivateStakeParameters *SolanaDeactivateStakeParameters `protobuf:"bytes,3,opt,name=deactivate_stake_parameters,json=deactivateStakeParameters,proto3,oneof"` -} - -type SolanaStakingParameters_WithdrawStakeParameters struct { - // The parameters for withdraw stake action on Solana. - WithdrawStakeParameters *SolanaWithdrawStakeParameters `protobuf:"bytes,4,opt,name=withdraw_stake_parameters,json=withdrawStakeParameters,proto3,oneof"` -} - -type SolanaStakingParameters_SplitStakeParameters struct { - // The parameters for split stake action on Solana. - SplitStakeParameters *SolanaSplitStakeParameters `protobuf:"bytes,5,opt,name=split_stake_parameters,json=splitStakeParameters,proto3,oneof"` -} - -type SolanaStakingParameters_MergeStakeParameters struct { - // The parameters for merge stake action on Solana. - MergeStakeParameters *SolanaMergeStakeParameters `protobuf:"bytes,6,opt,name=merge_stake_parameters,json=mergeStakeParameters,proto3,oneof"` -} - -func (*SolanaStakingParameters_CreateStakeParameters) isSolanaStakingParameters_Parameters() {} - -func (*SolanaStakingParameters_DelegateStakeParameters) isSolanaStakingParameters_Parameters() {} - -func (*SolanaStakingParameters_DeactivateStakeParameters) isSolanaStakingParameters_Parameters() {} - -func (*SolanaStakingParameters_WithdrawStakeParameters) isSolanaStakingParameters_Parameters() {} - -func (*SolanaStakingParameters_SplitStakeParameters) isSolanaStakingParameters_Parameters() {} - -func (*SolanaStakingParameters_MergeStakeParameters) isSolanaStakingParameters_Parameters() {} - -var File_coinbase_staking_v1alpha1_solana_proto protoreflect.FileDescriptor - -var file_coinbase_staking_v1alpha1_solana_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x6f, 0x6c, 0x61, - 0x6e, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x1a, 0x26, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, - 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, - 0x0c, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x3a, 0x1c, 0x92, 0x41, 0x19, 0x0a, 0x17, 0x2a, 0x15, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, - 0x3a, 0x20, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x20, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, - 0xaa, 0x03, 0x0a, 0x22, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x26, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x32, 0x0a, 0x12, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x0d, 0x6e, 0x6f, 0x6e, - 0x63, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x6e, - 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, - 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x2e, 0x92, 0x41, - 0x2b, 0x0a, 0x29, 0x2a, 0x27, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x3a, 0x20, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xba, 0x02, 0x0a, - 0x1d, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x37, - 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, - 0x41, 0x02, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x35, 0x0a, 0x14, 0x76, 0x6f, 0x74, 0x65, 0x5f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x12, 0x76, 0x6f, 0x74, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2c, - 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x51, 0x0a, 0x0d, - 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x03, 0xe0, 0x41, - 0x01, 0x52, 0x0c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, - 0x28, 0x92, 0x41, 0x25, 0x0a, 0x23, 0x2a, 0x21, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x3a, 0x20, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x87, 0x02, 0x0a, 0x1f, 0x53, 0x6f, - 0x6c, 0x61, 0x6e, 0x61, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, - 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x12, 0x51, 0x0a, 0x0d, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, - 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x2a, 0x92, 0x41, 0x27, 0x0a, 0x25, 0x2a, 0x23, - 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x3a, 0x20, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x22, 0xfb, 0x02, 0x0a, 0x1d, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x37, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, - 0x0a, 0x11, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, - 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x32, 0x0a, 0x12, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x52, 0x11, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x41, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x0d, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, - 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x28, 0x92, 0x41, 0x25, 0x0a, 0x23, 0x2a, 0x21, - 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x3a, 0x20, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x20, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x22, 0xfd, 0x02, 0x0a, 0x1a, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x53, 0x70, 0x6c, 0x69, - 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x37, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3e, 0x0a, 0x19, 0x6e, 0x65, 0x77, - 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x52, 0x16, 0x6e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x0f, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x0d, 0x6e, 0x6f, 0x6e, 0x63, 0x65, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x25, 0x92, 0x41, 0x22, 0x0a, - 0x20, 0x2a, 0x1e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x3a, 0x20, 0x53, 0x70, 0x6c, 0x69, 0x74, - 0x20, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x22, 0xc3, 0x02, 0x0a, 0x1a, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x4d, 0x65, 0x72, 0x67, - 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x37, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x44, 0x0a, 0x1c, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x52, 0x19, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x2c, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x51, 0x0a, - 0x0d, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x03, 0xe0, - 0x41, 0x01, 0x52, 0x0c, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x3a, 0x25, 0x92, 0x41, 0x22, 0x0a, 0x20, 0x2a, 0x1e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x3a, - 0x20, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x8f, 0x06, 0x0a, 0x17, 0x53, 0x6f, 0x6c, 0x61, - 0x6e, 0x61, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x77, 0x0a, 0x17, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x15, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x76, 0x0a, 0x19, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x38, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x6c, 0x61, - 0x6e, 0x61, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x17, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x12, 0x7c, 0x0a, 0x1b, 0x64, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x63, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x44, 0x65, 0x61, 0x63, - 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, 0x00, 0x52, 0x19, 0x64, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x12, 0x76, 0x0a, 0x19, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x5f, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x48, - 0x00, 0x52, 0x17, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x6d, 0x0a, 0x16, 0x73, 0x70, - 0x6c, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x69, - 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x53, 0x70, 0x6c, - 0x69, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x48, 0x00, 0x52, 0x14, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x6d, 0x0a, 0x16, 0x6d, 0x65, 0x72, - 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x4d, 0x65, 0x72, 0x67, - 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x48, 0x00, 0x52, 0x14, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x21, 0x92, 0x41, 0x1e, 0x0a, 0x1c, 0x2a, - 0x1a, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x3a, 0x20, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x20, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x50, 0x5a, 0x4e, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, - 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, - 0x6f, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_coinbase_staking_v1alpha1_solana_proto_rawDescOnce sync.Once - file_coinbase_staking_v1alpha1_solana_proto_rawDescData = file_coinbase_staking_v1alpha1_solana_proto_rawDesc -) - -func file_coinbase_staking_v1alpha1_solana_proto_rawDescGZIP() []byte { - file_coinbase_staking_v1alpha1_solana_proto_rawDescOnce.Do(func() { - file_coinbase_staking_v1alpha1_solana_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_v1alpha1_solana_proto_rawDescData) - }) - return file_coinbase_staking_v1alpha1_solana_proto_rawDescData -} - -var file_coinbase_staking_v1alpha1_solana_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_coinbase_staking_v1alpha1_solana_proto_goTypes = []interface{}{ - (*NonceOptions)(nil), // 0: coinbase.staking.v1alpha1.NonceOptions - (*SolanaCreateStakeAccountParameters)(nil), // 1: coinbase.staking.v1alpha1.SolanaCreateStakeAccountParameters - (*SolanaDelegateStakeParameters)(nil), // 2: coinbase.staking.v1alpha1.SolanaDelegateStakeParameters - (*SolanaDeactivateStakeParameters)(nil), // 3: coinbase.staking.v1alpha1.SolanaDeactivateStakeParameters - (*SolanaWithdrawStakeParameters)(nil), // 4: coinbase.staking.v1alpha1.SolanaWithdrawStakeParameters - (*SolanaSplitStakeParameters)(nil), // 5: coinbase.staking.v1alpha1.SolanaSplitStakeParameters - (*SolanaMergeStakeParameters)(nil), // 6: coinbase.staking.v1alpha1.SolanaMergeStakeParameters - (*SolanaStakingParameters)(nil), // 7: coinbase.staking.v1alpha1.SolanaStakingParameters - (*Amount)(nil), // 8: coinbase.staking.v1alpha1.Amount -} -var file_coinbase_staking_v1alpha1_solana_proto_depIdxs = []int32{ - 8, // 0: coinbase.staking.v1alpha1.SolanaCreateStakeAccountParameters.amount:type_name -> coinbase.staking.v1alpha1.Amount - 0, // 1: coinbase.staking.v1alpha1.SolanaCreateStakeAccountParameters.nonce_options:type_name -> coinbase.staking.v1alpha1.NonceOptions - 0, // 2: coinbase.staking.v1alpha1.SolanaDelegateStakeParameters.nonce_options:type_name -> coinbase.staking.v1alpha1.NonceOptions - 0, // 3: coinbase.staking.v1alpha1.SolanaDeactivateStakeParameters.nonce_options:type_name -> coinbase.staking.v1alpha1.NonceOptions - 8, // 4: coinbase.staking.v1alpha1.SolanaWithdrawStakeParameters.amount:type_name -> coinbase.staking.v1alpha1.Amount - 0, // 5: coinbase.staking.v1alpha1.SolanaWithdrawStakeParameters.nonce_options:type_name -> coinbase.staking.v1alpha1.NonceOptions - 8, // 6: coinbase.staking.v1alpha1.SolanaSplitStakeParameters.amount:type_name -> coinbase.staking.v1alpha1.Amount - 0, // 7: coinbase.staking.v1alpha1.SolanaSplitStakeParameters.nonce_options:type_name -> coinbase.staking.v1alpha1.NonceOptions - 0, // 8: coinbase.staking.v1alpha1.SolanaMergeStakeParameters.nonce_options:type_name -> coinbase.staking.v1alpha1.NonceOptions - 1, // 9: coinbase.staking.v1alpha1.SolanaStakingParameters.create_stake_parameters:type_name -> coinbase.staking.v1alpha1.SolanaCreateStakeAccountParameters - 2, // 10: coinbase.staking.v1alpha1.SolanaStakingParameters.delegate_stake_parameters:type_name -> coinbase.staking.v1alpha1.SolanaDelegateStakeParameters - 3, // 11: coinbase.staking.v1alpha1.SolanaStakingParameters.deactivate_stake_parameters:type_name -> coinbase.staking.v1alpha1.SolanaDeactivateStakeParameters - 4, // 12: coinbase.staking.v1alpha1.SolanaStakingParameters.withdraw_stake_parameters:type_name -> coinbase.staking.v1alpha1.SolanaWithdrawStakeParameters - 5, // 13: coinbase.staking.v1alpha1.SolanaStakingParameters.split_stake_parameters:type_name -> coinbase.staking.v1alpha1.SolanaSplitStakeParameters - 6, // 14: coinbase.staking.v1alpha1.SolanaStakingParameters.merge_stake_parameters:type_name -> coinbase.staking.v1alpha1.SolanaMergeStakeParameters - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name -} - -func init() { file_coinbase_staking_v1alpha1_solana_proto_init() } -func file_coinbase_staking_v1alpha1_solana_proto_init() { - if File_coinbase_staking_v1alpha1_solana_proto != nil { - return - } - file_coinbase_staking_v1alpha1_common_proto_init() - if !protoimpl.UnsafeEnabled { - file_coinbase_staking_v1alpha1_solana_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NonceOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_solana_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SolanaCreateStakeAccountParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_solana_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SolanaDelegateStakeParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_solana_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SolanaDeactivateStakeParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_solana_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SolanaWithdrawStakeParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_solana_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SolanaSplitStakeParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_solana_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SolanaMergeStakeParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_solana_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SolanaStakingParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_coinbase_staking_v1alpha1_solana_proto_msgTypes[7].OneofWrappers = []interface{}{ - (*SolanaStakingParameters_CreateStakeParameters)(nil), - (*SolanaStakingParameters_DelegateStakeParameters)(nil), - (*SolanaStakingParameters_DeactivateStakeParameters)(nil), - (*SolanaStakingParameters_WithdrawStakeParameters)(nil), - (*SolanaStakingParameters_SplitStakeParameters)(nil), - (*SolanaStakingParameters_MergeStakeParameters)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_coinbase_staking_v1alpha1_solana_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_coinbase_staking_v1alpha1_solana_proto_goTypes, - DependencyIndexes: file_coinbase_staking_v1alpha1_solana_proto_depIdxs, - MessageInfos: file_coinbase_staking_v1alpha1_solana_proto_msgTypes, - }.Build() - File_coinbase_staking_v1alpha1_solana_proto = out.File - file_coinbase_staking_v1alpha1_solana_proto_rawDesc = nil - file_coinbase_staking_v1alpha1_solana_proto_goTypes = nil - file_coinbase_staking_v1alpha1_solana_proto_depIdxs = nil -} diff --git a/gen/go/coinbase/staking/v1alpha1/staking_context.pb.go b/gen/go/coinbase/staking/v1alpha1/staking_context.pb.go deleted file mode 100644 index 3db561c..0000000 --- a/gen/go/coinbase/staking/v1alpha1/staking_context.pb.go +++ /dev/null @@ -1,334 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: coinbase/staking/v1alpha1/staking_context.proto - -package v1alpha1 - -import ( - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The request message for the ViewStakingContext request. -type ViewStakingContextRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address to fetch staking context for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The network to fetch staking context for. - Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` - // The protocol specific parameters needed to fetch a staking context. - // - // Types that are assignable to StakingContextParameters: - // - // *ViewStakingContextRequest_EthereumKilnStakingContextParameters - StakingContextParameters isViewStakingContextRequest_StakingContextParameters `protobuf_oneof:"staking_context_parameters"` -} - -func (x *ViewStakingContextRequest) Reset() { - *x = ViewStakingContextRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_staking_context_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ViewStakingContextRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ViewStakingContextRequest) ProtoMessage() {} - -func (x *ViewStakingContextRequest) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_staking_context_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ViewStakingContextRequest.ProtoReflect.Descriptor instead. -func (*ViewStakingContextRequest) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_staking_context_proto_rawDescGZIP(), []int{0} -} - -func (x *ViewStakingContextRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *ViewStakingContextRequest) GetNetwork() string { - if x != nil { - return x.Network - } - return "" -} - -func (m *ViewStakingContextRequest) GetStakingContextParameters() isViewStakingContextRequest_StakingContextParameters { - if m != nil { - return m.StakingContextParameters - } - return nil -} - -func (x *ViewStakingContextRequest) GetEthereumKilnStakingContextParameters() *EthereumKilnStakingContextParameters { - if x, ok := x.GetStakingContextParameters().(*ViewStakingContextRequest_EthereumKilnStakingContextParameters); ok { - return x.EthereumKilnStakingContextParameters - } - return nil -} - -type isViewStakingContextRequest_StakingContextParameters interface { - isViewStakingContextRequest_StakingContextParameters() -} - -type ViewStakingContextRequest_EthereumKilnStakingContextParameters struct { - // EthereumKiln staking context parameters. - EthereumKilnStakingContextParameters *EthereumKilnStakingContextParameters `protobuf:"bytes,3,opt,name=ethereum_kiln_staking_context_parameters,json=ethereumKilnStakingContextParameters,proto3,oneof"` -} - -func (*ViewStakingContextRequest_EthereumKilnStakingContextParameters) isViewStakingContextRequest_StakingContextParameters() { -} - -// The response message for the ViewStakingContext request. -type ViewStakingContextResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address you are getting a staking context for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The protocol specific details of the staking context. - // - // Types that are assignable to StakingContextDetails: - // - // *ViewStakingContextResponse_EthereumKilnStakingContextDetails - StakingContextDetails isViewStakingContextResponse_StakingContextDetails `protobuf_oneof:"staking_context_details"` -} - -func (x *ViewStakingContextResponse) Reset() { - *x = ViewStakingContextResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_staking_context_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ViewStakingContextResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ViewStakingContextResponse) ProtoMessage() {} - -func (x *ViewStakingContextResponse) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_staking_context_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ViewStakingContextResponse.ProtoReflect.Descriptor instead. -func (*ViewStakingContextResponse) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_staking_context_proto_rawDescGZIP(), []int{1} -} - -func (x *ViewStakingContextResponse) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (m *ViewStakingContextResponse) GetStakingContextDetails() isViewStakingContextResponse_StakingContextDetails { - if m != nil { - return m.StakingContextDetails - } - return nil -} - -func (x *ViewStakingContextResponse) GetEthereumKilnStakingContextDetails() *EthereumKilnStakingContextDetails { - if x, ok := x.GetStakingContextDetails().(*ViewStakingContextResponse_EthereumKilnStakingContextDetails); ok { - return x.EthereumKilnStakingContextDetails - } - return nil -} - -type isViewStakingContextResponse_StakingContextDetails interface { - isViewStakingContextResponse_StakingContextDetails() -} - -type ViewStakingContextResponse_EthereumKilnStakingContextDetails struct { - // EthereumKiln staking context details. - EthereumKilnStakingContextDetails *EthereumKilnStakingContextDetails `protobuf:"bytes,2,opt,name=ethereum_kiln_staking_context_details,json=ethereumKilnStakingContextDetails,proto3,oneof"` -} - -func (*ViewStakingContextResponse_EthereumKilnStakingContextDetails) isViewStakingContextResponse_StakingContextDetails() { -} - -var File_coinbase_staking_v1alpha1_staking_context_proto protoreflect.FileDescriptor - -var file_coinbase_staking_v1alpha1_staking_context_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, - 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x63, - 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x5f, 0x6b, 0x69, 0x6c, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x02, 0x0a, - 0x19, 0x56, 0x69, 0x65, 0x77, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, - 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, - 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x9e, 0x01, 0x0a, 0x28, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x69, 0x6c, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x63, 0x6f, - 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x48, 0x00, 0x52, 0x24, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, - 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x1c, 0x0a, 0x1a, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xee, 0x01, 0x0a, 0x1a, 0x56, 0x69, 0x65, 0x77, - 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x25, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, - 0x75, 0x6d, 0x5f, 0x6b, 0x69, 0x6c, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x48, 0x00, 0x52, 0x21, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x19, 0x0a, - 0x17, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x50, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, - 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, - 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_coinbase_staking_v1alpha1_staking_context_proto_rawDescOnce sync.Once - file_coinbase_staking_v1alpha1_staking_context_proto_rawDescData = file_coinbase_staking_v1alpha1_staking_context_proto_rawDesc -) - -func file_coinbase_staking_v1alpha1_staking_context_proto_rawDescGZIP() []byte { - file_coinbase_staking_v1alpha1_staking_context_proto_rawDescOnce.Do(func() { - file_coinbase_staking_v1alpha1_staking_context_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_v1alpha1_staking_context_proto_rawDescData) - }) - return file_coinbase_staking_v1alpha1_staking_context_proto_rawDescData -} - -var file_coinbase_staking_v1alpha1_staking_context_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_coinbase_staking_v1alpha1_staking_context_proto_goTypes = []interface{}{ - (*ViewStakingContextRequest)(nil), // 0: coinbase.staking.v1alpha1.ViewStakingContextRequest - (*ViewStakingContextResponse)(nil), // 1: coinbase.staking.v1alpha1.ViewStakingContextResponse - (*EthereumKilnStakingContextParameters)(nil), // 2: coinbase.staking.v1alpha1.EthereumKilnStakingContextParameters - (*EthereumKilnStakingContextDetails)(nil), // 3: coinbase.staking.v1alpha1.EthereumKilnStakingContextDetails -} -var file_coinbase_staking_v1alpha1_staking_context_proto_depIdxs = []int32{ - 2, // 0: coinbase.staking.v1alpha1.ViewStakingContextRequest.ethereum_kiln_staking_context_parameters:type_name -> coinbase.staking.v1alpha1.EthereumKilnStakingContextParameters - 3, // 1: coinbase.staking.v1alpha1.ViewStakingContextResponse.ethereum_kiln_staking_context_details:type_name -> coinbase.staking.v1alpha1.EthereumKilnStakingContextDetails - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_coinbase_staking_v1alpha1_staking_context_proto_init() } -func file_coinbase_staking_v1alpha1_staking_context_proto_init() { - if File_coinbase_staking_v1alpha1_staking_context_proto != nil { - return - } - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_init() - if !protoimpl.UnsafeEnabled { - file_coinbase_staking_v1alpha1_staking_context_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ViewStakingContextRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_staking_context_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ViewStakingContextResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_coinbase_staking_v1alpha1_staking_context_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*ViewStakingContextRequest_EthereumKilnStakingContextParameters)(nil), - } - file_coinbase_staking_v1alpha1_staking_context_proto_msgTypes[1].OneofWrappers = []interface{}{ - (*ViewStakingContextResponse_EthereumKilnStakingContextDetails)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_coinbase_staking_v1alpha1_staking_context_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_coinbase_staking_v1alpha1_staking_context_proto_goTypes, - DependencyIndexes: file_coinbase_staking_v1alpha1_staking_context_proto_depIdxs, - MessageInfos: file_coinbase_staking_v1alpha1_staking_context_proto_msgTypes, - }.Build() - File_coinbase_staking_v1alpha1_staking_context_proto = out.File - file_coinbase_staking_v1alpha1_staking_context_proto_rawDesc = nil - file_coinbase_staking_v1alpha1_staking_context_proto_goTypes = nil - file_coinbase_staking_v1alpha1_staking_context_proto_depIdxs = nil -} diff --git a/gen/go/coinbase/staking/v1alpha1/workflow.pb.go b/gen/go/coinbase/staking/v1alpha1/workflow.pb.go deleted file mode 100644 index b10965a..0000000 --- a/gen/go/coinbase/staking/v1alpha1/workflow.pb.go +++ /dev/null @@ -1,1641 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc (unknown) -// source: coinbase/staking/v1alpha1/workflow.proto - -package v1alpha1 - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// State defines an enumeration of states for a staking transaction. -type TxStepOutput_State int32 - -const ( - // Unspecified transaction state, this is for backwards compatibility. - TxStepOutput_STATE_UNSPECIFIED TxStepOutput_State = 0 - // Tx has not yet been constructed in the backend. - TxStepOutput_STATE_NOT_CONSTRUCTED TxStepOutput_State = 1 - // Tx construction is over in the backend. - TxStepOutput_STATE_CONSTRUCTED TxStepOutput_State = 2 - // Tx is waiting to be signed. - TxStepOutput_STATE_PENDING_SIGNING TxStepOutput_State = 3 - // Tx has been signed and returned to the backend. - TxStepOutput_STATE_SIGNED TxStepOutput_State = 4 - // Tx is being broadcasted to the network. - TxStepOutput_STATE_BROADCASTING TxStepOutput_State = 5 - // Tx is waiting for confirmation. - TxStepOutput_STATE_CONFIRMING TxStepOutput_State = 6 - // Tx has been confirmed to be included in a block. - TxStepOutput_STATE_CONFIRMED TxStepOutput_State = 7 - // Tx has been finalized. - TxStepOutput_STATE_FINALIZED TxStepOutput_State = 8 - // Tx construction or broadcasting failed. - TxStepOutput_STATE_FAILED TxStepOutput_State = 9 - // Tx has been successfully executed. - TxStepOutput_STATE_SUCCESS TxStepOutput_State = 10 - // Tx is being canceled. - TxStepOutput_STATE_CANCELING TxStepOutput_State = 11 - // Tx has been canceled. - TxStepOutput_STATE_CANCELED TxStepOutput_State = 12 - // Tx cancellation failed. - TxStepOutput_STATE_CANCEL_FAILED TxStepOutput_State = 13 - // Tx failed but can be refreshed. - TxStepOutput_STATE_FAILED_REFRESHABLE TxStepOutput_State = 14 - // Tx is being refreshed. - TxStepOutput_STATE_REFRESHING TxStepOutput_State = 15 - // Tx is waiting to be externally broadcasted by the customer. - TxStepOutput_STATE_PENDING_EXT_BROADCAST TxStepOutput_State = 16 -) - -// Enum value maps for TxStepOutput_State. -var ( - TxStepOutput_State_name = map[int32]string{ - 0: "STATE_UNSPECIFIED", - 1: "STATE_NOT_CONSTRUCTED", - 2: "STATE_CONSTRUCTED", - 3: "STATE_PENDING_SIGNING", - 4: "STATE_SIGNED", - 5: "STATE_BROADCASTING", - 6: "STATE_CONFIRMING", - 7: "STATE_CONFIRMED", - 8: "STATE_FINALIZED", - 9: "STATE_FAILED", - 10: "STATE_SUCCESS", - 11: "STATE_CANCELING", - 12: "STATE_CANCELED", - 13: "STATE_CANCEL_FAILED", - 14: "STATE_FAILED_REFRESHABLE", - 15: "STATE_REFRESHING", - 16: "STATE_PENDING_EXT_BROADCAST", - } - TxStepOutput_State_value = map[string]int32{ - "STATE_UNSPECIFIED": 0, - "STATE_NOT_CONSTRUCTED": 1, - "STATE_CONSTRUCTED": 2, - "STATE_PENDING_SIGNING": 3, - "STATE_SIGNED": 4, - "STATE_BROADCASTING": 5, - "STATE_CONFIRMING": 6, - "STATE_CONFIRMED": 7, - "STATE_FINALIZED": 8, - "STATE_FAILED": 9, - "STATE_SUCCESS": 10, - "STATE_CANCELING": 11, - "STATE_CANCELED": 12, - "STATE_CANCEL_FAILED": 13, - "STATE_FAILED_REFRESHABLE": 14, - "STATE_REFRESHING": 15, - "STATE_PENDING_EXT_BROADCAST": 16, - } -) - -func (x TxStepOutput_State) Enum() *TxStepOutput_State { - p := new(TxStepOutput_State) - *p = x - return p -} - -func (x TxStepOutput_State) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TxStepOutput_State) Descriptor() protoreflect.EnumDescriptor { - return file_coinbase_staking_v1alpha1_workflow_proto_enumTypes[0].Descriptor() -} - -func (TxStepOutput_State) Type() protoreflect.EnumType { - return &file_coinbase_staking_v1alpha1_workflow_proto_enumTypes[0] -} - -func (x TxStepOutput_State) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TxStepOutput_State.Descriptor instead. -func (TxStepOutput_State) EnumDescriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{0, 0} -} - -// The unit of wait time. -type WaitStepOutput_WaitUnit int32 - -const ( - // Unspecified wait time. - WaitStepOutput_WAIT_UNIT_UNSPECIFIED WaitStepOutput_WaitUnit = 0 - // Wait time measured in seconds. - WaitStepOutput_WAIT_UNIT_SECONDS WaitStepOutput_WaitUnit = 1 - // Wait time measured in blocks. - WaitStepOutput_WAIT_UNIT_BLOCKS WaitStepOutput_WaitUnit = 2 - // Wait time measured in epochs. - WaitStepOutput_WAIT_UNIT_EPOCHS WaitStepOutput_WaitUnit = 3 - // Wait time measured in checkpoints. - WaitStepOutput_WAIT_UNIT_CHECKPOINTS WaitStepOutput_WaitUnit = 4 -) - -// Enum value maps for WaitStepOutput_WaitUnit. -var ( - WaitStepOutput_WaitUnit_name = map[int32]string{ - 0: "WAIT_UNIT_UNSPECIFIED", - 1: "WAIT_UNIT_SECONDS", - 2: "WAIT_UNIT_BLOCKS", - 3: "WAIT_UNIT_EPOCHS", - 4: "WAIT_UNIT_CHECKPOINTS", - } - WaitStepOutput_WaitUnit_value = map[string]int32{ - "WAIT_UNIT_UNSPECIFIED": 0, - "WAIT_UNIT_SECONDS": 1, - "WAIT_UNIT_BLOCKS": 2, - "WAIT_UNIT_EPOCHS": 3, - "WAIT_UNIT_CHECKPOINTS": 4, - } -) - -func (x WaitStepOutput_WaitUnit) Enum() *WaitStepOutput_WaitUnit { - p := new(WaitStepOutput_WaitUnit) - *p = x - return p -} - -func (x WaitStepOutput_WaitUnit) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (WaitStepOutput_WaitUnit) Descriptor() protoreflect.EnumDescriptor { - return file_coinbase_staking_v1alpha1_workflow_proto_enumTypes[1].Descriptor() -} - -func (WaitStepOutput_WaitUnit) Type() protoreflect.EnumType { - return &file_coinbase_staking_v1alpha1_workflow_proto_enumTypes[1] -} - -func (x WaitStepOutput_WaitUnit) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use WaitStepOutput_WaitUnit.Descriptor instead. -func (WaitStepOutput_WaitUnit) EnumDescriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{1, 0} -} - -// WaitStepState defines an enumeration of states for a wait step. -type WaitStepOutput_State int32 - -const ( - // Unspecified wait step state. - WaitStepOutput_STATE_UNSPECIFIED WaitStepOutput_State = 0 - // Wait step has not started. - WaitStepOutput_STATE_NOT_STARTED WaitStepOutput_State = 1 - // Wait step is in-progress. - WaitStepOutput_STATE_IN_PROGRESS WaitStepOutput_State = 2 - // Wait step completed. - WaitStepOutput_STATE_COMPLETED WaitStepOutput_State = 3 -) - -// Enum value maps for WaitStepOutput_State. -var ( - WaitStepOutput_State_name = map[int32]string{ - 0: "STATE_UNSPECIFIED", - 1: "STATE_NOT_STARTED", - 2: "STATE_IN_PROGRESS", - 3: "STATE_COMPLETED", - } - WaitStepOutput_State_value = map[string]int32{ - "STATE_UNSPECIFIED": 0, - "STATE_NOT_STARTED": 1, - "STATE_IN_PROGRESS": 2, - "STATE_COMPLETED": 3, - } -) - -func (x WaitStepOutput_State) Enum() *WaitStepOutput_State { - p := new(WaitStepOutput_State) - *p = x - return p -} - -func (x WaitStepOutput_State) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (WaitStepOutput_State) Descriptor() protoreflect.EnumDescriptor { - return file_coinbase_staking_v1alpha1_workflow_proto_enumTypes[2].Descriptor() -} - -func (WaitStepOutput_State) Type() protoreflect.EnumType { - return &file_coinbase_staking_v1alpha1_workflow_proto_enumTypes[2] -} - -func (x WaitStepOutput_State) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use WaitStepOutput_State.Descriptor instead. -func (WaitStepOutput_State) EnumDescriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{1, 1} -} - -// The state of a workflow -// Example workflow states: -// IN_PROGRESS -> WAITING_FOR_SIGNING -> IN_PROGRESS -> COMPLETED -// .................................................|-> FAILED -// IN_PROGRESS -> WAITING_FOR_SIGNING -> CANCELING -> CANCELED -// ...............................................|-> CANCEL_FAILED -type Workflow_State int32 - -const ( - // Unspecified workflow state, this is for backwards compatibility. - Workflow_STATE_UNSPECIFIED Workflow_State = 0 - // In Progress represents a workflow that is currently in progress. - Workflow_STATE_IN_PROGRESS Workflow_State = 1 - // Waiting for signing represents the workflow is waiting on the consumer to sign and return the corresponding signed tx. - Workflow_STATE_WAITING_FOR_SIGNING Workflow_State = 2 - // Completed represents the workflow has completed. - Workflow_STATE_COMPLETED Workflow_State = 3 - // Failed represents the workflow has failed. - Workflow_STATE_FAILED Workflow_State = 4 - // Canceling represents the workflow is being canceled. - Workflow_STATE_CANCELING Workflow_State = 5 - // Canceled represents the workflow has been canceled. - Workflow_STATE_CANCELED Workflow_State = 6 - // Cancel failed represents the workflow failed to cancel. - Workflow_STATE_CANCEL_FAILED Workflow_State = 7 - // Failed refreshable represents the workflow failed but can be refreshed. - Workflow_STATE_FAILED_REFRESHABLE Workflow_State = 8 - // Waiting for external broadcast represents the workflow is waiting for the customer to broadcast a tx and return its corresponding tx hash. - Workflow_STATE_WAITING_FOR_EXT_BROADCAST Workflow_State = 9 -) - -// Enum value maps for Workflow_State. -var ( - Workflow_State_name = map[int32]string{ - 0: "STATE_UNSPECIFIED", - 1: "STATE_IN_PROGRESS", - 2: "STATE_WAITING_FOR_SIGNING", - 3: "STATE_COMPLETED", - 4: "STATE_FAILED", - 5: "STATE_CANCELING", - 6: "STATE_CANCELED", - 7: "STATE_CANCEL_FAILED", - 8: "STATE_FAILED_REFRESHABLE", - 9: "STATE_WAITING_FOR_EXT_BROADCAST", - } - Workflow_State_value = map[string]int32{ - "STATE_UNSPECIFIED": 0, - "STATE_IN_PROGRESS": 1, - "STATE_WAITING_FOR_SIGNING": 2, - "STATE_COMPLETED": 3, - "STATE_FAILED": 4, - "STATE_CANCELING": 5, - "STATE_CANCELED": 6, - "STATE_CANCEL_FAILED": 7, - "STATE_FAILED_REFRESHABLE": 8, - "STATE_WAITING_FOR_EXT_BROADCAST": 9, - } -) - -func (x Workflow_State) Enum() *Workflow_State { - p := new(Workflow_State) - *p = x - return p -} - -func (x Workflow_State) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Workflow_State) Descriptor() protoreflect.EnumDescriptor { - return file_coinbase_staking_v1alpha1_workflow_proto_enumTypes[3].Descriptor() -} - -func (Workflow_State) Type() protoreflect.EnumType { - return &file_coinbase_staking_v1alpha1_workflow_proto_enumTypes[3] -} - -func (x Workflow_State) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Workflow_State.Descriptor instead. -func (Workflow_State) EnumDescriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{3, 0} -} - -// The details of a transaction being constructed and broadcasted to the network. -type TxStepOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unsigned transaction which was signed in order to be broadcasted. - UnsignedTx string `protobuf:"bytes,1,opt,name=unsigned_tx,json=unsignedTx,proto3" json:"unsigned_tx,omitempty"` - // The signed transaction which was asked to be broadcasted. - SignedTx string `protobuf:"bytes,2,opt,name=signed_tx,json=signedTx,proto3" json:"signed_tx,omitempty"` - // The hash of the broadcasted transaction. - TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - // The state of the transaction step. - State TxStepOutput_State `protobuf:"varint,4,opt,name=state,proto3,enum=coinbase.staking.v1alpha1.TxStepOutput_State" json:"state,omitempty"` - // The error message if the transaction step failed. - ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` -} - -func (x *TxStepOutput) Reset() { - *x = TxStepOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TxStepOutput) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TxStepOutput) ProtoMessage() {} - -func (x *TxStepOutput) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TxStepOutput.ProtoReflect.Descriptor instead. -func (*TxStepOutput) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{0} -} - -func (x *TxStepOutput) GetUnsignedTx() string { - if x != nil { - return x.UnsignedTx - } - return "" -} - -func (x *TxStepOutput) GetSignedTx() string { - if x != nil { - return x.SignedTx - } - return "" -} - -func (x *TxStepOutput) GetTxHash() string { - if x != nil { - return x.TxHash - } - return "" -} - -func (x *TxStepOutput) GetState() TxStepOutput_State { - if x != nil { - return x.State - } - return TxStepOutput_STATE_UNSPECIFIED -} - -func (x *TxStepOutput) GetErrorMessage() string { - if x != nil { - return x.ErrorMessage - } - return "" -} - -// The output details of a step where we wait for some kind of on-chain activity to finish like reaching a certain checkpoint, epoch or block. -type WaitStepOutput struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The beginning of wait period. - Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` - // The current wait progress. - Current int64 `protobuf:"varint,2,opt,name=current,proto3" json:"current,omitempty"` - // The target wait end point. - Target int64 `protobuf:"varint,3,opt,name=target,proto3" json:"target,omitempty"` - // The wait unit (like checkpoint, block, epoch etc). - Unit WaitStepOutput_WaitUnit `protobuf:"varint,4,opt,name=unit,proto3,enum=coinbase.staking.v1alpha1.WaitStepOutput_WaitUnit" json:"unit,omitempty"` - // The state of the wait step. - State WaitStepOutput_State `protobuf:"varint,5,opt,name=state,proto3,enum=coinbase.staking.v1alpha1.WaitStepOutput_State" json:"state,omitempty"` -} - -func (x *WaitStepOutput) Reset() { - *x = WaitStepOutput{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WaitStepOutput) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WaitStepOutput) ProtoMessage() {} - -func (x *WaitStepOutput) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WaitStepOutput.ProtoReflect.Descriptor instead. -func (*WaitStepOutput) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{1} -} - -func (x *WaitStepOutput) GetStart() int64 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *WaitStepOutput) GetCurrent() int64 { - if x != nil { - return x.Current - } - return 0 -} - -func (x *WaitStepOutput) GetTarget() int64 { - if x != nil { - return x.Target - } - return 0 -} - -func (x *WaitStepOutput) GetUnit() WaitStepOutput_WaitUnit { - if x != nil { - return x.Unit - } - return WaitStepOutput_WAIT_UNIT_UNSPECIFIED -} - -func (x *WaitStepOutput) GetState() WaitStepOutput_State { - if x != nil { - return x.State - } - return WaitStepOutput_STATE_UNSPECIFIED -} - -// The information for a step in the workflow. -type WorkflowStep struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The human readable name of the step. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The output of the current step. It can be of tx or wait type. - // - // Types that are assignable to Output: - // - // *WorkflowStep_TxStepOutput - // *WorkflowStep_WaitStepOutput - Output isWorkflowStep_Output `protobuf_oneof:"output"` -} - -func (x *WorkflowStep) Reset() { - *x = WorkflowStep{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WorkflowStep) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowStep) ProtoMessage() {} - -func (x *WorkflowStep) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowStep.ProtoReflect.Descriptor instead. -func (*WorkflowStep) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{2} -} - -func (x *WorkflowStep) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (m *WorkflowStep) GetOutput() isWorkflowStep_Output { - if m != nil { - return m.Output - } - return nil -} - -func (x *WorkflowStep) GetTxStepOutput() *TxStepOutput { - if x, ok := x.GetOutput().(*WorkflowStep_TxStepOutput); ok { - return x.TxStepOutput - } - return nil -} - -func (x *WorkflowStep) GetWaitStepOutput() *WaitStepOutput { - if x, ok := x.GetOutput().(*WorkflowStep_WaitStepOutput); ok { - return x.WaitStepOutput - } - return nil -} - -type isWorkflowStep_Output interface { - isWorkflowStep_Output() -} - -type WorkflowStep_TxStepOutput struct { - // The tx step output (e.g. transaction metadata such as unsigned tx, signed tx etc). - TxStepOutput *TxStepOutput `protobuf:"bytes,2,opt,name=tx_step_output,json=txStepOutput,proto3,oneof"` -} - -type WorkflowStep_WaitStepOutput struct { - // The waiting details for any kind like how many checkpoints away for unbonding etc. - WaitStepOutput *WaitStepOutput `protobuf:"bytes,3,opt,name=wait_step_output,json=waitStepOutput,proto3,oneof"` -} - -func (*WorkflowStep_TxStepOutput) isWorkflowStep_Output() {} - -func (*WorkflowStep_WaitStepOutput) isWorkflowStep_Output() {} - -// A Workflow resource. -type Workflow struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource name of the workflow. - // Format: projects/{projectUUID}/workflows/{workflowUUID} - // Ex: projects/ 123e4567-e89b-12d3-a456-426614174000/workflows/123e4567-e89b-12d3-a456-426614174000 - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The resource name of the action being - // performed. - // Format: protocols/{protocol}/networks/{network}/actions/{action} - Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` - // The parameters of the action to take. - // - // Types that are assignable to StakingParameters: - // - // *Workflow_PolygonStakingParameters - // *Workflow_SolanaStakingParameters - // *Workflow_EthereumKilnStakingParameters - StakingParameters isWorkflow_StakingParameters `protobuf_oneof:"staking_parameters"` - // The current state of the workflow. - State Workflow_State `protobuf:"varint,4,opt,name=state,proto3,enum=coinbase.staking.v1alpha1.Workflow_State" json:"state,omitempty"` - // The index of the current step. - CurrentStepId int32 `protobuf:"varint,5,opt,name=current_step_id,json=currentStepId,proto3" json:"current_step_id,omitempty"` - // The list of steps for this workflow. - Steps []*WorkflowStep `protobuf:"bytes,6,rep,name=steps,proto3" json:"steps,omitempty"` - // The timestamp the workflow was created. - CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` - // The timestamp the workflow was last updated. - UpdateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` - // Flag to skip tx broadcast to network on behalf of the user. Use this flag if you instead prefer to broadcast signed txs on your own. - SkipBroadcast bool `protobuf:"varint,11,opt,name=skip_broadcast,json=skipBroadcast,proto3" json:"skip_broadcast,omitempty"` - // The timestamp the workflow completed. - CompleteTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=complete_time,json=completeTime,proto3" json:"complete_time,omitempty"` -} - -func (x *Workflow) Reset() { - *x = Workflow{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Workflow) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Workflow) ProtoMessage() {} - -func (x *Workflow) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Workflow.ProtoReflect.Descriptor instead. -func (*Workflow) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{3} -} - -func (x *Workflow) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Workflow) GetAction() string { - if x != nil { - return x.Action - } - return "" -} - -func (m *Workflow) GetStakingParameters() isWorkflow_StakingParameters { - if m != nil { - return m.StakingParameters - } - return nil -} - -func (x *Workflow) GetPolygonStakingParameters() *PolygonStakingParameters { - if x, ok := x.GetStakingParameters().(*Workflow_PolygonStakingParameters); ok { - return x.PolygonStakingParameters - } - return nil -} - -func (x *Workflow) GetSolanaStakingParameters() *SolanaStakingParameters { - if x, ok := x.GetStakingParameters().(*Workflow_SolanaStakingParameters); ok { - return x.SolanaStakingParameters - } - return nil -} - -func (x *Workflow) GetEthereumKilnStakingParameters() *EthereumKilnStakingParameters { - if x, ok := x.GetStakingParameters().(*Workflow_EthereumKilnStakingParameters); ok { - return x.EthereumKilnStakingParameters - } - return nil -} - -func (x *Workflow) GetState() Workflow_State { - if x != nil { - return x.State - } - return Workflow_STATE_UNSPECIFIED -} - -func (x *Workflow) GetCurrentStepId() int32 { - if x != nil { - return x.CurrentStepId - } - return 0 -} - -func (x *Workflow) GetSteps() []*WorkflowStep { - if x != nil { - return x.Steps - } - return nil -} - -func (x *Workflow) GetCreateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreateTime - } - return nil -} - -func (x *Workflow) GetUpdateTime() *timestamppb.Timestamp { - if x != nil { - return x.UpdateTime - } - return nil -} - -func (x *Workflow) GetSkipBroadcast() bool { - if x != nil { - return x.SkipBroadcast - } - return false -} - -func (x *Workflow) GetCompleteTime() *timestamppb.Timestamp { - if x != nil { - return x.CompleteTime - } - return nil -} - -type isWorkflow_StakingParameters interface { - isWorkflow_StakingParameters() -} - -type Workflow_PolygonStakingParameters struct { - // Polygon staking parameters. - PolygonStakingParameters *PolygonStakingParameters `protobuf:"bytes,3,opt,name=polygon_staking_parameters,json=polygonStakingParameters,proto3,oneof"` -} - -type Workflow_SolanaStakingParameters struct { - // Solana staking parameters. - SolanaStakingParameters *SolanaStakingParameters `protobuf:"bytes,9,opt,name=solana_staking_parameters,json=solanaStakingParameters,proto3,oneof"` -} - -type Workflow_EthereumKilnStakingParameters struct { - // EthereumKiln staking parameters. - EthereumKilnStakingParameters *EthereumKilnStakingParameters `protobuf:"bytes,10,opt,name=ethereum_kiln_staking_parameters,json=ethereumKilnStakingParameters,proto3,oneof"` -} - -func (*Workflow_PolygonStakingParameters) isWorkflow_StakingParameters() {} - -func (*Workflow_SolanaStakingParameters) isWorkflow_StakingParameters() {} - -func (*Workflow_EthereumKilnStakingParameters) isWorkflow_StakingParameters() {} - -// The request message for CreateWorkflow. -type CreateWorkflowRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource name of the parent that owns - // the workflow. - // Format: projects/{project} - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // The workflow to create. - Workflow *Workflow `protobuf:"bytes,2,opt,name=workflow,proto3" json:"workflow,omitempty"` -} - -func (x *CreateWorkflowRequest) Reset() { - *x = CreateWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateWorkflowRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateWorkflowRequest) ProtoMessage() {} - -func (x *CreateWorkflowRequest) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateWorkflowRequest.ProtoReflect.Descriptor instead. -func (*CreateWorkflowRequest) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{4} -} - -func (x *CreateWorkflowRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *CreateWorkflowRequest) GetWorkflow() *Workflow { - if x != nil { - return x.Workflow - } - return nil -} - -// The message for GetWorkflow. -type GetWorkflowRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource name of the workflow. - // Format: projects/{project}/workflows/{workflow} - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *GetWorkflowRequest) Reset() { - *x = GetWorkflowRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetWorkflowRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetWorkflowRequest) ProtoMessage() {} - -func (x *GetWorkflowRequest) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetWorkflowRequest.ProtoReflect.Descriptor instead. -func (*GetWorkflowRequest) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{5} -} - -func (x *GetWorkflowRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -// The message for ListWorkflows. -type ListWorkflowsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource name of the parent that owns - // the collection of networks. - // Format: projects/{project} - Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` - // [AIP-160](https://google.aip.dev/160) filter - // Supported fields: - // - string delegator_address: "0x..." - // - string validator_address: "0x..." - // - string action: "stake", "unstake" - // - string protocol: "ethereum_kiln" - // - string network: "goerli", "mainnet" - // - string amount: "10000" - // - string currency: "ETH" - Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` - // The maximum number of workflows to return. The service may - // - // return fewer than this value. - // - // If unspecified, 100 workflows will be returned. - // The maximum value is 1000; values over 1000 will be floored to 1000. - PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // A page token as part of the response of a previous call. - // Provide this to retrieve the next page. - // - // When paginating, all other parameters must match the previous - // request to list resources. - PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` -} - -func (x *ListWorkflowsRequest) Reset() { - *x = ListWorkflowsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkflowsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkflowsRequest) ProtoMessage() {} - -func (x *ListWorkflowsRequest) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListWorkflowsRequest.ProtoReflect.Descriptor instead. -func (*ListWorkflowsRequest) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{6} -} - -func (x *ListWorkflowsRequest) GetParent() string { - if x != nil { - return x.Parent - } - return "" -} - -func (x *ListWorkflowsRequest) GetFilter() string { - if x != nil { - return x.Filter - } - return "" -} - -func (x *ListWorkflowsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListWorkflowsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -// The response message for ListWorkflows. -type ListWorkflowsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The list of workflows. - Workflows []*Workflow `protobuf:"bytes,1,rep,name=workflows,proto3" json:"workflows,omitempty"` - // A token which can be provided as `page_token` to retrieve the next page. - // If this field is omitted, there are no additional pages. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` -} - -func (x *ListWorkflowsResponse) Reset() { - *x = ListWorkflowsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListWorkflowsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListWorkflowsResponse) ProtoMessage() {} - -func (x *ListWorkflowsResponse) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListWorkflowsResponse.ProtoReflect.Descriptor instead. -func (*ListWorkflowsResponse) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{7} -} - -func (x *ListWorkflowsResponse) GetWorkflows() []*Workflow { - if x != nil { - return x.Workflows - } - return nil -} - -func (x *ListWorkflowsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// The request message for PerformWorkflowStep. -type PerformWorkflowStepRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource name of the workflow. - // Format: projects/{project}/workflows/{workflow} - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The index of the step to be performed. - Step int32 `protobuf:"varint,2,opt,name=step,proto3" json:"step,omitempty"` - // Transaction metadata. This is either the signed transaction or transaction hash depending on the workflow's broadcast method. - Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *PerformWorkflowStepRequest) Reset() { - *x = PerformWorkflowStepRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PerformWorkflowStepRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PerformWorkflowStepRequest) ProtoMessage() {} - -func (x *PerformWorkflowStepRequest) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PerformWorkflowStepRequest.ProtoReflect.Descriptor instead. -func (*PerformWorkflowStepRequest) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{8} -} - -func (x *PerformWorkflowStepRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *PerformWorkflowStepRequest) GetStep() int32 { - if x != nil { - return x.Step - } - return 0 -} - -func (x *PerformWorkflowStepRequest) GetData() string { - if x != nil { - return x.Data - } - return "" -} - -// The request message for RefreshWorkflowStepRequest. -type RefreshWorkflowStepRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The resource name of the workflow. - // Format: projects/{project}/workflows/{workflow} - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The index of the step to be refreshed. - Step int32 `protobuf:"varint,2,opt,name=step,proto3" json:"step,omitempty"` -} - -func (x *RefreshWorkflowStepRequest) Reset() { - *x = RefreshWorkflowStepRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RefreshWorkflowStepRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RefreshWorkflowStepRequest) ProtoMessage() {} - -func (x *RefreshWorkflowStepRequest) ProtoReflect() protoreflect.Message { - mi := &file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RefreshWorkflowStepRequest.ProtoReflect.Descriptor instead. -func (*RefreshWorkflowStepRequest) Descriptor() ([]byte, []int) { - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP(), []int{9} -} - -func (x *RefreshWorkflowStepRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *RefreshWorkflowStepRequest) GetStep() int32 { - if x != nil { - return x.Step - } - return 0 -} - -var File_coinbase_staking_v1alpha1_workflow_proto protoreflect.FileDescriptor - -var file_coinbase_staking_v1alpha1_workflow_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x63, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x2d, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x69, 0x6c, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, - 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, - 0x70, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x63, - 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, - 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xfc, 0x04, 0x0a, 0x0c, 0x54, 0x78, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x75, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, - 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, - 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x78, 0x12, 0x20, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x03, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x78, 0x12, 0x1c, 0x0a, 0x07, 0x74, - 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x03, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x48, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, - 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x91, 0x03, - 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, - 0x0a, 0x15, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x53, - 0x54, 0x52, 0x55, 0x43, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, - 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, - 0x47, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x53, - 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x45, 0x44, 0x10, 0x04, 0x12, 0x16, 0x0a, - 0x12, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, - 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, - 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x53, - 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x07, - 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, - 0x5a, 0x45, 0x44, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x45, - 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x0b, 0x12, - 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, - 0x44, 0x10, 0x0c, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, - 0x43, 0x45, 0x4c, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x0d, 0x12, 0x1c, 0x0a, 0x18, - 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, - 0x52, 0x45, 0x53, 0x48, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x0e, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x46, 0x52, 0x45, 0x53, 0x48, 0x49, 0x4e, 0x47, 0x10, 0x0f, - 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, - 0x47, 0x5f, 0x45, 0x58, 0x54, 0x5f, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x10, - 0x10, 0x22, 0xe9, 0x03, 0x0a, 0x0e, 0x57, 0x61, 0x69, 0x74, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x12, 0x19, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, - 0x1d, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, - 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, - 0xe0, 0x41, 0x03, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x04, 0x75, - 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x63, 0x6f, 0x69, 0x6e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x55, 0x6e, 0x69, 0x74, 0x42, 0x03, 0xe0, - 0x41, 0x03, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x4a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x22, 0x83, 0x01, 0x0a, 0x08, 0x57, 0x61, 0x69, 0x74, 0x55, 0x6e, 0x69, - 0x74, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, - 0x57, 0x41, 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, - 0x53, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x49, 0x54, - 0x5f, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x53, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x41, 0x49, - 0x54, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x45, 0x50, 0x4f, 0x43, 0x48, 0x53, 0x10, 0x03, 0x12, - 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x55, 0x4e, 0x49, 0x54, 0x5f, 0x43, 0x48, 0x45, - 0x43, 0x4b, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x53, 0x10, 0x04, 0x22, 0x61, 0x0a, 0x05, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, - 0x01, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, - 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, - 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x22, 0x96, 0x02, - 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x65, 0x70, 0x12, 0x17, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x54, 0x0a, 0x0e, 0x74, 0x78, 0x5f, 0x73, 0x74, - 0x65, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x78, 0x53, 0x74, - 0x65, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, - 0x0c, 0x74, 0x78, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x5a, 0x0a, - 0x10, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x53, 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x48, 0x00, 0x52, 0x0e, 0x77, 0x61, 0x69, 0x74, 0x53, - 0x74, 0x65, 0x70, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x3a, 0x31, 0x92, 0x41, 0x2e, 0x0a, 0x2c, - 0x2a, 0x2a, 0x54, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x73, 0x74, 0x65, 0x70, 0x20, 0x69, 0x6e, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x08, 0x0a, 0x06, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0xe4, 0x09, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x66, - 0x6c, 0x6f, 0x77, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x06, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, - 0x02, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x78, 0x0a, 0x1a, 0x70, 0x6f, 0x6c, - 0x79, 0x67, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, - 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x48, 0x00, 0x52, 0x18, 0x70, 0x6f, 0x6c, 0x79, 0x67, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x75, 0x0a, 0x19, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x5f, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x53, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x48, - 0x00, 0x52, 0x17, 0x73, 0x6f, 0x6c, 0x61, 0x6e, 0x61, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x88, 0x01, 0x0a, 0x20, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x6b, 0x69, 0x6c, 0x6e, 0x5f, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x42, - 0x03, 0xe0, 0x41, 0x02, 0x48, 0x00, 0x52, 0x1d, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x4b, 0x69, 0x6c, 0x6e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x44, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, - 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x0f, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x53, 0x74, 0x65, 0x70, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x65, 0x70, - 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x12, 0x40, 0x0a, 0x0b, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, - 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, - 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, - 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x2a, 0x0a, 0x0e, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x62, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, - 0x73, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x73, - 0x6b, 0x69, 0x70, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x0d, - 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, - 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x22, 0x80, 0x02, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, - 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x5f, - 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x4f, 0x52, 0x5f, - 0x53, 0x49, 0x47, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x10, - 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, - 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, - 0x49, 0x4e, 0x47, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, - 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x06, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, - 0x10, 0x07, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, - 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x52, 0x45, 0x53, 0x48, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x08, - 0x12, 0x23, 0x0a, 0x1f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, - 0x47, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x54, 0x5f, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, - 0x41, 0x53, 0x54, 0x10, 0x09, 0x3a, 0x60, 0xea, 0x41, 0x5d, 0x0a, 0x1d, 0x73, 0x74, 0x61, 0x6b, - 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x27, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x77, 0x6f, - 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, - 0x77, 0x7d, 0x2a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x32, 0x08, 0x77, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x14, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x6b, 0x69, - 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x9c, 0x01, - 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x12, - 0x1d, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x44, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, - 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x42, 0x03, 0xe0, - 0x41, 0x02, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x4f, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x0a, 0x1d, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, - 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb8, 0x01, - 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x1f, 0x12, 0x1d, - 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, - 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x70, - 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x82, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, - 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, - 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x67, 0x0a, - 0x1a, 0x50, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, - 0x53, 0x74, 0x65, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x12, 0x17, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x4e, 0x0a, 0x1a, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x65, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, - 0x04, 0x73, 0x74, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x02, - 0x52, 0x04, 0x73, 0x74, 0x65, 0x70, 0x42, 0x50, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69, 0x62, - 0x72, 0x61, 0x72, 0x79, 0x2d, 0x67, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x6f, 0x2f, 0x63, - 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_coinbase_staking_v1alpha1_workflow_proto_rawDescOnce sync.Once - file_coinbase_staking_v1alpha1_workflow_proto_rawDescData = file_coinbase_staking_v1alpha1_workflow_proto_rawDesc -) - -func file_coinbase_staking_v1alpha1_workflow_proto_rawDescGZIP() []byte { - file_coinbase_staking_v1alpha1_workflow_proto_rawDescOnce.Do(func() { - file_coinbase_staking_v1alpha1_workflow_proto_rawDescData = protoimpl.X.CompressGZIP(file_coinbase_staking_v1alpha1_workflow_proto_rawDescData) - }) - return file_coinbase_staking_v1alpha1_workflow_proto_rawDescData -} - -var file_coinbase_staking_v1alpha1_workflow_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_coinbase_staking_v1alpha1_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_coinbase_staking_v1alpha1_workflow_proto_goTypes = []interface{}{ - (TxStepOutput_State)(0), // 0: coinbase.staking.v1alpha1.TxStepOutput.State - (WaitStepOutput_WaitUnit)(0), // 1: coinbase.staking.v1alpha1.WaitStepOutput.WaitUnit - (WaitStepOutput_State)(0), // 2: coinbase.staking.v1alpha1.WaitStepOutput.State - (Workflow_State)(0), // 3: coinbase.staking.v1alpha1.Workflow.State - (*TxStepOutput)(nil), // 4: coinbase.staking.v1alpha1.TxStepOutput - (*WaitStepOutput)(nil), // 5: coinbase.staking.v1alpha1.WaitStepOutput - (*WorkflowStep)(nil), // 6: coinbase.staking.v1alpha1.WorkflowStep - (*Workflow)(nil), // 7: coinbase.staking.v1alpha1.Workflow - (*CreateWorkflowRequest)(nil), // 8: coinbase.staking.v1alpha1.CreateWorkflowRequest - (*GetWorkflowRequest)(nil), // 9: coinbase.staking.v1alpha1.GetWorkflowRequest - (*ListWorkflowsRequest)(nil), // 10: coinbase.staking.v1alpha1.ListWorkflowsRequest - (*ListWorkflowsResponse)(nil), // 11: coinbase.staking.v1alpha1.ListWorkflowsResponse - (*PerformWorkflowStepRequest)(nil), // 12: coinbase.staking.v1alpha1.PerformWorkflowStepRequest - (*RefreshWorkflowStepRequest)(nil), // 13: coinbase.staking.v1alpha1.RefreshWorkflowStepRequest - (*PolygonStakingParameters)(nil), // 14: coinbase.staking.v1alpha1.PolygonStakingParameters - (*SolanaStakingParameters)(nil), // 15: coinbase.staking.v1alpha1.SolanaStakingParameters - (*EthereumKilnStakingParameters)(nil), // 16: coinbase.staking.v1alpha1.EthereumKilnStakingParameters - (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp -} -var file_coinbase_staking_v1alpha1_workflow_proto_depIdxs = []int32{ - 0, // 0: coinbase.staking.v1alpha1.TxStepOutput.state:type_name -> coinbase.staking.v1alpha1.TxStepOutput.State - 1, // 1: coinbase.staking.v1alpha1.WaitStepOutput.unit:type_name -> coinbase.staking.v1alpha1.WaitStepOutput.WaitUnit - 2, // 2: coinbase.staking.v1alpha1.WaitStepOutput.state:type_name -> coinbase.staking.v1alpha1.WaitStepOutput.State - 4, // 3: coinbase.staking.v1alpha1.WorkflowStep.tx_step_output:type_name -> coinbase.staking.v1alpha1.TxStepOutput - 5, // 4: coinbase.staking.v1alpha1.WorkflowStep.wait_step_output:type_name -> coinbase.staking.v1alpha1.WaitStepOutput - 14, // 5: coinbase.staking.v1alpha1.Workflow.polygon_staking_parameters:type_name -> coinbase.staking.v1alpha1.PolygonStakingParameters - 15, // 6: coinbase.staking.v1alpha1.Workflow.solana_staking_parameters:type_name -> coinbase.staking.v1alpha1.SolanaStakingParameters - 16, // 7: coinbase.staking.v1alpha1.Workflow.ethereum_kiln_staking_parameters:type_name -> coinbase.staking.v1alpha1.EthereumKilnStakingParameters - 3, // 8: coinbase.staking.v1alpha1.Workflow.state:type_name -> coinbase.staking.v1alpha1.Workflow.State - 6, // 9: coinbase.staking.v1alpha1.Workflow.steps:type_name -> coinbase.staking.v1alpha1.WorkflowStep - 17, // 10: coinbase.staking.v1alpha1.Workflow.create_time:type_name -> google.protobuf.Timestamp - 17, // 11: coinbase.staking.v1alpha1.Workflow.update_time:type_name -> google.protobuf.Timestamp - 17, // 12: coinbase.staking.v1alpha1.Workflow.complete_time:type_name -> google.protobuf.Timestamp - 7, // 13: coinbase.staking.v1alpha1.CreateWorkflowRequest.workflow:type_name -> coinbase.staking.v1alpha1.Workflow - 7, // 14: coinbase.staking.v1alpha1.ListWorkflowsResponse.workflows:type_name -> coinbase.staking.v1alpha1.Workflow - 15, // [15:15] is the sub-list for method output_type - 15, // [15:15] is the sub-list for method input_type - 15, // [15:15] is the sub-list for extension type_name - 15, // [15:15] is the sub-list for extension extendee - 0, // [0:15] is the sub-list for field type_name -} - -func init() { file_coinbase_staking_v1alpha1_workflow_proto_init() } -func file_coinbase_staking_v1alpha1_workflow_proto_init() { - if File_coinbase_staking_v1alpha1_workflow_proto != nil { - return - } - file_coinbase_staking_v1alpha1_ethereum_kiln_proto_init() - file_coinbase_staking_v1alpha1_polygon_proto_init() - file_coinbase_staking_v1alpha1_solana_proto_init() - if !protoimpl.UnsafeEnabled { - file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TxStepOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WaitStepOutput); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkflowStep); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Workflow); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWorkflowRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkflowsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWorkflowsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PerformWorkflowStepRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RefreshWorkflowStepRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*WorkflowStep_TxStepOutput)(nil), - (*WorkflowStep_WaitStepOutput)(nil), - } - file_coinbase_staking_v1alpha1_workflow_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*Workflow_PolygonStakingParameters)(nil), - (*Workflow_SolanaStakingParameters)(nil), - (*Workflow_EthereumKilnStakingParameters)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_coinbase_staking_v1alpha1_workflow_proto_rawDesc, - NumEnums: 4, - NumMessages: 10, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_coinbase_staking_v1alpha1_workflow_proto_goTypes, - DependencyIndexes: file_coinbase_staking_v1alpha1_workflow_proto_depIdxs, - EnumInfos: file_coinbase_staking_v1alpha1_workflow_proto_enumTypes, - MessageInfos: file_coinbase_staking_v1alpha1_workflow_proto_msgTypes, - }.Build() - File_coinbase_staking_v1alpha1_workflow_proto = out.File - file_coinbase_staking_v1alpha1_workflow_proto_rawDesc = nil - file_coinbase_staking_v1alpha1_workflow_proto_goTypes = nil - file_coinbase_staking_v1alpha1_workflow_proto_depIdxs = nil -} diff --git a/go.mod b/go.mod index 412e59f..03482e3 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/ethereum/go-ethereum v1.12.0 github.com/googleapis/gax-go/v2 v2.11.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 + github.com/stretchr/testify v1.8.1 go.einride.tech/aip v0.60.0 google.golang.org/api v0.126.0 google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc @@ -19,6 +20,7 @@ require ( cloud.google.com/go/compute v1.19.3 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -26,6 +28,7 @@ require ( github.com/google/s2a-go v0.1.4 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.9.0 // indirect golang.org/x/net v0.10.0 // indirect @@ -34,4 +37,5 @@ require ( golang.org/x/text v0.9.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 536e7d0..b6d2769 100644 --- a/go.sum +++ b/go.sum @@ -237,6 +237,7 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/signer/signer.go b/internal/signer/signer.go index ee415c7..27d0e34 100644 --- a/internal/signer/signer.go +++ b/internal/signer/signer.go @@ -23,9 +23,7 @@ type Signer interface { } func New(protocol string) Signer { - if protocol == "polygon" { - return &EthereumWallet{} - } else if protocol == "ethereum_kiln" { + if protocol == "ethereum_kiln" { return &EthereumWallet{} } diff --git a/protos/buf.gen.orchestration.yaml b/protos/buf.gen.orchestration.yaml new file mode 100644 index 0000000..2ed818f --- /dev/null +++ b/protos/buf.gen.orchestration.yaml @@ -0,0 +1,39 @@ +version: v1 +plugins: + - name: go + out: ./gen/go + opt: + - paths=source_relative + # generate gRPC stubs in golang + - name: go-grpc + out: ./gen/go + opt: + - paths=source_relative + # generate reverse proxy from protocol definitions + - name: grpc-gateway + out: ./gen/go + opt: + - paths=source_relative + - name: go-aip + out: ./gen/go + opt: + - paths=source_relative + - name: openapiv2 + out: ./docs/openapi + opt: + - allow_merge=true + - merge_file_name=orchestration + - name: go_gapic + out: ./gen/client + opt: + - transport=grpc+rest + - go-gapic-package=github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/orchestration/v1;v1 + - module=github.com/coinbase/staking-client-library-go/gen/client + - Mcoinbase/staking/orchestration/v1/api.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1;stakingpb + - Mcoinbase/staking/orchestration/v1/action.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1;stakingpb + - Mcoinbase/staking/orchestration/v1/common.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1;stakingpb + - Mcoinbase/staking/orchestration/v1/network.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1;stakingpb + - Mcoinbase/staking/orchestration/v1/protocol.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1;stakingpb + - Mcoinbase/staking/orchestration/v1/staking_target.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1;stakingpb + - Mcoinbase/staking/orchestration/v1/workflow.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1;stakingpb + - Mcoinbase/staking/orchestration/v1/staking_context.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1;stakingpb diff --git a/protos/buf.gen.rewards.yaml b/protos/buf.gen.rewards.yaml new file mode 100644 index 0000000..7ca1f7c --- /dev/null +++ b/protos/buf.gen.rewards.yaml @@ -0,0 +1,41 @@ +version: v1 +plugins: + - name: go + out: ./gen/go + opt: + - paths=source_relative + # NOTE: This generates gRPC boilerplate in golang + - name: go-grpc + out: ./gen/go + opt: + - paths=source_relative + # NOTE: This generates a REST reverse proxy from protobuf definitions + - name: grpc-gateway + out: ./gen/go + opt: + - paths=source_relative + - name: go-aip + out: ./gen/go + opt: + - paths=source_relative + # NOTE: This generates the OpenAPI v2 spec (aka Swagger spec) based on protobuf definitions + - name: openapiv2 + out: ./docs/openapi + opt: + - allow_merge=true + - merge_file_name=rewards + - name: go_gapic + out: ./gen/client + opt: + # Details on these configuration options can be found at: https://github.com/googleapis/gapic-generator-go#invocation + - transport=rest + - release-level=alpha + # The go package of the generated library + - go-gapic-package=github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/rewards/v1;v1 + # Prefix to be stripped from the go-gapic-package used in the generated filenames. + - module=github.com/coinbase/staking-client-library-go/gen/client + - Mcoinbase/staking/rewards/v1/reward_service.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1;rewardpb + - Mcoinbase/staking/rewards/v1/protocol.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1;rewardpb + - Mcoinbase/staking/rewards/v1/reward.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1;rewardpb + - Mcoinbase/staking/rewards/v1/stake.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1;rewardpb + - Mcoinbase/staking/rewards/v1/common.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1;rewardpb diff --git a/protos/buf.gen.yaml b/protos/buf.gen.yaml deleted file mode 100644 index 9323aac..0000000 --- a/protos/buf.gen.yaml +++ /dev/null @@ -1,45 +0,0 @@ -version: v1 -plugins: - - name: go - out: ./gen/go - opt: - - paths=source_relative - # generate gRPC stubs in golang - - name: go-grpc - out: ./gen/go - opt: - - paths=source_relative - # generate reverse proxy from protocol definitions - - name: grpc-gateway - out: ./gen/go - opt: - - paths=source_relative - - name: go-aip - out: ./gen/go - opt: - - paths=source_relative - - name: openapiv2 - out: ./doc/openapi - opt: - - allow_merge=true - - merge_file_name=staking - - name: doc - out: ./doc/doc - opt: - - markdown,v1alpha1.md:store/* - - name: go_gapic - out: ./gen/client/ - opt: - - transport=grpc+rest - - release-level=alpha - - go-gapic-package=github.com/coinbase/staking-client-library-go/gen/client/coinbase/staking/v1alpha1;v1alpha1 - - module=github.com/coinbase/staking-client-library-go/gen/client - - Mcoinbase/staking/v1alpha1/api.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1;stakingpb - - Mcoinbase/staking/v1alpha1/action.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1;stakingpb - - Mcoinbase/staking/v1alpha1/common.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1;stakingpb - - Mcoinbase/staking/v1alpha1/network.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1;stakingpb - - Mcoinbase/staking/v1alpha1/polygon.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1;stakingpb - - Mcoinbase/staking/v1alpha1/protocol.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1;stakingpb - - Mcoinbase/staking/v1alpha1/staking_target.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1;stakingpb - - Mcoinbase/staking/v1alpha1/workflow.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1;stakingpb - - Mcoinbase/staking/v1alpha1/staking_context.proto=github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1;stakingpb diff --git a/protos/buf.lock b/protos/buf.lock index 03ad7be..4ffc27f 100644 --- a/protos/buf.lock +++ b/protos/buf.lock @@ -4,8 +4,8 @@ deps: - remote: buf.build owner: googleapis repository: googleapis - commit: b30c5775bfb3485d9da2e87b26590ac9 - digest: shake256:9d0caaf056949a0e1c883b9849d8a2fa66e22f18a2a48f867d1a8c700aa22abee50ad3ef0d8171637457cadc43c584998bdf3adac55da0f9e4614c72686b057d + commit: 7a6bc1e3207144b38e9066861e1de0ff + digest: shake256:d646836485c34192401253703c4e7ce899c826fceec060bf4b2a62c4749bd9976dc960833e134a1f814725e1ffd60b1bb3cf0335a7e99ef0e8cec34b070ffb66 - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway diff --git a/protos/coinbase/staking/v1alpha1/action.proto b/protos/coinbase/staking/orchestration/v1/action.proto similarity index 79% rename from protos/coinbase/staking/v1alpha1/action.proto rename to protos/coinbase/staking/orchestration/v1/action.proto index 8d7f457..7b4cf37 100644 --- a/protos/coinbase/staking/v1alpha1/action.proto +++ b/protos/coinbase/staking/orchestration/v1/action.proto @@ -1,14 +1,13 @@ syntax = "proto3"; -package coinbase.staking.v1alpha1; +package coinbase.staking.orchestration.v1; -option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1"; +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; -// An Action resource, which represents an action you may take on a network, -// posted to a validator (e.g. stake, unstake). +// An Action resource represents an action you may take on a network (e.g. stake, unstake). message Action { option (google.api.resource) = { type: "staking.coinbase.com/Action" @@ -19,7 +18,7 @@ message Action { // The resource name of the Action. // Format: protocols/{protocolName}/networks/{networkName}/actions/{actionName} - // Ex: protocols/polygon/networks/goerli/validators/stake + // Ex: protocols/ethereum_kiln/networks/holesky/validators/stake string name = 1; } diff --git a/protos/coinbase/staking/v1alpha1/api.proto b/protos/coinbase/staking/orchestration/v1/api.proto similarity index 80% rename from protos/coinbase/staking/v1alpha1/api.proto rename to protos/coinbase/staking/orchestration/v1/api.proto index 32fb882..44b8bc3 100644 --- a/protos/coinbase/staking/v1alpha1/api.proto +++ b/protos/coinbase/staking/orchestration/v1/api.proto @@ -1,19 +1,19 @@ syntax = "proto3"; -package coinbase.staking.v1alpha1; +package coinbase.staking.orchestration.v1; -option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1"; +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1"; import "google/api/annotations.proto"; import "google/api/client.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; -import "coinbase/staking/v1alpha1/protocol.proto"; -import "coinbase/staking/v1alpha1/network.proto"; -import "coinbase/staking/v1alpha1/action.proto"; -import "coinbase/staking/v1alpha1/staking_target.proto"; -import "coinbase/staking/v1alpha1/workflow.proto"; -import "coinbase/staking/v1alpha1/staking_context.proto"; +import "coinbase/staking/orchestration/v1/protocol.proto"; +import "coinbase/staking/orchestration/v1/network.proto"; +import "coinbase/staking/orchestration/v1/action.proto"; +import "coinbase/staking/orchestration/v1/staking_target.proto"; +import "coinbase/staking/orchestration/v1/workflow.proto"; +import "coinbase/staking/orchestration/v1/staking_context.proto"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { host: "api.developer.coinbase.com"; @@ -22,9 +22,9 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { consumes: "application/json"; produces: "application/json"; info: { - title: "Coinbase Non-Custodial Staking API"; - description: "Staking Service is a non-custodial staking service that aims to support multiple protocols and actions on them."; - version: "v1alpha1"; + title: "Orchestration Service"; + description: "Service that can power non-custodial staking experiences for your users."; + version: "v1"; }; responses: { key: "400"; @@ -101,14 +101,18 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { name: "Network"; description: "Networks details"; }, - { - name: "Validator"; - description: "Validators details"; - }, { name: "Action"; description: "Actions details"; }, + { + name: "StakingTarget"; + description: "Staking targets details"; + }, + { + name: "StakingContext"; + description: "Staking context details"; + }, { name: "Workflow"; description: "Workflow management details"; @@ -123,7 +127,7 @@ service StakingService { // List supported protocols. rpc ListProtocols(ListProtocolsRequest) returns (ListProtocolsResponse) { option (google.api.http) = { - get: "/api/v1alpha1/protocols" + get: "/v1/protocols" }; option (google.api.method_signature) = ""; @@ -146,7 +150,7 @@ service StakingService { // List supported staking networks for a given protocol. rpc ListNetworks(ListNetworksRequest) returns (ListNetworksResponse) { option (google.api.http) = { - get: "/api/v1alpha1/{parent=protocols/*}/networks" + get: "/v1/{parent=protocols/*}/networks" }; option (google.api.method_signature) = "parent"; @@ -169,7 +173,7 @@ service StakingService { // List supported staking targets for a given protocol and network. rpc ListStakingTargets(ListStakingTargetsRequest) returns (ListStakingTargetsResponse) { option (google.api.http) = { - get: "/api/v1alpha1/{parent=protocols/*/networks/*}/stakingTargets" + get: "/v1/{parent=protocols/*/networks/*}/stakingTargets" }; option (google.api.method_signature) = "parent"; @@ -192,7 +196,7 @@ service StakingService { // List supported actions for a given protocol and network. rpc ListActions(ListActionsRequest) returns (ListActionsResponse) { option (google.api.http) = { - get: "/api/v1alpha1/{parent=protocols/*/networks/*}/actions" + get: "/v1/{parent=protocols/*/networks/*}/actions" }; option (google.api.method_signature) = "parent"; @@ -217,7 +221,7 @@ service StakingService { option (google.api.method_signature) = "parent,workflow"; option (google.api.http) = { - post: "/api/v1alpha1/{parent=projects/*}/workflows" + post: "/v1/{parent=projects/*}/workflows" body: "workflow" }; @@ -238,7 +242,7 @@ service StakingService { // Get the current state of an active workflow. rpc GetWorkflow(GetWorkflowRequest) returns (Workflow) { option (google.api.http) = { - get: "/api/v1alpha1/{name=projects/*/workflows/*}" + get: "/v1/{name=projects/*/workflows/*}" }; option (google.api.method_signature) = "name"; @@ -260,7 +264,7 @@ service StakingService { // List all workflows in a project. rpc ListWorkflows(ListWorkflowsRequest) returns (ListWorkflowsResponse) { option (google.api.http) = { - get: "/api/v1alpha1/{parent=projects/*}/workflows" + get: "/v1/{parent=projects/*}/workflows" }; option (google.api.method_signature) = "parent"; @@ -282,7 +286,7 @@ service StakingService { // Perform the next step in a workflow. rpc PerformWorkflowStep(PerformWorkflowStepRequest) returns (Workflow) { option (google.api.http) = { - post: "/api/v1alpha1/{name=projects/*/workflows/*}/step" + post: "/v1/{name=projects/*/workflows/*}/step" body: "*" }; @@ -301,33 +305,10 @@ service StakingService { }; - - // Refresh the current step in a workflow. - rpc RefreshWorkflowStep(RefreshWorkflowStepRequest) returns (Workflow) { - option (google.api.http) = { - post: "/api/v1alpha1/{name=projects/*/workflows/*}/refresh" - body: "*" - }; - - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Refresh the current step in a workflow"; - description: "Refresh the current step in a workflow"; - operation_id: "refreshWorkflow"; - tags: "Workflow"; - responses: { - key: "200" - value: { - description: "OK"; - } - } - }; - - }; - // View Staking context information given a specific network address. rpc ViewStakingContext(ViewStakingContextRequest) returns (ViewStakingContextResponse) { option (google.api.http) = { - get: "/api/v1alpha1/viewStakingContext:view" + get: "/v1/viewStakingContext:view" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { diff --git a/protos/coinbase/staking/v1alpha1/common.proto b/protos/coinbase/staking/orchestration/v1/common.proto similarity index 83% rename from protos/coinbase/staking/v1alpha1/common.proto rename to protos/coinbase/staking/orchestration/v1/common.proto index 1fa3ac1..474dffa 100644 --- a/protos/coinbase/staking/v1alpha1/common.proto +++ b/protos/coinbase/staking/orchestration/v1/common.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package coinbase.staking.v1alpha1; +package coinbase.staking.orchestration.v1; -option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1"; +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1"; import "protoc-gen-openapiv2/options/annotations.proto"; diff --git a/protos/coinbase/staking/v1alpha1/ethereum_kiln.proto b/protos/coinbase/staking/orchestration/v1/ethereum_kiln.proto similarity index 83% rename from protos/coinbase/staking/v1alpha1/ethereum_kiln.proto rename to protos/coinbase/staking/orchestration/v1/ethereum_kiln.proto index 5db93c9..bc9cbdd 100644 --- a/protos/coinbase/staking/v1alpha1/ethereum_kiln.proto +++ b/protos/coinbase/staking/orchestration/v1/ethereum_kiln.proto @@ -1,12 +1,12 @@ syntax = "proto3"; -package coinbase.staking.v1alpha1; +package coinbase.staking.orchestration.v1; -import "coinbase/staking/v1alpha1/common.proto"; +import "coinbase/staking/orchestration/v1/common.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; import "google/api/field_behavior.proto"; -option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1"; +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1"; // The parameters required for the stake action on Ethereum Kiln. message EthereumKilnStakeParameters { @@ -40,20 +40,6 @@ message EthereumKilnUnstakeParameters { Amount amount = 3 [(google.api.field_behavior) = REQUIRED]; } -// The parameters required for the claim rewards action on Ethereum Kiln. -message EthereumKilnClaimRewardsParameters { - option deprecated = true; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: {title: "EthereumKiln: Claim Rewards Parameters"} - }; - - // The address you wish to claim rewards for. - string staker_address = 1 [(google.api.field_behavior) = REQUIRED]; - - // The address of the integrator contract. - string integrator_contract_address = 2 [(google.api.field_behavior) = REQUIRED]; -} - // The parameters required for the claim stake action on Ethereum Kiln. message EthereumKilnClaimStakeParameters { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { @@ -73,13 +59,13 @@ message EthereumKilnStakingParameters { json_schema: {title: "EthereumKiln: Staking Parameters"} }; + reserved 3; // reserved for EthereumKilnClaimRewardsParameters filed. + oneof parameters { // The parameters for stake action on Ethereum Kiln. EthereumKilnStakeParameters stake_parameters = 1; // The parameters for unstake action on Ethereum Kiln. EthereumKilnUnstakeParameters unstake_parameters = 2; - // The parameters for claim rewards action on Ethereum Kiln. - EthereumKilnClaimRewardsParameters claim_rewards_parameters = 3; // The parameters for claim stake action on Ethereum Kiln. EthereumKilnClaimStakeParameters claim_stake_parameters = 4; } diff --git a/protos/coinbase/staking/v1alpha1/network.proto b/protos/coinbase/staking/orchestration/v1/network.proto similarity index 74% rename from protos/coinbase/staking/v1alpha1/network.proto rename to protos/coinbase/staking/orchestration/v1/network.proto index 2e1f87b..87f61a3 100644 --- a/protos/coinbase/staking/v1alpha1/network.proto +++ b/protos/coinbase/staking/orchestration/v1/network.proto @@ -1,14 +1,13 @@ syntax = "proto3"; -package coinbase.staking.v1alpha1; +package coinbase.staking.orchestration.v1; -option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1"; +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; -// A Network resource, which represents a blockchain network. -// (e.g. mainnet, testnet, etc.) +// A Network resource represents a blockchain network e.g. mainnet, testnet, etc. message Network { option (google.api.resource) = { type: "staking.coinbase.com/Network" @@ -19,13 +18,10 @@ message Network { // The resource name of the Network. // Format: protocols/{protocolName}/networks/{networkName} - // Ex: protocols/polygon/networks/goerli + // Ex: protocols/ethereum_kiln/networks/holesky string name = 1; - - // Represents if the network is the mainnet network - // for the given protocol. - bool is_mainnet = 2; + reserved 2; // reserved for IsMainnet, represented if the network is the mainnet network for the given protocol. } // The request message for ListNetworks. diff --git a/protos/coinbase/staking/v1alpha1/protocol.proto b/protos/coinbase/staking/orchestration/v1/protocol.proto similarity index 77% rename from protos/coinbase/staking/v1alpha1/protocol.proto rename to protos/coinbase/staking/orchestration/v1/protocol.proto index b41e01e..06510f9 100644 --- a/protos/coinbase/staking/v1alpha1/protocol.proto +++ b/protos/coinbase/staking/orchestration/v1/protocol.proto @@ -1,12 +1,12 @@ syntax = "proto3"; -package coinbase.staking.v1alpha1; +package coinbase.staking.orchestration.v1; -option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1"; +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1"; import "google/api/resource.proto"; -// A Protocol resource (e.g. polygon, ethereum, etc.). +// A Protocol resource (e.g. ethereum_kiln, solana etc.). message Protocol { option (google.api.resource) = { type: "staking.coinbase.com/Protocol" @@ -17,7 +17,7 @@ message Protocol { // The resource name of the Protocol. // Format: protocols/{protocolName} - // Ex: protocols/polygon + // Ex: protocols/ethereum_kiln string name = 1; } diff --git a/protos/coinbase/staking/orchestration/v1/solana.proto b/protos/coinbase/staking/orchestration/v1/solana.proto new file mode 100644 index 0000000..abc9b72 --- /dev/null +++ b/protos/coinbase/staking/orchestration/v1/solana.proto @@ -0,0 +1,168 @@ +syntax = "proto3"; + +package coinbase.staking.orchestration.v1; + +import "coinbase/staking/orchestration/v1/common.proto"; +import "google/api/field_behavior.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; + +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1"; + +// A prioritization fee that can be added to a Solana transaction. +message PriorityFee { + // The maximum number of compute units a transaction is allowed to consume. + int64 compute_unit_limit = 1; + + // The price to pay per compute unit. + int64 unit_price = 2; +} + +// The parameters required to perform a stake operation on Solana. +message SolanaStakeParameters { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: {title: "Solana: Stake Parameters"} + }; + + // The address where the funds are coming from to stake. + string wallet_address = 1; + + // The address of the validator. + string validator_address = 2; + + // The amount of Solana to stake in lamports. (1 lamport = 0.000000001 SOL) + Amount amount = 3; + + // The option to set a priority fee for the transaction. + PriorityFee priority_fee = 4; +} + +// The parameters required to perform a unstake operation on Solana. +message SolanaUnstakeParameters { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: {title: "Solana: Unstake Parameters"} + }; + + // The address which is the signing authority to unstake. + string wallet_address = 1; + + // The address of the stake account to unstake from. + string stake_account_address = 2; + + // The amount of Solana to unstake in lamports. (1 lamport = 0.000000001 SOL) + Amount amount = 3; + + // The option to set a priority fee for the transaction. + PriorityFee priority_fee = 4; +} + +// The parameters required to perform a claim stake operation on Solana. +message SolanaClaimStakeParameters { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: {title: "Solana: Claim Stake Parameters"} + }; + + // The address which is the signing authority to claim stake. + string wallet_address = 1; + + // The address of the stake account to claim stake from. + string stake_account_address = 2; + + // The option to set a priority fee for the transaction. + PriorityFee priority_fee = 3; +} + +// The protocol specific parameters required for fetching a staking context. +message SolanaStakingContextParameters { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: {title: "Solana: Staking Context Parameters"} + }; +} + +// The protocol specific details for a Solana staking context. +message SolanaStakingContextDetails { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: {title: "Solana: Staking Context Details"} + }; + + // The total balance of the main wallet address (system account). + // Used to check the balance for any future staking or transaction to send. + Amount balance = 1; + + // The current epoch that the Solana blockchain is in. + // Used as a frame of reference for future stake activations and deactivations. + int64 current_epoch = 2; + + // How much of the epoch has passed as a percentage. + // Used to inform how much time is left before a stake is activated or deactivated. + string epoch_completion_percentage = 3; + + // The list of staking accounts that are linked to the main wallet address (system account). + // Used to check for statuses and balances of all stake accounts related to the main wallet address that + // they're linked to. + repeated StakeAccount stake_accounts = 4; +} + +// The balance information for a stake account. +message StakeAccount { + // The address of the stake account. + // Used to hold the staked funds transferred over from the main wallet. + string address = 1; + + // The bonded balance in lamports on the stake account (rent is not included in bonded amount). + // Used to check the amount that is currently staked. + Amount bonded_stake = 2; + + // The rent amount for the stake account in lamports. + // Used to highlight the amount used as the rent to maintain the address on the Solana blockchain. + Amount rent_reserve = 3; + + // The total balance on the address in lamports. + // Used to check the total balance for the stake account. + Amount balance = 4; + + // Represents the different states a stake account balance can have. + // Used to check to see if stake is actively earning rewards or ready to be withdrawn. + enum BalanceState { + // The balance is not known. + BALANCE_STATE_UNSPECIFIED = 0; + + // The balance is not actively staking. + BALANCE_STATE_INACTIVE = 1; + + // The balance is in a warm up period and will activate in the next epoch. + BALANCE_STATE_ACTIVATING = 2; + + // The balance is actively staking and earning rewards. + BALANCE_STATE_ACTIVE = 3; + + // The balance is in a cool down period and will be deactivated in the next epoch. + BALANCE_STATE_DEACTIVATING = 4; + } + + // The balance state of the stake account. + // Used to show what state the currently staked funds are in. + BalanceState balance_state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The validator (vote account) that the stake account is assigned to stake to. + // Used to show where the staked funds are staked to. + string validator = 6; +} + +// The parameters needed for staking on Solana. +message SolanaStakingParameters { + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { + json_schema: {title: "Solana: Staking Parameters"} + }; + + reserved 1 to 6; + reserved "create_stake_parameters", "delegate_stake_parameters", "deactivate_stake_parameters", "withdraw_stake_parameters", "split_stake_parameters", "merge_stake_parameters"; + + oneof parameters { + // The parameters for stake action on Solana. + SolanaStakeParameters stake_parameters = 7; + // The parameters for unstake action on Solana. + SolanaUnstakeParameters unstake_parameters = 8; + // The parameters for claim stake action on Solana. + SolanaClaimStakeParameters claim_stake_parameters = 9; + } +} diff --git a/protos/coinbase/staking/v1alpha1/staking_context.proto b/protos/coinbase/staking/orchestration/v1/staking_context.proto similarity index 70% rename from protos/coinbase/staking/v1alpha1/staking_context.proto rename to protos/coinbase/staking/orchestration/v1/staking_context.proto index 66be326..e1fcf10 100644 --- a/protos/coinbase/staking/v1alpha1/staking_context.proto +++ b/protos/coinbase/staking/orchestration/v1/staking_context.proto @@ -1,11 +1,12 @@ syntax = "proto3"; -package coinbase.staking.v1alpha1; +package coinbase.staking.orchestration.v1; -option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1"; +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1"; import "google/api/field_behavior.proto"; -import "coinbase/staking/v1alpha1/ethereum_kiln.proto"; +import "coinbase/staking/orchestration/v1/ethereum_kiln.proto"; +import "coinbase/staking/orchestration/v1/solana.proto"; // The request message for the ViewStakingContext request. message ViewStakingContextRequest { @@ -20,6 +21,10 @@ message ViewStakingContextRequest { // EthereumKiln staking context parameters. EthereumKilnStakingContextParameters ethereum_kiln_staking_context_parameters = 3 [(google.api.field_behavior) = REQUIRED]; + + // Solana staking context parameters. + SolanaStakingContextParameters solana_staking_context_parameters = 4 [(google.api.field_behavior) = REQUIRED]; + } } @@ -33,5 +38,8 @@ message ViewStakingContextResponse { // EthereumKiln staking context details. EthereumKilnStakingContextDetails ethereum_kiln_staking_context_details = 2 [(google.api.field_behavior) = REQUIRED]; + + // Solana staking context details. + SolanaStakingContextDetails solana_staking_context_details = 3 [(google.api.field_behavior) = REQUIRED]; } } diff --git a/protos/coinbase/staking/v1alpha1/staking_target.proto b/protos/coinbase/staking/orchestration/v1/staking_target.proto similarity index 90% rename from protos/coinbase/staking/v1alpha1/staking_target.proto rename to protos/coinbase/staking/orchestration/v1/staking_target.proto index 8e46b60..a85bd04 100644 --- a/protos/coinbase/staking/v1alpha1/staking_target.proto +++ b/protos/coinbase/staking/orchestration/v1/staking_target.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package coinbase.staking.v1alpha1; +package coinbase.staking.orchestration.v1; -option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1"; +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; @@ -18,7 +18,7 @@ message Validator { // The resource name of the Validator. // Format: protocols/{protocolName}/networks/{networkName}/stakingTargets/{validatorName} - // Ex: protocols/polygon/networks/goerli/stakingTargets/0x857679d69fE50E7B722f94aCd2629d80C355163d + // Ex: protocols/solana/networks/testnet/stakingTargets/GkqYQysEGmuL6V2AJoNnWZUz2ZBGWhzQXsJiXm2CLKAN string name = 1; // The public address of the validator. @@ -41,7 +41,7 @@ message Contract { // The resource name of the Contract Address. // Format: protocols/{protocolName}/networks/{networkName}/stakingTargets/{contractName} - // Ex: protocols/polygon/networks/goerli/stakingTargets/0x857679d69fE50E7B722f94aCd2629d80C355163d + // Ex: protocols/ethereum_kiln/networks/holesky/stakingTargets/0xA55416de5DE61A0AC1aa8970a280E04388B1dE4b string name = 1; // The contract address you may submit actions to. diff --git a/protos/coinbase/staking/v1alpha1/workflow.proto b/protos/coinbase/staking/orchestration/v1/workflow.proto similarity index 83% rename from protos/coinbase/staking/v1alpha1/workflow.proto rename to protos/coinbase/staking/orchestration/v1/workflow.proto index 998353f..41b1308 100644 --- a/protos/coinbase/staking/v1alpha1/workflow.proto +++ b/protos/coinbase/staking/orchestration/v1/workflow.proto @@ -1,16 +1,15 @@ syntax = "proto3"; -package coinbase.staking.v1alpha1; +package coinbase.staking.orchestration.v1; -import "coinbase/staking/v1alpha1/ethereum_kiln.proto"; -import "coinbase/staking/v1alpha1/polygon.proto"; -import "coinbase/staking/v1alpha1/solana.proto"; +import "coinbase/staking/orchestration/v1/ethereum_kiln.proto"; +import "coinbase/staking/orchestration/v1/solana.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; -option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1"; +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/orchestration/v1"; // The details of a transaction being constructed and broadcasted to the network. message TxStepOutput { @@ -25,6 +24,9 @@ message TxStepOutput { // State defines an enumeration of states for a staking transaction. enum State { + reserved 11 to 15; + reserved "STATE_CANCELING", "STATE_CANCELED", "STATE_CANCEL_FAILED", "STATE_FAILED_REFRESHABLE", "STATE_REFRESHING"; + // Unspecified transaction state, this is for backwards compatibility. STATE_UNSPECIFIED = 0; // Tx has not yet been constructed in the backend. @@ -47,16 +49,6 @@ message TxStepOutput { STATE_FAILED = 9; // Tx has been successfully executed. STATE_SUCCESS = 10; - // Tx is being canceled. - STATE_CANCELING = 11; - // Tx has been canceled. - STATE_CANCELED = 12; - // Tx cancellation failed. - STATE_CANCEL_FAILED = 13; - // Tx failed but can be refreshed. - STATE_FAILED_REFRESHABLE = 14; - // Tx is being refreshed. - STATE_REFRESHING = 15; // Tx is waiting to be externally broadcasted by the customer. STATE_PENDING_EXT_BROADCAST = 16; } @@ -150,10 +142,10 @@ message Workflow { // Format: protocols/{protocol}/networks/{network}/actions/{action} string action = 2 [(google.api.field_behavior) = REQUIRED]; + reserved 3; + // The parameters of the action to take. oneof staking_parameters { - // Polygon staking parameters. - PolygonStakingParameters polygon_staking_parameters = 3 [(google.api.field_behavior) = REQUIRED]; // Solana staking parameters. SolanaStakingParameters solana_staking_parameters = 9 [(google.api.field_behavior) = REQUIRED]; // EthereumKiln staking parameters. @@ -161,12 +153,17 @@ message Workflow { } // The state of a workflow - // Example workflow states: - // IN_PROGRESS -> WAITING_FOR_SIGNING -> IN_PROGRESS -> COMPLETED - // .................................................|-> FAILED - // IN_PROGRESS -> WAITING_FOR_SIGNING -> CANCELING -> CANCELED - // ...............................................|-> CANCEL_FAILED enum State { + // Example flow: A workflow with skip_broadcast = true leading to a successful completion. + // IN_PROGRESS -> WAITING_FOR_EXT_BROADCAST -> IN_PROGRESS -> COMPLETED + // Example flow: A workflow with skip_broadcast = false leading to a successful completion. + // IN_PROGRESS -> WAITING_FOR_SIGNING -> IN_PROGRESS -> COMPLETED + // Example flow: A workflow with skip_broadcast = false leading to a failure. + // IN_PROGRESS -> WAITING_FOR_SIGNING -> IN_PROGRESS -> FAILED + + reserved 5 to 8; + reserved "STATE_CANCELING", "STATE_CANCELED", "STATE_CANCEL_FAILED", "STATE_FAILED_REFRESHABLE"; + // Unspecified workflow state, this is for backwards compatibility. STATE_UNSPECIFIED = 0; // In Progress represents a workflow that is currently in progress. @@ -177,14 +174,6 @@ message Workflow { STATE_COMPLETED = 3; // Failed represents the workflow has failed. STATE_FAILED = 4; - // Canceling represents the workflow is being canceled. - STATE_CANCELING = 5; - // Canceled represents the workflow has been canceled. - STATE_CANCELED = 6; - // Cancel failed represents the workflow failed to cancel. - STATE_CANCEL_FAILED = 7; - // Failed refreshable represents the workflow failed but can be refreshed. - STATE_FAILED_REFRESHABLE = 8; // Waiting for external broadcast represents the workflow is waiting for the customer to broadcast a tx and return its corresponding tx hash. STATE_WAITING_FOR_EXT_BROADCAST = 9; } @@ -247,13 +236,9 @@ message ListWorkflowsRequest { // [AIP-160](https://google.aip.dev/160) filter // Supported fields: - // - string delegator_address: "0x..." - // - string validator_address: "0x..." // - string action: "stake", "unstake" // - string protocol: "ethereum_kiln" - // - string network: "goerli", "mainnet" - // - string amount: "10000" - // - string currency: "ETH" + // - string network: "holesky", "mainnet" string filter = 2 [(google.api.field_behavior) = OPTIONAL]; // The maximum number of workflows to return. The service may @@ -293,13 +278,3 @@ message PerformWorkflowStepRequest { // Transaction metadata. This is either the signed transaction or transaction hash depending on the workflow's broadcast method. string data = 3 [(google.api.field_behavior) = REQUIRED]; } - -// The request message for RefreshWorkflowStepRequest. -message RefreshWorkflowStepRequest { - // The resource name of the workflow. - // Format: projects/{project}/workflows/{workflow} - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // The index of the step to be refreshed. - int32 step = 2 [(google.api.field_behavior) = REQUIRED]; -} diff --git a/protos/coinbase/staking/rewards/v1/common.proto b/protos/coinbase/staking/rewards/v1/common.proto new file mode 100644 index 0000000..aaf77d8 --- /dev/null +++ b/protos/coinbase/staking/rewards/v1/common.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package coinbase.staking.rewards.v1; + +import "google/api/field_behavior.proto"; + +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1"; + +// Amount encapsulation for a given asset. +message AssetAmount { + // The amount of the asset in the most common denomination. + // Ex: ETH (converted from gwei) + // Ex: USD (converted from fractional pennies) + string amount = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The number of decimals needed to convert from the raw numeric value to the most + // common denomination. + string exp = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The ticker of this asset (ex: USD, ETH, SOL). + string ticker = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The raw, unadulterated numeric value. + // Ex: Wei (in Ethereum) and Lamports (in Solana). + string raw_numeric = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/protos/coinbase/staking/rewards/v1/protocol.proto b/protos/coinbase/staking/rewards/v1/protocol.proto new file mode 100644 index 0000000..df80145 --- /dev/null +++ b/protos/coinbase/staking/rewards/v1/protocol.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; + +package coinbase.staking.rewards.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1"; + +// A resource for a protocol. +message Protocol { + option (google.api.resource) = { + type: "coinbase.staking.rewards/Protocol" + pattern: "protocols/{protocol}" + singular: "protocol" + plural: "protocols" + }; + + // Name of the protocol (eg. ethereum, solana, cosmos, etc.). + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/protos/coinbase/staking/rewards/v1/reward.proto b/protos/coinbase/staking/rewards/v1/reward.proto new file mode 100644 index 0000000..aa1b2d6 --- /dev/null +++ b/protos/coinbase/staking/rewards/v1/reward.proto @@ -0,0 +1,164 @@ +syntax = "proto3"; + +package coinbase.staking.rewards.v1; + +import "coinbase/staking/rewards/v1/common.proto"; +import "coinbase/staking/rewards/v1/stake.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1"; + +// Rewards earned within a particular period of time. +// (-- api-linter: core::0123::resource-name-field=disabled +// aip.dev/not-precedent: Not including a 'name' field till our data sources support a unique identifier --) +message Reward { + option (google.api.resource) = { + type: "coinbase.staking.rewards/Reward" + pattern: "protocols/{protocol}/rewards/{reward}" + singular: "reward" + plural: "rewards" + }; + + // The address that earned this reward. + string address = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + reserved 3; + reserved "period"; + + // The period identifier of this reward aggregation. ex: epoch number, date. + oneof period_identifier { + // A unique identifier for the consensus-cycle of the blockchain. + int64 epoch = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + // The date of the reward in format 'YYYY-MM-DD' in UTC. + // (-- api-linter: core::0142::time-field-type=disabled False positive. This isn't a timestamp, but a YYYY-MM-DD field --) + string date = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The unit of time that the reward events were rolled up by. + // Can be either "epoch" or "daily". + AggregationUnit aggregation_unit = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The starting time of this reward period. Returned when querying by epoch. + // Timestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2024-11-13T19:38:36Z). + // Field currently unavailable. Coming soon. + google.protobuf.Timestamp period_start_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The ending time of this reward period. Returned when querying by epoch. + // Timestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2024-11-13T19:38:36Z). + google.protobuf.Timestamp period_end_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The amount earned in this time period in the native unit of the protocol. + AssetAmount total_earned_native_unit = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The amount earned in this time period in USD. Calculated by getting each individual reward of this + // time period and summing the USD value of each individual component. USD value is calculate at + // the time each component was earned. + repeated USDValue total_earned_usd = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A snapshot of the staking balance the end of this period. + // Field currently unavailable. Coming soon. + Stake ending_balance = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The protocol on which this reward was earned. + string protocol = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Information regarding the USD value of a reward, with necessary context and metadata. +message USDValue { + // The source of the USD price conversion. Could be internal to Coinbase, and external source, or any other source. + Source source = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The source of the USD price conversion. + enum Source { + // The USD value source is unknown or unspecified. + SOURCE_UNSPECIFIED = 0; + // The USD value source is the Coinbase exchange. + COINBASE_EXCHANGE = 1; + } + + // The timestamp at which the USD value was sourced to convert the value into USD. + // This value is as close to the time the reward was earned as possible. + // Timestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2024-11-13T19:38:36Z). + google.protobuf.Timestamp conversion_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The USD value of the reward at the conversion time. + AssetAmount amount = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The price of the native unit at the conversion time. + string conversion_price = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for ListRewards. +message ListRewardsRequest { + // The protocol that the rewards were earned on. + // The response will only include rewards for the protocol specified here. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "coinbase.staking.rewards/Protocol" + ]; + + // The maximum number of items to return. Maximum size of this value is 500. + // If user supplies a value > 500, the API will truncate to 500. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // A page token as part of the response of a previous call. + // Provide this to retrieve the next page. + // + // When paginating, all other parameters must match the previous + // request to list resources correctly. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // [AIP-160](https://google.aip.dev/160) format compliant filter. Supported protocols are 'ethereum', 'solana', and 'cosmos'. + // Supplying other protocols will return an error. + // * **Ethereum**: + // - Fields: + // - `address` - A ethereum validator public key. + // - `date` - A date in format 'YYYY-MM-DD'. Supports multiple comparisons (ex: '2024-01-15). + // - `period_end_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z'). + // - Example(s): + // - `"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474' AND date >= '2024-01-01' AND date < '2024-01-15'"` + // - `"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474' AND period_end_time >= '2024-01-01T00:00:00Z' AND period_end_time < '2024-01-15T00:00:00Z'"` + // - `"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474' AND date = '2024-01-01'"` + // + // * **Solana**: + // - Fields: + // - `address` - A solana validator or delegator address. + // - `epoch` - A solana epoch. Supports epoch comparisons (ex: `epoch >= 1000 AND epoch <= 2000`). + // - `period_end_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z'). + // - Example(s): + // - `"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar' AND epoch >= 540 AND epoch < 550"` + // - `"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar' AND period_end_time >= '2024-01-01T00:00:00Z' AND period_end_time < '2024-01-15T00:00:00Z'"` + // - `"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar' AND epoch = 550"` + // + // * **Cosmos**: + // - Fields: + // - `address` - A cosmos validator or delegator address (ex: `cosmosvaloper1c4k24jzduc365kywrsvf5ujz4ya6mwympnc4en` and `cosmos1c4k24jzduc365kywrsvf5ujz4ya6mwymy8vq4q`) + // - `date` - A date in format 'YYYY-MM-DD'. Supports multiple comparisons (ex: '2024-01-15). + // - `period_end_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z'). + // - Example(s): + // - `"address='cosmos1mfduj0qax6ut8rd6cfc4j0ds06z0mwlhrljhqh' AND date = '2024-11-16'"` + // - `"address='cosmos1mfduj0qax6ut8rd6cfc4j0ds06z0mwlhrljhqh' AND period_end_time >= '2024-01-01T00:00:00Z' AND period_end_time < '2024-01-15T00:00:00Z'"` + // - `"address='cosmos1mfduj0qax6ut8rd6cfc4j0ds06z0mwlhrljhqh' AND date = '2024-01-01'"` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for ListRewards. +message ListRewardsResponse { + // The rewards returned in this response. + repeated Reward rewards = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The page token the user must use in the next request if the next page is desired. + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The unit of time that the reward events were aggregated by. +enum AggregationUnit { + // Aggregation unit is unknown or unspecified. + AGGREGATION_UNIT_UNSPECIFIED = 0; + // Indicates the rewards are aggregated by epoch. This means there will be a 'epoch' field displaying the epoch on this resource. + EPOCH = 1; + // Indicates the rewards are aggregated by day. This means there will be a 'date' field displaying the date on this resource. + DAY = 2; +} diff --git a/protos/coinbase/staking/rewards/v1/reward_service.proto b/protos/coinbase/staking/rewards/v1/reward_service.proto new file mode 100644 index 0000000..ad6e3fa --- /dev/null +++ b/protos/coinbase/staking/rewards/v1/reward_service.proto @@ -0,0 +1,110 @@ +syntax = "proto3"; + +package coinbase.staking.rewards.v1; + +import "coinbase/staking/rewards/v1/reward.proto"; +import "coinbase/staking/rewards/v1/stake.proto"; +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "protoc-gen-openapiv2/options/annotations.proto"; + +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1"; +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { + host: "api.developer.coinbase.com"; + base_path: "/rewards"; + schemes: HTTPS + consumes: "application/json"; + produces: "application/json"; + info: { + title: "Rewards Service"; + description: "Service that provides access to onchain, staking-related rewards data."; + version: "v1"; + }; + + responses: { + key: "401"; + value: { + description: "Returned if authentication information is invalid"; + schema: {example: '"Unauthorized"'}; + }; + }; + + responses: { + key: "500"; + value: { + description: "Returned when an internal server error happens."; + schema: {example: '{"code":3,"message":"Internal server error.","details":[]}'}; + }; + }; + tags: [ + { + name: "Reward"; + description: "A high-level view of an address's rewards aggregated over some period of time (ex: over an Epoch)."; + }, + { + name: "Stake"; + description: "A snapshot of an address's staking-related balance at a particular point in time. Feature coming soon."; + } + ]; +}; + +// RewardService exposes publicly available onchain staking-related rewards data across all supported protocols. +service RewardService { + option (google.api.default_host) = "api.developer.coinbase.com"; + + // List rewards for a given protocol. + rpc ListRewards(ListRewardsRequest) returns (ListRewardsResponse) { + option (google.api.http) = {get: "/v1/{parent=protocols/*}/rewards"}; + + option (google.api.method_signature) = "parent"; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "List and filter rewards"; + description: "Lists onchain rewards of an address for a specific protocol, with optional filters for time range, aggregation period, and more."; + tags: "Reward"; + responses: { + key: "200" + value: { + description: "OK" + schema: {example: '{"rewards":[{"address":"beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar","epoch":"533","aggregationUnit":"epoch","periodStartTime":null,"periodEndTime":"2023-11-16T00:13:44Z","totalEarnedNativeUnit":{"amount":"224.7098145","exp":"9","ticker":"SOL","rawNumeric":"224709814509"},"totalEarnedUsd":null,"endingBalance":null,"protocol":"solana"},{"address":"beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar","epoch":"532","aggregationUnit":"epoch","periodStartTime":null,"periodEndTime":"2023-11-13T19:38:36Z","totalEarnedNativeUnit":{"amount":"225.0794241","exp":"9","ticker":"SOL","rawNumeric":"225079424094"},"totalEarnedUsd":null,"endingBalance":null,"protocol":"solana"}],"nextPageToken":"VAql-wtdiJWkWII9bJBDnE9oEc-8IlgU0DtKbxSDtBg=:1:1700241277"}'}, + } + } + responses: { + key: "400"; + value: { + description: "The request attempted has invalid parameters"; + schema: {example: '{"code":3,"message":"Filter validation failed. .","details":[]}'}; + }; + }; + }; + } + + // List staking activities for a given protocol. + rpc ListStakes(ListStakesRequest) returns (ListStakesResponse) { + option (google.api.http) = {get: "/v1/{parent=protocols/*}/stakes"}; + + option (google.api.method_signature) = "parent"; + + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "List and filter staking balances"; + description: "Lists staking balance of a protocol, with optional filters for time range and address."; + tags: "Stake"; + responses: { + key: "200" + value: { + description: "OK" + schema: { + json_schema: {ref: "#/definitions/v1ListStakesResponse"} + } + } + } + responses: { + key: "400"; + value: { + description: "The request attempted has invalid parameters"; + schema: {example: '{"code":3,"message":"Filter validation failed. .","details":[]}'}; + }; + }; + }; + } +} diff --git a/protos/coinbase/staking/rewards/v1/stake.proto b/protos/coinbase/staking/rewards/v1/stake.proto new file mode 100644 index 0000000..2dc5fc9 --- /dev/null +++ b/protos/coinbase/staking/rewards/v1/stake.proto @@ -0,0 +1,190 @@ +syntax = "proto3"; + +package coinbase.staking.rewards.v1; + +import "coinbase/staking/rewards/v1/common.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/descriptor.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/rewards/v1"; + +// The representation of a staking activity at a particular point in time. +// (-- api-linter: core::0123::resource-name-field=disabled +// aip.dev/not-precedent: Not including a 'name' field till our data sources support a unique identifier --) +message Stake { + option (google.api.resource) = { + type: "coinbase.staking.rewards/Stake" + pattern: "protocols/{protocol}/stakes/{stake}" + singular: "stake" + plural: "stakes" + }; + + // The unique identifier for this staking balance. This is intended to be added in the future when GetStakes is implemented + // but as of now, we only support ListStakes and therefore don't need a unique identifier. It's been marked as reserved to ensure + // that the spot is available when we do implement GetStakes. This ensures that a field such as "id" is assigned a value + // within the first 15 spots, which takes just one byte to encode instead of two. This is a slight performance optimization. + reserved "id"; + reserved 1; + + // The address of the staking balance. + string address = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The time at which this balance was evaluated. + // Timestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2023-11-13T19:38:36Z). + google.protobuf.Timestamp evaluation_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The total amount of stake that is actively earning rewards to this address. + // Includes any delegated stake and self-stake. + // For delegators, this would be only the amount delegated to a validator in most cases. + // Only includes stake that is *actively contributing to rewards and can't be reduced + // without affecting the rewards dynamics*. + // + // Pending inactive stake is included. + // Pending active stake is not included. + AssetAmount bonded_stake = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The amount of stake that this address receives from other addresses. + // For most delegators, this will be 0. + AssetAmount total_delegation_received = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The list of individual delegations this address has received from other addresses + optional Delegation delegations_received = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The amount that this address stakes to another address. + optional Delegation delegations_given = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A single delegation from one address to another. + message Delegation { + // Address associated to the delegation + string address = 1; + // Amount of delegation received or given + AssetAmount amount = 2; + // Commission rate for delegation + string commission_rate = 3; + } + + // If this staking-related address is active at evaluation_time. Can help inform the user if their staking-related address + // is active or not, such as in the case of DOT where an address can be staking but not in the active set. + // active(8) has been temporarily reserved because it's not something we want to implement for quite some time. + reserved "active"; + reserved 8; + + // An estimated yield of this address. + repeated RewardRate reward_rate_calculations = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The participant type at the time of evaluation (i.e. validator, delegator). + ParticipantType participant_type = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Any pending rewards to this address. We consider pending rewards those rewards which + // haven't been "earned" yet. + // pending_rewards(11) has been reserved until we reach consensus on the definition of pending rewards. + reserved "pending_rewards"; + reserved 11; + + // The protocol on which this staking balance exists. + string protocol = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The amount of stake that is not actively earning rewards to this address. + // This amount includes any native token balance that is under the domain and control of the address in question, + // but is not actively staked. + // + // Pending active stake would be included here. + AssetAmount unbonded_balance = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Reward yield calculation at a given point in time. +message RewardRate { + // The percentage rate of rewards calculation. Will include two digits after the decimal (ex: 3.05). + string percentage = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The time at which this yield calculation was calculated. + // Timestamps are in UTC, conforming to the RFC-3339 spec (e.g. 2023-11-13T19:38:36Z). + google.protobuf.Timestamp calculated_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The method used to calculate this yield. This could include information about which + // rewards we're including in the calculation, how we're estimating the compounding period, etc. + CalculationMethods calculation_method = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Representing the different methods of calculating yield. + enum CalculationMethods { + // Calculation method is unknown or unspecified. + CALCULATION_METHODS_UNSPECIFIED = 0; + // A single Ethereum validator acting in isolation is currently not able to compound earned rewards because + // Ethereum only allows validators to stake 32 ETH precisely. + // This percentage yield is assuming that the rewards never compound, mimicking the behavior of a solo staker. + SOLO_STAKER = 1; + // A pool of Ethereum validators of sufficient size is able to compound rewards almost immediately. + // This percentage yield is assuming rewards compound immediately, mimicking the behavior of a sufficiently large pool. + POOLED_STAKER = 2; + // A Solana delegator's staking rewards are staked (and therefore auto-compound) when rewards are paid out between epochs. + // This percentage yield is assuming the rewards are auto-compounded on that schedule, mimicking a Solana delegator. + EPOCH_AUTO_COMPOUNDING = 3; + // A Solana validator's rewards accumulate in a separate account from the validator's active stake. + // This percentage yield is assuming the rewards are not auto-compounded at any point, mimicking a Solana validator who never staked their rewards. + NO_AUTO_COMPOUNDING = 4; + } +} + +// The request message for ListStakes. +message ListStakesRequest { + // The protocol that the staking balance exists on. + // The response will only include staking balances for the protocol specified here. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference).type = "coinbase.staking.rewards/Protocol" + ]; + + // The maximum number of items to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // A page token as part of the response of a previous call. + // Provide this to retrieve the next page. + // + // When paginating, all other parameters must match the previous + // request to list resources. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // [AIP-160](https://google.aip.dev/160) format compliant filter. Supported protocols are 'ethereum', 'solana'. + // Supplying other protocols will return an error. + // * **Ethereum**: + // - Fields: + // - `address` - A ethereum validator public key. + // - `evaluation_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z'). + // - Example(s): + // - `"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474'"` + // - `"address='0xac53512c39d0081ca4437c285305eb423f474e6153693c12fbba4a3df78bcaa3422b31d800c5bea71c1b017168a60474' AND evaluation_time >= '2024-01-01T00:00:00Z' AND evaluation_time < '2024-01-15T00:00:00Z'"` + // + // * **Solana**: + // - Fields: + // - `address` - A solana staking address. + // - `evaluation_time` - A timestamp in RFC-3339 format. Supports multiple comparisons (ex: '2024-01-01T00:00:00Z' and '2024-01-15T00:00:00Z'). + // - Example(s): + // - `"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar'"` + // - `"address='beefKGBWeSpHzYBHZXwp5So7wdQGX6mu4ZHCsH3uTar' AND evaluation_time >= '2024-01-01T00:00:00Z' AND evaluation_time < '2024-01-15T00:00:00Z'"` + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for ListStakes. +message ListStakesResponse { + // The staking balances returned in this response. + repeated Stake stakes = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The page token the user must use in the next request if the next page is desired. + string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The participant type of a staking-related address. +enum ParticipantType { + // The participant type is unknown. + PARTICIPANT_TYPE_UNSPECIFIED = 0; + + // Used when the onchain participant type is a delegator + // (i.e. someone who delegates the responsibilities of validating blocks to another address in return for a share of the rewards). + DELEGATOR = 1; + + // Used when the onchain participant type is a validator + // (i.e. an address that is directly responsible for performing validation of blocks). + VALIDATOR = 2; +} diff --git a/protos/coinbase/staking/v1alpha1/polygon.proto b/protos/coinbase/staking/v1alpha1/polygon.proto deleted file mode 100644 index c97d274..0000000 --- a/protos/coinbase/staking/v1alpha1/polygon.proto +++ /dev/null @@ -1,101 +0,0 @@ -syntax = "proto3"; - -package coinbase.staking.v1alpha1; - -option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1"; - -import "google/api/field_behavior.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; - -import "coinbase/staking/v1alpha1/common.proto"; - - -// The parameters required for stake action on Polygon. -message PolygonStakeParameters { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: { - title: "The parameters needed to stake on Polygon." - } - }; - - // The public address of the delegator you wish to - // interact with. - string delegator_address = 1 [(google.api.field_behavior) = REQUIRED]; - - // The public address of the validator you wish to - // perform the action to. - string validator_address = 2 [(google.api.field_behavior) = REQUIRED]; - - // The amount of the asset. For native assets or ERC-20 contracts, this is presented in terms of - // atomic units (e.g., Wei for Ether) as a base-10 number. - Amount amount = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The parameters required for unstake action on Polygon. -message PolygonUnstakeParameters { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: { - title: "The parameters needed to unstake on Polygon." - } - }; - - // The public address of the delegator you wish to - // interact with. - string delegator_address = 1 [(google.api.field_behavior) = REQUIRED]; - - // The public address of the validator you wish to - // perform the action to. - string validator_address = 2 [(google.api.field_behavior) = REQUIRED]; - - // The amount of the asset. For native assets or ERC-20 contracts, this is presented in terms of - // atomic units (e.g., Wei for Ether) as a base-10 number. - Amount amount = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The parameters required for unstake action on Polygon. -message PolygonRestakeParameters { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: { - title: "The parameters needed to restake on Polygon." - } - }; - - // The public address of the delegator you wish to - // interact with. - string delegator_address = 1 [(google.api.field_behavior) = REQUIRED]; - - // The public address of the validator you wish to - // perform the action to. - string validator_address = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The parameters required for claim rewards action on Polygon. -message PolygonClaimRewardsParameters { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: { - title: "The parameters needed to claim rewards on Polygon." - } - }; - - // The public address of the delegator you wish to - // interact with. - string delegator_address = 1 [(google.api.field_behavior) = REQUIRED]; - - // The public address of the validator you wish to - // perform the action to. - string validator_address = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// The parameters needed for staking on Polygon. -message PolygonStakingParameters { - oneof parameters { - // The parameters for stake action on Polygon. - PolygonStakeParameters stake_parameters = 1; - // The parameters for unstake action on Polygon. - PolygonUnstakeParameters unstake_parameters = 2; - // The parameters for restake action on Polygon. - PolygonRestakeParameters restake_parameters = 3; - // The parameters for claim rewards action on Polygon. - PolygonClaimRewardsParameters claim_rewards_parameters = 4; - } -} diff --git a/protos/coinbase/staking/v1alpha1/solana.proto b/protos/coinbase/staking/v1alpha1/solana.proto deleted file mode 100644 index 520e5e2..0000000 --- a/protos/coinbase/staking/v1alpha1/solana.proto +++ /dev/null @@ -1,170 +0,0 @@ -syntax = "proto3"; - -package coinbase.staking.v1alpha1; - -import "coinbase/staking/v1alpha1/common.proto"; -import "google/api/field_behavior.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; - -option go_package = "github.com/coinbase/staking-client-library-go/gen/go/coinbase/staking/v1alpha1"; - -// The parameters required to use a durable transaction nonce for Solana transactions. -message NonceOptions { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: {title: "Solana: Nonce Options"} - }; - - // The blockhash stored in the nonce account. - string nonce = 1; - - // The address of the nonce account. - string nonce_account = 2; - - // The address of the nonce authority. If not provided, defaults to the nonce_account_address. Signs the transaction. - string nonce_authority = 3; -} - -// The parameters required for the create stake account action on Solana. -message SolanaCreateStakeAccountParameters { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: {title: "Solana: Create Stake Account Parameters"} - }; - - // The address of the new stake account which will be created. This address must not already exist. Signs the transaction. - string stake_account_address = 1 [(google.api.field_behavior) = REQUIRED]; - - // The address of the account which will fund the stake account. Pays the transaction fee. Signs the transaction. - string from_address = 2 [(google.api.field_behavior) = REQUIRED]; - - // The address of the account which will be granted signing authority over staking operations on the new stake account. If not provided, defaults to the from_address. - string stake_authority = 3 [(google.api.field_behavior) = OPTIONAL]; - - // The address of the account which will be granted signing authority over withdrawing inactive stake from the new stake account. If not provided, defaults to the from_address. - string withdraw_authority = 4 [(google.api.field_behavior) = OPTIONAL]; - - // The amount to fund the stake account with, in Lamports. - Amount amount = 5 [(google.api.field_behavior) = REQUIRED]; - - // The parameters required to use a durable transaction nonce for Solana transactions. - NonceOptions nonce_options = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// The parameters required for the delegate stake action on Solana. -message SolanaDelegateStakeParameters { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: {title: "Solana: Delegate Stake Parameters"} - }; - - // The address of the stake account which will be delegating its stake. - string stake_account_address = 1 [(google.api.field_behavior) = REQUIRED]; - - // The address of the validator's vote account to which the stake will be delegated. - string vote_account_address = 2 [(google.api.field_behavior) = REQUIRED]; - - // The address of the account which has signing authority over staking operations on the stake account. Signs the transaction. - string stake_authority = 3 [(google.api.field_behavior) = REQUIRED]; - - // The parameters required to use a durable transaction nonce for Solana transactions. - NonceOptions nonce_options = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// The parameters required for the deactivate stake action on Solana. -message SolanaDeactivateStakeParameters { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: {title: "Solana: Deactivate Stake Parameters"} - }; - - // The address of the stake account which will have its stake deactivated. Stake must be currently active. - string stake_account_address = 1 [(google.api.field_behavior) = REQUIRED]; - - // The address of the account which has signing authority over staking operations on the stake account. Signs the transaction. - string stake_authority = 2 [(google.api.field_behavior) = REQUIRED]; - - // The parameters required to use a durable transaction nonce for Solana transactions. - NonceOptions nonce_options = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The parameters required for the withdraw stake action on Solana. -message SolanaWithdrawStakeParameters { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: {title: "Solana: Withdraw Stake Parameters"} - }; - - // The address of the stake account from which stake will be withdrawn. Stake must be currently inactive. - string stake_account_address = 1 [(google.api.field_behavior) = REQUIRED]; - - // The address of the recipient account which will receive the withdrawn stake. - string recipient_address = 2 [(google.api.field_behavior) = REQUIRED]; - - // The address of the account which has signing authority over withdrawing inactive stake from the stake account. Signs the transaction. - string withdraw_authority = 3 [(google.api.field_behavior) = REQUIRED]; - - // The amount to withdraw from the stake account, in Lamports. - Amount amount = 4 [(google.api.field_behavior) = REQUIRED]; - - // The parameters required to use a durable transaction nonce for Solana transactions. - NonceOptions nonce_options = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The parameters required for split stake action on Solana. -message SolanaSplitStakeParameters { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: {title: "Solana: Split Stake Parameters"} - }; - - // The address of the stake account will be split and have its stake removed. - string stake_account_address = 1 [(google.api.field_behavior) = REQUIRED]; - - // The address of the new stake account which will be created and have the stake added to it. - string new_stake_account_address = 2 [(google.api.field_behavior) = REQUIRED]; - - // The address of the account which has signing authority over staking operations on the stake account. Signs the transaction. - string stake_authority = 3 [(google.api.field_behavior) = REQUIRED]; - - // The amount of stake to split, in Lamports. - Amount amount = 4 [(google.api.field_behavior) = REQUIRED]; - - // The parameters required to use a durable transaction nonce for Solana transactions. - NonceOptions nonce_options = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The parameters required for merge stake action on Solana. -message SolanaMergeStakeParameters { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: {title: "Solana: Merge Stake Parameters"} - }; - - // The address of the stake account will be merged into and have stake added to it. - string stake_account_address = 1 [(google.api.field_behavior) = REQUIRED]; - - // The address of the source stake account which will have no longer exist after the merge. - string source_stake_account_address = 2 [(google.api.field_behavior) = REQUIRED]; - - // The address of the account which has signing authority over staking operations on the stake account. Signs the transaction. - string stake_authority = 3 [(google.api.field_behavior) = REQUIRED]; - - // The parameters required to use a durable transaction nonce for Solana transactions. - NonceOptions nonce_options = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// The parameters needed for staking on Solana. -message SolanaStakingParameters { - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { - json_schema: {title: "Solana: Staking Parameters"} - }; - - oneof parameters { - // The parameters for create stake account action on Solana. - SolanaCreateStakeAccountParameters create_stake_parameters = 1; - // The parameters for delegate stake action on Solana. - SolanaDelegateStakeParameters delegate_stake_parameters = 2; - // The parameters for deactivate stake action on Solana. - SolanaDeactivateStakeParameters deactivate_stake_parameters = 3; - // The parameters for withdraw stake action on Solana. - SolanaWithdrawStakeParameters withdraw_stake_parameters = 4; - // The parameters for split stake action on Solana. - SolanaSplitStakeParameters split_stake_parameters = 5; - // The parameters for merge stake action on Solana. - SolanaMergeStakeParameters merge_stake_parameters = 6; - } -}