Shield Client
createShield(...) returns a Shield client for one curator, one vault, one chain, and one policy pack. The client either attaches to a compatible existing Shield clone or deploys a new deterministic clone through ShieldFactory.
The Shield client exposes:
policyClientAddress, the Shield clone address.pack, the policy pack or composite pack used for evaluation.setParams(...), for writing policy params onchain.uploadSecrets(...), for encrypting policy secrets and storing them with Newton Gateway.sendCall(...), for generic policy-gated calls.extend(...), for attaching typed vendor overlays such asshield.morpho.*.
Intent
AnIntent is the exact call the curator wants to execute:
wasmArgs
wasmArgs are pack-specific inputs passed to the policy WASM during evaluation. They can include vault addresses, asset symbols, market identifiers, freshness snapshots, or external-data query options.
The SDK gets these values from policy packs. For composite packs, each module can receive its own prepareQueryOptions keyed by the pack id:
Policy Packs
A policy pack is a typed wrapper around a Newton policy template. A pack usually provides:- A
zodschema for params and secrets. - An encoder that maps params to
PolicyConfig.policyParams. - A
prepareQuery(...)helper for producingwasmArgs. - Helper functions for reading or verifying onchain policy data.
Vendor Modules
Typed vendor modules attach to thecreateShield(...) client with .extend(...). They produce calldata through the vendor’s own SDK, then route through the same attestation and Shield execution path as sendCall(...).
shield.morpho.*.
Generic Calls
UsesendCall(...) when a typed vendor module does not exist yet.
sendCall, your integration owns intent integrity. Encode calldata carefully, pass the exact human-readable functionSignature, and provide the policy inputs required by the selected pack.
Standard and Direct Execution
VaultKit can use two onchain execution paths:| Mode | How it works | Trade-off |
|---|---|---|
| Standard | Waits for the aggregator to commit the operator quorum response, then calls Shield.execute(attestation). | Lower gas, more latency. |
| Direct | Submits the raw task response and BLS signature data to Shield.executeDirect(...). | Higher gas, less aggregator wait. |
Browser Safety
The SDK core is browser-safe and avoidsnode:* imports. Vendor modules and policy packs may inherit requirements from the vendor SDKs or data clients they wrap.