Before using this API, make sure you have native meta transaction support in your smart contracts i.e., you have removed the dependency on msg.sender property from your smart contracts.
If your contracts do not support native meta transactions yet, check out How to enable native meta transactions in your smart contracts.
API lets you relay the transaction directly to your smart contract without having to pay the transaction fee by the user.
Just register your DApp on the developer dashboard, upload your smart contracts and select your methods in which you want to enable native meta transaction support
API key present on the dashboard for your DApp after DApp registration. This is specific to DApp registered.
API id corresponding to the method you want to call in your smart contract. It can be found on the dashboard under 'Manage APIs' section.
Array of all the parameters required to call the method in the same order they appear in your Smart Contract.
User client wallet public address who is supposed to be sending the transaction eg. metamask wallet address or portis wallet address.
Gas price to be set in the transaction. It can be a decimal number or hexadecimal string. If omitted current gas price from the network will be set in the transaction.
Gas limit to be set in the transaction. It can be a decimal number or hexadecimal string. If omitted web3 estimateGas method will be used to calculate the gasLimit for the transaction.
Transaction successfully sent.
"log": "Meta transaction sent to blockchain",
Required Data not found
"log": "Api does not exist",
500: Internal Server Error
Method call is invalid
"log": "Error while executing Blockchain Transactions",
"error": "Error: Invalid number of parameters for \"methodName\". Got 1 expected 0!",
--request POST 'https://api.biconomy.io/api/v2/meta-tx/native'
--header 'x-api-key: <api_key_from_dashboard>'
--header 'Content-Type: application/json'
"userAddress": "<user_public_address>", "apiId": "<api_id_from_dashboard>",
"params": [<param1>,<param2>,...... ], "gasLimit":"0xF4240", "gasPrice":"0x3D0900"