Permissions Contract: SACD
Handle permissions between your app and the users
Last updated
Handle permissions between your app and the users
Last updated
Service Access Contract Definition (SACD), is a permission management solution for any ERC-721 token (NFT) 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.
Parameters | Type | Description |
---|---|---|
To utilize SACD and get permissions to DIMO-connected vehicles from end users, you can take one of the following approaches:
Use Login with DIMO
Use the Transactions SDK
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.