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

publish a JS library that provides many of the functions of agoric-cli #10168

Closed
turadg opened this issue Sep 27, 2024 · 0 comments · Fixed by #10407
Closed

publish a JS library that provides many of the functions of agoric-cli #10168

turadg opened this issue Sep 27, 2024 · 0 comments · Fixed by #10407
Assignees
Labels
enhancement New feature or request

Comments

@turadg
Copy link
Member

turadg commented Sep 27, 2024

What is the Problem Being Solved?

We have JS code strewn about that spawns a process to call agoric or agops on the CLI. Since those are themselves implemented in JS, that's an unnecessary hop. Having it requires duplicating lots of logic, requires transforming all JS types to and from CLI arguments, and creates opportunities for bugs.

Description of the Design

Look at https://github.com/Agoric/agoric-3-proposals/blob/main/packages/synthetic-chain/src/lib/cliHelper.ts

Create a module that provides those functions directly from agoric-cli. It can be a subpath export of the package.

Alternately there could be a new package like agoric-commands that agoric-cli uses, but I think that's unnecessary separation. packages/agoric-cli provides the agoric package which has bin paths but can also provide module exports.

This could also help with,

Security Considerations

Execution would run in the single JS process instead of spawning.

Scaling Considerations

n/a

Test Plan

Usages in a3p-integration

Upgrade Considerations

n/a

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

Successfully merging a pull request may close this issue.

1 participant