2021-11-12 16:19:16 +03:00
|
|
|
# Run example locally
|
2021-12-06 14:27:06 -06:00
|
|
|
1. Go to `local-network`
|
2021-11-12 16:19:16 +03:00
|
|
|
2. Run `docker compose up -d` to start Fluence node
|
|
|
|
3. Go back to `../example`
|
2021-12-06 20:17:45 +03:00
|
|
|
4. Run `npm i`
|
|
|
|
5. Run `npm run start`
|
|
|
|
|
|
|
|
## How to use
|
|
|
|
1. Add the following to your dependencies
|
|
|
|
- `@fluencelabs/trust-graph`
|
|
|
|
- `@fluencelabs/aqua`
|
|
|
|
- `@fluencelabs/aqua-lib`
|
|
|
|
- `@fluencelabs/fluence`
|
|
|
|
- `@fluencelabs/fluence-network-environment`
|
|
|
|
|
|
|
|
2. Import dependencies
|
|
|
|
```typescript
|
|
|
|
import * as tg from "./generated/export";
|
|
|
|
import { Fluence, KeyPair } from "@fluencelabs/fluence";
|
|
|
|
import { krasnodar, Node } from "@fluencelabs/fluence-network-environment";
|
|
|
|
```
|
|
|
|
3. Add root and issue self-signed root trust.
|
|
|
|
4. For now, you can sign trusts/revocations only on js side with KeyPair.
|