1.0.0-beta.4 • Published 3 years ago

@quantnetwork/overledger-dlt-hyperledger_fabric v1.0.0-beta.4

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
3 years ago

@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)

ParamTypeDescription
sdkanythe 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)

ParamTypeDescription
accountInfoAccountThe standardised account information

Set an account for this specific DLT

hyperledgerFabric.buildTransaction(thisTransaction)

ParamTypeDescription
thisTransactionTransactionHyperledgerFabricRequestdetails 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)

ParamDescription
thisTransactionThe transaction request

validates an OVL transactionRequest according to Hyperledger Fabric specific rules

hyperledgerFabric._smartContractQueryValidation(contractQueryDetails)

ParamTypeDescription
contractQueryDetailsSmartContractThe transaction request

validates an OVL smart contract query according to Hyperledger Fabric specific rules

hyperledgerFabric.computeTransactionDataForFunctionCall(invocationType, paramsList)

ParamTypeDescription
invocationTypestringthe type of smart contract function call
paramsListArray.<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)

ParamTypeDescription
thisTransactionTransactionRequestan 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)

ParamTypeDescription
dltAddressstringthe user's Hyperledger Fabric address
contractQueryDetailsSmartContractHyperledgerFabricthe 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)

ParamTypeDescription
inputFunctionParamsArray.<SCHyperledgerFabricParam>the list of input parameters

computes the input parameters into the smart contract function query

hyperledgerFabric.computeSCQueryOutputTypesList(outputFunctionTypes)

ParamType
outputFunctionTypesArray.<SCHyperledgerFabricParam>

computes the output parameters into the smart contract function query

computeParamType(param)

ParamDescription
paramthe parameter definition

This function is used to prepare the parameter definition for the web3 package