BSN User Manual
BSN User Manual
Version 1.4.1
BSN Foundation
Blockchain-based Service Network User Manual
CONTENTS
1 BSN Introduction ....................................................................................................................... 1
1.1 Brief Introduction ............................................................................................................................... 1
1.2 BSN Services ...................................................................................................................................... 2
1.2.1 Permissioned Services........................................................................................................... 2
1.2.2 Permissionless Services ........................................................................................................ 2
1.2.3 Interchain Services ................................................................................................................ 3
1.3 Terminologies ..................................................................................................................................... 3
2 Release Notes ............................................................................................................................ 5
3 Quick Start ................................................................................................................................ 7
3.1 Permissioned Blockchain .................................................................................................................... 7
3.2 Permissionless Blockchain ................................................................................................................. 8
3.3 Documentation .................................................................................................................................... 9
4 Registration and Activation .................................................................................................... 10
4.1 Registration ....................................................................................................................................... 10
4.2 Login ................................................................................................................................................. 12
4.3 Forgot Password ............................................................................................................................... 13
5 Permissioned Services ............................................................................................................ 15
5.1 Overview........................................................................................................................................... 15
5.2 BSN Keys and Certificates Mechanism ............................................................................................ 16
5.2.1 BSN Keys and Certificates Mechanism .............................................................................. 16
5.2.2 Locally generate the DApp access key pair ........................................................................ 17
5.3 DApp Services Publication and Participation ................................................................................... 18
5.3.1 Overview ............................................................................................................................. 18
5.3.2 DApp Services Publication ................................................................................................. 18
5.3.3 DApp Services Management .............................................................................................. 25
5.3.4 DApp Services Participation ............................................................................................... 28
5.4 Off-BSN system Access Guide......................................................................................................... 34
5.4.1 Overview ............................................................................................................................. 34
5.4.2 BSN Smart Contract Package Requirements ...................................................................... 38
5.4.3 PCN Gateway Fabric API ................................................................................................... 43
5.4.4 PCN gateway FISCO API ................................................................................................... 66
5.5 Development SDK and Examples .................................................................................................... 90
2
Blockchain-based Service Network User Manual
3
Blockchain-based Service Network User Manual
4
Blockchain-based Service Network User Manual
Preface
Blockchain-based Service Network (BSN or Service network) is a worldwide
infrastructure network that provides a one-stop-shop solution for blockchain and
distributed ledger technology (DLT) applications (DApp). BSN is a complex system
that involves programming, software development, resource and environment
configurations, application deployment, gateway APIs, local SDK, key certificates, etc.
To facilitate utilization, BSN International (www.bsnbase.io) has prepared this
document for developers and users to learn how to use BSN. We hope that BSN will
become the first choice for developers to develop and run their DApps.
Permissioned services are divided into two parts. The first part demonstrates how
developers can deploy smart contracts to the selected public city nodes through the BSN
portal; the second part describes how developers can connect their off-BSN systems to
the corresponding smart contracts through the public city node gateway and conduct
data transaction processing.
Permissionless services determine how developers can choose the appropriate public
city nodes, plans, and public chain frameworks, to deploy and publish their DApps.
Please feel free to contact us if there are any further questions. Our contact information
can be found in Chapter 10. Contact Us. We strongly recommend users access the
Online Documentation section to explore BSN technical details further.
1
Blockchain-based Service Network User Manual
1 BSN Introduction
With BSN, there are three types of participants: cloud service providers, blockchain
framework providers, and portal operators.
Cloud service providers, through the installation of free BSN public city node software,
can make their cloud service resources (computing power, storage, and bandwidth)
accessible and sell through BSN to end-users.
Blockchain framework providers align with the BSN’s framework adaptation standards
and deploy them on BSN so developers can use it to develop and deploy applications.
The Permissionless service only applies to the BSN international portal and
international public city nodes.
Portal operators can easily and quickly build a Blockchain as a Service (BaaS) platform
on their existing websites using BSN APIs. This allows them to provide BSN
capabilities to their end users without users leaving their websites.
BSN is an open network that any cloud service provider, framework provider, or portal
operator, that complies with BSN requirements and standards is free to use and stop
using the service network at any time.
Similar to the Internet, most users of BSN are developers and technology companies.
They can use any BSN portal to purchase cloud resources that charge based on
transactions per second (TPS), storage quantity, and bandwidth from any public city
node around the world. They select any pre-adapted framework to conveniently develop,
deploy, and manage permissioned blockchain applications at a very low cost.
Blockchain developers only need to deploy the application to one or more public city
nodes on BSN so participants can connect to the application at no cost through any
public city node gateway. All deployed applications share server resources in every
public city node. For high-frequency applications, public city nodes can intelligently
allocate a dedicated peer node with high processing capacity. For low-frequency
applications, they share the same peer node. This resource-sharing mechanism allows
BSN to reduce the resource cost to one-twentieth of the cost of traditional blockchain
cloud services.
BSN is a blockchain infrastructure network. Just as households do not need to dig their
own wells, but instead, enjoy the water supply services provided by public water plants
in cities, BSN blockchain application publishers and participants do not need to buy
physical servers or cloud resources to build their blockchain operating environment.
1
Blockchain-based Service Network User Manual
They use the public services provided by BSN and rent shared resources as needed, thus
greatly reducing their costs. According to recent research, it takes about 20,000 USD
per year for developers to build and deploy a traditional permissioned blockchain LAN-
type environment. However, with BSN, the minimum cost to run such an application is
as low as one dollar a day. Cost is a huge factor and will encourage a large number of
small, medium, and micro enterprises and even individuals (including students) to
innovate and start businesses through BSN. This will undoubtedly promote rapid
development and popularization of blockchain technology. In general, the development
from the closed architecture of the traditional blockchain to the resource-sharing
architecture of BSN completely mimics the development process of the Internet, which
gathered numerous isolated LANs in the early days to the global connectivity facilities
we have today. We hope to make BSN the blockchain Internet.
The pricing strategy for the Permissioned service is based on three resource elements
of each peer node of the published application. The three elements are TPS, storage,
and data traffic. Among them, TPS and storage in the BSN portal are pre-paid, while
data traffic will be charged based on actual usage. This pricing strategy is designed to
minimize resource costs and provide users with the best services. Based on the data
provided by the BSN portal, if a user deploys a three-peer Fabric DApp, and each peer
node supports 10TPS and 10GB storage capacity, the monthly fee is only 20 USD.
2
Blockchain-based Service Network User Manual
We offer a free plan and different premium plans. The free plan includes up to 2,000
requests per day. There are 3 types of premium plans, priced at $20, $100, and $500 per
month. The premium plans include up to 40,000 requests, 250,000 requests, and
1,500,000 requests, respectively, per day. All requests can be assigned to any public
chain freely.
Permissionless services only provide shared nodes and access environments and do not
involve any business of the public chain itself. The gas fees incurred in publishing and
running DApps on any public chain shall be borne by the developers themselves and
have nothing to do with BSN.
A demo version of ICH is also live on the BSN Testnet, integrating two interchain
solutions based on the relay chain mechanism: (1) Poly Enterprise developed by
Onchain and (2) IRITA developed by Bianjie AI. We welcome all developers to try out
and provide feedback and suggestions to us and we will continue to improve the
interchain functionality.
1.3 Terminologies
⚫ Public city node (PCN): This is the core element of BSN but the “node” part
doesn’t refer to the blockchain nodes and BSN isn’t a blockchain. With BSN, each
PCN is a virtual data center used to allocate a portion of resources from the cloud
service or data center on which it was deployed. An entire blockchain operating
environment has been built within this resource pool and includes multiple
blockchain frameworks, shared peer nodes, CA management, authority chain, PCN
gateway, and PCN manager systems.
⚫ DApp: This is a generic term for blockchain and distributed ledger technology
3
Blockchain-based Service Network User Manual
application.
⚫ DApp Service or Service: This is a DApp that is already deployed and in use on
BSN that users can access with an invitation from the DApp publisher. The
invitation allows them to directly join and use the service.
⚫ Service Publisher: This is the individual or enterprise who published and deployed
the DApp service on BSN and is responsible for granting access to users who apply
to participate in the service.
⚫ Service Participant: This is a user that uses the BSN DApp service via a BSN
portal or the publisher’s system. Also, the user’s off-BSN system can connect to the
DApp service via the PCN gateway to execute transactions and query data.
⚫ Off-BSN system: A business IT system developed and managed by a DApp service
publisher or a service participant outside BSN.
4
Blockchain-based Service Network User Manual
2 Release Notes
Release date Version Notes
• Added public chain main net and test net nodes along with
2021/03/19 1.4.1 native API access services. Including: Casper, Findora and
Near.
• Iterative optimization and technical optimization of the BSN
international website (www.bsnbase.io) to enhance user
experience.
2021/01/31 1.4.0
• Launched the commercial service of Interchain
Communications Hub based on Poly Enterprise.
• Fixed some bugs and enhanced the stability of the system.
• Added public chain main net and test net nodes along with
2020/11/30 1.3.1 native API access services. Including: BTY, Oasis and
Polkadot.
• Optimized the BSN International website (www.bsnbase.io)
to improve user experience.
• Launched BSN Permissioned Blockchain Testnet, providing
developers with a free testing environment supporting:
Hyperledger Fabric R1, FISCO BCOS K1 DApp Services
publication
-Interchain testing services
2020/10/31 1.3.0
• Launched the BSN Interchain Communications Hub on BSN
Testnet based on Poly Enterprise and IRITA.
• Added the BSN empowerment platform APIs to allow third-
party portals to access BSN Permissionless Services.
• Added the TPD (Transactions Per Day) limit control function
in the Permissionless Services
• Fixed some bugs and enhances the stability of the system.
• Updated the BSN Global website address to
https://www.bsnbase.io.
• Added public chain main net and test net nodes along with
2020/9/24 1.2.1
native API access services. Including: Algorand, ShareRing
and Solana.
• Added Enable Key function in the public chain project.
• Redesigned the user interface toprovide better navigation and
user experience.
• Added public chain main net and test net nodes along with
native API access services. Including: Nervos, Neo, ETH,
Tezos, EOS, IRISnet, etc.
2020/8/10 1.2.0 • Added commercial functionality for Hyperledger Fabric and
FISCO BCOS frameworks.
• Updated FISCO BCOS framework to support SECP256 K1
encryption algorithm.
• Added the following functionality to Permissioned services:
recurring payment mechanism for service charge and data
5
Blockchain-based Service Network User Manual
6
Blockchain-based Service Network User Manual
3 Quick Start
3.1 Permissioned Blockchain
7
Blockchain-based Service Network User Manual
Permissioned DApp Service publishers can create DApp services in the BSN portal. To
create the service, it is necessary to upload the smart contract/chaincode package, define
the service functions and roles, select the public city nodes and select the participant
certificate mode (including Key Trust mode and Uploaded Public Key mode). After
that, publishers pay the bills and submit the service deployment request to the network
operator for approval and publishing.
After the successful publication of the service, publishers can participate in their service
or invite other users to participate in the service. To participate in the service,
participants should select designated roles and the access public city node, then generate
the certificates according to the certificate mode set by publishers. Participation will be
successful after being approved by service publishers.
Once successfully participating in the service, participants can download the certificate,
and use the certificate and service access configuration parameters to access the
chaincodes/smart contracts through the gateway API.
8
Blockchain-based Service Network User Manual
Permissionless services allow visitors to select public city nodes and plans to participate
in a service. There are 2 types of plans, the free plan, and premium plans. Visitors can
choose plans according to their business requirements. To connect to the public chain
nodes, users can create projects to obtain project IDs, project keys, and access addresses
to access the public chain services.
3.3 Documentation
The direct users of the BSN portal are developers. As the environment and tools of the
blockchain application's development, deployment, and operation, BSN is relatively
complex in its overall operation. We strongly recommend that all developers start by
examining the documentation and examples so that they will be able to master the use
of BSN within a day or two.
For your convenience, all examples we've provided are available on Github. We hope
that developers with serious interest can help us optimize and enrich the examples so
that other developers are able to adapt and learn about blockchain development.
Developers who share their samples, will receive small gifts and be invited to BSN's
internal technical seminar.
For links to all documents and examples, please visit Chapter 9. Online Documentation.
9
Blockchain-based Service Network User Manual
4.1 Registration
1. Click here to access the website at www.bsnbase.io.
2. With the blockchain-based service network, you can access the system either as an
Individual or a Corporate entity.
3. To register as an Individual, enter or select the following:
• Username – Enter a preferred username
• Nationality – Click the dropdown to select your country from the list of
countries
• Name – Enter your real name, different from the username
• Mobile Number (Optional) – Enter your mobile number
• Email address – Enter an email address you have access to
• Brief description of your programming experience (Optional) – If you have
some experience in programming, we would love to hear about it
• Check the I have read and agree to Terms of User and Privacy Policy box
• Click Confirm to finish the registration.
10
Blockchain-based Service Network User Manual
11
Blockchain-based Service Network User Manual
6. You will receive an email from BSN requesting that you confirm your registration.
7. Click on the link in the email to confirm your registration and enter your Password
and Password Confirmation.
8. Click Confirm when done to return you to the login page.
4.2 Login
After you have successfully registered your account on BSN, you can login by
following these steps:
12
Blockchain-based Service Network User Manual
1. On the Login page, click the Forgot Password to open the forgot password page.
2. On the page, enter the correct account or email.
3. In the verification code, enter the displayed code. If you wish to generate another
code, click on the code to generate another.
13
Blockchain-based Service Network User Manual
6. Enter the code that was received in your mailbox and click Next.
7. On the reset login password page, enter your New password and Confirm
password.
8. Click Confirm to change your password.
14
Blockchain-based Service Network User Manual
5 Permissioned Services
5.1 Overview
The Permissioned service is one of the core services provided by BSN. Its goal is to
make it easy for developers to publish decentralized applications (DApps) based on the
framework of the permissioned blockchain on their selected public city nodes.
Compared with the permissionless blockchain DApp, the permissioned blockchain
DApp is more flexible in terms of architecture design, operation efficiency, and smart
contract programming. It also has a larger space for innovation. However, from the
perspective of development, because the developers need to build their underlying
environments, and the environment for the public chain is readily available, the
development, operation and maintenance of the permissioned chain DApp are relatively
difficult. The developer's off-BSN system can access to DApp for data processing
through the BSN public city node gateway.
Although BSN has greatly reduced the difficulty of permissioned blockchain DApp
development, developers still need to have an in-depth understanding of the following
three aspects which will be explained in detail in the following chapters.
15
Blockchain-based Service Network User Manual
developers need to upload or download keys to facilitate the access from off-BSN
system.
3. Off-BSN system access: This part contains a detailed description of the access
parameter configuration, SDK usage, and the description of public city node
gateway APIs to which the off-BSN systems connect. The API section includes all
APIs of the currently permissioned blockchain frameworks that BSN has adapted.
1. DApp Access Key Pair based on Key Trust Mode: DApp access key pair is used
to generate the certificate to access the PCN gateway. If the DApp is on Key Trust
Mode, the key pair can be generated on the BSN portal, and the private key can be
downloaded. Please refer to the BSN Help Manual’s service participation section.
2. User Transaction Key Pair based on Key Trust Mode: User transaction key pair is
used to verify the requests and transactions sent to the DApp. If the DApp is on
Key Trust mode, the key pair can be generated via the PCN gateway APIs by
executing requests from the off-BSN systems. If the off-BSN systems have sub-
users, it can even generate different key pairs for different sub-users. Refer to the
API sections in this document for Hyperledger Fabric and FISCO BCOS
frameworks to see how to generate the key pairs and use them to verify the
transactions.
3. DApp Access Key Pair based on Public Key Upload Mode: In this mode, the DApp
access key pair is generated and stored locally. The participant must upload the
public key to BSN via the BSN portal to generate the access certificate to the PCN
gateway. Please refer to section 5.2.2 below to see how to generate the key pair
locally. Please refer to the “Public Key Upload” section of this document to learn
how to upload the public key to BSN via the portal.
4. User Transaction Key Pair based on Public Key Upload Mode: In this mode, the
16
Blockchain-based Service Network User Manual
user transaction key pair is also generated and stored locally. Instead of using the
BSN portal, the user transaction public key (one of the pair) is sent and registered
on BSN via the PCN gateway certificate registration API. If the off-BSN systems
have sub-users, they can also upload different public keys to generate different
transaction certificates for different sub-users by using the API. Please refer to
section 5.2.2 or the instructions inside the gateway SDK package about generating
the key pair locally. Refer to the API sections in this document for registering the
certificate via gateway APIs.
Please click the link to download the PCN Gateway SDK Package:
https://github.com/BSNDA/PCNGateway-Go-SDK
https://github.com/BSNDA/PCNGateway-Java-SDK
https://github.com/BSNDA/PCNGateway-PY-SDK
https://github.com/BSNDA/PCNGateway-CSharp-SDK
Currently, both permissioned frameworks Hyperledger Fabric and FISCO BCOS
DApps support both Key Trust Mode and Public Key Upload Mode.
17
Blockchain-based Service Network User Manual
5. Input the command - "dgst -sha256 -sign key.pem -out signature.bin data.txt" to
sign the data.txt file with the private key in the key.pem file to generate the
signature file: signature.bin.
OpenSSL> dgst -sha256 -sign key.pem -out signature.bin data.txt
6. Input the command - "dgst -verify pub.pem -sha256 -signature signature.bin
data.txt". Use the public key in the pub.pem file to sign and verify the data.txt and
signature.bin files.
OpenSSL> dgst -verify pub.pem -sha256 -signature signature.bin data.txt
Verified OK
7. If "Verified OK" is displayed, input the command - "base64 -in signature.bin -out
signature64.txt" to convert the signature file signature.bin to base64 encoded
signature64.txt.
OpenSSL> base64 -in signature.bin -out signature64.txt
8. Input the command - "pkcs8 -topk8 -inform PEM -in key.pem -outform PEM -
nocrypt -out keypkcs8.pem" to convert the private key in the key.pem file to pkcs8
format.
OpenSSL> pkcs8 -topk8 -inform PEM -in key.pem -outform PEM -nocrypt -out
keypkcs8.pem
9. Save the keypkcs8.pem file locally and copy all the contents of pub.pem, data.txt,
and signature64.txt to the public key, test data, and signature data text boxes
respectively on the Public Key Upload Mode page to verify the public key and
submit it to BSN.
1. In the BSN menu, click the Permissioned Service dropdown, in the list, click
Published Services to open the Published Services page.
18
Blockchain-based Service Network User Manual
2. On the published services page, click the Create a New Service button.
3. In the Basic Information section enter or select the following:
• Service Name – Enter an applicable name for the service to be provided
• Service Type – In the dropdown select from the various available service types
• Version – The default version 1.0.0 is entered automatically. Unless necessary,
leave it as is.
• Platform Type – Select from either Fabric-1.4.3-secp256r1 and FISCO-2.4-
secp256k1
• Service Logo – Click on the icon to locate the image on your PC. Note that
the image must be in png/jpg/jpeg format and should be exactly 160 x 160
pixels.
Enter a Name, and choose a Type for the document. Click Confirm to add the
19
Blockchain-based Service Network User Manual
document.
5. In the Contact Information section, the login details of the user are automatically
populated, including the Contacts and Email. If necessary, you can add a
telephone number.
1. To Add chaincode package, click on the button to display the Add chaincode
Package where you enter or select the following:
• Chaincode Name – Enter a name for the chaincode
• Version – Enter the chaincode version
• Chaincode Language – Select from one the languages (Java, Golang or
NodeJS)
• Initparam – enter the initialization parameters and if multiple, separate it with
commas
• Chaincode Package – Click on the icon to select the package file from the
PC. Package files are to be in the .zip file format and the file name should only
contain letters and numbers or underscores
20
Blockchain-based Service Network User Manual
2. To Use Preset Chaincode Package, click on the button to display the Select preset
chaincode package option. In the list of packages, select one of the listed packages
and click Confirm to add it.
21
Blockchain-based Service Network User Manual
2. If you wish to add more functions, click the Add Functions button to display the
dialog box. In it, enter or select the following:
• Function Name – Enter a name for the function
• Chaincode Name – Select from the list of chain codes
• Chaincode FUNC type – Choose from invoke, query or event
• Chaincode FUNC – Enter a description of the function
• Superior Functions – Select a function from the list of functions in the system
22
Blockchain-based Service Network User Manual
1. In the Select the City Nodes to deploy the service section, click Add City Nodes.
23
Blockchain-based Service Network User Manual
The city nodes that have enough resources according to the TPS and storage
configuration are displayed alongside their costs. The resource costs are different for
each public city node.
1. To use the certificate mode, in the Certificate Mode section, click either Key
Trust Mode or Public Key Upload Mode.
Once the payment is successfully made, you will receive an email in your mailbox
informing you that your BSN service has been submitted successfully and will be
reviewed. You will be informed via email when the reviewed has finished.
Once the service has been approved, the service will be seen in the Published Services
section.
1. In the BSN menu, click the Permissioned Services dropdown and click Published
Services to display the list of published services.
2. In the Action column, select the Invite Participants link to display the details to
send to participants who intend to join the service.
Click Copy to copy the link details. This can be emailed to the participants who login
with their BSN credentials to join or register with BSN first to use the service.
25
Blockchain-based Service Network User Manual
1. In the list of published services, locate the service to be edited. In the Action
column of the service, select Basic Information Editing to display the editing
page.
2. Add, edit or remove the basic detail of the service and click Save to store changes.
If no changes were made click Back to return to the Published Services page.
5.3.3.3 Service Upgrade
After a service has been published, the publisher can use the Service Upgrade option
to update the smart contracts and other functions. It will be reviewed again before it can
be used. To edit the Service Upgrade, follow these steps:
1. In the list of published services, locate the service to be edited. In the Action
column of the service, choose Service Upgrade.
2. In the Basic Information page, change the Version Number, which is mandatory
and/or any other details in the Basic Information page. Click Next to upload the
new smart contracts and set functions and roles as described before.
When done, click Confirm
1. Go to Published Services and select the enabled service on the list. Click
configuration upgrade to enter the configuration upgrade list page as below:
26
Blockchain-based Service Network User Manual
2. Click Add to create a configuration upgrade application form, and then click Add
city nodes to add new city nodes:
5.3.3.5 Detail
The View option allows the publisher to view all the details of the published service
including Basic Info, Deployment, Roles, Approval records, Ledger Info,
27
Blockchain-based Service Network User Manual
Comments, and Historical Version. To view these options, follow these steps:
1. In the list of published services, locate the service to be edited. In the Action
column of the service, click Detail to display the view page tabs.
2. In the Basic Info tab, you can see all the details of the service that has been
deployed including the Service name, Service type, Version, Platform type,
Service logo, Service Introduction, Service description, Documents, and
Contact Information.
3. In the Deployment tab, the information that can be viewed includes the Chaincode
package, Service function, and City Nodes.
4. In the Roles tab, the roles and their related functions are listed. To View a role,
click on the view link for that role name.
5. In the Approval records tab, you will see all the requested approval and their status
as well as time logs.
6. The Ledger Info tab shows more information about the published service than any
other tab. It shows the number of users accessed, number of transactions, peer
nodes, chaincodes, blocks, and logs of how the activities took place.
7. The Comments tab shows the comments made on the published service that can
be viewed by the publisher.
8. The Historical Version tab shows the history of the service including the Service
Name, Version, Service Type, Service Introduction, and Action.
1. Click the link that was shared. This will take you to the service information page.
2. In the service header, click Apply for the Service.
role.
2. In the Public City nodes, click Add city nodes to display the Public City Nodes
the DApp is deployed on. You can select more than one node. The selected nodes’
gateways are where the off-BSN systems connect to. Please select the public city
node that is closest to you.
Key Trust Mode: Participants can select existing certificates on the city node or apply
for a new certificate.
29
Blockchain-based Service Network User Manual
Public Key Upload Mode: Participants should upload the public key, test data and
signature data. The generation of public and private keys can be viewed by clicking
Read Instruction.
30
Blockchain-based Service Network User Manual
2. For the participant to be reviewed, click the Review link in the Action column to
view the participant details. In the Approval Information section select either
Approved or Failed to Approve and write a comment in the Approval
Comments box to give details.
3. Click Submit for Approval or Back to return to the participant's list.
4. If the participant is approved, a message will prompt showing that the service
participation approval was successful.
5. After the approval has been given, the participant can view the service from their
Participated Services page as well as add more city nodes.
5.3.4.6 Download and renew a certificate
The BSN development team intends to build BSN into a most secure blockchain
infrastructure network. The certificate and key mechanisms of BSN are complex. There
are two kinds of key pairs used in generating certificates: DApp Access Key Pair and
User Transaction Key Pair. For each, there are two modes, the Key Trust Mode and the
Public Key Upload Mode. To work with certificates, follow these steps:
1. In the My Certificates menu, click Key Trust Mode. The certificate page will be
displayed.
31
Blockchain-based Service Network User Manual
2. To download the certificate, click the icon. You will be required to enter the
certificate password.
3. To update the certificate, click the Certificate update link. You will be requested
to set a password for the certificate and confirm the password.
1. In the My Certificates menu, click Public Key Upload Mode. The certificate page
will be displayed.
2. To update the certificate, the public key, test data and signature data need to be re-
uploaded, and the update can only be completed after the test passes.
32
Blockchain-based Service Network User Manual
3. The user only needs to upload the public key in the Public Key Upload Mode. The
private key is kept locally by the user, so there is no need to download the certificate.
5.3.4.7 Configuration parameters for service access
To view and download the configuration parameters, follow these steps:
3. Click the dropdown beside the configuration parameters for service access to
view its configuration.
33
Blockchain-based Service Network User Manual
BSN aims to lower the cost of developing and deploying DApps by providing public
blockchain resources and environment to developers, just like the internet. It can further
reduce the costs associated with the development, deployment, operations, maintenance,
and regulation of DApps and, thereby, accelerate the development and universal
adaptation of blockchain and DLT technologies.
34
Blockchain-based Service Network User Manual
A complete DApp system based on BSN generally consists of two parts: the on-BSN
DApp smart contracts and the off-BSN systems. The off-BSN systems use the BSN
Public City Note (PCN) gateways to invoke the DApp smart contracts deployed on the
PCN to carry out on-chain operations such as executing transactions, writing data chain,
data queries, etc. The DApp service publishers and participants can deploy their off-
BSN systems on any cloud services they choose and then connect to the BSN PCN
gateways through the internet access DApp smart contracts and data.
Off-BSN System
PCN Gateway
Transaction Endorsement
Smart Contract/Chaincode
Events
Ledger
Peer Node
The BSN DApp service publishers and participants should have their off-BSN systems
so that they can access the DApp smart contracts to execute transaction and query data
via the PCN gateway APIs. The following are the charts to show the connecting flow
and transaction sequences.
35
Blockchain-based Service Network User Manual
36
Blockchain-based Service Network User Manual
Visit
Return verfication
result
Sccessful
Return chaincode
transaction result
Return Chaincode
Transaction Result
Return Results
37
Blockchain-based Service Network User Manual
⚫ Init: This function is called during the chaincode instantiation and its purpose is to prepare
the ledger for future requests. This function must be implemented in all chaincodes.
⚫ Invoke: The Invoke function is called for all future requests from the off-BSN systems
towards the DApps. Here all DApp custom functions or what the DApps can do (for
example, to read data from the ledger, to write data in the ledger, to update data, to delete
data) are defined. Simply put, Invoke can be understood as an entry point to the chaincode
functions. The Invoke function also must be implemented in all chaincodes.
⚫ Query: The Query function provides a method of querying ledger data. This function can
only be used for query purposes and does not offer any operations of ledger data. The Query
function is not required to be implemented in all chaincodes.
To realize the automatic deployment of DApp services and to improve deployment efficiency,
the following Fabric chaincode packaging requirements have been issued with different
programming languages.
1. Golang
The main function must be at the same or higher level as all chaincodes in the project. The
zipping path must be the same level folder where the main function is located, and the main
function path is the src-based path.
├─main.go
├─ChainCode/
├─models/
└─utils/
The package should be zipped under BsnBaseCC/ (package name is not required), and the main
function path (reference path) is BsnBaseCC.
38
Blockchain-based Service Network User Manual
github.com
└─BSNDA
└─FabricBaseChaincode
└─chaincode
└─go
└─bsnBaseCC
└─main.go
└─ChainCode/
└─models/
└─utils/
Description: main.go: the entry; ChainCode: chaincode; models: entities; utils: utilities.
2. Java
gradle or maven-built projects, the projects must contain build.gradle or pom.xml files.
BsnBaseCC
└─build.gradle
└─src
└─main
└─java
└─com.example.javacc
└─javacc.java
Package needs to be zipped under BsnBaseCC/. Zip package name is not required.
39
Blockchain-based Service Network User Manual
3. Node.Js
package.json must be built into the project’s root directory. Package needs to be zipped
under BsnBaseCC/. Zip package name is not required.
BsnBaseCC
└─marbles_chaincode.js
└─package.json
Note: when publishing DApp services in the BSN portal, chaincode packages should be created
in the project’s root directory using .zip format.
DApp publishers can also select the prebuilt chaincode package directly from the DApp
publishing page on the BSN portal.
Of which, the baseKey cannot be a blank string and the baseValue can be any type of data.
If the baseKey already exists, then directly return that it already exists and cannot be added;
if it does not exist, then add data.
40
Blockchain-based Service Network User Manual
Of which, the baseKey cannot be a blank string and the baseValue can be any type of data.
If the baseKey does not exist, then it cannot be updated; if it already exists, then update
the data.
Example: "str"
Of which, the baseKey value cannot be blank and must exist, else it cannot be deleted.
Example: "str"
Of which, the baseKey value cannot be blank and must exist, else it cannot be retrieved.
Example: "str"
Of which, the baseKey value cannot be blank. Response results: transaction Id (txId),
transaction time (txTime), whether to delete (isDelete) and transaction information (dataInfo).
41
Blockchain-based Service Network User Manual
42
Blockchain-based Service Network User Manual
43
Blockchain-based Service Network User Manual
{"header":{"userCode":"user01","appCode":"app01"},"mac":"","body":{“userId”:”abc”,”list
”:[“abc”,”xyz”]}}
Result: user01app01abcabcxyz
5.4.3.2 Key and Certificate Modes
1. Key Trust Mode
As described in chapter 5, DApp participants require two sets of key pairs to access the DApp:
DApp access key pair and user transaction key pair. With key trust mode, the pairs are
generated and hosted by BSN. The participants only need to download the private key (DApp
access key) from the BSN portal.
⚫ DApp Access Key Pair: After the participant has successfully joined the DApp, BSN will
generate one key pair (private and public keys) that corresponds to the DApp’s framework
algorithms under the Key Trust Mode. The participant can download the private key from
the “My Certificates” section of the BSN global portal and use it to sign the request message
sent to the PCN gateway. The gateway will use the hosted public key from the generated
key pair to validate the signature.
⚫ User Transaction Key Pair: This is the identity of a participant used to invoke the
chaincodes. Under the Key Trust Mode, after successfully joining a DApp, a participant’s
user transaction key pair will be created automatically by BSN by default. The participant’s
off-BSN system can use the participant’s UserCode to invoke the certificate generated by
the key pair. If the participant’s off-BSN system has multiple sub-users, the off-BSN
system can invoke the gateway’s “User Registration API” to register the sub-users and
44
Blockchain-based Service Network User Manual
generate separate user transaction key pair for each sub-user. The sub-users can use their
UserCode to connect to the DApp to execute transactions.
Transaction process:
⚫ DApp Access Key Pair: The DApp participant must generate the DApp access key pair
locally according to the DApp framework algorithm after successfully joining the DApp.
The participant stores the private key locally and uploads the public key to BSN via the
BSN global portal. The participant’s off-BSN system uses the private key to sign the
transaction messages when invoking the PCN gateway. The PCN gateway will use the
public key uploaded by the participant to verify the signature and validate the legality of
the transaction.
⚫ User Transaction Key Pair: This is the identity of a participant to invoke the chaincodes.
Under the Key Trust Mode, the participant must generate the user transaction key pair
locally and use the public key to generate the “public key registration application.”, then
from the participant’s off-BSN system to submit the registration application to BSN by
invoking the “Public Key Upload Mode user certification registration” API on the PCN
gateway to receive the public key certificate. If the off-BSN system has sub-users, it should
first invoke the “User Registration” API to register the sub-users before sending their public
key registration applications.
45
Blockchain-based Service Network User Manual
Transaction process:
Off-BSN
PCN Gateway
System
3. Assemble
Transaction
Parameters
4. Invoking "Public Key Upload Mode
Invoking Chaincode" API
1. Interface address:
https://PCNgatewayAddress/api/app/getAppInfo
Example:
46
Blockchain-based Service Network User Manual
{"header":{"userCode":"USER0001202004151958010871292","appCode":"app0001202
004161020152918451","tId":""},"mac": "","body":{}}
5. Response parameters
No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature value mac String Y
Header
0: successful
1 Response ID code int Y
-1: failed
2 Response Message msg String Y
Body
1 DApp name appName String Y
2 DApp type appType String Y
1: Key Trust Mode
DApp encryption
3 caType Int Y 2: Public Key Upload
key type
Mode
DApp algorithm algorithmTy 1: SM2
4 Int Y
Type pe 2: ECDSA (secp256r1)
5 City MSPID mspId String Y
Fabric corresponding
6 DApp chain name channelId String Y channelId, fisco
corresponding groupId
Example:
{
"header": {
"code": 0,
"msg": "Transaction Successful"
},
"mac":
"MEUCIQDE9zv0E/w4V/ILG6wUCFP08a7NDCAtX/IoZOcCyY4gIQIgUTYWsFTA1KE8
8gE6452jKnnVBrhznGVOV2HPMCbNh8A=",
"body": {
"appName": "sdktest",
"appType": "fabric",
"caType": 2,
"algorithmType": 2,
"mspId": "OrgbNodeMSP",
"channelId": "app0001202004161020152918451"
}
}
1. Interface address:
https://PCNGatewayAddress/api/fabric/v1/user/register
47
Blockchain-based Service Network User Manual
48
Blockchain-based Service Network User Manual
1. Interface address:
https://PCNGatewayAddress/api/fabric/v1/node/reqChainCode
This interface will directly respond the result without waiting for the generation of blocks.
Please use the interface “Retrieving transaction information” described in section 5.4.3.8 to
check the status of a block generated based on transaction ID.
Note: After a participant has successfully joined in a DApp service, the participant can view
and download the DApp’s configuration parameters which are used for off-BSN systems to
connect to this DApp’s chaincodes, including the PCN gateway address and Dapp access keys,
as shown below:
49
Blockchain-based Service Network User Manual
50
Blockchain-based Service Network User Manual
},
"mac":
"MEUCIQCBtfO1AfYkoJ2hIlp8CfKK1iuhVEAYkPY8YFRAdvPJlAIgDjSqYgwlORJRyF6
KZPU/uC5Fx/DxXxu9VgKwU9+JhjU=",
"body": {
"blockInfo": {
"txId": "a144149150ee615a9d11c68485600f43dc2c3eb2a98d7b36de53a6b99e03c495",
"blockHash": "",
"status": 0
},
"ccRes": {
"ccCode": 200,
"ccData": "SUCCESS"
}
}
}
1. Interface address:
https://PCNGatewayAddress/api/fabric/v1/user/enroll
51
Blockchain-based Service Network User Manual
{"header":{"userCode":"USER0001202004151958010871292","appCode":"app00012020
04161020152918451","tId":""},"mac":"MEQCICQaYMzs+edIQkfpt5hoaSO5dWqcrY7Q
75FYwyJo/B4rAiAQ10aEpdNATsZYHVcJJ4TxVCgY8XdQBBIyTAOqUmSjkw==","bo
dy":{"name":"user01","secret":"123456","csrPem":"-----BEGIN CERTIFICATE
REQUEST-----
\nMIHoMIGQAgEAMC4xLDAqBgNVBAMMI3VzZXIwMUBhcHAwMDAxMjAyMD
A0MTYxMDIw\nMTUyOTE4NDUxMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgA
Enguk1xunmuU1bnKB\nam8QmeK6Geg/O6kL2D2ig85UMQTpG/sb9iYkduz8iC9SRnF
9TvLiHuvJX2FGAOAQ\nK1Vz8aAAMAoGCCqGSM49BAMCA0cAMEQCIE19Iin91
KlfEvfFIbxhF14enFHhtvOU\n5rK86huFiMMQAiBYXO4fJBq6eLGjaavR71O9fOvVZ5
W7X+GQjIlQDuDgPQ==\n-----END CERTIFICATE REQUEST-----\n"}}
5. Response parameters
No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
Header
0:
1 Response ID code int Y successful
-1: failed
2 Response Message msg String Y
Body
1 Certificate content cert String Y
Example
{
"header": {
"code": 0,
"msg": "Transaction Successful"
},
"mac":
"MEUCIQCE0gg5VHWsZluNKAV2+xOJANGnCkw6f9J4+mFT1TWz/gIgfu93jqzTzk0
DU2lfMKnExcwVbgelWMLvLmwKplCXNBA=",
"body": {
"cert": "-----BEGIN CERTIFICATE-----
\nMIICvTCCAmSgAwIBAgIUcqn2HmCYmq/V2yKbnxuvc49KU00wCgYIKoZIzj0EA
wIw\nTjELMAkGA1UEBhMCQ04xEDAOBgNVBAgTB0JlaWppbmcxDDAKBgNVB
AoTA0JTTjEP\nMA0GA1UECxMGY2xpZW50MQ4wDAYDVQQDEwVic25jYTAgF
w0yMDA0MjEwNTAzMDBa\nGA8yMTAwMDMyMTExMDQwMFowbDE8MA0GA
1UECxMGY2xpZW50MA8GA1UECxMIb3Jn\nYm5vZGUwDgYDVQQLEwdic25iYX
NlMAoGA1UECxMDY29tMSwwKgYDVQQDDCN1c2Vy\nMDFAYXBwMDAwMTI
wMjAwNDE2MTAyMDE1MjkxODQ1MTBZMBMGByqGSM49AgEGCCqG\nSM49
AwEHA0IABJ4LpNcbp5rlNW5ygWpvEJniuhnoPzupC9g9ooPOVDEE6Rv7G/Ym\nJH
bs/IgvUkZxfU7y4h7ryV9hRgDgECtVc/Gjgf8wgfwwDgYDVR0PAQH/BAQDAgeA\n
MAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFG28toKRbzJTFa6v/xlIYr6S9Eva
MB8G\nA1UdIwQYMBaAFAcI4H+kIs8vn94ZYYpkrd+5ldMKMIGbBggqAwQFBgcI
AQSBjnsi\nYXR0cnMiOnsiaGYuQWZmaWxpYXRpb24iOiJvcmdibm9kZS5ic25iYXN
lLmNvbSIs\nImhmLkVucm9sbG1lbnRJRCI6InVzZXIwMUBhcHAwMDAxMjAyMDA
0MTYxMDIwMTUy\nOTE4NDUxIiwiaGYuVHlwZSI6ImNsaWVudCIsInJvbGUiOiJjb
GllbnQifX0wCgYI\nKoZIzj0EAwIDRwAwRAIgLtlTps/DOHK8S3La7bnlChB+88b1Fk
o9bOAL36oAFPIC\nIHQPCC30MoTHIId/X3fC5IxNukssmlMnEuDX73zRL55/\n-----
END CERTIFICATE-----\n"
}
}
52
Blockchain-based Service Network User Manual
1. Interface address:
https://PCNGatewayAddress/api/fabric/v1/node/trans
53
Blockchain-based Service Network User Manual
UF3SURSd0F3UkFJZ1ZZNi9jZ1NDTmpENkxwTXVaZEQzVWYvWko5c3FSUVVT
R3hSQU9SeGZONThDCklFN0JHTDljOHRCcHJiVmpYTldtQmpObWhqeUE3N0l3S
W8rbUg1ZXp4R1B1Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0KEhiQKmgB1Ibwb
gLAyoHXUNnjZSGOqBDheQMSbQprCmkIARIkEiJjY19hcHAwMDAxMjAyMDA0
MTYxMDIwMTUyOTE4NDUxXzAwGj8KA3NldAo4eyJiYXNlS2V5IjoidGVzdDIw
MjAwNDA0IiwiYmFzZVZhbHVlIjoidGhpcyBpcyBzdHJpbmcgIn0SRjBEAiB+mOUK
Y7fRjcZ1/qc96YP9GGod3UK56jJaWaE4o3J90QIgeirrjyzL6zQLN89tv3jDpI7vxKChk
GM9u8IEFiFEGYo="}}
5. Response parameters
No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
Signature
3 mac String Y
Value
Header
0: authentication
successful
1 Response ID code int Y
-1: authentication
failed
Response
2 msg String N If code=0, can be null
Message
Body
block If code is not 0, then
1 blockInfo blockInfo N
information leave blank
chaincode If code is not 0, then
2 ccRes ccRes N
response result leave blank
blockInfo
1 Transaction Id txId String Y
On synchronous mode,
2 Block HASH blockHash String N
returns Block HASH
refer to detailed
3 status value status Int Y transaction status
description in 6.3.13
ccRes
chaincode 200: successful
1 ccCode Int Y
response status 500: failed
chaincode actual chaincode
2 ccData Str N
response result response result
Example
{
"header": {
"code": 0,
"msg": "Transaction Successful"
},
"mac":
"MEQCICXNk40O+Gkqqe2XgoaxdOoIvDQe4RfLtwXkxjC7ce8TAiBLVu6PjOqWueV
B3t4h7REpNdcVf6L0qVzfdA1yovuc7g==",
"body": {
"blockInfo": {
"txId":
"c3c6523958c3811192b8d358dd2617f1b14cb661de6b022c1a822269e8a8c48d",
"blockHash": "",
"status": 0
54
Blockchain-based Service Network User Manual
},
"ccRes": {
"ccCode": 200,
"ccData": "SUCCESS"
}
}
}
1. Interface address:
https://PCNGatewayAddress/api/fabric/v1/node/getTransaction
55
Blockchain-based Service Network User Manual
Number
refer to detailed
Transaction transaction status
3 status Int Y
status description in
6.3.13
on-chain
4 createName String Y
user name
Timestamp “second” in the
5 timeSpanSec Int64 Y
Second timestamp
Timestamp “nanosecond” in
6 timeSpanNsec Int64 Y
Nanosecond the timestamp
Example
{
"header": {
"code": 0,
"msg": "Transaction Successful"
},
"mac":
"MEUCIQDUFw5pa4QJcEiQjYeLTl2L94HbsZbz7DArF+djgzWoTQIgU8u+dG6CcHw
BZjuf9PvhYdEFAa/ujwo8UAPbAmKxRq0=",
"body": {
"blockHash":
"ab9366cf63881228863c884527fceefabc9ad2e375aa0bcbf71f17f75c7d3ff5",
"blockNumber": 7,
"status": 0,
"createName": "test02@app0001202004161020152918451",
"timeSpanSec": 1587445821,
"timeSpanNsec": 249139700
}
}
1. Interface address:
https://PCNGatewayAddress/api/fabric/v1/node/getBlockInfo
56
Blockchain-based Service Network User Manual
5. Response parameters
No. Field name Field Type Required Remarks
1 header header Map Y
2 body body Map Y
3 signature value mac String Y
Header
0: authentication
successful
1 Response ID code int Y
-1: authentication
failed
Response if code=0 then can
2 msg String N
Message be null
Body
1 Block Hash blockHash String Y
2 Block Number blockNumber Long Y
Previous Block
3 preBlockHash String Y
Hash
4 Block Size blockSize Long Y byte
The number of
5 transactions on blockTxCount Int Y
current block
[]Transaction
6 Transaction detail transactions Y Transaction Detail
Data
TransactionData
1 Transaction Id txId String
refer to detailed
Transaction transaction status
2 Status Int
Status description in
6.3.13
Transaction
3 createName String
Provider
Transaction
4 timeSpanSec Int64
timestamp second
Transaction
5 timestamp timeSpanNsec Int64
nonasecond
Example
57
Blockchain-based Service Network User Manual
{
"header": {
"code": 0,
"msg": "Transaction Successful"
},
"mac":
"MEUCIQC8nfFnHw4sEYJmaSTT1xepxMGgomxyJtt0ysyGgPB0AwIgfuuiegdGEbBi/2wmF
Cco39wmik3isLWtvnN9ZmJDTdk=",
"body": {
"blockHash": "fc83c306677925efee540b4d7b7ca73e06f144cae34c706f1101d6b395ada2da",
"blockNumber": 6,
"preBlockHash":
"93c86551d812229274e144093cd4bd17dacb35bc6a01779930e11f43f886bf34",
"blockSize": 7020,
"blockTxCount": 1,
"transactions": [
{
"txId": "a8639f3a796267e048d475b00fe7646a4524f1c20d71880e19708821177b7bdb",
"status": 0,
"createName": "test02@app0001202004161020152918451",
"timeSpanSec": 1587271285,
"timeSpanNsec": 26436800
}
]
}
}
1. Interface address:
https://PCNGatewayAddress/api/fabric/v1/node/getLedgerInfo
58
Blockchain-based Service Network User Manual
1. Interface address:
https://PCNGatewayAddress/api/fabric/v1/chainCode/event/register
59
Blockchain-based Service Network User Manual
6. Interface address:
https://PCNGatewayAddress/api/fabric/v1/chainCode/event/blockRegister
60
Blockchain-based Service Network User Manual
"header": {
"code": 0,
"msg": "success"
},
"mac":
"MEUCIQC6PKsSqfkQGLrqi2vMpZzBP5beLhyP+fXVr8S5aqhaagIgaEtAnsuiub
ibYoYZzQ/8aGYErzm5rtU8Oj952OuHgCo=",
"body": {
"eventId": "002f0e1f0b0f4331ab541461547a38d6"
61
Blockchain-based Service Network User Manual
Use this API to query the list of monitored chaincode and block events that have been registered.
1. Interface address:
https://PCNGatewayAddress/api/fabric/v1/chainCode/event/query
62
Blockchain-based Service Network User Manual
Example
{ "header": { "code": 0, "msg": "Query Event Successful" }, "body":
[ { "eventKey": "test001", "notifyUrl":
"http://192.168.6.128:8080/api/event/notifyUrl", "attachArgs": "a=123\u0026b=456",
"eventId": "945ee631d26140118963ad3104c81713", "createTime": "2019-11-18
14:22:59", "orgCode": "ORG1571365934172", "userCode": "lessing",
"appCode": "CL20191107112252", "chainCode": "cc_bsn_test_00" },
{ "eventKey": "test002", "notifyUrl":
"http://192.168.6.128:8080/api/event/notifyUrl", "attachArgs": "hahahhahhahahahah",
"eventId": "346617a493d84c6d8512b8dddad87811", "createTime": "2019-11-18
14:29:28", "orgCode": "ORG1571365934172", "userCode": "lessing",
"appCode": "CL20191107112252", "chainCode": "cc_bsn_test_00" },
{ "eventKey": "test01", "notifyUrl":
"http://192.168.6.128:8080/api/event/notifyUrl", "attachArgs":
"name=Zhangsan\u0026age=20", "eventId": "bd3391deedbe44a7ad5b7f80ce59abfa",
"createTime": "2019-11-19 10:52:15", "orgCode": "ORG1571365934172",
"userCode": "lessing", "appCode": "CL20191107112252", "chainCode":
"cc_bsn_test_00" } ], "mac":
"MEQCIEYXFMa8dfBrjy/s9H5JAoFIrjROJBiw+7/daELUbF5eAiA7a6HvqqbOpv6vlkun
HGxCB1o5DoeuJFD0FM6kLoU34Q=="}
1. Interface address:
https://PCNGatewayAddress/api/fabric/v1/chainCode/event/remove
63
Blockchain-based Service Network User Manual
header
0: remove
1 Response ID code int Y successful
-1: remove failed
Response
2 msg String Y
Message
Example
{ "header": { "code": 0, "msg": "Remove Event Successful" }, "body": null, "mac":
"MEUCIQCaTFLliY7pPjkwcmSsLXOth7k9bQj9Sblq+1nMVjkFAAIgUsizFO+f1+dxU3/
hPxjf/+na4qG6aQFftJIWGtMhlVI="}
After receiving the notification successfully, the off-BSN system returns a string containing
“success”, otherwise, the gateway will send the notification again at 3, 12, 27, and 48 seconds
respectively, for a total of five times.
64
Blockchain-based Service Network User Manual
value
9 Current Block Height blockNumber Long Y
Off-BSN system
uses this value to
judge if the
notification is
Response random
10 nonceStr String Y already received.
string
This string
remains the same
at the repeated
notifications.
Null when
11 Previous hash previousHash String N chaincode event
notification
Example:
Chaincode event nofitication
{"header":{"userCode":"lessing","appCode":"CL20191107112252"},"body":{"cha
inCode":"cc_bsn_test_00","orgCode":"ORG1571365934172","eventKey":"test:\\S
{32}","eventId":"2964a0f60b3e460f834618b3664af2da","attachArgs":"abc=12321
1","eventName":"test:12345678123456781234567812345678","txId":"32fc10568
1820fa556b8a460efc1e43a47daa864b959ea1753abb4640f2dce49","payload":"","b
lockNumber":74,"nonceStr":"522c8061b5e84837bad72ca08c6a353f"},"mac":"ME
QCIDU4tROyjLtvD1b8TTbWWAlCPuUbmdPAEUXwRRgVn7kIAiA58je5u/7x
DuRPcgeUWL3nB9mouUGQ6dGKJMmD7Jm08g=="}
{"header":{"userCode":"USER0001202007101641243516163","appCode":"app00
01202101191411238426266"},"body":{"orgCode":"ORG2020041114171692360"
,"eventId":"8746bb9a1e854c9f8b3710f5a63f7c59","attachArgs":"a=1","previousH
ash":"022281f6089e3684501251775166b6b0afd18a176ec98a835cb5d09aff0d4950
","blockNumber":12,"nonceStr":"79a7baa26c854caeb2e2e7abc0b7f07e"},"mac":"
MEUCIQDiZrwf8fKG/3fuaVrsfTN3BKmLx+qnnEuuSaHfvIBbMQIgS+1qHKXe
VR24WXwOGu3Nze/tLLziQ0LkjXaueYu0ctM="}
65
Blockchain-based Service Network User Manual
66
Blockchain-based Service Network User Manual
1. FISCO BCOS framework DApp using ECDSA (secp256k1) secret key algorithm
• Getting the Hash value: The converted string to be signed is required to be computed
with SHA256 algorithm with UTF-8 encoding.
• Sign the Hash value: The hash value and private key should be encrypted with ECDSA
(secp256k1) algorithm. In the processing of some programming languages (C#, Java),
if signed with SHA256WithECDSA, which includes hash value computation, therefore,
the first step is not necessary.
• Encoding the signature result to Base64.
2. FISCO BCOS framework DApp using SM secret key algorithm
• Getting the Hash value: The converted string to be signed is required to be computed
with SM3 algorithm with UTF-8 encoding.
• Sign the Hash value: The hash value and private key should be encrypted with SM2
algorithm.
• Encoding the signature result to Base64.
4. Example
Parameters:
{"header":{"userCode":"user01","appCode":"app01"},"mac":"","body":{“userId”:”abc”,”list
”:[“abc”,”xyz”]}}
Result: user01app01abcabcxyz
DApp Access Key Pair: After the participant has successfully joined the DApp, BSN will
generate one key pair (private and public keys) that corresponds to the DApp’s framework
algorithms under the Key Trust Mode. The participant can download the private key from “My
Certificates” section of the BSN global portal and use it to sign the request message sent to the
PCN gateway. The gateway will use the hosted public key from the generated key pair to
validate the signature.
User Transaction Key Pair: This is the identity of a participant to invoke the chaincodes. Under
the Key Trust Mode, after successfully joining the DApp, a participant’s user transaction key
pair will be created automatically by BSN by default. The participant’s off-BSN system can
use the participant’s UserCode to invoke the certificate generated by the key pair. If the
participant’s off-BSN system has multiple sub-users, the off-BSN system can invoke the
gateway’s “User Registration API” to register the sub-users and generate a separated user
transaction key pair for each sub-user. The sub-users can use their own UserCode to connect
to the DApp to execute smart contract transactions.
67
Blockchain-based Service Network User Manual
Transaction process:
⚫ DApp Access Key Pair: The DApp participant must generate the DApp access key pair
locally according to the DApp framework algorithm after successfully joining the DApp.
The participant stores the private key locally and uploads the public key to BSN via the
BSN global portal. The participant’s off-BSN system uses the private key to sign the
transaction messages when invoking the PCN gateway. The PCN gateway will use the
public key uploaded by the participant to verify the signature and validate the legality of
the transaction.
⚫ User Transaction Key Pair: This is the identity of a participant to invoke the chaincodes.
Under the Key Trust Mode, the participant must generate the user transaction key pair
locally and use the public key to generate the “public key registration application”, then
from the participant’s off-BSN system to submit the registration application to BSN by
invoking the “Public Key Upload Mode user certification registration” API on the PCN
gateway to receive the public key certificate. If the off-BSN system has sub-users, it should
first invoke the “User Registration” API to register the sub-users before sending their public
key registration applications.
Transaction process:
68
Blockchain-based Service Network User Manual
Off-BSN
PCN Gateway
System
3. Assemble
Transaction
Parameters
4. Invoking "Public Key Upload Mode
Invoking Chaincode" API
1. Interface address:
https://PCNgatewayAddress/api/app/getAppInfo
Example:
{"header":{"userCode":"USER0001202004151958010871292","appCode":"app0001202
004161020152918451","tId":""},"mac": "","body":{}}
69
Blockchain-based Service Network User Manual
5. Response parameters
No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature value mac String Y
Header
0: successful
1 Response ID code int Y
-1: failed
2 Response Message msg String Y
Body
1 DApp name appName String Y
2 DApp type appType String Y
1: Key Trust Mode
DApp encryption
3 caType Int Y 2: Public Key
key type
Upload Mode
1: SM2
DApp algorithm algorithmTy
4 Int Y 2:
Type pe
ECDSA(secp256r1)
5 City MSPID mspId String Y
Fabric
corresponding
6 DApp chain name channelId String Y channelId, fisco
corresponding
groupId
Example:
{
"header": {
"code": 0,
"msg": "Transaction Successful"
},
"mac":
"MEUCIQDE9zv0E/w4V/ILG6wUCFP08a7NDCAtX/IoZOcCyY4gIQIgUTYWsFTA1
KE88gE6452jKnnVBrhznGVOV2HPMCbNh8A=",
"body": {
"appName": "sdktest",
"appType": "fabric",
"caType": 2,
"algorithmType": 2,
"mspId": "OrgbNodeMSP",
"channelId": "app0001202004161020152918451"
}
}
5.4.4.4 User Registration API
After a participant has successfully joined in a FISCO BCOS (FISCO) DApp, his/her off-BSN
system can invoke this interface to generate the user account and user address to execute smart
contract transactions.
1. Interface address:
https://PCNGatewayAddress/api/fiscobcos/v1/user/register
70
Blockchain-based Service Network User Manual
4. Call parameters
No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
header
1 user unique ID userCode String Y
2 DApp unique ID appCode String Y
body
1 user name userId String Y Registered
user name
Example:
{
"header":{"appCode":"CL1881038873220190902114314","userCode":"newuser"},
"body":
{
“userId”:”abc”
},
"mac":"MEQCIBRhaM2szckWl9N9qcqnaYXOXGQw7SfII9DlRvxcI3YVAiBt4XeNs+
EUjhBNSr3IjLRPZucsuGHxfjt9RiaNIQS8cA=="}
signature value:
5. Response parameters
No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
Signature
3 mac String Y
Value
header
0: authentication
successful
1 Response ID code int Y
-1: authentication
failed
Response if code=0 then can
2 msg String N
Message be null
body
User If code is not 0,
1 data []string N
information then leave blank
data
1 User ID userId String Y
2 User Address userAddress String Y
Example
{
"header": {
"code": 0,
"msg": "Transaction Successful"
},
"mac":
"MEQCIEI5VKMyJUXls2Hf8TLoPXjZLT4/L2wyXoddgTnZdqRsAiBxEBMeCOZ8M97
OCRUAMZNMcL974vhzjOS/tk8/wbgbsA==",
"body": {
"userId": "100003",
"userAddress": "0x14647a48303b5e1c77934583883ebc327ba3b297"
}
71
Blockchain-based Service Network User Manual
}
5.4.4.5 Key Trust Mode Invoking Smart Contract API
For the key trust mode FISCO DApps, when the off-BSN system invokes the smart contract
functions via PCN gateway, it is required to include the call parameters in the request. The
gateway will return the transaction result from the smart contract.
1. Interface address:
https://PCNGatewayAddress/api/fiscobcos/v1/node/reqChainCode
Note: After a participant has successfully joined in a FISCO DApp service, the participant can
view and download the DApp’s configuration parameters which are used for off-BSN systems
to connect to this DApp’s smart contracts, including the PCN gateway address and Dapp access
keys, as shown below:
72
Blockchain-based Service Network User Manual
Example:
{"header":{"appCode":"cl0006202003181926573677572","userCode":"USER00062020
03181951281835816"},"body":{"contractName":"HelloWorld","userId":"100003","func
Name":"set","funcParam":[\"abc\"]},"mac":"MEUCIQDTFe2Gerdf7YJrG1a1Yt99M0Z
Q3T1lGpsXdNmFV7WuTgIgSkZ19abUhAJbMrJMBoD8N7f26xhpQRuR4vNAfY7EE
bs="}
5. Response parameters
No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
header
0: authentication
successful
1 Response ID code int Y
-1: authentication
failed
Response if code=0 then can be
2 msg String N
Message null
Body
1 Invoke Type constant Bool N
Query If Constant is true, this
2 queryInfo String N
information field has value.
If Constant is false,
Transaction
3 txId string N this field has value and
hash
is valid.
If Constant is false,
4 Block HASH blockHash String N this field has value and
is valid.
If Constant is false,
5 Block Number blockNumber Int N this field has value and
is valid.
If Constant is false,
6 Gas Used gasUsed Int N this field has value and
is valid.
If Constant is false,
this field has value and
is valid. 0x0 means
Transaction
7 status String N transaction successful,
Status
status value refer to
transaction receipt
status in 7.3.9
If Constant is false,
8 From account from String N this field has value and
is valid.
If Constant is false,
9 To account To String N this field has value and
is valid.
If Constant is false,
10 Input Input String N this field has value and
is valid.
If Constant is false,
11 Ouput output String N this field has value and
is valid.
73
Blockchain-based Service Network User Manual
Example
1. Interface address:
https://PCNGatewayAddress/api/fiscobcos/v1/node/trans
Note: After a participant has successfully joined in a FISCO DApp service, the participant can
view and download the DApp’s configuration parameters which are used for off-BSN systems
to connect to this DApp’s smart contracts, including the PCN gateway address and Dapp access
keys, as shown below:
74
Blockchain-based Service Network User Manual
Name
Transaction
2 transData String Y
Data
3 Contract address contractAddress String N
4 Contract ABI contractAbi String N
Example:
{"header":{"userCode":"USER0001202006042321579692440","appCode":"app0001202
006042323057101002","tId":""},"mac":"MEUCIQCrjIeRVSt1uwFFGkr37bVM8pF0Jg
AWb40mKEBc5HbpjgIgEzXRIgG+Q7obwuD2MY4EHo9sIsI1W71M+aQKOfAN3wU
=","body":{"contractName":"BsnBaseContractk1","transData":"0xf9016fa008d8ebcb4b
1f8205fd7883aa3ce9b9c844424070e55a3af6a5da5d7ee97d287385051f4d5c0083419ce0
7794866aefc204b8f8fdc3e45b908fd43d76667d7f7680b8e4ebf3b24f0000000000000000
00000000000000000000000000000000000000000000006000000000000000000000000
00000000000000000000000000000000000000005000000000000000000000000000000
00000000000000000000000000000000a00000000000000000000000000000000000000
00000000000000000000000000573303630340000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000
00000000000026161000000000000000000000000000000000000000000000000000000
000000018187801ba0324efc9e17f1d31d95535c5103083560560f836931945d03fb69acb
6fd2046b5a05fa6f574f83b3b753c9fe40649a08c2a497af1cd804e08fed2b153af20267f23"
,
"contractAddress":"0xe2d0d414d436d8be9d52e2f40e6dd24a63faa638","contractAbi":"
Contract ABI"}}
5. Response parameters
No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
header
0: authentication
successful
1 Response ID code int Y
-1: authentication
failed
Response if code=0 then can be
2 msg String N
Message null
Body
1 Invoke Type constant Bool N
Query If Constant is true,
2 queryInfo String N
information this field has value.
If Constant is false,
Transaction
3 txId string N this field has value
hash
and is valid.
If Constant is false,
4 Block HASH blockHash String N this field has value
and is valid.
If Constant is false,
5 Block Number blockNumber Int N this field has value
and is valid.
If Constant is false,
6 Gas Used gasUsed Int N this field has value
and is valid.
Transaction If Constant is false,
7 status String N
Status this field has value
75
Blockchain-based Service Network User Manual
1. Interface address:
https://PCNGatewayAddress/api/fiscobcos/v1/node/getTxReceiptByTxHash
5. Response parameters
No. Field name Field Type Required Remarks
1 Header header Map Y
76
Blockchain-based Service Network User Manual
1. Interface address:
https://PCNGatewayAddress/api/fiscobcos/v1/node/getTxinfoByTxHash
77
Blockchain-based Service Network User Manual
5. Response parameters
No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
header
0: authentication
successful
1 Response ID code int Y
-1: authentication
failed
Response if code=0 then can be
2 msg String N
Message null
Body
Transaction
txId String
HASH
Block HASH blockHash String
Block Number blockNumber Int
Gas Used gasUserd Int
From account from String
To account to String
value Int
input String
Example
{
"header": {
"code": 0,
"msg": "Transaction Successful"
},
"mac":
"MEQCIBMqntmqQqZXkBbrLhmXEcuOqTG4YWvlfGJmebzEDbzcAiAKKHut9MBShqpSAEo8
ts2MEQCIBMqntmqQqZXkBbrLhmXEcuOqTG4YWvlfGJmebzEDbzcAiAKKHut9MBShqpSAE
o8ts2+OBIRmEEbedjihix5FZZvrw==",
"body": {
"blockHash":
"0x199eca276b60473dd65f8b36641684456694b419d89ef41b4953a9cdac848305",
78
Blockchain-based Service Network User Manual
"input":
"0x60806040523480156200001157600080fd5b506110016000806101000a81548173fffffffffffffffff
fffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008090549061
01000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c92a780
16040805190810160405280600681526020017f745f6261736500000000000000000000000000000
000000000000000000000008152506040518263ffffffff167c0100000000000000000000000000000
0000000000000000000000000000281526004016200010191906200024a565b60206040518083038
1600087803b1580156200011c57600080fd5b505af115801562000131573d6000803e3d6000fd5b50
5050506040513d601f19601f8201168201806040525062000157919081019062000174565b506200
02f4565b60006200016c8251620002a3565b905092915050565b6000602082840312156200018757
600080fd5b600062000197848285016200015e565b91505092915050565b6000620001ad82620002
98565b808452620001c3816020860160208601620002ad565b620001ce81620002e3565b60208501
0191505092915050565b6000601382527f626173655f6b65792c626173655f76616c7565000000000
000000000000000006020830152604082019050919050565b6000600782527f626173655f6964000
000000000000000000000000000000000000000000000006020830152604082019050919050565b6
0006060820190508181036000830152620002668184620001a0565b9050818103",
"gasUsed": 100000000,
"blockNumber": 1,
"txId": "0x8ee0c68e222742b5b70878265d3fdbd3a8e0d549da42a298a4ae872ca4fbfd89",
"from": "0x08ac3132a6c7e6ca5a7fbaf0521bb8b6f370ed35",
"to": "0x0000000000000000000000000000000000000000",
"value": 0
}
}
1. Interface address:
https://PCNGatewayAddress/api/fiscobcos/v1/node/getBlockInfo
79
Blockchain-based Service Network User Manual
cannot be null
Example:
{
"header":{"appCode":"CL1881038873220190902114314","userCode":"newuser"},
"body":
{
"blockNumber":22,
"blockHash":"0xf27ff42d4be65329a1e7b11365e190086d92f9836168d0379e92642786db7
ade"
},
"mac":"MEQCIBRhaM2szckWl9N9qcqnaYXOXGQw7SfII9DlRvxcI3YVAiBt4XeNs+E
UjhBNSr3IjLRPZucsuGHxfjt9RiaNIQS8cA=="}
signature value:
5. Response parameters
No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
header
0: authentication
successful
1 Response ID code int Y
-1: authentication
failed
Response if code=0 then
2 msg String N
Message can be null
Body
Block HASH blockHash String Y
Block Number blockNumber Int Y
Parent Block parentBlockHa
String Y
HASH sh
Block Size blockSize Int Y
Timestamp in
Block Time blockTime Int Y millisecond
format
author String Y
Transaction []Transaction
transactions Y
Information Data
TransactionData
Transaction Id txId String Y
Block HASH blockHash String Y
Block Number blockNumber Int Y
Gas Used gasUsed Int Y
from String Y
to String Y
value Int Y
input String Y
Example
{
"header": {
"code": 0,
"msg": "Transaction successful"
},
"mac":
80
Blockchain-based Service Network User Manual
"MEQCIHX8SuEn/sDiPscd5li3X1GdseyggAyC2o9L92FjhzrfAiBLyFW/rguLkqz/Lz62Vt
X3m7Y1nHqcFqcNdM7Wq0wGLQ==",
"body": {
"blockHash":
"0x199eca276b60473dd65f8b36641684456694b419d89ef41b4953a9cdac848305",
"blockNumber": 1,
"parentBlockHash":
"0xa6886f12ee91470e35546432413ed372615f8d4c23fa82e8381b3e5b31219d4c",
"blockSize": 0,
"blockTime": 1587125168039,
"transactions": [
{
"txId":
"0x8ee0c68e222742b5b70878265d3fdbd3a8e0d549da42a298a4ae872ca4fbfd89",
"blockHash":
"0x199eca276b60473dd65f8b36641684456694b419d89ef41b4953a9cdac848305",
"blockNumber": 1,
"gasUsed": 100000000,
"from": "0x08ac3132a6c7e6ca5a7fbaf0521bb8b6f370ed35",
"to": "",
"value": 0,
"input":
"0x60806040523480156200001157600080fd5b506110016000806101000a81548173ffffffff
ffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060
00809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673fffffffffffffffffffffffffffff
fffffffffff1663c92a78016040805190810160405280600681526020017f745f6261736500000
000000000000000000000000000000000000000000000008152506040518263ffffffff167c0
10000000000000000000000000000000000000000000000000000000002815260040162000
10191906200024a565b602060405180830381600087803b1580156200011c57600080fd5b5
05af115801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682
01806040525062000157919081019062000174565b50620002f4565b60006200016c825162
0002a3565b905092915050565b6000602082840312156200018757600080fd5b6000620001
97848285016200015e565b91505092915050565b6000620001ad8262000298565b80845262
0001c3816020860160208601620002ad565b620001ce81620002e3565b6020850101915050
92915050565b6000601382527f626173655f6b65792c626173655f76616c756500000000000
0000000000000006020830152604082019050919050565b6000600782527f626173655f696
40000000000000000000000000000000000000000000000000060208301526040820190509
19050565b60006060820190508181036000830152620002668184620001a0565b905081810
360208301526200027b8162000213565b90508181036040830152000000"
}
]
}
}
1. Interface address:
https://PCNGatewayAddress/api/fiscobcos/v1/node/getBlockHeight
81
Blockchain-based Service Network User Manual
4. Call parameters
No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
header
1 user unique ID userCode String Y
2 DApp unique ID appCode String Y
body
Example:
{"header":{"appCode":"cl0006202003181926573677572","userCode":"USER000620200318195
1281835816"},"body":{},"mac":"MEQCIHb2o7hb0apDukOQBXkZftETsizDBaftnHxO9A9ux5
EtAiABuiFrVYPWT5FiU+Wd9HpXF/AJh0Yh2SXtL6h98m4eZw=="}
signature value:
5. Response parameters
No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
header
0: authentication
successful
1 Response ID code int Y
-1: authentication
failed
Response if code=0 then
2 msg String N
message can be null
Body
If code not 0, then
1 Block Height data string N
leave blank
Example
{
"header": {
"code": 0,
"msg": "Transaction Successful"
},
"mac":
"MEQCICtCOdv4ZL72M3WoA9nAei2P0/PpKjlgI0Y5qeuzg61uAiA9D3TcB/+b2RMu
NwVq+X0vgiglHfM5NBhoTJPR0gCPMA==",
"body": {
"data": "4"
}
}
1. Interface address:
https://PCNGatewayAddress/api/fiscobcos/v1/node/getTxCount
82
Blockchain-based Service Network User Manual
83
Blockchain-based Service Network User Manual
1. Interface address:
https://PCNGatewayAddress/api/fiscobcos/v1/node/getTxCountByBlockNumber
Example
{
"header": {
"code": 0,
"msg": "Transaction Successful"
},
"mac":
"MEUCIQCMFbVhfH9X8pJ1mNI3YpzKIBcXCpfmf2AniF/42ak9EwIgTWDEF+xW5l39
ZDUnDSSSc8Zv8J1glEf9izp16eW/Rn4=",
84
Blockchain-based Service Network User Manual
"body": {
"data": "1"
}
}
1. Interface address:
https://PCNGatewayAddress/api/fiscobcos/v1/event/register
85
Blockchain-based Service Network User Manual
1. Interface address:
https://PCNGatewayAddress/api/fiscobocs/v1 /event/query
5. Response parameters
86
Blockchain-based Service Network User Manual
87
Blockchain-based Service Network User Manual
}
],
"contractEvent": [
{
"eventId": "ba537419953e4e219ceb0fe26ad5e126",
"appCode": "app0001202006042323057101002",
"userCode": "USER0001202006042321579692440",
"notifyUrl": "http://127.0.0.1:18080",
"attachArgs": "abc=123",
"createTime": "0001-01-01 00:00:00.000 +0000 UTC",
“contractAddress”:” 0x866aefc204b8f8fdc3e45b908fd43d76667d7f76”
}
]
}
}
1. Interface address:
https://PCNGatewayAddress/api/fabric/v1/chainCode/event/remove
88
Blockchain-based Service Network User Manual
Response
2 msg String Y
Message
Example
{"header": {"code": 0, "msg": "Remove Event Successful"}, "body": null, "mac":
"MEUCIQCaTFLliY7pPjkwcmSsLXOth7k9bQj9Sblq+1nMVjkFAAIgUsizFO+f1+dxU3/
hPxjf/+na4qG6aQFftJIWGtMhlVI="}
After receiving the notification successfully, the off-BSN system returns a string containing
“success”, otherwise, the gateway will send the notification again at 3, 12, 27, and 48 seconds
respectively, for a total of five times.
89
Blockchain-based Service Network User Manual
QD3Sp6xuI4DHy/GOb9z3nH6kQisEzfXvZ/Hn/mfZXIAOgIgYsISRfBKSJGt4FrmxETflfR4A8Ve
nCZHvxthMFUWRkc="}
status(Decimal/
message Explanation
Hexadecimal)
0(0x0) None No Error
1(0x1) Unknown Unknown Error
2(0x2) BadRLP Invalid RLP Error
3(0x3) InvalidFormat Invalid Format Error
The length of smart contract exceeds gas
4(0x4) OutOfGasIntrinsic limit/smart contract invoking parameters
exceed gas limit
5(0x5) InvalidSignature Invalid Signature Error
6(0x6) InvalidNonce Invalid nonce Error
7(0x7) NotEnoughCash Not enough cash Error
8(0x8) OutOfGasBase Parameters too long (RC version)
9(0x9) BlockGasLimitReached Gas limit reached Error
10(0xa) BadInstruction Bad Instruction Error
11(0xb) BadJumpDestination Bad Jump Destination Error
Out of gas to execute the smart contract/the
12(0xc) OutOfGas
length of smart contract exceeds the limit.
13(0xd) OutOfStack Out of Stack Error
14(0xe) StackUnderflow Stack Under Flow Error
15(0xf) NonceCheckFail Nonce check failed Error
16(0x10) BlockLimitCheckFail Block limit check failed Error
17(0x11) FilterCheckFail Filter check failed Error
18(0x12) NoDeployPermission No Deployment Permission Error
19(0x13) NoCallPermission Illegal call Error
20(0x14) NoTxPermission Illegal transaction Error
21(0x15) PrecompiledError Precompiled Error
22(0x16) RevertInstruction Revert Instruction Error
23(0x17) InvalidZeroSignatureFormat Invalid Signature Format
24(0x18) AddressAlreadyUsed Address Already Used Error
25(0x19) PermissionDenied Permission Denied
26(0x1a) CallAddressError Call Address does not exist Error
90
Blockchain-based Service Network User Manual
Download links:
https://github.com/BSNDA/PCNGateway-Go-SDK
https://github.com/BSNDA/PCNGateway-Java-SDK
https://github.com/BSNDA/PCNGateway-PY-SDK
https://github.com/BSNDA/PCNGateway-CSharp-SDK
➢ Fabric example
Download links:
https://github.com/BSNDA/FabricBaseChaincode
We invite experienced developers who are interested in BSN to work together to optimize the
SDK and sample packages. If you'd like to participate, please contact us on GitHub.
Go to the Permissioned Services > Testnet Services page to publish the service.
91
Blockchain-based Service Network User Manual
Click Create a Test Service and input the service name, version, and select a platform type.
Click Upload Chaincode Package to upload the chaincode or smart contract package. You
can upload multiple chaincode/smart contract packages in a permissioned DApp service.
Input the information and click Confirm to upload the package.
92
Blockchain-based Service Network User Manual
After successfully deploying the chaincode/smart contract, developers can call it from their
off-BSN systems so that they can configure and debug the functions easily.
Note: To keep the resources stable, DevOps will periodically clean up the chaincode/smart
contract packages and ledger data on the Testnet.
5.6.3 Interchain Services on BSN Testnet
A demo version of Interchain Communications Hub (ICH) is now live on the Testnet,
integrating two interchain solutions based on the relay chain mechanism: (1) Poly Enterprise
developed by Onchain Tech and (2) IRITA developed by Bianjie AI. We welcome developers
to try out and provide feedback and suggestions, and we will continue to improve the
functionality and expect to release a commercial version in 2021.
For detailed descriptions and examples of ICH services, please refer to chapter 7, "Interchain
Services"
93
Blockchain-based Service Network User Manual
6 Permissionless Services
6.1 Overview
The Permissionless service allows the participant to select a public city node to access a plan
that can be a free plan or a premium plan. When this is done, the participant can create a project,
obtain the project ID, key and access parameters which can be used to access selected public
chain node gateway. With the Permissionless service, the default plan is free for participants,
however, it has limited daily requests and projects. BSN has created several other plans that
can be upgraded to, for a certain fee, paid on a monthly basis.
When you click and expand the public city node, you can see all public chain frameworks
supported by the city node. Users can decide whether to choose this city node as the access
entrance according to their needs. The public chain frameworks supported by different city
nodes may be different. In general, we recommend that developers choose a city node that is
close to them, so that the access speed will be relatively fast.
By default, participants on the Permissionless service have a free plan that is free to use up to
2000 daily requests, allowed TPS of 100 and maximum of 3 projects. However, a participant
can upgrade to a higher plan available on the platform. To select plans, follow these steps
94
Blockchain-based Service Network User Manual
1. On the Permissionless page, click Buy in the Select Your Plan section.
2. In the Details page, locate the Select or Update your plan section and click Buy on the
appropriate plan.
3. In the Are you sure you want to buy package window, click the project agreement and
click Confirm.
4. In the Select Payment Method page, select the appropriate payment method and click
Next Step to be redirected to Stripe.
The BSN portal never records and stores any credit card information.
95
Blockchain-based Service Network User Manual
5. On the Stripe Payment page, click Pay to display the Receipt and Invoice.
96
Blockchain-based Service Network User Manual
1. In the Permissionless Service page, click Create new project in the development plan
section.
97
Blockchain-based Service Network User Manual
2. In the Create a new project window, enter the Project Name, select the Public Chain to
access from the dropdown list, input the Daily Requests number if needed. Then click
Create Project. The Daily Requests number is optional, and it is used to control the TPD
(transactions per day) for this project.
This will automatically create the project and list it in the Project Information tab.
After a project has been created it can be managed using available tools for the project. To
manage a project, follow these steps:
1. Locate the project to be managed, click Upgrade to display the Plans page.
2. Select the appropriate plan to Upgrade to and click confirm to display the payment page.
98
Blockchain-based Service Network User Manual
3. To enable the project key, in the Permissionless Service page, click Project list to display
the list of projects. In Action, click Enable Key to enable the project key. Then the
information page on enabling the key will be displayed. Click Confirm.
4. To update a project key, click Update Key. Then the information page on updating the
key will be displayed. Click Confirm.
5. To delete a project, click Delete. A confirmation message will be displayed asking if you
wanted to delete the project. Click Confirm to delete it.
99
Blockchain-based Service Network User Manual
After developers select the public chain framework (netcode) in the BSN portal to create the
public chain project, they will get the gateway’s domain name address (url), project number
(id), project key (key), public chain supportive protocol {protocol} and public chain gateway
API address.
The developer accessing the PCN gateway via HTTP should concatenate the request address
in "https://{url}/api/{id}/{netcode}/{protocol}/{subUrl}" format. If project key is enabled, "x-
APi-key:{key}"should be added to the request header. If the public chain nodes provide
multiple components, they should add {subUrl}; If the Nervos CKB has an Indexer component
service in addition to the RPC service, "{subUrl}" should fill the indexer value, {subUrl} is
optional.
The developer accessing the node gateway via WebSocket, should concatenate the Key and
SubUrl to the path address of the target machine and concatenate to the format of
{url}/api/{id}/{key}/{netcode}/{subUrl}. If the project key is not enabled, then the {key} filed
should be null. If there is no subUrl, this field can be null. That is, developers can think of the
content after/API as the method name of a target machine.
6.4.2 Ethereum
Ethereum is a global, open-source platform for decentralized applications. On Ethereum, you
can write code that controls digital value, runs exactly as programmed, and is accessible
anywhere in the world.
The BSN public city node gateway is adapted to the Ethereum JSON RPC API, so developers
can initiate transaction requests to the node gateway via HTTP JS-RPC. For detailed docking
instructions please visit: https://eth.wiki/json-rpc/API
The following table shows additional error code definitions for public city node gateways:
100
Blockchain-based Service Network User Manual
6.4.3 EOS
EOSIO is a blockchain platform designed for the real world. Built for both public and private
use cases, EOSIO is customizable to suit a wide range of business needs across industries with
rich role-based security permissions, industry-leading speeds and secure application processing.
The BSN city node gateway is adapted to EOSIO's JSON RPC API, so developers can
initiate transaction requests to the node gateway via HTTP JSON-RPC. For detailed docking
instructions please visit:
https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-
reference/index#operation/get_block
The following table shows additional error code definitions for public city node gateway:
6.4.4 Nervos
The Nervos Network is an open source public blockchain ecosystem and collection of
protocols solving the biggest challenges facing blockchains like Bitcoin and Ethereum today.
The BSN city node gateway is adapted to the Nervos JSON RPC API, so developers can
initiate transaction requests to the node gateway via HTTP JSON-RPC.
https://docs.nervos.org/docs/reference/rpc
The following table shows additional error code definitions for public city node gateway:
6.4.5 NEO
101
Blockchain-based Service Network User Manual
NEO is an open-source, community driven platform that is leveraging the intrinsic advantages
of blockchain technology to realize the optimized digital world of the future.
The BSN city node gateway is adapted to the NEO JSON RPC API, so developers can
initiate transaction requests to the node gateway via HTTP JSON-RPC. For detailed docking
instructions please visit:
https://docs.neo.org/docs/zh-cn/reference/rpc/latest-version/api.html
The following table shows additional error code definitions for public city node gateway:
6.4.6 Tezos
Tezos is an open-source platform for assets and applications backed by a global community of
validators, researchers, and builders. Tezos is designed to provide the safety and code
correctness required for assets and other high value use cases. Its native smart contract language,
Michelson, facilitates formal verification, a methodology commonly used in mission-critical
environments such as the aerospace, nuclear, and semiconductor industries.
The BSN city node gateway is adapted to the Tezos JSON RPC API, so developers can
initiate transaction requests to the node gateway via HTTP JSON-RPC. For detailed docking
instructions please visit:
https://tezos.gitlab.io/api/rpc.html
The following table shows additional error code definitions for public city node gateway:
6.4.7 IRISnet
Within the ecosystem of IRISnet, the core innovation is embodied in three aspects: integrate
the service-oriented infrastructure into the Cosmos network; integrate business services
provided by heterogeneous systems, including public chains, consortium chains, and existing
systems; the connectivity of services is realized through the blockchain Internet.
102
Blockchain-based Service Network User Manual
The BSN city node gateway is adapted to the IRISnet JSON RPC API, so developers can
initiate transaction requests to the node gateway via HTTP JSON-RPC. For detailed docking
instructions please visit:
https://www.irisnet.org/docs/light-client/intro.html#rest-apis
The following table shows additional error code definitions for public city node gateway:
6.4.8 dfuse-eos
dfuse is a massively scalable open-source platform for searching and processing blockchain
data. It provides real-time, historical and fork-aware search engine (dfuse Search), transaction
push guarantees (dfuse Push Guarantee), transaction lifecycle (dfuse Lifecycle), historical state
services (dfuse State), and many more blockchain building blocks. dfuse empowers developers
with capabilities to build modern blockchain applications with fast, fluid interfaces that deliver
exceptional user experiences.
The current dfuse EOS mainnet access on BSN is available through dfuse Community Edition
hosted by EOS Nation. Try out the dfuse API features on the [GraphiQL playground]
(https://eos.dfuse.eosnation.io/graphiql).
If your needs exceed the Community Edition limits, please contact dfuse to set up an
[Enterprise plan] (https://dfuse.io/zh/pricing/?utm_source=BSN).
The BSN PCN gateway is equipped with sfuse's JSON RPC API and GraphQL, so developers
can issue EOSIO transaction requests to the node gateway via HTTP JSONrpc or GraphQL.
The following table shows additional error code definitions for public city node gateway:
6.4.9 Solana
103
Blockchain-based Service Network User Manual
The Solana Program Library (SPL) is a collection of on-chain programs targeting the Sealevel
parallel runtime. These programs are tested against Solana's implementation of Sealevel,
solana-runtime, and deployed to its mainnet. As others implement Sealevel, we will graciously
accept patches to ensure the programs here are portable across all implementations.
The BSN city node gateway is adapted to the Solana JSON RPC API and WSS, so developers
can initiate transaction requests to the node gateway via HTTP JSON-RPC. For detailed
docking instructions please visit: https://docs.solana.com/apps/jsonrpc-api
The following table shows additional error code definitions for public city node gateway:
6.4.10 ShareRing
ShareRing is built on distributed ledger technology, allowing for a transparent, decentralized
ecosystem.
The BSN city node gateway is adapted to the ShareRing JSON RPC API and WSS, so
developers can initiate transaction requests to the node gateway via HTTP JSON-RPC. For
detailed docking instructions please visit:
https://sharering.network/resources/ShareRing+API+Overview.pdf
The following table shows additional error code definitions for public city node gateway:
6.4.11 Algorand
104
Blockchain-based Service Network User Manual
Algorand built and developed the world’s first open, permissionless, pure proof-of-stake
blockchain protocol that, without forking, provides the necessary security, scalability, and
decentralization needed for today’s economy. With an award-winning team, Algorand enables
traditional finance and decentralized financial businesses to embrace blockchain for
decentralized applications.
The BSN city node gateway is adapted to the Algorand Rest API, so developers can initiate
transaction requests to the node gateway via Rest. Developers can also use Algorand SDK to
connect to BSN nodes for developing and deploying applications.
https://developer.algorand.org/docs/reference/sdks/
The following table shows additional error code definitions for public city node gateway:
6.4.12 BTY
BTY (Bityuan) is a simple, stable and scalable public chain network. It is developed using the
technology of Chain33 and is the world's first public chain project with a multi-chain
(parachain) architecture.
Multiple parachains can be developed on the BTY blockchain. The BTY’s main chain is
responsible for transaction settlement, and smart contracts and virtual machines are deprived
from the main chain and put on the parachain for independent executions, and multiple
parachains co-exist to improve computing efficiency. In addition, parachains can be
interconnected by the main chain.
At present, there are a number of application cases of parachain based on BTY public chain,
such as DeFi, C2C trading, royalty points, prepaid cards, games, real estate, commodities,
smart clearing, etc.
The BSN City Node Gateway is adapted to the BTY JSON RPC API, so developers can initiate
BTY transaction requests to the node gateway by means of JSON-RPC.
The following table shows additional error code definitions for public city node gateway:
105
Blockchain-based Service Network User Manual
6.4.14 Polkadot
Polkadot is a next-generation blockchain protocol that unites an entire network of purpose-built
blockchains, allowing them to operate seamlessly together at scale. Because Polkadot allows
any type of data to be sent between any type of blockchain, it unlocks a wide range of real-
world use cases. By bringing together the best features from multiple specialized blockchains,
106
Blockchain-based Service Network User Manual
Polkadot paves the way for new decentralized marketplaces to emerge, offering fairer ways to
access services through a variety of apps and providers. Polkadot’s design offers several
distinct advantages over existing and legacy networks, including heterogeneous sharding,
scalability, upgradeability, transparent governance and cross-chain composability.
The BSN city node gateway is adapted to the Polkadot JSON RPC API, so developers can
initiate transaction requests to the node gateway via HTTP JSON-RPC. For detailed docking
instructions please visit: https://polkadot.js.org/docs/substrate/rpc/#chain
The following table shows additional error code definitions for public city node gateway:
6.4.15 Casper
CasperLabs, the developer of the Casper Network, provides professional services and support
for organizations building on the Casper network. Guided by open-source principles,
CasperLabs is committed to supporting the next wave of blockchain adoption among
businesses and providing developers with a reliable and secure framework to build private,
public and hybrid blockchain applications. Its team possesses deep enterprise technology
experience, hailing from organizations including Google, Adobe, AWS, Dropbox and
Microsoft.
The BSN city node gateway is adapted to the Casper JSON RPC API, so developers can initiate
transaction requests to the node gateway via HTTP JSON-RPC. For detailed docking
instructions please visit:
https://docs.rs/casper-node/latest/casper_node/rpcs/index.html
The following table shows additional error code definitions for public city node gateway:
6.4.16 Findora
107
Blockchain-based Service Network User Manual
Findora’s mission is to build a decentralized financial network for issuing confidential assets
and smart contracts. Findora has created a system that achieves privacy-preserving
transparency. Its flexible technology can also be used by institutions to replace their current
infrastructure or deploy in the cloud – all interoperable with the public Findora network.
The BSN city node gateway is adapted to the Findora REST API, so developers can initiate
transaction requests to the node gateway via HTTP REST. For detailed docking instructions
please visit:
https://api.findora.org/
The following table shows additional error code definitions for public city node gateway:
6.4.17 Near
NEAR is a Proof-of-Stake Layer-1 public blockchain platform built with usability and
developer accessibility in mind. With a novel sharding mechanism called Nightshade, NEAR
can scale limitlessly and offers familiar user experiences just like the web today.
The BSN city node gateway is adapted to the Near JSON RPC API, so developers can initiate
transaction requests to the node gateway via HTTP JSON-RPC. For detailed docking
instructions please visit:
https://docs.near.org/docs/api/quickstart
The following table shows additional error code definitions for public city node gateway:
108
Blockchain-based Service Network User Manual
7 Interchain Services
A cross-chain mechanism is the interoperability between two or more relatively independent
blockchains, and it enables the swap and transfer of data, asset and information. On the BSN,
every blockchain maintains its own transactions, consensus, and ledgers, carrying business data
and information of different DApps. The cross-chain mechanism realizes data sharing and
business collaboration among blockchains, and to break the silos between chains, allows data
to flow securely and reliably across multiple chains. The main functions of the cross-chain
system include: cross-chain registration management mechanism, cross-chain contract
functions, cross-chain transaction verification, cross-chain message routing protocol, cross-
chain transaction atomicity guarantee, etc.
The BSN Interchain Communications Hub (ICH) adopts the cross-chain protocol of
heterogeneous chains and the design of double-layer structure, using relay chains as cross-
chain coordinators, multiple heterogeneous chains as cross-chain transaction executors, and
acts as a relayer of cross-chain data. By solving validity, security, and transactional issues of
cross-chain data, a secure, easy-to-use and efficient cross-chain system is implemented:
Supports both isomorphic and heterogeneous chains.
Supports any information to cross the chains.
Very easy to access. Application chains do not need to do custom development adaptation,
just deploy one smart contract per chain.
Transactional support, supporting not only scenarios with the need for ultimate consistency
of transactions, but also scenarios with the need for strong consistency of transactions,
with support for any transaction, and scalable to any number of chains.
Cross-chain protocols are secure and reliable, based on cryptography and consensus
algorithms, and each application chain can verify the legitimacy of cross-chain
transactions on its own, thus ensuring the security of cross-chain interactions.
The BSN’s “Interchain Communications Hub” (ICH) is now commercially available and
integrates with Onchain's Poly Enterprise cross-chain solution. It supports cross-chaining
between permissioned chains and cross-chaining between permissioned chains and ETH
Ropsten testnet and NEO testnet. The IRITA-based cross-chain solution is also being adapted
and is expected to be commercially available in the next iteration.
A demo version of ICH is also live on the BSN Testnet, integrating two interchain solutions
based on the relay chain mechanism: Poly Enterprise developed by Onchain and IRITA
109
Blockchain-based Service Network User Manual
developed by Bianjie AI. We welcome all developers to try out and provide feedback and
suggestions to us and we will continue to improve the interchain functionality.
For published permissioned services, publishers can open Interchain Services through the
Service Upgrade function:
On the home page, click Permissioned Services -> Published Services, click Service
Upgrade in the Action column to enter the service upgrade page.
In the Interchain Services section, select Yes to activate Interchain Services, and choose the
Interchain Service Protocol. Then, click Confirm to submit the service upgrade. After the
system review and approval, the Interchain Service is successfully opened.
110
Blockchain-based Service Network User Manual
Note: If you open Interchain Services only, you don't need to upload new chaincode package;
after opening the service, when calling across the chain, both source chain and target chain
need to communicate off the BSN about cross-chain parameters, methods and specifications.
Click Activate Interchain Services button to enter Select services page, click Activate
Interchain Services in the Action column.
The following steps can refer to Open the Interchain Service when upgrading the
permissioned service.
Note: For activated interchain services, users cannot change the interchain service protocols.
The protocol can only be changed by re-opening the interchain services.
111
Blockchain-based Service Network User Manual
Select the service to be checked, click View in the Action column, select Cross-chain
Information, users can check the chain ID, management contract address, management
contract name and cross-chain information.
On the Cross-chain Information page, click Details button to jump to Call Details page. Select
the parameter and click Query to retrieve the detailed cross-chain call information.
Go to List of cross-chain call details section, click Details button in Action column to enter
the Basic Information page, you can view the basic information of the cross-chain call details,
as shown in the figure:
112
Blockchain-based Service Network User Manual
On the home page, click Interchain Services, users can see a list of their activated interchain
services. Select the service which needs to be deactivated and click Deactivate button in
Action column.
Note: It takes a few minutes to deactivate the interchain service, please be patient.
On the home page, click Interchain Services, users can see a list of their activated interchain
services. Select the service which needs to be activated and click Activate button in Action
column.
113
Blockchain-based Service Network User Manual
114
Blockchain-based Service Network User Manual
115
Blockchain-based Service Network User Manual
An example of a specific cross-chain transaction call can be found in 7.2.2.3 Demo Contract
Example.
https://github.com/BSNDA/ICH/tree/main/sample/polychain/fabric-contract/online/hellopoly
/**
* @param _toChainId: The chain ID corresponding to the target chain being called in the
Poly network
116
Blockchain-based Service Network User Manual
* @return bool
**/
IEthCrossChainManagerProxy eccmp =
IEthCrossChainManagerProxy(managerProxyContract);
return true;
/**
* @return bool
**/
117
Blockchain-based Service Network User Manual
hearSomeThing = _somethingWoW;
return true;
}
Demo Contract Example
GitHub: https://github.com/BSNDA/ICH/tree/main/sample/polychain/eth_contracts/hellopoly
7.2.5 Interchain Services based on Neo Testnet
Application Contract Development Guide
The development of Neo application contract is based on its own business scenario. The main
implementation includes two parts: if the source chain initiates a cross-chain transaction, its
application contract needs to get outbound to access the target chain; if the target chain receives
a cross-chain transaction, its application contract needs to get inbound. Neo's chain ID in the
BSN Testnet is 4. This chain ID is registered in Poly Enterprise the configuration is applicable
to both BSN Production Environment and Testnet.
/// <summary>
/// This method is used to make cross-chain calls to other target chains (this method is
self-defining)
/// </summary>
/// <param name="msg">The cross-chain information that the target chain needs to
pass to apply the contract</param>
/// <returns></returns>
[DisplayName("say")]
118
Blockchain-based Service Network User Manual
// Event notification
HelloPoly.SayEvent(toChainId, toProxyHash);
return true;
/// <summary>
/// This method is used to make cross-chain calls to other target chains (this method is
self-defining)
/// </summary>
/// <returns></returns>
[DisplayName("hear")]
Storage.Put(fromProxyContract, inputBytes);
// Event notification
119
Blockchain-based Service Network User Manual
return true;
b. Service Core
As the core of the entire cross-chain contract, Service Core is responsible for receiving a cross-
chain request from the application contract, the request result from the relayer, and return the
120
Blockchain-based Service Network User Manual
121
Blockchain-based Service Network User Manual
Run the code below to obtain the BSN interchain consuming contract help package
(ICH.git). Currently, only the GO language version is supported but more versions will be
added later.
cd $GOPATH
mkdir -p src/github.com/BSNDA && cd src/github.com/BSNDA
git clone https://github.com/BSNDA/ICH.git
2. Initiate the interchain service request
After creating the Fabric chain code struct and invoke function, import below package:
import (
"github.com/BSNDA/ICH/sample/irita/consumers/fabric/crosschaincode"
)
3. Call the crosschaincode.CallService method in the invoke function using the parameters of
the method as follows:
• stub: shim.ChaincodeStubInterface
• serviceName: the interchain service name to invoke, nft for ETH, and bcos-store
for FISCO BCOS
• input: the input object for interchain service
• callbackCC: callback chaincode name
• callbackFcn: callback chaincode function name
• timeout: timeout
The input parameter varies according to the interchain service and type passed in. In the
ETH service, the input structure is as follows:
type Input struct {
ABIEncoded string `json:"abi_encoded,omitempty"`
To string `json:"to"`
AmountToMint string `json:"amount_to_mint"`
MetaID string `json:"meta_id"`
SetPrice string `json:"set_price"`
IsForSale bool `json:"is_for_sale"`
}
In the FISCO BCOS service, the input structure is as follows:
type BcosInput struct {
Value string `json:"value"`
}
A unique request ID will be returned after successful invocation. Keep this value and use
it to determine the cross-chain results in the callback function.
4. Implement the callback interface:
After the cross chaincode receives the service response from Fabric Relayer, the callback
method name and callback chaincode name passed in will be called to return the service
response. The first parameter of the call returns a JSON-formatted string. Below is the
service response structure:
type ServiceResponse struct {
122
Blockchain-based Service Network User Manual
123
Blockchain-based Service Network User Manual
request validation and status maintaining, which helps improve development efficiency.
The iService Client source code can be found in the Example Contract.
1. Import iService Client
To use the iService Client, import the corresponding contract path. For example:
import ServiceClient.sol
Note: You can directly use the iService Client code as a part of the consuming contract.
2. Inherit iService Client
contract <consuming-contract-name> is iServiceClient {
bytes32 _requestID,
serviceName,
124
Blockchain-based Service Network User Manual
requestInput,
timeout,
address(this),
this.callback.selector
);
Note: Developers need to retrieve information related to the service from the iService
Market Ex deployed on the application chain for the interchain service invocation, such
as the service name and schemas of the input and output.
4. NFT Service Consuming Contract Example
The NFT service is provided by the NFT contract on the Ethereum Ropsten to create NFT
assets.
The definition of the NFT service is as follows:
Service name:nft
Service Input JSON Schema:
{
"type": "object",
"properties": {
"to": {
"description": "address to which the NFT will be minted",
"type": "string"
},
"amount_to_mint": {
"description": "amount of the NFT to be minted",
"type": "string"
},
"meta_id": {
"description": "meta id",
"type": "string"
},
"set_price": {
"description": "price in Ethereum Wei",
"type": "string"
},
"is_for_sale": {
"description": "whether or not the minted NFT is for sale",
"type": "boolean"
}
}
125
Blockchain-based Service Network User Manual
126
Blockchain-based Service Network User Manual
8 Account Management
In the My Account page, the user can view details of their card and transactions they performed
on the network. To work with My Account, follow these steps:
1. In the User Center menu, click the dropdown to reveal the list, in the menu list, click My
Account to display the page.
2. To update the user Card Information, click the Update card information to display the
My Credit Card page. The user will be redirected to the Stripe website. The BSN portal
can never see and does not store credit card information.
3. Update the card details as needed and click Update.
5. In the Bill list, under the Status and Action columns, the user can perform certain actions
including Pay and Details on each bill. To pay a bill, click Pay and to View a bill, click
Details.
127
Blockchain-based Service Network User Manual
9 Online Documentation
White Papers
Name Version Update Details
BSN Introduction White paper V1.05 February 5th,2020 PDF
BSN Technical White Paper V1.0.0 April 25th,2020 PDF
Site Documents
Name Version Update Details
User Manual 1.4.1 March 19th,2021 Online PDF
Fabric Examples 1.0.1 April 24th,2020 Github
FISCO BCOS Examples 1.0.1 April 24th,2020 Github
SDK Examples 1.0.1 April 24th,2020 Github
Permissioned Frameworks
Name Official Website Details
Hyperledger Fabric https://www.hyperledger.org/ Github Documentation
FISCO BCOS http://fisco-bcos.org/ Github Documentation
Public Chains
Name Official Website Details
Nervos https://www.nervos.org/ Github Documentation
NEO https://neo.org/ Github Documentation
ETH https://ethereum.org/ Github Documentation
Tezos https://tezos.com/ Github Documentation
EOS https://eos.io/ Github Documentation
IRISNET https://www.irisnet.org/ Github Documentation
dfuse-eos https://www.dfuse.io/en/home/?utm_source=BSN Github Documentation
Algorand https://algorand.foundation/ Github Documentation
Solana https://solana.com/ Github Documentation
128
Blockchain-based Service Network User Manual
129
Blockchain-based Service Network User Manual
10 Contact Us
If you have any questions or find any errors in this manual, please contact us:
Email: support@bsnbase.com
130