terra_dart_onchain_payments 1.1.9 copy "terra_dart_onchain_payments: ^1.1.9" to clipboard
terra_dart_onchain_payments: ^1.1.9 copied to clipboard

A lightweight payment management library for the terra ecosystem

A lightweight payment management library for terra ecosystem. Supports payments for both LUNC & LUNA Blockchains

GitHub GitHub GitHub

Explore the Docs »

Example App · API Reference · Pub Package · GitHub

Internally manages gas estimation required by the burn tax for successful transactions on the blockchain. Makes it easier for devs to get started with payments on the LUNC/LUNA Blockchains.

Features #

  • Written in Dart, with type definitions
  • Works with the Flutter & Dart Ecosystems, in the browser, and Mobile solutions for anyone building on the Terra Ecosystem
  • Makes it easier to manage payments for anyone deploying to the app store

Installation & Configuration #

Grab the latest version off Pub

dart pub add terra_dart_onchain_payments

Usage #

This package can be used for Mobile & Web Developers, or SDK Developers looking to extend the Terra Platform

Manage Payments #


void verifyCustomerBalance() {
     // Recovery Words of the Customer wallet that will be making the payment
     String customerRecoveryWords = "notice oak worry limit wrap speak medal online prefer cluster roof addict wrist behave treat actual wasp year salad speed social layer crew genius";

     // Configure your PaymentManager
     // Set Blockchain to target (in this case Classic)
     var paymentsManager = PaymentsManager()
          .configureBlockchain(env: TerraEnvironment.classic)
          .configureBusinessWallet(
              businessWallet) // Configure your Business Wallet
          .configureCustomerWallet(
              customerRecoveryWords); // Configure the Customer Wallet

     var simulation = await paymentsManager.getTotalFundsInCustomerWallet();
  }
void processPaymentForTerra() {
     // Wallet where customer payments will be transferred to
     String businessWallet = "terra17lmam6zguazs5q5u6z5mmx76uj63gldnse2pdp";

     // Recovery Words of the Customer wallet that will be making the payment
     String customerRecoveryWords = "notice oak worry limit wrap speak medal online prefer cluster roof addict wrist behave treat actual wasp year salad speed social layer crew genius";

     // Configure your PaymentManager
     // Set Blockchain to target (in this case Classic)
     var paymentsManager = PaymentsManager()
          .configureBlockchain(env: TerraEnvironment.classic)
          .configureBusinessWallet(
              businessWallet) // Configure your Business Wallet
          .configureCustomerWallet(
              customerRecoveryWords); // Configure the Customer Wallet

     // Customer is charged 100 LUNC
     var transaction = await paymentsManager.chargeCustomer(100);
}

License #

This software is licensed under the MIT license. See LICENSE for full disclosure.

© 2022 TerraMystics.

0
likes
120
pub points
34%
popularity

Publisher

verified publisherterramystics.com.au

A lightweight payment management library for the terra ecosystem

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

Funding

Consider supporting this project:

www.patreon.com

License

MIT (LICENSE)

Dependencies

json_annotation, terra_dart_keys, terra_dart_sdk, terra_rest

More

Packages that depend on terra_dart_onchain_payments