Skip to main content
Shield runs wherever your signing flow lives. Pick the path that matches your stack: the TypeScript library for Node.js and browser integrations, the standalone binary for every other language and for restricted environments, or server-side enforcement inside the Yield API via Defense Mode.

Choosing an integration path

These paths are complementary, not exclusive. Defense Mode validates transactions inside the API; client-side Shield validates them again after they reach you. Running both gives you two independent checkpoints. See Security deployment options for how to combine them.

TypeScript library

Instantiate Shield and call validate() on every transaction before signing. The Shield overview walks through the full quick start and API reference.

Standalone binary

The binary embeds the full validator set and vault registry, requires no Node.js installation, and accepts JSON on stdin. Download the build for your platform from the latest release:
1

Download the binary

2

Verify integrity

Every release also includes GitHub artifact attestations: cryptographic proof that each binary was built by the Shield CI pipeline and not modified after the fact. Verify with the GitHub CLI:
3

Send a validation request

Every request requires apiVersion and an operation field (validate, isSupported, or getSupportedYieldIds):
Response
Library vs binary response shapes. The TypeScript library (shield.validate()) returns the unwrapped result object directly. The binary protocol wraps it in { ok, apiVersion, result, meta } so non-TypeScript integrations can correlate requests via meta.requestHash and handle protocol-level errors separately from validation failures.

Language guides

Call the binary as a subprocess from your language of choice. Full worked examples live in the Shield repository:

Restricted and on-premises environments

Because the binary is self-contained and validation is fully local (the embedded vault registry means no network calls), you can run Shield inside your own infrastructure: compiled backends, locked-down hosts, or air-gapped signing environments. Institutional partners with requirements beyond the standalone binary, such as dedicated deployments with custom policy control, should contact the yield.xyz team to scope a setup.

Server-side enforcement: Defense Mode

Shield also runs inside the Yield API itself, validating every constructed transaction before it is returned. It runs in Monitor mode (validate and log) by default; in Block mode, enabled per project, transactions that fail validation are rejected server-side. This path requires no code changes on your end. See Defense Mode for the modes and threat model.

Redundancy and failover

  • Client-side independence: because the Shield library and binary validate locally with an embedded registry, client-side validation keeps working even during an upstream outage.

Next steps

Shield overview

Quick start and API reference

Defense Mode

Server-side enforcement, rollout, and rollback

Shield features

Coverage matrix and validation errors

Security deployment options

Combine client-side and server-side enforcement