Module encode

Source
Expand description

§Encoding

Functionality to encode Simplicity programs. These programs are encoded bitwise rather than bytewise, so given a hex dump of a program it is not generally possible to read it visually the way you can with Bitcoin Script.

Structs§

EncodeSharing
Shares nodes based on IHR, except for Hidden nodes, which are identified solely by the hash they contain

Functions§

encode_hash
Encode a hash to bits.
encode_natural
Encode a positive integer to bits.
encode_program
Encode a Simplicity program to bits, without witness data.
encode_value
Encode a value to bits.
encode_witness
Encode witness data to bits.