• DQtech Column | Learn from DEX about PlatON Application Development – Javascript (IX)

    Author Dex_DQT In this chapter, we will learn how to receive the Commission reward, redeem the Commission and realize the function of multiple network nodes. Write a page that displays a list of wallet delegates Create my-delegate-table.vue in the component directory, as shown in the follows:Some code is as follow: Then uses this component in main-page.vue, and the effect is shown in the figure below: Write the logic to get the delegate list add the following code in the Delegated management of background.js: Because the node does not provide an…

    February 6, 2022
    09290
  • DQtech Column | Learn from DEX about PlatON Application Development – Javascript (VIII)

    In this chapter, we will learn to realize the multi account switching between test network and main network, as well as the function of entrusting lat. As there are no pledge nodes in the development and test network of PlatON, we would implement the delegation function in the main network in this chapter Add NetworkManager Previously, the connection address of the test network was placed in the transaction manager. In order to support multi network switching, we extracted the node connection into the NetworkManager. Add the code of NetworkManager in…

    February 1, 2022
    01.1K0
  • DQtech Column | Learn from DEX about PlatON Application Development – Javascript (Engineering Transformation)

    Some readers responded that by clicking the plug-in, the page to unlock the password will appear in a pop-up box, as shown in the following figure: Mnemonic pages are displayed in a pop-up box, which brings a bad user experience. Therefore, before starting the teaching of Chapter 6, we should transform the project to achieve the effect that some pages must be opened in the form of tab. Modify the HTML File in the Public Directory Change the file name index.html to home.html Create popup.html in this directory and copy…

    January 14, 2022
    09300
  • DQtech Column | Learn from DEX about PlatON Application Development – Javascript (VII)

    In this chapter, we would complete the transaction list, check whether the transfer is successful and export the wallet secret key. Create transaction list page Write the transaction list and transaction record into 2 different components respectively, then create pending pending-transaction-table.vue file in component directory, some codes are as follows: The fields displayed here are: 交易哈希 Transaction hash 接收地址 Receiving address 当前状态 Current state 发送时间 Sending time 所在区块 Block 发送LAT数量 Number of LATs sent 状态 Statuse There are two statuses: being confirmed and pending Open the page main-page.vue and add…

    January 11, 2022
    09470
  • DQtech Column | Learn from DEX about PlatON Application Development – Javascript (VI)

    In this chapter, we will learn the functions of wallet transfer and query transaction records. Due to the variety of contents, it would be divided into two chapters. Build Master Page Create main-page.vue file in the page director. Part of the code is as follows: The page is as follows: The transaction record table is extracted into a Vue component, transaction-table.vue, and placed in the component directory on this page, which can reduce the code of main-page.vue and better maintain. Next, build the page to send lat Build a Page…

    January 7, 2022
    01.2K0
  • DQtech Column | Learn from DEX about PlatON Application Development – Javascript (V)

    In this chapter, we will import mnemonics, save secret keys, and reset passwords through mnemonics Build a Page for Importing Mnemonics In the page directory, create the file import-seed-phrase-page.vue. ssome codes are as follows: The interface is as follows: Next, let’s start writing logic. In order to reuse the code of generating secret keys through mnemonics in Chapter 4, we extract the code of generating secret keys in Chapter 4 into a tool class. Create file mnemonicUtil.js in src/util directory, as shown below: The code of mnemonicUtil.js is as below:…

    January 4, 2022
    06790
  • DQtech Column | Learn from DEX about PlatON Application Development – Javascript (IV)

    In this chapter, we will learn how to construct a private key by mnemonics Build Private Backup Cipher Add file seed-phrase-page.vue in the page directory. Some codes are as follows: Recompile the project and you can see the following effects: Before generating mnemonics, let’s look at how to save the password for creating the password page. Open the file background.js under public/js Write PasswordManager . Some codes are as follows: The Promise and async/await syntax of ES6 is used here. Because this is written in background.js and belongs to the…

    December 28, 2021
    07770
  • DQtech Column | Learn from DEX about PlatON Application Development – Javascript (III)

    In this chapter, we begin to build a browser – based wallet. Project creation The construction process will not be explained here The function directory built based on Vue cli is as follows: After the project is created, we open the public directory. If it is not in the created project, it needs to be created manually. Then create a JS folder in this directory, put the file web3.js and web3-eth-accounts.js used in Chapter 2 into this directory, and then manually create an empty background.js file. Then we create a…

    December 24, 2021
    01.3K0
  • DQtech Column | Learn from DEX about PlatON Application Development – Javascript (II)

    In the previous chapter, we completed the construction of the environment and query the balance of the wallet. In this chapter, we will explain how to call common interfaces through JavaScript.   For simplicity of testing, all outputs covered in this chapter are printed directly on the console. To open the console, press F12 in the browser to pop up the following dialog box, Select the Console option interface。 1,Batch Request The official website example only illustrates the usage of this interface and does not explain the callback function After the…

    December 20, 2021
    01.2K0
  • DQtech Column | Learn from DEX about PlatON Application Development – Javascript (I)

    “Learning from DEX on Application Development Series” is divided into3 parts: wallet part, smart contract part and DAPP part.The wallet chapter will teach you to build wallets with JavaScript, Android and fluent.This series is JavaScript, which will teach you to build a browser plug-in wallet similar to Samurai. JavaScript is developed based on Vue + element UI, so you need to prepare the corresponding knowledge in advance.Javascript. 1,Environmental Preparation Although the official website provides the method of installing CLIENT SDK JS. However, for the purpose of learning, the author directly…

    December 16, 2021
    01.3K0