Developers: Guide
How to integrate
Quick Guide
Step 1: Access Project Data
Use api.ecotoken.earth to retrieve active projects, their details, and associated wallet addresses.
Step 2: Prepare and Send Tokens
Programmatically send tokens to the project’s blockchain wallet for the credit you wish to retire.
Step 3: Done! Retrieve Proof of Retirement
Send the Transaction Hash to the API using the "tx" parameter: api.ecotoken.earth/?tx=0x5ef73bf47311c4f92416f874f00723c48e9a2ff9e500e0245e5f15937471bda6
Detailed Guide
Step 1: Access Project & Credit Metadata
Objective
Retrieve essential information about the Regen Credit and its associated project using the EcoToken Projects API.
Access the Projects Endpoint Endpoint URL:
https://api.ecotoken.earth
Retrieve Metadata Make a GET request to the endpoint to obtain a list of active projects and their associated metadata.
Sample Response:
Select the Desired Project Identify the project you wish to support and ensure it is active (
"active": true
).Extract Wallet Information Obtain the wallet address from the project metadata for the desired blockchain.
Step 2: Execute Token Transaction
Objective
Transfer tokens (e.g., CELO, cUSD) to the project-specific wallet to retire the desired credit.
Choose Transaction Method
Direct Transfer: Use your blockchain wallet to send tokens directly to the project’s wallet.
User Interface (Optional): Utilize platforms like Regen Atlas for a streamlined process.
Prepare the Transaction
Recipient Address: Use the wallet address retrieved in Step 1.
Amount: Specify the token amount corresponding to the credits you wish to retire.
Confirm Transaction Review details carefully to ensure the recipient address and amount are correct.
Send Payment Initiate the transfer. Transaction confirmation may take a few moments, depending on network conditions.
Step 3: Obtain Proof of Retirement (Optional)
Objective
Secure verifiable proof that the Regen Credit has been successfully retired.
Retrieve Transaction Hash After transaction confirmation, obtain the unique transaction hash from your wallet.
Submit to API Endpoint Send the transaction hash to the ecoToken Retirement API. Endpoint URL:
https://api.ecotoken.earth/?tx=123
Sample Successful Response:
Sample Failed Response:
Troubleshooting Tips
Allow 3-5 seconds before retrieving a retirement hash.
isValid
is false: Likely due to network congestion. Poll the endpoint.retirementHash
is empty: If the status is "pending," poll the endpoint.usdValue
< 2: Transactions below $2 will not generate a retirement hash immediately.
Blockchain Explorers
ecoToken Scan: scan.ecotoken.earth
Regen Mintscan Explorer: mintscan.io
For assistance or inquiries, contact our support team: support@ecotoken.earth
.
Last updated