Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterRewardServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterRewardServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RewardServiceClient) error
- func RegisterRewardServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterRewardServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RewardServiceServer) error
- func RegisterRewardServiceServer(s grpc.ServiceRegistrar, srv RewardServiceServer)
- type Address
- type AggregationUnit
- func (AggregationUnit) Descriptor() protoreflect.EnumDescriptor
- func (x AggregationUnit) Enum() *AggregationUnit
- func (AggregationUnit) EnumDescriptor() ([]byte, []int)deprecated
- func (x AggregationUnit) Number() protoreflect.EnumNumber
- func (x AggregationUnit) String() string
- func (AggregationUnit) Type() protoreflect.EnumType
- type AssetAmount
- func (*AssetAmount) Descriptor() ([]byte, []int)deprecated
- func (x *AssetAmount) GetAmount() string
- func (x *AssetAmount) GetExp() int64
- func (x *AssetAmount) GetRawNumeric() string
- func (x *AssetAmount) GetTicker() string
- func (*AssetAmount) ProtoMessage()
- func (x *AssetAmount) ProtoReflect() protoreflect.Message
- func (x *AssetAmount) Reset()
- func (x *AssetAmount) String() string
- type GetPortfolioRequest
- func (*GetPortfolioRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetPortfolioRequest) GetName() string
- func (*GetPortfolioRequest) ProtoMessage()
- func (x *GetPortfolioRequest) ProtoReflect() protoreflect.Message
- func (x *GetPortfolioRequest) Reset()
- func (x *GetPortfolioRequest) String() string
- type ListPortfoliosRequest
- func (*ListPortfoliosRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListPortfoliosRequest) GetPageSize() int32
- func (x *ListPortfoliosRequest) GetPageToken() string
- func (*ListPortfoliosRequest) ProtoMessage()
- func (x *ListPortfoliosRequest) ProtoReflect() protoreflect.Message
- func (x *ListPortfoliosRequest) Reset()
- func (x *ListPortfoliosRequest) String() string
- type ListPortfoliosResponse
- func (*ListPortfoliosResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListPortfoliosResponse) GetNextPageToken() string
- func (x *ListPortfoliosResponse) GetPortfolios() []*Portfolio
- func (*ListPortfoliosResponse) ProtoMessage()
- func (x *ListPortfoliosResponse) ProtoReflect() protoreflect.Message
- func (x *ListPortfoliosResponse) Reset()
- func (x *ListPortfoliosResponse) String() string
- type ListRewardsRequest
- func (*ListRewardsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRewardsRequest) GetFilter() string
- func (x *ListRewardsRequest) GetPageSize() int32
- func (x *ListRewardsRequest) GetPageToken() string
- func (x *ListRewardsRequest) GetParent() string
- func (*ListRewardsRequest) ProtoMessage()
- func (x *ListRewardsRequest) ProtoReflect() protoreflect.Message
- func (x *ListRewardsRequest) Reset()
- func (x *ListRewardsRequest) String() string
- type ListRewardsResponse
- func (*ListRewardsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListRewardsResponse) GetNextPageToken() string
- func (x *ListRewardsResponse) GetRewards() []*Reward
- func (*ListRewardsResponse) ProtoMessage()
- func (x *ListRewardsResponse) ProtoReflect() protoreflect.Message
- func (x *ListRewardsResponse) Reset()
- func (x *ListRewardsResponse) String() string
- type ListStakesRequest
- func (*ListStakesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListStakesRequest) GetFilter() string
- func (x *ListStakesRequest) GetOrderBy() string
- func (x *ListStakesRequest) GetPageSize() int32
- func (x *ListStakesRequest) GetPageToken() string
- func (x *ListStakesRequest) GetParent() string
- func (*ListStakesRequest) ProtoMessage()
- func (x *ListStakesRequest) ProtoReflect() protoreflect.Message
- func (x *ListStakesRequest) Reset()
- func (x *ListStakesRequest) String() string
- type ListStakesResponse
- func (*ListStakesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListStakesResponse) GetNextPageToken() string
- func (x *ListStakesResponse) GetStakes() []*Stake
- func (*ListStakesResponse) ProtoMessage()
- func (x *ListStakesResponse) ProtoReflect() protoreflect.Message
- func (x *ListStakesResponse) Reset()
- func (x *ListStakesResponse) String() string
- type ParticipantType
- func (ParticipantType) Descriptor() protoreflect.EnumDescriptor
- func (x ParticipantType) Enum() *ParticipantType
- func (ParticipantType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ParticipantType) Number() protoreflect.EnumNumber
- func (x ParticipantType) String() string
- func (ParticipantType) Type() protoreflect.EnumType
- type Portfolio
- type PortfolioResourceName
- type Protocol
- type ProtocolResourceName
- func (n ProtocolResourceName) ContainsWildcard() bool
- func (n ProtocolResourceName) MarshalString() (string, error)
- func (n ProtocolResourceName) RewardResourceName(reward string) RewardResourceName
- func (n ProtocolResourceName) StakeResourceName(stake string) StakeResourceName
- func (n ProtocolResourceName) String() string
- func (n *ProtocolResourceName) UnmarshalString(name string) error
- func (n ProtocolResourceName) Validate() error
- type Reward
- func (*Reward) Descriptor() ([]byte, []int)deprecated
- func (x *Reward) GetAddress() string
- func (x *Reward) GetAggregationUnit() AggregationUnit
- func (x *Reward) GetDate() string
- func (x *Reward) GetEndingBalance() *Stake
- func (x *Reward) GetEpoch() int64
- func (x *Reward) GetPeriodEndTime() *timestamppb.Timestamp
- func (m *Reward) GetPeriodIdentifier() isReward_PeriodIdentifier
- func (x *Reward) GetPeriodStartTime() *timestamppb.Timestamp
- func (x *Reward) GetProtocol() string
- func (x *Reward) GetRewardState() Reward_State
- func (x *Reward) GetTotalEarnedNativeUnit() *AssetAmount
- func (x *Reward) GetTotalEarnedUsd() []*USDValue
- func (*Reward) ProtoMessage()
- func (x *Reward) ProtoReflect() protoreflect.Message
- func (x *Reward) Reset()
- func (x *Reward) String() string
- type RewardRate
- func (*RewardRate) Descriptor() ([]byte, []int)deprecated
- func (x *RewardRate) GetCalculatedTime() *timestamppb.Timestamp
- func (x *RewardRate) GetCalculationMethod() RewardRate_CalculationMethods
- func (x *RewardRate) GetPercentage() string
- func (*RewardRate) ProtoMessage()
- func (x *RewardRate) ProtoReflect() protoreflect.Message
- func (x *RewardRate) Reset()
- func (x *RewardRate) String() string
- type RewardRate_CalculationMethods
- func (RewardRate_CalculationMethods) Descriptor() protoreflect.EnumDescriptor
- func (x RewardRate_CalculationMethods) Enum() *RewardRate_CalculationMethods
- func (RewardRate_CalculationMethods) EnumDescriptor() ([]byte, []int)deprecated
- func (x RewardRate_CalculationMethods) Number() protoreflect.EnumNumber
- func (x RewardRate_CalculationMethods) String() string
- func (RewardRate_CalculationMethods) Type() protoreflect.EnumType
- type RewardResourceName
- func (n RewardResourceName) ContainsWildcard() bool
- func (n RewardResourceName) MarshalString() (string, error)
- func (n RewardResourceName) ProtocolResourceName() ProtocolResourceName
- func (n RewardResourceName) String() string
- func (n *RewardResourceName) UnmarshalString(name string) error
- func (n RewardResourceName) Validate() error
- type RewardServiceClient
- type RewardServiceServer
- type Reward_Date
- type Reward_Epoch
- type Reward_State
- func (Reward_State) Descriptor() protoreflect.EnumDescriptor
- func (x Reward_State) Enum() *Reward_State
- func (Reward_State) EnumDescriptor() ([]byte, []int)deprecated
- func (x Reward_State) Number() protoreflect.EnumNumber
- func (x Reward_State) String() string
- func (Reward_State) Type() protoreflect.EnumType
- type Stake
- func (*Stake) Descriptor() ([]byte, []int)deprecated
- func (x *Stake) GetAddress() string
- func (x *Stake) GetBondedStake() *AssetAmount
- func (x *Stake) GetDelegationsGiven() *Stake_Delegation
- func (x *Stake) GetDelegationsReceived() *Stake_Delegation
- func (x *Stake) GetEvaluationTime() *timestamppb.Timestamp
- func (x *Stake) GetParticipantType() ParticipantType
- func (x *Stake) GetProtocol() string
- func (x *Stake) GetRewardRateCalculations() []*RewardRate
- func (x *Stake) GetTotalDelegationReceived() *AssetAmount
- func (x *Stake) GetUnbondedBalance() *AssetAmount
- func (*Stake) ProtoMessage()
- func (x *Stake) ProtoReflect() protoreflect.Message
- func (x *Stake) Reset()
- func (x *Stake) String() string
- type StakeResourceName
- func (n StakeResourceName) ContainsWildcard() bool
- func (n StakeResourceName) MarshalString() (string, error)
- func (n StakeResourceName) ProtocolResourceName() ProtocolResourceName
- func (n StakeResourceName) String() string
- func (n *StakeResourceName) UnmarshalString(name string) error
- func (n StakeResourceName) Validate() error
- type Stake_Delegation
- func (*Stake_Delegation) Descriptor() ([]byte, []int)deprecated
- func (x *Stake_Delegation) GetAddress() string
- func (x *Stake_Delegation) GetAmount() *AssetAmount
- func (x *Stake_Delegation) GetCommissionRate() string
- func (*Stake_Delegation) ProtoMessage()
- func (x *Stake_Delegation) ProtoReflect() protoreflect.Message
- func (x *Stake_Delegation) Reset()
- func (x *Stake_Delegation) String() string
- type USDValue
- func (*USDValue) Descriptor() ([]byte, []int)deprecated
- func (x *USDValue) GetAmount() *AssetAmount
- func (x *USDValue) GetConversionPrice() string
- func (x *USDValue) GetConversionTime() *timestamppb.Timestamp
- func (x *USDValue) GetSource() USDValue_Source
- func (*USDValue) ProtoMessage()
- func (x *USDValue) ProtoReflect() protoreflect.Message
- func (x *USDValue) Reset()
- func (x *USDValue) String() string
- type USDValue_Source
- func (USDValue_Source) Descriptor() protoreflect.EnumDescriptor
- func (x USDValue_Source) Enum() *USDValue_Source
- func (USDValue_Source) EnumDescriptor() ([]byte, []int)deprecated
- func (x USDValue_Source) Number() protoreflect.EnumNumber
- func (x USDValue_Source) String() string
- func (USDValue_Source) Type() protoreflect.EnumType
- type UnimplementedRewardServiceServer
- func (UnimplementedRewardServiceServer) GetPortfolio(context.Context, *GetPortfolioRequest) (*Portfolio, error)
- func (UnimplementedRewardServiceServer) ListPortfolios(context.Context, *ListPortfoliosRequest) (*ListPortfoliosResponse, error)
- func (UnimplementedRewardServiceServer) ListRewards(context.Context, *ListRewardsRequest) (*ListRewardsResponse, error)
- func (UnimplementedRewardServiceServer) ListStakes(context.Context, *ListStakesRequest) (*ListStakesResponse, error)
- type UnsafeRewardServiceServer
Constants ¶
const ( RewardService_ListRewards_FullMethodName = "/coinbase.staking.rewards.v1.RewardService/ListRewards" RewardService_ListStakes_FullMethodName = "/coinbase.staking.rewards.v1.RewardService/ListStakes" RewardService_GetPortfolio_FullMethodName = "/coinbase.staking.rewards.v1.RewardService/GetPortfolio" RewardService_ListPortfolios_FullMethodName = "/coinbase.staking.rewards.v1.RewardService/ListPortfolios" )
Variables ¶
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, } )
Enum value maps for AggregationUnit.
var ( Reward_State_name = map[int32]string{ 0: "STATE_UNSPECIFIED", 1: "PENDING_CLAIMABLE", 2: "MATERIALIZED", } Reward_State_value = map[string]int32{ "STATE_UNSPECIFIED": 0, "PENDING_CLAIMABLE": 1, "MATERIALIZED": 2, } )
Enum value maps for Reward_State.
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, } )
Enum value maps for USDValue_Source.
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, } )
Enum value maps for ParticipantType.
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, } )
Enum value maps for RewardRate_CalculationMethods.
var File_coinbase_staking_rewards_v1_common_proto protoreflect.FileDescriptor
var File_coinbase_staking_rewards_v1_portfolio_proto protoreflect.FileDescriptor
var File_coinbase_staking_rewards_v1_protocol_proto protoreflect.FileDescriptor
var File_coinbase_staking_rewards_v1_reward_proto protoreflect.FileDescriptor
var File_coinbase_staking_rewards_v1_reward_service_proto protoreflect.FileDescriptor
var File_coinbase_staking_rewards_v1_stake_proto protoreflect.FileDescriptor
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, }, { MethodName: "GetPortfolio", Handler: _RewardService_GetPortfolio_Handler, }, { MethodName: "ListPortfolios", Handler: _RewardService_ListPortfolios_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "coinbase/staking/rewards/v1/reward_service.proto", }
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)
Functions ¶
func RegisterRewardServiceHandler ¶
func RegisterRewardServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterRewardServiceHandler registers the http handlers for service RewardService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterRewardServiceHandlerClient ¶
func RegisterRewardServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RewardServiceClient) error
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 RegisterRewardServiceHandlerFromEndpoint ¶
func RegisterRewardServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterRewardServiceHandlerFromEndpoint is same as RegisterRewardServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterRewardServiceHandlerServer ¶
func RegisterRewardServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RewardServiceServer) error
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 RegisterRewardServiceServer ¶
func RegisterRewardServiceServer(s grpc.ServiceRegistrar, srv RewardServiceServer)
Types ¶
type Address ¶ added in v0.6.0
type Address struct { // The onchain address Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
Represents an address on any protocol.
func (*Address) Descriptor
deprecated
added in
v0.6.0
func (*Address) GetAddress ¶ added in v0.6.0
func (*Address) ProtoMessage ¶ added in v0.6.0
func (*Address) ProtoMessage()
func (*Address) ProtoReflect ¶ added in v0.6.0
func (x *Address) ProtoReflect() protoreflect.Message
type AggregationUnit ¶
type AggregationUnit int32
The unit of time that the reward events were aggregated by.
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 )
func (AggregationUnit) Descriptor ¶
func (AggregationUnit) Descriptor() protoreflect.EnumDescriptor
func (AggregationUnit) Enum ¶
func (x AggregationUnit) Enum() *AggregationUnit
func (AggregationUnit) EnumDescriptor
deprecated
func (AggregationUnit) EnumDescriptor() ([]byte, []int)
Deprecated: Use AggregationUnit.Descriptor instead.
func (AggregationUnit) Number ¶
func (x AggregationUnit) Number() protoreflect.EnumNumber
func (AggregationUnit) String ¶
func (x AggregationUnit) String() string
func (AggregationUnit) Type ¶
func (AggregationUnit) Type() protoreflect.EnumType
type AssetAmount ¶
type AssetAmount struct { // 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 int64 `protobuf:"varint,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"` // contains filtered or unexported fields }
Amount encapsulation for a given asset.
func (*AssetAmount) Descriptor
deprecated
func (*AssetAmount) Descriptor() ([]byte, []int)
Deprecated: Use AssetAmount.ProtoReflect.Descriptor instead.
func (*AssetAmount) GetAmount ¶
func (x *AssetAmount) GetAmount() string
func (*AssetAmount) GetExp ¶
func (x *AssetAmount) GetExp() int64
func (*AssetAmount) GetRawNumeric ¶
func (x *AssetAmount) GetRawNumeric() string
func (*AssetAmount) GetTicker ¶
func (x *AssetAmount) GetTicker() string
func (*AssetAmount) ProtoMessage ¶
func (*AssetAmount) ProtoMessage()
func (*AssetAmount) ProtoReflect ¶
func (x *AssetAmount) ProtoReflect() protoreflect.Message
func (*AssetAmount) Reset ¶
func (x *AssetAmount) Reset()
func (*AssetAmount) String ¶
func (x *AssetAmount) String() string
type GetPortfolioRequest ¶ added in v0.6.0
type GetPortfolioRequest struct { // The resource name of the stake to retrieve. // Format: portfolios/{portfolio} Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Get a portfolio based on its resource name.
func (*GetPortfolioRequest) Descriptor
deprecated
added in
v0.6.0
func (*GetPortfolioRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPortfolioRequest.ProtoReflect.Descriptor instead.
func (*GetPortfolioRequest) GetName ¶ added in v0.6.0
func (x *GetPortfolioRequest) GetName() string
func (*GetPortfolioRequest) ProtoMessage ¶ added in v0.6.0
func (*GetPortfolioRequest) ProtoMessage()
func (*GetPortfolioRequest) ProtoReflect ¶ added in v0.6.0
func (x *GetPortfolioRequest) ProtoReflect() protoreflect.Message
func (*GetPortfolioRequest) Reset ¶ added in v0.6.0
func (x *GetPortfolioRequest) Reset()
func (*GetPortfolioRequest) String ¶ added in v0.6.0
func (x *GetPortfolioRequest) String() string
type ListPortfoliosRequest ¶ added in v0.6.0
type ListPortfoliosRequest struct { // 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"` // contains filtered or unexported fields }
The request message for ListPortfolios.
func (*ListPortfoliosRequest) Descriptor
deprecated
added in
v0.6.0
func (*ListPortfoliosRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListPortfoliosRequest.ProtoReflect.Descriptor instead.
func (*ListPortfoliosRequest) GetPageSize ¶ added in v0.6.0
func (x *ListPortfoliosRequest) GetPageSize() int32
func (*ListPortfoliosRequest) GetPageToken ¶ added in v0.6.0
func (x *ListPortfoliosRequest) GetPageToken() string
func (*ListPortfoliosRequest) ProtoMessage ¶ added in v0.6.0
func (*ListPortfoliosRequest) ProtoMessage()
func (*ListPortfoliosRequest) ProtoReflect ¶ added in v0.6.0
func (x *ListPortfoliosRequest) ProtoReflect() protoreflect.Message
func (*ListPortfoliosRequest) Reset ¶ added in v0.6.0
func (x *ListPortfoliosRequest) Reset()
func (*ListPortfoliosRequest) String ¶ added in v0.6.0
func (x *ListPortfoliosRequest) String() string
type ListPortfoliosResponse ¶ added in v0.6.0
type ListPortfoliosResponse struct { // The portfolios returned in this response. Portfolios []*Portfolio `protobuf:"bytes,1,rep,name=portfolios,proto3" json:"portfolios,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"` // contains filtered or unexported fields }
The response message for ListPortfolios.
func (*ListPortfoliosResponse) Descriptor
deprecated
added in
v0.6.0
func (*ListPortfoliosResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListPortfoliosResponse.ProtoReflect.Descriptor instead.
func (*ListPortfoliosResponse) GetNextPageToken ¶ added in v0.6.0
func (x *ListPortfoliosResponse) GetNextPageToken() string
func (*ListPortfoliosResponse) GetPortfolios ¶ added in v0.6.0
func (x *ListPortfoliosResponse) GetPortfolios() []*Portfolio
func (*ListPortfoliosResponse) ProtoMessage ¶ added in v0.6.0
func (*ListPortfoliosResponse) ProtoMessage()
func (*ListPortfoliosResponse) ProtoReflect ¶ added in v0.6.0
func (x *ListPortfoliosResponse) ProtoReflect() protoreflect.Message
func (*ListPortfoliosResponse) Reset ¶ added in v0.6.0
func (x *ListPortfoliosResponse) Reset()
func (*ListPortfoliosResponse) String ¶ added in v0.6.0
func (x *ListPortfoliosResponse) String() string
type ListRewardsRequest ¶
type ListRewardsRequest struct { // 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"` // contains filtered or unexported fields }
The request message for ListRewards.
func (*ListRewardsRequest) Descriptor
deprecated
func (*ListRewardsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRewardsRequest.ProtoReflect.Descriptor instead.
func (*ListRewardsRequest) GetFilter ¶
func (x *ListRewardsRequest) GetFilter() string
func (*ListRewardsRequest) GetPageSize ¶
func (x *ListRewardsRequest) GetPageSize() int32
func (*ListRewardsRequest) GetPageToken ¶
func (x *ListRewardsRequest) GetPageToken() string
func (*ListRewardsRequest) GetParent ¶
func (x *ListRewardsRequest) GetParent() string
func (*ListRewardsRequest) ProtoMessage ¶
func (*ListRewardsRequest) ProtoMessage()
func (*ListRewardsRequest) ProtoReflect ¶
func (x *ListRewardsRequest) ProtoReflect() protoreflect.Message
func (*ListRewardsRequest) Reset ¶
func (x *ListRewardsRequest) Reset()
func (*ListRewardsRequest) String ¶
func (x *ListRewardsRequest) String() string
type ListRewardsResponse ¶
type ListRewardsResponse struct { // 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"` // contains filtered or unexported fields }
The response message for ListRewards.
func (*ListRewardsResponse) Descriptor
deprecated
func (*ListRewardsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListRewardsResponse.ProtoReflect.Descriptor instead.
func (*ListRewardsResponse) GetNextPageToken ¶
func (x *ListRewardsResponse) GetNextPageToken() string
func (*ListRewardsResponse) GetRewards ¶
func (x *ListRewardsResponse) GetRewards() []*Reward
func (*ListRewardsResponse) ProtoMessage ¶
func (*ListRewardsResponse) ProtoMessage()
func (*ListRewardsResponse) ProtoReflect ¶
func (x *ListRewardsResponse) ProtoReflect() protoreflect.Message
func (*ListRewardsResponse) Reset ¶
func (x *ListRewardsResponse) Reset()
func (*ListRewardsResponse) String ¶
func (x *ListRewardsResponse) String() string
type ListStakesRequest ¶
type ListStakesRequest struct { // 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"` // The order in which to sort the results. // [AIP-132](https://google.aip.dev/132) compliant order_by field. // The default behavior, if not supplied, is 'evaluation_time desc'. // Example(s): // * 'evaluation_time desc', which returns Stakes starting with the most recent. // * 'evaluation_time asc', which returns Stakes starting with the oldest available. // * 'evaluation_time', which returns Stakes starting with the oldest available. OrderBy string `protobuf:"bytes,5,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` // contains filtered or unexported fields }
The request message for ListStakes.
func (*ListStakesRequest) Descriptor
deprecated
func (*ListStakesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListStakesRequest.ProtoReflect.Descriptor instead.
func (*ListStakesRequest) GetFilter ¶
func (x *ListStakesRequest) GetFilter() string
func (*ListStakesRequest) GetOrderBy ¶ added in v0.5.0
func (x *ListStakesRequest) GetOrderBy() string
func (*ListStakesRequest) GetPageSize ¶
func (x *ListStakesRequest) GetPageSize() int32
func (*ListStakesRequest) GetPageToken ¶
func (x *ListStakesRequest) GetPageToken() string
func (*ListStakesRequest) GetParent ¶
func (x *ListStakesRequest) GetParent() string
func (*ListStakesRequest) ProtoMessage ¶
func (*ListStakesRequest) ProtoMessage()
func (*ListStakesRequest) ProtoReflect ¶
func (x *ListStakesRequest) ProtoReflect() protoreflect.Message
func (*ListStakesRequest) Reset ¶
func (x *ListStakesRequest) Reset()
func (*ListStakesRequest) String ¶
func (x *ListStakesRequest) String() string
type ListStakesResponse ¶
type ListStakesResponse struct { // 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"` // contains filtered or unexported fields }
The response message for ListStakes.
func (*ListStakesResponse) Descriptor
deprecated
func (*ListStakesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListStakesResponse.ProtoReflect.Descriptor instead.
func (*ListStakesResponse) GetNextPageToken ¶
func (x *ListStakesResponse) GetNextPageToken() string
func (*ListStakesResponse) GetStakes ¶
func (x *ListStakesResponse) GetStakes() []*Stake
func (*ListStakesResponse) ProtoMessage ¶
func (*ListStakesResponse) ProtoMessage()
func (*ListStakesResponse) ProtoReflect ¶
func (x *ListStakesResponse) ProtoReflect() protoreflect.Message
func (*ListStakesResponse) Reset ¶
func (x *ListStakesResponse) Reset()
func (*ListStakesResponse) String ¶
func (x *ListStakesResponse) String() string
type ParticipantType ¶
type ParticipantType int32
The participant type of a staking-related address.
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 )
func (ParticipantType) Descriptor ¶
func (ParticipantType) Descriptor() protoreflect.EnumDescriptor
func (ParticipantType) Enum ¶
func (x ParticipantType) Enum() *ParticipantType
func (ParticipantType) EnumDescriptor
deprecated
func (ParticipantType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ParticipantType.Descriptor instead.
func (ParticipantType) Number ¶
func (x ParticipantType) Number() protoreflect.EnumNumber
func (ParticipantType) String ¶
func (x ParticipantType) String() string
func (ParticipantType) Type ¶
func (ParticipantType) Type() protoreflect.EnumType
type Portfolio ¶ added in v0.6.0
type Portfolio struct { // A unique identifier for the portfolio. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The addresses that make up the portfolio Addresses []*Address `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` // contains filtered or unexported fields }
A portfolio represents an arbitrary collection of addresses. A portfolio doesn't necessarily imply that the underlying addresses are linked onchain in any manner. A portfolio is a convenient way for users to group addresses together for reporting purposes. For now, project and portfolio are synonymous, 1-to-1.
func (*Portfolio) Descriptor
deprecated
added in
v0.6.0
func (*Portfolio) GetAddresses ¶ added in v0.6.0
func (*Portfolio) ProtoMessage ¶ added in v0.6.0
func (*Portfolio) ProtoMessage()
func (*Portfolio) ProtoReflect ¶ added in v0.6.0
func (x *Portfolio) ProtoReflect() protoreflect.Message
type PortfolioResourceName ¶ added in v0.6.0
type PortfolioResourceName struct {
Portfolio string
}
func (PortfolioResourceName) ContainsWildcard ¶ added in v0.6.0
func (n PortfolioResourceName) ContainsWildcard() bool
func (PortfolioResourceName) MarshalString ¶ added in v0.6.0
func (n PortfolioResourceName) MarshalString() (string, error)
func (PortfolioResourceName) String ¶ added in v0.6.0
func (n PortfolioResourceName) String() string
func (*PortfolioResourceName) UnmarshalString ¶ added in v0.6.0
func (n *PortfolioResourceName) UnmarshalString(name string) error
func (PortfolioResourceName) Validate ¶ added in v0.6.0
func (n PortfolioResourceName) Validate() error
type Protocol ¶
type Protocol struct { // Name of the protocol (eg. ethereum, solana, cosmos, etc.). Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
A resource for a protocol.
func (*Protocol) Descriptor
deprecated
func (*Protocol) ProtoMessage ¶
func (*Protocol) ProtoMessage()
func (*Protocol) ProtoReflect ¶
func (x *Protocol) ProtoReflect() protoreflect.Message
type ProtocolResourceName ¶
type ProtocolResourceName struct {
Protocol string
}
func (ProtocolResourceName) ContainsWildcard ¶
func (n ProtocolResourceName) ContainsWildcard() bool
func (ProtocolResourceName) MarshalString ¶
func (n ProtocolResourceName) MarshalString() (string, error)
func (ProtocolResourceName) RewardResourceName ¶
func (n ProtocolResourceName) RewardResourceName( reward string, ) RewardResourceName
func (ProtocolResourceName) StakeResourceName ¶
func (n ProtocolResourceName) StakeResourceName( stake string, ) StakeResourceName
func (ProtocolResourceName) String ¶
func (n ProtocolResourceName) String() string
func (*ProtocolResourceName) UnmarshalString ¶
func (n *ProtocolResourceName) UnmarshalString(name string) error
func (ProtocolResourceName) Validate ¶
func (n ProtocolResourceName) Validate() error
type Reward ¶
type Reward struct { // 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 `` /* 156-byte string literal not displayed */ // 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 `` /* 128-byte string literal not displayed */ // 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"` // The state that the reward is in when calculated. RewardState Reward_State `` /* 142-byte string literal not displayed */ // contains filtered or unexported fields }
Rewards earned via onchain staking-related activites. A reward may be a particular event or a rollup of multiple events (ex: rewards earned in a day). (-- 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 --)
func (*Reward) Descriptor
deprecated
func (*Reward) GetAddress ¶
func (*Reward) GetAggregationUnit ¶
func (x *Reward) GetAggregationUnit() AggregationUnit
func (*Reward) GetEndingBalance ¶
func (*Reward) GetPeriodEndTime ¶
func (x *Reward) GetPeriodEndTime() *timestamppb.Timestamp
func (*Reward) GetPeriodIdentifier ¶
func (m *Reward) GetPeriodIdentifier() isReward_PeriodIdentifier
func (*Reward) GetPeriodStartTime ¶
func (x *Reward) GetPeriodStartTime() *timestamppb.Timestamp
func (*Reward) GetProtocol ¶
func (*Reward) GetRewardState ¶ added in v0.6.0
func (x *Reward) GetRewardState() Reward_State
func (*Reward) GetTotalEarnedNativeUnit ¶
func (x *Reward) GetTotalEarnedNativeUnit() *AssetAmount
func (*Reward) GetTotalEarnedUsd ¶
func (*Reward) ProtoMessage ¶
func (*Reward) ProtoMessage()
func (*Reward) ProtoReflect ¶
func (x *Reward) ProtoReflect() protoreflect.Message
type RewardRate ¶
type RewardRate struct { // 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 `` /* 176-byte string literal not displayed */ // contains filtered or unexported fields }
Reward yield calculation at a given point in time.
func (*RewardRate) Descriptor
deprecated
func (*RewardRate) Descriptor() ([]byte, []int)
Deprecated: Use RewardRate.ProtoReflect.Descriptor instead.
func (*RewardRate) GetCalculatedTime ¶
func (x *RewardRate) GetCalculatedTime() *timestamppb.Timestamp
func (*RewardRate) GetCalculationMethod ¶
func (x *RewardRate) GetCalculationMethod() RewardRate_CalculationMethods
func (*RewardRate) GetPercentage ¶
func (x *RewardRate) GetPercentage() string
func (*RewardRate) ProtoMessage ¶
func (*RewardRate) ProtoMessage()
func (*RewardRate) ProtoReflect ¶
func (x *RewardRate) ProtoReflect() protoreflect.Message
func (*RewardRate) Reset ¶
func (x *RewardRate) Reset()
func (*RewardRate) String ¶
func (x *RewardRate) String() string
type RewardRate_CalculationMethods ¶
type RewardRate_CalculationMethods int32
Representing the different methods of calculating yield.
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 )
func (RewardRate_CalculationMethods) Descriptor ¶
func (RewardRate_CalculationMethods) Descriptor() protoreflect.EnumDescriptor
func (RewardRate_CalculationMethods) Enum ¶
func (x RewardRate_CalculationMethods) Enum() *RewardRate_CalculationMethods
func (RewardRate_CalculationMethods) EnumDescriptor
deprecated
func (RewardRate_CalculationMethods) EnumDescriptor() ([]byte, []int)
Deprecated: Use RewardRate_CalculationMethods.Descriptor instead.
func (RewardRate_CalculationMethods) Number ¶
func (x RewardRate_CalculationMethods) Number() protoreflect.EnumNumber
func (RewardRate_CalculationMethods) String ¶
func (x RewardRate_CalculationMethods) String() string
func (RewardRate_CalculationMethods) Type ¶
func (RewardRate_CalculationMethods) Type() protoreflect.EnumType
type RewardResourceName ¶
func (RewardResourceName) ContainsWildcard ¶
func (n RewardResourceName) ContainsWildcard() bool
func (RewardResourceName) MarshalString ¶
func (n RewardResourceName) MarshalString() (string, error)
func (RewardResourceName) ProtocolResourceName ¶
func (n RewardResourceName) ProtocolResourceName() ProtocolResourceName
func (RewardResourceName) String ¶
func (n RewardResourceName) String() string
func (*RewardResourceName) UnmarshalString ¶
func (n *RewardResourceName) UnmarshalString(name string) error
func (RewardResourceName) Validate ¶
func (n RewardResourceName) Validate() error
type RewardServiceClient ¶
type RewardServiceClient interface { // List all rewards of an address and augment those requests with helpful filters. ListRewards(ctx context.Context, in *ListRewardsRequest, opts ...grpc.CallOption) (*ListRewardsResponse, error) // List all staking balances based on protocol and address ListStakes(ctx context.Context, in *ListStakesRequest, opts ...grpc.CallOption) (*ListStakesResponse, error) // Get a portfolio based on the name. GetPortfolio(ctx context.Context, in *GetPortfolioRequest, opts ...grpc.CallOption) (*Portfolio, error) // List all portfolios available to you. ListPortfolios(ctx context.Context, in *ListPortfoliosRequest, opts ...grpc.CallOption) (*ListPortfoliosResponse, error) }
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.
func NewRewardServiceClient ¶
func NewRewardServiceClient(cc grpc.ClientConnInterface) RewardServiceClient
type RewardServiceServer ¶
type RewardServiceServer interface { // List all rewards of an address and augment those requests with helpful filters. ListRewards(context.Context, *ListRewardsRequest) (*ListRewardsResponse, error) // List all staking balances based on protocol and address ListStakes(context.Context, *ListStakesRequest) (*ListStakesResponse, error) // Get a portfolio based on the name. GetPortfolio(context.Context, *GetPortfolioRequest) (*Portfolio, error) // List all portfolios available to you. ListPortfolios(context.Context, *ListPortfoliosRequest) (*ListPortfoliosResponse, error) // contains filtered or unexported methods }
RewardServiceServer is the server API for RewardService service. All implementations must embed UnimplementedRewardServiceServer for forward compatibility
type Reward_Date ¶
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"` }
type Reward_Epoch ¶
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_State ¶ added in v0.6.0
type Reward_State int32
The state that a reward can potentially be in. Not all rewards are immediately usable and accessible which is protocol dependent.
const ( // The reward state is in an unspecified state. Reward_STATE_UNSPECIFIED Reward_State = 0 // Indicates a reward that is not liquid and not on a users wallet address. // Typically the user would need to perform a transaction to claim their reward. // e.g. For Ethereum Partial Staking, the user must unstake then claim their rewards, each // being it's own transaction on-chain to ultimately receive their rewards. Reward_PENDING_CLAIMABLE Reward_State = 1 // Indicates a reward that is liquid and has been paid out to the users wallet address which // is usually done by an explicit blockchain transaction. // e.g. Solana rewards are paid out per epoch directly to the stake account address. Reward_MATERIALIZED Reward_State = 2 )
func (Reward_State) Descriptor ¶ added in v0.6.0
func (Reward_State) Descriptor() protoreflect.EnumDescriptor
func (Reward_State) Enum ¶ added in v0.6.0
func (x Reward_State) Enum() *Reward_State
func (Reward_State) EnumDescriptor
deprecated
added in
v0.6.0
func (Reward_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use Reward_State.Descriptor instead.
func (Reward_State) Number ¶ added in v0.6.0
func (x Reward_State) Number() protoreflect.EnumNumber
func (Reward_State) String ¶ added in v0.6.0
func (x Reward_State) String() string
func (Reward_State) Type ¶ added in v0.6.0
func (Reward_State) Type() protoreflect.EnumType
type Stake ¶
type Stake struct { // 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 `` /* 138-byte string literal not displayed */ // 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 `` /* 129-byte string literal not displayed */ // The participant type at the time of evaluation (i.e. validator, delegator). ParticipantType ParticipantType `` /* 157-byte string literal not displayed */ // 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"` // contains filtered or unexported fields }
The representation of a staking balance 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 --)
func (*Stake) Descriptor
deprecated
func (*Stake) GetAddress ¶
func (*Stake) GetBondedStake ¶
func (x *Stake) GetBondedStake() *AssetAmount
func (*Stake) GetDelegationsGiven ¶
func (x *Stake) GetDelegationsGiven() *Stake_Delegation
func (*Stake) GetDelegationsReceived ¶
func (x *Stake) GetDelegationsReceived() *Stake_Delegation
func (*Stake) GetEvaluationTime ¶
func (x *Stake) GetEvaluationTime() *timestamppb.Timestamp
func (*Stake) GetParticipantType ¶
func (x *Stake) GetParticipantType() ParticipantType
func (*Stake) GetProtocol ¶
func (*Stake) GetRewardRateCalculations ¶
func (x *Stake) GetRewardRateCalculations() []*RewardRate
func (*Stake) GetTotalDelegationReceived ¶
func (x *Stake) GetTotalDelegationReceived() *AssetAmount
func (*Stake) GetUnbondedBalance ¶
func (x *Stake) GetUnbondedBalance() *AssetAmount
func (*Stake) ProtoMessage ¶
func (*Stake) ProtoMessage()
func (*Stake) ProtoReflect ¶
func (x *Stake) ProtoReflect() protoreflect.Message
type StakeResourceName ¶
func (StakeResourceName) ContainsWildcard ¶
func (n StakeResourceName) ContainsWildcard() bool
func (StakeResourceName) MarshalString ¶
func (n StakeResourceName) MarshalString() (string, error)
func (StakeResourceName) ProtocolResourceName ¶
func (n StakeResourceName) ProtocolResourceName() ProtocolResourceName
func (StakeResourceName) String ¶
func (n StakeResourceName) String() string
func (*StakeResourceName) UnmarshalString ¶
func (n *StakeResourceName) UnmarshalString(name string) error
func (StakeResourceName) Validate ¶
func (n StakeResourceName) Validate() error
type Stake_Delegation ¶
type Stake_Delegation struct { // 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"` // contains filtered or unexported fields }
A single delegation from one address to another.
func (*Stake_Delegation) Descriptor
deprecated
func (*Stake_Delegation) Descriptor() ([]byte, []int)
Deprecated: Use Stake_Delegation.ProtoReflect.Descriptor instead.
func (*Stake_Delegation) GetAddress ¶
func (x *Stake_Delegation) GetAddress() string
func (*Stake_Delegation) GetAmount ¶
func (x *Stake_Delegation) GetAmount() *AssetAmount
func (*Stake_Delegation) GetCommissionRate ¶
func (x *Stake_Delegation) GetCommissionRate() string
func (*Stake_Delegation) ProtoMessage ¶
func (*Stake_Delegation) ProtoMessage()
func (*Stake_Delegation) ProtoReflect ¶
func (x *Stake_Delegation) ProtoReflect() protoreflect.Message
func (*Stake_Delegation) Reset ¶
func (x *Stake_Delegation) Reset()
func (*Stake_Delegation) String ¶
func (x *Stake_Delegation) String() string
type USDValue ¶
type USDValue struct { // 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"` // contains filtered or unexported fields }
Information regarding the USD value of a reward, with necessary context and metadata.
func (*USDValue) Descriptor
deprecated
func (*USDValue) GetAmount ¶
func (x *USDValue) GetAmount() *AssetAmount
func (*USDValue) GetConversionPrice ¶
func (*USDValue) GetConversionTime ¶
func (x *USDValue) GetConversionTime() *timestamppb.Timestamp
func (*USDValue) GetSource ¶
func (x *USDValue) GetSource() USDValue_Source
func (*USDValue) ProtoMessage ¶
func (*USDValue) ProtoMessage()
func (*USDValue) ProtoReflect ¶
func (x *USDValue) ProtoReflect() protoreflect.Message
type USDValue_Source ¶
type USDValue_Source int32
The source of the USD price conversion.
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 )
func (USDValue_Source) Descriptor ¶
func (USDValue_Source) Descriptor() protoreflect.EnumDescriptor
func (USDValue_Source) Enum ¶
func (x USDValue_Source) Enum() *USDValue_Source
func (USDValue_Source) EnumDescriptor
deprecated
func (USDValue_Source) EnumDescriptor() ([]byte, []int)
Deprecated: Use USDValue_Source.Descriptor instead.
func (USDValue_Source) Number ¶
func (x USDValue_Source) Number() protoreflect.EnumNumber
func (USDValue_Source) String ¶
func (x USDValue_Source) String() string
func (USDValue_Source) Type ¶
func (USDValue_Source) Type() protoreflect.EnumType
type UnimplementedRewardServiceServer ¶
type UnimplementedRewardServiceServer struct { }
UnimplementedRewardServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedRewardServiceServer) GetPortfolio ¶ added in v0.6.0
func (UnimplementedRewardServiceServer) GetPortfolio(context.Context, *GetPortfolioRequest) (*Portfolio, error)
func (UnimplementedRewardServiceServer) ListPortfolios ¶ added in v0.6.0
func (UnimplementedRewardServiceServer) ListPortfolios(context.Context, *ListPortfoliosRequest) (*ListPortfoliosResponse, error)
func (UnimplementedRewardServiceServer) ListRewards ¶
func (UnimplementedRewardServiceServer) ListRewards(context.Context, *ListRewardsRequest) (*ListRewardsResponse, error)
func (UnimplementedRewardServiceServer) ListStakes ¶
func (UnimplementedRewardServiceServer) ListStakes(context.Context, *ListStakesRequest) (*ListStakesResponse, error)
type UnsafeRewardServiceServer ¶
type UnsafeRewardServiceServer interface {
// contains filtered or unexported methods
}
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.