Repository
nuvex
Path
sdk/rust, sdk/js
Language
Rust, TypeScript 5.9.3
Package manager
pnpm 10.15.1, Node.js 22
What lives here
nuvex-sdk exposes prove_vrf(&secret, &request, JobType, &input), which returns an 80-byte proof and a 64-byte output, and node_pda, which derives the node account. The secret stays with the caller.
@nuvex/sdk exposes requestPda(programId, requester, requestId) and protocolPda, and buildCallbackInstruction, which returns the callback bytes without sending them. submitRequest throws on purpose.
“The SDK can prove on the host and still refuses to send a transaction.”
A first contribution
- Add a derivation test that pins a PDA against tests/fixtures/pda-seeds.json, so the two SDKs cannot drift apart.
- Cover a rejection path: a proof under the wrong key, a wrong-length input, or an alpha that does not bind the request account.
- Improve the error a throwing function raises, so a caller learns which milestone it is waiting on.
- Keep the Rust and TypeScript surfaces in step when one of them gains a helper.
Checks that must pass
Every pull request to the protocol repository has to pass one command:
make checkThat runs formatting, Clippy, cargo build-sbf for the three programs and the test callback consumer, the Rust tests and the JavaScript SDK tests. Program tests load target/deploy/*.so, so the Solana CLI and the platform tools have to be installed.
- The JavaScript SDK tests run from the same make check, so a TypeScript-only change still needs the Rust side to build.
- Alpha is built by nuvex-vrf and never read from instruction data: nuvex-vrf-v1, the request account pubkey, the job type, the input length, then the input bytes.
- Host proving uses the crate's prove feature and is not compiled into the programs.
Decisions that are closed
- submitRequest throwing is the current contract. Do not wire a transaction sender to make an example run.
- ADR 0004: the verifier is solana-ecvrf 0.0.1 with suite byte 0x03. The protocol does not invent a VRF.
- ADR 0006: buildCallbackInstruction returns bytes and does not send a transaction.
- RPC URLs, program ids and key paths are environment variables, never defaults in source.
On this page