General FAQ
What is Newton Protocol?
What is Newton Protocol?
Newton Protocol is a decentralized policy engine for onchain transaction authorization, built as an EigenLayer Actively Validated Service (AVS). It lets you encode, verify, and enforce rules — such as spend limits, sanctions screening, or KYC gates — directly within smart contracts. See What is Newton? for a full overview.
What chains does Newton support?
What chains does Newton support?
Newton currently supports Ethereum Sepolia (
11155111) as both a source and destination chain, and Base Sepolia (84532) as a destination chain. Ethereum Mainnet support is forthcoming. See Supported Networks.How do I get an API key?
How do I get an API key?
API keys can be created via the Newton Dashboard API using SIWE (Sign-In with Ethereum) or email OTP authentication at
dashboard.api.newt.foundation, or by emailing product@magicnewton.com. See Dashboard & API Keys.What programming languages can I use for data oracles?
What programming languages can I use for data oracles?
Newton data oracles compile to WebAssembly (WASM) components. You can write them in:
- JavaScript (using ComponentizeJS)
- Python (using componentize-py)
- Rust (using cargo-component)
What is the difference between Standard and Direct validation?
What is the difference between Standard and Direct validation?
Standard validation (
_validateAttestation) uses the PolicyClientRegistry to automatically resolve your contract’s policy configuration. It costs more gas but is simpler to use.Direct validation (_validateAttestationDirect) bypasses the registry. It uses less gas but requires your contract to manage its own policy reference.See Validation Methods for details.How long does policy evaluation take?
How long does policy evaluation take?
Two-phase consensus (Prepare-Commit) takes approximately 4 seconds. See Consensus & Security.
Can I test policies without deploying on-chain?
Can I test policies without deploying on-chain?
Yes. Use
newt_simulateTask via the SDK or Gateway RPC to simulate a full policy evaluation without any on-chain interaction. You can also test individual components:newt_simulatePolicy— test Rego policy logic with provided inputsnewt_simulatePolicyData— test a WASM data oraclenewton-cli regorus eval— evaluate Rego locally with Newton crypto extensions
What is the difference between a Policy and a PolicyClient?
What is the difference between a Policy and a PolicyClient?
A Policy is a reusable Rego program that defines evaluation logic (e.g., “block transactions over $10,000”). A PolicyClient is a smart contract that references a specific policy and its configuration parameters (thresholds, allowlists). Multiple PolicyClients can use the same Policy with different parameters. See Core Concepts.
Common Errors
TaskAlreadyExists — duplicate task submission
TaskAlreadyExists — duplicate task submission
Cause: You submitted a task with the same intent hash that is already being evaluated.Fix: Wait for the existing task to complete, or modify the intent (e.g., change the nonce or timestamp) to produce a different hash.
InvalidAttestation — on-chain verification failed
InvalidAttestation — on-chain verification failed
Cause: The attestation proof failed BLS signature verification on-chain.Common reasons:
- The attestation has expired (check
expirationfield) - The operator set has rotated since the attestation was produced
- The attestation was produced for a different chain
chainId in your intent matches the chain where the PolicyClient is deployed.PolicyNotFound (-32617) — policy not found
PolicyNotFound (-32617) — policy not found
Cause: The Gateway could not find the policy associated with the provided PolicyClient address.Fix: Verify:
- The PolicyClient address is correct and deployed on the expected chain
- The PolicyClient has a policy set (use
newton-cli policy-client status) - The PolicyClient is registered with the PolicyClientRegistry
Unauthorized (-32615) — authentication failed
Unauthorized (-32615) — authentication failed
IncompatiblePolicyVersion — version mismatch
IncompatiblePolicyVersion — version mismatch
Cause: Your PolicyClient contract was deployed with an older SDK version that is incompatible with the current protocol.Fix: Run
newton-cli version check-compatibility to identify the issue, then newton-cli version migrate for automated migration.WASM oracle returns empty or unexpected data
WASM oracle returns empty or unexpected data
Cause: The WASM component’s
run function is not returning valid JSON, or the HTTP fetch is failing silently.Fix:- Test locally:
newton-cli --chain-id 11155111 policy-data simulate --wasm-file policy.wasm --input-json '{}' - Verify your
runfunction returns a JSON string (not an object) - Check that HTTP requests use the correct URL and headers
- Ensure secrets are stored if your oracle requires API keys
Getting Help
- GitHub Issues: github.com/newt-foundation
- Email:
product@magicnewton.com - Blog: blog.newt.foundation