-
Notifications
You must be signed in to change notification settings - Fork 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
Refactor ledger-related logic #229
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Base automatically changed from
denys/eng-2499-add-stx-support-for-ledger-accounts
to
develop
September 7, 2023 09:40
…enys/eng-2537-refactor-ledger-related-logic
teebszet
reviewed
Sep 11, 2023
teebszet
approved these changes
Sep 12, 2023
8 tasks
reminder: breaking changes in this, so the web-extension PR will have to be released along with this one |
|
teebszet
approved these changes
Sep 26, 2023
victorkirov
added a commit
that referenced
this pull request
Dec 11, 2023
* Include new collecitbles endpoints * Update name * Refactor ledger-related logic (#229) * Add STX support for Ledger accounts * Update `signLedgerStxTransaction` method to use `transactionBuffer` instead of `transaction` * Update package-lock.json * Fix typo in `addSignatureToStxTransaction` method * Update package-lock.json * Refactor ledger-related logic * Add more code description * Add `StacksRecipient` type to `transactions/stx.ts` * Use more constants instead of hardcoded values for ledger logic * Move `btc` and `stx` ledger functions to separate files inside `ledger` folder * Add `LedgerErrors` enum and throw an error when user rejects stx address * feat: add Ordinal UTXO from Xverse API functions (#246) * feat: add Ordinal UTXO from Xverse API functions * Add epic rarity * Release/v1.8.0 (#249) * release v1.8.0 * package-lock --------- Co-authored-by: Tim Man <[email protected]> * release: 1.8.1 (#250) * fix: update scure/btc to 1.1.0 to fix bip322 message signing (#251) * fix: update scure/btc to 1.1.0 to fix bip322 message signing * fix: pass tests * 1.8.2 (#252) --------- Co-authored-by: Den <[email protected]> Co-authored-by: Victor Kirov <[email protected]> Co-authored-by: Ken Liao <[email protected]> Co-authored-by: Tim Man <[email protected]>
victorkirov
added a commit
that referenced
this pull request
Dec 13, 2023
* init seed vault * updated seed vault utils * update seed vault storage impl * init aes gcm impl * move wallet encryption utils to seed vault * fix encryptDecryptMnemonic tests * updated lock file * moved tests to seed vault and added changePassword methods * code improvements * fix tests * general refactor * added unlock vault method and tests * store seed vault version * init * Add transaction actions and solvers * Move to different dir and add signing * fix types imports * fix some testnet issues * Add native segwit support * Add compilation options * Start on split * Add some more comments * savepoint * update crypto adapter interface * Simplify and implement split action * implement publish method * Add fee estimate in utxo selection logic * Refactor context addresses into payments and ordinals * added clearVault and isUnlocked util * Don't spend dust UTXOs * Split inscription ids into returned, sent and fees * Only fetch inscriptions on demand * only overwrite the stored seed when changing password * Add send and extract ordinals methods * Fetch ordinal IDs in batch * clean comments * update store seed methods and tests * Fix a few minor bugs from testing * expose overwrite seed flag * Revert "expose overwrite seed flag" This reverts commit a56fbd4. * feat: add Ordinal UTXO from Xverse API functions * init utxo cache * update cache with new utxo if missing in cache * updated utxo cache implementation * Get Ordinal collectible data from API (#3) * Include new collecitbles endpoints * Update name * Refactor ledger-related logic (#229) * Add STX support for Ledger accounts * Update `signLedgerStxTransaction` method to use `transactionBuffer` instead of `transaction` * Update package-lock.json * Fix typo in `addSignatureToStxTransaction` method * Update package-lock.json * Refactor ledger-related logic * Add more code description * Add `StacksRecipient` type to `transactions/stx.ts` * Use more constants instead of hardcoded values for ledger logic * Move `btc` and `stx` ledger functions to separate files inside `ledger` folder * Add `LedgerErrors` enum and throw an error when user rejects stx address * feat: add Ordinal UTXO from Xverse API functions (#246) * feat: add Ordinal UTXO from Xverse API functions * Add epic rarity * Release/v1.8.0 (#249) * release v1.8.0 * package-lock --------- Co-authored-by: Tim Man <[email protected]> * release: 1.8.1 (#250) * fix: update scure/btc to 1.1.0 to fix bip322 message signing (#251) * fix: update scure/btc to 1.1.0 to fix bip322 message signing * fix: pass tests * 1.8.2 (#252) --------- Co-authored-by: Den <[email protected]> Co-authored-by: Victor Kirov <[email protected]> Co-authored-by: Ken Liao <[email protected]> Co-authored-by: Tim Man <[email protected]> * integrate seed vault * Fix error msg * add todos * merge with public * integrate with utxo cache and use bundle schema * export UTXO cache * fix some bugs * Add send max btc function * Add combine UTXOs and improve recoverOrdinal * Refactor outputs to be post computed * fix output calc * Add fee output breakdown * fix txn signing on address class * Fix derivation for taproot * some bug fixes and functions * Add context tests * Change btc export name * add ledger support and simplify signing * Remove broken tests * Add dummy sign * Fix issues with change calculation * Fix dummy p2tr script * Fix cache set method * Fix issue with large change changing the vsize * Txn Context tests * Fix utxo cache tests * Add context tests * enhanced txn tests * add excludeOutpointList option * Add utils tests * add send utxo and split utxo tests * Added split utxo test and fixed bug * Add action processor tests * Add UTXO cache versioning and TTL * only sign dummy txn if inputs * Add missing await * remove duplicate export * Make output insc and satributes not optional * Switch wallet context to account type * inject esplora api provider * Expect ledger transport only on sign * remove unused function * Use wallet derivation path methods * Extract context create function to a factory file * Clean up exports * Rename satributes on outputs * default to software account * Fix export issue * Fix exports * Update axios * set axios version * Parse PSBTs (#315) * Add PSBT parsing * change from wallet bool to from address string * fix tests * Fix storage adapter export * fix fee rate calc and test import * Fix export of OrdinalsApi * Revert outspend changes * Update axios and move satribute identification to cache * Merge branch 'develop' of https://github.com/secretkeylabs/xverse-core into vic/psbt-parse * Remove type casting * Add PSBT types * PR review fixes * extract common PSBT and txn code to utils * Export enhanced PSBT types * Export transaction output types * Align txn and psbt return types * Fix limit in ordinals provider --------- Co-authored-by: Mahmoud <[email protected]> Co-authored-by: Imamah-Zafar <[email protected]> Co-authored-by: Den <[email protected]> Co-authored-by: Ken Liao <[email protected]> Co-authored-by: Tim Man <[email protected]>
teebszet
pushed a commit
that referenced
this pull request
Nov 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔘 PR Type
📜 Background
We'd like to refactor the ledger-related code to get rid of some tech debt.
Issue Link: #[ENG-2537]
Context Link (if applicable):
🔄 Changes
Does this PR introduce a breaking change?
Changes:
btc
andstx
ledger functions to separate files insideledger
folderImpact:
✅ Review checklist
Please ensure the following are true before merging: