{"modulePath":"github.com/ethersphere/beekeeper","version":"v0.8.4","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package debugapi\n\n## Functions\n\n```go\nfunc Bool(v bool) (p *bool)\n```\nBool is a helper routine that allocates a new bool value to store v and returns a pointer to it.\n\n```go\nfunc IsHTTPStatusErrorCode(err error, code int) bool\n```\nIsHTTPStatusErrorCode return whether the error is HTTPStatusError with a specific HTTP status code.\n\n## Types\n\n```go\ntype Addresses struct {\n\tEthereum     string        `json:\"ethereum\"`\n\tOverlay      swarm.Address `json:\"overlay\"`\n\tPublicKey    string        `json:\"public_key\"`\n\tUnderlay     []string      `json:\"underlay\"`\n\tPSSPublicKey string        `json:\"pss_public_key\"`\n}\n```\nAddresses represents node's addresses\n\n```go\ntype Balance struct {\n\tBalance *bigint.BigInt `json:\"balance\"`\n\tPeer    string         `json:\"peer\"`\n}\n```\nBalance represents node's balance with a peer\n\n```go\ntype Balances struct {\n\tBalances []Balance `json:\"balances\"`\n}\n```\nBalances represents node's balances with all peers\n\n```go\ntype Bin struct {\n\tPopulation        int             `json:\"population\"`\n\tConnected         int             `json:\"connected\"`\n\tDisconnectedPeers []swarm.Address `json:\"disconnectedPeers\"`\n\tConnectedPeers    []swarm.Address `json:\"connectedPeers\"`\n}\n```\nBin represents Kademlia bin\n\n```go\ntype CashoutStatusResponse struct {\n\tPeer            swarm.Address        `json:\"peer\"`\n\tCheque          *Cheque              `json:\"lastCashedCheque\"`\n\tTransactionHash *string              `json:\"transactionHash\"`\n\tResult          *CashoutStatusResult `json:\"result\"`\n\tUncashedAmount  *bigint.BigInt       `json:\"uncashedAmount\"`\n}\n```\n\n```go\ntype CashoutStatusResult struct {\n\tRecipient  string         `json:\"recipient\"`\n\tLastPayout *bigint.BigInt `json:\"lastPayout\"`\n\tBounced    bool           `json:\"bounced\"`\n}\n```\n\n```go\ntype Cheque struct {\n\tBeneficiary string         `json:\"beneficiary\"`\n\tChequebook  string         `json:\"chequebook\"`\n\tPayout      *bigint.BigInt `json:\"payout\"`\n}\n```\n\n```go\ntype ChequebookBalanceResponse struct {\n\tTotalBalance     *bigint.BigInt `json:\"totalBalance\"`\n\tAvailableBalance *bigint.BigInt `json:\"availableBalance\"`\n}\n```\n\n```go\ntype Client struct {\n\n\t// Services that API provides.\n\tNode     *NodeService\n\tPingPong *PingPongService\n\tPostage  *PostageService\n\t// contains filtered or unexported fields\n}\n```\nClient manages communication with the Bee Debug API.\n\n```go\nfunc NewClient(baseURL *url.URL, o *ClientOptions) (c *Client)\n```\nNewClient constructs a new Client.\n\n```go\ntype ClientOptions struct {\n\tHTTPClient *http.Client\n}\n```\nClientOptions holds optional parameters for the Client.\n\n```go\ntype HTTPStatusError struct {\n\tCode int\n}\n```\nHTTPStatusError represents the error derived from the HTTP response status code.\n\n```go\nfunc NewHTTPStatusError(code int) *HTTPStatusError\n```\nNewHTTPStatusError creates a new instance of HTTPStatusError based on the provided code.\n\n```go\nfunc (e *HTTPStatusError) Error() string\n```\n\n```go\ntype Health struct {\n\tStatus string `json:\"status\"`\n}\n```\nHealth represents node's health\n\n```go\ntype NodeService service\n```\nNodeService represents Bee's Node service\n\n```go\nfunc (n *NodeService) Addresses(ctx context.Context) (resp Addresses, err error)\n```\nAddresses returns node's addresses\n\n```go\nfunc (n *NodeService) Balance(ctx context.Context, a swarm.Address) (resp Balance, err error)\n```\nBalance returns node's balance with a given peer\n\n```go\nfunc (n *NodeService) Balances(ctx context.Context) (resp Balances, err error)\n```\nBalances returns node's balances with all peers\n\n```go\nfunc (n *NodeService) Cashout(ctx context.Context, a swarm.Address) (resp TransactionHashResponse, err error)\n```\n\n```go\nfunc (n *NodeService) CashoutStatus(ctx context.Context, a swarm.Address) (resp CashoutStatusResponse, err error)\n```\n\n```go\nfunc (n *NodeService) ChequebookBalance(ctx context.Context) (resp ChequebookBalanceResponse, err error)\n```\n\n```go\nfunc (n *NodeService) HasChunk(ctx context.Context, a swarm.Address) (bool, error)\n```\nHasChunk returns true/false if node has a chunk\n\n```go\nfunc (n *NodeService) Health(ctx context.Context) (resp Health, err error)\n```\nHealth returns node's health\n\n```go\nfunc (n *NodeService) Peers(ctx context.Context) (resp Peers, err error)\n```\nPeers returns node's peers\n\n```go\nfunc (n *NodeService) Readiness(ctx context.Context) (resp Readiness, err error)\n```\nReadiness returns node's readiness\n\n```go\nfunc (n *NodeService) RemoveChunk(ctx context.Context, a swarm.Address) error\n```\nRemoveChunk removes chunk from the node\n\n```go\nfunc (n *NodeService) Settlement(ctx context.Context, a swarm.Address) (resp Settlement, err error)\n```\nSettlement returns node's settlement with a given peer\n\n```go\nfunc (n *NodeService) Settlements(ctx context.Context) (resp Settlements, err error)\n```\nSettlements returns node's settlements with all peers\n\n```go\nfunc (n *NodeService) Topology(ctx context.Context) (resp Topology, err error)\n```\nTopology returns Kademlia topology\n\n```go\ntype Peer struct {\n\tAddress swarm.Address `json:\"address\"`\n}\n```\nPeer represents node's peer\n\n```go\ntype Peers struct {\n\tPeers []Peer `json:\"peers\"`\n}\n```\nPeers represents node's peers\n\n```go\ntype PingPongService service\n```\nPingPongService represents Bee's PingPong service\n\n```go\nfunc (p *PingPongService) Ping(ctx context.Context, a swarm.Address) (resp Pong, err error)\n```\nPing pings given node\n\n```go\ntype Pong struct {\n\tRTT string `json:\"rtt\"`\n}\n```\nPong represents Ping's response\n\n```go\ntype PostageService service\n```\nPostageService represents Bee's Postage service\n\n```go\nfunc (p *PostageService) CreatePostageBatch(ctx context.Context, amount int64, depth uint64, gasPrice, label string) (batchID string, err error)\n```\nSends a create postage request to a node that returns the batchID\n\n```go\nfunc (p *PostageService) DilutePostageBatch(ctx context.Context, batchID string, newDepth uint64, gasPrice string) (err error)\n```\nSends a dilute batch request to a node that returns the batchID\n\n```go\nfunc (p *PostageService) PostageBatch(ctx context.Context, batchID string) (PostageStampResponse, error)\n```\n\n```go\nfunc (p *PostageService) PostageBatches(ctx context.Context) ([]PostageStampResponse, error)\n```\nFetches the list postage stamp batches\n\n```go\nfunc (p *PostageService) ReserveState(ctx context.Context) (ReserveState, error)\n```\nReturns the batchstore reservestate of the node\n\n```go\nfunc (p *PostageService) TopUpPostageBatch(ctx context.Context, batchID string, amount int64, gasPrice string) (err error)\n```\nSends a topup batch request to a node that returns the batchID\n\n```go\ntype PostageStampResponse struct {\n\tBatchID       string         `json:\"batchID\"`\n\tUtilization   uint32         `json:\"utilization\"`\n\tUsable        bool           `json:\"usable\"`\n\tLabel         string         `json:\"label\"`\n\tDepth         uint8          `json:\"depth\"`\n\tAmount        *bigint.BigInt `json:\"amount\"`\n\tBucketDepth   uint8          `json:\"bucketDepth\"`\n\tBlockNumber   uint64         `json:\"blockNumber\"`\n\tImmutableFlag bool           `json:\"immutableFlag\"`\n\tExists        bool           `json:\"exists\"`\n\tBatchTTL      int64          `json:\"batchTTL\"`\n}\n```\n\n```go\ntype Readiness struct {\n\tStatus string `json:\"status\"`\n}\n```\nReadiness represents node's readiness\n\n```go\ntype ReserveState struct {\n\tRadius        uint8          `json:\"radius\"`\n\tStorageRadius uint8          `json:\"storageRadius\"`\n\tAvailable     int64          `json:\"available\"`\n\tOuter         *bigint.BigInt `json:\"outer\"`\n\tInner         *bigint.BigInt `json:\"inner\"`\n}\n```\n\n```go\nfunc (rs ReserveState) String() string\n```\n\n```go\ntype Settlement struct {\n\tPeer     string         `json:\"peer\"`\n\tReceived *bigint.BigInt `json:\"received\"`\n\tSent     *bigint.BigInt `json:\"sent\"`\n}\n```\nSettlement represents node's settlement with a peer\n\n```go\ntype Settlements struct {\n\tSettlements   []Settlement   `json:\"settlements\"`\n\tTotalReceived *bigint.BigInt `json:\"totalReceived\"`\n\tTotalSent     *bigint.BigInt `json:\"totalSent\"`\n}\n```\nSettlements represents node's settlements with all peers\n\n```go\ntype Topology struct {\n\tBaseAddr       swarm.Address  `json:\"baseAddr\"`\n\tPopulation     int            `json:\"population\"`\n\tConnected      int            `json:\"connected\"`\n\tTimestamp      time.Time      `json:\"timestamp\"`\n\tNnLowWatermark int            `json:\"nnLowWatermark\"`\n\tDepth          int            `json:\"depth\"`\n\tBins           map[string]Bin `json:\"bins\"`\n\tLightNodes     Bin            `json:\"lightNodes\"`\n}\n```\nTopology represents Kademlia topology\n\n```go\ntype TransactionHashResponse struct {\n\tTransactionHash string `json:\"transactionHash\"`\n}\n```\n\n","path":"github.com/ethersphere/beekeeper/pkg/beeclient/debugapi","name":"debugapi","synopsis":"","isRedistributable":true}
