Skip to main content

Decentralized applet

Docs Version Dropdown

01. What is the applet?

The applet is a third -party developer developing his own application on the Debox

Debo, as a blockchain social application, has many capabilities and data such as blockchain social, payment, market, media, token,
Debo opens these capabilities, developers can develop their own applications based on these capabilities, combine their own business, and use applet
The way to display it to users. Developers can use Debox's traffic and capabilities to expand their business. As a carrier for the application of the applet,
Have the following characteristics:

1. Open, low threshold

Support standard HTML protocol. The applet is based on the built -in browser of the mobile phone. The development language is familiar to HTML/CSS/JS,Because H5 is rich in data, it is easy to learn
Because H5 is rich in data, it is easy to learn The threshold is relatively low. If the developer has a ready -made system, it can be renovated slightly, and he can run directly in the applet.

2. The built -in browser comes with the Debox ability, which is convenient for developers to combine with their own system

Debo opens its own ability in two ways:

2.1、Inject JS through the built -in browser and inject the client ability through the built -in browser

Inject UA, developers can judge whether their application runs in the built -in browser of Debox according to UA.

  Get the userAgent via JS to determine whether it contains Debox or Debox-, and it is a debox browser.
const isDeBox = !!window?.navigator?.userAgent?.includes('DeBox')
const isNewBox = !!window?.navigator?.userAgent?.includes('DeBox-')

Injecting web3js, the app injected Window.ethereum objects into the browser. Developers can use this object to achieve block query,
Wallet address authorization, signature, transfer and other functions.

  The built -in standard Window.ethereum object can be used directly.
Reference document https://docs.debox.pro/zh/APIs/BlockChain%20Transaction
2.2、The server provides services through the API

Through API developers, the following data can be obtained, the authorization login, and points payment function can be obtained.

Author2 authorized login
Point payment
Message push
Users, communities, dynamics, red envelopes and other information.
Specific reference documentation https://docs.debox.pro/zh/APIs/Authorized%20Login

3. Easy to combine with third parties

No need to pass tedious configuration, based on the browser's own ability, Debox browser extension ability, and server API capability, developers can introduce their services into Debox
In the end, it provides users with services in the form of an HTTPS website.
Because it is the H5 standard agreement, it is free to open, easy to develop, and expand.
Note, please adapt to the resolution of the mobile phone and submit the H5 version of the applet.

02. Where is the entrance of the applet?

The applet is an H5 application

2.1、The applet itself is an H5 application, which can directly send the HTTPS address to the Debox community.
2.2、For high -quality applets, the platform will be recommended in interest recommendation.
Docs Version Dropdown

03. How to develop a small program?

First of all, developers need to have the ability to develop front -end and back -end, secondly apply for the developer account, and finally develop and test release.
3.1、Because the applet is an H5 application, like all web applications, there is front -end and back -end development work, developers need to prepare related development capabilities;
3.2、Apply for a developer account. Developers authorize login, payment, API calls, message push, etc., you need to use API Key, App Secret, please apply for an open platform https://developer.debox.pro
3.3、The development test can be released.
Technical support group:https://m.debox.pro/group?id=660wp73h