Skip to content

Introduction

There exists two different CLIs

  1. Protocol CLI
  2. Application CLI

Protocol CLI

The protocol CLI is a tool which allows a user to directly interact with the evm node (without the use of a CMS)

sh
git clone git@bitbucket.org:skutrondev/skc-nodeio-cli.git
cd skc-nodeio-cli
npm run clean
npm run setup
npm run dev

Once installed, you can test the installation via:

bash
skc --help

If the setup is successful, you should see the following output:

bash
skc --help
skc <command>

Commands:
  skc completion          generate completion script
  skc decryptPrivateMemo  decrypts a cipher text memo used for trade contracts and trade token transactions using privacy service
  skc did                 commands to generate, resolve and manage decentralized identifiers
  skc getMemo             retrieves memo from transaction over a trade contract/ trade token
  skc paymentCommitment   commands to create, read and manage a payment commitment contract
  skc salesOrder          sales order related commands
  skc tokenCustody        tokenCustody related commands
  skc tokenExchange       tokenExchange related commands
  skc tokenExchange1155   tokenExchange1155 related commands
  skc tradeToken          trade token related commands
  skc user                user related commands

Options:
  --help     Show help                                                                                                                                               [boolean]
  --version  Show version number

If the setup fails, try executing the following command:

bash
  nvm use v20.11.0
  npm link

Reference implementation - SKC Workflows

This repository contains scripts to demonstrate various workflows utilizing the skc-nodeio-cli. These workflows include scenarios like Supplier Early Financing (SEF), Multi-Tier Construction, Preferred Purchasing, Collateral-Backed Purchasing, Advance Payment, and Vendor Managed Inventory (VMI). Each workflow can be executed using private keys, Vault-based signing, or keys from files, with optional transaction memo encryption. To get started, users need to configure the environment by setting up an .env file with contract addresses, network RPC URLs, and optional Vault or privacy service configurations. This repository serves as a reference implementation for building blockchain-powered workflows using the skc-nodeio-cli.

sh
git clone git@bitbucket.org:skutrondev/skc-workflows.git

Application CLI

The application cli utilizes a cms for user management and signing management.

sh
git clone git@bitbucket.org:skutrondev/skc-trade-cli.git
cd skc-trade-cli
npm run clean
npm run setup
npm run dev

If the setup is successful, you should see the following output:

sh
skc-trade --help
skc-trade <command>

Commands:
  skc-trade completion         generate completion script
  skc-trade decryptMemo        uses the privacy service to decrypt a memo encrypted via the --encryptMemo flag
  skc-trade paymentCommitment  payment commitment related commands
  skc-trade salesOrder         sales order related commands
  skc-trade tokenCustody       token custody related commands
  skc-trade tokenExchange      token exchange related commands
  skc-trade tokenExchange1155  token exchange 1155 related commands
  skc-trade tradeToken         trade token related commands
  skc-trade user               user related commands

Options:
  --help       Show help                                                                                                                                             [boolean]
  --version    Show version number                                                                                                                                   [boolean]
  --configDir  config path for the user

If the setup fails, try executing the following command:

bash
  nvm use v20.11.0
  npm link

Reference Implementation

The /scripts directory contains scripts which automate user creation and workflow execution. Examples include workflows for Supplier Early Financing (SEF), Multi-Tier Construction, Preferred Purchasing, Collateral-Backed Purchasing, Advance Payment, and Vendor Managed Inventory (VMI).

Example Usage:

Preferred Purchasing Workflow:

sh
./scripts/preferred-purchasing/truck.sh <CMS-URL>

Supplier Financing (With Early Financing and Refutation):

sh
./scripts/supplier-gets-financing/without-erp/with-early-financing/with-refutation.sh <CMS-URL>