Skip to main content

Historical proposal: This preserved draft predates the WASIX 01 response-proof pilot. See the SDK integration page for the current implementation. Send feedback on GitHub.

Proposed SDK surface

The names below describe a consistent application interface, not a claim that these functions exist. A profile adapter must reject an operation that its profile cannot represent, instead of silently translating it to weaker semantics.

interface HTTP6 {
profiles: ProfileRegistry; // choose exact version and capabilities
trust: TrustStore; // role-specific keys, origins and policy
origins: OriginClient; // prepare, approve, admit
grants: GrantClient; // inspect, mint child, revoke, rotate
proofs: ProofClient; // challenge, prove, verify under a profile
operations: OperationClient; // prepare, execute, inquire, reconcile
resources: ResourceMiddleware; // authenticate, authorize, commit, respond
ledger: LedgerClient; // inspect, check, redeem, evidence and audit
recovery: RecoveryClient; // checkpoint, reconcile, activate epoch
codecs: ProfileCodecs; // exact canonicalization, signatures, digests
}

interface Signer {
keyId(): KeyId;
sign(context: TypedSigningContext, exactBytes: Bytes): Promise<Bytes>;
}
interface ProofProvider {
capabilities(): ProofCapabilities;
prove(challenge: VerifiedChallenge, context: FrozenContext): Promise<Proof>;
}

A production Signer should enforce role and context restrictions in protected custody. Applications should use high-level operations rather than receive a general-purpose circuit signing key. FrozenContext is immutable after the first digest is calculated. VerifiedChallenge is bound to the expected verifier and is not just a caller-provided random string. Runtime configuration selects the approved cryptographic suite and proof provider. A successful SDK call returns typed evidence and its verification status, never a bare true that conflates signature validity, authorization and actual commitment.

Application flow​

const h = HTTP6.connect({
profile: "http6-wasix-delegation-00", // exact adapter, no auto-downgrade
trust: configuredTrust,
signer: protectedInstanceSigner,
prover: registeredCircuitProvider,
transport: tlsTransport
});

const pending = await h.origins.prepare({ policy: approvedPolicy, candidate: rootInstance });
const approval = await humanPresenter.approve(pending.display, pending.challenge);
const root = await h.origins.admit({ pending, approval });
const child = await h.grants.mintChild({
parent: root, birthId: "birth-reader-01", candidate: readerInstance,
restriction: restrictedReaderPolicy
});

const invocation = await h.operations.prepare({
grant: child, op: "op-42", audience: "reports-db", action: "report.read",
resource: "monthly-total-v1", args: { project: "p7", period: "2026-10" },
input: bytes(""), releaseTo: "reader-1"
});
const response = await h.operations.execute(invocation);
const verified = await h.operations.verifyResponse({ invocation, response });
if (verified.effect.status === "committed") use(verified.authorizedResult);
else if (verified.effect.status === "uncertain") scheduleAuthorizedLookup(invocation);

Preparation must durably retain the operation ID, exact intent and input digest before transmission. Every new authorization attempt uses a fresh record and proof where the selected profile requires it. A delivery retry of an open WASIX certificate retains that certificate and proof and uses a fresh connection challenge; it does not mint a second effect. A new inquiry needs its own current authority. Callers must not treat RESERVED, REDEEMED, a timeout, or a signed assertion by itself as proof that the external effect occurred.

Resource integration​

async function handleProtectedRequest(rawRequest, resource) {
const received = await h.resources.parseAndVerify(rawRequest);
// Includes signature, actual method and target, body, profile, chain and proof.
const decision = await h.resources.authorize({
received, currentResourcePolicy: await resource.policy()
});
if (!decision.allowed) return h.resources.refusal(decision);
const claim = await h.resources.acquireExecutionRight(decision);
// At the actual effect boundary, recheck time, policy and observed fence.
const observation = await resource.commitOnce({
operationKey: decision.operationKey,
intent: decision.intent,
claim,
recheck: decision.commitGuard
});
return h.resources.finishAndRespond({ received, claim, observation });
}

The middleware requires an adapter that makes the effect and unique operation journal atomic, or uses the downstream system's durable idempotency and authoritative lookup. If an external system cannot determine whether a timed-out effect occurred, the outcome stays uncertain. Middleware must cover alternate routes, direct credentials, queues, background jobs and privileged adapters before claiming their effects are controlled. A queue receipt proves queue acceptance, not completion of the downstream work.