This guide will help you configure DCL CLI (dcld
) and interact with DCL TestNet.
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
.
-
tcp://54.73.187.91:26657
-
tcp://3.124.76.30:26657
-
tcp://34.224.48.142:26657
-
tcp://44.239.5.82:26657
These steps will configure dcld
on Ubuntu platform.
Make sure you have goLang 1.3+ installed. Ubuntu https://khongwooilee.medium.com/how-to-update-the-go-version-6065f5c8c3ec MacOS https://www.jajaldoang.com/post/how-to-update-golang
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.
$ 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.
$ ls -l ~/go/bin/dcld
$ dcld
# 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
# 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
$ dcld query compliancetest test-result --vid=2020 --pid=10 --softwareVersion=20
$ dcld query compliance certified-model --vid=2020 --pid=10 --certificationType="matter"
$ dcld query compliance all-certified-models