Create UniquID Contract

Login to organization

Navigate to directory where you saved the credentials.json file

cd /path/to/file/

You may need to re-login if the token has expired.

uniquid login --credentials-file credentials.json

Check devices

Check for the devices appear on the UniquID organization. This can be done with the following command:

uniquid list-devices

Create contract file

Create a new file called contract.json with the following content. Be sure to replace the placeholders with your own information

contract.json
[
  {
    "provider" : "tpub of the authorizer from the uniquid list-devices command",
    "user" : "tpub of the deivce from the uniquid list-devices command",
    "functions" : [32]
  }
]

The "provider" is the AWS-IOT-UNIQUID-AUTHORIZER and the "user" is the JS or C device.

Create contract

Create and deploy the contract

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

Check contract list

uniquid list-contracts --output json

Look at the log from the device and check here for published timestamps from the Device (please note that the link provided is for the us-east-2 AWS region, you may need to switch to the one you have defined on aws configure).

Last updated