Usage examples
1. Prepare a Transaction
pip install requestsimport requests
import json
url = "https://api.mama.io/v1/reforge/prepareReforge"
headers = {"Content-Type": "application/json"}
data = {
"sourceAmount": "100",
"sourceToken": "0x3c6af76181891a6f0f438d4d0fc1474f0e8ca9a0",
"destinationToken": "0xc61e8563d354c4870d3526361d8531d79cd5dfe3",
"destinationChainId": "0x61"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.text)npm install axiosconst axios = require('axios');
const url = "https://api.mama.io/v1/reforge/prepareReforge";
const headers = {
"Content-Type": "application/json"
};
const data = {
"sourceAmount": "100",
"sourceToken": "0x3c6af76181891a6f0f438d4d0fc1474f0e8ca9a0",
"destinationToken": "0xc61e8563d354c4870d3526361d8531d79cd5dfe3",
"destinationChainId": "0x61"
};
axios.post(url, data, { headers: headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error.response.data);
});2. Execute a Transaction Asynchronously
3. Execute a Transaction
4. Get Supported Chains and Tokens
Was this helpful?