test-kalp-dapp-package
v1.0.38
Published
This is the main package of KALP WALLET Extension.
Downloads
16
Readme
zac-package
This is the core KALP WALLET Extension package. The zac-package offers the optimum configuration for a kalp-wallet-frontend. Frontend users can simply interface with the KALP- WALLET Extension after downloading this package.
Steps
Installation You can install the package either using NPM or using Yarn
1) Using NPM
npm install zac-package
Using Yarn
yarn add zac-package
2) Import
Import the package by :-
import zacPackage from "zac-package";
3) Usage(Function)
a) zac-package.connect()
This function allow the frontend (DAPP) user to open the extension wallet
b) zac-package.sendData(e ,mspId,peerEndpoint,gatewayPeer,chainCodeName,channelName,serverTlsCert,serverTlsKey,tlsCert,transactionName,transactionType, data )
When a user wants to sendData or want to read data , he or she can utilise this function, which requires this details.
- e (This is a constant parameter that can simply be written as e eg:- e)
- mspId (eg:-p2epro)
- peerEndpoint (eg:-128.199.21.50:7050 )
- gatewayPeer (eg:- nginx.p2epl.com )
- chainCodeName (eg:- myipr )
- channelName (eg:- kalptantra )
- serverTlsCert (eg:- -----BEGIN CERTIFICATE-----\nMIIDVjCCAv2gAwIBAgIUW7i8+HG+dub2xTx6Qe1Sx76ymZswCgYIKoZIzj0EAwIw\ngZ8xCzAJBgNVBAYTAklOMRYwFAYDVQQIEw1VdHRhciBQcmFkZXNoMS8wLQYDVQQH\nEyY3dGggRmxvb3IgRkMtMTkgU2VjLTE2QSBGaWxtQ2l0eSBOb2lkYTEaMBgGA1UE\nChMRUDJFIFBybyBQdnQuIEx0ZC4xEzARBgNVBAsTCkthbHB0YW50cmExFjAUBgNV\nBAMMDXAyZXByb19UTFNfQ0EwHhcNMjMwNjA4MDcwMjAwWhcNMjQwNjA3MDgxMzAw\nWjCBmDELMAkGA1UEBhMCSU4xFjAUBgNVBAgTDVV0dGFyIFByYWRlc2gxLzAtBgNV\nBAcTJjd0aCBGbG9vciBGQy0xOSBTZWMtMTZBIEZpbG1DaXR5IE5vaWRhMRowGAYD\nVQQKExFQMkUgUHJvIFB2dC4gTHRkLjEPMA0GA1UECxMGY2xp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XNoMS8wLQYDVQQHEyY3dGggRmxvb3IgRkMtMTkgU2VjLTE2QSBGaWxtQ2l0eSBOb2lkYTEaMBgGA1UEChMRUDJFIFBybyBQdnQuIEx0ZC4xEzARBgNVBAsTCkthbHB0YW50cmExFjAUBgNVBAMMDXAyZXByb19UTFNfQ0EwHhcNMjMwNjA4MDcwMjAwWhcNMzgwNjA0MDcwMjAwWjCBnzELMAkGA1UEBhMCSU4xFjAUBgNVBAgTDVV0dGFyIFByYWRlc2gxLzAtBgNVBAcTJjd0aCBGbG9vciBGQy0xOSBTZWMtMTZBIEZpbG1DaXR5IE5vaWRhMRowGAYDVQQKExFQMkUgUHJvIFB2dC4gTHRkLjETMBEGA1UECxMKS2FscHRhbnRyYTEWMBQGA1UEAwwNcDJlcHJvX1RMU19DQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABESPX7TPPMTwVcNFEx1Y8O/2idy/XKxDBGUdBSN/neOXJd8RY+ye8PZ7lTheba69hU9yTl3qAqrark8zugR1wXqjXDBaMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBRlJmtz1h9vCPVxHgCfAJZ85z4UvDAVBgNVHREEDjAMhwR/AAABhwSd9WqoMAoGCCqGSM49BAMCA0gAMEUCIQCxXMzQ7/ynHfLARqMNheHIJ4sNV2g3fS6GOUKxlQmm6wIgHKRq4T03+CYwtwJViVuf0SfIKEN1biu2in1mGhxhuoQ=\n-----END CERTIFICATE----- )
- transactionName (eg:- CreateNIU )
- transactionType (eg:- submit )
- data (eg:- [
{"id":"${id}","docType":"ASSET-MYIPR","name":"${names}","type":"Real Estate","desc":"Real 1111111","status":"COMPLETED","assetDigest":"${assetDigest}","uri":"12345678914","account":["${enrollmentId}"],"location":"Dubai","address": "Jabelali"}
, ])