description: Use Dcomm with Zeeve’s platform through our API and tools. Our documentation provides technical details on authentication, making requests and handling responses for interacting with Dcomm and the Zeeve platform.

meta:

  • name: robots content: noindex


Dcomm Staking Node Setup

NOTE Purchase a subscription before proceeding.

  1. Create a network

  2. Add an additional node

  3. Delete a node

  4. Delete a network


Create a network

This section will provide you detailed steps for creating a network of Dcomm.

On the Network Configuration page you will be able to see different configuration cards for Dcomm, which looks similar to the image provided below.

img

*NOTE: These configuration cards can be different based on your purchased subscriptions.*


You can Choose Zeeve Managed Cloud or you can use your cloud account (AWS/DO) for the infrastructure of your node.

Choose the card with the configuration you want. Clicking on the card you will be redirected to the network setup page.

  1. Network Info

    img  

    • Network Name: A name to identify your network.

    • Deployment Type: Deployment type

    • Network Type

      • Melbourne Testnet: This will deploy your network on the network testnet. you can use this for your non-production needs like testing or demonstrations.

    • Workspace: This represents the workspace in which the network will be added after the successful creation.

    Proceed further by clicking on the Next Step button after providing all the details.

  2. Cloud Configuration

    This step configures the cloud settings for your node. This step can vary based on your selection of Network configuration card

    1. Zeeve Manged Cloud

    2. Bring Your Own Cloud (BYOC)


Zeeve Managed Cloud


In the case of Managed - Cloud, select the region for the network under Select Region and provide a name to your node.

img  

  • Node Name: A name to identify your node, this field requires a unique name. Unique means that it should be unique in a network to which you are adding a node.

  • Region: It indicates the region of the cloud service. These regions are the geographic locations where your network instances are going to be hosted.

For better understanding of which region is best for you please refer the following

New York City, The US: NYC1, NYC3
San Francisco, The US: SFO2
Toronto, Canada: TOR1
London, United Kingdom: LON1
Frankfurt, Germany: FRA1
Amsterdam, the Netherlands: AMS3
Bangalore, India: BLR1


Bring Your Own Cloud


In the case of BYOC (AWS or Digital Ocean), select the region for the network by clicking on Select Region, select the Cloud account you want to use by clicking on Select Cloud Account, choose the instance type as your requirement by clicking on Select Instance Type and provide a name to your node.

img  

  • Node Name: A name to identify your node, this field requires a unique name. Unique means that it should be unique in a network to which you are adding a node.

  • Region: It indicates the region of cloud service. These regions are the geographic locations where your network instances are going to be hosted.

  • Cloud Account: It represents the cloud account that is going to be used for network creation.

  • Type of Instance: It defines the combination of CPU cores and memory. Choose the configuration which could handle loads of your network. This parameter is useful for scaling up the network. The type of Instances may vary from cloud to cloud.


  1. On clicking the Create button a pop-up window will open which ensures the successful creation of your network.

    img  

  2. On clicking the Continue button you will be redirected to the page where you can see the network you created.


Add additional node to a network

This section will guide you on how you can add an additional node to a network. As you have already created a network, follow these steps to add more nodes to the network.

  1. Visit the network detail page. Click on the Actions button on the top right, and select the Add Node option.

    img  

  2. You will be redirected to the node setup page. Fill the name for the new node, network type and deployment type will be prefilled based on the network configuration. Click on the Next button to continue.

    img  

  3. Select the instance type for the node, cloud account and region will be prefilled based on the network configuration. Click on the Create button and the node will be added. img  

NOTE For Zeeve Managed Cloud, the option for selecting the instance type will not be available as it will be selected by Zeeve.


Delete node in a network

  1. Select the network, in which you want to perform the delete node action, and click on the network card Ref.. You will get to see a page similar to the below image.

    img  

  2. Click on the delete icon present alongside the node. A pop-up window will open for the confirmation, click on the Yes button to confirm.

    img  


Delete a network

  1. Visit the network detail pageRef.. Click on the Actions button on the top right, and select the Delete Network option.

    img  

  2. A confirmation window will open, click on the Yes button to delete the network.

    img  


NOTE It will take a few minutes to delete a network.


