Skip to content

Commit

Permalink
Update node.js_sdk_quick_start.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Bachamht authored Apr 11, 2024
1 parent 4907ca9 commit bf2da50
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions 2.x/docs/articles/4_tools/44_sdk/node.js_sdk_quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ Node.js SDK依赖下列软件:

```
const Configuration = require('./nodejs-sdk/packages/api/common/configuration').Configuration;
Configuration.setConfig(path.join(__dirname, args.config));
const configFilePath = path.join(__dirname, 'Path to config.json');
const configuration = new Configuration(configFilePath);
```

2、获取当前块高的API位于Web3jService中,构造一个该对象:

```
const Web3jService = require('./nodejs-sdk/packages/api').Web3jService;
let web3jService = new Web3jService();
let web3jService = new Web3jService(configuration);
```

3、调用Web3jService的getBlockNumber接口,获取返回值并在控制台中输出:
Expand Down Expand Up @@ -110,4 +111,4 @@ Node.js SDK除了提供API外,还提供了一个小巧的CLI工具供用户直

## 五、Node.js SDK的未来需要你

当前,Node.js SDK还在成长,在某些地方仍然需要进一步打磨,比如需要CLI工具能够解析SQL语句,或者SDK的性能需要优化……秉承开源的精神,我们相信社区的能量能够将Node.js SDK 变得更加方便易用,欢迎广大开发者踊跃在issue或PR中贡献自己的idea和力量!
当前,Node.js SDK还在成长,在某些地方仍然需要进一步打磨,比如需要CLI工具能够解析SQL语句,或者SDK的性能需要优化……秉承开源的精神,我们相信社区的能量能够将Node.js SDK 变得更加方便易用,欢迎广大开发者踊跃在issue或PR中贡献自己的idea和力量!

0 comments on commit bf2da50

Please sign in to comment.