ledger

package
v0.2.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package ledger implements the `fxadmin ledger` command family: querying the assembler ledger for its height, a block, or the last config block.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler executes the ledger subcommands. It carries the BCCSP used to build the channel config bundle when reading connection information from the config block.

func New

func New() *Handler

New returns a ledger command handler.

func (*Handler) Block

func (h *Handler) Block(configPath, currentBlockPath, reference, outputPath string) error

Block implements `fxadmin ledger block <reference>`, fetching the block named by reference ("latest" or a block number) and writing it to outputPath.

func (*Handler) Config

func (h *Handler) Config(configPath, currentBlockPath, reference, outputPath string) error

Config implements `fxadmin ledger config <reference>`, fetching the last config block and writing it to outputPath. Only the "latest" reference is supported.

func (*Handler) Height

func (h *Handler) Height(configPath, currentBlockPath string) error

Height implements `fxadmin ledger height`. It prints the ledger height (the newest block number plus one).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL