Files
bare-operating-system/packages/bare-os-protocol/lib/bare-os-pear-multisig-shape.js
T
Raven Scott 7f4279d315 feat: POSIX/P2P roadmap — multisig shape, socket bridge, bin index, docs
- Unify pear.multisig.json validation via bare-os-protocol + kernel boot fragment
- Socket bridge: SCM_RIGHTS path, ancillary handling, TCP half-close/shutdown how,
  connect tcpRecvQueue + poll/recv EOF and EPIPE-shaped errors
- Bin manifest / Hyperbee hints schema 2 + namesDigest; batch-write invalidation
- Host booter structured logging; BOOT_PERF_DETAIL bare_stdlib_merge_ns timing
- Wasm kernel optional syscall imports; security_posture rotation hints schema 2
- Shell errexit inside compound bodies; expand getconf/_SC_* and bareOsGetconfSysconf
- Subprocess bridge snapshot timeoutPolicy; blind-relay protomux backpressure tests
- Pear updater minimal delegate example + verify-pear scan; holepunch drift repos
- Refresh handbook, kernel-image, syscall-socket-contract, posix matrix, PEAR-RUN

Rebuild coreutils/bundles; bundle kernel; keep seeder/kernel parity.
2026-04-05 02:08:38 -04:00

16 lines
642 B
JavaScript

/**
* Shared shape check for `/etc/bare-os/pear.multisig.json` (seeder hint + guest kernel.ext gate).
* No cryptography — validates `{ signers: string[], quorum: number }` only.
* @param {unknown} parsed
* @returns {boolean}
*/
export function pearMultisigShapeOk(parsed) {
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) return false
const o = /** @type {{ signers?: unknown; quorum?: unknown }} */ (parsed)
const signers = o.signers
const quorum = o.quorum
if (!Array.isArray(signers) || typeof quorum !== 'number') return false
if (quorum < 1 || quorum > signers.length) return false
return true
}