bbaas 3.0.4 copy "bbaas: ^3.0.4" to clipboard
bbaas: ^3.0.4 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',
     gateway: 'iugu', // IUGU or ASAAS
      // If it's Iugu
     iuguApiToken:
      'iuguApiToken',
    iuguApiTokenCriptografado:
      'iuguApiTokenCriptografado',
      //If it's Asaas
    asaasAccessToken:
        '\$aact_AsaasAccessToken==',
    asaasAddressKey: "asaasAddressKey",
);

Instance your client #


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

Instance Wallet User #


   WalletUser walletUser = collectionClient.user(clientUid);

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

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

A simple way to build a new tokenized world #

2
likes
0
pub points
39%
popularity

Publisher

unverified uploader

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

Homepage

License

unknown (license)

Dependencies

crypto, crypton, http

More

Packages that depend on bbaas