Permissions Contract: SACD
Handle permissions between your app and the users
Last updated
Was this helpful?
Handle permissions between your app and the users
Last updated
Was this helpful?
DIMO Check-in
We recommend using the SACD contract via , which provides you with the most convenient path to building your application and having vehicle owners share permissions with your app.
Service Access Contract Definition (SACD), is a permission management solution for any on the DIMO Network. Designed to manage permissions for the Vehicle NFT, the contract is versatile to support other NFT assets. Permissions set will be attached to the asset, and will override any existing permissions for the same grantee.
The setPermissions
function creates a new set of permissions for a specific asset.
The hasPermissions
function checks if a grantee has permissions for a specific asset.
asset
address
The 0x
address of the asset. In the DIMO-connected vehicle case, the vehicle would be the asset
.
tokenId
uint256
The tokenId
of the targeted asset. In the DIMO-connected vehicle case, this would be the vehicle tokenId
.
grantee
address
The 0x
address of the grantee, a grantee
is the party receiving the granted permissions to the asset.
permissions
uint256
The bit array that represents the permissions
.
expiration
uint256
Unix timestamp of the expiration
to the assigned permissions.
source
string
The URI source
associated with the permissions.
Permissions are hex-encoded and when decoded to binary, you will have to read from right to left. Here's a table of common permissions:
0x3ffc
0011111111111100
1,2,3,4,5,6
0xffc
0000111111111100
1,2,3,4,5
0x3fcc
0011111111001100
1,3,4,5,6
To utilize SACD and get permissions to DIMO-connected vehicles from end users, you can take one of the following approaches:
Uses Transactions SDK under the hood, offers developers a plug-and-play experience
Provides a user-interface to handle permission sharing for end-users
Configurations are being managed by login.dimo.org
Self-managed configurations giving developers a lot more flexibilities
No user-interface
Related: View the privilege definitions .
(Preferred) Use
(Optional) Use the