Carbon Retirement

The ECO carbon retirement API simplifies interacting with on-chain carbon markets by facilitating seamless, atomic purchase and retirement of a growing number of supported carbon offset tokens.

Programmatic Retirement Lifecycle

To complete the atomic retirement of an arbitrary amount of carbon, you must implement the following programmatic lifecycle:
  1. 1.
    Parameterize the retirement request
  2. 2.
    Sign the returned data using your private key or, for example, the PRVD Vault
  3. 3.
    Broadcast the data and signature to the network for retirement


To programmatically retire carbon using the ECO API, users first create a RetireCarbonRequest.
Parameterize a retire carbon request for signature and broadcast


After creating a parameterized request that can be used to retire the specified amount of carbon, the transaction needs to be signed. We designed the API in this manner to ensure users can enable self-custody in their implementations. The signature over the transaction data returned by the parameterize request provides flexibility for (i) broadcasting the transaction and bearing the network transaction costs or (ii) leveraging the Managed Transactions API to broadcast the transaction while maintaining the ability to verify the original signer (e.g., by using ecrecover).
An integrated code sample will be provided here shortly. You can see how we leverage the PRVD Vault to sign transactions for EVM-based networks here.


This final step in the process to programmatically retire carbon enables flexibility in systems and applications that would otherwise struggle to assemble, encode and broadcast transactions to the targeted network. The broadcast API accepts the unsigned data as returned by the Parameterize call and a hex-encoded signature.
The following code demonstrates how to broadcast parameterized and signed ECO transactions:
curl -i -XPOST \
-H 'Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7fSwiZXhwIjpudWxsLCJpYXQiOjE1NTk4Nzg1NzQsImp0aSI6IjYzYTJkY2QzLWI5OTgtNDZjNC1hNzFkLTQ5MjU4YTBhYmEyMyIsInN1YiI6ImFwcGxpY2F0aW9uOmNiMjAzN2Y3LTc5ZmMtNDBmNC05NzIwLWFkYTYzNmRhNDE4MyJ9.NQLm__LbMWor-9GMG0LPcH4yQIbu9Uw70kJfRt1KP64' \
-H 'Content-Type: application/json' \ \
-d '{
"data": "a98c9625000000000000000000000000160142a70e005b47f58cde2d21ebacce86cc8781000000000000000000000000e7aa9704b3c34d6fbb179fd654ba1094fbef400200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000fb3eb192d8b83b1057a7055fee874dab343f1ee400000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000001450726f766964652053464c494748542064656d6f000000000000000000000000000000000000000000000000000000000000000000000000000000000000001450726f766964652053464c494748542064656d6f000000000000000000000000",
"signature": "32768f984f3262cc5a8cb823021e400a8e707ff53f937f14083c82430fcbe4ac213d6c1ead16be6356393ab6604263895c5cbcb156b7d4a39208cc5f54ce23c401",
"signer": "0xfB3eb192D8b83B1057a7055feE874daB343f1EE4"
The broadcast method provides guarantees around atomicity and double-spend protection, ensuring each parameterized carbon retirement request is only executed once. Subsequent attempts to broadcast the same request will fail with a 422 status code. Here is an example response to an API call attempting to retire a parameterized transaction:
"message": "retire carbon request has already been broadcast; tx hash: 584205679a00025e927fc24ef0a3a5e726017392395e7d027b3936d7e644d0ca"

Fetch Carbon Retirement

You can retrieve details related to an existing RetireCarbonRequest, including links to generated certificates and verifiable credentials, if applicable.
Note that the returned RetireCarbonRequest details will contain a non-null tx_hash and cardinality if the request has been successfully broadcast to the network for settlement. The returned cardinality represents the serial position of the completed carbon retirement for the provider for the associated beneficiary_address.
Similarly, the certificate_href and verifiable_credentials_href fields will only be included in the response if the underlying RetireCarbonRequest has been successfully retired and the provider supports those resources on the settlement network.
Last modified 15d ago