(bool: boolean)
| 8 | } from '@bitauth/libauth'; |
| 9 | |
| 10 | export function encodeBool(bool: boolean): Uint8Array { |
| 11 | return bool ? encodeInt(1n) : encodeInt(0n); |
| 12 | } |
| 13 | |
| 14 | export function decodeBool(encodedBool: Uint8Array): boolean { |
| 15 | // Any encoding of 0 is false, else true |
no test coverage detected