uvd-x402-sdk 2.11.1 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/adapters/index.d.mts +1 -1
  2. package/dist/adapters/index.d.ts +1 -1
  3. package/dist/adapters/index.js.map +1 -1
  4. package/dist/adapters/index.mjs.map +1 -1
  5. package/dist/backend/index.d.mts +1 -1
  6. package/dist/backend/index.d.ts +1 -1
  7. package/dist/backend/index.js.map +1 -1
  8. package/dist/backend/index.mjs.map +1 -1
  9. package/dist/{index-C60c_e5z.d.mts → index-C6Vxnneo.d.mts} +1 -1
  10. package/dist/{index-VIOUicmO.d.ts → index-DmJGKD9r.d.ts} +1 -1
  11. package/dist/{index-D-dO_FoP.d.mts → index-fIhvHqCQ.d.mts} +18 -22
  12. package/dist/{index-D-dO_FoP.d.ts → index-fIhvHqCQ.d.ts} +18 -22
  13. package/dist/index.d.mts +2 -2
  14. package/dist/index.d.ts +2 -2
  15. package/dist/index.js.map +1 -1
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/providers/algorand/index.d.mts +11 -5
  18. package/dist/providers/algorand/index.d.ts +11 -5
  19. package/dist/providers/algorand/index.js +97 -27
  20. package/dist/providers/algorand/index.js.map +1 -1
  21. package/dist/providers/algorand/index.mjs +97 -27
  22. package/dist/providers/algorand/index.mjs.map +1 -1
  23. package/dist/providers/evm/index.d.mts +1 -1
  24. package/dist/providers/evm/index.d.ts +1 -1
  25. package/dist/providers/evm/index.js.map +1 -1
  26. package/dist/providers/evm/index.mjs.map +1 -1
  27. package/dist/providers/near/index.d.mts +1 -1
  28. package/dist/providers/near/index.d.ts +1 -1
  29. package/dist/providers/near/index.js.map +1 -1
  30. package/dist/providers/near/index.mjs.map +1 -1
  31. package/dist/providers/solana/index.d.mts +1 -1
  32. package/dist/providers/solana/index.d.ts +1 -1
  33. package/dist/providers/solana/index.js.map +1 -1
  34. package/dist/providers/solana/index.mjs.map +1 -1
  35. package/dist/providers/stellar/index.d.mts +1 -1
  36. package/dist/providers/stellar/index.d.ts +1 -1
  37. package/dist/providers/stellar/index.js.map +1 -1
  38. package/dist/providers/stellar/index.mjs.map +1 -1
  39. package/dist/react/index.d.mts +3 -3
  40. package/dist/react/index.d.ts +3 -3
  41. package/dist/react/index.js.map +1 -1
  42. package/dist/react/index.mjs.map +1 -1
  43. package/dist/utils/index.d.mts +1 -1
  44. package/dist/utils/index.d.ts +1 -1
  45. package/dist/utils/index.js.map +1 -1
  46. package/dist/utils/index.mjs.map +1 -1
  47. package/package.json +1 -1
  48. package/src/providers/algorand/index.ts +117 -32
  49. package/src/types/index.ts +18 -22
@@ -345,23 +345,21 @@ export interface NEARPaymentPayload {
345
345
  /**
346
346
  * Algorand payment payload (atomic transaction group)
347
347
  *
348
- * Algorand uses a unique payment model where the facilitator creates and signs
349
- * an atomic transaction group. The user signs their portion (the ASA transfer)
350
- * and the facilitator submits the complete group.
348
+ * Follows the GoPlausible x402-avm spec for atomic groups:
349
+ * - Transaction 0: Fee payment (UNSIGNED) - facilitator -> facilitator, covers all fees
350
+ * - Transaction 1: ASA transfer (SIGNED) - client -> merchant
351
+ *
352
+ * The facilitator signs transaction 0 and submits the complete atomic group.
351
353
  */
352
354
  export interface AlgorandPaymentPayload {
353
- /** Sender's Algorand address (58-character base32) */
354
- from: string;
355
- /** Recipient's Algorand address */
356
- to: string;
357
- /** Amount in base units (microAlgos for ALGO, or base units for ASA) */
358
- amount: string;
359
- /** USDC ASA ID (31566704 for mainnet, 10458941 for testnet) */
360
- assetId: number;
361
- /** Base64-encoded signed transaction bytes */
362
- signedTxn: string;
363
- /** Optional note field */
364
- note?: string;
355
+ /** Index of the payment transaction in the group (always 1) */
356
+ paymentIndex: number;
357
+ /**
358
+ * Array of base64-encoded msgpack transactions forming the atomic group:
359
+ * - [0]: Unsigned fee transaction (facilitator signs)
360
+ * - [1]: Signed ASA transfer (client signed)
361
+ */
362
+ paymentGroup: string[];
365
363
  }
366
364
 
367
365
  /**
@@ -497,15 +495,13 @@ export interface X402NEARPayload {
497
495
  }
498
496
 
499
497
  /**
500
- * Algorand-specific payload in x402 header
498
+ * Algorand-specific payload in x402 header (atomic group format)
501
499
  */
502
500
  export interface X402AlgorandPayload {
503
- from: string;
504
- to: string;
505
- amount: string;
506
- assetId: number;
507
- signedTxn: string;
508
- note?: string;
501
+ /** Index of the payment transaction in the group (always 1) */
502
+ paymentIndex: number;
503
+ /** Array of base64-encoded msgpack transactions */
504
+ paymentGroup: string[];
509
505
  }
510
506
 
511
507
  /**