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

Hydra SDK V1 #7

Draft
wants to merge 4 commits into
base: dshuiski/docs
Choose a base branch
from
Draft

Hydra SDK V1 #7

wants to merge 4 commits into from

Conversation

errfrom
Copy link
Member

@errfrom errfrom commented Dec 6, 2024

Closes Hydra SDK V1 Roadmap #6.

CHANGELOG:

  1. Switched to the fork of the latest version of purescript-codec-argonaut: https://github.com/errfrom/purescript-codec-argonaut.
    • The fork was necessary to restore compatibility with earlier PureScript versions that lack support for visible type applications.
  2. Replaced the custom helpers sumGenericCodec and fixTaggedSumCodec with the newly introduced functions for handling generic sum types from purescript-codec-argonaut.
  3. Removed the CTL spago dependency.
  4. Switched to partysocket for WebSocket handling.
    • This library, actively maintained as part of the PartyKit, provides essential features such as auto-reconnection and message buffering, which is crucial for stable and predicatable interactions with the Hydra Node API.
  5. Minimal example: Bumped CTL to the latest version.
  6. HydraTx: Changed cborHex type from Transaction to CborBytes to avoid unnecessary decoding of Commit transactions before submission, which often leads to invalidation of signatures, auxiliary data, and script integrity hashes. The underlying cause is that Transaction generally lacks the deserialization-serialization roundtrip property.
    • NOTE: CTL does not currently provide a way to submit transaction CBOR as-is without first decoding it to a Transaction. This should ideally be addressed upstream. However, it's important to note that the Hydra SDK does not imply the use of any specific backend for transaction building.
  7. mkHydraNodeApiWebSocket now supports an optional headStatusHandler, invoked whenever the Head status changes.
    • This addresses a UX concern where the user previously had to manually maintain the current Head state.

@errfrom errfrom self-assigned this Dec 6, 2024
This should significantly reduce startup time if a suitable utxo
is found in the hydra-node wallet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant