diff --git a/rpc/getStakeActivation.go b/rpc/getStakeActivation.go index 4592ed6..d1d57b8 100644 --- a/rpc/getStakeActivation.go +++ b/rpc/getStakeActivation.go @@ -7,26 +7,6 @@ import ( "github.com/gagliardetto/solana-go" ) -type GetStakeActivationResult struct { - // The stake account's activation state, one of: active, inactive, activating, deactivating. - State ActivationStateType `json:"state"` - - // Stake active during the epoch. - Active bin.Uint64 `json:"active"` - - // Stake inactive during the epoch. - Inactive bin.Uint64 `json:"inactive"` -} - -type ActivationStateType string - -const ( - ActivationStateActive ActivationStateType = "active" - ActivationStateInactive ActivationStateType = "inactive" - ActivationStateActivating ActivationStateType = "activating" - ActivationStateDeactivating ActivationStateType = "deactivating" -) - // GetStakeActivation returns epoch activation information for a stake account. func (cl *Client) GetStakeActivation( ctx context.Context, @@ -55,3 +35,23 @@ func (cl *Client) GetStakeActivation( err = cl.rpcClient.CallFor(&out, "getStakeActivation", params) return } + +type GetStakeActivationResult struct { + // The stake account's activation state, one of: active, inactive, activating, deactivating. + State ActivationStateType `json:"state"` + + // Stake active during the epoch. + Active bin.Uint64 `json:"active"` + + // Stake inactive during the epoch. + Inactive bin.Uint64 `json:"inactive"` +} + +type ActivationStateType string + +const ( + ActivationStateActive ActivationStateType = "active" + ActivationStateInactive ActivationStateType = "inactive" + ActivationStateActivating ActivationStateType = "activating" + ActivationStateDeactivating ActivationStateType = "deactivating" +) diff --git a/rpc/getVersion.go b/rpc/getVersion.go index 0e40cf5..4c19c67 100644 --- a/rpc/getVersion.go +++ b/rpc/getVersion.go @@ -6,6 +6,12 @@ import ( bin "github.com/dfuse-io/binary" ) +// GetVersion returns the current solana versions running on the node. +func (cl *Client) GetVersion(ctx context.Context) (out *GetVersionResult, err error) { + err = cl.rpcClient.CallFor(&out, "getVersion") + return +} + type GetVersionResult struct { // Software version of solana-core. SolanaCore string `json:"solana-core"` @@ -13,9 +19,3 @@ type GetVersionResult struct { // Unique identifier of the current software's feature set. FeatureSet bin.Int64 `json:"feature-set"` } - -// GetVersion returns the current solana versions running on the node. -func (cl *Client) GetVersion(ctx context.Context) (out *GetVersionResult, err error) { - err = cl.rpcClient.CallFor(&out, "getVersion") - return -}