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

feat: use xord for ordinal detection #203

Merged
merged 12 commits into from
Aug 10, 2023

Conversation

victorkirov
Copy link
Member

@victorkirov victorkirov commented Aug 8, 2023

🔘 PR Type

What kind of change does this PR introduce?

  • Enhancement

📜 Background

We currently use Hiro API to detect ordinals in UTXOs, but that API is sometimes behind or incorrect. This switches to using Xord.

🔄 Changes

Does this PR introduce a breaking change?

  • Yes, Incompatible API changes
  • No, Adds functionality (backwards compatible)
  • No, Bug fixes (backwards compatible)

Changes:
We now use our own API for ordinal detection in UTXOs.

This will affect the ordinal recovery feature and ensuring that we don't spend ordinal UTXOs in BTC transactions.

Also added is the UTXO sort in the UTXO selection for a transaction. We now sort largest value to smallest and take from that list. This means that dust UTXOs would never be used for a transaction and it would result in a decrease in fees.

✅ Review checklist

Please ensure the following are true before merging:

  • Code Style is consistent with the project guidelines.
  • Code is readable and well-commented.
  • No unnecessary or debugging code has been added.
  • Security considerations have been taken into account.
  • The change has been manually tested and works as expected.
  • Breaking changes and their impacts have been considered and documented.
  • Code does not introduce new technical debt or issues.

transactions/btc.ts Outdated Show resolved Hide resolved
@victorkirov victorkirov requested a review from yknl August 9, 2023 07:40
@DuskaT021
Copy link
Contributor

@victorkirov there is a confict

…into victor/eng-2552-use-xord-for-ordinal-recovery-detection
@victorkirov
Copy link
Member Author

@victorkirov there is a confict

Thanks @DuskaT021, sorted it out

@victorkirov victorkirov mentioned this pull request Aug 9, 2023
4 tasks
api/ordinals.ts Show resolved Hide resolved
transactions/btc.ts Outdated Show resolved Hide resolved
@github-actions
Copy link
Contributor

Test this PR with npm i @secretkeylabs/[email protected]

@yknl yknl merged commit 05f2c56 into develop Aug 10, 2023
3 checks passed
@victorkirov victorkirov deleted the victor/eng-2552-use-xord-for-ordinal-recovery-detection branch August 10, 2023 09:01
@yknl yknl mentioned this pull request Aug 10, 2023
15 tasks
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.

4 participants