Licensing Process
Developer Notes
Double-check if you have provisioned a license prior to June 19, 2024. If so, you will need to re-provision as the contract addresses for Developer License & DIMO Credits have changed.
Developer Notes
The DIMO Developer Console covers the end-to-end licensing process, we recommend using the Console for license management.
Here, we're going to walk you through the 4 steps needed to register for a Developer License and configure it for API access.
Developer License Issuance
Step 1: Approving the Dev License to use of $DIMO
DIMO Check-in
Please ensure that your spender wallet has both $DIMO and $MATIC available. $DIMO will be spent on issuing the Developer License, and $MATIC will be spent on transaction fees.
To start issuing a Developer License, you will first need to approve the Developer License Contract (0x9A9D2E717bB005B240094ba761Ff074d392C7C85
) to be a spender of DIMO tokens in your spender wallet. To do so, you will need to call the approve
function on the DIMO Token Contract (0x...61db
) after connecting your spender wallet.
Here, the transaction should always go through even if you don't have $DIMO in your wallet. But be aware that not having enough $DIMO in your wallet will cause failed transactions in the next step.
The approve function takes in two input parameters:
Input | Type | Description |
---|---|---|
| address | The |
| uint256 | The amount of DIMO tokens you want to approve the Dev License to spend, in units of |
Developer Notes
You will need $100 worth of $DIMO to issue a license, so the approved amount should be higher than that (recommend checking the actual price). This value is subjected to change due to the volatility of $DIMO.
Getting $DCX minted by burning $DIMO is a way to beat the volatility, as the price of $DCX is pegged to fiat, you can pre-purchase $DCX with $DIMO for developer spending.
Step 2: Issue the Dev License
This is also known as Create an App
if you are familiar with how most integrations work. Once you have approved the spending and have enough $DIMO in your spender wallet, head over to the Developer License Contract (0x...7C85
) and issue the Developer License.
DIMO Check-in
licenseAlias
is something that was introduced in the June 19th (2024) update. It is an alias to your Developer License, which is a string of your choice but in bytes32 format, for example: developer-platform
is converted into 646576656C6F7065722D706C6174666F726D0000000000000000000000000000
Note that 0x
might be prepended given which converter you end up using, Polygonscan does prepend 0x
and complains if you have the wrong format of input data.
You can use an online converter for this: https://tools.deth.net/string-bytes32-conversion
There are 4 ways to issue a Developer License:
Issue in DIMO Credits ⚠️(We don't recommend using this just yet)
This function is used when you are issuing the Developer License to the account that you used for issuance in DIMO Credits.
Issue in DIMO Credits to a targeted address ⚠️(We don't recommend using this just yet)
This function is used when you are issuing the Developer License to another account other than the one that you are using to issue the license. This function spends DIMO Credits in order to perform the issuance.
This function is used when you are issuing the Developer License to the account that you used for issuance in DIMO Tokens.
Issue in DIMO Tokens to a targeted address
This function is used when you are issuing the Developer License to another account other than the one that you are using to issue the license. This function spends DIMO Tokens in order to perform the issuance.
✅ Your DIMO Developer License is granted as you trigger the issuance, sign the transaction, and when the transaction is marked as complete. A successful transaction will return a few things: tokenId
, owner
, and clientId
. The tokenId
is your public ID for your Developer License, the owner
being the holder account, and the clientId
is what you will need to obtain access to the DIMO API.
Developer License Configurations
Step 3: Configuring the Dev License
Mentioned in Authentication, you will need a set of clientId
and domain
to get started with the API access. The clientId
is obtained in Step 2: Issue the Dev License while you still need to configure the domain
on the Developer License by calling setRedirectUri
.
Set Domain (aka Redirect URI)
This function is used to configure the domain
needed for the authentication steps. With a combination of clientId
and an enabled domain
, you will be able to exchange for an access_token
to the DIMO API.
Step 4: Enable Signer(s)
Signers are essentially the trusted signer wallets to perform the wallet-based authentication flow. The Developer License (aka your app) has a clientId
and a domain
, but in order for you to authenticate and obtain a valid access_token
to the DIMO API, you will need to provide a signer wallet. By default, a Developer License that was created will not have any signer provisioned, even if you are the holder of the license.
This function is used to enable a signer on the Developer License. By indicating the tokenId
of your Developer License, and the signer's address
, the successful transaction here will grant you access to authenticate with the DIMO Auth Server.
Input | Type | Description |
---|---|---|
| uint256 | The identifer to your Developer License. |
| address | The |
DIMO Check-in
The signer process avoids any bad actors getting hold of your clientId
and domain
. Anyone that is NOT a valid signer cannot access your access_token
.
Last updated