audren.xyz

Run an Audren Gateway on your own rules, or transact with none.

On Solana, every transaction needs a fee payer for network fees and account rent. An Audren Gateway pays those fees on your behalf so your main public wallet stays off the transaction while your spending keys never leave your device. Gateways are 100% optional, non-custodial, and can even sponsor free transactions for VIP holders who attach a zero-knowledge proof of holdings.

Protocol specaudren-gateway/v1
Required HTTP endpoints3 core + 1 optional quote
VIP & fee modelsFree · On-chain · Subscriptions · Mode 3 VIP
Reference repositoryaudren-xyz/gateway

Three permissionless ways to submit. Zero gateway lock-in.

Audren updates pool roots inline inside every transaction and opens new storage pages automatically. No user or wallet is ever forced to route through a hosted gateway.

Mode A · No gateway

Direct self-pay wallet

Sign and submit directly from Phantom, Solflare, or Backpack with no intermediary at all.

  • Zero third-party gateway and zero operator markup
  • Pays standard Solana transaction fees, priority fees, and rent directly
  • Trade-off: your connected public wallet appears on-chain as the fee payer
Mode B · No ongoing gateway

One-time burner wallet

Fund a fresh disposable wallet once (from an external SOL source or a one-time private SOL withdrawal) to pay all later fees yourself.

  • Once funded, subsequent spends keep your main public wallet off-chain with zero gateway
  • Zero third-party IP or timing exposure outside your own RPC provider
  • Trade-off: you manage initial funding and a small local SOL float for fees and rent
Mode C · User-chosen operator

Any Audren Gateway

An independent operator acts as the sole transaction fee payer, delivering zero-SOL confirmations in one Solana Transaction v1.

  • Hides your main wallet from the on-chain fee-payer field
  • Monetize via on-chain fees, API subscriptions, or sponsor free VIP transactions for holders proving ≥ X balance via Mode 3 ZK proofs
  • Pick the hosted reference, an RPC provider, a wallet gateway, or deploy your own

Configure and deploy your own Gateway.

Every policy toggle below runs 100% locally in your browser. All compliance and monetization hooks ship disabled by default in the open-source template so you choose only the rules your users and jurisdiction require.

Quick presets:

1. Network and pool scope

2. Monetization and fee schedule

3. Compliance, access control and execution

Blocked ISO countries (geo.ts)
Blocked US states (optional)
Advanced budgets, rate limits, CORS & webhooksOptional overrides
// Zero-secret Cloudflare Worker config
// Save: gateway/cloudflare/wrangler.prod.jsonc
// Secrets: npx --yes pnpm@10 exec wrangler secret put <NAME> --config wrangler.prod.jsonc
{
  "$schema": "./node_modules/wrangler/config-schema.json",
  "name": "my-audren-gateway",
  "main": "./src/index.ts",
  "compatibility_date": "2026-11-01",
  "minify": true,
  "workers_dev": true,
  "observability": {
    "enabled": false
  },
  "triggers": {
    "crons": [
      "*/2 * * * *"
    ]
  },
  "durable_objects": {
    "bindings": [
      {
        "name": "RELAY_GUARD",
        "class_name": "RelayGuard"
      }
    ]
  },
  "migrations": [
    {
      "tag": "v1",
      "new_sqlite_classes": [
        "RelayGuard"
      ]
    }
  ],
  "r2_buckets": [
    {
      "binding": "SCREENING_BUCKET",
      "bucket_name": "my-audren-gateway-screening"
    }
  ],
  "vars": {
    "CLUSTER": "mainnet",
    "ENVIRONMENT": "production",
    "PROGRAM_ID": "AUDRBK6kVkQoEGm3EB7swd34SUPqrHZeNEkB5vZWVSv3",
    "ALLOWED_POOL_IDS": "0",
    "FEE_MODEL": "hybrid",
    "FEE_OWNER_PUBKEY": "",
    "FEE_SCHEDULE_JSON": "{\"So11111111111111111111111111111111111111112\":{\"minFeeBaseUnits\":\"2000000\",\"flatTollBaseUnits\":\"0\",\"bps\":25,\"maxFeeBps\":450,\"costMultiplierBps\":11500,\"ops\":{\"transfer\":{\"minFeeBaseUnits\":\"2000000\",\"bps\":0},\"withdraw\":{\"minFeeBaseUnits\":\"2000000\",\"bps\":25},\"exec_escrow\":{\"minFeeBaseUnits\":\"2000000\",\"bps\":25}}},\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\":{\"minFeeBaseUnits\":\"250000\",\"flatTollBaseUnits\":\"0\",\"bps\":25,\"maxFeeBps\":450,\"costMultiplierBps\":11500,\"perMissingAtaBaseUnits\":\"300000\",\"ops\":{\"transfer\":{\"minFeeBaseUnits\":\"250000\",\"bps\":0}}}}",
    "SELF_PAY_MARGIN_BPS": "11500",
    "PRICE_FEED_URL": "",
    "ALLOW_PUBLIC_ONBOARDING_SUBSIDY": "true",
    "ALLOW_MICRO_SUBSIDY": "true",
    "MAX_DAILY_SPONSORED_SOL": "0.05",
    "BLOCKED_COUNTRIES": "CU,IR,KP,SY",
    "BLOCKED_US_STATES": "",
    "BLOCK_TOR_EXIT": "false",
    "GEO_FAIL_CLOSED": "true",
    "SCREENING_ENABLED": "true",
    "SCREENING_LIST_URL": "r2://screening/ofac-solana.json",
    "SCREENING_SIGNING_PUBKEY_HEX": "<YOUR_ED25519_SIGNING_PUBKEY_HEX>",
    "SCREENING_MAX_AGE_SEC": "86400",
    "AUTH_MODE": "none",
    "AUTH_REQUIRED": "false",
    "ALLOWED_TARGET_PROGRAMS": "",
    "CORS_ORIGINS": "*",
    "ENABLE_REFILL_CRON": "false",
    "ENABLE_OPEN_PAGE_LOOKAHEAD_CRON": "false"
  }
}

