Developer License
Last updated
Last updated
Developer Notes
The Developer License (aka license) is the on-chain smart contract that act as the proof of a registered developer. The process of obtaining a license is abstracted away by the Developer Console, but we kept this reference in case you wanted to learn more about the underlying mechanisms.
DIMO Check-in
This is the manual steps to getting a developer license and will not be managed by the Developer Console. Please ensure that your spender wallet has both $DIMO and $POL available. $DIMO will be spent on issuing the Developer License, and $POL 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 $5 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.
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.
There are 4 ways to issue a Developer License:
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
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.
Mentioned in , 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
.
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.
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
.