Arka (Paymaster) API calls
pm_getERC20TokenQuotes
Arka (Paymaster) API calls
- POSTpm_getERC20TokenQuotes
- POSTpm_sponsorUserOperation
- POST/checkWhitelist
- POST/checkWhitelist/v2
- POST/whitelist
- POST/whitelist/v2
- POST/removeWhitelist
- POST/removeWhitelist/v2
- POST/deposit
- POST/deposit/v2
- POST/tokenPaymasterAddress
- POST/getAllWhitelist/v2
- GET/metadata
- GET/metadata/v2
- POST/addPolicy
- DEL/deletePolicy/{id}
- PUT/updatePolicy
- PUT/enablePolicy/{id}
- PUT/disablePolicy/{id}
- GET/policy
- GET/policy/{id}
- GET/policy/walletAddress/{walletAddress}
- GET/policy/walletAddress/{walletAddress}/epVersion/{epVersion}
- GET/policy/walletAddress/{walletAddress}/epVersion/{epVersion}/chainId/{chainId}
- GET/policy/walletAddress/{walletAddress}/latest
- GET/policy/walletAddress/{walletAddress}/epVersion/{epVersion}/latest
- GET/policy/walletAddress/{walletAddress}/chainId/{chainId}/latest
- GET/policy/walletAddress/{walletAddress}/epVersion/{epVersion}/chainId/{chainId}/latest
Arka (Paymaster) API calls
pm_getERC20TokenQuotes
get token exchange quotes
POST
curl --request POST \
--url https://rpc.etherspot.io/paymaster/ \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "pm_getERC20TokenQuotes",
"params": [
{
"sender": "<string>",
"nonce": "<string>",
"initCode": "<string>",
"callData": "<string>",
"callGasLimit": "<string>",
"verificationGasLimit": "<string>",
"preVerificationGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"maxFeePerGas": "<string>",
"paymasterAndData": "<string>",
"signature": "<string>"
}
],
"id": 123
}'
Example values you use to demo the API:
{
"jsonrpc": "2.0",
"method": "pm_getERC20TokenQuotes",
"params": [
{
"sender": "0xB3aF6CFDDc444B948132753AD8214a20605692eF",
"nonce": "0x6",
"initCode": "0x",
"callData": "0x47e1da2a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000080a1874e1046b1cc5defdf4d3153838b72ff94ac0000000000000000000000000fd9e8d3af1aaee056eb9e802c3a762a667b1904000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000386ed13ba07e1c409693b299bbb9839d05af20c3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000",
"callGasLimit": "0x88b8",
"verificationGasLimit": "0x186a0",
"maxFeePerGas": "0x8dcac078f",
"maxPriorityFeePerGas": "0x8dcac078f",
"paymasterAndData": "0x0101010101010101010101010101010101010101000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000000000000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101",
"signature": "0x",
"preVerificationGas": "0xcb78"
},
"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
[{ token: "0x0Fd9e8d3aF1aaee056EB9e802c3A762a667b1904" }]
],
"id": 1
}
Example response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
etherUSDExchangeRate: "0x1e"
paymasterAddress: "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3"
gasEstimates: {
"preVerificationGas": "0xc01c",
"verificationGasLimit": "0xf4f1",
"callGasLimit": "0x15971"
}
feeEstimates: {
"maxFeePerGas": "0x8dcac078f",
"maxPriorityFeePerGas": "0x8dcac078f"
}
quotes: [
{
"token": "0x0Fd9e8d3aF1aaee056EB9e802c3A762a667b1904",
"symbol": "LINK",
"decimals": 18,
"etherTokenExchangeRate": "0x01a055690d9db80000",
"serviceFeePercent": 15
}
]
unsupportedTokens: []
}
}
Body
application/json
get Token exchange quotes for the supported tokens with fee and gas estimates
Available options:
2.0
Available options:
pm_getERC20TokenQuotes
User Operation
Response
200
Successful operation
curl --request POST \
--url https://rpc.etherspot.io/paymaster/ \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "pm_getERC20TokenQuotes",
"params": [
{
"sender": "<string>",
"nonce": "<string>",
"initCode": "<string>",
"callData": "<string>",
"callGasLimit": "<string>",
"verificationGasLimit": "<string>",
"preVerificationGas": "<string>",
"maxPriorityFeePerGas": "<string>",
"maxFeePerGas": "<string>",
"paymasterAndData": "<string>",
"signature": "<string>"
}
],
"id": 123
}'