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 node.js_sdk_quick_start.md #1792

Merged
merged 6 commits into from
Apr 17, 2024
Merged
Changes from all commits
Commits
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
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和力量!
Loading