bbaas 3.1.1 copy "bbaas: ^3.1.1" to clipboard
bbaas: ^3.1.1 copied to clipboard

BBaaS Dart Package - a simple way to build a new tokenized world

Blockchain and Banking as a Service by BBaaS.org #

A Dart package that provides a BBaaS.

Dart
Support SDK >=3.2.0

Usage #

To use this package, add bbaas as a dependency in your pubspec.yaml file. Contact BBaaS.org to validate your secure key of service.

    import 'package:bbaas/bbaas.dart';

Instance your BBaaS api package #


BBaaS bbaas = BBaaS(
   scheme: 'https',
   host: 'api.bbaas.com.br',
   clientName: 'mycompany',
   authentication: 'authentication-token',
   privateKey: 'rsa-privatekey',
   network: 'hathor',
    gatewayOptions: CGOptions(
   login: '12345-TEST',
   password: 'abcdefghijklmnopqrstuvwxyz',
   merchantWebsiteId: '12345-TEST',
   pixCashInRedirectUrl: 'https://exemplo.mysite.com',
   pixCashInOnSuccessUrl: '10.40.20.30:300/webhook',
   pixCashInOnThreeDSecureUrl: '10.40.20.30:300/webhook',
   pixCashInOnFailUrl: '10.20.30:300/webhook',
   pixCashOutOnSuccessUrl: '10.20.30:300/webhook',
  pixCashOutOnFailUrl: '10.20.30:300/webhook',
  upstreamDestination: 123,
 ),
);

Instance your client #


    CollectionClient collectionClient = bbaas.client(bbaas.clientName);

Instance Wallet User #


    CollectionClient collectionClient = bbaas.client(bbaas.clientName);

Get Hathor HashWords #


   HashWords seed = await walletUser.newWallet();
     print(seed.words);

Start Wallet Hathor #


     bool result;
     Map<String, dynamic> response;
     (result, response) = await walletUser.start(seed);
     print(result);
     print(response);

Get Balance Methods #


    String balance = await walletUser.balance();  // To get balance from wallet
    String balanceTokenX = await walletUser.balance(tokenX); // To get Balance of the token from wallet
    String balanceTokenY = await walletUser.balance(tokenY); // If there was other token

Get Balance from Address Methods #


    String address = await walletUser.getAddress(); // To getAddress
    String balanceAddress = await walletUser.address(address).balance(); // To get balance from address
    String balanceAddressTokenX =
                    await walletUser.address(address).balance(tokenX); // To get balance of the token from address

Get newAddress mark last as used #


   String address = await walletUser.getNewAddress();  // To get new Address
   print(address);

Send Token Methods #

    // //* Hathor
   String success = '';
   String message = '';
   (success, message) = await walletUser.send(addressTo, amount, 'HTR');  // To send Hathor
    print(success);
    print(message);
    // //* TokenX
   String success = '';
   String message = '';
     (success, message) = await walletUser.send(addressTo, amount, tokenCode); // To send Token
    print(success);
    print(message)

Stop Hathor Wallet #


   String resultStop = await walletUser.stop(); // To Stop Wallet

Instance CG #

   CG cg = CG(collectionClient.payMethod(), collectionClient);
   bool result;
   Map<String, dynamic> response;

  *CG Pix CashIn
  (result, response) =
      await cg.pixCashIn(description: "description", amountCentsInt: 100);

  *CG Balance
  (result, response) = await cg.getBalance();


  *CG Pix Cashout
  (result, response) = await cg.pixCashOut(
      pixOperationDictKey: "21999999999",
      description: "description",
      amountCentsInt: 100); // min 100
  print(result);
  print(response);

BBaaS Package - a simple way to build a new tokenized world #

A simple way to build a new tokenized world #

2
likes
120
pub points
39%
popularity

Publisher

unverified uploader

BBaaS Dart Package - a simple way to build a new tokenized world

Homepage

Documentation

API reference

License

unknown (license)

Dependencies

crypto, crypton, http

More

Packages that depend on bbaas