Skip to main content
Simulate a policy evaluation in under 5 minutes. The example policy performs OFAC sanctions screening — checking a transaction sender against a sanctions list before allowing it to proceed. No smart contract deployment required.

Prerequisites

This quickstart uses simulateTask — a dry run that does not submit anything on-chain. No Sepolia ETH or wallet needed.

Step 1 — Install

Step 2 — Run a simulation

Create quickstart.ts and paste:
Run it:

Step 3 — Understand the response

The simulation returns a SimulateTaskResult: A successful response:

Step 4 — What just happened?

Your script submitted an Intent to the Newton Gateway, where an Operator ran the OFAC sanctions Rego policy with a PolicyData oracle and returned an allow/deny result. This was a simulation — no on-chain transaction occurred. In production, the same flow produces a BLS attestation that your smart contract verifies on-chain before executing the transaction.

Next steps

Integration Guide

Build and deploy a full Newton integration — policy, contract, and frontend

Core Concepts

Understand policies, intents, tasks, and attestations

SDK Reference

Full TypeScript SDK documentation

Try the demo

See a live sanctions-checked transfer app built with the Newton SDK
The fastest way to build a complete Newton application is to use Claude (or a similar AI coding assistant) with the Newton LLM context files. This approach scaffolds a full-stack app including data oracle, Rego policy, Solidity contract, and Next.js frontend.

Get the LLM context files

Download both Newton LLM context files and place them in your project root. See the LLM context files reference for full usage details.

Provide context to your AI assistant

Start a conversation with Claude and provide the LLM context file. Then ask it to build the Newton sanctions-checked transfer app.Example prompt:
Using the Newton integration context provided, help me build a complete Newton Protocol app that:
  1. Creates a WASM data oracle for sanctions checking
  2. Writes a Rego policy that checks the oracle results
  3. Deploys the policy via newton-cli
  4. Deploys a NewtonPolicyWallet on Sepolia
  5. Builds a Next.js frontend using the Newton SDK

Environment variables

Deploy and run