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/blob/master/deployment/persistent_chains/testnet-2.0/testnet-2.0-csa-endpoints.md for upto date node info.
These steps will configure dcld
on Ubuntu platform.
Make sure you have goLang 1.20+ 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 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.
$ 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-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
# 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
$ dcld query compliance certified-model --vid=31 --pid=100 --certificationType="matter"
$ dcld query compliance all-certified-models