Skip to content

Latest commit

 

History

History
105 lines (84 loc) · 3.39 KB

quickStartGuide.adoc

File metadata and controls

105 lines (84 loc) · 3.39 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.

Test Net Infrastructure

Please refer to https://github.com/zigbee-alliance/distributed-compliance-ledger/tree/master/deployment/persistent_chains/testnet for upto date node info. TestNet consists of following nodes:<ID>@IP:port are to be used with dcld.

  1. tcp://54.73.187.91:26657

  2. tcp://3.124.76.30:26657

  3. tcp://34.224.48.142:26657

  4. tcp://44.239.5.82:26657

DCL CLI setup

These steps will configure dcld on Ubuntu platform.

Download Pre Compiled dcld

A pre-built version of DCL for Ubuntu: https://github.com/zigbee-alliance/distributed-compliance-ledger/releases/download/v0.6.0/dcld, so no need to clone the repo and run make at all.

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
$ dcld config output json
# Please refer to https://github.com/zigbee-alliance/distributed-compliance-ledger/tree/master/deployment/persistent_chains/testnet for up to date list of available nodes.
$ dcld config node tcp://54.73.187.91:26657

# Run `dcld` to connect to one of the testnet nodes
$ dcld query model get-model --vid=100 --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>

# 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 TestHouse Test Status

$ dcld query compliancetest test-result --vid=2020 --pid=10 --softwareVersion=20

Check Zigbee Certification Status

$ dcld query compliance certified-model --vid=2020 --pid=10 --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"