Skip to content

Latest commit

 

History

History
93 lines (74 loc) · 3.28 KB

quickStartGuide.adoc

File metadata and controls

93 lines (74 loc) · 3.28 KB

Disctributed Compliance Ledger (DCL)

Quick Start Guide for CLI for testnet

This guide will help you configure DCL CLI (dcld) and interact with DCL TestNet.

DCL CLI setup

These steps will configure dcld on Ubuntu platform.

Download Pre Compiled dcld

A pre-built version of DCL for Ubuntu can be found at: https://github.com/zigbee-alliance/distributed-compliance-ledger/releases/download/{latest}/dcld, so no need to clone the repository and run 'make' command at all. Ensure to replace {latest} with the latest version of dcld.

Download DCL Source Code from repo

DCL CLI Build
$ git clone https://github.com/zigbee-alliance/distributed-compliance-ledger.git
$ cd distributed-compliance-ledger
$ make install

After successful completion of above steps, dcld should be installed.

DCL CLI Test
$ ls -l ~/go/bin/dcld
$ dcld
DCL CLI Configure
# Configure `dcld` to connect to one of the testnet nodes
$ dcld config chain-id testnet-2.0
$ dcld config output json
# Please refer to https://github.com/zigbee-alliance/distributed-compliance-ledger/blob/master/deployment/persistent_chains/testnet-2.0/testnet-2.0-csa-endpoints.md for up to date list of available nodes from CSA.
$ dcld config node https://on.test-net.dcl.csa-iot.org:26657

# Run `dcld` to connect to one of the testnet nodes
$ dcld query model get-model --vid=31 --pid=100

Create Vendor Account Steps

# First create vendor account. Remember the password and mnemonic below.
# mnemonic can be used to recover your key, therefore it is important
# to safeguard it
$ dcld keys add <vendor-name>

# Send your `address` and `pubkey` to Zigbee Alliance to be enrolled in DCL.
# Zigbee Alliance will propose your account to DCL
$ dcld tx auth propose-add-account \
--address=cosmos1pkxl6k9r4r5ng9k6upp3e4f2wt2putq652w693 \
--pubkey='{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A9v90lbd1tCtvXTKH3Fmir9wIg/cLlWU+/HSDnDYfaMm"}' \
 --roles=Vendor --from=<Zigbee Aliance Account> --vid=<vendor-id>

# 2/3rd DCL Trustees will need to approve using following txn.
$ dcld tx auth approve-add-account \
--address=cosmos1pkxl6k9r4r5ng9k6upp3e4f2wt2putq652w693 --from=<trustee-account>

# After account approval, you can submit your product information
$ dcld tx model add-model --vid=12345 --pid=675463 --deviceTypeID=1 \
--productName="CHIP Discoball" --partNumber=A1234GH
--from=cool-vendor

Check Zigbee Certification Status

$ dcld query compliance certified-model --vid=31 --pid=100 --certificationType="matter"

$ dcld query compliance all-certified-models

Download PAA Certs

$ dcld query pki all-x509-root-certs
$ dcld query pki x509-cert --subject="O=intermediate-ca,ST=some-state,C=AU" --subject-key-id=O="4E:3B:73:F4:70:4D:C2:98:D:DB:C8:5A:5F:2:3B:BF:86:25:56:2B"