Comments (4)
Maybe something like this:
{
"output_descriptor": "",
"ui_metadata": {
"xml": "<xml ...> </xml>",
"keys": [key1, key2, key3, key4...]
}
}
from smartvaults.
@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.
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.
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)
- Signer Offering Metadata Key Names HOT 2
- DRAFT - Native UI adjustments
- Add `Signer` trait to `coinstr_sdk`
- [CLI] `description` in spending proposal does not support spaces HOT 1
- WIP: Independent proof-of-reserve verification page
- Proof of reserve cannot Finalize or Verify HOT 1
- UTXO Labelling
- UTXO selection when building transaction
- Contact list metadata does not show on GUI or CLI
- New Settings
- Add Sign PSBT method to NIP 46
- Log to file
- Pass mnemonic to CoinstrSDK for iOS app
- Save `Coinstr Signer` to relays
- Add keychain name to window bar
- Scriptable Demo Environment
- Fix Compilation Error with "make gui" Command on MacBook Pro M2 HOT 2
- Key Agents support [DRAFT] HOT 6
- Key Agent additional profile key names HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smartvaults.