Skip to content

worldsibu/fabric-helpers

Repository files navigation

forma-fabric-helpers

Some utils to perform common tasks.

npm install

A. Enroll an user

1. Create a Service Account/Identity

2. Configure this project

Go to .env and replace the values with your environment:

# Your environment's IP and port
CA_ADDRESS=https://<ip>:<port>
# Where you store/output the keys
KEYSTORE=./config
# The network profile for your network
NETWORKPROFILE=./config/networkprofile.yaml
CHANNEL=public
USERNAME=testuser

Get the CA_ADDRESS values

Go to your Network's Node Env

Nodes Environment

Find Address and port for ICA

3. Enroll the user

Then call the enroll:

# The <organization-name> can be found in your network profile in `client.organization` or in the second image above in your Nodes Environment.
$ npm run enroll -- <username> <password> <organization-name>

4. Use the cryptographic material generated

You can now copy and save these values where you need them to connect to the network.

B. Dummy invoke

Be sure you first complete the user enrollment step (A.).

Call:

npm run invoke -- <chaincodename> init

More information on Forma DOCS.

About

Some utils to perform common tasks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published