-
<constant> CLIENT
-
CLIENT indicates that an identity is acting as a client
-
<constant> HFAFFILIATIONMGR
-
HFAFFILIATIONMGR is a boolean attribute that allows an identity to manage affiliations
-
<constant> HFGENCRL
-
HFGENCRL is an attribute that allows an identity to generate a CRL
-
-
HFINTERMEDIATECA is a boolean attribute that allows an identity to enroll as an intermediate CA
-
<constant> HFREGISTRARATTRIBUTES
-
HFREGISTRARATTRIBUTES is an attribute that has a list of attributes that the registrar is allowed to register
for an identity
-
<constant> HFREGISTRARDELEGATEROLES
-
HFREGISTRARDELEGATEROLES is an attribute that allows a registrar to give the roles specified
to a registree for its 'hf.Registrar.Roles' attribute
-
<constant> HFREGISTRARROLES
-
HFREGISTRARROLES is an attribute that allows a registrar to manage identities of the specified roles
-
<constant> HFREVOKER
-
HFREVOKER is a boolean attribute that allows an identity to revoker a user and/or certificates
-
<constant> ORDERER
-
ORDERER indicates that an identity is acting as an orderer
-
<constant> PEER
-
PEER indicates that an identity is acting as a peer
-
<constant> USER
-
USER indicates that an identity is acting as a user
-
AffiliationRequest
-
Type:
Properties:
Name |
Type |
Description |
name |
string
|
Required. The affiliation path to create |
caname |
string
|
Optional. Name of the CA to send the request to within the Fabric CA server |
force |
boolean
|
Optional.
-
For create affiliation request, if any of the parent affiliations do not exist and 'force' is true,
create all parent affiliations also.
-
For delete affiliation request, if force is true and there are any child affiliations or any identities
are associated with this affiliation or child affiliations, these identities and child affiliations
will be deleted; otherwise, an error is returned.
-
For update affiliation request, if any identities are associated with this affiliation, 'force' is true
causes these identities' affiliations to be renamed; otherwise, an error is returned.
|
-
AttributeRequest
-
Type:
Properties:
Name |
Type |
Description |
name |
string
|
The name of the attribute to include in the certificate |
optional |
boolean
|
throw an error if the identity does not have the attribute |
-
Block
-
An object of a fully decoded protobuf message "Block".
A Block may contain the configuration of the channel or transactions on the channel.
A Block object will have the following object structure.
header
number -- {int}
previous_hash -- {byte[]}
data_hash -- {byte[]}
data
data -- {array}
signature -- {byte[]}
payload
header -- {Header}
data -- {ConfigEnvelope | Transaction}
metadata
metadata -- {array} #each array item has it's own layout
[0] #SIGNATURES
signatures -- {MetadataSignature[]}
[1] #LAST_CONFIG
value
index -- {number}
signatures -- {MetadataSignature[]}
[2] #TRANSACTIONS_FILTER
{int[]} #see TxValidationCode in proto/peer/transaction.proto
Type:
Examples
Get the block number:
var block_num = block.header.number;
Get the number of transactions, including the invalid transactions:
var block_num = block.data.data.length;
Get the Id of the first transaction in the block:
var tx_id = block.data.data[0].payload.header.channel_header.tx_id;
-
BroadcastResponse
-
Type:
Properties:
Name |
Type |
Description |
status |
string
|
Value is 'SUCCESS' or a descriptive error string |
info |
string
|
Optional. Additional information about the status |
-
BuildDiscoveryRequest
-
This Discovery request
is a GRPC object to be signed and sent to the Discovery service
of the Peer. The request will be based on either the proposal
or the interests parameters. This request must be signed before
sending to the peer.
Type:
Properties:
Name |
Type |
Argument |
Description |
endorsement |
Endorsement
|
<optional>
|
Optional. Include the endorsement
instance to build the discovery request based on the proposal.
This will get the discovery interest (chaincode names, collections and "no private reads")
from the endorsement instance. Use the Proposal#addCollectionInterest
to add collections to the endorsement's chaincode.
Use the Proposal#setNoPrivateReads to set the proposals "no private reads"
setting of the discovery interest.
Use the Proposal#addCollectionInterest to add chaincodes,
collections, and no private reads that will be used to get an endorsement plan
from the peer's discovery service. |
interest |
DiscoveryChaincode
|
<optional>
|
Optional. An
array of DiscoveryChaincodeInterest that have chaincodes, collections,
and "no private reads" to help the peer's discovery service calculate the
endorsement plan. |
Examples
"single chaincode"
[
{ name: "mychaincode"}
]
"chaincode to chaincode"
[
{ name: "mychaincode"}, { name: "myotherchaincode"}
]
"single chaincode with a collection"
[
{ name: "mychaincode", collectionNames: ["mycollection"] }
]
"single chaincode with a collection allowing no private data reads"
[
{ name: "mychaincode", collectionNames: ["mycollection"], noPrivateReads: true }
]
"chaincode to chaincode with a collection"
[
{ name: "mychaincode", collectionNames: ["mycollection"] },
{ name: "myotherchaincode", collectionNames: ["mycollection"] }}
]
"chaincode to chaincode with collections"
[
{ name: "mychaincode", collectionNames: ["mycollection", "myothercollection"] },
{ name: "myotherchaincode", collectionNames: ["mycollection", "myothercollection"] }}
]
-
BuildProposalRequest
-
Type:
Properties:
Name |
Type |
Argument |
Description |
fcn |
string
|
<optional>
|
Optional. The function name. May be used by
the chaincode to control the flow within the chaincode. Default 'invoke' |
args |
Array.<string>
|
<optional>
|
Optional. The arguments needed by the
chaincode execution. These should be strings or byte buffers.
These will be converted into byte buffers before building the protobuf
object to be sent to the fabric peer for endorsement. |
transientMap |
Map
|
<optional>
|
Optional. A map with the key value pairs
of the transient data. |
init |
boolean
|
<optional>
|
Optional. If this proposal should be an
chaincode initialization request. This will set the init setting in the
protobuf object sent to the peer. |
-
CAInfoResponse
-
Type:
Properties:
Name |
Type |
Description |
caName |
string
|
The name of the CA. |
caChain |
string
|
PEM-encoded certificate chain of the server's signing certificate |
issuerPublicKey |
string
|
Proto bytes of the CA's Idemix issuer public key |
issuerRevocationPublicKey |
string
|
PEM-encoded bytes of the CA's Idemix issuer
revocation public key |
version |
string
|
Version of the server |
-
ChaincodeEvent
-
Type:
Properties:
Name |
Type |
Description |
chaincode_id |
string
|
The name of chaincode that sourced this
event. |
transactionId |
string
|
The transaction ID of this event. |
status |
string
|
The transaction status of the transaction. |
eventName |
string
|
The string that is the eventName of this
event as set by the chaincode during endorsement.
stub.SetEvent(eventName, payload) |
payload |
Array.<byte>
|
Application-specific byte array that the chaincode
set when it called stub.SetEvent(eventName, payload) |
-
ChaincodeInvocationSpec
-
An endorsement proposal, which includes the name of the chaincode
to be invoked and the arguments to be passed to the chaincode.
A "ChaincodeInvocationSpec" has the following object structure.
chaincode_spec
type -- {int}
chaincode_id
path -- {string}
name -- {string}
version -- {string}
input
args -- {byte[][]}
decorations -- {map of string to byte[]}
timeout -- {int}
Type:
-
ChannelConfigGroup
-
The configuration settings that govern how the fabric should maintain
a channel are included in the blocks of the channel itself. When a block contains
the channel configuration, the channel configuration record is the only item in
the block's data array. Every block, including the configuration blocks themselves,
has a pointer to the latest configuration block, making it easy to query for the
latest channel configuration settings.
A channel configuration record will have the following object structure.
version -- {int}
mod_policy -- {string}
groups
Orderer
version -- {int}
groups
<orderer_org_name> -- {OrganizationConfigGroup}
values
ConsensusType
version -- {int}
mod_policy -- {string}
value
type -- {string}
BatchSize
version -- {int}
mod_policy -- {string}
value
max_message_count -- {int}
absolute_max_bytes -- {int}
preferred_max_bytes -- {int}
BatchTimeout
version -- {int}
mod_policy -- {string}
value
timeout -- {duration}
ChannelRestrictions
version -- {int}
mod_policy -- {string}
value
max_count -- {int}
policies
Admins
version -- {int}
mod_policy -- {string}
policy -- {ImplicitMetaPolicy}
Writers
version -- {int}
mod_policy -- {string}
policy -- {ImplicitMetaPolicy}
Readers
version -- {int}
mod_policy -- {string}
policy -- {ImplicitMetaPolicy}
BlockValidation
version -- {int}
mod_policy -- {string}
policy -- {SignaturePolicy}
Application
version -- {int}
groups
<peer_org_name> -- {OrganizationConfigGroup}
values
policies
Admins
version -- {int}
mod_policy -- {string}
policy -- {ImplicitMetaPolicy}
Writers
version -- {int}
mod_policy -- {string}
policy -- {ImplicitMetaPolicy}
Readers
version -- {int}
mod_policy -- {string}
policy -- {ImplicitMetaPolicy}
values
OrdererAddresses
version -- {int}
mod_policy -- {string}
value
addresses -- {array}
{string - host:port}
HashingAlgorithm
version -- {int}
mod_policy -- {string}
value
name -- {string}
BlockDataHashingStructure
version -- {int}
mod_policy -- {string}
value
width -- {int}
Consortium
version -- {int}
mod_policy -- {string}
value
name -- {string}
Type:
Properties:
Name |
Type |
Description |
groups.Orderer.groups.<orderer_org_name> |
OrganizationConfigGroup
|
These are the
orderer organizatoin names defined on the network |
groups.Application.groups.<peer_org_name> |
OrganizationConfigGroup
|
These are the
peer organization names defined on the network |
policy |
ImplicitMetaPolicy
|
These policies point to other policies and specify a
threshold as in "ANY", "MAJORITY" or "ALL" |
-
CommitBuildRequest
-
Type:
Properties:
Name |
Type |
Description |
endorsement |
Endorsement
|
Required. The Endorsement
that will be committed. |
-
CommitSendRequest
-
Type:
Properties:
Name |
Type |
Argument |
Description |
targets |
Array.<Committers>
|
<optional>
|
Optional. The Committers to send the endorsements.
When not included an handler must be included. |
|
ServiceHandler
|
|
[handler] - Optional. The handler to send the endorsements.
When not included, targets must be included. |
requestTimeout |
Number
|
<optional>
|
Optional. The request timeout |
-
ConfigEnvelope
-
A ConfigEnvelope contains the channel configurations data and is the
main content of a configuration block. Another type of blocks are those
that contain endorser transactions, where the main content is an array
of
Transaction.
A "ConfigEnvelope" will have the following object structure.
config
sequence -- {int}
channel_group -- {ConfigGroup}
type -- {int}
last_update
signature -- {byte[]}
payload
header -- {Header}
data -- {ConfigUpdateEnvelope}
Type:
-
ConfigUpdateEnvelope
-
An object of a protobuf message "ConfigUpdateEnvelope".
A "ConfigUpdateEnvelope" will have the following object structure.
config_update
channel_id -- {string}
read_set -- {ChannelConfigGroup}
write_set -- {ChannelConfigGroup}
type -- {int}
signatures -- {array}
signature_header -- {SignatureHeader}
signature -- {byte[]}
Type:
Properties:
Name |
Type |
Description |
config_update.read_set |
ChannelConfigGroup
|
A set of the current version numbers of all
configuration items being updated |
config_update.write_set |
ChannelConfigGroup
|
A set of all configuration items being updated. Must have a
version number one greater than the version number of the same item
in the read_set along with the new value. |
-
ConnectOptions
-
Type:
Properties:
Name |
Type |
Argument |
Description |
url |
string
|
|
The committer URL with format of 'grpc(s)://host:port'. |
pem |
string
|
|
The Endorser's TLS certificate, in PEM format,
to use with the grpcs protocol. |
clientKey |
string
|
<optional>
|
Optional. The client private key, in PEM format,
to use with the grpcs protocol and mutual TLS. When not provided, the key
assigned to this client instance will be used. |
clientCert |
string
|
|
The public certificate, in PEM format,
to use with the grpcs protocol and mutual TLS. When not provided the cert
assigned to this client instance will be used. |
requestTimeout |
Number
|
|
The timeout to use for request on this
connection. |
ssl-target-name-override |
string
|
|
Used in test environment only,
when the server certificate's hostname (in the 'CN' field) does not match
the actual host endpoint that the server process runs at, the application
can work around the client TLS verify failure by setting this property to
the value of the server certificate's hostname |
* |
string
|
|
include any grpc options. These will be passed to
the grpc service. A grpc option must have a string key and integer or
string value. |
-
ConnectOpts
-
Type:
Properties:
Name |
Type |
Argument |
Description |
protocol |
string
|
|
The protocol to use (either HTTP or HTTPS) |
hostname |
string
|
|
The hostname of the Fabric CA server endpoint |
port |
number
|
<optional>
|
The port of the Fabric CA server endpoint, Default is 7054 |
tlsOptions |
TLSOptions
|
<optional>
|
The TLS settings to use when the Fabric CA endpoint uses "https" |
caname |
string
|
<optional>
|
The optional name of the CA. Fabric-ca servers support multiple Certificate Authorities from
a single server. If omitted or null or an empty string, then the default CA is the target of requests |
-
CryptoSetting
-
Type:
Properties:
Name |
Type |
Description |
software |
boolean
|
Whether to load a software-based implementation (true) or HSM implementation (false) |
keysize |
number
|
The key size to use for the crypto suite instance. |
algorithm |
string
|
Digital signature algorithm |
hash |
string
|
'SHA2' or 'SHA3' |
-
DiscoverRequest
-
Type:
Properties:
Name |
Type |
Argument |
Description |
asLocalhost |
boolean
|
<optional>
|
Optional. When discovery is running in a
virtual environment, the host name of peers and orderers created by this
service may have to converted to localhost for connections to be established. |
requestTimeout |
number
|
<optional>
|
Optional. The request timeout |
refreshAge |
number
|
<optional>
|
Optional. The milliseconds before the
discovery results will be refreshed automatically. When the Discovery#getDiscoveryResults
is called with refresh = true and the age of the discovery results
is older then 'refreshAge' the current signed request will be sent
to the peer's discovery service.
Default: 5 minutes. |
targets |
Array.<Discoverer>
|
|
Optional. An array of Discoverer
instances. When not included the assigned discoverer will be used. The
discoverer may be assigned anytime before the DiscoveryService#send is called. |
-
DiscoveryChaincodeCall
-
Type:
Properties:
Name |
Type |
Argument |
Description |
name |
string
|
|
The name of the chaincode |
collectionNames |
Array.<string>
|
<optional>
|
The names of the related collections |
noPrivateReads |
boolean
|
<optional>
|
Indicates we do not need to read from private data |
-
DiscoveryChaincodesInterest
-
Type:
Properties:
-
Endorsement
-
An endorsement is a signature of an endorser over a proposal response. By
producing an endorsement message, an endorser implicitly "approves" that
proposal response and the actions contained therein. When enough
endorsements have been collected, a transaction can be generated out of a
set of proposal responses
An endorsement message has the following structure:
endorser
Mspid -- {string]
IdBytes -- {byte[]}
signature -- {byte[]}
Type:
-
EndorsementResponse
-
This object is the protobuf object returned from the peer when doing
an endorsement of a proposal. The following description is from the protobuf
file fabric-protos/protos/peer/proposal_response.protos
Type:
Example
// A ProposalResponse is returned from an endorser to the proposal submitter.
// The idea is that this message contains the endorser's response to the
// request of a client to perform an action over a chaincode (or more
// generically on the ledger); the response might be success/error (conveyed in
// the Response field) together with a description of the action and a
// signature over it by that endorser. If a sufficient number of distinct
// endorsers agree on the same action and produce signature to that effect, a
// transaction can be generated and sent for ordering.
message ProposalResponse {
// Version indicates message protocol version
int32 version = 1;
// Timestamp is the time that the message
// was created as defined by the sender
google.protobuf.Timestamp timestamp = 2;
// A response message indicating whether the
// endorsement of the action was successful
Response response = 4;
// The payload of response. It is the bytes of ProposalResponsePayload
bytes payload = 5;
// The endorsement of the proposal, basically
// the endorser's signature over the payload
Endorsement endorsement = 6;
}
// A response with a representation similar to an HTTP response that can
// be used within another message.
message Response {
// A status code that should follow the HTTP status codes.
int32 status = 1;
// A message associated with the response code.
string message = 2;
// A payload that can be used to include metadata with this response.
bytes payload = 3;
}
message Endorsement {
// Identity of the endorser (e.g. its certificate)
bytes endorser = 1;
// Signature of the payload included in ProposalResponse concatenated with
// the endorser's certificate; ie, sign(ProposalResponse.payload + endorser)
bytes signature = 2;
}
-
Enrollment
-
Type:
Properties:
Name |
Type |
Argument |
Description |
key |
Object
|
<optional>
|
the private key when CSR is created inline. |
certificate |
string
|
|
The enrollment certificate in base 64 encoded PEM format |
rootCertificate |
string
|
|
Base 64 encoded PEM-encoded certificate chain of the CA's signing certificate |
-
EnrollmentRequest
-
Type:
Properties:
Name |
Type |
Argument |
Description |
enrollmentID |
string
|
|
The registered ID to use for enrollment |
enrollmentSecret |
string
|
|
The secret associated with the enrollment ID |
profile |
string
|
<optional>
|
The profile name. Specify the 'tls' profile for a TLS certificate;
otherwise, an enrollment certificate is issued. |
csr |
string
|
<optional>
|
Optional. PEM-encoded PKCS#10 Certificate Signing Request. The message sent from client side to
Fabric-ca for the digital identity certificate. |
attr_reqs |
Array.<AttributeRequest>
|
<optional>
|
An array of AttributeRequest |
subject |
string
|
<optional>
|
Optional. The X509 Subject to use in generating CSR inline
(when csr is not specified). If not specified, the default subject is built on enrollmentID |
-
EnrollmentResponse
-
Type:
Properties:
Name |
Type |
Description |
enrollmentCert |
string
|
PEM-encoded X509 enrollment certificate |
caCertChain |
string
|
PEM-encoded X509 certificate chain for the issuing
certificate authority |
-
EventCallback(error, event)
-
Callback function that takes two parameters
Parameters:
Name |
Type |
Description |
error |
Error
|
The "error" will be null unless this EventService has been shutdown.
The shutdown may be caused by a network, connection error,
by a call to the "disconnect()" method
or when the fabric event service ends the connection to this EventService.
This callback will also be called with an Error when the EventService is shutdown
due to the last block being received if the service has been setup with an endBlock to be 'newest'
or a specific block number that has been seen. |
event |
EventInfo
|
The "event" will be the EventInfo object. |
-
EventInfo
-
Type:
Properties:
Name |
Type |
Argument |
Description |
eventService |
EventService
|
|
This EventService. |
blockNumber |
Long
|
|
The block number that contains this event. |
transactionId |
string
|
<optional>
|
The transaction ID of this event |
transactionStatus |
string
|
<optional>
|
The transaction status of this
event. |
endBlockReceived |
boolean
|
|
Indicates if the endBlock as
defined by the listener has been seen. |
chaincodeEvents |
Array.<ChaincodeEvent>
|
|
An array of ChaincodeEvent. |
block |
object
|
<optional>
|
The decode of the full block received |
filteredBlock |
object
|
<optional>
|
The decode of the filtered block received |
privateData |
object
|
<optional>
|
A data map of any included private data. |
-
EventRegistrationOptions
-
Type:
Properties:
Name |
Type |
Argument |
Description |
unregister |
boolean
|
|
Optional - This options setting indicates
the registration should be removed (unregister) when the event
is seen or the endBlock seen. When the application is using a timeout
to only wait a
specified amount of time for the transaction to be seen, the timeout
processing should included the manual 'unregister' of the transaction
event listener to avoid the event callbacks being called unexpectedly.
The default for this setting is different for the different types of
event listeners. For block listeners the default is false.
For transaction listeners the default is true and the
listener will be unregistered when a transaction with the id is
seen by this listener or the endBlock is seen. For chaincode listeners
the default will be false as the match filter might be intended for
many transactions rather than a specific transaction. |
startBlock |
Number
|
string
|
<optional>
|
Optional. This will have this
registered listener look for this event within the block.
Blocks that have block numbers less than the startBlock will be
ignored by this listener.
Note: This EventService must be setup to listen for blocks in this
range. |
endBlock |
Number
|
string
|
<optional>
|
Optional. This will have the
registered listener stop looking at blocks when the block number is
equal to or greater than the endBlock of this listener. The registered
listener will be unregistered if the unregister option is set to true.
Note: This EventService must be setup to listen for blocks in this
range. |
-
Headers describe basic information about a transaction record, such
as its type (configuration update, or endorser transaction, etc.),
the id of the channel it belongs to, the transaction id and so on.
The header message also contains a common field
SignatureHeader
that describes critical information about how to verify signatures.
A "Header" will have the following object structure.
channel_header
type -- {string}
version -- {int}
timestamp -- {time}
channel_id -- {string}
tx_id -- {string}
epoch -- {int}
signature_header -- {SignatureHeader}
Type:
-
HTTPEndpoint
-
Type:
Properties:
Name |
Type |
Description |
hostname |
string
|
|
port |
number
|
|
protocol |
string
|
|
-
IdentityRequest
-
Type:
Properties:
Name |
Type |
Description |
enrollmentID |
string
|
Required. The enrollment ID which uniquely identifies an identity |
affiliation |
string
|
Required. The affiliation path of the new identity |
attrs |
Array.<KeyValueAttribute>
|
Array of KeyValueAttribute attributes to assign to the user |
type |
string
|
Optional. The type of the identity (e.g. *user*, *app*, *peer*, *orderer*, etc) |
enrollmentSecret |
string
|
Optional. The enrollment secret. If not provided, a random secret is generated. |
maxEnrollments |
number
|
Optional. The maximum number of times that the secret can be used to enroll.
If 0, use the configured max_enrollments of the fabric-ca-server;
If > 0 and <= configured max enrollments of the fabric-ca-server, use max_enrollments;
If > configured max enrollments of the fabric-ca-server, error. |
caname |
string
|
Optional. Name of the CA to send the request to within the Fabric CA server |
-
-
ImplicitMetaPolicy is a policy type which depends on the hierarchical nature of the configuration
It is implicit because the rule is generate implicitly based on the number of sub policies
It is meta because it depends only on the result of other policies
When evaluated, this policy iterates over all immediate child sub-groups, retrieves the policy
of name sub_policy, evaluates the collection and applies the rule.
For example, with 4 sub-groups, and a policy name of "Readers", ImplicitMetaPolicy retrieves
each sub-group, retrieves policy "Readers" for each subgroup, evaluates it, and, in the case of ANY
1 satisfied is sufficient, ALL would require 4 signatures, and MAJORITY would require 3 signatures.
An "ImplicitMetaPolicy" will have the following object structure.
type -- IMPLICIT_META
policy
sub_policy -- {string}
rule -- ANY | ALL | MAJORITY
Type:
-
KeyValueAttribute
-
Type:
Properties:
Name |
Type |
Argument |
Description |
name |
string
|
|
The key used to reference the attribute |
value |
string
|
|
The value of the attribute |
ecert |
boolean
|
<optional>
|
Optional, A value of true indicates that this attribute
should be included in an enrollment certificate by default |
-
-
A signature over the metadata of a block, to ensure the authenticity of
the metadata that describes a Block.
signature_header {SignatureHeader}
signature -- {byte[]}
Type:
-
MspConfig
-
Type:
Properties:
Name |
Type |
Description |
id |
string
|
The identifier for this MSP, Typically the
organization name. |
name |
string
|
The name for this MSP, Typically the
organization name. To avoid confusion the name and ID should be
the same. This will be key to finding this MSP configuration. |
organizationalUnitIdentifiers |
Array.<string>
|
|
rootCerts |
Array.<string>
|
List of root certificates trusted by
this MSP. They are used upon certificate validation. |
intermediateCerts |
Array.<string>
|
List of intermediate
certificates trusted by this MSP. They are used upon certificate
validation as follows:
Validation attempts to build a path from the certificate to be
validated (which is at one end of the path) and one of the certs
in the RootCerts field (which is at the other end of the path).
If the path is longer than 2, certificates in the middle are
searched within the Intermediate Certificates pool. |
admins |
string
|
Identity denoting the administrator
of this MSP |
tlsRootCerts |
string
|
TLS root certificates
trusted by this MSP |
tlsIntermediateCerts |
string
|
TLS intermediate certificates
trusted by this MSP |
-
OrganizationConfigGroup
-
Each participating organization of the channel gets represented in a section
in the configuration block as described below. Critical information about the
organzation such as its Membership Service Provider (MSP) content and its pre-defined
policies that form the basis of the channel's access control policies (Admins, Writers
and Readers) are contained in these sections.
A organizational configuration will have the following object structure.
version -- {int}
mod_policy -- {string}
values
MSP
version -- {int}
mod_policy -- {string}
value
type -- {int}
config
name -- {string}
root_certs -- {string[]}
intermediate_certs -- {string[]}
admins -- {string[]}
revocation_list -- {string[]}
signing_identity -- {byte[]}
organizational_unit_identifiers -- {string[]}
policies
Admins
version -- {int}
mod_policy -- {string}
policy -- {SignaturePolicy}
Writers
version -- {int}
mod_policy -- {string}
policy -- {SignaturePolicy}
Readers
version -- {int}
mod_policy -- {string}
policy -- {SignaturePolicy}
Type:
-
ProcessedTransaction
-
Type:
Properties:
Name |
Type |
Description |
validationCode |
number
|
See this list
for all the defined validation codes |
transactionEnvelope |
Object
|
Encapsulates the transaction and the signature over it.
It has the following structure:
signature -- {byte[]}
payload -- {}
header -- {Header}
data -- {Transaction}
|
-
ProposalResponse
-
Type:
Properties:
Name |
Type |
Description |
errors |
Array.<Error>
|
errors returned from the endorsement |
responses |
Array.<EndorsementResponse>
|
The endorsements returned from
the endorsing peers. |
queryResults |
Array.<Buffer>
|
the results as extracted from the
endorsement EndorsementResponse from an Query endorsement
that was only a query and will not be committed. |
-
RegisterRequest
-
Type:
Properties:
Name |
Type |
Description |
enrollmentID |
string
|
ID which will be used for enrollment |
enrollmentSecret |
string
|
Optional enrollment secret to set for the registered user.
If not provided, the server will generate one. |
role |
string
|
Optional arbitrary string representing a role value for the user |
affiliation |
string
|
Affiliation with which this user will be associated,
like a company or an organization |
maxEnrollments |
number
|
The maximum number of times this user will be permitted to enroll |
attrs |
Array.<KeyValueAttribute>
|
Array of KeyValueAttribute attributes to assign to the user |
-
RegistrationOpts
-
Type:
Properties:
Name |
Type |
Argument |
Description |
startBlock |
number
|
string
|
Long
|
<optional>
|
Optional. The starting block number
for event checking. When included, the peer's event service
will be asked to start sending blocks from this block number.
This is how to resume or replay missed blocks that were added
to the ledger.
Default is the latest block on the ledger. |
endBlock |
number
|
string
|
Long
|
<optional>
|
Optional. The ending block number
for event checking.
When included, the peer's event service will be asked to stop sending blocks once this block is delivered.
This is how to replay missed blocks that were added to the ledger.
When a startBlock is not included, the endBlock must be equal to or larger than the current channel block height. |
unregister |
boolean
|
|
Optional - This options setting indicates
the registration should be removed (unregister) when the event
is seen. When the application is using a timeout to wait a
specified amount of time for the transaction to be seen, the timeout
processing should included the manual 'unregister' of the transaction
event listener to avoid the event callbacks being called unexpectedly.
The default for this setting is different for the different types of
event listeners. For block listeners the default is true, however
the event listener is assumed to have seen the final event only if
the end_block was set as a option and that end_block was seen by the
the listener. For transaction listeners the default is true and the
listener will be unregistered when a transaction with the id is
seen by this listener. For chaincode listeners the default will be
false as the match filter might be intended for many transactions
rather than a specific transaction or block as in the other listeners.
For all listeners if not set and the endBlock has been set, the listener
will be automatically unregistered. |
-
REQUEST
-
TIMEOUT The Error message string that indicates that
the request operation has timed out due to a remote node issue.
If there is an issue with the local system a 'SYSTEM TIMEOUT'
error message will be returned.
The operation will only use one timer for both types of timeouts.
The timer will start running as the operation begins. If the timer
expires before the local instance is able to make the outbound
request then 'SYSTEM TIMEOUT' error will be returned. If the local
instance is able to make the outbound request and the timer expires
before the remote node responds then the 'REQUEST TIMEOUT' is
returned. The timer is controlled by the 'requestTimeout' setting
or passed on a call that makes an outbound request
Type:
Examples
'client.setConfigSetting('requestTimeout', 3000)'
'channel.sendTranaction(request, 3000)'
-
Restriction
-
Type:
Properties:
Name |
Type |
Description |
revokedBefore |
Date
|
Include certificates that were revoked before this UTC timestamp (in RFC3339 format) in the CRL |
revokedAfter |
Date
|
Include certificates that were revoked after this UTC timestamp (in RFC3339 format) in the CRL |
expireBefore |
Date
|
Include revoked certificates that expire before this UTC timestamp (in RFC3339 format) in the CRL |
expireAfter |
Date
|
Include revoked certificates that expire after this UTC timestamp (in RFC3339 format) in the CRL |
-
SendProposalRequest
-
Type:
Properties:
Name |
Type |
Argument |
Description |
targets |
Array.<Endorser>
|
<optional>
|
Optional. The peers to send the proposal. |
|
ServiceHandler
|
|
[handler] - Optional. The handler to send the proposal. |
requestTimeout |
Number
|
<optional>
|
Optional. The request timeout |
-
ServiceResponse
-
Type:
Properties:
Name |
Type |
Description |
Success |
boolean
|
Boolean indicating if the request was successful |
Result |
Object
|
The result of this request |
Errors |
Array.<ServiceResponseMessage>
|
An array of error messages (code and message) |
Messages |
Array.<ServiceResponseMessage>
|
An array of information messages (code and message) |
-
ServiceResponseMessage
-
Type:
Properties:
Name |
Type |
Description |
code |
number
|
Integer code denoting the type of message |
message |
string
|
A more specific message |
-
An object that is part of all signatures in Hyperledger Fabric. The "creator"
field has two important pieces of information about the identity of the signer,
the organization (Mspid) that the signer belongs to, and the certificate (IdBytes).
The "nonce" field is a unique value to guard against replay attacks.
creator
Mspid -- {string}
IdBytes -- {byte[]}
nonce -- {byte[]}
Type:
-
SignaturePolicy
-
SignaturePolicy is a recursive message structure which defines a featherweight DSL for describing
policies which are more complicated than 'exactly this signature'. The NOutOf operator is sufficent
to express AND as well as OR, as well as of course N out of the following M policies.
SignedBy implies that the signature is from a valid certificate which is signed by the trusted
authority specified in the bytes. This will be the certificate itself for a self-signed certificate
and will be the CA for more traditional certificates
A "SignaturePolicy" will have the following object structure.
type -- SIGNATURE
rule
Type -- n_out_of
n_out_of
N -- {int}
rules -- {array}
Type -- signed_by
signed_by -- {int}
identities -- {array}
principal_classification -- {int}
msp_identifier -- {string}
Role -- MEMBER | ADMIN
Type:
-
StartEventRequest
-
Type:
Properties:
Name |
Type |
Argument |
Description |
targets |
Array.<Eventer>
|
|
The Eventers to send the start stream request. |
requestTimeout |
Number
|
<optional>
|
Optional. The request timeout |
-
StartRequestOptions
-
Type:
Properties:
Name |
Type |
Argument |
Description |
blockType |
string
|
<optional>
|
Optional. To indicate that the event service
on the peer will be sending full blocks, filtered blocks or private data
blocks to this EventService.
The default will be 'filtered' with 'full' for full blocks and 'private'
for blocks with private data.
Filtered blocks have the required information to provided transaction
status and chaincode event names, however no chaincode event payload.
When using the non filtered blocks (full blocks or private data) the user
will be required to have access to receive full blocks and the private data.
Registering a block listener when listening for filtered blocks may not
provide sufficient information in the blocks received. |
startBlock |
Number
|
string
|
<optional>
|
Optional. This will have the service
setup to start sending blocks back to the event hub at the block
with this number.
If the service should start with the last block this instance
has seen use the string 'last_seen'.
If the service should start with the oldest block on the
ledger use the string 'oldest'.
If the service should start with the latest block on the ledger,
use the string 'latest' or do not include a 'startBlock'.
Default is to start with the latest block on the ledger. |
endBlock |
Number
|
string
|
<optional>
|
Optional. This will have the service
setup to end sending blocks back to the event hub at the block
with this number.
If the service should end with the last block it has seen
use the string 'last_seen'.
If the service should end with the current block on the
ledger use the string 'newest'.
Default is to continue to send. |
-
SYSTEM
-
TIMEOUT The Error message string that indicates that
the request operation has timed out due to a system issue. This will
indicate that the issue is local rather than remote. If there is
an issue with the remote node a 'REQUEST TIMEOUT' error message
will be returned.
The operation will only use one timer for both types of timeouts.
The timer will start running as the operation begins. If the timer
expires before the local instance is able to make the outbound
request then 'SYSTEM TIMEOUT' error will be returned. If the local
instance is able to make the outbound request and the timer expires
before the remote node responds then the 'REQUEST TIMEOUT' is
returned. The timer is controlled by the 'requestTimeout' setting
or passed on a call that makes an outbound request
Type:
Examples
'client.setConfigSetting('requestTimeout', 3000)'
'channel.sendTranaction(request, 3000)'
-
TLSOptions
-
Type:
Properties:
Name |
Type |
Argument |
Default |
Description |
trustedRoots |
Array.<string>
|
|
|
Array of PEM-encoded trusted root certificates |
verify |
boolean
|
<optional>
|
true
|
Determines whether or not to verify the server certificate when using TLS |
-
Transaction
-
A Transaction, or "Endorser Transaction", is the result of invoking chaincodes
to collect endorsements, getting globally ordered in the context of a channel,
and getting validated by the committer peer as part of a block before finally
being formally "committed" to the ledger inside a Block. Each transaction contains
an array of "actions" representing different steps for executing a transaction,
and those steps will be processed atomically, meaning if any one step failed
then the whole transaction will be marked as rejected.
Each entry of the "actions" array contains a chaincode proposal and corresponding proposal
responses that encapsulate the endorsing peer's decisions on whether the proposal
is considered valid. Note that even if a transaction proposal(s) is considered
valid by the endorsing peers, it may still be rejected by the committers during
transaction validation. Whether a transaction as a whole is valid or not, is not
reflected in the transaction record itself, but rather recorded in a separate
field in the Block's metadata.
A "Transaction" will have the following object structure.
actions {array}
header -- {SignatureHeader}
payload
chaincode_proposal_payload
input -- {ChaincodeInvocationSpec} for a endorser transaction
action
proposal_response_payload
proposal_hash -- {byte[]}
extension
results
data_model -- {int}
ns_rwset -- {array}
namespace -- {string}
rwset
reads -- {array}
key -- {string}
version
block_num -- {number}
tx_num -- {number}
range_queries_info -- {array}
writes -- {array}
key -- {string}
is_delete -- {boolean}
value -- {string}
metadata_writes -- {array}
key -- {string}
entries -- {array}
name -- {string}
value -- {byte[]}
collection_hashed_rwset -- {array}
collection_name -- {string}
hashed_rwset
hashed_reads -- {array}
key_hash -- {byte[]}
version
block_num -- {number}
tx_num -- {number}
hashed_writes -- {array}
key_hash -- {byte[]}
is_delete -- {boolean}
value_hash -- {byte[]}
metadata_writes -- {array}
key_hash -- {byte[]}
entries -- {array}
name -- {string}
value -- {byte[]}
pvt_rwset_hash -- {byte[]}
events
chaincode_id -- {string}
tx_id -- {string}
event_name -- {string}
payload -- {byte[]}
response
status -- {int}
message -- {string}
payload -- {byte[]}
endorsements -- {Endorsement[]}
Type: