Git Product home page Git Product logo

Comments (5)

christroutner avatar christroutner commented on August 31, 2024

Update: This change would remove the validation capability. There would need to be a second call or some other method to ensure an SLP UTXO is valid.

from slp-sdk.

christroutner avatar christroutner commented on August 31, 2024

After conversing with the team on this, perhaps a preferred workflow for this function would be:

  1. Raw transaction data for every UTXO is retrieved from the full node.
  2. For those TXs without an OP_RETURN, the entry is marked false to indicate it is not an SLP UTXO.
  3. For those TXs with an OP_RETURN, the data is parsed for SLP data.
    a. If the data can not be parsed, the UTXO is marked false to indicate it is not an SLP UTXO.
    b. If the data can be parsed, the TXID is sent to SLPDB to ask if the UTXO is valid.
  4. (after 3b only) SLPDB is called to validate the UTXO.
    a. An isValid property is marked false if SLPDB returns null or false.
    b. An isValid property is marked true if SLPDB returns true.

from slp-sdk.

SpicyPete avatar SpicyPete commented on August 31, 2024

Looks like a good solution, if the validation here would be too heavy, the apps could also rely on a second call such as to validatetxid. Assuming this endpoint always has accurate information.
https://developer.bitcoin.com/slp/docs/js/util#validatetxid

Also regarding isValid, I think the property needs to be null or false if it's false in SLPDB, true if marked as true, and some indeterminate value if it's an SLP UTXO but unknown to SLPDB.

from slp-sdk.

christroutner avatar christroutner commented on August 31, 2024

PR #86 implements the following features:

  • if false is returned, the UTXO is safe to spend by an SLP-aware wallet.
  • If the UTXO is colored with SLP information, then it includes an isValid property along with the other SLP information.
    • If SLPDB is not aware of the SLP UTXO, isValid will have a property of null.
    • If SLPDB has processed the SLP UTXO, isValid will have a property of either true or false to indicate its SLP validity.

from slp-sdk.

christroutner avatar christroutner commented on August 31, 2024

This issue satisfied by PR #86

from slp-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.