PUBLIC CONTRACT REVIEW UTILIA.GUARD.V0.1 PRE-SIGN

Decide before signing.
Fail closed.

A deterministic contract for wallets and policy runtimes to inspect one serialized Solana transaction before the final signing step. The guard never asks for a private key, signs, or broadcasts.

3unsigned fixtures
120 secevidence window
0private keys
0production payments

BOUNDED INPUT CONTRACT

One transaction. One policy. No secret context.

Unknown keys are rejected. Invalid or conflicting policies return HTTP 422 and do not produce a guard decision.

{
  "contractVersion": "utilia.guard.v0.1",
  "transaction": {
    "serialized": "<base64 or base58 transaction>",
    "encoding": "base64"
  },
  "policy": {
    "policyId": "wallet-policy-v1",
    "requireSimulationSuccess": true,
    "maxComputeUnits": 300000,
    "maxPriorityFeeLamports": "100000",
    "maxSolSpendLamports": "100000000",
    "tokenSpendLimits": [
      {
        "mint": "<Solana public key>",
        "maxAtomicAmount": "25000000"
      }
    ],
    "allowedPrograms": [],
    "blockedPrograms": [],
    "allowedRecipients": [],
    "blockedRecipients": [],
    "requireKnownPrograms": true,
    "requireKnownRecipients": true,
    "denyUnknownTokenExtensions": true
  },
  "context": {
    "source": "wallet_runtime",
    "agentId": "optional-pseudonymous-id",
    "intent": "swap"
  }
}

DECISION STATES

Deny known failures. Escalate incomplete evidence.

The full contract defines three outcomes. The local preview deliberately emits only DENY or REVIEW until transaction semantics and signed receipts are complete.

CONTRACT TARGET

ALLOW

Every required check completed and passed. This state is not available in the current preview.

DETERMINISTIC FAILURE

DENY

At least one bounded deny rule failed. Denial takes precedence over incomplete evidence elsewhere.

HUMAN OR RUNTIME CHECK

REVIEW

The service could not prove every required check. The caller must not treat this as approval.

REVIEW != ALLOW

A wallet should block, ask for explicit review, or apply its own stricter local policy. It should never silently continue to signing.

AUTHENTICATION AND TRUST BOUNDARY

Deterministic does not yet mean authenticated.

The preview binds data with canonical SHA-256 digests, but no issuer signature authenticates those digests. The wallet remains the authority for signing and local policy enforcement.

LOCAL AUTHORITY

Wallet or runtime

  • private key custody and final signature
  • user approval and policy ownership
  • host, network, receiver, asset, amount, and expiry checks
  • the final choice to block or request review
DETERMINISTIC, UNSIGNED

Preview evidence

  • request, policy, message, log, and result digests
  • simulation status, slot, and compute use
  • bounded reason codes and policy check records
  • generated and expiry timestamps
NOT AUTHENTICATED

Not safe to infer

  • context source, agent ID, and intent
  • scope-to-result proof while receipt is null
  • program, recipient, spend, and priority-fee semantics
  • permission to sign from a review outcome
CALLER BUILDS UTILIA EVALUATES CALLER VERIFIES WALLET DECIDES

FROZEN TEST VECTORS

Three unsigned fixtures. Exact expected outputs.

Each fixture uses a structurally valid legacy System Program transfer with a null signature, deterministic public addresses, and fixed RPC evidence. No live authorization, network call, private key, or payment is required.

FIXTURE 01 REVIEW

Policy-compatible candidate

Simulation succeeds at 150 compute units, but missing message decoding prevents complete semantic checks.

{
  "decision": "REVIEW",
  "reasons": ["EVIDENCE_INCOMPLETE"],
  "simulation": "succeeded",
  "computeUnits": 150,
  "receipt": null
}
Request
92067f8d...164ac
Policy
26f37618...fa781
Result
02bceaba...25511
FIXTURE 02 DENY

Compute-limit denial

Simulation succeeds, but 200,001 observed compute units exceed the configured limit of 200,000.

{
  "decision": "DENY",
  "reasons": [
    "EVIDENCE_INCOMPLETE",
    "COMPUTE_LIMIT_EXCEEDED"
  ],
  "simulation": "succeeded",
  "computeUnits": 200001
}
Request
6d153b99...31e89
Policy
8e2344f6...639e3
Result
75baaf89...cc852
FIXTURE 03 DENY

Simulation failure

The frozen simulation returns a deterministic program error while required simulation success is enabled.

{
  "decision": "DENY",
  "reasons": [
    "EVIDENCE_INCOMPLETE",
    "SIMULATION_FAILED"
  ],
  "simulation": "failed",
  "computeUnits": 150
}
Request
a1153b43...e1386
Policy
853358d9...12e88
Result
3b3a4b45...a4fb7

RUNTIME AND WALLET REVIEW

Seven decisions before complete implementation.

These questions define the pre-sign boundary. Feedback should cite the contract version and fixture ID it applies to.

  1. Does this request contain every field your runtime can supply and needs at its pre-sign policy boundary?
  2. Should an unknown program always produce REVIEW, or should the caller choose between REVIEW and DENY?
  3. Are atomic spend limits sufficient, or does your policy require fiat-valued budget evidence too?
  4. Which recipient definition should apply to swaps, routers, and vault deposits?
  5. Does your audit flow need the full simulation log, a digest, or both?
  6. What evidence validity window fits the time between construction and signing in your isolated signer flow?
  7. Can your policy ID serve as the idempotency boundary, or is a separate operation ID required?
Review gate

Complete implementation and pricing remain blocked until one wallet or policy runtime confirms the input boundary, output boundary, unknown-semantics behavior, evidence expiry, and receipt fields.

Partner-specific review paths are used only for page-level outreach attribution. They do not prove demand, authorization, payment, or a policy decision.