Hyperledger Composer Identity Bind Command

Composer Identity Bind


The composer identity bind command binds an existing identity to a participant in a participant registry. See the task Binding an existing identity to a participant for a walkthrough of using this command or the API.

Syntax

$ composer identity bind
composer identity bind [options]

Options:
  --help                 Show help  [boolean]
  -v, --version          Show version number  [boolean]
  --card, -c             Name of the network card to use  [string] [required]
  --participantId, -a    The particpant to issue the new identity to  [string] [required]
  --certificateFile, -e  File containing the certificate  [string] [required]

Options

--card, -c

Name of the business network card to use. Example: admin@sample-network

--certificateFile, -e

The path a file containing the public certificate for the existing identity in PEM format.
Example: /tmp/cert.pem

--participantId, -a

The fully qualified identifier of the participant that the identity should be bound to.
Example: resource:net.biz.digitalPropertyNetwork.Person#lenny@biznet.org

Javascript API Example

const IdentityBind = require('composer-cli').Identity.Bind;

let options = {
  card: 'admin@sample-network',
  certificateFile: '/tmp/cert.pem',
  participantId: 'resource:net.biz.digitalPropertyNetwork.Person#lenny@biznet.org'
};

IdentityBind.handler(options);