Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update cyano dapi sdk init fn #695

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
46d6143
prod-doc
Sep 6, 2019
e2c6838
remove ds_store
Sep 6, 2019
4c7971c
update index
Sep 6, 2019
3ac270d
update ddxf
Sep 6, 2019
a394598
draft framework of ddxf
Sep 15, 2019
e425306
0916_trustanchor_eric
Sep 16, 2019
b5ef29f
change word
Sep 16, 2019
5ad4fa3
Merge pull request #1 from ErickYangs/master
javajoker Sep 16, 2019
4f92dd3
update signing-server and signing-sdk document
Sep 17, 2019
da9ead7
Merge pull request #2 from leej1012/master
javajoker Sep 18, 2019
bf0a893
business scenarios mp data and eshop words
Sep 18, 2019
8c211e4
Merge branch 'master' of https://github.com/ont-project/documentation
Sep 18, 2019
37edee9
update javadoc to EN
Sep 18, 2019
5824c28
over juder auditor consumer provider
Sep 19, 2019
5e7349a
pro
Sep 19, 2019
c755464
change type
Sep 19, 2019
aca5748
mp
Sep 20, 2019
e04355a
Merge remote-tracking branch 'upstream/master'
Sep 23, 2019
fccf70f
Merge pull request #3 from leej1012/master
javajoker Sep 23, 2019
f128aa4
words
Sep 23, 2019
d0ee3a4
Merge branch 'master' of https://github.com/ont-project/documentation
Sep 23, 2019
771cf92
add component list
Sep 23, 2019
61b76ba
update scenarios
Sep 23, 2019
e8e3cd4
Merge branch 'master' of https://github.com/ont-project/documentation
Sep 23, 2019
eba12c3
resource-incentive-share resource-publish doc
Sep 23, 2019
438db4d
add ddxf scenario draft
Sep 23, 2019
cf8b494
merge bug
Sep 24, 2019
f96c1ef
ddxf framework restful api
Sep 24, 2019
19f942e
add centralized solution
Sep 24, 2019
a63e583
scenarios/solutions word
Sep 24, 2019
0286a3d
Merge branch 'master' of https://github.com/ont-project/documentation
Sep 24, 2019
585e697
ddxf framework restful api
Sep 24, 2019
bb777ce
Merge remote-tracking branch 'upstream/master'
Sep 24, 2019
a0b0ec8
add javaDoc for data-storage-sdk&marketplace-sdk
Sep 24, 2019
2d221dc
Merge pull request #4 from ErickYangs/master
javajoker Sep 25, 2019
0587434
Merge pull request #5 from leej1012/master
javajoker Sep 27, 2019
8d1c8cc
Merge branch 'master' of https://github.com/ontio/documentation
ErickYangs Mar 25, 2021
c58e1c8
feat: udpate cyano dapi init fn
ErickYangs Mar 25, 2021
0d9ef01
feat: update dapi sdk init fn all word
ErickYangs Mar 25, 2021
5c24473
feat: change cyano params type
ErickYangs Mar 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
.DS_Store
8 changes: 5 additions & 3 deletions dev-website-docs/base/Cyano/dApi/01-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ontology-dapi can be used as CommonJS/ES6 module or directly referencing in web

### Install CommonJS/ES module
```
npm install ontology-dapi
npm install @ont-dev/ontology-dapi
```

### Import CommonJS
Expand Down Expand Up @@ -34,9 +34,11 @@ var client = dApi.client;
dApp needs to register itself as a client with the ontology-dapi library to enable the communication.

```
import { client } from 'ontology-dapi';
import { client, provider } from '@ont-dev/ontology-dapi';

client.registerClient({});
client.registerClient({
extension: provider.ExtensionType.Cyano
})
```

