Image for post
Image for post

Cocos-BCX mobile wallet SDK goes live, supports low coupling with DApp

Recently, the universal docking SDK for CocosWallet and DApp was officially launched, and we named it wallet_invoker.

At present, DApps are developing rapidly. In the actual docking process, the standards of them are not uniform, and the docking is time-consuming and labor-intensive. Using this SDK tool can reduce the development and adaptation work, and realize the low-coupling interaction of CocosWallet and DApp related operations, such as authorized login, transfer and call contract.

The iOS SDK and Android SDK have been launched, and they support CocosWallet wallets of 2.1.6 and above.

Besides the Cocos-BCX wallet_invoker SDK can be found at https://github.com/Cocos-BCX/wallet_Invoker.

For specific access methods, please check the tutorial below.

iOS SDK

Access

  1. Manually drag the walletinvoker folder from the Walletinvoker project into your project

Open the info.plist configuration as follows: (take dappdemo as a case)

Image for post
Image for post

3. Initialization

  • Initialized in AppDelegate.m file

Quote the header file #import “CocosWalletApi.h”

  • Register URL Schemes in application: didFinishLaunchingWithOptions method

[CocosWalletApi registerAppID: @ “dappdemo”];

API example

  1. CocosLoginObj
Image for post
Image for post

2. Transfer

Image for post
Image for post

3. CocosCallContractObj

Image for post
Image for post

Android SDK

Access

Introduced into the local maven repository

  1. Add the sdk-aar file to the project root directory
Image for post
Image for post

3. Add dependencies to the module, the build.gralde file which relies on the SDK as follows:

Image for post
Image for post

API example

  1. Authorize
Image for post
Image for post

2. Transfer

Image for post
Image for post

3. Contract

Image for post
Image for post

Follow Cocos-BCX at:

Website| Discord| Cocos-BCX Team Medium| Telegram| Twitter|Facebook Reddit| Forum|

Next-Gen Digital Game Economy. Game engine, IDE and blockchain for decentralized game development. Website: cocosbcx.io

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store