Supported API methods

Just like any other protocol, Dcomm supports JSON RPC API call, which can be called to retrive the the information. Dcomm supports both HTTP as well as WS(WebSocket) JSON RPC methods.

HTTP

  • ACT-Chain URL - https://node_url/ext/bc/ACT/rpc.

  • AST-Chain URL - https://node_url/ext/bc/AST.

  • ATH-Chain URL - https://node_url/ext/bc/ATH.


Example

   import axios from "axios";
   
   const data = JSON.stringify({
     "jsonrpc": "2.0",
     "id": 1,
     "method": "eth_blockNumber",
     "params": []
   });
   
   const config = {
     method: 'post',
     url: 'https://node_url/ext/bc/ACT/rpc',
     headers: { 
       'Content-Type': 'application/json'
     },
     data : data
   };
   
   axios(config)
   .then(function (response) {
     console.log(JSON.stringify(response.data));
   })
   .catch(function (error) {
     console.log(error);
   });

Available HTTP methods


⚙️ dvm.buildGenesis

Given a JSON representation of this Virtual Machine’s genesis state, create the byte representation of that state.

Example: Nodejs


⚙️ dvm.getAddressTxs

Returns all transactions that change the balance of the given address. A transaction is said to change an address's balance if either is true: A UTXO that the transaction consumes was at least partially owned by the address. A UTXO that the transaction produces is at least partially owned by the address. Note: Indexing (index-transactions) must be enabled in the ACT-chain config.

Example: Nodejs


⚙️ dvm.getAllBalances

Get the balances of all assets controlled by a given address.

Example: Nodejs


⚙️ dvm.getAssetDescription

Get information about an asset.

Example: Nodejs


⚙️ dvm.getBalance

Get the balance of an asset controlled by a given address.

Example: Nodejs


⚙️ dvm.getTx

Returns the specified transaction.

Example: Nodejs


⚙️ dvm.getTxStatus

Get the status of a transaction sent to the network.

Example: Nodejs


⚙️ dvm.getUTXOs

Get the UTXOs that reference a given address.

Example: Nodejs


⚙️ health.health

Get health check on this node.

Example: Nodejs


⚙️ eth_baseFee

Get the base fee for the next block.

Example: Nodejs


⚙️ eth_blockNumber

Getting the most recent block number.

Example: Nodejs


⚙️ eth_call

Call a contract.

Example: Nodejs


⚙️ eth_chainId

Not well documented in JSON-RPC references. See instead EIP694.

Example: Nodejs


⚙️ eth_getAssetBalance

Getting an account’s non-DCM balance.

Example: Nodejs


⚙️ eth_getBalance

Getting an account’s balance.

Example: Nodejs


⚙️ eth_maxPriorityFeePerGas

Getting an account’s balance.

Example: Nodejs


⚙️ eth_getTransactionCount

Getting an account’s nonce.

Example: Nodejs


⚙️ eth_sendRawTransaction

Send a raw transaction.

Example: Nodejs


⚙️ eth_getBlockByHash

Getting a block by hash.

Example: Nodejs


⚙️ eth_getBlockByNumber

Getting a block by number.

Example: Nodejs


⚙️ eth_getTransactionByHash

Getting a transaction by hash.

Example: Nodejs


⚙️ eth_getTransactionReceipt

Getting a transaction receipt.

Example: Nodejs


⚙️ dcm.getAtomicTx

Returns the specified transaction.

Example: Nodejs


⚙️ dcm.getAtomicTxStatus

Get the status of a transaction sent to the network.

Example: Nodejs


⚙️ dcm.getUTXOs

Get the UTXOs that reference a given address.

Example: Nodejs


⚙️ net_version

Getting the network ID.

Example: Nodejs


⚙️ web3_clientVersion

Getting the current client version.

Example: Nodejs


⚙️ web3_sha3

Calculate a cryptographic hash.

Example: Nodejs


⚙️ index.getLastAccepted (AST Transactions)

Get the most recently accepted container.

Example: Nodejs


⚙️ index.getContainerByIndex (AST Transactions)

Get container by index. The first container accepted is at index 0, the second is at index 1, etc.

Example: Nodejs


⚙️ index.getContainerByID (AST Transactions)

Get container by ID.

Example: Nodejs


⚙️ index.getContainerRange (AST Transactions)

Returns containers with indices in [startIndex, startIndex+1, ... , startIndex + numToFetch - 1]. numToFetch must be in [0,1024].

Example: Nodejs


⚙️ index.getIndex (AST Transactions)

Get a container's index.

Example: Nodejs


⚙️ index.isAccepted (AST Transactions)

Returns true if the container is in this index.

Example: Nodejs


⚙️ index.getLastAccepted (AST Vertices)

Get the most recently accepted container.

Example: Nodejs


⚙️ index.getContainerByIndex (AST Vertices)

Get container by index. The first container accepted is at index 0, the second is at index 1, etc.

Example: Nodejs


⚙️ index.getContainerByID (AST Vertices)

Get container by ID.

Example: Nodejs


⚙️ index.getContainerRange (AST Vertices)

Returns containers with indices in [startIndex, startIndex+1, ... , startIndex + numToFetch - 1]. numToFetch must be in [0,1024].

Example: Nodejs


⚙️ index.getIndex (AST Vertices)

Get a container's index.

Example: Nodejs


⚙️ index.isAccepted (AST Vertices)

Returns true if the container is in this index.

Example: Nodejs


⚙️ index.getLastAccepted (ATH Blocks)

Get the most recently accepted container.

Example: Nodejs


⚙️ index.getContainerByIndex (ATH Blocks)

Get container by index. The first container accepted is at index 0, the second is at index 1, etc.

Example: Nodejs


⚙️ index.getContainerByID (ATH Blocks)

Get container by ID.

Example: Nodejs


⚙️ index.getContainerRange (ATH Blocks)

Returns containers with indices in [startIndex, startIndex+1, ... , startIndex + numToFetch - 1]. numToFetch must be in [0,1024].

Example: Nodejs


⚙️ index.getIndex (ACT Blocks)

Get a container's index.

Example: Nodejs


⚙️ index.isAccepted (ACT Blocks)

Returns true if the container is in this index.

Example: Nodejs


⚙️ index.getLastAccepted (ACT Blocks)

Get the most recently accepted container.

Example: Nodejs


⚙️ index.getContainerByIndex (ACT Blocks)

Get container by index. The first container accepted is at index 0, the second is at index 1, etc.

Example: Nodejs


⚙️ index.getContainerByID (ACT Blocks)

Get container by ID.

Example: Nodejs


⚙️ index.getContainerRange (ACT Blocks)

Returns containers with indices in [startIndex, startIndex+1, ... , startIndex + numToFetch - 1]. numToFetch must be in [0,1024].

Example: Nodejs


⚙️ index.getIndex (ATH Blocks)

Get a container's index.

Example: Nodejs


⚙️ index.isAccepted (ATH Blocks)

Returns true if the container is in this index.

Example: Nodejs


⚙️ info.getBlockchainID

Given a blockchain’s alias, get its ID.

Example: Nodejs


⚙️ info.getNetworkID

Get the ID of the network this node is participating in.

Example: Nodejs


⚙️ info.getNetworkName

Get the name of the network this node is participating in.

Example: Nodejs


⚙️ info.getNodeID

Get the id of the node is participating in.

Example: Nodejs


⚙️ info.getNodeIP

Get the IP of this node.

Example: Nodejs


⚙️ info.getNodeVersion

Get the version of this node.

Example: Nodejs


⚙️ info.isBootstrapped

Check whether a given chain is done bootstrapping.

Example: Nodejs


⚙️ info.getTxFee

Get the transaction fee of the network.

Example: Nodejs


⚙️ info.getVMs

Get the virtual machines installed on this node.

Example: Nodejs


⚙️ info.uptime

Returns the network's observed uptime of this node.

Example: Nodejs


⚙️ info.peers

Get description of peer connections.

Example: Nodejs


⚙️ authority.getBalance

Get the balance of an asset controlled by a given address.

Example: Nodejs


⚙️ authority.getBlockchains

Get all the blockchains that exist (excluding the ATH-Chain).

Example: Nodejs


⚙️ authority.getBlockchainStatus

Get the status of a blockchain.

