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

التفويضات

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

Wallet-based authentication using the x402 protocol (Sign-In-With-X). Supports EVM SIWE signatures on Base and Ed25519 signatures on Solana mainnet.

Header format: Base64-encoded JSON object with the following fields:

  • address — EVM or Solana wallet address
  • message — Signed SIWX message. EVM wallets use EIP-4361 SIWE; Solana wallets use the Solana SIWX message format.
  • signature — Signature of the message, signed by the wallet's private key. EVM signatures are hex; Solana signatures may be base58 or base64.
  • timestamp — Unix timestamp in milliseconds
  • chainId — Chain identity. Use 8453, "8453", or "eip155:8453" for Base; use "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp" for Solana.
  • type — Optional signature type. Use "ed25519" for Solana. Omitted means EVM/EIP-191 for backward compatibility.

EVM SIWE message fields:

  • domain: api.venice.ai
  • uri: https://api.venice.ai
  • version: "1"
  • chainId: 8453
  • nonce: Random 16-character hex string
  • issuedAt / expirationTime: ISO timestamps (recommended TTL: 10 minutes)
  • statement: "Sign in to Venice API"

Example (TypeScript):

Solana message fields: The signed message starts with <domain> wants you to sign in with your Solana account:, followed by the wallet address and the standard URI, Version, Chain ID, Nonce, Issued At, and optional Expiration Time fields. Use type: "ed25519" and chainId: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp" in the encoded JSON payload.

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

Billing: x402 users pay from a prepaid USDC 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.

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

0

الاستجابة

x402 transaction history for the wallet.

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