Home » Tech »
This post was first published on Medium.
After months of intense development, we are super thrilled to introduce scryptTS: a Typescript framework to write smart contracts on Bitcoin.
scryptTS is a Typescript-based domain specific language (DSL) for coding smart contracts on Bitcoin, based on our experience of developing and fostering the sCrypt ecosystem in the past three years. Developers can directly code smart contracts in Typescript, one of the most popular programming languages in the world and used by millions of developers every day.
Barrier to Bitcoin smart contract developer adoption
The current smart contract development on Bitcoin is based on sCrypt, a high-level programming language to write smart contracts. Its IDE has drawn over 4,000 downloads since launch. Despite its drastic improvement over developing in Bitcoin Script, an assembly-like low-level set of instructions for Bitcoin, Bitcoin companies and projects still have difficulty finding qualified smart contract developers, hindering wide Bitcoin adoption. This is mainly because sCrypt is still a relatively niche language, given its nascency.
Based on our years of developing sCrypt contracts ourselves and talking with hundreds of developers in and beyond Bitcoin, we summarize the major pain points of new developers as follows:
The requirement to learn something new and different from their daily development workflow poses a significant barrier to entry and degrades developer experience. Consequently, the number of Bitcoin developers today is small compared to that of other blockchains.
The ultimate solution: scryptTS
To fix these pain points, we have designed scryptTS from the ground up. Its design principle is to reuse existing programming languages and tools that many developers are already familiar with.
The number of Web3/blockchain developers is merely ~0.07% of all developers, and the number of sCrypt developers is actually even smaller than that.
Javascript is the most popular programming languages. Typescript basically adds types into it. For smart contracts that control users’ funds, type safety is paramount. That is why we choose Typescript.
1. Familiar and simple syntax
scryptTS is simply Typescript. Creating a loop is just writing “for” and conditional “if.” There is NO new syntax to learn.
Below is an example of writing an Ackermann function.
Here is another example of implementing the most popular smart contract in use today: Pay-to-PubKey-Hash (P2PKH).
2. Huge ecosystem
All existing Typescript/Javascript libraries can be seamlessly integrated with scryptTS. Below is an example to test scryptTS smart contracts using Mocha, which is among the most popular Typescript/Javascript testing frameworks.
3. Package management
scryptTS does not need its own package manager. It just uses npm, Typescript/Javascript’s package manager. One can publish his own scryptTS contract using npm. Anyone else can just import and reuse it as a dependency via npm.
4. IDE and Debugging
One can use his favorite Typescript IDE to code and debug scryptTS smart contracts, including Visual Studio Code, WebStorm, Vim, and Atom. Below is an example of using Visual Studio Code to debug a scryptTS contract, no extension needed!
We need you
The scryptTS framework has just gotten off the ground. We want to hear feedback from you. Try it today at https://scrypt.io/scrypt-ts. Your can find examples at https://github.com/sCrypt-Inc/scryptTS-examples. We have also launched a free course on Youtube. Join us on Discord (channel #scrypt) or Slack to talk directly to the team and other enthusiasts.
Watch: The BSV Global Blockchain Convention presentation, Smart Contracts and Computation on BSV
New to Bitcoin? Check out CoinGeek’s Bitcoin for Beginners section, the ultimate resource guide to learn more about Bitcoin—as originally envisioned by Satoshi Nakamoto—and blockchain.
A local environmental group criticized the discounts and urged the state to reconsider, saying Kentuckians will be left stuck with the bill for the BTC miners.
Only 38 out of 80 lawmakers voted to proceed with the bill, and out of the number, nine lawmakers voted against it, and the rest were either absent or voted blank.
mAPI (initially Merchant API) was designed to be an additional service miner that could be offered to merchants accepting Bitcoin transactions.
Join the official Bitcoin SV Discord channel:
www.discord.gg/bsv
source
—
Note that any programming tips and code writing requires some knowledge of computer programming. Please, be careful if you do not know what you are doing…