avp

Alt Vault Protocol, an open zero-knowledge spec for sharing alts across clients.

gRPC reference example

A runnable client and server for the gRPC transport profile. Where the per-language examples under examples/<lang>/ implement the HTTP/JSON profile, this one exercises the canonical proto/avp.proto directly, so the gRPC profile is not just a schema on disk.

It loads the proto dynamically with @grpc/proto-loader (no codegen step, no committed generated stubs) and serves it with @grpc/grpc-js. keepCase: false renders the snake_case proto fields as the same camelCase the HTTP/JSON profile uses, so the message objects, and the real envelope crypto reused from ../typescript/client/src/crypto.ts, are identical to the HTTP examples; only the transport differs.

npm install        # or: bun install
npm run server     # starts the in-memory gRPC server on :50051 (PORT to override)
npm run client     # in another shell; AVP_GRPC_TARGET to point elsewhere

The client prints a transcript of the full lifecycle and exits non-zero on any failure.

What it shows

Illustrative, not production: state is in memory and there is no TLS (a real deployment uses grpc.credentials with TLS and an IdP that mints JWTs verifiable via JWKS).