uvd-x402-sdk 2.13.0 → 2.14.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.
- package/dist/index.d.mts +40 -16
- package/dist/index.d.ts +40 -16
- package/dist/index.js +58 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +58 -16
- package/dist/index.mjs.map +1 -1
- package/dist/providers/algorand/index.js +59 -17
- package/dist/providers/algorand/index.js.map +1 -1
- package/dist/providers/algorand/index.mjs +59 -17
- package/dist/providers/algorand/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/facilitator.ts +64 -16
- package/src/providers/algorand/index.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uvd-x402-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "x402 Payment SDK - Gasless crypto payments across 16 blockchains via Ultravioleta facilitator. Supports EVM, Solana, Fogo, Stellar, NEAR, and Algorand with multi-stablecoin support (USDC, EURC, AUSD, PYUSD, USDT).",
|
|
5
5
|
"author": "Ultravioleta DAO <ultravioletadao@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
package/src/facilitator.ts
CHANGED
|
@@ -25,42 +25,90 @@ export const DEFAULT_FACILITATOR_URL = 'https://facilitator.ultravioletadao.xyz'
|
|
|
25
25
|
* The facilitator uses these to pay fees and sign transactions.
|
|
26
26
|
*/
|
|
27
27
|
export const FACILITATOR_ADDRESSES = {
|
|
28
|
+
// ============================================
|
|
29
|
+
// EVM Chains
|
|
30
|
+
// ============================================
|
|
28
31
|
/**
|
|
29
|
-
*
|
|
32
|
+
* EVM facilitator address (mainnet)
|
|
33
|
+
* Used for: Submitting EIP-3009 transferWithAuthorization transactions
|
|
34
|
+
* Note: Same address across all EVM mainnet chains
|
|
35
|
+
*/
|
|
36
|
+
evm: '0x103040545AC5031A11E8C03dd11324C7333a13C7',
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* EVM facilitator address (testnet)
|
|
40
|
+
* Used for: All EVM testnet chains
|
|
41
|
+
*/
|
|
42
|
+
'evm-testnet': '0x34033041a5944B8F10f8E4D8496Bfb84f1A293A8',
|
|
43
|
+
|
|
44
|
+
// ============================================
|
|
45
|
+
// Solana
|
|
46
|
+
// ============================================
|
|
47
|
+
/**
|
|
48
|
+
* Solana facilitator address (mainnet)
|
|
30
49
|
* Used for: Paying transaction fees on Solana
|
|
31
50
|
*/
|
|
32
51
|
solana: 'F742C4VfFLQ9zRQyithoj5229ZgtX2WqKCSFKgH2EThq',
|
|
33
52
|
|
|
34
53
|
/**
|
|
35
|
-
*
|
|
36
|
-
* Used for: Signing Transaction 0 (fee tx) in atomic groups
|
|
37
|
-
* Note: This is derived from the facilitator's Algorand mnemonic
|
|
54
|
+
* Solana facilitator address (devnet)
|
|
38
55
|
*/
|
|
39
|
-
|
|
56
|
+
'solana-devnet': '6xNPewUdKRbEZDReQdpyfNUdgNg8QRc8Mt263T5GZSRv',
|
|
40
57
|
|
|
58
|
+
// ============================================
|
|
59
|
+
// Fogo (uses same addresses as Solana)
|
|
60
|
+
// ============================================
|
|
41
61
|
/**
|
|
42
|
-
*
|
|
62
|
+
* Fogo facilitator address (mainnet)
|
|
43
63
|
*/
|
|
44
|
-
|
|
64
|
+
fogo: 'F742C4VfFLQ9zRQyithoj5229ZgtX2WqKCSFKgH2EThq',
|
|
45
65
|
|
|
46
66
|
/**
|
|
47
|
-
*
|
|
48
|
-
|
|
49
|
-
|
|
67
|
+
* Fogo facilitator address (testnet)
|
|
68
|
+
*/
|
|
69
|
+
'fogo-testnet': '6xNPewUdKRbEZDReQdpyfNUdgNg8QRc8Mt263T5GZSRv',
|
|
70
|
+
|
|
71
|
+
// ============================================
|
|
72
|
+
// NEAR
|
|
73
|
+
// ============================================
|
|
74
|
+
/**
|
|
75
|
+
* NEAR facilitator address (mainnet)
|
|
76
|
+
* Used for: Relaying meta-transactions
|
|
50
77
|
*/
|
|
51
|
-
|
|
78
|
+
near: 'uvd-facilitator.near',
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* NEAR facilitator address (testnet)
|
|
82
|
+
*/
|
|
83
|
+
'near-testnet': 'uvd-facilitator.testnet',
|
|
52
84
|
|
|
85
|
+
// ============================================
|
|
86
|
+
// Stellar
|
|
87
|
+
// ============================================
|
|
53
88
|
/**
|
|
54
|
-
* Stellar facilitator address
|
|
89
|
+
* Stellar facilitator address (mainnet)
|
|
55
90
|
* Used for: Signing soroban authorization entries
|
|
56
91
|
*/
|
|
57
|
-
stellar: '
|
|
92
|
+
stellar: 'GCHPGXJT2WFFRFCA5TV4G4E3PMMXLNIDUH27PKDYA4QJ2XGYZWGFZNHB',
|
|
58
93
|
|
|
59
94
|
/**
|
|
60
|
-
*
|
|
61
|
-
* Used for: Relaying meta-transactions
|
|
95
|
+
* Stellar facilitator address (testnet)
|
|
62
96
|
*/
|
|
63
|
-
|
|
97
|
+
'stellar-testnet': 'GBBFZMLUJEZVI32EN4XA2KPP445XIBTMTRBLYWFIL556RDTHS2OWFQ2Z',
|
|
98
|
+
|
|
99
|
+
// ============================================
|
|
100
|
+
// Algorand
|
|
101
|
+
// ============================================
|
|
102
|
+
/**
|
|
103
|
+
* Algorand facilitator address (mainnet)
|
|
104
|
+
* Used for: Signing Transaction 0 (fee tx) in atomic groups
|
|
105
|
+
*/
|
|
106
|
+
algorand: 'KIMS5H6QLCUDL65L5UBTOXDPWLMTS7N3AAC3I6B2NCONEI5QIVK7LH2C2I',
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Algorand facilitator address (testnet)
|
|
110
|
+
*/
|
|
111
|
+
'algorand-testnet': '5DPPDQNYUPCTXRZWRYSF3WPYU6RKAUR25F3YG4EKXQRHV5AUAI62H5GXL4',
|
|
64
112
|
} as const;
|
|
65
113
|
|
|
66
114
|
/**
|
|
@@ -512,12 +512,12 @@ export class AlgorandProvider implements WalletAdapter {
|
|
|
512
512
|
const payload = JSON.parse(paymentPayload) as AlgorandPaymentPayload;
|
|
513
513
|
|
|
514
514
|
// Determine network name for x402
|
|
515
|
-
// Use "algorand
|
|
515
|
+
// Use "algorand" or "algorand-testnet" format for facilitator
|
|
516
516
|
let networkName: string;
|
|
517
517
|
if (chainConfig?.name === 'algorand-testnet') {
|
|
518
518
|
networkName = 'algorand-testnet';
|
|
519
519
|
} else {
|
|
520
|
-
networkName = 'algorand
|
|
520
|
+
networkName = 'algorand'; // Default to mainnet
|
|
521
521
|
}
|
|
522
522
|
|
|
523
523
|
// Build the payload data (GoPlausible x402-avm spec)
|