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

Bring back repl command #1097

Open
mikedotexe opened this issue Feb 16, 2024 · 2 comments
Open

Bring back repl command #1097

mikedotexe opened this issue Feb 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@mikedotexe
Copy link
Contributor

mikedotexe commented Feb 16, 2024

There are quite a few useful things you can do with the repl, particularly with regards to utilities like formatting NEAR and getting public keys from private keys.

Would be great to undelete that command if it's possible

@mikedotexe mikedotexe added the enhancement New feature or request label Feb 16, 2024
@gagdiez
Copy link
Contributor

gagdiez commented Mar 1, 2024

hey @mikedotexe , I hear you, and I see the use cases. What if we add the command:

near convert [--yoctoToNear] [--nearToYocto] [--secretKeyToPublic]

This way, the code would be compact, and super safe.

Having a whole JS interpreter in the command line is a bit of an overkill, and if I remember correctly, it adds lot of code and logic (+ multiple dependencies) to maintain.

I can add it back, but right now I am aiming for "maintainable" code - since apparently I am the only maintainer - more than "UX at any cost". If by just having a simple convert we can survive, I would strongly prefer that.

Let me know what you think

@gagdiez
Copy link
Contributor

gagdiez commented Mar 5, 2024

@mikedotexe what do you think of this:

near convert --yocto <number>

# Yocto: <> NEAR: <>
near convert --near <float>

# Yocto: <> NEAR <>
near convert --privateKey <>

# Public:
# Private:
# Phrase
near convert --secretKey <>

# Public:
# Private:
# Phrase

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants