Creates a schema for boolean values (true or false).
Booleans encode as a type byte followed by 0x00 for false or 0xFF for true.
A Relish schema for boolean values
import { RBool, createCodec } from '@grounds/schema';const codec = createCodec(RBool());codec.encode(true).match( (bytes) => console.log('Boolean encoded:', bytes), (error) => console.error(error)); Copy
import { RBool, createCodec } from '@grounds/schema';const codec = createCodec(RBool());codec.encode(true).match( (bytes) => console.log('Boolean encoded:', bytes), (error) => console.error(error));
Creates a schema for boolean values (true or false).
Booleans encode as a type byte followed by 0x00 for false or 0xFF for true.