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

Modify the word client #794

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
16 changes: 8 additions & 8 deletions docs/participate/run-nodes/enable-liteserver-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ It will create `/usr/bin/ton/local.config.json` on your machine where mytonctrl
<TabItem value="js" label="JavaScript">

```bash
npm i --save ton-core ton-lite-
npm i --save ton-core ton-lite-client
```

</TabItem>
Expand All @@ -158,13 +158,13 @@ It will create `/usr/bin/ton/local.config.json` on your machine where mytonctrl

```bash
go get github.com/xssnick/tonutils-go
go get github.com/xssnick/tonutils-go/lite
go get github.com/xssnick/tonutils-go/liteclient
go get github.com/xssnick/tonutils-go/ton
```
</TabItem>
</Tabs>

2. Initialize a and request masterchain info to ensure the liteserver is running.
2. Initialize a client and request masterchain info to ensure the liteserver is running.

<Tabs groupId="code-examples">
<TabItem value="js" label="JavaScript">
Expand All @@ -179,9 +179,9 @@ Change project type to `module` in your `package.json` file:

Create `index.js` file with the following content:
```js
import { LiteSingleEngine } from 'ton-lite-/dist/engines/single.js'
import { LiteRoundRobinEngine } from 'ton-lite-/dist/engines/roundRobin.js'
import { Lite } from 'ton-lite-/dist/.js'
import { LiteSingleEngine } from 'ton-lite-client/dist/engines/single.js'
import { LiteRoundRobinEngine } from 'ton-lite-client/dist/engines/roundRobin.js'
import { LiteClient } from 'ton-lite-client/dist/client.js'
import config from './config.json' assert {type: 'json'};


Expand All @@ -204,8 +204,8 @@ Create `index.js` file with the following content:
}));

const engine = new LiteRoundRobinEngine(engines);
const = new Lite({ engine });
const master = await .getMasterchainInfo()
const client = new LiteClient({ engine });
const master = await client.getMasterchainInfo()
console.log('master', master)

}
Expand Down