forked from dmitrymomot/solana-go-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_inflation_governor.go
30 lines (24 loc) · 1.09 KB
/
get_inflation_governor.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package rpc
import (
"context"
)
type GetInflationGovernorResponse JsonRpcResponse[GetInflationGovernor]
type GetInflationGovernor struct {
Foundation float64 `json:"foundation"`
FoundationTerm float64 `json:"foundationTerm"`
Initial float64 `json:"initial"`
Taper float64 `json:"taper"`
Terminal float64 `json:"terminal"`
}
// GetInflationGovernorConfig is a option config for `getInflationGovernor`
type GetInflationGovernorConfig struct {
Commitment Commitment `json:"commitment,omitempty"`
}
// GetInflationGovernor returns the current inflation governor
func (c *RpcClient) GetInflationGovernor(ctx context.Context) (JsonRpcResponse[GetInflationGovernor], error) {
return call[JsonRpcResponse[GetInflationGovernor]](c, ctx, "getInflationGovernor")
}
// GetInflationGovernorWithConfig returns the current inflation governor
func (c *RpcClient) GetInflationGovernorWithConfig(ctx context.Context, cfg GetInflationGovernorConfig) (JsonRpcResponse[GetInflationGovernor], error) {
return call[JsonRpcResponse[GetInflationGovernor]](c, ctx, "getInflationGovernor", cfg)
}