Documentation
¶
Index ¶
- type Client
- func (c *Client) EstimateSettlement(ctx context.Context, railID string) (*httpapi.EstimateSettlementResponse, error)
- func (c *Client) EstimateWithdraw(ctx context.Context, recipient, amount string) (*httpapi.EstimateWithdrawResponse, error)
- func (c *Client) GetAccountInfo(ctx context.Context) (*httpapi.GetAccountInfoResponse, error)
- func (c *Client) GetSettlementStatus(ctx context.Context, railID string) (*httpapi.SettlementStatusResponse, error)
- func (c *Client) GetWithdrawalStatus(ctx context.Context) (*httpapi.WithdrawalStatusResponse, error)
- func (c *Client) ListLogLevels(ctx context.Context) (map[string]string, error)
- func (c *Client) SetLogLevel(ctx context.Context, system, level string) error
- func (c *Client) SetLogLevelRegex(ctx context.Context, expression, level string) error
- func (c *Client) SettleRail(ctx context.Context, railID string) (*httpapi.SettleRailResponse, error)
- func (c *Client) Withdraw(ctx context.Context, recipient, amount string) (*httpapi.WithdrawResponse, error)
- type ErrFailedResponse
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewFromConfig ¶
NewFromConfig builds a client using repository config defaults.
func (*Client) EstimateSettlement ¶ added in v0.2.2
func (c *Client) EstimateSettlement(ctx context.Context, railID string) (*httpapi.EstimateSettlementResponse, error)
EstimateSettlement returns estimated gas and fees for settling a rail.
func (*Client) EstimateWithdraw ¶ added in v0.2.2
func (c *Client) EstimateWithdraw(ctx context.Context, recipient, amount string) (*httpapi.EstimateWithdrawResponse, error)
EstimateWithdraw returns estimated gas and fees for a withdrawal.
func (*Client) GetAccountInfo ¶ added in v0.2.2
GetAccountInfo fetches the payment account information for the storage operator.
func (*Client) GetSettlementStatus ¶ added in v0.2.2
func (c *Client) GetSettlementStatus(ctx context.Context, railID string) (*httpapi.SettlementStatusResponse, error)
GetSettlementStatus returns the status of a pending settlement for a rail.
func (*Client) GetWithdrawalStatus ¶ added in v0.2.2
func (c *Client) GetWithdrawalStatus(ctx context.Context) (*httpapi.WithdrawalStatusResponse, error)
GetWithdrawalStatus returns the status of a pending withdrawal.
func (*Client) ListLogLevels ¶
ListLogLevels fetches the list of configured loggers and their levels.
func (*Client) SetLogLevel ¶
SetLogLevel sets the log level for a specific subsystem.
func (*Client) SetLogLevelRegex ¶
SetLogLevelRegex sets the log level for all subsystems matching the expression.
func (*Client) SettleRail ¶ added in v0.2.2
func (c *Client) SettleRail(ctx context.Context, railID string) (*httpapi.SettleRailResponse, error)
SettleRail submits a settlement transaction for a rail.
type ErrFailedResponse ¶
func (ErrFailedResponse) Error ¶
func (e ErrFailedResponse) Error() string
type Option ¶
func WithBearerFromSigner ¶
WithBearerFromSigner configures the Authorization header using a JWT signed by the provided signer.
func WithHTTPClient ¶
WithHTTPClient replaces the underlying HTTP client (for custom timeouts, tracing, etc.).