UniquID Contract

Create a new file called contract.json with the following content. Be sure to replace the placeholders with your own information. To get the provider and user public key you can run the command

contract.json
[
    {
        "provider" : "tpubDBsq9shVfqNypSXYb5BaS4fpJ8fNXwNANbGQgPfRTgczWyPKwMhcqHMkPZ2bRLsD33im6wcgYSpFpPJui5aa7PWAe9LA4B1JmiMa7wZdsUj" ,
        "user" : "tpubDCHFveNmkUmTN3nEyg8UyEUJvtv3kj5oLfuHZ8psz95tkFxZSVyRvsf2oMZdTkKQ5Hp6cphXD9ZeyML1Xgk4JYVRKPGEuPqcLP35JtXBmwJ" ,
        "functions" : [34]
    }
]
uniquid list-devices -o json

and copy and past the xpub of the devices you are interested in. Replace "functions" with the permissions you want to allow. Below table summarises the contracts you have to deploy in this demo.

User

Provider

Functions

Meaning

Tech

ENI Utility

34

Capability

ENI Utility

Meter

29

Ownership

Create and deploy contract

After the file creation you are ready to create and deploy the contract.

uniquid create-contracts --input-json-file contract.json

Check contract list

uniquid list-contracts -o json

Last updated

Was this helpful?