x402 किसी request की कीमत कैसे तय करता है

getSlot या eth_blockNumber जैसी standard call की कीमत $0.001 है, जो एक request का minimum है। getProgramAccounts या eth_getLogs जैसे भारी methods, अपने weight के हिसाब से ज़्यादा महँगे होते हैं। Batch की कीमत एक request के रूप में तय होती है, इसलिए पूरे batch के लिए minimum केवल एक बार लगता है। हर method की कीमत x402.erpc.global/pricing पर है, और यह उन्हीं tables से आती है जिनसे आपके requests की कीमत तय होती है।

कीमत कैसे निकाली जाती है

  1. हर method का एक weight होता है, जिसे tokens में गिना जाता है। यहाँ token कीमत की एक unit है, coin नहीं: एक token $0.000001 के बराबर है, इसलिए 1,000 tokens $0.001 के बराबर हैं, जिनका भुगतान 0.001 USDC के रूप में होता है।
  2. Request की सभी calls के weights जोड़े जाते हैं।
  3. 1,000 tokens से कम के total को 1,000 tokens, यानी $0.001, के रूप में charge किया जाता है: यह x402.erpc.global द्वारा settle किया जाने वाला सबसे छोटा payment है।
getSlot और getBlockHeight के batch का weight 42 + 42 = 84 tokens है और उसकी कीमत $0.001 है। eth_blockNumber, eth_getLogs और eth_call के batch का weight 42 + 2,400 + 420 = 2,862 tokens है और उसकी कीमत $0.002862 है।

Solana

MethodsTokensएक call की कीमत
Standard methods, जैसे getBalance, getSlot और sendTransaction42$0.001
DAS methods, जैसे getAsset640$0.001
getMultipleAccountscall में हर account के लिए 4201 या 2 accounts के लिए $0.001, 100 के लिए $0.042 तक
getTokenLargestAccounts2,400$0.0024
getProgramAccounts, getProgramAccountsV24,200$0.0042
/pricing में दिए बाकी सभी methods का weight 1,000 tokens से कम है, इसलिए एक call की कीमत $0.001 है; उदाहरण के लिए, getSignaturesForAddress का weight 420 है। बाकी चेन के विपरीत, Solana ऐसा method भी 42 tokens पर लेता है जो /pricing में नहीं है। इसके अपवाद वे methods हैं जिन्हें x402.erpc.global नहीं बेचता, जैसे getLeaderSlots: उनका जवाब error के साथ दिया जाता है और उन पर कोई शुल्क नहीं लगता।

Ethereum और Base

Base, Ethereum की table इस्तेमाल करता है।
MethodsTokensएक call की कीमत
Standard methods, जैसे eth_blockNumber, eth_getBalance और eth_sendRawTransaction42$0.001
Code चलाने या proofs बनाने वाली calls, जैसे eth_call, eth_estimateGas और eth_getProof420$0.001
बहुत सारा data लौटाने वाली calls, जैसे eth_getLogs, eth_getBlockReceipts, और पूरे transactions के साथ eth_getBlockByNumber2,400$0.0024
eth_simulateV1, eth_callMany4,200$0.0042
Table से बाहर के किसी method (जैसे कोई debug_* या trace_* method) का जवाब भुगतान से पहले error के साथ दिया जाता है।

Avalanche

eth_* methods, Ethereum के weights इस्तेमाल करते हैं। दूसरे namespaces के methods, जैसे avax.*, avm.*, platform.* और info.*, का weight 42 tokens है, इसलिए एक call की कीमत $0.001 है।

बाकी 12 चेन

Arbitrum, Bitcoin, Hyperliquid, Kaia, Monad, NEAR, Optimism, Polygon, Robinhood Chain, Soneium, Sui और TRON पर हर method का weight 1,000 tokens से कम है, इसलिए एक call की कीमत $0.001 है। चेन की table से बाहर के method का जवाब भुगतान से पहले error के साथ दिया जाता है।

EURC में भुगतान

कीमत US dollars में तय होती है। EURC को USDC के बराबर मूल्य पर charge किया जाता है: उतनी ही units, बिना किसी exchange rate के। $0.001 वाले request का भुगतान 0.001 USDC या 0.001 EURC से होता है।

कीमतें जाँचें

GET https://x402.erpc.global/pricing हर path की table लौटाता है, जिसमें हर method के tokens और कीमत होती है। यह मुफ़्त है।