Giter VIP home page Giter VIP logo

Comments (4)

mgravitt avatar mgravitt commented on July 19, 2024 1

Maybe something like this:

{
   "output_descriptor": "",
   "ui_metadata": {
          "xml": "<xml ...> </xml>",
          "keys": [key1, key2, key3, key4...]
   }
}

from smartvaults.

mgravitt avatar mgravitt commented on July 19, 2024

@yukibtc what is the structure of the policy that is saved as a note currently? Is it only the output descriptor?

Does it make sense to add something like ui_metadata which could store the above xml and key list? Then, if a client knows how to render it, like the Blockly client with the xml, or else it could ignore it.

from smartvaults.

yukibtc avatar yukibtc commented on July 19, 2024

The nostr public keys are already saved in the tags of the policy event (I can write a function to extract from tags easily).
Regarding the XML data, I don't know if is a good idea.
In general, is better to use JSON instead of XML (check here).

I think that is better to generate the blockly struct directly from the descriptor, like you have done in get policy command with termtree.
In this way, if I import the descriptor from, for example, a backup, the UI will be shown (this will not happen using the above solution).

I'll try to write a function to compose the blockly JSON from a descriptor.

https://developers.google.com/blockly/guides/get-started/web#importing_and_exporting_blocks

from smartvaults.

mgravitt avatar mgravitt commented on July 19, 2024

The one requirement that wouldn't be covered is that accounts can be added to the blockly area but not in the actual policy.

They show up in drop downs for keys but the miniscript may not contain that key. It's like for draft policies.

We also need to disable edits after the policy has received BTC, since it is needed to spend on that BTC and could be lost if edits are allowed.

from smartvaults.

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.