uvd-x402-sdk 2.11.1 → 2.13.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/adapters/index.d.mts +1 -1
- package/dist/adapters/index.d.ts +1 -1
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/index.mjs.map +1 -1
- package/dist/backend/index.d.mts +1 -1
- package/dist/backend/index.d.ts +1 -1
- package/dist/backend/index.js.map +1 -1
- package/dist/backend/index.mjs.map +1 -1
- package/dist/{index-C60c_e5z.d.mts → index-C6Vxnneo.d.mts} +1 -1
- package/dist/{index-VIOUicmO.d.ts → index-DmJGKD9r.d.ts} +1 -1
- package/dist/{index-D-dO_FoP.d.mts → index-fIhvHqCQ.d.mts} +18 -22
- package/dist/{index-D-dO_FoP.d.ts → index-fIhvHqCQ.d.ts} +18 -22
- package/dist/index.d.mts +56 -2
- package/dist/index.d.ts +56 -2
- package/dist/index.js +59 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +58 -1
- package/dist/index.mjs.map +1 -1
- package/dist/providers/algorand/index.d.mts +11 -5
- package/dist/providers/algorand/index.d.ts +11 -5
- package/dist/providers/algorand/index.js +142 -27
- package/dist/providers/algorand/index.js.map +1 -1
- package/dist/providers/algorand/index.mjs +142 -27
- package/dist/providers/algorand/index.mjs.map +1 -1
- package/dist/providers/evm/index.d.mts +1 -1
- package/dist/providers/evm/index.d.ts +1 -1
- package/dist/providers/evm/index.js.map +1 -1
- package/dist/providers/evm/index.mjs.map +1 -1
- package/dist/providers/near/index.d.mts +1 -1
- package/dist/providers/near/index.d.ts +1 -1
- package/dist/providers/near/index.js.map +1 -1
- package/dist/providers/near/index.mjs.map +1 -1
- package/dist/providers/solana/index.d.mts +1 -1
- package/dist/providers/solana/index.d.ts +1 -1
- package/dist/providers/solana/index.js.map +1 -1
- package/dist/providers/solana/index.mjs.map +1 -1
- package/dist/providers/stellar/index.d.mts +1 -1
- package/dist/providers/stellar/index.d.ts +1 -1
- package/dist/providers/stellar/index.js.map +1 -1
- package/dist/providers/stellar/index.mjs.map +1 -1
- package/dist/react/index.d.mts +3 -3
- package/dist/react/index.d.ts +3 -3
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs.map +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/facilitator.ts +106 -0
- package/src/index.ts +4 -0
- package/src/providers/algorand/index.ts +122 -32
- package/src/types/index.ts +18 -22
package/dist/index.mjs
CHANGED
|
@@ -1528,6 +1528,63 @@ var X402Client = class {
|
|
|
1528
1528
|
}
|
|
1529
1529
|
};
|
|
1530
1530
|
|
|
1531
|
-
|
|
1531
|
+
// src/facilitator.ts
|
|
1532
|
+
var FACILITATOR_ADDRESSES = {
|
|
1533
|
+
/**
|
|
1534
|
+
* Solana facilitator address (fee payer)
|
|
1535
|
+
* Used for: Paying transaction fees on Solana
|
|
1536
|
+
*/
|
|
1537
|
+
solana: "F742C4VfFLQ9zRQyithoj5229ZgtX2WqKCSFKgH2EThq",
|
|
1538
|
+
/**
|
|
1539
|
+
* Algorand facilitator address (fee payer)
|
|
1540
|
+
* Used for: Signing Transaction 0 (fee tx) in atomic groups
|
|
1541
|
+
* Note: This is derived from the facilitator's Algorand mnemonic
|
|
1542
|
+
*/
|
|
1543
|
+
algorand: "SXHRBXS22SKKXHXK44DTQMWN2SXK3SFJWBDAQZGF4DRPW7PNFAUM2GYFAQ",
|
|
1544
|
+
/**
|
|
1545
|
+
* Algorand testnet facilitator address
|
|
1546
|
+
*/
|
|
1547
|
+
"algorand-testnet": "SXHRBXS22SKKXHXK44DTQMWN2SXK3SFJWBDAQZGF4DRPW7PNFAUM2GYFAQ",
|
|
1548
|
+
/**
|
|
1549
|
+
* EVM facilitator address
|
|
1550
|
+
* Used for: Submitting EIP-3009 transferWithAuthorization transactions
|
|
1551
|
+
* Note: Same address across all EVM chains
|
|
1552
|
+
*/
|
|
1553
|
+
evm: "0x7c5F3AdB0C7775968Bc7e7cF61b27fECf2e2b500",
|
|
1554
|
+
/**
|
|
1555
|
+
* Stellar facilitator address
|
|
1556
|
+
* Used for: Signing soroban authorization entries
|
|
1557
|
+
*/
|
|
1558
|
+
stellar: "GDUTDNV53WQPOB2JUZPO6SXH4LVT7CJSLCMLFQ7W4CNAXGIX7XYMCNP2",
|
|
1559
|
+
/**
|
|
1560
|
+
* NEAR facilitator address
|
|
1561
|
+
* Used for: Relaying meta-transactions
|
|
1562
|
+
*/
|
|
1563
|
+
near: "uvd-facilitator.near"
|
|
1564
|
+
};
|
|
1565
|
+
function getFacilitatorAddress(chainName, networkType) {
|
|
1566
|
+
const exactMatch = FACILITATOR_ADDRESSES[chainName];
|
|
1567
|
+
if (exactMatch) {
|
|
1568
|
+
return exactMatch;
|
|
1569
|
+
}
|
|
1570
|
+
if (networkType === "evm") {
|
|
1571
|
+
return FACILITATOR_ADDRESSES.evm;
|
|
1572
|
+
}
|
|
1573
|
+
if (networkType === "svm" || networkType === "solana") {
|
|
1574
|
+
return FACILITATOR_ADDRESSES.solana;
|
|
1575
|
+
}
|
|
1576
|
+
if (networkType === "algorand") {
|
|
1577
|
+
return FACILITATOR_ADDRESSES.algorand;
|
|
1578
|
+
}
|
|
1579
|
+
if (networkType === "stellar") {
|
|
1580
|
+
return FACILITATOR_ADDRESSES.stellar;
|
|
1581
|
+
}
|
|
1582
|
+
if (networkType === "near") {
|
|
1583
|
+
return FACILITATOR_ADDRESSES.near;
|
|
1584
|
+
}
|
|
1585
|
+
return void 0;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
export { CAIP2_IDENTIFIERS, CAIP2_TO_CHAIN, DEFAULT_CHAIN, DEFAULT_CONFIG, DEFAULT_FACILITATOR_URL, DEFAULT_PAYMENT_HEADER, FACILITATOR_ADDRESSES, PAYMENT_HEADER_NAMES, SUPPORTED_CHAINS, X402Client, X402Error, caip2ToChain, chainToCAIP2, convertX402Header, createPaymentHeaders, createX402Header, createX402V1Header, createX402V2Header, decodeX402Header, detectX402Version, encodeX402Header, generatePaymentOptions, getAlgorandChains, getChainById, getChainByName, getChainsByNetworkType, getChainsByToken, getEVMChainIds, getEnabledChains, getExplorerAddressUrl, getExplorerTxUrl, getFacilitatorAddress, getNetworkType, getPaymentHeader, getSVMChains, getSupportedTokens, getTokenConfig, isAlgorandChain, isCAIP2Format, isChainSupported, isSVMChain, isTokenSupported, parseNetworkIdentifier, validateAmount, validateRecipient };
|
|
1532
1589
|
//# sourceMappingURL=index.mjs.map
|
|
1533
1590
|
//# sourceMappingURL=index.mjs.map
|