Comments (5)
a CBC subset of policy isn't easy given how timelocks are implemented, so I think it's out of scope.
from sapio.
Sure, we'll explore this.
from sapio.
Should we go after our own CBC Policy construct that we "compile" to the policy FE language and parse it with actual policy?
I'm not yet sure if a CBC Policy AST is possible. I can look into this.
from sapio.
cc @apoelstra I think a more succinct explanation of why the "just do it as strings" approach for using Policy v.s. working with the AST directly is that it makes it really difficult to programmatically construct the policy fragments. i.e., in my compiler passes I do some manipulations on the AST that requires inspecting them or generating them programmatically. writing a bunch of custom string concatenating code would be sad. not sure if i expressed that well before, but one example is we have a function that generates different threshold groups that become available at different times which is a function of input parameters. string templating that would be meh.
so i think regardless of if we do strings when we pass to policy, we want some kind of PolicyBuilder enum that we can use to emit policy / build it up programmatically.
from sapio.
Alternatively, understanding the "gaps" in where you can create a structurally well-typed Policy expression in the AST that isn't valid semantically would at least help us craft a Policy builder ourselves. I anticipate that the work to understand those gaps is not too much less than actually having an API for it though. If it is that could be a very helpful intermediate step.
from sapio.
Related Issues (20)
- Replace serde-json with a canoncial json library which can support floats? HOT 5
- simplify amount_range / Amount* structs to a sane default? HOT 5
- Make bind_psbt function use SIMPs, not mock outputs, for adding inputs HOT 6
- no_std support for sapio modules? HOT 2
- take advantage of new workspace hierarchies to split out "sapio core" workspace from host stuff HOT 2
- reproducible builds for WASM modules
- Consistent & Clear terminology clean up
- Defining "Packages" / "Bundles"
- Redefine the core module return type to flatten/deduplicate some data
- Fix broken CI
- Revert removal of cross module validation
- Add Emulation for other Covenant Primitives? HOT 2
- Test max contract depths/recursion limits, potentially "flatten" computations.
- macros and inferred types
- Context/Template type parameter?
- Avoid Feature Flags unless absolutely required
- Rework sapio-contrib & examples
- Runnable Examples in Book
- Any plans for supporting ordinals? 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 sapio.