Documentation
¶
Index ¶
- Variables
- func GetAndParseAppProof(key []byte, data interface{}) (lc.Proof, error)
- func GetHeight() int
- func GetProof(node client.Client, prover lc.Prover, key []byte, height int) (proof lc.Proof, err error)
- func OutputProof(info interface{}, height uint64) error
- func ParseHexKey(args []string, argname string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
var KeyCmd = &cobra.Command{ Use: "key [key]", Short: "Handle proofs for state of abci app", Long: `This will look up a given key in the abci app, verify the proof, and output it as hex. If you want json output, use an app-specific command that knows key and value structure.`, RunE: commands.RequireInit(doKeyQuery), }
var RootCmd = &cobra.Command{
Use: "query",
Short: "Get and store merkle proofs for blockchain data",
Long: `Proofs allows you to validate data and merkle proofs.
These proofs tie the data to a checkpoint, which is managed by "seeds".
Here we can validate these proofs and import/export them to prove specific
data to other peers as needed.
`,
}
RootCmd represents the base command when called without any subcommands
var TxCmd = &cobra.Command{ Use: "tx [txhash]", Short: "Handle proofs of commited txs", Long: `Proofs allows you to validate abci state with merkle proofs. These proofs tie the data to a checkpoint, which is managed by "seeds". Here we can validate these proofs and import/export them to prove specific data to other peers as needed. `, RunE: commands.RequireInit(doTxQuery), }
var TxPresenters = proofs.NewPresenters()
Functions ¶
func GetAndParseAppProof ¶ added in v0.10.1
GetAndParseAppProof does most of the work of the query commands, but is quite opinionated, so if you want more control, set up the items and call GetProof directly. Notably, it always uses go-wire.ReadBinaryBytes to deserialize, and Height and Node from standard flags.
It will try to get the proof for the given key. If it is successful, it will return the proof and also unserialize proof.Data into the data argument (so pass in a pointer to the appropriate struct)
func GetProof ¶ added in v0.10.1
func GetProof(node client.Client, prover lc.Prover, key []byte, height int) (proof lc.Proof, err error)
GetProof performs the get command directly from the proof (not from the CLI)
func OutputProof ¶ added in v0.10.1
OutputProof prints the proof to stdout reuse this for printing proofs and we should enhance this for text/json, better presentation of height
Types ¶
This section is empty.