Paymaster 4337
Faites disparaître le gas de l'expérience utilisateur : nodeche signe le sponsoring de vos smart accounts (ERC-4337, EntryPoint v0.8) — vous exécutez.
POSThttps://nodeche.com/eth/<clé_api> (ou /bsc/)
EntryPoint0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108 (v0.8)
Structure UserOperation v0.8
| Champ | Type | Description |
|---|---|---|
sender | adresse | Smart account exécutant l'opération |
nonce | string (hex) | Nonce du compte |
callData | string (hex) | Données d'appel vers le compte |
initCode | string (hex) | 0x si le compte est déjà déployé, sinon factory + callData |
accountGasLimits | bytes32 | 0x + 64 hex : verificationGasLimit (16 octets) + callGasLimit (16 octets), packés |
preVerificationGas | string (hex) | Gas pré-vérification |
gasFees | bytes32 | 0x + 64 hex : maxPriorityFeePerGas (16 octets) + maxFeePerGas (16 octets), packés |
signature | string (hex) | Signature du compte (vide pour l'estimation) |
1. Estimation du coût — nodeche_estimateUserOperationCost · 100 CU
Requête — cURL
curl -X POST https://nodeche.com/eth/VOTRE_CLE \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"nodeche_estimateUserOperationCost","params":[{
"network":"eth",
"userOperation":{
"sender":"0xd8dA…6045","nonce":"0x0","callData":"0x",
"initCode":"0x",
"accountGasLimits":"0x0000…000186a00000…00030d40",
"preVerificationGas":"0xc350",
"gasFees":"0x0000…3b9aca000000…0059682f00",
"signature":"0x"}}]}'Réponse attendue
{"jsonrpc":"2.0","id":1,"result":{
"network":"eth","gasUnits":"350000",
"maxFeeWei":"525000000000000","nativeSymbol":"ETH",
"nativePriceUsd":2701.01,"maxCostUsd":1.418}}
2. Sponsoring — nodeche_sponsorUserOperation · 100 CU
Flux complet : ① construisez la UserOperation · ② estimez le coût USD · ③ appelez nodeche_sponsorUserOperation — nodeche calcule le userOpHash on-chain via l'EntryPoint, vérifie vos plafonds et signe · ④ assemblez paymasterAndData et soumettez via un bundler.
Politiques
| Règle | Détail |
|---|---|
| Plafond | 50 USD/jour par clé API par défaut (configurable par plan) |
| EntryPoint | v0.8 imposé par chaîne — toute autre adresse est rejetée |
| Hors bornes | Gas ou callData excessifs rejetés avant signature |
Erreurs spécifiques
| Code | Signification |
|---|---|
-32602 | Structure UserOperation v0.8 invalide (champ manquant, gas non packé) |
-32010 | Plafond de sponsoring journalier atteint |
-32003 | Chaîne non autorisée (eth, bsc) |
-32001 | Clé API invalide ou inexistante |
-32002 | Clé API ou compte utilisateur suspendu |