Deploy Mainnet Gateway in 1 click (~45s)

Pre-configured for Solana Mainnet out of the gate (working public Mainnet RPC, hybrid self-paying fees, bounded onboarding sponsorship, zero blank optional fields). Only RELAYER_SECRETS_JSON is needed: paste a Phantom / Solflare 64-byte Base58 key, a solana-keygen JSON file, or generate a fresh hot keypair locally below. Fund the address with ~0.05–0.25 SOL, and swap RPC_URL anytime for QuickNode, Helius, or Triton.

Test your Gateway in the Web VaultOpens /demo/ with an explicit confirmation banner for your https:// Gateway URL (for http://localhost, enter it manually inside “Use your own gateway”).

Four typed hooks + Mode 3 Holdings Gate. Fifteen non-overridable firewall invariants.

Core enforces transaction wire validity, PDA bindings, calibrated Compute Unit caps, slot-pinned simulation, and anti-oracle opaque denials. Your hooks own commercial and compliance policy cleanly on top.

onRequest: GeoIP, API Keys, JWT/KYC & x402
Conceptual snippet (full recipe: cloudflare/src/hooks/examples/x402-micropayment.ts)

Runs before any RPC call or simulation. Enforce regional access rules, API key or JWT/KYC claims, per-caller rate limits, or HTTP 402 micropayments.

import type { GatewayHooks } from '../types';

// Full production recipe: createX402MicropaymentHook(...) verifies PAYMENT-SIGNATURE
// against a facilitator (add "payment-signature" to CORS_EXTRA_ALLOW_HEADERS).
export const hooks: GatewayHooks = {
  async onRequest(ctx) {
    if (ctx.route === 'submit' && !ctx.callerId) {
      const challenge = btoa(
        JSON.stringify({
          x402Version: 2,
          scheme: 'exact',
          network: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',
          asset: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
          payTo: '<YOUR_USDC_TREASURY_PUBKEY>',
          maxAmountRequired: '10000',
          description: 'Audren Gateway relay request',
        }),
      );
      return {
        allow: false,
        status: 402,
        code: 'PAYMENT_REQUIRED',
        error: 'Attach PAYMENT-SIGNATURE or API key to submit',
        headers: { 'payment-required': challenge },
      };
    }
    return { allow: true };
  },
};

Implement in Cloudflare Workers, Rust, Go, Node.js, or Bun.

Cloudflare Workers is the fast reference template, not a lock-in. Any HTTP service implementing the 3 required Gateway v1 endpoints and passing all 24 conformance checks works immediately with every Audren SDK and the Web Vault.

Specification

audren-gateway/v1 & OpenAPI 3.1

Normative wire, firewall, error-code, and privacy-boundary contract for third-party fee payers: GET /health, GET /v1/info, POST /v1/relay/submit, and optional GET /v1/fee-quote. Swap routing (AudrenSwapRouter across Jupiter, DFlow, OKX, Titan, Bedrock, and bloXroute on your app backend) and DeFi actions (such as Kamino Lending & Vaults via prepareExecViaEscrowAction) stay decoupled so Gateway operators never need DEX aggregator keys or swap proxies.

Automated verification

24-check conformance CLI

Verify firewall rejections, read-only GlobalRootHistory full exits, CU clamping, untrusted CPI priority-fee caps, opaque policy denials, and 200/202 settlement against any deployment.

npx @audren-xyz/gateway-conformance
Production reference

Live hosted reference Gateways

Audren runs live standalone Gateways directly from the open reference template with signed US Treasury OFAC screening on R2, GeoIP blocking (CU, IR, KP, SY), hybrid Mainnet fees, and free Devnet sponsorship.

Post-quantum & cryptographic hardening

Edge TLS 1.3 (X25519MLKEM768), VaultGuard pre-flight & key rotation

  • Hosted reference Gateways (gateway.audren.xyz and devnet-gateway.audren.xyz) enforce Minimum TLS Version 1.3 with hybrid post-quantum X25519MLKEM768 key exchange (TLS 1.2 kRSA disabled), protecting submitted transactions and fee quotes against harvest-now-decrypt-later eavesdropping.
  • Core firewall enforces v1.6.0 per-mint VaultGuard PDA bindings on every public exit and ExecViaEscrow, pre-flighting rolling outflow caps before simulation (returning 429 OUTFLOW_CAP_EXCEEDED without wasting RPC CU) while blocking PoolGuardian, VaultGuard, and permissionless Tag 9 TripSoundnessCanary from relayed traffic.
  • Keep accumulated revenue in a cold hardware/multisig FEE_OWNER_PUBKEY separate from hot Worker keys, rotate RELAYER_SECRETS_JSON with zero downtime via dual-key overlap, and select AUTH_MODE="apikey" (constant-time SHA-256) whenever zero-ECC inbound auth is required.
  • Because hot fee-payers and OFAC snapshot signing use Solana Ed25519 today, operators can plan to register Solana native PQ Recovery Keys (targeted March 31, 2027) for cold treasuries and follow the Post-Quantum Security & Cryptographic Response Guide.

Ready to integrate or run your own infrastructure?

Use AudrenGatewayClient with API keys or Bearer JWTs from @audren-xyz/sdk, or open the Web Vault and point it to your newly deployed Gateway.