-
Notifications
You must be signed in to change notification settings - Fork 63
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
bug(connect): message
creating invalid DataItems when used in Deno due to arweave-js crypto
usage.
#953
Comments
Hey @leeduckgo . Sorry you're seeing issues. We've definitely used
Perhaps |
Yep, I tried The |
Facing the same problem here. Dry running works fine but sending messages returns error 422 |
Thanks @leeduckgo @DevChanQ . Sounds like there is an issue when creating and signing the data item, and so the MU is responding with a This is most likely something to do with Deno's node compat layer, as FWIW, |
message
creating invalid DataItems when used in Deno - possibly createDataItemSigner
This is the issue:
ArweaveTeam/arweave-js#223
If someone wants to resolve, it will unlock being able to sign dataItems in
non-node environments
Thx
Tom
…On Thu, Aug 15, 2024 at 9:19 AM Tyler Hall ***@***.***> wrote:
Thanks @leeduckgo <https://github.com/leeduckgo> @DevChanQ
<https://github.com/DevChanQ> . Sounds like there is an issue when
creating and signing the data item, and so the MU is responding with a 422
Unprocessable Entity.
This is most likely something to do with Deno's node compat layer, as
createDataItemSigner provided OOTB with aoconnect uses node crypto and is
probably breaking somewhere. This will need further investigation.
FWIW, aoconnect allows for implementing your own data item signer
<https://github.com/permaweb/ao/tree/main/connect#createdataitemsigner>.
That is a potential workaround for Deno until this issue can be
investigated.
—
Reply to this email directly, view it on GitHub
<#953 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAFGLECFFHPPVFWXXRTTG3ZRSTH7AVCNFSM6AAAAABMIKEVSGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJRGI2TKMRWGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Managed to put together a solution that works within the Deno runtime by leveraging the Deno standard crypto module as the crypto driver. Since the standard crypto module implements the WebCrypto API, I was able to adapt the webcrypto driver implementation from here and have it use the Deno standard crypto module. Until the compatibility issues with Deno’s node crypto module are resolved, this approach seems to be the best alternative. Appreciate any feedback or suggestions you might have! Repo: https://github.com/DevChanQ/ao-deno-test |
message
creating invalid DataItems when used in Deno - possibly createDataItemSigner
message
creating invalid DataItems when used in Deno due to arweave-js crypto
usage.
Example Code, it ran well in node but not in deno.
Run Command:
deno run --allow-read --allow-write --allow-net --unstable-kv --unstable-cron -A ./test.js
Error Msg:
The text was updated successfully, but these errors were encountered: