Skip to content

Create witness-encode and witness-decode commands. #646

Open
@evoskuil

Description

@evoskuil

This will require a new system::config::witness class for parsing/serialization, which will also support a new --witness option for input-set. The system::chain::witness class already incorporates a canonical textual serialization (as bracketed base16-encoded data tokens) and wire encoding with optional prefix (variable integer element count). This should be extended to include a from_string(...) method for parsing the canonical textual serialization.

A transaction incorporates an optional witness stack. These commands will support just one element of that stack and as such require no prefix (element count). The prefix is not allowed when encoding. The prefix should be made a flag (option) when decoding, defaulted to true as this is considered part of the witness. Each token is variable integer byte-prefixed as well.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions