Home

Awesome

There are some differences between README.md and README-cn.md.
Please reference README-cn.md first.

GoDoc Go Report Card Build Status codecov

中文
EN
한국어
日本語

Introduction

Through SDK for data exchange with blockchain, developers can get easy access to DAPP development. It mainly includes data encryption and decryption, signature, smart contract, event notification, data storage API, data acquisition and search, digital currency payment, third party APP payment API and so on.The process is as following:
Data provider inputs data and metadata through SDK (data includes static data and dynamic data which have the agreed format; metadata mainly includes data signature, data description and etc). Data demander can find the required data through SDK and obtain the data after paying digital currency. The data verifier can be qualified by pledging a certain amount of digital currency to the smart contract. In the process of data exchange, the data demander can initiate the compensable data verification request or transaction arbitration to the smart contract, and the verifier will be randomly selected by the smart contract. All participants in the data exchange can score each other in the transaction;The smart contract would record the transaction and scores of the participants thus generate the reputation evaluation of the participants which can be inquired through SDK

Windows

Compile

Compile environment

The following environment should be installed yourself. Excepted environment(like webpack, truffle) and optional environment(like python) is not listed here
The following is suggested version that has been tested

Package UI source files:

We assume that you have finished node.js download and installation

Run webpackUI.ps1 script in dp/app/app/ui/tool content to finish this process You can control whether to display webpack result analysis through bundleAnalyzerReport in ui/config/index.js

Build app executable file:

Run: go build in dp/app/app/main content,entrance file: main.exe will be generated if succeeded.

Run

Prerequisites

Start user service:

Run user service executable file in dp/services/auth_s content,default port is 48080

ipfs connection:

We assume that you have finished ipfs download and installation

"API": {
  "HTTPHeaders": {
    "Server": [
      "go-ipfs/0.4.14"
    ],
    "Access-Control-Allow-Origin": [
      "*"
    ],
    "Access-Control-Allow-Credentials": [
      "true"
    ],
    "Access-Control-Allow-Methods": [
      "POST"
    ]
  }
},

Since app use js to upload ipfs ,so "permit ipfs Cross-domain execute post request" config is added above

Build one private chain:

We assume that you have finished geth download and installation

Run geth_init.ps1 script in dp/backend/contracts/geth_init content to finish private chain building
Run geth_acc_mine.ps1 script in the same content to create user and start mining

Deploy smart contract:

Run contract.ps1 script in dp/backend/contracts/tool content to finish this process Script will input part of result to migrate.log in dp/backend/contracts content, ScryTokenScryProtocol two 42-character address with "0x" in the beginning can be found in the file end

Adjust app config file:

keyvalue
app.chain.contracts.tokenAddrAdjust to ScryToken address found in logfile
app.chain.contracts.protocolAddrAdjust to ScryProtocol address found in logfile
app.chain.contracts.deployerKeyjsonAdjust to unique file contents under dp/dots/binary/contracks/geth_init/chain/keystore content,pay attention to double quotes
app.config.uiResourcesDirAdjust the content of dp
app.config.ipfsOutDirAdjust to your selected ipfs download path

Experience

After finishing all process above, you can experience it through dp/app/app/main/main.exe entrance file

Exception handling:

Code Style -- Go

ScryInfo Protocol Layer SDK API Document v0.0.5