curl --request POST \
--url https://api.biconomy.io/v1/execute \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"ownerAddress": "0x1234567890abcdef1234567890abcdef12345678",
"fee": {
"amount": "10000000000000000",
"token": "0x0000000000000000000000000000000000000000",
"chainId": 8453
},
"quoteType": "permit",
"quote": {
"hash": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef",
"node": "0x9876543210abcdef9876543210abcdef98765432",
"commitment": "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"paymentInfo": {
"sender": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"initCode": "0x1234abcd",
"nonce": "0",
"token": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"chainId": 1,
"shortEncoding": false,
"tokenValue": "1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)",
"tokenWeiAmount": "1000000000000000000000 (1000 ether), 250000 (0.25 USDC)",
"verificationGasLimit": "21000",
"eoa": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"callGasLimit": "50000",
"sponsored": true,
"sponsorshipUrl": "https://sponsorship.abc.org",
"tokenAmount": "1000 (1000 USDC), 1 (1 ether)",
"gasFee": "21000000000000000",
"orchestrationFee": "1000000000000000"
},
"userOps": [
{
"userOp": {
"sender": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"nonce": "0",
"callData": "0x1234abcd",
"callGasLimit": "21000",
"verificationGasLimit": "100000",
"preVerificationGas": "21000",
"maxFeePerGas": "1000000000",
"maxPriorityFeePerGas": "100000000",
"initCode": "0x1234abcd",
"paymasterAndData": "0x",
"signature": "0xabcdef123456"
},
"userOpHash": "0x1234abcd5678ef90",
"meeUserOpHash": "0xabcdef1234567890",
"lowerBoundTimestamp": 1710000000,
"upperBoundTimestamp": 1710003600,
"maxGasLimit": "1000000",
"maxFeePerGas": "1000000000",
"chainId": 8453,
"isCleanUpUserOp": false,
"shortEncoding": true
}
],
"fundingTokens": [
{
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chainId": 1,
"amount": "1000000000"
}
]
},
"payloadToSign": [
{
"signablePayload": {
"types": {},
"message": {
"owner": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"value": "1000000000000000000000",
"nonce": "0",
"deadline": "1647857449"
},
"primaryType": "Permit",
"domain": {
"name": "USD Coin",
"version": "2",
"chainId": 1,
"verifyingContract": "0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B",
"salt": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
},
"metadata": {
"nonce": "0",
"name": "USD Coin",
"version": "2",
"domainSeparator": "0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335",
"owner": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"amount": "1000000000000000000000"
},
"signature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b"
}
]
}
'import requests
url = "https://api.biconomy.io/v1/execute"
payload = {
"ownerAddress": "0x1234567890abcdef1234567890abcdef12345678",
"fee": {
"amount": "10000000000000000",
"token": "0x0000000000000000000000000000000000000000",
"chainId": 8453
},
"quoteType": "permit",
"quote": {
"hash": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef",
"node": "0x9876543210abcdef9876543210abcdef98765432",
"commitment": "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"paymentInfo": {
"sender": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"initCode": "0x1234abcd",
"nonce": "0",
"token": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"chainId": 1,
"shortEncoding": False,
"tokenValue": "1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)",
"tokenWeiAmount": "1000000000000000000000 (1000 ether), 250000 (0.25 USDC)",
"verificationGasLimit": "21000",
"eoa": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"callGasLimit": "50000",
"sponsored": True,
"sponsorshipUrl": "https://sponsorship.abc.org",
"tokenAmount": "1000 (1000 USDC), 1 (1 ether)",
"gasFee": "21000000000000000",
"orchestrationFee": "1000000000000000"
},
"userOps": [
{
"userOp": {
"sender": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"nonce": "0",
"callData": "0x1234abcd",
"callGasLimit": "21000",
"verificationGasLimit": "100000",
"preVerificationGas": "21000",
"maxFeePerGas": "1000000000",
"maxPriorityFeePerGas": "100000000",
"initCode": "0x1234abcd",
"paymasterAndData": "0x",
"signature": "0xabcdef123456"
},
"userOpHash": "0x1234abcd5678ef90",
"meeUserOpHash": "0xabcdef1234567890",
"lowerBoundTimestamp": 1710000000,
"upperBoundTimestamp": 1710003600,
"maxGasLimit": "1000000",
"maxFeePerGas": "1000000000",
"chainId": 8453,
"isCleanUpUserOp": False,
"shortEncoding": True
}
],
"fundingTokens": [
{
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chainId": 1,
"amount": "1000000000"
}
]
},
"payloadToSign": [
{
"signablePayload": {
"types": {},
"message": {
"owner": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"value": "1000000000000000000000",
"nonce": "0",
"deadline": "1647857449"
},
"primaryType": "Permit",
"domain": {
"name": "USD Coin",
"version": "2",
"chainId": 1,
"verifyingContract": "0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B",
"salt": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
},
"metadata": {
"nonce": "0",
"name": "USD Coin",
"version": "2",
"domainSeparator": "0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335",
"owner": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"amount": "1000000000000000000000"
},
"signature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ownerAddress: '0x1234567890abcdef1234567890abcdef12345678',
fee: {
amount: '10000000000000000',
token: '0x0000000000000000000000000000000000000000',
chainId: 8453
},
quoteType: 'permit',
quote: {
hash: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef',
node: '0x9876543210abcdef9876543210abcdef98765432',
commitment: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',
paymentInfo: {
sender: '0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4',
initCode: '0x1234abcd',
nonce: '0',
token: '0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a',
chainId: 1,
shortEncoding: false,
tokenValue: '1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)',
tokenWeiAmount: '1000000000000000000000 (1000 ether), 250000 (0.25 USDC)',
verificationGasLimit: '21000',
eoa: '0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a',
callGasLimit: '50000',
sponsored: true,
sponsorshipUrl: 'https://sponsorship.abc.org',
tokenAmount: '1000 (1000 USDC), 1 (1 ether)',
gasFee: '21000000000000000',
orchestrationFee: '1000000000000000'
},
userOps: [
{
userOp: {
sender: '0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a',
nonce: '0',
callData: '0x1234abcd',
callGasLimit: '21000',
verificationGasLimit: '100000',
preVerificationGas: '21000',
maxFeePerGas: '1000000000',
maxPriorityFeePerGas: '100000000',
initCode: '0x1234abcd',
paymasterAndData: '0x',
signature: '0xabcdef123456'
},
userOpHash: '0x1234abcd5678ef90',
meeUserOpHash: '0xabcdef1234567890',
lowerBoundTimestamp: 1710000000,
upperBoundTimestamp: 1710003600,
maxGasLimit: '1000000',
maxFeePerGas: '1000000000',
chainId: 8453,
isCleanUpUserOp: false,
shortEncoding: true
}
],
fundingTokens: [
{
tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
chainId: 1,
amount: '1000000000'
}
]
},
payloadToSign: [
{
signablePayload: {
types: {},
message: {
owner: '0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4',
spender: '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45',
value: '1000000000000000000000',
nonce: '0',
deadline: '1647857449'
},
primaryType: 'Permit',
domain: {
name: 'USD Coin',
version: '2',
chainId: 1,
verifyingContract: '0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B',
salt: '0x0000000000000000000000000000000000000000000000000000000000000000'
}
},
metadata: {
nonce: '0',
name: 'USD Coin',
version: '2',
domainSeparator: '0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335',
owner: '0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4',
spender: '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45',
amount: '1000000000000000000000'
},
signature: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b'
}
]
})
};
fetch('https://api.biconomy.io/v1/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.biconomy.io/v1/execute",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ownerAddress' => '0x1234567890abcdef1234567890abcdef12345678',
'fee' => [
'amount' => '10000000000000000',
'token' => '0x0000000000000000000000000000000000000000',
'chainId' => 8453
],
'quoteType' => 'permit',
'quote' => [
'hash' => '0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef',
'node' => '0x9876543210abcdef9876543210abcdef98765432',
'commitment' => '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',
'paymentInfo' => [
'sender' => '0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4',
'initCode' => '0x1234abcd',
'nonce' => '0',
'token' => '0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a',
'chainId' => 1,
'shortEncoding' => false,
'tokenValue' => '1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)',
'tokenWeiAmount' => '1000000000000000000000 (1000 ether), 250000 (0.25 USDC)',
'verificationGasLimit' => '21000',
'eoa' => '0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a',
'callGasLimit' => '50000',
'sponsored' => true,
'sponsorshipUrl' => 'https://sponsorship.abc.org',
'tokenAmount' => '1000 (1000 USDC), 1 (1 ether)',
'gasFee' => '21000000000000000',
'orchestrationFee' => '1000000000000000'
],
'userOps' => [
[
'userOp' => [
'sender' => '0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a',
'nonce' => '0',
'callData' => '0x1234abcd',
'callGasLimit' => '21000',
'verificationGasLimit' => '100000',
'preVerificationGas' => '21000',
'maxFeePerGas' => '1000000000',
'maxPriorityFeePerGas' => '100000000',
'initCode' => '0x1234abcd',
'paymasterAndData' => '0x',
'signature' => '0xabcdef123456'
],
'userOpHash' => '0x1234abcd5678ef90',
'meeUserOpHash' => '0xabcdef1234567890',
'lowerBoundTimestamp' => 1710000000,
'upperBoundTimestamp' => 1710003600,
'maxGasLimit' => '1000000',
'maxFeePerGas' => '1000000000',
'chainId' => 8453,
'isCleanUpUserOp' => false,
'shortEncoding' => true
]
],
'fundingTokens' => [
[
'tokenAddress' => '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
'chainId' => 1,
'amount' => '1000000000'
]
]
],
'payloadToSign' => [
[
'signablePayload' => [
'types' => [
],
'message' => [
'owner' => '0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4',
'spender' => '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45',
'value' => '1000000000000000000000',
'nonce' => '0',
'deadline' => '1647857449'
],
'primaryType' => 'Permit',
'domain' => [
'name' => 'USD Coin',
'version' => '2',
'chainId' => 1,
'verifyingContract' => '0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B',
'salt' => '0x0000000000000000000000000000000000000000000000000000000000000000'
]
],
'metadata' => [
'nonce' => '0',
'name' => 'USD Coin',
'version' => '2',
'domainSeparator' => '0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335',
'owner' => '0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4',
'spender' => '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45',
'amount' => '1000000000000000000000'
],
'signature' => '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.biconomy.io/v1/execute"
payload := strings.NewReader("{\n \"ownerAddress\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"fee\": {\n \"amount\": \"10000000000000000\",\n \"token\": \"0x0000000000000000000000000000000000000000\",\n \"chainId\": 8453\n },\n \"quoteType\": \"permit\",\n \"quote\": {\n \"hash\": \"0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef\",\n \"node\": \"0x9876543210abcdef9876543210abcdef98765432\",\n \"commitment\": \"0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef\",\n \"paymentInfo\": {\n \"sender\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"initCode\": \"0x1234abcd\",\n \"nonce\": \"0\",\n \"token\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"chainId\": 1,\n \"shortEncoding\": false,\n \"tokenValue\": \"1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)\",\n \"tokenWeiAmount\": \"1000000000000000000000 (1000 ether), 250000 (0.25 USDC)\",\n \"verificationGasLimit\": \"21000\",\n \"eoa\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"callGasLimit\": \"50000\",\n \"sponsored\": true,\n \"sponsorshipUrl\": \"https://sponsorship.abc.org\",\n \"tokenAmount\": \"1000 (1000 USDC), 1 (1 ether)\",\n \"gasFee\": \"21000000000000000\",\n \"orchestrationFee\": \"1000000000000000\"\n },\n \"userOps\": [\n {\n \"userOp\": {\n \"sender\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"nonce\": \"0\",\n \"callData\": \"0x1234abcd\",\n \"callGasLimit\": \"21000\",\n \"verificationGasLimit\": \"100000\",\n \"preVerificationGas\": \"21000\",\n \"maxFeePerGas\": \"1000000000\",\n \"maxPriorityFeePerGas\": \"100000000\",\n \"initCode\": \"0x1234abcd\",\n \"paymasterAndData\": \"0x\",\n \"signature\": \"0xabcdef123456\"\n },\n \"userOpHash\": \"0x1234abcd5678ef90\",\n \"meeUserOpHash\": \"0xabcdef1234567890\",\n \"lowerBoundTimestamp\": 1710000000,\n \"upperBoundTimestamp\": 1710003600,\n \"maxGasLimit\": \"1000000\",\n \"maxFeePerGas\": \"1000000000\",\n \"chainId\": 8453,\n \"isCleanUpUserOp\": false,\n \"shortEncoding\": true\n }\n ],\n \"fundingTokens\": [\n {\n \"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"chainId\": 1,\n \"amount\": \"1000000000\"\n }\n ]\n },\n \"payloadToSign\": [\n {\n \"signablePayload\": {\n \"types\": {},\n \"message\": {\n \"owner\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"spender\": \"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45\",\n \"value\": \"1000000000000000000000\",\n \"nonce\": \"0\",\n \"deadline\": \"1647857449\"\n },\n \"primaryType\": \"Permit\",\n \"domain\": {\n \"name\": \"USD Coin\",\n \"version\": \"2\",\n \"chainId\": 1,\n \"verifyingContract\": \"0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B\",\n \"salt\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n }\n },\n \"metadata\": {\n \"nonce\": \"0\",\n \"name\": \"USD Coin\",\n \"version\": \"2\",\n \"domainSeparator\": \"0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335\",\n \"owner\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"spender\": \"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45\",\n \"amount\": \"1000000000000000000000\"\n },\n \"signature\": \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.biconomy.io/v1/execute")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ownerAddress\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"fee\": {\n \"amount\": \"10000000000000000\",\n \"token\": \"0x0000000000000000000000000000000000000000\",\n \"chainId\": 8453\n },\n \"quoteType\": \"permit\",\n \"quote\": {\n \"hash\": \"0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef\",\n \"node\": \"0x9876543210abcdef9876543210abcdef98765432\",\n \"commitment\": \"0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef\",\n \"paymentInfo\": {\n \"sender\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"initCode\": \"0x1234abcd\",\n \"nonce\": \"0\",\n \"token\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"chainId\": 1,\n \"shortEncoding\": false,\n \"tokenValue\": \"1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)\",\n \"tokenWeiAmount\": \"1000000000000000000000 (1000 ether), 250000 (0.25 USDC)\",\n \"verificationGasLimit\": \"21000\",\n \"eoa\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"callGasLimit\": \"50000\",\n \"sponsored\": true,\n \"sponsorshipUrl\": \"https://sponsorship.abc.org\",\n \"tokenAmount\": \"1000 (1000 USDC), 1 (1 ether)\",\n \"gasFee\": \"21000000000000000\",\n \"orchestrationFee\": \"1000000000000000\"\n },\n \"userOps\": [\n {\n \"userOp\": {\n \"sender\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"nonce\": \"0\",\n \"callData\": \"0x1234abcd\",\n \"callGasLimit\": \"21000\",\n \"verificationGasLimit\": \"100000\",\n \"preVerificationGas\": \"21000\",\n \"maxFeePerGas\": \"1000000000\",\n \"maxPriorityFeePerGas\": \"100000000\",\n \"initCode\": \"0x1234abcd\",\n \"paymasterAndData\": \"0x\",\n \"signature\": \"0xabcdef123456\"\n },\n \"userOpHash\": \"0x1234abcd5678ef90\",\n \"meeUserOpHash\": \"0xabcdef1234567890\",\n \"lowerBoundTimestamp\": 1710000000,\n \"upperBoundTimestamp\": 1710003600,\n \"maxGasLimit\": \"1000000\",\n \"maxFeePerGas\": \"1000000000\",\n \"chainId\": 8453,\n \"isCleanUpUserOp\": false,\n \"shortEncoding\": true\n }\n ],\n \"fundingTokens\": [\n {\n \"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"chainId\": 1,\n \"amount\": \"1000000000\"\n }\n ]\n },\n \"payloadToSign\": [\n {\n \"signablePayload\": {\n \"types\": {},\n \"message\": {\n \"owner\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"spender\": \"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45\",\n \"value\": \"1000000000000000000000\",\n \"nonce\": \"0\",\n \"deadline\": \"1647857449\"\n },\n \"primaryType\": \"Permit\",\n \"domain\": {\n \"name\": \"USD Coin\",\n \"version\": \"2\",\n \"chainId\": 1,\n \"verifyingContract\": \"0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B\",\n \"salt\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n }\n },\n \"metadata\": {\n \"nonce\": \"0\",\n \"name\": \"USD Coin\",\n \"version\": \"2\",\n \"domainSeparator\": \"0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335\",\n \"owner\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"spender\": \"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45\",\n \"amount\": \"1000000000000000000000\"\n },\n \"signature\": \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.biconomy.io/v1/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ownerAddress\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"fee\": {\n \"amount\": \"10000000000000000\",\n \"token\": \"0x0000000000000000000000000000000000000000\",\n \"chainId\": 8453\n },\n \"quoteType\": \"permit\",\n \"quote\": {\n \"hash\": \"0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef\",\n \"node\": \"0x9876543210abcdef9876543210abcdef98765432\",\n \"commitment\": \"0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef\",\n \"paymentInfo\": {\n \"sender\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"initCode\": \"0x1234abcd\",\n \"nonce\": \"0\",\n \"token\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"chainId\": 1,\n \"shortEncoding\": false,\n \"tokenValue\": \"1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)\",\n \"tokenWeiAmount\": \"1000000000000000000000 (1000 ether), 250000 (0.25 USDC)\",\n \"verificationGasLimit\": \"21000\",\n \"eoa\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"callGasLimit\": \"50000\",\n \"sponsored\": true,\n \"sponsorshipUrl\": \"https://sponsorship.abc.org\",\n \"tokenAmount\": \"1000 (1000 USDC), 1 (1 ether)\",\n \"gasFee\": \"21000000000000000\",\n \"orchestrationFee\": \"1000000000000000\"\n },\n \"userOps\": [\n {\n \"userOp\": {\n \"sender\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"nonce\": \"0\",\n \"callData\": \"0x1234abcd\",\n \"callGasLimit\": \"21000\",\n \"verificationGasLimit\": \"100000\",\n \"preVerificationGas\": \"21000\",\n \"maxFeePerGas\": \"1000000000\",\n \"maxPriorityFeePerGas\": \"100000000\",\n \"initCode\": \"0x1234abcd\",\n \"paymasterAndData\": \"0x\",\n \"signature\": \"0xabcdef123456\"\n },\n \"userOpHash\": \"0x1234abcd5678ef90\",\n \"meeUserOpHash\": \"0xabcdef1234567890\",\n \"lowerBoundTimestamp\": 1710000000,\n \"upperBoundTimestamp\": 1710003600,\n \"maxGasLimit\": \"1000000\",\n \"maxFeePerGas\": \"1000000000\",\n \"chainId\": 8453,\n \"isCleanUpUserOp\": false,\n \"shortEncoding\": true\n }\n ],\n \"fundingTokens\": [\n {\n \"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"chainId\": 1,\n \"amount\": \"1000000000\"\n }\n ]\n },\n \"payloadToSign\": [\n {\n \"signablePayload\": {\n \"types\": {},\n \"message\": {\n \"owner\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"spender\": \"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45\",\n \"value\": \"1000000000000000000000\",\n \"nonce\": \"0\",\n \"deadline\": \"1647857449\"\n },\n \"primaryType\": \"Permit\",\n \"domain\": {\n \"name\": \"USD Coin\",\n \"version\": \"2\",\n \"chainId\": 1,\n \"verifyingContract\": \"0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B\",\n \"salt\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n }\n },\n \"metadata\": {\n \"nonce\": \"0\",\n \"name\": \"USD Coin\",\n \"version\": \"2\",\n \"domainSeparator\": \"0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335\",\n \"owner\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"spender\": \"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45\",\n \"amount\": \"1000000000000000000000\"\n },\n \"signature\": \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"supertxHash": "0x9a72f87a93c55d8f88e3f8c2a7b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
"error": null
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
]
}Submit the supertransaction for execution
Submit the signed supertransaction quote for the execution where multichain composable and async execution happens via MEE nodes
curl --request POST \
--url https://api.biconomy.io/v1/execute \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"ownerAddress": "0x1234567890abcdef1234567890abcdef12345678",
"fee": {
"amount": "10000000000000000",
"token": "0x0000000000000000000000000000000000000000",
"chainId": 8453
},
"quoteType": "permit",
"quote": {
"hash": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef",
"node": "0x9876543210abcdef9876543210abcdef98765432",
"commitment": "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"paymentInfo": {
"sender": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"initCode": "0x1234abcd",
"nonce": "0",
"token": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"chainId": 1,
"shortEncoding": false,
"tokenValue": "1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)",
"tokenWeiAmount": "1000000000000000000000 (1000 ether), 250000 (0.25 USDC)",
"verificationGasLimit": "21000",
"eoa": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"callGasLimit": "50000",
"sponsored": true,
"sponsorshipUrl": "https://sponsorship.abc.org",
"tokenAmount": "1000 (1000 USDC), 1 (1 ether)",
"gasFee": "21000000000000000",
"orchestrationFee": "1000000000000000"
},
"userOps": [
{
"userOp": {
"sender": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"nonce": "0",
"callData": "0x1234abcd",
"callGasLimit": "21000",
"verificationGasLimit": "100000",
"preVerificationGas": "21000",
"maxFeePerGas": "1000000000",
"maxPriorityFeePerGas": "100000000",
"initCode": "0x1234abcd",
"paymasterAndData": "0x",
"signature": "0xabcdef123456"
},
"userOpHash": "0x1234abcd5678ef90",
"meeUserOpHash": "0xabcdef1234567890",
"lowerBoundTimestamp": 1710000000,
"upperBoundTimestamp": 1710003600,
"maxGasLimit": "1000000",
"maxFeePerGas": "1000000000",
"chainId": 8453,
"isCleanUpUserOp": false,
"shortEncoding": true
}
],
"fundingTokens": [
{
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chainId": 1,
"amount": "1000000000"
}
]
},
"payloadToSign": [
{
"signablePayload": {
"types": {},
"message": {
"owner": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"value": "1000000000000000000000",
"nonce": "0",
"deadline": "1647857449"
},
"primaryType": "Permit",
"domain": {
"name": "USD Coin",
"version": "2",
"chainId": 1,
"verifyingContract": "0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B",
"salt": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
},
"metadata": {
"nonce": "0",
"name": "USD Coin",
"version": "2",
"domainSeparator": "0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335",
"owner": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"amount": "1000000000000000000000"
},
"signature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b"
}
]
}
'import requests
url = "https://api.biconomy.io/v1/execute"
payload = {
"ownerAddress": "0x1234567890abcdef1234567890abcdef12345678",
"fee": {
"amount": "10000000000000000",
"token": "0x0000000000000000000000000000000000000000",
"chainId": 8453
},
"quoteType": "permit",
"quote": {
"hash": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef",
"node": "0x9876543210abcdef9876543210abcdef98765432",
"commitment": "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef",
"paymentInfo": {
"sender": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"initCode": "0x1234abcd",
"nonce": "0",
"token": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"chainId": 1,
"shortEncoding": False,
"tokenValue": "1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)",
"tokenWeiAmount": "1000000000000000000000 (1000 ether), 250000 (0.25 USDC)",
"verificationGasLimit": "21000",
"eoa": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"callGasLimit": "50000",
"sponsored": True,
"sponsorshipUrl": "https://sponsorship.abc.org",
"tokenAmount": "1000 (1000 USDC), 1 (1 ether)",
"gasFee": "21000000000000000",
"orchestrationFee": "1000000000000000"
},
"userOps": [
{
"userOp": {
"sender": "0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a",
"nonce": "0",
"callData": "0x1234abcd",
"callGasLimit": "21000",
"verificationGasLimit": "100000",
"preVerificationGas": "21000",
"maxFeePerGas": "1000000000",
"maxPriorityFeePerGas": "100000000",
"initCode": "0x1234abcd",
"paymasterAndData": "0x",
"signature": "0xabcdef123456"
},
"userOpHash": "0x1234abcd5678ef90",
"meeUserOpHash": "0xabcdef1234567890",
"lowerBoundTimestamp": 1710000000,
"upperBoundTimestamp": 1710003600,
"maxGasLimit": "1000000",
"maxFeePerGas": "1000000000",
"chainId": 8453,
"isCleanUpUserOp": False,
"shortEncoding": True
}
],
"fundingTokens": [
{
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chainId": 1,
"amount": "1000000000"
}
]
},
"payloadToSign": [
{
"signablePayload": {
"types": {},
"message": {
"owner": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"value": "1000000000000000000000",
"nonce": "0",
"deadline": "1647857449"
},
"primaryType": "Permit",
"domain": {
"name": "USD Coin",
"version": "2",
"chainId": 1,
"verifyingContract": "0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B",
"salt": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
},
"metadata": {
"nonce": "0",
"name": "USD Coin",
"version": "2",
"domainSeparator": "0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335",
"owner": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
"spender": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"amount": "1000000000000000000000"
},
"signature": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ownerAddress: '0x1234567890abcdef1234567890abcdef12345678',
fee: {
amount: '10000000000000000',
token: '0x0000000000000000000000000000000000000000',
chainId: 8453
},
quoteType: 'permit',
quote: {
hash: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef',
node: '0x9876543210abcdef9876543210abcdef98765432',
commitment: '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',
paymentInfo: {
sender: '0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4',
initCode: '0x1234abcd',
nonce: '0',
token: '0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a',
chainId: 1,
shortEncoding: false,
tokenValue: '1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)',
tokenWeiAmount: '1000000000000000000000 (1000 ether), 250000 (0.25 USDC)',
verificationGasLimit: '21000',
eoa: '0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a',
callGasLimit: '50000',
sponsored: true,
sponsorshipUrl: 'https://sponsorship.abc.org',
tokenAmount: '1000 (1000 USDC), 1 (1 ether)',
gasFee: '21000000000000000',
orchestrationFee: '1000000000000000'
},
userOps: [
{
userOp: {
sender: '0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a',
nonce: '0',
callData: '0x1234abcd',
callGasLimit: '21000',
verificationGasLimit: '100000',
preVerificationGas: '21000',
maxFeePerGas: '1000000000',
maxPriorityFeePerGas: '100000000',
initCode: '0x1234abcd',
paymasterAndData: '0x',
signature: '0xabcdef123456'
},
userOpHash: '0x1234abcd5678ef90',
meeUserOpHash: '0xabcdef1234567890',
lowerBoundTimestamp: 1710000000,
upperBoundTimestamp: 1710003600,
maxGasLimit: '1000000',
maxFeePerGas: '1000000000',
chainId: 8453,
isCleanUpUserOp: false,
shortEncoding: true
}
],
fundingTokens: [
{
tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
chainId: 1,
amount: '1000000000'
}
]
},
payloadToSign: [
{
signablePayload: {
types: {},
message: {
owner: '0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4',
spender: '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45',
value: '1000000000000000000000',
nonce: '0',
deadline: '1647857449'
},
primaryType: 'Permit',
domain: {
name: 'USD Coin',
version: '2',
chainId: 1,
verifyingContract: '0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B',
salt: '0x0000000000000000000000000000000000000000000000000000000000000000'
}
},
metadata: {
nonce: '0',
name: 'USD Coin',
version: '2',
domainSeparator: '0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335',
owner: '0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4',
spender: '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45',
amount: '1000000000000000000000'
},
signature: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b'
}
]
})
};
fetch('https://api.biconomy.io/v1/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.biconomy.io/v1/execute",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ownerAddress' => '0x1234567890abcdef1234567890abcdef12345678',
'fee' => [
'amount' => '10000000000000000',
'token' => '0x0000000000000000000000000000000000000000',
'chainId' => 8453
],
'quoteType' => 'permit',
'quote' => [
'hash' => '0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef',
'node' => '0x9876543210abcdef9876543210abcdef98765432',
'commitment' => '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',
'paymentInfo' => [
'sender' => '0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4',
'initCode' => '0x1234abcd',
'nonce' => '0',
'token' => '0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a',
'chainId' => 1,
'shortEncoding' => false,
'tokenValue' => '1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)',
'tokenWeiAmount' => '1000000000000000000000 (1000 ether), 250000 (0.25 USDC)',
'verificationGasLimit' => '21000',
'eoa' => '0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a',
'callGasLimit' => '50000',
'sponsored' => true,
'sponsorshipUrl' => 'https://sponsorship.abc.org',
'tokenAmount' => '1000 (1000 USDC), 1 (1 ether)',
'gasFee' => '21000000000000000',
'orchestrationFee' => '1000000000000000'
],
'userOps' => [
[
'userOp' => [
'sender' => '0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a',
'nonce' => '0',
'callData' => '0x1234abcd',
'callGasLimit' => '21000',
'verificationGasLimit' => '100000',
'preVerificationGas' => '21000',
'maxFeePerGas' => '1000000000',
'maxPriorityFeePerGas' => '100000000',
'initCode' => '0x1234abcd',
'paymasterAndData' => '0x',
'signature' => '0xabcdef123456'
],
'userOpHash' => '0x1234abcd5678ef90',
'meeUserOpHash' => '0xabcdef1234567890',
'lowerBoundTimestamp' => 1710000000,
'upperBoundTimestamp' => 1710003600,
'maxGasLimit' => '1000000',
'maxFeePerGas' => '1000000000',
'chainId' => 8453,
'isCleanUpUserOp' => false,
'shortEncoding' => true
]
],
'fundingTokens' => [
[
'tokenAddress' => '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
'chainId' => 1,
'amount' => '1000000000'
]
]
],
'payloadToSign' => [
[
'signablePayload' => [
'types' => [
],
'message' => [
'owner' => '0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4',
'spender' => '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45',
'value' => '1000000000000000000000',
'nonce' => '0',
'deadline' => '1647857449'
],
'primaryType' => 'Permit',
'domain' => [
'name' => 'USD Coin',
'version' => '2',
'chainId' => 1,
'verifyingContract' => '0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B',
'salt' => '0x0000000000000000000000000000000000000000000000000000000000000000'
]
],
'metadata' => [
'nonce' => '0',
'name' => 'USD Coin',
'version' => '2',
'domainSeparator' => '0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335',
'owner' => '0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4',
'spender' => '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45',
'amount' => '1000000000000000000000'
],
'signature' => '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.biconomy.io/v1/execute"
payload := strings.NewReader("{\n \"ownerAddress\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"fee\": {\n \"amount\": \"10000000000000000\",\n \"token\": \"0x0000000000000000000000000000000000000000\",\n \"chainId\": 8453\n },\n \"quoteType\": \"permit\",\n \"quote\": {\n \"hash\": \"0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef\",\n \"node\": \"0x9876543210abcdef9876543210abcdef98765432\",\n \"commitment\": \"0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef\",\n \"paymentInfo\": {\n \"sender\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"initCode\": \"0x1234abcd\",\n \"nonce\": \"0\",\n \"token\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"chainId\": 1,\n \"shortEncoding\": false,\n \"tokenValue\": \"1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)\",\n \"tokenWeiAmount\": \"1000000000000000000000 (1000 ether), 250000 (0.25 USDC)\",\n \"verificationGasLimit\": \"21000\",\n \"eoa\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"callGasLimit\": \"50000\",\n \"sponsored\": true,\n \"sponsorshipUrl\": \"https://sponsorship.abc.org\",\n \"tokenAmount\": \"1000 (1000 USDC), 1 (1 ether)\",\n \"gasFee\": \"21000000000000000\",\n \"orchestrationFee\": \"1000000000000000\"\n },\n \"userOps\": [\n {\n \"userOp\": {\n \"sender\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"nonce\": \"0\",\n \"callData\": \"0x1234abcd\",\n \"callGasLimit\": \"21000\",\n \"verificationGasLimit\": \"100000\",\n \"preVerificationGas\": \"21000\",\n \"maxFeePerGas\": \"1000000000\",\n \"maxPriorityFeePerGas\": \"100000000\",\n \"initCode\": \"0x1234abcd\",\n \"paymasterAndData\": \"0x\",\n \"signature\": \"0xabcdef123456\"\n },\n \"userOpHash\": \"0x1234abcd5678ef90\",\n \"meeUserOpHash\": \"0xabcdef1234567890\",\n \"lowerBoundTimestamp\": 1710000000,\n \"upperBoundTimestamp\": 1710003600,\n \"maxGasLimit\": \"1000000\",\n \"maxFeePerGas\": \"1000000000\",\n \"chainId\": 8453,\n \"isCleanUpUserOp\": false,\n \"shortEncoding\": true\n }\n ],\n \"fundingTokens\": [\n {\n \"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"chainId\": 1,\n \"amount\": \"1000000000\"\n }\n ]\n },\n \"payloadToSign\": [\n {\n \"signablePayload\": {\n \"types\": {},\n \"message\": {\n \"owner\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"spender\": \"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45\",\n \"value\": \"1000000000000000000000\",\n \"nonce\": \"0\",\n \"deadline\": \"1647857449\"\n },\n \"primaryType\": \"Permit\",\n \"domain\": {\n \"name\": \"USD Coin\",\n \"version\": \"2\",\n \"chainId\": 1,\n \"verifyingContract\": \"0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B\",\n \"salt\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n }\n },\n \"metadata\": {\n \"nonce\": \"0\",\n \"name\": \"USD Coin\",\n \"version\": \"2\",\n \"domainSeparator\": \"0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335\",\n \"owner\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"spender\": \"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45\",\n \"amount\": \"1000000000000000000000\"\n },\n \"signature\": \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.biconomy.io/v1/execute")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ownerAddress\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"fee\": {\n \"amount\": \"10000000000000000\",\n \"token\": \"0x0000000000000000000000000000000000000000\",\n \"chainId\": 8453\n },\n \"quoteType\": \"permit\",\n \"quote\": {\n \"hash\": \"0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef\",\n \"node\": \"0x9876543210abcdef9876543210abcdef98765432\",\n \"commitment\": \"0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef\",\n \"paymentInfo\": {\n \"sender\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"initCode\": \"0x1234abcd\",\n \"nonce\": \"0\",\n \"token\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"chainId\": 1,\n \"shortEncoding\": false,\n \"tokenValue\": \"1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)\",\n \"tokenWeiAmount\": \"1000000000000000000000 (1000 ether), 250000 (0.25 USDC)\",\n \"verificationGasLimit\": \"21000\",\n \"eoa\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"callGasLimit\": \"50000\",\n \"sponsored\": true,\n \"sponsorshipUrl\": \"https://sponsorship.abc.org\",\n \"tokenAmount\": \"1000 (1000 USDC), 1 (1 ether)\",\n \"gasFee\": \"21000000000000000\",\n \"orchestrationFee\": \"1000000000000000\"\n },\n \"userOps\": [\n {\n \"userOp\": {\n \"sender\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"nonce\": \"0\",\n \"callData\": \"0x1234abcd\",\n \"callGasLimit\": \"21000\",\n \"verificationGasLimit\": \"100000\",\n \"preVerificationGas\": \"21000\",\n \"maxFeePerGas\": \"1000000000\",\n \"maxPriorityFeePerGas\": \"100000000\",\n \"initCode\": \"0x1234abcd\",\n \"paymasterAndData\": \"0x\",\n \"signature\": \"0xabcdef123456\"\n },\n \"userOpHash\": \"0x1234abcd5678ef90\",\n \"meeUserOpHash\": \"0xabcdef1234567890\",\n \"lowerBoundTimestamp\": 1710000000,\n \"upperBoundTimestamp\": 1710003600,\n \"maxGasLimit\": \"1000000\",\n \"maxFeePerGas\": \"1000000000\",\n \"chainId\": 8453,\n \"isCleanUpUserOp\": false,\n \"shortEncoding\": true\n }\n ],\n \"fundingTokens\": [\n {\n \"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"chainId\": 1,\n \"amount\": \"1000000000\"\n }\n ]\n },\n \"payloadToSign\": [\n {\n \"signablePayload\": {\n \"types\": {},\n \"message\": {\n \"owner\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"spender\": \"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45\",\n \"value\": \"1000000000000000000000\",\n \"nonce\": \"0\",\n \"deadline\": \"1647857449\"\n },\n \"primaryType\": \"Permit\",\n \"domain\": {\n \"name\": \"USD Coin\",\n \"version\": \"2\",\n \"chainId\": 1,\n \"verifyingContract\": \"0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B\",\n \"salt\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n }\n },\n \"metadata\": {\n \"nonce\": \"0\",\n \"name\": \"USD Coin\",\n \"version\": \"2\",\n \"domainSeparator\": \"0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335\",\n \"owner\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"spender\": \"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45\",\n \"amount\": \"1000000000000000000000\"\n },\n \"signature\": \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.biconomy.io/v1/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ownerAddress\": \"0x1234567890abcdef1234567890abcdef12345678\",\n \"fee\": {\n \"amount\": \"10000000000000000\",\n \"token\": \"0x0000000000000000000000000000000000000000\",\n \"chainId\": 8453\n },\n \"quoteType\": \"permit\",\n \"quote\": {\n \"hash\": \"0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef\",\n \"node\": \"0x9876543210abcdef9876543210abcdef98765432\",\n \"commitment\": \"0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef\",\n \"paymentInfo\": {\n \"sender\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"initCode\": \"0x1234abcd\",\n \"nonce\": \"0\",\n \"token\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"chainId\": 1,\n \"shortEncoding\": false,\n \"tokenValue\": \"1000 (for 1000 USDC), 250000 (for 1 WBTC very soon)\",\n \"tokenWeiAmount\": \"1000000000000000000000 (1000 ether), 250000 (0.25 USDC)\",\n \"verificationGasLimit\": \"21000\",\n \"eoa\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"callGasLimit\": \"50000\",\n \"sponsored\": true,\n \"sponsorshipUrl\": \"https://sponsorship.abc.org\",\n \"tokenAmount\": \"1000 (1000 USDC), 1 (1 ether)\",\n \"gasFee\": \"21000000000000000\",\n \"orchestrationFee\": \"1000000000000000\"\n },\n \"userOps\": [\n {\n \"userOp\": {\n \"sender\": \"0x00000069E0Fb590E092Dd0E36FF93ac28ff11a3a\",\n \"nonce\": \"0\",\n \"callData\": \"0x1234abcd\",\n \"callGasLimit\": \"21000\",\n \"verificationGasLimit\": \"100000\",\n \"preVerificationGas\": \"21000\",\n \"maxFeePerGas\": \"1000000000\",\n \"maxPriorityFeePerGas\": \"100000000\",\n \"initCode\": \"0x1234abcd\",\n \"paymasterAndData\": \"0x\",\n \"signature\": \"0xabcdef123456\"\n },\n \"userOpHash\": \"0x1234abcd5678ef90\",\n \"meeUserOpHash\": \"0xabcdef1234567890\",\n \"lowerBoundTimestamp\": 1710000000,\n \"upperBoundTimestamp\": 1710003600,\n \"maxGasLimit\": \"1000000\",\n \"maxFeePerGas\": \"1000000000\",\n \"chainId\": 8453,\n \"isCleanUpUserOp\": false,\n \"shortEncoding\": true\n }\n ],\n \"fundingTokens\": [\n {\n \"tokenAddress\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"chainId\": 1,\n \"amount\": \"1000000000\"\n }\n ]\n },\n \"payloadToSign\": [\n {\n \"signablePayload\": {\n \"types\": {},\n \"message\": {\n \"owner\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"spender\": \"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45\",\n \"value\": \"1000000000000000000000\",\n \"nonce\": \"0\",\n \"deadline\": \"1647857449\"\n },\n \"primaryType\": \"Permit\",\n \"domain\": {\n \"name\": \"USD Coin\",\n \"version\": \"2\",\n \"chainId\": 1,\n \"verifyingContract\": \"0xA0b86a33E6441c1a7C4FB1e50Fc5F5ED69DC3D2B\",\n \"salt\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n }\n },\n \"metadata\": {\n \"nonce\": \"0\",\n \"name\": \"USD Coin\",\n \"version\": \"2\",\n \"domainSeparator\": \"0x06c37168a7db5138defc7866392bb87a741f9b3d104deb5094588ce041cae335\",\n \"owner\": \"0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4\",\n \"spender\": \"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45\",\n \"amount\": \"1000000000000000000000\"\n },\n \"signature\": \"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1b\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"supertxHash": "0x9a72f87a93c55d8f88e3f8c2a7b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
"error": null
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"code": "<string>",
"message": "<string>",
"errors": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
]
}Authorizations
API Key required to access Supertransaction API. Example: mee_2w3mXCuyt4xVXDRCZ5k5Lhgs
Body
Body
MEE execution request with signed quote payloads
Owner wallet address which will be used as a owner of orchestrator account
"0x1234567890abcdef1234567890abcdef12345678"
Fee details: amount, token address, and chain ID.
Show child attributes
Show child attributes
Type of MEE signature: permit, onchain, simple, permit-sca, or mm-dtk.
permit, onchain, simple, permit-sca, mm-dtk "permit"
MEE network compatible quote information
Show child attributes
Show child attributes
Array of payloads with signatures for execution.
1- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Response
MEE execution response
MEE execution response
Indicates if the supertransaction execution was successful.
true
The transaction hash of the executed supertransaction, or null if not available.
"0x9a72f87a93c55d8f88e3f8c2a7b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2"
Error message if the execution failed, or null if successful.
null