Package
viem, zod, and @newton-xyz/policy-pack-shared are peer dependencies. Vendor SDKs, such as @morpho-org/blue-sdk-viem, are optional peer dependencies so applications only install the vault integrations they use.
Supported Chains
Calling
createShield on an unsupported chain errors before sending a transaction.
createShield
Creates or attaches to a Shield for a curator and vault. A newly created Shield client normally requires setParams(...) and uploadSecrets(...) before it can evaluate the selected policy.
Parameters
Return Value
CallingcreateShield returns a Shield client object with these properties.
setParams
Configures a newly created Shield contract or reconfigures an existing one with serialized policy params. Uses the attestationExpiration value from Shield client creation.
Parameters
uploadSecrets
Uploads required API secrets used by the selected policy pack. Values are encrypted in the SDK and stored with Newton Gateway for policy evaluation.
Parameters
Shield Runtime
The Shield runtime turns a typed call into:- Intent construction
- Newton AVS policy evaluation
- Policy attestation retrieval
- Onchain execution through the Shield contract
sendCall(...) as the escape hatch for unwrapped vendors.
Morpho Module
The Morpho module exposes manager actions undershield.morpho.*. reallocate is positional in the published module:
setCurator, setIsAllocator, submitCap, acceptCap, setSupplyQueue, updateWithdrawQueue, and reallocate. End-user deposit, mint, withdraw, and redeem flows are not wrapped.
sendCall
For vendors or actions without a first-class module, use sendCall. This function requires you to encode calldata for the delegated contract call yourself. Pack-specific prepareQueryOptions tell the composite policy what must be evaluated for this call.
sendCall, the integration owns intent integrity for the target call. Use 'DIRECT' for the current curator path. The lower-level runtime also has an attestation mode path for deployments that support it.
Composite Manifest
shield.setParams(...) writes a versioned UTF-8 JSON manifest into NewtonPolicy.PolicyConfig.policyParams. The manifest is the shape operators read and the AVS validates:
introspectComposite(...), see Composite Policy Packs.