Develop Guide

Bitverse Wallet SDK Integrated Development Guidelines.

Wallet Pre Configuration

Android Configuration

  1. Configure in AndroidManifest.xml

<activity android:name="clancey.simpleauth.simpleauthflutter.SimpleAuthCallbackActivity" android:exported="true">
    <intent-filter android:label="Bitverse">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="db-feuuw50lyg85b3b" />
        <data android:scheme="com.googleusercontent.apps.312636396063-4vauh4vqdodasb7afkgvmrnldfm00ffj"/>
    </intent-filter>
</activity>
  1. Initialization in MainActivity

class MainActivity: ThrioFlutterFragmentActivity() {
    init {
        System.loadLibrary("TrustWalletCore")
    }
    ...
}

iOS Configuration

  1. Add source config in Podfile

source 'git@github.com:Bitverse-Pte/specs.git'

Step 1: Add dependency in pubspec.yaml

bitverse_lite:
    hosted: https://xxx/artifactory/api/pub/bitverse-pub-prod-virtual/
    version: 1.0.6

  bitverse:
    hosted: https://xxx/artifactory/api/pub/bitverse-pub-prod-virtual/
    version: 1.4.4

Step 2: Register Bitverse Module in module.dart

class Module with ThrioModule, ModuleJsonDeserializer, ModuleJsonSerializer, ModuleParamScheme {
  @override
  void onModuleRegister(final ModuleContext moduleContext) {
    /// Set delegate for Bitverse
    bv.BitverseModule().setBitverseDelegate(BitVerseDelegateImpl(moduleContext));
    /// Set rootNavigator
    bv.BitverseModule().setRootNavigatorKey(RouteRegistry.rootNavigatorKey);
    /// Register Bitverse Module
    registerModule(bv.Module(),moduleContext);
  }

  @override
  void onParamSchemeRegister(final ModuleContext moduleContext) {}

  @override
  void onJsonSerializerRegister(final ModuleContext moduleContext) {}

  @override
  void onJsonDeserializerRegister(final ModuleContext moduleContext) {}
}

Step 3: Init Bitverse Wallet SDK

BitverseModule().ensureInited(null);

Step 4: Invoke Wallet APIs when need

/// Enter the wallet home page
BitverseModule().enterBitverseHome(context);

/// Enter the wallet crate page
BitverseModule().gotoCreateWallet(context);

More API references bridge-layer-api

Last updated