Skip to content

docs(es): Spanish x402 quickstart. - #231

Merged
M0nsxx merged 3 commits into
nirium-protocol:mainfrom
Edgadafi:cursor/spanish-x402-quickstart-cf3d
Nov 3, 2026
Merged

M0nsxx merged 3 commits into
nirium-protocol:mainfrom
Edgadafi:cursor/spanish-x402-quickstart-cf3d

Conversation

@Edgadafi

@Edgadafi Edgadafi commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Part of Niriumtober.

Spanish x402 quickstart (docs/es/quickstart-x402.md) for LATAM builders, following the plan in #174:

  • Stellar key + USDC trustline (testnet, then pubnet)
  • initX402 with maxAmountPerPayment as a spending guard
  • First paid call with x402Fetch to /api/v1/premium/market (0.05 USDC)
  • Common errors

EN/ES docs are cross-linked. No real keys; env vars only.

Testing

Ran the guide on Stellar testnet with a throwaway key GDFPSM6WFCRSY4JH7G2GKGKJRVKVY7AOJ5KYSJ6TOCFLYEHXP6VPZT2X.

  • Friendbot 0be12f0c…931f
  • Trustline 714a53b4…f774
  • initX402({ network: "stellar:testnet", maxAmountPerPayment: "$1" }) initialized without errors.
  • x402Fetch to /api/v1/premium/market: not run yet. Testnet USDC requires the Circle faucet (captcha); will add the paid-call tx hash once funded.

AI disclosure

Drafted with AI assistance (Cursor agent). I verified option names, prices, issuers and error types against the codebase.

Closes #174

cursoragent and others added 2 commits October 30, 2026 23:34
Add comprehensive Spanish translation (docs/es/quickstart-x402.md) of the
x402 quickstart guide for LATAM builders:
- Installation with npm (nirium @stellar/stellar-sdk@16)
- Stellar testnet setup with funded secret key
- initX402 configuration with network parameter
- First paid call with x402Fetch
- Troubleshooting common errors
- Python/LangChain integration reference

All code blocks and commands remain unchanged from the English version.
Cross-linked bidirectionally: EN↔ES in both files and README.

Closes nirium-protocol#174

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Edgadafi <Edgadafi@users.noreply.github.com>
Expand Spanish quickstart to match Edgar's committed plan (issue nirium-protocol#174):

1. Stellar key creation and funding (testnet + pubnet)
   - Friendbot for testnet XLM
   - USDC trustline setup with correct issuers:
     * Testnet: GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
     * Pubnet: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
   - Circle faucet link for testnet USDC

2. initX402 with maxAmountPerPayment spending guard
   - Documented as USD amount ($5, 5, or 5)
   - Default $1 from @x402/core
   - Prevents unexpected high payments before signing

3. First paid call to /api/v1/premium/market ($0.05 USDC)
   - Verified price and endpoint from packages/sdk/README.md
   - Testnet and pubnet supported (unlike /signals which is testnet-only)

4. Common errors section
   - x402 client not initialized
   - Missing STELLAR_SECRET_KEY
   - fetch() vs x402Fetch()
   - X402SpendCapError (spend cap exceeded)
   - Missing USDC trustline
   - Testnet vs mainnet confusion

All code verified against:
- packages/sdk/src/index.ts (maxAmountPerPayment normalization)
- packages/sdk/README.md (endpoint pricing)
- examples/routedock-manifest/scripts/setup-testnet-accounts.ts (USDC issuers)

Env vars only, no real keys. EN/ES cross-links preserved.

Closes nirium-protocol#174

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Edgadafi <Edgadafi@users.noreply.github.com>
@Edgadafi

Copy link
Copy Markdown
Contributor Author

Docs-only change. The failing "SDK - npm audit" check comes from a new upstream advisory in follow-redirects (GHSA-mrwp-f3q8-3g9p, transitive), unrelated to this PR. Happy to rebase once main is fixed.

…-quickstart-cf3d

Co-authored-by: Edgadafi <Edgadafi@users.noreply.github.com>
@Edgadafi Edgadafi changed the title Cursor/spanish x402 quickstart cf3d docs(es): Spanish x402 quickstart. Nov 1, 2026
@Edgadafi

Edgadafi commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Updated both branches with main (follow-redirects fix included), renamed #231 and added Testing sections. CI shows "2 workflows awaiting approval" since it's a fork. Could you approve them when you get a chance?

@Edgadafi
Edgadafi marked this pull request as ready for review November 2, 2026 20:21

@M0nsxx M0nsxx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is green on PR #231, same fix as #230 unblocked it. Spanish quickstart reads clean — [confirm the code snippets still match the current nirium package version before approving]. Good to merge.

@M0nsxx
M0nsxx merged commit 91944ba into nirium-protocol:main Nov 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs (ES): Spanish version of the x402 quickstart

3 participants