## Usage
Expand Down
33 changes: 23 additions & 10 deletions dev-website-docs/base/Cyano/dApi/02-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,24 @@ The document is broken down into the following sections:
[Architecture](#Architecture)

[Ontology dAPI Overview](#ontology-dapi-overview)
+ [dAPI Installation](#dapi-installation)
+ [dAPI Instantiation](#dapi-instantiation)
+ [Example dAPI methods](#example-dapi-methods)
+ [Example blockchain methods](#example-blockchain-methods)
+ [Example asset methods](#example-asset-methods)
+ [Example Smart Contract methods](#example-smart-contract-methods)
+ [Example Message methods](#example-message-methods)
- [Overview](#overview)
- [Setting up the Development Environment](#setting-up-the-development-environment)
- [Architecture](#architecture)
- [dAPI Usage](#dapi-usage)
- [dAPI Installation](#dapi-installation)
- [dAPI Instantiation](#dapi-instantiation)
- [Example dAPI methods](#example-dapi-methods)
- [Example blockchain methods](#example-blockchain-methods)
- [Example asset methods](#example-asset-methods)
- [Example Smart Contract Methods](#example-smart-contract-methods)
- [Example Message Methods](#example-message-methods)
- [Running the Demo Project](#running-the-demo-project)
- [How to set gaslimit and gasprice](#how-to-set-gaslimit-and-gasprice)
- [Writing a smart contract for your dApp](#writing-a-smart-contract-for-your-dapp)
- [Compiling and deploying your smart contract](#compiling-and-deploying-your-smart-contract)
- [Compiling your smart contract](#compiling-your-smart-contract)
- [Deploying your Smart Contract](#deploying-your-smart-contract)
- [Testing Smart Contract](#testing-smart-contract)

[Running the demo project](#running-the-demo-project)

Expand Down Expand Up @@ -54,17 +65,19 @@ Please ensure you have the following installed and configured in order to setup
The Ontology dAPI is the core API used to interface with the Ontology blockhain when creating a dApp and the repository can be found [here](https://github.com/ontio/ontology-dapi). First you must install the npm package using:

```
$ npm install ontology-dapi
$ npm install @ont-dev/ontology-dapi
```

#### dAPI Instantiation

To use the dAPI in your project, you need to import the library and then register as a client.
Import and register the dAPI using:
```
import { client } from 'ontology-dapi';
import { client, provider } from '@ont-dev/ontology-dapi';

client.registerClient({});
client.registerClient({
extension: provider.ExtensionType.Cyano
})
```

#### Example dAPI methods
Expand Down
8 changes: 5 additions & 3 deletions dev-website-docs/base/QuickGuide/06-dapi-useage.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,19 @@ Please ensure you have the following installed and configured in order to setup
The Ontology dAPI is the core API used to interface with the Ontology blockhain when creating a dApp and the repository can be found [here](https://github.com/ontio/ontology-dapi). First you must install the npm package using:

```
$ npm install ontology-dapi
$ npm install @ont-dev/ontology-dapi
```

#### dAPI Instantiation

To use the dAPI in your project, you need to import the library and then register as a client.
Import and register the dAPI using:
```
import { client } from 'ontology-dapi';
import { client, provider } from '@ont-dev/ontology-dapi';

client.registerClient({});
client.registerClient({
extension: provider.ExtensionType.Cyano
})
```

#### Example dAPI methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,19 @@ Please make sure the following softwares are installed:
When creating a dApp, Ontology DAPI is one of the core APIs for interacting with the Ontology blockchain, and the source code can be downloaded [here](https://github.com/ontio/ontology-dapi). Install Ontology-DAPI via ```npm```:

```
$ npm install ontology-dapi
$ npm install @ont-dev/ontology-dapi
```

#### DAPI example

When creating a DAPI example, first import ontology-dapi and register as follows:

```typescript
import { client } from 'ontology-dapi';
import { client, provider } from '@ont-dev/ontology-dapi';

client.registerClient({});
client.registerClient({
extension: provider.ExtensionType.Cyano
})
```

#### DAPI method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ dApi 支持 [Web环境](https://github.com/ontio-cyano/cyano-bridge)(仅支持
#### Chrome 版

```
npm install ontology-dapi
npm install @ont-dev/ontology-dapi
```

#### 移动版
Expand All @@ -202,8 +202,11 @@ npm install cyanobridge
#### Chrome 版

```
import {client} from 'ontology-dapi'
client.registerClient({})
import { client, provider } from '@ont-dev/ontology-dapi';

client.registerClient({
extension: provider.ExtensionType.Cyano
})
```

#### 移动版
Expand Down
8 changes: 5 additions & 3 deletions dev-website-docs/base/docs-cn/QuickGuide/06-dapi-useage.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,19 @@ DAPI是为基于Ontology开发的DAPP提供的轻量级去中心化API,支持D
创建dApp时,Ontology dAPI是与Ontology链交互的核心API之一,可以从这里下载源码。 [这里](https://github.com/ontio/ontology-dapi). 通过 ```npm``` 安装```ontology-dapi``` :

```
$ npm install ontology-dapi
$ npm install @ont-dev/ontology-dapi
```

#### dAPI 实例

创建dAPI 实例时,要先导入库ontology-dapi,并注册客户端:

```typescript
import { client } from 'ontology-dapi';
import { client, provider } from '@ont-dev/ontology-dapi';

client.registerClient({});
client.registerClient({
extension: provider.ExtensionType.Cyano
})
```

#### dAPI 方法
Expand Down
12 changes: 8 additions & 4 deletions dev-website-docs/base/docs-cn/cyano/03-ontology-dapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
你可以使用 `npm` 进行安装

```shell
npm install ontology-dapi
npm install @ont-dev/ontology-dapi
```

### CDN
Expand All @@ -26,13 +26,13 @@ npm install ontology-dapi
### CommonJS

```javascript
var client = require('ontology-dapi').client;
var client = require('@ont-dev/ontology-dapi').client;
```

### ES6 模块

```javascript
import { client } from 'ontology-dapi';
import { client } from '@ont-dev/ontology-dapi';
```

### Web require
Expand All @@ -46,7 +46,11 @@ import { client } from 'ontology-dapi';
## 初始化

```javascript
import { client } from 'ontology-dapi';
import { client, provider } from '@ont-dev/ontology-dapi';

client.registerClient({
extension: provider.ExtensionType.Cyano
})

var client = dApi.client;
client.registerClient({});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,19 @@ DAPI 使用 TypeScript 实现,同时也支持在 JavaScript 工程中使用。
创建 DApp 时,本体 DAPI 是与本体链交互的核心 API 之一,可以从 [这里](https://github.com/ontio/ontology-dapi) 下载源码。 通过 ```npm``` 安装 ontology-DAPI:

```
$ npm install ontology-dapi
$ npm install @ont-dev/ontology-dapi
```

#### DAPI 实例

创建 DAPI 实例时,要先导入库 ontology-dapi,并注册客户端,如下所示:

```typescript
import { client } from 'ontology-dapi';
import { client, provider } from '@ont-dev/ontology-dapi';

client.registerClient({});
client.registerClient({
extension: provider.ExtensionType.Cyano
})
```

#### DAPI 方法
Expand Down
12 changes: 7 additions & 5 deletions dev-website-docs/base/docs-kr/Cyano/dApi/01-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ ontology-dapi can be used as CommonJS/ES6 module or directly referencing in web

### Install CommonJS/ES module
```
npm install ontology-dapi
npm install @ont-dev/ontology-dapi
```

### Import CommonJS
```
var client = require('ontology-dapi').client;
var client = require('@ont-dev/ontology-dapi').client;
```

### Import ES6 module
```
import { client } from 'ontology-dapi';
import { client } from '@ont-dev/ontology-dapi';
```

### Web require
Expand All @@ -36,9 +36,11 @@ var client = dApi.client;
dApp needs to register itself as a client with the ontology-dapi library to enable the communication.

```
import { client } from 'ontology-dapi';
import { client, provider } from '@ont-dev/ontology-dapi';

client.registerClient({});
client.registerClient({
extension: provider.ExtensionType.Cyano
})
```

## Usage
Expand Down
33 changes: 23 additions & 10 deletions dev-website-docs/base/docs-kr/Cyano/dApi/02-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,24 @@ The document is broken down into the following sections:
[Architecture](#Architecture)

[Ontology dAPI Overview](#ontology-dapi-overview)
+ [dAPI Installation](#dapi-installation)
+ [dAPI Instantiation](#dapi-instantiation)
+ [Example dAPI methods](#example-dapi-methods)
+ [Example blockchain methods](#example-blockchain-methods)
+ [Example asset methods](#example-asset-methods)
+ [Example Smart Contract methods](#example-smart-contract-methods)
+ [Example Message methods](#example-message-methods)
- [Overview](#overview)
- [Setting up the Development Environment](#setting-up-the-development-environment)
- [Architecture](#architecture)
- [dAPI Usage](#dapi-usage)
- [dAPI Installation](#dapi-installation)
- [dAPI Instantiation](#dapi-instantiation)
- [Example dAPI methods](#example-dapi-methods)
- [Example blockchain methods](#example-blockchain-methods)
- [Example asset methods](#example-asset-methods)
- [Example Smart Contract Methods](#example-smart-contract-methods)
- [Example Message Methods](#example-message-methods)
- [Running the Demo Project](#running-the-demo-project)
- [How to set gaslimit and gasprice](#how-to-set-gaslimit-and-gasprice)
- [Writing a smart contract for your dApp](#writing-a-smart-contract-for-your-dapp)
- [Compiling and deploying your smart contract](#compiling-and-deploying-your-smart-contract)
- [Compiling your smart contract](#compiling-your-smart-contract)
- [Deploying your Smart Contract](#deploying-your-smart-contract)
- [Testing Smart Contract](#testing-smart-contract)

[Running the demo project](#running-the-demo-project)

Expand Down Expand Up @@ -54,17 +65,19 @@ Please ensure you have the following installed and configured in order to setup
The Ontology dAPI is the core API used to interface with the Ontology blockhain when creating a dApp and the repository can be found [here](https://github.com/ontio/ontology-dapi). First you must install the npm package using:

```
$ npm install ontology-dapi
$ npm install @ont-dev/ontology-dapi
```

#### dAPI Instantiation

To use the dAPI in your project, you need to import the library and then register as a client.
Import and register the dAPI using:
```
import { client } from 'ontology-dapi';
import { client, provider } from '@ont-dev/ontology-dapi';

client.registerClient({});
client.registerClient({
extension: provider.ExtensionType.Cyano
})
```

#### Example dAPI methods
Expand Down
8 changes: 5 additions & 3 deletions dev-website-docs/base/docs-kr/QuickGuide/06-dapi-useage.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,19 @@ Please ensure you have the following installed and configured in order to setup
The Ontology dAPI is the core API used to interface with the Ontology blockhain when creating a dApp and the repository can be found [here](https://github.com/ontio/ontology-dapi). First you must install the npm package using:

```
$ npm install ontology-dapi
$ npm install @ont-dev/ontology-dapi
```

#### dAPI Instantiation

To use the dAPI in your project, you need to import the library and then register as a client.
Import and register the dAPI using:
```
import { client } from 'ontology-dapi';
import { client, provider } from '@ont-dev/ontology-dapi';

client.registerClient({});
client.registerClient({
extension: provider.ExtensionType.Cyano
})
```

#### Example dAPI methods
Expand Down
9 changes: 6 additions & 3 deletions dev-website-docs/docs-cn/QuickGuide/00-dapp_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ dAPI 支持 [Web环境](https://github.com/ontio-cyano/cyano-bridge)(仅支持
#### ① Chrome 版

```shell
npm install ontology-dapi
npm install @ont-dev/ontology-dapi
```

#### ② 移动版
Expand All @@ -194,8 +194,11 @@ npm install cyanobridge
#### ① Chrome 版

```javascript
import {client} from 'ontology-dapi'
client.registerClient({})
import { client, provider } from '@ont-dev/ontology-dapi';

client.registerClient({
extension: provider.ExtensionType.Cyano
})
```

#### ② 移动版
Expand Down
8 changes: 5 additions & 3 deletions dev-website-docs/docs-cn/QuickGuide/06-dapi-useage.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,19 @@ DAPI是为基于Ontology开发的DAPP提供的轻量级去中心化API,支持D
创建dApp时,Ontology dAPI是与Ontology链交互的核心API之一,可以从这里下载源码。 [这里](https://github.com/ontio/ontology-dapi). 通过 ```npm``` 安装```ontology-dapi``` :

```
$ npm install ontology-dapi
$ npm install @ont-dev/ontology-dapi
```

#### dAPI 实例

创建dAPI 实例时,要先导入库ontology-dapi,并注册客户端:

```typescript
import { client } from 'ontology-dapi';
import { client, provider } from '@ont-dev/ontology-dapi';

client.registerClient({});
client.registerClient({
extension: provider.ExtensionType.Cyano
})
```

#### dAPI 方法
Expand Down
Loading