General FAQ
What is Newton Protocol?
What is Newton Protocol?
What chains does Newton support?
What chains does Newton support?
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?
What programming languages can I use for data oracles?
What programming languages can I use for data oracles?
- 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?
_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?
Can I test policies without deploying on-chain?
Can I test policies without deploying on-chain?
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?
Common Errors
TaskAlreadyExists — duplicate task submission
TaskAlreadyExists — duplicate task submission
InvalidAttestation — on-chain verification failed
InvalidAttestation — on-chain verification failed
- 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
- 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
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
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