Documentation ¶
Overview ¶
Copyright 2021 Ethersphere. Copyright 2022 Beezim Authors. All rights reserved. Use of this source code is originally governed by BSD 3-Clause and our modifications by GPLv3 license that can be found in the LICENSE file.
This code is based on the beekeeper beeclient api. The http client was split to its own package. The bee api and debug api were modified and simplified to fit the purposes of Beezim.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DebugAPI ¶
type DebugAPI struct { C *httpclient.Client Node *NodeService Postage *PostageService }
func NewDebugAPI ¶
func NewDebugAPI(beeURL *url.URL, o *httpclient.ClientOptions) (*DebugAPI, error)
type NodeService ¶
type NodeService struct {
// contains filtered or unexported fields
}
type PostageOptions ¶
type PostageOptions struct {
GasPrice string
}
type PostageService ¶
type PostageService struct {
// contains filtered or unexported fields
}
func (*PostageService) CreatePostageBatch ¶
func (ps *PostageService) CreatePostageBatch(ctx context.Context, amount int64, depth uint64, label string, o PostageOptions) (string, error)
CreatePostageBatch sends a create postage request to a node that returns the bactchID
func (*PostageService) PostageBatches ¶
func (ps *PostageService) PostageBatches(ctx context.Context) ([]PostageStampResponse, error)
Fetches the list postage stamp batches
type PostageStampResponse ¶
type PostageStampResponse struct { BatchID string `json:"batchID"` Utilization uint32 `json:"utilization"` Usable bool `json:"usable"` Label string `json:"label"` Depth uint8 `json:"depth"` Amount *bigint.BigInt `json:"amount"` BucketDepth uint8 `json:"bucketDepth"` BlockNumber uint64 `json:"blockNumber"` ImmutableFlag bool `json:"immutableFlag"` Exists bool `json:"exists"` BatchTTL int64 `json:"batchTTL"` }
Click to show internal directories.
Click to hide internal directories.