-
Notifications
You must be signed in to change notification settings - Fork 0
release 0.5.0 #19
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
release 0.5.0 #19
Conversation
…Moonlight transaction builder
…function for type safety
…up 🧹 - Deleted `index.ts` from `src/pool/` as it was exporting an unused module. - Removed `index.ts`, `types.ts`, and `index.unit.test.ts` from `src/pool/pool-engine/` to eliminate unnecessary code and improve maintainability.
…ts and types - Added constants for AuthReadMethods and AuthInvokeMethods in `src/channel-auth/constants.ts`. - Introduced `PrivacyChannel` class in `src/privacy-channel/index.ts` to manage channel interactions. - Created types for channel operations in `src/privacy-channel/types.ts`, including read and invoke methods. - Established contract specifications using `Spec` for both authentication and channel operations.
- Added JSDoc comments to the `require`, `getclient`, `getAuthId`, `getNetworkConfig`, `getDerivator`, and `getChannelId` methods. - Improved documentation clarity by specifying return types and potential errors for better developer understanding and usage.
…s instead of direct invocation
… in PrivacyChannel class 🛠️
…references in PrivacyChannel class
…larity in channel authentication context
…uth class for accessibility
…hannel class for improved accessibility
… clarity in channel authentication context 🔧
…rity in channel context 🔧
…ve project maintainability
…ency versions for improved compatibility
… client initialization, contract interaction, and provider management
…tation - Updated import statement in src/operation/index.ts to reference the correct deposit-auth-entry.ts file. - Deleted obsolete src/utils/auth/deposit-auth-entry copy.ts file. - Renamed function in src/utils/auth/deposit-auth-entry.ts from generateDepositAuthEntry to buildDepositAuthEntry for consistency.
…e retrieval - Introduced a new method `getBalancesFetcher` in the `PrivacyChannel` class. - This method returns a function that fetches balances for given UTXO public keys. - Updated imports to include `UTXOPublicKey` and `Buffer` for handling UTXO data. - Enhanced readability by updating comments in the code.
… pre-configured transaction builders
…ount management - Implemented getUTXOAccountHandler in PrivacyChannel to create and return a UtxoBasedStellarAccount handler pre-configured for the privacy channel. - Added GetUTXOAccountHandlerArgs type to define the arguments required for the new method. - Updated types.ts to include Ed25519SecretKey in imports and defined the new GetUTXOAccountHandlerArgs type. - Modified index.ts in utxo-based-account to adjust the constructor to accept UTXOBasedAccountContructorArgs.
…r, and getUTXOAccountHandler methods in PrivacyChannel; change import to type for UTXOBasedAccountContructorArgs
…XOAccountHandler method in PrivacyChannel
…g-functions-to-channel-client
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This release (0.5.0) enhances the Moonlight SDK with new convenience methods for PrivacyChannel and improved type safety through extracted constructor argument types for UTXO-based accounts.
- Added three helper methods to
PrivacyChannelfor easier integration with UTXO-based accounts:getBalancesFetcher,getTransactionBuilder, andgetUTXOAccountHandler - Extracted
UTXOBasedAccountConstructorArgstype for improved code maintainability and type reuse - Introduced
GetUTXOAccountHandlerArgstype for type-safe UTXO account handler construction
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| deno.json | Bumped SDK version from 0.4.0 to 0.5.0 to reflect new features |
| src/utxo-based-account/types.ts | Added UTXOBasedAccountConstructorArgs type definition and imported BaseDerivator |
| src/utxo-based-account/index.ts | Refactored constructor to use extracted UTXOBasedAccountConstructorArgs type |
| src/privacy-channel/types.ts | Added GetUTXOAccountHandlerArgs type and imported necessary dependencies |
| src/privacy-channel/index.ts | Added three new helper methods (getBalancesFetcher, getTransactionBuilder, getUTXOAccountHandler) to facilitate UTXO-based account operations |
…accurate reporting
- Removed unused properties and methods from PrivacyChannel, including _derivator and related methods. - Simplified getDerivator method to create a new StellarDerivator instance directly. - Added static methods in UtxoBasedStellarAccount and MoonlightTransactionBuilder to create instances from PrivacyChannel, enhancing integration. - Updated integration tests to utilize new static methods for creating transaction builders and UTXO account handlers, improving test clarity and maintainability.
…romPrivacyChannel method
This pull request introduces several enhancements and refactorings to the privacy channel and UTXO-based account modules, focusing on better type safety, extensibility, and convenience for users of the SDK. The most notable changes are the addition of new helper methods to the
PrivacyChannelclass for easier integration with UTXO-based accounts, and the extraction of constructor argument types to improve code maintainability.Privacy channel enhancements:
Added
getBalancesFetcher,getTransactionBuilder, andgetUTXOAccountHandlerhelper methods to thePrivacyChannelclass, making it easier to interact with UTXO-based Stellar accounts and build transactions in a pre-configured manner. (src/privacy-channel/index.tssrc/privacy-channel/index.tsR153-R219)Introduced the
GetUTXOAccountHandlerArgstype for thegetUTXOAccountHandlermethod, enabling type-safe construction of UTXO-based account handlers with customizable options. (src/privacy-channel/types.tssrc/privacy-channel/types.tsR81-R96)UTXO-based account refactoring:
UTXOBasedAccountConstructorArgstype to a dedicated type definition, and updated theUtxoBasedAccountconstructor to use this type, improving clarity and extensibility for account instantiation. (src/utxo-based-account/types.ts[1]src/utxo-based-account/index.ts[2]Dependency and version updates:
0.4.0to0.5.0to reflect the new features and API changes. (deno.jsondeno.jsonL3-R3)Type import improvements:
src/privacy-channel/index.ts[1]src/privacy-channel/types.ts[2]src/utxo-based-account/index.ts[3]src/utxo-based-account/types.ts[4]