1.0.17 • Published 2 months ago

cw-basic-tooling v1.0.17

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

Description

This project includes a set of tools for testing and verifying Inter-Blockchain Communication (IBC) in Cosmos chains. It provides functionality to check block production and IBC connections between chains.

Features

  • Block Production Check: Ensures that specified Cosmos chains are producing blocks.
  • IBC Connection Check: Verifies IBC connections by initiating token transfers between chains and confirming balance changes.

Installation

git clone [Your Repository URL]
cd [Your Repository Directory]
npm install 

Usage

  • Check Cosmos Chains Block Production

    const { checkCosmosChainsBlockProduction } = require('[Your Main File]');
    // Optional: Provide a custom configuration
    checkCosmosChainsBlockProduction(customConfig).then(() => {
    console.log('Block production check complete.');
    }).catch(err => {
    console.error('Error checking block production:', err);
    });
  • Check Ibc Connection Activation

    const { checkIbcConnections } = require('[Your Main File]');
    // Optional: Provide a custom configuration
    checkIbcConnections(customConfig).then(() => {
    console.log('IBC connection check complete.');
    }).catch(err => {
    console.error('Error checking IBC connections:', err);
    });
  • Check channel status
queryChannelStates(yourTestConfig, 120)
  .then(() => console.log('Channel states queried successfully'))
  .catch(error => console.error(error));

Configuration

An example configuration is as follows:

{
  "mnemonic": "<mnemonic for cosmos wallet>",
  "chainInfos": {
    "centauri": {
      "chainName": "centauri",
      "chainPrefix": "centauri",
      "rpcEndpoint": "http://127.0.0.1:26657",
      "baseToken": "ppica",
      "channels": {
        "osmosis": {
          "channelId": 1,
          "memo": {
            "channelId": 0,
            "endChain": "centauri"
          }
        }
      }
    },
    "osmosis": {
      "chainName": "osmosis",
      "chainPrefix": "osmo",
      "rpcEndpoint": "http://127.0.0.1:38093",
      "baseToken": "uosmo",
      "channels": {
        "centauri": {
          "channelId": 0
        }
      }
    }
  }
}
1.0.17

2 months ago

1.0.16

2 months ago

1.0.15

2 months ago

1.0.14

2 months ago

1.0.13

2 months ago

1.0.11

4 months ago

1.0.12

4 months ago

1.0.9

4 months ago

1.0.8

4 months ago

1.0.10

4 months ago

1.0.7

4 months ago

1.0.6

4 months ago

1.0.5

4 months ago

1.0.4

4 months ago

1.0.3

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago