bitnob 0.0.7 icon indicating copy to clipboard operation
bitnob: ^0.0.7 copied to clipboard

Bitnob SDK equips online businesses using react native with the ability to integrate our API features easily.

Bitnob SDK #

Bitnob SDK equips online businesses using react native with the ability to integrate our API features easily. Example are;

  • Checkout: Accept and process bitcoin payments via on-chain or lightning seamlessly
  • Oauth: Allows you to access Bitnob user details

Platform Support #

AndroidiOS
✔️✔️

⚙️ Android Setup #

No requirement

⚙️ Ios Setup #

No requirement

Getting Started #

  1. Open a command line and cd to your projects root folder
  2. In your pubspec, add an entry for bitnob to your dependencies (example below)
  3. pub install

Installation #

You just need to add bitnob as a dependency in your pubspec.yaml file.

dependencies:
  bitnob: ^0.0.7

-Run flutter packages get to install the package

How to Use #

import 'package:bitnob/bitnob.dart';
final BitNob _bitNob = BitNob();

How to get "publicKey" to use bitnob SDK? #

Checkout Example #

await _bitNob.initiateCheckout(
      mode: "set mode(sandbox or production)",
      description: "test",
      callbackUrl: "test",
      successUrl: "",
      notificationEmail: "customer@gmail.com",
      customerEmail: "customer@gmail.com",
      satoshis: 2000,
      reference: "test",
      publicKey: "your public key",
      context: context,
      failCallback: (fail) {
        //fail callBack
      },
      successCallback: (success) {
        //success callBack
      },
      closeCallBack: (close) {
       //close callBack
      },
    );
Note: successUrl keep blank.

How to get cliendID, scope, state to use bitnob OAuth? #

  • From your dashboard, create an App in Settings > Developers > Oauth apps to get them, See more in our OAuth Documentation.

OAuth Example #

    await _bitNob.initiateOauth(
      mode: "set mode(sandbox or production)",
      clientId: "your clientId",
      scope: [
        "user:custom_ln_address",
        "user:verification_level",
        "user:email",
        "user:username",
        "user:ln_address"
      ],
      state: "bbdbbbjjk",
      redirectUrl: "your redirect url",
      failCallback: (fail) {
        if (kDebugMode) {
          print("Fail=============> " + fail.toString());
        }
      },
      successCallback: (success) {
        if (kDebugMode) {
          print("Success=============> " + success.toString());
        }
      },
      closeCallBack: (close) {
        if (kDebugMode) {
          print("Close=============> " + close.toString());
        }
      },
      context: context,
    );

📷 Checkout Screenshots #

PlatformScreenshot
Android
iOS

📷 OAuth Screenshots #

PlatformScreenshot
Android
iOS

License #

MIT License

Copyright (c) 2022 bitnob

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3
likes
110
pub points
24%
popularity

Publisher

verified publisher iconbitnob.com

Bitnob SDK equips online businesses using react native with the ability to integrate our API features easily.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

dio, flutter, webview_flutter

More

Packages that depend on bitnob