// Specification v0.1

Institutional
Decision Platform

BAINK is an institutional decision platform built on the Ink Receipts evidence kernel. Pure Rust. No network. No hidden state.

Section 01//Stack

One application. One kernel. One language. The application is replaceable; the kernel is the durable interface.

stack.txtlayers
                    BAINK
     Institutional Decision Platform
                (application)
 ───────────────────────────────────────
           Built on Ink Receipts
 ───────────────────────────────────────
         Ink Receipts Evidence Kernel
 ───────────────────────────────────────
       Canonicalization • Hashing
      Receipts • Bundles • Verification
 ───────────────────────────────────────
                  Pure Rust

BAINK is built on Ink Receipts.

Section 02//Layers

The two layers do not overlap. Ink Receipts holds the evidence primitives. BAINK holds workflows, accounts, and integrations.

Ink Receipts — kernel

  • +Canonical decision records
  • +Schemas & versioned profiles
  • +Deterministic hashes (SHA-256 / BLAKE3)
  • +Receipts & evidence bundles
  • +Verification rules
  • +Structured verifier reports

BAINK — platform

  • +HTTP API & web console
  • +Workflows & approvals
  • +Institutional registry & directory
  • +Integrations with banking systems
  • +Org accounts, roles, audit log
  • +Enterprise controls & SSO

The kernel denies

− no network− no database− no auth− no AI− no hidden state− no panics on bad evidence

These prohibitions apply to Ink Receipts only. BAINK is where networks, databases, auth, and integrations live — outside the kernel boundary.

Section 03//Structure

The workspace mirrors the layer split. The dependency direction is one-way: BAINK depends on Ink Receipts; the kernel knows nothing about BAINK.

workspace/cargo + app
workspace/
├── ink-receipts/          // reusable OSS kernel
│   ├── crates/
│   │   ├── ink-core/        // shared types, errors, IDs, traits
│   │   ├── ink-schema/      // decision record schemas
│   │   ├── ink-canonical/   // deterministic JSON canonicalization
│   │   ├── ink-crypto/      // hashing, signing, verification
│   │   ├── ink-bundle/      // receipt bundle structure
│   │   ├── ink-verify/      // verifier engine
│   │   ├── ink-cli/         // `ink` command-line interface
│   │   ├── ink-wasm/        // browser / local verification
│   │   └── ink-ffi/         // bindings for Python / Node
│   └── docs/
│
└── baink/                 // institutional decision platform
    ├── api/
    ├── web/
    ├── integrations/
    ├── registry/
    ├── workflows/
    └── enterprise/
  • ink-coreShared types, errors, IDs, traits
  • ink-schemaDecision record schemas
  • ink-canonicalDeterministic JSON canonicalization
  • ink-cryptoHashing, signing, verification primitives
  • ink-bundleReceipt bundle structure
  • ink-verifyVerifier engine
  • ink-cliCommand-line interface (`ink`)
  • ink-wasmBrowser / local verification
  • ink-ffiBindings for Python, Node, other systems

Section 04//Object Model

Defined in the Ink Receipts kernel. Consumed by BAINK. Records become receipts; receipts go into bundles; bundles produce reports.

ink_core::record — DecisionRecordrust
#[derive(Debug, Serialize, Deserialize)]
pub struct DecisionRecord {
    pub schema_version: SchemaVersion,
    pub institution: InstitutionId,
    pub workflow: WorkflowId,
    pub decision_id: DecisionId,
    pub timestamp: Timestamp,
    pub subject_ref: SubjectRef,
    pub inputs: Vec<InputRef>,
    pub model_ref: Option<ModelRef>,
    pub policy_ref: PolicyRef,
    pub controls: Vec<ControlAssertion>,
    pub outcome: DecisionOutcome,
}
ink_bundle::receipt — InkReceiptrust
pub struct InkReceipt {
    pub receipt_version: SchemaVersion,
    pub record_hash: HashDigest,
    pub bundle_hash: HashDigest,
    pub issued_at: Timestamp,
    pub issuer: IssuerId,
    pub signature: Option<SignatureBlock>,
}
ink_verify::status — VerificationStatusrust
pub enum VerificationStatus {
    Pass,      // structurally valid & cryptographically consistent
    Warning,   // valid, but policy or completeness concerns
    Fail,      // invalid, corrupted, mismatched, unverifiable
    Skipped,   // check was not applicable or not configured
}

Section 05//Pipeline

Kernel pipeline. BAINK orchestrates inputs and outputs around it; the transformation itself is fixed.

  raw decision material
            ↓
    DecisionRecord
            ↓
    canonical JSON
            ↓
        hash
            ↓
      InkReceipt
            ↓
   EvidenceBundle
            ↓
        verify
            ↓
 VerificationReport

Section 06//Runtime

A single binary, ink. No daemon, no service, no network calls. The verifier is deterministic — anyone with the bundle can reproduce the report.

  • ink initScaffold a record skeleton
  • ink hash record.jsonCanonicalize and hash
  • ink receipt record.jsonIssue an unsigned local InkReceipt
  • ink bundle record.json --out bundle.ink.jsonPack record + receipt
  • ink verify bundle.ink.jsonRun the deterministic verifier
  • ink report bundle.ink.json --format markdownRender verifier output
$ink verify bundle.ink.json
INK VERIFY REPORT
Status:PASS
Checks
schema.validPASS
canonical.validPASS
record.hash.matchesPASS
bundle.hash.matchesPASS
signature.presentSKIPPED
registry.anchor.presentSKIPPED
Record Hash
sha256:8b8f0a14c3d2e9f1...91a4
Bundle Hash
sha256:91af3d22b71c0e88...fd28

BAINK wraps these primitives in workflows; the ink CLI is the bare kernel surface.

Section 07//Dependency Direction

Dependencies point one way. The kernel has no knowledge of BAINK or any particular application. Others can build their own platforms on the same kernel — the receipt format, not any single UI, is the durable interface.

        BAINK
           │
           ▼
    Ink Receipts
           │
           ▼
   Pure Rust crates

Section 08//Kernel Principles

01

Forbid unsafe

Core crates declare #![forbid(unsafe_code)]. Memory safety is a structural invariant, not an option.

02

Never panic

Bad evidence produces a structured FAIL, not a crash. Every malformed input maps to an explicit verifier error.

03

Immutable evidence

Canonical bytes are the evidence. The same record always produces the same hash. The receipt is not replaceable.