Class: Organization

Organization

The Organization class represents an organization in the target blockchain network.

new Organization(name, mspid)

Construct a Organization object
Parameters:
Name Type Description
name string The name of this organization
mspid string The mspid of this organization
Returns:
The Organization instance.
Type
Organization

Methods


addCertificateAuthority(certificateAuthority)

Add a CertificateAuthority to this organization
Parameters:
Name Type Description
certificateAuthority CertificateAuthority The CertificateAuthority instance to add to this organizations list of CertificateAuthorities

addPeer(peer)

Add a Peer to this organization
Parameters:
Name Type Description
peer Peer The peer instance to add to this organizations list of peers

getAdminCert()

Gets the admin signing certificate in PEM format for this organization.

getAdminPrivateKey()

Gets the admin private key in PEM format for this organization.

getCertificateAuthorities()

Gets the list of this CertificateAuthorities CertificateAuthority
Returns:
[] An array of CertificateAuthority objects
Type
CertificateAuthority

getMspid()

Gets the MSPID of this organization
Returns:
The mspid of this organization
Type
string

getName()

Gets the name of this organization
Returns:
The name of this organization
Type
string

getPeers()

Gets the list of this organizations Peer
Returns:
[] An array of Peer objects
Type
Peer

setAdminCert()

Sets the admin signing certificate in PEM format for this organization.

setAdminPrivateKey()

Sets the admin private key in PEM format for this organization.

toString()

return a printable representation of this object