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

No ability to call transaction with arbitrary bytes for args #431

Closed
austinabell opened this issue Aug 30, 2022 · 1 comment
Closed

No ability to call transaction with arbitrary bytes for args #431

austinabell opened this issue Aug 30, 2022 · 1 comment
Labels
change-request A request to change an existing component or feature

Comments

@austinabell
Copy link

The interface makes no sense because it does not allow passing args as bytes. This is necessary for any non JSON object parameters.
The type for a function call action is here:

and the type used in signAndSendTransaction:

This is extremely limiting because it not only doesn't allow all JSON, only objects, but it doesn't allow borsh or any other serialization format.

If #405 was implemented, there would be at least a workaround for this from a consumer of this library

Not sure why the args parameter in action is not just a buffer, and then you can keep the high-level APIs if you want to auto-serialize an object to JSON

@austinabell austinabell added the change-request A request to change an existing component or feature label Aug 30, 2022
@austinabell
Copy link
Author

oh, nevermind, seems like deeply nested the utils used in near-api-js allow passing Uint8Array and it ignores validation. Closing for now because I'm assuming this is workable, assuming all wallet impls use these utils

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change-request A request to change an existing component or feature
Projects
None yet
Development

No branches or pull requests

1 participant