ivy-lang / ivy-bitcoin Goto Github PK
View Code? Open in Web Editor NEWA high-level language and IDE for writing Bitcoin smart contracts.
License: MIT License
A high-level language and IDE for writing Bitcoin smart contracts.
License: MIT License
By looking at the PreImage example from the docs I've realised there's this special type called Sha256(Bytes)
.
First, I'm wondering, is this type just acting as a keyword, or does ivy actually parse the parenthesis to find a type composition between Sha256
and Bytes
?
If it's the latter, I would recommend changing the character for this kind of type composition to use <>
instead of ()
, so instead of Sha256(Bytes)
it would be Sha256<Bytes>
.
Main motivations:
Any feedback welcome.
I've got confused that the playground validator rejects contract parameters with type Number
but accepts the undocumented type Integer
. So, my question: Are the types semantically equal?
Hi, I'm wondering if Ivy can handle other arithmetic functions and integer values, to write functions like is_greater(valA: int, valB: int)
? I know that the related opcodes do already exist (OP_MIN
), but in the Ivy docs I've not found nothing similar.
Thank you
Is there a good discussion forum for Ivy developers?
Would be nice to have a nice way to experiment with new covenants proposal.
The first one can can be easily tested on Liquid already
I would like to generate a valid BCH address in Ivy. Do you have any plans to support this and if you do is there a workaround I could test out?
Thanks,
Dylan
I'm on the edge of diving into LN and have somewhat of an understanding how the payment channels in LN should work but never got around actually looking int up. If there was an ivy template in the playground, I would have studied it now.
Generally, please put real use cases into the template list and maybe add a description to provide context as motivation for people stumbling onto it.
See #9
README still links to this old domain as the primary domain while it's been taken over by someone else.
I'm trying to express a contract that lets you redeem it if you find the fixed point of a hash function. For example, I wanted to try:
contract FixedPoint(val: Value) {
clause reveal(hash: Bytes) {
verify sha256(hash) == hash
unlock val
}
}
Unfortunately Ivy's type system seems to be forbidding this, because the type of sha256
on a T
is always a Sha256(T)
, so equality comparisons will fail to typecheck. Is there a coercion operator or some other way for me to express this? I can express it natively in script pretty easily.
It would be cool to play around with the contracts on testnet. So supporting testnet-addresses would be awesome.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.