Select Page

Hello, everyone I'm honored to be invited to the first Chinese-language Bitcoin SV DevCon

My name is Liu Aihua, an independent Bitcoin SV developer You can call me Lao Liu Yes, it’s me again Now let's get on to the main topic for today The topic this time is developer tools with Bitcoin SV, as well as some case studies

And this time let's focus on some practical issues We will give an introduction to developer resources on Bitcoin SV, including framework, tools, reference materials, community resources and so on These are mainly targeted at the vast number of developers based on Bitcoin SV OK, let's get started Firstly, when we are working on blockchain development, the first thing that comes to our mind is

let me firstly check what’s included on the chain, what is the status of the chain, what about the transaction fee, what is the block size, and what about its general condition The first thing we usually use at this point is called blockchain browser Therefore, the first tool we want to introduce is a data browser type tool

So, the first tool is a blockchain browser that is quite commonly used on Bitcoin SV Its name is WhatsOnChain WhatsOnChain is just a blockchain browser, and quite similar to those ordinary blockchain browsers we can imagine But it has some practical features that are very useful for developers For example, it allows us to explore three different networks, not only the mainnet, to read the data on mainnet, but also on testnet and the Scaling Test Network

So the benefit for our developers is that since we probably need to conduct some tests on applications on the testnet, such an browser compatible with the testnet allows us to take a quick look at how the test is going, and what the data on the testnet represents What's the second feature? On Bitcoin SV, a lot of entrepreneurs are developing some text-based functions there They will write some text, either protocol or content, onto the blockchain WhatsOnChain has a function called text search It can not only search for corresponding Tx or block based on address, TxID or other conditions, just like our traditional blockchain browsers, but it can also search for text that is already embedded in our Tx based on the text, to find the Tx value that the text corresponds to

This concludes the introduction to WhatsOnChain The next data browser type tool that I would like to introduce, also a website, is Bicomedia The most important function of this website is to allow you to upload data What does that mean? Let me give you an example, upload file and browse, a very important function of the website

For instance, suppose I have an image, and I want to upload it onto the blockchain, and then it might be of some use So what can you do then ? You can directly open the website, Bicomedia, and drag the image into the upload area, swipe your wallet, then the image will be uploaded You have to swipe your wallet because there is a transaction fee for uploading but the fee is very low Later I will talk about the wallets that are indispensable for uploading

I will tell you which wallets support this function And when the image is uploaded, you can view it You can view the image in real-time instead of a bunch of HEX characters There is a very useful function there I have also used it to develop a small-size app As a matter of fact, I regard it as a front-end hosting website

What does it mean? For example, if we develop a Web app, all the front-end Web codes are actually written in, say, a html file In fact, we can drag this html file onto the blockchain directly, and then directly access TxID of the Tx, where this file is located, inputting TxID as the address to access Then, the website will render the entire page for you

All you can see is just a front-end code that is uploaded by you If you need back-end collaboration, you can complete interactive operations directly on this website This is a very useful function when doing this kind of development based on the chain It allows us to do some testing So in this way, while we can choose hosting at front end, there are also some great apps at back end for hosting directly

We will discuss other tools later Now, you can even build a serverless application That means you don't need a server All your application logic can be written at front end Your back-end data can be saved on the chain, and then be indexed and retrieved with the tools provided by Bitcoin SV

In this way, you can have an essentially serverless application I have built an app in this way all by myself and it is used to view the status of the entire network Having discussed data browser type tools, we will now introduce data service APIs Because when we're really going to write a program, what we need is not just to take a look to check it, but to truly call an API On Bitcoin SV, there is a lot of APIs that provide data service, including WhatsOnChain, which we mentioned earlier

Actually, it provides an API that supports various queries, based on address, TxID, and so on Meanwhile, we have MetaSV, which is also a great data query API And we have MatterCloud, which is also a query API The ecosystem is quite vibrant, in fact These APIs, in addition to such traditional query functions, for example, searching based on address, TxID and so on, also provide some other patterns

These patterns are very interesting Take Publish/Subscribe as an example, which I use if I want to subscribe to an address and get notifications of any transfers related to this address Now these API services can also offer such functions You can keep a long connection and the information you need will be pushed real-time A very useful function, isn't it? Moreover, we have MAPI, which was recently published on Bitcoin SV

They can also offer such a function You can find the status of the Tx that is given by the mining pool through them These functions can promote the security of Tx, enable secure real-time payment, and the like So this API is quite useful If you are interested in learning more about it, you can listen to the special speech about API previously delivered by Lin Zheming at this conference

On Bitcoin SV, there are another two powerful tools in terms of data service API One is Bitbus and the other one is Bitsocket Their features allow for filtering and query with complex filtering conditions They are actually two tools developed by a very famous developer called Unwriter in the Bitcoin SV Developer Zone So how powerful is the query function? It provides a query tool description language similar to MongoDB's query language

