Result types after method
This commit is contained in:
parent
318968d9b2
commit
2c8e89bf11
|
@ -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"
|
||||
)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue