Skip to content
Fourohtwo

api.macaroonnetwork.com/execute/wallet-nonce-v1

A wallet's transaction count (next nonce) on Base or Ethereum and whether the address holds contract code, read at a single stated block. Useful before building a transaction or as a quick activity check.

BaseAnswering
POSThttps://api.macaroonnetwork.com/execute/wallet-nonce-v1

Uptime100% of 3 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://api.macaroonnetwork.com/execute/wallet-nonce-v1", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"input":{"wallet":"0x33cC8dE6e86761D217044a8a6B394aD23b579596"},"predicate":{"conditions":[{"field":"$.chain_id","operator":"in","type":"field_changed","value":[8453,1]},{"field":"$.block_number","operator":"gte","type":"field_changed","value":1},{"field":"$.nonce","operator":"gte","type":"field_changed","value":0},{"field":"$.is_contract","operator":"in","type":"field_changed","value":[true,fals),
});
console.log(await res.json());

Example input

{"input":{"wallet":"0x33cC8dE6e86761D217044a8a6B394aD23b579596"},"predicate":{"conditions":[{"field":"$.chain_id","operator":"in","type":"field_changed","value":[8453,1]},{"field":"$.block_number","operator":"gte","type":"field_changed","value":1},{"field":"$.nonce","operator":"gte","type":"field_changed","value":0},{"field":"$.is_contract","operator":"in","type":"field_changed","value":[true,fals

More from Macaroon NetworkProvider status