In its nature, it is MongoDB's description language What is the principle of implementation for such a language? It subdivides into each field for each Tx For example, each opcode in its script, the data pushed each time, all of the information is indexed, to a separate field Then, it runs a query by combining all these fields This is a very powerful tool

Let's say you have built an app on the chain with some of your own protocols You can even make query based on the conditions of the fields in your protocol It’s very useful Many people are using these two tools as well And there is also a data service type framework

This framework is not a data service type API, in that firstly you index the data and then make query to the service provider via API Instead, it provides a set of codes directly You can deploy such a set of codes freely on your local server and your back end Once you finish deployment of the piece of code, you can store it in the framework according to the Tx given by your user The framework will automatically synchronize the state of the Tx with the mining pool

For example, let's assume a scenario, where you built a social app such as Weibo When the user writes a post on Weibo, the Tx that carries contents might be transferred to your back end directly Therefore, you will put the Tx into a framework called TXQ The framework can then automatically broadcast this Tx into the mining pool The mining pool will tell you the status of the Tx, such as whether it’s Double Spending or not

It will automatically index these Txs into your database based on your configured indexing options When you do query later, you can proceed automatically and directly based on the index Therefore, it works as a localized data service framework It’s also a very useful framework, used by many people Having discussed data service, we will now talk about essential development libraries

For example, when we are developing using JavaScript, what library should we use? When we are signing a Tx or building a Tx, what library should we use? BSV is provided in JavaScript, and it is the library's name It is a JS version of BSV development library maintained by Money Button Then we have Nakasendo For Python language, we have BitSV and Nakasendo For C++, we have Nakasendo

Nakasendo frequently appears For Java language, we have BitcoinJ SV For Dart language, we have DartSV The options are actually quite extensive As for myself, I often use JavaScript, and JS as well, because it can be used at both front end and back end

In fact, they can cover all the functions that could be used by us in applications, including large number calculation, elliptic curve, address, public & private keys, signature, mnemonic phrase, scripts and so on All of these are actually included The language that showed up most just now was Nakasendo Nakasendo is a set of SDK developed by nChain, based on Bitcoin SV It incorporates a very important feature called Threshold Signature

This is a great signing method with a high level of security and confidentiality, being a computing method based on cryptography If you are interested in it, you can review the lecture about Nakasendo SDK delivered by Aaron Zhou at our Webinar He discussed how to use Nakasendo for threshold signature, and explained what threshold signature is If you are interested, I strongly suggest you listen to it It's really a very interesting speech Next, we will discuss wallet service that we mentioned earlier

As mentioned before, when you upload a file, you have to use the wallet How do you use the wallet to upload a file? It comes down to the issue of what wallet services do we have now? There are a lot of wallet services available and they are all very useful, including Money Button, a very popular one, DotWallet, developed by Lin Zheming's team, RelayX, ShowPay, Twetch Pay, and so on A wallet will not only provide a so-called payment function, which is of course a fundamental element, but it will also offer a variety of other functions What functions? Let's take a look There are registration and logon functions

That means once you've got a wallet, you can register a service or log on to a service with your wallet For example, you can log on to a social media app like PowPing with Money Button Moreover, with your wallet, for example, you can directly put your data on the chain, sign the data, encrypt or decrypt the data, etc All these things can be achieved And all you need to do is swipe your wallet

Just a gentle swipe, soft and smooth Here we have a little animated video to show how your wallet achieves this OK, we have watched the video All you need is a gentle swipe You can log on to an app such as PowPing with just a swipe

You don't even need to go through a registration process, because you just need a wallet, and a swipe of it, which eliminates a lot of trivial operations Moreover, for example, once you have a wallet, if you log on to various apps, all you need is a single ID, and you don't need trivial operations, such as frequent registrations or logons You only need your wallet to solve all the account issues As for the plan that aims to solve all the services with one single ID, you can listen to a lecture delivered by Sunny Feng, which discussed a protocol, MetaID So we have talked about wallet services, class libraries for development, and class libraries for different languages

In fact, we already discussed this during our previous lecture on the most powerful element in Bitcoin, which is its script language Many people may think Bitcoin's Script language is not easy to use or is inconvenient for development, that goes without saying If you write an app in assembly language, you will also feel it’s inconvenient What you need is a high-level language, such as C, C ++, Java, Python Therefore, we have sCrypt

sCrypt is a high-level language that can be used to compile a Bitcoin script As we know, there is a language called Solidity on Ethereum sCrypt is similar to it As a high-level language, it is easy to use With regard to this language and its features, as well as its development tools and so on, Mr

Wang Yiqiang, the co-founder of sCrypt, has actually discussed all of these points earlier Do listen to it if you have not done so yet because sCrypt really is a great tool Personally, I am using it for development But why do we put special emphasis on sCrypt? Why do we say it is a great tool and why are we so excited about it? It’s because sCrypt can be used to build things, such as stateful contracts When we say stateful contracts, they include, but are not limited to L1 token, smart contracts, etc