Example: Nodejs


⚙️ authority.getCurrentSupply

Returns an upper bound on the number of DCM that exist. This is an upper bound because it does not account for burnt tokens, including transaction fees.

Example: Nodejs


⚙️ authority.getTotalStake

Get the total amount of nDCM staked on the Primary Network.

Example: Nodejs


⚙️ authority.getCurrentValidators

List the current validators of the given Subnet.

Example: Nodejs


⚙️ authority.getMaxStakeAmount

List the current validators of the given Subnet.

Example: Nodejs


⚙️ authority.getHeight

Returns the height of the last accepted block.

Example: Nodejs


⚙️ authority.getMinStake

Returns the minimum stake amount.

Example: Nodejs


⚙️ authority.getRewardUTXOs

Returns the UTXOs that were rewarded after the provided transaction's staking or delegation period ended.

Example: Nodejs


⚙️ authority.getStake

Returns the staked amount for an array of addresses.

Example: Nodejs


⚙️ authority.getTxStatus

Returns the status of a authority chain transaction.

Example: Nodejs


⚙️ authority.getPendingValidators

List the validators in the pending validator set of the specified Subnet. Each validator is not currently validating the Subnet but will in the future.

Example: Nodejs


⚙️ authority.getStakingAssetID

Retrieve an assetID for a subnet’s staking asset. Currently this always returns the Primary Network’s staking assetID.

Example: Nodejs


⚙️ authority.getSubnets

Get all the Subnets that exist.

Example: Nodejs


⚙️ authority.getTx

Returns the specified transaction.

Example: Nodejs


⚙️ authority.getTimestamp

Returns the specified transaction.

Example: Nodejs


⚙️ authority.getUTXOs

Get the UTXOs that reference a given address.

Example: Nodejs


⚙️ authority.getValidatorsAt

Get the validators and their weights of a subnet or the Primary Network at a given ATH-Chain height.

Example: Nodejs


⚙️ authority.sampleValidators

Sample validators from the specified Subnet.

Example: Nodejs


⚙️ authority.validatedBy

Get the Subnet that validates a given blockchain.

Example: Nodejs


⚙️ authority.validates

Get the IDs of the blockchains a Subnet validates.

Example: Nodejs



WebSocket

  • ACT-Chain URL - wss://node_url/ext/bc/ACT/ws.

*NOTE: As of now only Action Chain supports WS RPC methods.

Example

   import WebSocket from 'ws';
   
   const ws = new WebSocket('wss://node_url/ext/bc/ACT/ws');
   
   ws.on('open', function open() {
           console.log('connected');
   
     // NOTE : use delay to avoid missing messages from server
           setTimeout(() => {
                   const msg = {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1};
           ws.send(JSON.stringify(msg));
     }, 1000);
   });
   
   ws.on('message', function message(data) {
     console.log('received: %s', data);
   });

Available WebSocket Methods


⚙️ eth_baseFee

Get the base fee for the next block.


⚙️ eth_blockNumber

Getting the most recent block number.


⚙️ eth_call

Call a contract.


⚙️ eth_chainId

Not well documented in JSON-RPC references. See instead EIP694.


⚙️ eth_getAssetBalance

Getting an account’s non-DCM balance.


⚙️ eth_getBalance

Getting an account’s balance.


⚙️ eth_maxPriorityFeePerGas

Getting an account’s balance.


⚙️ eth_getTransactionCount

Getting an account’s nonce.


⚙️ eth_sendRawTransaction

Send a raw transaction.


⚙️ eth_getBlockByHash

Getting a block by hash.


⚙️ eth_getBlockByNumber

Getting a block by number.


⚙️ eth_getTransactionByHash

Getting a transaction by hash.


⚙️ eth_getTransactionReceipt

Getting a transaction receipt.


⚙️ dcm.getAtomicTx

Returns the specified transaction.


⚙️ dcm.getAtomicTxStatus

Get the status of a transaction sent to the network.


⚙️ dcm.getUTXOs

Get the UTXOs that reference a given address.


⚙️ net_version

Getting the network ID.


⚙️ web3_clientVersion

Getting the current client version.


⚙️ web3_sha3

Calculate a cryptographic hash.