Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Inside lisk console command not able to access any objects #8000

Closed
Tracked by #7210
ishantiw opened this issue Jan 12, 2023 · 0 comments · Fixed by #8023
Closed
Tracked by #7210

Inside lisk console command not able to access any objects #8000

ishantiw opened this issue Jan 12, 2023 · 0 comments · Fixed by #8023

Comments

@ishantiw
Copy link
Contributor

Expected behavior

When we run lisk console command it should enter REPL and user should be able to access exported objects from lisk-client

Actual behavior

When we run lisk console command it enters REPL but is not able access any object exported from lisk-client like cryptography, apiClient, etc

Steps to reproduce

Run lisk console and try to access any object such as cryptography

Which version(s) does this affect? (Environment, OS, etc...)

6.0.0-alpha.10

@has5aan has5aan self-assigned this Jan 16, 2023
shuse2 pushed a commit that referenced this issue Jan 18, 2023
### What was the problem?

This PR resolves #8000

### How was it solved?

Defined elements property set to the exports of `@liskhq/lisk-client` on
`REPLServer.context` for console command.
 
### How was it tested?
Implemented unit tests.

Execute `console` command; `./examples/pos-mainchain/bin/run console`
and access `lisk.{desired module}`.
An example would be to execute
`lisk.cryptography.utils.hash(Buffer.from('space force'))`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants