@quantnetwork/overledger-dlt-hyperledger_fabric v1.0.0-beta.4
@quantnetwork/overledger-dlt-ethereum
Overledger SDK module for interaction with the Ethereum distributed ledger technology.
Installation
Install using npm:
npm install @quantnetwork/overledger-dlt-ethereum
Or, if you prefer using yarn:
yarn add @quantnetwork/overledger-dlt-ethereum
API Reference
Modules
Functions
overledger-dlt-hyperledger_fabric
overledger-dlt-hyperledger_fabric.HyperledgerFabricTypeOptions
overledger-dlt-hyperledger_fabric.default
Development package for HyperledgerFabric.
overledger-dlt-hyperledger_fabric~HyperledgerFabric
new HyperledgerFabric(sdk)
Param | Type | Description |
---|---|---|
sdk | any | the sdk instance |
hyperledgerFabric.name
Name of the DLT
hyperledgerFabric.symbol
Symbol of the DLT
hyperledgerFabric.createAccount()
Create an Hyperledger Fabric account
Returns: Account - the new Hyperledger Fabric account
hyperledgerFabric.setAccount(accountInfo)
Param | Type | Description |
---|---|---|
accountInfo | Account | The standardised account information |
Set an account for this specific DLT
hyperledgerFabric.buildTransaction(thisTransaction)
Param | Type | Description |
---|---|---|
thisTransaction | TransactionHyperledgerFabricRequest | details on the information to include in this transaction for the Hyperledger Fabric distributed ledger |
Takes the Overledger definition of a transaction and converts it into a specific Hyperledger Fabric transaction
Returns: Transaction - the Hyperledger Fabric transaction
hyperledgerFabric._transactionValidation(thisTransaction)
Param | Description |
---|---|
thisTransaction | The transaction request |
validates an OVL transactionRequest according to Hyperledger Fabric specific rules
hyperledgerFabric._smartContractQueryValidation(contractQueryDetails)
Param | Type | Description |
---|---|---|
contractQueryDetails | SmartContract | The transaction request |
validates an OVL smart contract query according to Hyperledger Fabric specific rules
hyperledgerFabric.computeTransactionDataForFunctionCall(invocationType, paramsList)
Param | Type | Description |
---|---|---|
invocationType | string | the type of smart contract function call |
paramsList | Array.<SCHyperledgerFabricParam> | the list of parameters that this function takes as input |
Convert Overledger object description of a smart contract function and parameters into Hyperledger Fabric versions
Returns: string - the bytecode of this function call
hyperledgerFabric._sign(thisTransaction)
Param | Type | Description |
---|---|---|
thisTransaction | TransactionRequest | an instantiated overledger definition of a Hyperledger Fabric transaction |
Takes in an overledger definition of a transaction for Hyperledger Fabric, converts it into a form that the Hyperledger Fabric distributed ledger will understand, and then signs the transaction
hyperledgerFabric.getTransactionQueryInfo()
Get the information required to query for a particular transaction hash
hyperledgerFabric._buildSmartContractQuery(dltAddress, contractQueryDetails)
Param | Type | Description |
---|---|---|
dltAddress | string | the user's Hyperledger Fabric address |
contractQueryDetails | SmartContractHyperledgerFabric | the definition of the smart contract function the user wants to interact with, including information on what parameters to use in the function call. |
Allows a user to build a smart contract query for the Hyperledger Fabric distributed ledger
Returns: Object - success indicates if this query building was correct, if yes then it will be in the response field of the object
hyperledgerFabric.computeSCQueryInputValuesList(inputFunctionParams)
Param | Type | Description |
---|---|---|
inputFunctionParams | Array.<SCHyperledgerFabricParam> | the list of input parameters |
computes the input parameters into the smart contract function query
hyperledgerFabric.computeSCQueryOutputTypesList(outputFunctionTypes)
Param | Type |
---|---|
outputFunctionTypes | Array.<SCHyperledgerFabricParam> |
computes the output parameters into the smart contract function query
computeParamType(param)
Param | Description |
---|---|
param | the parameter definition |
This function is used to prepare the parameter definition for the web3 package
3 years ago
3 years ago