API Class Index

Index of Classes

Common API

Name Description
BaseException A base class for all Composer exceptions

BaseFileException Exception throws when a composer file is semantically invalid
BusinessNetworkCardStore Manages persistence of business network cards.
BusinessNetworkDefinition

A BusinessNetworkDefinition defines a set of Participants that exchange Assets by sending Transactions. This class manages the metadata and domain-specific types for the network as well as a set of executable scripts.

BusinessNetworkMetadata

Defines the metadata for a BusinessNeworkDefinition. This includes:

  • package.json
  • README.md (optional)

Concept

Resource is an instance that has a type. The type of the resource specifies a set of properites (which themselves have types).

Type information in Composer is used to validate the structure of Resource instances and for serialization.

Resources are used in Composer to represent Assets, Participants, Transactions and other domain classes that can be serialized for long-term persistent storage.

Factory Use the Factory to create instances of Resource: transactions, participants and assets.

IdCard An ID card. Encapsulates credentials and other information required to connect to a specific business network as a specific user.

Instances of this class can be created using IdCard.fromArchive or IdCard.fromDirectory.

Identifiable Identifiable is an entity with a namespace, type and an identifier.,This class is abstract.
IllegalModelException Exception throws when a composer file is semantically invalid
Introspector

Provides access to the structure of transactions, assets and participants.

InvalidQueryException Exception thrown for invalid queries
ParseException Exception throws when a Composer file is syntactically invalid
Relationship A Relationship is a typed pointer to an instance. I.e the relationship with namespace = 'org.acme', type = 'Vehicle' and id = 'ABC' creates a pointer that points at an instance of org.acme.Vehicle with the id ABC.
Resource

Resource is an instance that has a type. The type of the resource specifies a set of properites (which themselves have types).

Type information in Composer is used to validate the structure of Resource instances and for serialization.

Resources are used in Composer to represent Assets, Participants, Transactions and other domain classes that can be serialized for long-term persistent storage.

SecurityContext SecurityContext is used to authenticate and manage user credentials to the underlying blockchain fabric.

SecurityException Class representing a security exception

Serializer Serialize Resources instances to/from various formats for long-term storage (e.g. on the blockchain).

Typed Object is an instance with a namespace and a type.,This class is abstract.
TypeNotFoundException Error thrown when a Composer type does not exist.
ValidatedConcept

Resource is an instance that has a type. The type of the resource specifies a set of properites (which themselves have types).

Type information in Composer is used to validate the structure of Resource instances and for serialization.

Resources are used in Composer to represent Assets, Participants, Transactions and other domain classes that can be serialized for long-term persistent storage.

ValidatedResource ValidatedResource is a Resource that can validate that property changes (or the whole instance) do not violate the structure of the type information associated with the instance.
ValidationException Exception thrown when a resource fails to model against the model

Client API

Name Description
AssetRegistry The AssetRegistry is used to manage a set of assets stored on the Blockchain.

BusinessNetworkConnection Use this class to connect to and then interact with a deployed BusinessNetworkDefinition. Use the AdminConnection class in the composer-admin module to deploy BusinessNetworksDefinitions.
Historian The Historian records the history of actions taken using Composer. It is a registry that stores HistorianRecords; each record is created in response to a transaction being executred.,As well as the transactions that are defined in the Network model other actions such as adding assets are treated as transactions so are therefore recorded.,Details of these are in the system model.
IdentityRegistry The IdentityRegistry is used to store a set of identities on the blockchain.

ParticipantRegistry The ParticipantRegistry is used to manage a set of participants stored on the blockchain.

Query The Query class represents a built query. A built query has been parsed and validated. Do not attempt to create an instance of this class.
You must use the buildQuery method instead.
Registry Class representing an Abstract Registry.

TransactionRegistry The TransactionRegistry is used to store a set of transactions on the blockchain.

Admin API

Name Description
AdminConnection This class creates an administration connection to a Hyperledger Composer runtime. The connection can then be used to:
  • Deploy BusinessNetworkDefinitions
  • Undeploy BusinessNetworkDefinitions
  • Update BusinessNetworkDefinitions
  • Send a ping message to the runtime to ensure it is running and correctly configured.
  • Store a connection profile document in the connection profile store
Note: that the methods on this class take the 'businessNetworkIdentifier'; this has to match the name given on the create call. An AdminConnection that has been connected to network-A can only be used to adminster network-A.,Instances of AdminConnections can be reused for different networks. Call disconnect(..) then connect(..). Calling an api after disconnect and before connect will give an error.

Runtime API

Name Description
Api A class that contains the root of the transaction processor API. Methods in this class are made available as global functions which can be called by transaction processor functions. The transaction processor API should expose no internal properties or internal methods which could be accessed or misused.
AssetRegistry Do not attempt to create an instance of this class.
You must use the getAssetRegistry method instead.
Factory Do not attempt to create an instance of this class.
You must use the getFactory method instead.
ParticipantRegistry Do not attempt to create an instance of this class.
You must use the getParticipantRegistry method instead.
Query Do not attempt to create an instance of this class.
You must use the buildQuery method instead.
Serializer Do not attempt to create an instance of this class.
You must use the getSerializer method instead.