All this stuff can be built Anything that can be created on Ethereum can be also created on Bitcoin SV, and with lower transaction fees Besides, on Bitcoin SV, there are many ways to create smart contracts very quickly, and it allows users to create parallel contracts For more details and instructions, you can search for relevant materials In CSDN's BSV Zone, there are experts who have elaborated on how to create the contracts, and even how to parallelize

You can go check it out and see how they achieved this In addition to layer-1 smart contract languages, there are a number of layer-2 smart contract frameworks on Bitcoin SV The frameworks based on L2 include Run, Operate, Bitcoin Computer, etc Such frameworks are very interesting because you can develop your contracts directly on Bitcoin SV using JavaScript That means a programmer can use the language they are good at

Take Run as an example, it is a development language created with JavaScript, and then the development mode that you are familiar with can be fully applied on L2 development And it uses onchain records Such usage is very cool It puts its contract, which is JavaScript code, on the chain Then it puts the statements called and run on the chain

This is equivalent to an implementation process Then, you run this JavaScript code offchain once again, and then perform verification, checking whether this running process is correct or not It is a recording onchain and verification offchain process It enables its functions by using an irreversible ledger at a very low cost and with a high level of authenticity and reliability on Bitcoin SV The contracts you create can also be more flexible

You can run only those contracts that are of interest to you You don't have to run all the contracts Next, I will introduce some very important protocols on Bitcoin SV There are some very practical and useful protocols for building apps Once you use these protocols, your apps can be interconnected to each other and will have a better ecosystem

For example, the most important one is surely Metanet Metanet is a quite versatile and a very important protocol on Bitcoin SV I will not repeat the details here You can also go to CSDN's BSV Developer Zone for more information And we have PayMail, BIP270, which is a protocol that uses mailbox as an address

We also have SPV and Tokenized, which is a token protocol, and also many others, such as Bitcom, B protocol, B-CAT, D protocol, BOB Schema, etc So how do these protocols work exactly? Mr Gu Lu delivered a presentation titled Application Layer Protocols for Bitcoin SV at our previous Webinar and gave an exhaustive description of these protocols It is a really great video If you would like to know how the protocols for Bitcoin SV are designed, what functions they have, and the composition of these protocol families, it is a must-watch video

You can still find it in CSDN's BSV Developer Zone, called Webinar video I will now introduce some reference materials We have tools, protocols, class libraries for development, diverse API services, and so on We still need some reference materials The first source I would like to introduce is, of course, is CSDN's Bitcoin SV Developer Zone, which has been mentioned several times

The second one is called Bitcoin SV’s Wiki It is actually a wikipedia focused on technology The website is wikibitcoinsvio So what's in it? A lot of technology-related stuff

For example, if want to know how to use each opcode and what scenarios it has, or you may want to know what the payment channel is, what R-Puzzle is, and so on, each term can be found in the Wiki as a word entry Of course, it is an English language website We also have a Chinese edition, called Bitcoin SV Chinese Wiki This is a small project I created by myself, which collects a lot of materials and data on Bitcoin SV, some in Chinese and some in English If you want to learn about Bitcoin SV, you can visit Bitcoin SV Chinese Wiki to take a look

The above-mentioned materials are available for those looking for more information We have places for communication and discussion, if you need to chat with others, so that you can ask a question, and someone who knows the answer may reply to or interact with you I know there are many WeChat groups that you can join There are also other methods of communication The first one is CSDN's Bitcoin SV Developer Zone

Since there are many expert blogs in this Zone, you can leave messages, interact with their members and ask questions on their blogs Another one is PowPing It has a discussion channel in Chinese PowPing is an app based on Bitcoin SV that can be regarded as a global media And the channel is an app similar to a forum, where many people discuss in Chinese all kinds of topics relating to Bitcoin SV

PowPing's Bitcoin SV Chinese discussion channel could be an ideal community for us The third one is Atlantis on Slack This channel was created by Unwriter There are many domestic and foreign developers in it If you want to have more communication with foreign developers or learn what projects they are developing, what kind of tools they are using, what problems they might encounter and how they solve them, you can visit Atlantis to communicate with them

Finally, I'd like to recommend wikibsvinfo, which is the Chinese Wiki and a personal project of mine In fact, all the contents presented in these videos can be found there I will add external links to all corresponding websites, where you will find comprehensive, detailed information on a given topic

For example, I will give a short introduction on Nakasendo, and direct you to the Nakasendo website, where you can find all the documents You can visit wikibsvinfo to take a look If you have any questions or would like to get in touch with me, you can find me via this email address

That brings me to the end of my presentation today Thank you for watching I also hope you will recommend this conference to your friends, colleagues or anyone who is involved or interested in the blockchain industry, and also that you continue following the Bitcoin SV Developer Zone on CSDN Its website is bsvcsdn

net Thank you for attending the first Chinese-language Bitcoin SV DevCon Thank you, bye!