Ants block chain BaaS platform application development guide (B): Preparations

Ready to work

After obtaining the qualification to the developer, the developer can go to the beginners guide plate blocks were linked into the development of the preparatory work: Prepare the keys and familiar with the environment and tools .
Ants block chain BaaS platform application development guide (B): Preparations

If the Union is to have an independent developer chain on BaaS platform, please go to my alliance in view owned by the chain;
if the block chain innovation contest is to participate developer, please block chain innovation competition section view provided chain.

Ants block chain currently offers as evidence chain contract chain and two types of chain, chain difference is mainly reflected in the SDK and API. SDK and API contract chain richer, while also providing as evidence links the mouth, it can be considered a superset of the contract chain store chain of evidence. Therefore, this blog will focus on the development of the contract chain.

Certificate Request

  1. Beginners guide on screen, find the contract chain experience card:
    Ants block chain BaaS platform application development guide (B): Preparations
    or to find the target chain management interface in the chain, such as contract chain , then click on the application for a certificate:
    Ants block chain BaaS platform application development guide (B): Preparations

  2. In the pop-up page, select the automatically generated key and certificate :
    Ants block chain BaaS platform application development guide (B): Preparations

If there is a subsequent developer manually generate a certificate needs to be reset select a certificate, and reference herein further configuration.

  1. Submit the information required to generate a certificate, be sure to remember the password set here:
    Ants block chain BaaS platform application development guide (B): Preparations
  1. Download generated certificates ( client.crt) and private key ( clint.keythe private key password is the password set in the previous step):
    Ants block chain BaaS platform application development guide (B): Preparations

  2. create Account:
    Ants block chain BaaS platform application development guide (B): Preparations

这里需要注意,这里创建的是当前链上的第一个初始账户。一个机构,可以有多个账户。开发者后续可以通过SDK或控制台创建更多的账户。

  1. 下载账户的公私钥(pub.txtuser.key)和恢复公私钥(recovery_pub.txtrecovery_user.key):
    Ants block chain BaaS platform application development guide (B): Preparations

这里私钥的密码对应上一步中设置的账户密码。

证书、私钥的进一步解释

对于刚刚接触蚂蚁区块链到开发者来说,这里的证书、公私钥的概念容易混淆。这里做一个更详细到解释:
到这一步,一共下载了如下几个文件:

  • client.crt:CA给当前用户(机构)签发的×××书。
  • client.key:CA给当前用户(机构)签发证书的私钥。

    需要注意一下用户和账户的区别,一个用户(机构),可以有多个账户。
    在当前环境下,CA是一个名为www.alipay.com的自签名CA。

  • user.key:初始账户的私钥
  • pub.txt:初始账户的公钥
  • recovery_user.key:初始账户的恢复私钥
  • recovery_pub.txt:初始账户的恢复公钥

Cloud IDE:在线调试部署智能合约

接触过以太坊开发的同学一定不会对Remix集成开发调试环境感到陌生。蚂蚁BaaS平台同样提供了一个这样在线合约编译调试部署的工具,Could IDE。Cloud IDE提供了以下核心功能:

  • 合约编辑与编译,展示编译结果字节码和接口说明(ABI)。
  • 合约的部署和调用;提供默认体验链环境和测试账户,用来部署和调用合约。
  • 解析合约方法的返回值、事件日志等,辅助调试合约;保存合约到 BaaS 合约管理。

在体验链卡片上,点击调试合约就可以进入Could IDE的界面:
Ants block chain BaaS platform application development guide (B): Preparations

托管联盟链和区块链大赛的开发者,需要点击 合约管理 > 新建合约工程 进入该界面:
Ants block chain BaaS platform application development guide (B): Preparations

CouldIDE主界面如下:
Ants block chain BaaS platform application development guide (B): Preparations

区块链浏览器

Block chain browser can help developers quickly see the operation of the block chain to view and query block node information and transaction details.
For the novice experience section of the contract chain experience , after the completion of the certificate request, just return to the interface, you can see more than two choices on the block chain Cards: Details and commissioning contract .
Ants block chain BaaS platform application development guide (B): Preparations
If the league is hosted chain or chain block chain innovation contest, the interface is as follows:
Ants block chain BaaS platform application development guide (B): Preparations

Click on the details , you can enter the details page of a current block chain:
Ants block chain BaaS platform application development guide (B): Preparations

On this page, you can view the current chain specific access node information and IP ( subsequent access SDK needs to obtain an IP address from the developer here ):
Ants block chain BaaS platform application development guide (B): Preparations

On this page, you can go to view specific information and block transactions and transactions in accordance with the block hash hash.
Ants block chain BaaS platform application development guide (B): Preparations

summary

Preparatory work, must pay attention to manage certificates, private keys and the corresponding password. According to the document carefully configured development environment, and bearing in mind the private key password.

Guess you like

Origin blog.51cto.com/14321927/2418701