Skip to content

TerraMystics/terramystics_documentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation


The official documentation site for all TerraMystics SDKs & Frameworks

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

     var simulation = await paymentsManager.simulateChargeCustomer(100);
}

License

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

© 2022 TerraMystics.

About

Public Api Documentation for All Repos & SDKs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published