الانتقال إلى المحتوى الرئيسي
GET
/api/v1/x402/transactions/{walletAddress}

التفويضات

SIGN-IN-WITH-X
string
header
مطلوب

Wallet-based authentication using the x402 sign-in-with-x extension. Supports EVM wallets on Base (EIP-4361 SIWE, including EIP-1271 smart contract wallets) and Ed25519 wallets on Solana mainnet.

Header format: Base64-encoded JSON proof with these fields:

  • domain — api.venice.ai
  • address — EVM or Solana wallet address
  • uri — URL of the requested resource
  • version — "1"
  • chainId — "eip155:8453" for Base or "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp" for Solana
  • type — "eip191" for EVM wallets or "ed25519" for Solana
  • nonce — the nonce from the latest 402 challenge (extensions["sign-in-with-x"].info.nonce), or 32 random hex characters. Each nonce works once.
  • issuedAt — ISO 8601 time the proof was signed. Proofs older than 5 minutes are rejected.
  • expirationTime, notBefore, statement, resources — optional
  • signature — signature over the message built from these fields: an EIP-4361 SIWE message for EVM (hex) or the Solana sign-in message (base58)

Venice rebuilds the signed message from these fields, with the bare reference on its Chain ID line (8453, 5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp). Proofs from older clients that send the signed message itself are still accepted.

Example (TypeScript, viem):

SDK: npm install venice-x402-client provides VeniceClient and createAuthFetch which handle this automatically.

Billing: x402 users pay from a prepaid x402 credit balance. Top up via POST /x402/top-up. When balance is insufficient, endpoints return 402 with structured top-up instructions.

الترويسات

SIGN-IN-WITH-X
string
مطلوب

base64-encoded JSON SIWX payload proving EVM or Solana wallet ownership. The legacy X-Sign-In-With-X header is also accepted during migration.

مثال:

"siwx_example_token"

معلمات المسار

walletAddress
string
مطلوب

EVM or Solana wallet address.

Pattern: ^(0x[a-fA-F0-9]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$
مثال:

"0xYOUR_WALLET_ADDRESS"

معلمات الاستعلام

limit
integer
افتراضي:50

Maximum number of transactions to return.

النطاق المطلوب: 1 <= x <= 100
مثال:

50

offset
integer | null
افتراضي:0

Number of transactions to skip before returning results.

النطاق المطلوب: 0 <= x <= 9007199254740991
مثال:

0

الاستجابة

x402 transaction history for the wallet.

success
enum<boolean>
مطلوب
الخيارات المتاحة:
true
data
object
مطلوب