BitVM and sCrypt
original: https://gist.github.com/msinkec/5827d5285a18de8930324f67b880841e
Invitation to Bitcoin Developers: Utilize sCrypt for Advanced BitVM Implementations
To the Bitcoin Development Community,
In light of the recent advancements in BTC's computational capabilities introduced by BitVM, we are extending an open invitation to explore the integration of sCrypt as a language for developing BitVM scripts. BitVM represents a significant advancement in Bitcoin's scripting capabilities, enabling Turing-complete contracts within the existing BTC framework.
Technical Overview:
BitVM facilitates off-chain computation, essential for complex contract execution while maintaining Bitcoin's on-chain efficiency. While Assembly (ASM) scripts are so far used to express contracts for BitVM, they present certain limitations in terms of readability and broader accessibility.
sCrypt, a high-level language based on TypeScript tailored for Bitcoin smart contracts, offers a more efficient and streamlined approach for developers. The language's design aligns with traditional programming paradigms, enhancing understandability and maintainability of scripts.
Example of Gate Commitment in sCrypt:
The code above represents a simple gate commitment for BitVM. It has a single entry point, i.e. the public function "openGateCommit", which can be unlocked by providing the apporpriate hash preimages of the commitments.
The code compiles into a bitcoin script, the function of which is analogous to the script described in the BitVM whitepaper (Figure 2):
The equivalent is expressed in sCrypt as:
For more information about sCrypt, please refer to the official documentation.
Invitation and Objectives:
Examination of sCrypt: We encourage the exploration of sCrypt's features and syntax. Its alignment with conventional programming languages positions it as a viable candidate for BitVM script development.
Contribution Using sCrypt: Contributions in sCrypt to the BitVM ecosystem are highly encouraged. Such endeavors would ease the utilization of BTC's full scripting capabilities.
Technical Exchange and Collaboration: The advancement of BitVM and sCrypt requires collective efforts in knowledge exchange and technical collaboration. We welcome insights from both experienced and emerging developers in the Bitcoin community.
Sincerely,
Mihael Šinkec, sCrypt Inc.
Last updated