Members
-
<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
-
<constant> HFINTERMEDIATECA
-
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> jsSHA3
-
Implement hash primitives.
-
<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
Methods
-
bitsToBytes(arr)
-
Convert from a bitArray to bytes (refer to SJCL's codec)
Parameters:
Name Type Description arrArray.<number> a bitArray to convert from Returns:
the bytes converted from the bitArray -
bytesToBits(bytes)
-
Convert from bytes to a bitArray (refer to SJCL's codec)
Parameters:
Name Type Description bytesArray.<number> a bytes to convert from Returns:
the bitArray converted from bytes -
loadConfigGroup(config_items, versions, group, name, org, top)
-
utility method to load in a config group
Parameters:
Name Type Description config_itemsObject holder of values found in the configuration versionsObject groupObject used for recursive calls namestring used to help with the recursive calls orgstring Organizational name topbool to handle the differences in the structure of groups - See:
-
- /protos/common/configtx.proto
-
loadConfigValue()
-
utility method to load in a config value
- See:
-
- /protos/common/configtx.proto
- /protos/msp/mspconfig.proto
- /protos/orderer/configuration.proto
- /protos/peer/configuration.proto
-
package(chaincodePath, chaincodeType, devmode, metadataPath)
-
Utility function to package a chaincode. The contents will be returned as a byte array.
Parameters:
Name Type Description chaincodePathstring required - String of the path to location of the source code of the chaincode chaincodeTypestring String of the type of chaincode ['golang', 'node', 'car', 'java'] (default 'golang') devmodeboolean Set to true to use chaincode development mode metadataPathstring Optional. The path to the top-level directory containing metadata descriptors Returns:
A promise for the data as a byte array- Type
- Promise
-
toEnvelope(signature, proposal_bytes)
-
convert proposal.proto:SignedProposal to be common.proto:Envelope
Parameters:
Name Type Description signatureproposal_bytes
Type Definitions
-
AffiliationRequest
-
Type:
- Object
- 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.
Properties:
Name Type Description namestring Required. The affiliation path to create canamestring Optional. Name of the CA to send the request to within the Fabric CA server forceboolean Optional. -
AttributeRequest
-
Type:
- Object
Properties:
Name Type Description namestring The name of the attribute to include in the certificate optionalboolean 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.protoType:
- Object
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;
-
BlockchainInfo
-
Type:
- Object
Properties:
Name Type Description heightnumber How many blocks exist on the channel's ledger currentBlockHashArray.<byte> A block hash is calculated by hashing over the concatenated ASN.1 encoded bytes of: the block number, previous block hash, and current block data hash. It's the chain of the block hashs that guarantees the immutability of the ledger previousBlockHashArray.<byte> The block hash of the previous block. -
BroadcastResponse
-
Type:
- Object
Properties:
Name Type Description statusstring Value is 'SUCCESS' or a descriptive error string infostring Optional. Additional information about the status -
ChaincodeEvent
-
Type:
- Object
Properties:
Name Type Description chaincode_idstring The name of chaincode that sourced this event. tx_idstring The transaction ID of this event. event_namestring The string that is the event_name of this event as set by the chaincode during endorsement. stub.SetEvent(event_name, payload)payloadArray.<byte> Application-specific byte array that the chaincode set when it called stub.SetEvent(event_name, payload) -
ChaincodeInfo
-
Type:
- Object
Properties:
Name Type Description namestring versionstring pathstring the path as specified by the install/instantiate transaction inputstring the chaincode function upon instantiation and its arguments. This will be blank if the query is returning information about installed chaincodes. esccstring the name of the ESCC for this chaincode. This will be blank if the query is returning information about installed chaincodes. vsccstring the name of the VSCC for this chaincode. This will be blank if the query is returning information about installed chaincodes. -
ChaincodeInstallRequest
-
Type:
- Object
Properties:
Name Type Description targetsArray.<Peer> | Array.<string> Optional. An array of Peer objects or peer names where the chaincode will be installed. When excluded, the peers assigned to this client's organization will be used as defined in the common connection profile. If the 'channelNames' property is included, the target peers will be based the peers defined in the channels. chaincodePathstring Required. The path to the location of the source code of the chaincode. If the chaincode type is golang, then this path is the fully qualified package name, such as 'mycompany.com/myproject/mypackage/mychaincode' metadataPathstring Optional. The path to the top-level directory containing metadata descriptors. chaincodeIdstring Required. Name of the chaincode chaincodeVersionstring Required. Version string of the chaincode, such as 'v1' chaincodePackageArray.<byte> Optional. Byte array of the archive content for the chaincode source. The archive must have a 'src' folder containing subfolders corresponding to the 'chaincodePath' field. For instance, if the chaincodePath is 'mycompany.com/myproject/mypackage/mychaincode', then the archive must contain a folder 'src/mycompany.com/myproject/mypackage/mychaincode', where the chaincode source code resides. chaincodeTypestring Optional. Type of chaincode. One of 'golang', 'car', 'node' or 'java'. Default is 'golang'. channelNamesArray.<string> | string Optional. When no targets are provided. The loaded common connection profile will be searched for suitable target peers. Peers that are defined in the channels named by this property and in this client's organization and that are in the endorsing or chain code query role on the named channel will be selected. txIdTransactionID Optional. TransactionID object for this request. -
ChaincodeInstantiateUpgradeRequest
-
Type:
- Object
Properties:
Name Type Argument Description targetsArray.<Peer> | Array.<string> Optional. An array of endorsing Peer objects or peer names as the targets of the request. When this parameter is omitted the target list will include peers assigned to this channel instance that are in the endorsing role. chaincodeTypestring Optional. Type of chaincode. One of 'golang', 'car', 'java' or 'node'. Default is 'golang'. Note that 'java' is not yet supported. chaincodeIdstring Required. The name of the chaincode chaincodeVersionstring Required. Version string of the chaincode, such as 'v1' txIdTransactionID Required. Object with the transaction id and nonce collections-configstring Optional. The path to the collections config. More details can be found at this tutorial transientMapobject <optional>
Optional. Object with String property names and Buffer property values that can be used by the chaincode but not saved in the ledger. Data such as cryptographic information for encryption can be passed to the chaincode using this technique. Data that is to be kept in a private data store (a collection) should be passed to the chaincode in the transientMap. fcnstring Optional. The function name to be returned when calling stub.GetFunctionAndParameters()in the target chaincode. Default is 'init'; to pass in no function name, explicitly pass in fcn with a value of null or '' (empty string).argsArray.<string> Optional. Array of string arguments to pass to the function identified by the fcnvalue.endorsement-policyObject Optional. EndorsementPolicy object for this chaincode (see examples below). If not specified, a default policy of "a signature by any member from any of the organizations corresponding to the array of member service providers" is used. WARNING: The default policy is NOT recommended for production, because this allows an application to bypass the proposal endorsement and send a manually constructed transaction, with arbitrary output in the write set, to the orderer directly. The user context assigned to the client instance that creates the signature will allow the transaction to be successfully validated and committed to the ledger. Examples
Endorsement policy: "Signed by any member from one of the organizations"
{ identities: [ { role: { name: "member", mspId: "org1" }}, { role: { name: "member", mspId: "org2" }} ], policy: { "1-of": [{ "signed-by": 0 }, { "signed-by": 1 }] } }Endorsement policy: "Signed by admin of the ordererOrg and any member from one of the peer organizations"
{ identities: [ { role: { name: "member", mspId: "peerOrg1" }}, { role: { name: "member", mspId: "peerOrg2" }}, { role: { name: "admin", mspId: "ordererOrg" }} ], policy: { "2-of": [ { "signed-by": 2}, { "1-of": [{ "signed-by": 0 }, { "signed-by": 1 }]} ] } } -
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:
- Object
-
ChaincodeInvokeRequest
-
This object contains many properties that will be used by the Discovery service.
Type:
- Object
Properties:
Name Type Argument Description targetsArray.<Peer> | Array.<string> Optional. The peers that will receive this request, when not provided the list of peers added to this channel object will be used. When this channel has been initialized using the discovery service the proposal will be sent to the peers on the list provided discovery service if no targets are specified. chaincodeIdstring Required. The id of the chaincode to process the transaction proposal endorsement_hintDiscoveryChaincodeIntereset Optional. A of DiscoveryChaincodeInterest object that will be used by discovery service to calculate an appropriate endorsement plan. The parameter is only required when the endorsement will be preformed by a chaincode that will call other chaincodes or if the endorsement should be made by only peers within a collection or collections. txIdTransactionID Optional. TransactionID object with the transaction id and nonce. txId is required for sendTransactionProposal and optional for generateUnsignedProposal transientMapobject <optional>
Optional. Object with String property names and Buffer property values that can be used by the chaincode but not saved in the ledger. Data such as cryptographic information for encryption can be passed to the chaincode using this technique. Data that is to be kept in a private data store (a collection) should be passed to the chaincode in the transientMap. fcnstring Optional. The function name to be returned when calling stub.GetFunctionAndParameters()in the target chaincode. Default is 'invoke'argsArray.<string> An array of string arguments specific to the chaincode's 'Invoke' method requiredArray.<string> Optional. An array of strings that represent the names of peers that are required for the endorsement. These will be the only peers which the proposal will be sent. This list only applies to endorsements using the discovery service. This property is used by the DiscoveryEndorsementHandler. ignoreArray.<string> Optional. An array of strings that represent the names of peers that should be ignored by the endorsement. This list only applies to endorsements using the discovery service. This property is used by the DiscoveryEndorsementHandler. preferredArray.<string> Optional. An array of strings that represent the names of peers that should be given priority by the endorsement. Priority means that these peers will be chosen first for endorsements when an endorsement plan has more peers in a group then needed to satisfy the endorsement policy. This list only applies to endorsements using the discovery service. This property is used by the DiscoveryEndorsementHandler. requiredOrgsArray.<string> Optional. An array of strings that represent the names of an organization's MSP id that are required for the endorsement. Only peers in these organizations will be sent the proposal. This list only applies to endorsements using the discovery service. This property is used by the DiscoveryEndorsementHandler. ignoreOrgsArray.<string> Optional. An array of strings that represent the names of an organization's MSP id that should be ignored by the endorsement. This list only applies to endorsements using the discovery service. This property is used by the DiscoveryEndorsementHandler. preferredOrgsArray.<string> Optional. An array of strings that represent the names of an organization's MSP id that should be given priority by the endorsement. Peers within an organization may have their ledger height considered using the optional property preferredHeightGap before being added to the priority list. This list only applies to endorsements using the discovery service. This property is used by the DiscoveryEndorsementHandler. preferredHeightGapNumber Optional. An integer representing the maximum difference in the block height of a peer and the highest block height found in a group of peers within an endorsement plan allowed to be a preferred peer. A peer will not be given priority if it's block height is less than the highest block height by an amount greater than this value. There is no default, if this value is not provided the block height of the peer will not be considered when being added to the preferred list. This list only applies to endorsements using the discovery service. This property is used by the DiscoveryEndorsementHandler. sortstring Optional. A string value that indicates how the peers within groups should be chosen. "ledgerHeight", sort the peers descending by the number of blocks on the channel ledger. "random", pull the peers randomly from the list, the preferred will be pulled first. The default will be to sort by ledger height. -
ChaincodeQueryRequest
-
Type:
- Object
Properties:
Name Type Description targetsArray.<Peer> Optional. The peers that will receive this request, when not provided the list of peers added to this channel object will be used. chaincodeIdstring Required. The id of the chaincode to process the transaction proposal transientMapobject Optional. Object with String property names and Buffer property values that can be used by the chaincode but not saved in the ledger. Data such as cryptographic information for encryption can be passed to the chaincode using this technique. Data that is to be kept in a private data store (a collection) should be passed to the chaincode in the transientMap. fcnstring Optional. The function name to be returned when calling stub.GetFunctionAndParameters()in the target chaincode. Default is 'invoke'argsArray.<string> An array of string arguments specific to the chaincode's 'Invoke' method request_timeoutinteger The timeout value to use for this request txIdTransactionID Optional. Transaction ID to use for the query. -
ChaincodeQueryResponse
-
Type:
- Object
Properties:
Name Type Description chaincodesArray.<ChaincodeInfo> -
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:
- Object
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 policyImplicitMetaPolicy These policies point to other policies and specify a threshold as in "ANY", "MAJORITY" or "ALL" -
ChannelInfo
-
Type:
- Object
Properties:
Name Type Description channel_idstring -
ChannelPeerRoles
-
Type:
- Object
Properties:
Name Type Description endorsingPeerboolean Optional. This peer may be sent transaction proposals for endorsements. The peer must have the chaincode installed. The app can also use this property to decide which peers to send the chaincode install request. Default: true chaincodeQueryboolean Optional. This peer may be sent transaction proposals meant only as a query. The peer must have the chaincode installed. The app can also use this property to decide which peers to send the chaincode install request. Default: true ledgerQueryboolean Optional. This peer may be sent query proposals that do not require chaincodes, like queryBlock(), queryTransaction(), etc. Default: true eventSourceboolean Optional. This peer may be the target of a event listener registration? All peers can produce events, but the appliatiion typically only needs to connect to one. Default: true discoverboolean Optional. This peer may be the target of service discovery. Default: true -
ChannelQueryResponse
-
Type:
- Object
Properties:
Name Type Description channelsArray.<ChannelInfo> -
ChannelRequest
-
Type:
- Object
Properties:
Name Type Description namestring Required. The name of the new channel ordererOrderer | string Required. An Orderer object or an orderer name representing the orderer node to send the channel create request envelopeArray.<byte> Optional. Bytes of the envelope object containing all required settings and signatures to initialize this channel. This envelope would have been created by the command line tool configtxgen or configtxlator configArray.<byte> Optional. Protobuf ConfigUpdate object extracted from a ConfigEnvelope created by the configtxgen tool. See extractChannelConfig(). The ConfigUpdate object may also be created by the configtxlator tool. signaturesArray.<ConfigSignature> | Array.<string> Required. The list of signatures required by the channel creation or update policy when using the `config` parameter. txIdTransactionID Required. TransactionID object with the transaction id and nonce -
collectionConfig
-
Type:
- Object
Properties:
Name Type Description namestring policymaxPeerCountnumber integer requiredPeerCountnumber integer blockToLiveLong | number | string | Object param will be converted to unsigned int64 as Long memberOnlyReadboolean denotes whether only collection member clients can read the private data -
CollectionQueryOptions
-
Type:
- Object
Properties:
Name Type Description chaincodeIdstring Required. Name of the chaincode targetstring | Peer Optional. The peer that will receive this request, when not provided the first peer in this channel object will be used. -
CollectionQueryResponse
-
Type:
- Object
Properties:
Name Type Description typestring The collection type namestring the name of the collection inside the denoted chaincode required_peer_countnumber The minimum number of peers private data will be sent to upon endorsement. The endorsement would fail if dissemination to at least this number of peers is not achieved. maximum_peer_countnumber The maximum number of peers that private data will be sent to upon endorsement. This number has to be bigger than required_peer_count. block_to_livenumber The number of blocks after which the collection data expires. For instance if the value is set to 10, a key last modified by block number 100 will be purged at block number 111. A zero value is treated same as MaxUint64, where the data will not be purged. member_read_onlyboolean The member only read access denotes whether only collection member clients can read the private data (if set to true), or even non members can read the data (if set to false, for example if you want to implement more granular access logic in the chaincode) policyPolicy The "member_orgs_policy" policy -
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:
- Object
-
ConfigSignature
-
Type:
- Object
Properties:
Name Type Description signature_headerArray.<byte> Encoded bytes of a SignatureHeader signatureArray.<byte> Encoded bytes of the signature over the concatenation of the signatureHeader bytes and config bytes -
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:
- Object
Properties:
Name Type Description config_update.read_setChannelConfigGroup A set of the current version numbers of all configuration items being updated config_update.write_setChannelConfigGroup 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. -
ConnectionOpts
-
Type:
- Object
Properties:
Name Type Description namestring Optional. To gives this remote endpoint a name. The endpoint will be known by its URL if no name is provided. request-timeoutnumber An integer value in milliseconds to be used as maximum amount of time to wait on the request to respond. pemstring The certificate file, in PEM format, to use with the gRPC protocol (that is, with TransportCredentials). Required when using the grpcs protocol. ssl-target-name-overridestring 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 <any>any any other standard grpc call options will be passed to the grpc service calls directly -
ConnectOptions
-
Type:
- Object
Properties:
Name Type Description full_blockboolean Optional. To indicate that the connection with the peer will be sending full blocks or filtered blocks to this ChannelEventHub. The default will be to establish a connection using filtered blocks. Filtered blocks have the required information to provided transaction status and chaincode events (no payload). When using the non filtered blocks (full blocks) the user will be required to have access to establish the connection to receive full blocks. Registering a block listener on a filtered block connection may not provide sufficient information. startBlockNumber | string Optional. This will have the connection setup to start sending blocks back to the event hub at the block with this number. If connecting with a a startBlock then event listeners may not be registered with a startBlock or endBlock. If the event hub should start with the last block it has seen use the string 'last_seen'. If the event hub should start with the oldest block on the ledger use the string 'oldest'. If the event hub should start with the latest block on the ledger, use the string 'latest' or do use a startBlock. Default is to start with the latest block on the ledger. endBlockNumber | string Optional. This will have the connection setup to end sending blocks back to the event hub at the block with this number. If connecting with a a endBlock then event listeners may not be registered with a startBlock or endBlock. If the event hub should end with the last block it has seen use the string 'last_seen'. If the event hub should end with the current block on the ledger use the string 'newest'. Default is to not stop sending. signedEventSignedEvent Optional. The signed event to be sent to the peer. This option is useful when the fabric-client application does not have the user's privateKey and can not sign requests to the fabric network. targetPeer | string Optional. The peer that provides the fabric event service. When using a string, the Channel must have a peer assigned with that name. This peer will replace the current peer endpoint of this channel event hub. as_arrayboolean Optional. Only used with chaincode code events to indicate that all chaincode events found in a block should be sent as an array to the callback rather than the default one at a time. -
CouchDBOpts
-
Type:
- Object
Properties:
Name Type Description urlstring The CouchDB instance url, in the form of http(s):// : @host:port namestring Optional. Identifies the name of the database to use. Default: member_db. -
CryptoContent
-
Type:
- Object
Properties:
Name Type Description privateKeystring the PEM file path for the private key privateKeyPEMstring the PEM string for the private key (not required if privateKey or privateKeyObj is set) privateKeyObjmodule:api.Key private key object (not required if privateKey or privateKeyPEM is set) signedCertstring the PEM file path for the certificate signedCertPEMstring the PEM string for the certificate (not required if signedCert is set) -
CryptoSetting
-
Type:
- Object
Properties:
Name Type Description softwareboolean Whether to load a software-based implementation (true) or HSM implementation (false) default is true (for software based implementation), specific implementation module is specified in the setting 'crypto-suite-software' keysizenumber The key size to use for the crypto suite instance. default is value of the setting 'crypto-keysize' algorithmstring Digital signature algorithm, currently supporting ECDSA only with value 'EC' hashstring 'SHA2' or 'SHA3' -
DiscoveryChaincodeCall
-
Type:
- Object
Properties:
Name Type Description namestring The name of the chaincode collection_namesArray.<string> The names of the related collections Examples
"single chaincode"
{ name: "mychaincode"}"chaincode to chaincode"
[ { name: "mychaincode"}, { name: "myotherchaincode"} ]"single chaincode with a collection"
{ name: "mychaincode", collection_names: ["mycollection"] }"chaincode to chaincode with a collection"
[ { name: "mychaincode", collection_names: ["mycollection"] }, { name: "myotherchaincode", collection_names: ["mycollection"] }} ]"chaincode to chaincode with collections"
[ { name: "mychaincode", collection_names: ["mycollection", "myothercollection"] }, { name: "myotherchaincode", collection_names: ["mycollection", "myothercollection"] }} ] -
DiscoveryChaincodeInterest
-
Type:
- Object
Properties:
Name Type Description chaincodesArray.<DiscoveryChaincodeCall> The chaincodes names and collections that will be sent to the discovery service to calculate an endorsement plan. -
DiscoveryChaincodeQuery
-
Requests DiscoveryResults for a given list invocations. Each interest is a separate invocation of one or more chaincodes, which may include invocation on collections. The endorsement policy is evaluated independantly for each given interest.
Type:
- Object
Properties:
Name Type Description interestsArray.<DiscoveryChaincodeInterest> defines interests in an invocations of chaincodes Examples
"chaincode and no collection"
{ interests: [ { chaincodes: [{ name: "mychaincode"}]} ] }"chaincode with collection"
{ interests: [ { chaincodes: [{ name: "mychaincode", collection_names: ["mycollection"] }]} ] }"chaincode to chaincode with collection"
{ interests: [ { chaincodes: [ { name: "mychaincode", collection_names: ["mycollection"] }}, { name: "myotherchaincode", collection_names: ["mycollection"] }} ] } ] }"query for multiple invocations"
{ interests: [ { chaincodes: [ { name: "mychaincode", collection_names: ["mycollection"] }}, { name: "myotherchaincode", collection_names: ["mycollection"] }} ] }, { chaincodes: [{ name: "mychaincode", collection_names: ["mycollection"] }]}, { chaincodes: [{ name: "mychaincode"}]} ] } -
DiscoveryResultChaincode
-
Type:
- Object
Properties:
Name Type Description namestring versionstring -
DiscoveryResultEndorsementGroup
-
Type:
- Object
Properties:
Name Type Description peersArray.<DiscoveryResultPeer> the peers in this group -
DiscoveryResultEndorsementLayout
-
lists the group names, and the amount of signatures needed from each group.
Type:
- Object.<string, number>
-
DiscoveryResultEndorsementPlan
-
Type:
- Object
Properties:
Name Type Description chaincodestring The chaincode name that is the first chaincode in the interest that was used to calculate this plan. plan_idstring The string of the JSON object that represents the hint that was used to build the query for this result. The hint is a DiscoveryChaincodeInterest that contains chaincode names and collections that the discovery service uses to calculate the returned plan. groupsObject.<string, DiscoveryResultEndorsementGroup> Specifies the endorsers, separated to groups. layoutsArray.<DiscoveryResultEndorsementLayout> Specifies options of fulfulling the endorsement policy -
DiscoveryResultEndpoint
-
Type:
- Object
Properties:
Name Type Description hoststring portnumber namestring Optional. the name of this endpoint -
DiscoveryResultEndpoints
-
Type:
- Object
Properties:
Name Type Description endpointsArray.<DiscoveryResultEndpoint> -
DiscoveryResultMSPConfig
-
Type:
- Object
Properties:
Name Type Description rootCertsstring List of root certificates trusted by this MSP. They are used upon certificate validation. intermediateCertsstring 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 IntermediateCerts pool. adminsstring Identity denoting the administrator of this MSP idstring the identifier of the MSP orgsArray.<string> fabric organizational unit identifiers that belong to this MSP configuration tls_root_certsstring TLS root certificates trusted by this MSP tls_intermediate_certsstring TLS intermediate certificates trusted by this MSP -
DiscoveryResultPeer
-
Type:
- Object
Properties:
Name Type Description mspidstring endpointstring host:port for this peer ledger_heightLong namestring chaincodesArray.<DiscoveryResultChaincode> -
DiscoveryResultPeers
-
Type:
- Object
Properties:
Name Type Description peersArray.<DiscoveryResultPeer> -
DiscoveryResults
-
Type:
- Object
Properties:
Name Type Description mspsObject.<string, DiscoveryResultMSPConfig> Optional. The msp config found. orderersObject.<string, DiscoveryResultEndpoints> Optional. The orderers found. peers_by_orgObject.<string, DiscoveryResultPeers> Optional. The peers by org found. endorsement_plansArray.<DiscoveryResultEndorsementPlan> Optional. timestampnumber The timestamp at which the discovery results are updated. -
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:
- Object
-
Enrollment
-
Type:
- Object
Properties:
Name Type Description keyObject the private key certificatestring The enrollment certificate in base 64 encoded PEM format rootCertificatestring Base 64 encoded PEM-encoded certificate chain of the CA's signing certificate -
EnrollmentRequest
-
Type:
- Object
Properties:
Name Type Description enrollmentIDstring The registered ID to use for enrollment enrollmentSecretstring The secret associated with the enrollment ID profilestring The profile name. Specify the 'tls' profile for a TLS certificate; otherwise, an enrollment certificate is issued. csrstring Optional. PEM-encoded PKCS#10 Certificate Signing Request. The message sent from client side to Fabric-ca for the digital identity certificate. attr_reqsArray.<AttributeRequest> An array of AttributeRequest -
EnrollmentResponse
-
Type:
- Object
Properties:
Name Type Description enrollmentCertstring PEM-encoded X509 enrollment certificate caCertChainstring PEM-encoded X509 certificate chain for the issuing certificate authority -
EventCount
-
Type:
- Object
Properties:
Name Type Description successNumber Number of successful events received. failNumber Number of errors received. expectedNumber Number of event hubs for which response events (or errors) are expected. -
EventHubRegistrationRequest
-
Type:
- Object
Properties:
Name Type Description identityIdentity the identity who is doing this registration txIdTransactionID a transaction id for this registration certificatestring The certificate file, in PEM format mspIdstring The member service provider Id used to process the identity -
Header
-
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:
- Object
-
HTTPEndpoint
-
Type:
- Object
Properties:
Name Type Description hostnamestring portnumber protocolstring -
Identity
-
Type:
- Object
Properties:
Name Type Description roleRole Any identity of a particular role OrganizationUnitAny identities belonging to an organization unit per certificate chain of trust IdentityA specific identity -
IdentityRequest
-
Type:
- Object
Properties:
Name Type Description enrollmentIDstring Required. The enrollment ID which uniquely identifies an identity affiliationstring Required. The affiliation path of the new identity attrsArray.<KeyValueAttribute> Array of KeyValueAttribute attributes to assign to the user typestring Optional. The type of the identity (e.g. *user*, *app*, *peer*, *orderer*, etc) enrollmentSecretstring Optional. The enrollment secret. If not provided, a random secret is generated. maxEnrollmentsnumber 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. canamestring Optional. Name of the CA to send the request to within the Fabric CA server -
ImplicitMetaPolicy
-
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 | MAJORITYType:
- Object
-
InitializeRequest
-
Type:
- Object
Properties:
Name Type Description targetstring | Peer | ChannelPeer Optional. The target peer to be used to make the initialization requests for configuration information. When used with `targets` parameter, the peer referenced here will be added to the `targets` array. Default is to use the first ChannelPeer assigned to this channel. targetsArray.<(Peer|ChannelPeer)> Optional. The target peers to be used to make the initialization requests for configuration information. When used with `target` parameter, the peer referenced there will be added to the `targets` array. Default is to use the first ChannelPeer assigned to this channel. discoverboolean Optional. Use the discovery service on the the target peer to load the configuration and network information. Default is false. When false, the target peer will use the Peer query to load only the configuration information. endorsementHandlerstring Optional. The path to a custom endorsement handler implementing EndorsementHandler. commitHandlerstring Optional. The path to a custom commit handler implementing CommitHandler. asLocalhostboolean Optional. Convert discovered host addresses to be 'localhost'. Will be needed when running a docker composed fabric network on the local system; otherwise should be disabled. Defaults to true. configUpdateArray.<byte> Optional. To initialize this channel with a serialized ConfigUpdate protobuf object. -
JoinChannelRequest
-
Type:
- Object
Properties:
Name Type Description targetsArray.<Peer> | Array.<string> Optional. An array of Peer objects or Peer names that will be asked to join this channel. When using Peer names or left empty (use default targets) there must be a loaded network configuration. See loadFromConfig() blockArray.<byte> The encoded bytes of the channel's genesis block. See getGenesisBlock() method txIdTransactionID Required. TransactionID object with the transaction id and nonce -
KeyValueAttribute
-
Type:
- Object
Properties:
Name Type Description namestring The key used to reference the attribute valuestring The value of the attribute ecertboolean Optional, A value of true indicates that this attribute should be included in an enrollment certificate by default -
MetadataSignature
-
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:
- Object
-
OrdererRequest
-
Type:
- Object
Properties:
Name Type Description txIdTransactionID Optional. Object with the transaction id and nonce ordererOrderer Optional. The orderer instance or string name of the orderer to retrieve genesis block from -
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:
- Object
-
OrganizationIdentifier
-
Type:
- Object
Properties:
Name Type Description idstring The organization's MSP id -
PeerQueryRequest
-
Type:
- Object
Properties:
Name Type Description targetPeer | string The Peer object or peer name to use for the service discovery request useAdminboolean Optional. Indicates that the admin credentials should be used in making this call to the peer. An administrative identity must have been loaded by a connection profile or by using the 'setAdminSigningIdentity' method. -
PeerQueryResponse
-
Type:
- Object
Properties:
Name Type Description peers_by_orgObject Example
{ "peers_by_org": { "Org1MSP": { "peers":[ {"mspid":"Org1MSP", "endpoint":"peer0.org1.example.com:7051"} ] }, "Org2MSP": { "peers":[ {"mspid":"Org2MSP","endpoint":"peer0.org2.example.com:8051"} ] } } } -
Policy
-
Defines the endorsement policies
Type:
- Object
Properties:
Name Type Description identitiesArray.<Identity> List of identities to be referenced in the "policy" section policyArray.<PolicySpec> The specification of the policy using a combination of "signed-by" and "n-of" structures. The design allows recursion -
PolicySpec
-
Type:
- Object
Properties:
Name Type Description typeObject The type of policy can be "signed-by" for a single identity signature or "n-of" where "n" is a numeric value. If the type property is "signed-by", the value is the numeric index into the array of identities specified in the policy. If the type property is "n-of", the value is an array of PolicySpec objects. As you can see, this structure allows recursive definitions of complex policies. -
ProcessedTransaction
-
Type:
- Object
Properties:
Name Type Description validationCodenumber See this list for all the defined validation codes transactionEnvelopeObject Encapsulates the transaction and the signature over it. It has the following structure: signature -- {byte[]} payload -- {} header -- {Header} data -- {Transaction} -
ProposalRequest
-
Type:
- Object
Properties:
Name Type Argument Description fcnstring Required. The function name. argsArray.<string> Required. Arguments to send to chaincode. chaincodeIdstring Required. ChaincodeId. argbytesBuffer Optional. Include when an argument must be included as bytes. transientMapobject <optional>
Optional. Object with String property names and Buffer property values that can be used by the chaincode but not saved in the ledger. Data such as cryptographic information for encryption can be passed to the chaincode using this technique. Data that is to be kept in a private data store (a collection) should be passed to the chaincode in the transientMap. -
ProposalResponse
-
A protobuf message that gets returned by endorsing peers on proposal requests. The peer node runs the target chaincode, as designated by the proposal, and decides on whether to endorse the proposal or not, and sends back the endorsement result along with the read and write sets inside the proposal response message.
Type:
- Object
Properties:
Name Type Description versionnumber timestampTimestamp Time the proposal was created by the submitter responseResponse payloadArray.<byte> The payload of the response. It is the encoded bytes of the "ProposalResponsePayload" protobuf message endorsementEndorsement The endorsement of the proposal, basically the endorser's signature over the payload peerRemoteCharacteristics The characteristics of the peer that created this ProposalResponse. Items include the url, name, and connection options. This information is not returned from the peer, it is not part of the serialized protobuf data returned by the peer. This information is added by the client instance peer object to help identify this ProposalResponse object. -
ProposalResponseObject
-
All calls to the endorsing peers for proposal endorsement return this standard array of objects.
Type:
- array
Properties:
Name Type Description index:0Array.<(ProposalResponse|Error)> Array where each element is either a ProposalResponse object (for a successful response from the endorsing peer) or an Error object (for an unsuccessful peer response or runtime error). index:1Object The original Proposal object needed when sending the transaction request to the orderer -
RegisterRequest
-
Type:
- Object
Properties:
Name Type Description enrollmentIDstring ID which will be used for enrollment enrollmentSecretstring Optional enrollment secret to set for the registered user. If not provided, the server will generate one. rolestring Optional arbitrary string representing a role value for the user affiliationstring Affiliation with which this user will be associated, like a company or an organization maxEnrollmentsnumber The maximum number of times this user will be permitted to enroll attrsArray.<KeyValueAttribute> Array of KeyValueAttribute attributes to assign to the user -
RegistrationOpts
-
Type:
- Object
Properties:
Name Type Description startBlockinteger Optional - The starting block number for event checking. When included, the peer's fabric 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. Setting a startBlock may confuse other event listeners, therefore only one listener will be allowed on a ChannelEventHub when a startBlock is being used. Setting a startBlock also requires this ChannelEventHub to connect to the fabric service using different options. The registration with a startBlock must be done before calling connect(). endBlockinteger | 'newest' Optional - The ending block number for event checking. The value 'newest' indicates that the endBlock will be calculated by the peer as the newest block on the ledger at the time of registration. This allows the application to replay up to the latest block on the ledger and then the listener will stop and be notified by the 'onError' callback. When included, the peer's fabric 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 the current channel block height. Setting an endBlock may confuse other event listeners, therefore only one listener will be allowed on a ChannelEventHub when an endBlock is being used. Setting a endBlock also requires this ChannelEventHub to connect to the fabric service using different options. The a registration with an endBlock must be done before calling connect(). unregisterboolean Optional - This options setting indicates the registration should be removed (unregister) when the event is 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 type 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. If not set and the endBlock has been set, the listener will be automatically unregistered. disconnectboolean Optional - This option setting Indicates to the ChannelEventHub instance to automatically disconnect itself from the peer's fabric service once the event has been seen. The default is false. If not set and the endBlock has been set, the the ChannelEventHub instance will automatically disconnect itself. -
RemoteCharacteristics
-
Information related to the peer instance object.
Type:
- Object
Properties:
Name Type Description urlstring The url of this peer namestring The name of this peer, this will be the host and port if the peer was not created with the name option. optionsObject The options object that this peer built based on defaults and what was passed when it was created. Typical options will include the GRPC connection settings. -
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 'request-timeout' setting or passed on a call that makes an outbound request
Type:
- Error
Examples
'client.setConfigSetting('request-timeout', 3000)''channel.sendTranaction(request, 3000)'
-
Response
-
A response message indicating whether the endorsement of the proposal was successful
Type:
- Object
Properties:
Name Type Description statusnumber Status code. Follows HTTP status code definitions messagestring A message associated with the response status code payloadArray.<byte> A payload that can be used to include metadata with this response -
Restriction
-
Type:
- Object
Properties:
Name Type Description revokedBeforeDate Include certificates that were revoked before this UTC timestamp (in RFC3339 format) in the CRL revokedAfterDate Include certificates that were revoked after this UTC timestamp (in RFC3339 format) in the CRL expireBeforeDate Include revoked certificates that expire before this UTC timestamp (in RFC3339 format) in the CRL expireAfterDate Include revoked certificates that expire after this UTC timestamp (in RFC3339 format) in the CRL -
Role
-
Type:
- Object
Properties:
Name Type Description namestring Name of the role. Value can be "member" or "admin" mspIdstring The member service provider Id used to process the identity -
ServiceResponse
-
Type:
- Object
Properties:
Name Type Description Successboolean Boolean indicating if the request was successful ResultObject The result of this request ErrorsArray.<ServiceResponseMessage> An array of error messages (code and message) MessagesArray.<ServiceResponseMessage> An array of information messages (code and message) -
ServiceResponseMessage
-
Type:
- Object
Properties:
Name Type Description codenumber Integer code denoting the type of message messagestring A more specific message -
SignatureHeader
-
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:
- Object
-
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 | ADMINType:
- Object
-
SignedCommitProposal
-
Type:
- Object
Properties:
Name Type Description requestTransactionRequest Required. The commit request signedTransactionBuffer Required. The signed transaction ordererOrderer | string Optional. The orderer instance or string name of the orderer to operate. See Client.getTargetOrderer -
SignedEvent
-
Type:
- Object
Properties:
Name Type Description signatureBuffer the signature over this payload payloadBuffer the payload byte array to be sent to the peer -
SignedProposal
-
Type:
- Object
Properties:
Name Type Description targetsArray.<Peer> Required. The function name. signedProposalBuffer Required. The signed endorse proposal -
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 'request-timeout' setting or passed on a call that makes an outbound request
Type:
- Error
Examples
'client.setConfigSetting('request-timeout', 3000)''channel.sendTranaction(request, 3000)'
-
TLSOptions
-
Type:
- Object
Properties:
Name Type Argument Default Description trustedRootsArray.<string> Array of PEM-encoded trusted root certificates verifyboolean <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:
- Object
-
TransactionEventHandlerOptions
-
Type:
- Object
Properties:
Name Type Argument Default Description commitTimeoutNumber <optional>
0 Number of seconds to wait for transaction completion. A value of zero indicates that the handler should wait indefinitely. -
TransactionRequest
-
Type:
- Object
Properties:
Name Type Description proposalResponsesArray.<ProposalResponse> An array of or a single ProposalResponse object containing the response from the endorsement call proposalProposal A Proposal object containing the original request for endorsement(s) txIDTransactionId Optional. - Must be the transaction ID object used in the proposal endorsement. The transactionID will only be used to determine if the signing of the request should be done by the admin identity or the user assigned to the client instance. ordererOrderer | string Optional. The orderer instance or string name of the orderer to operate. See Client.getTargetOrderer -
UserNamePasswordObject
-
An alternate object to use on the 'setUserContext' call in place of the 'User' object. When using this object it is assumed that the current 'Client' instance has been loaded with a common connection profile.
Type:
- Object
Properties:
Name Type Description usernamestring Required. A string representing the user name of the user passwordstring Optional. A string representing the password of the user caNamestring Optional. A string representing the name of the Certificate Authority. If not specified, will use the first Certificate Authority on the list. -
UserOpts
-
Type:
- Object
Properties:
Name Type Description usernamestring the user name used for enrollment mspidstring the MSP id cryptoContentCryptoContent the private key and certificate skipPersistenceboolean whether to save this new user object into persistence.