npm.io
2.11.0 • Published 5 years ago

@cosmic-plus/base

Licence
MIT
Version
2.11.0
Deps
4
Size
53 kB
Vulns
23
Weekly
0
Stars
2

base / ReadmeContributingChangelog

Readme

Licence Dependencies Vulnerabilities Downloads Bundle

This package contains various modules related to Stellar on which higher-level cosmic-plus libraries depends.

Note: This is an internal library and may be modified in compatibility-breaking ways.

Install & Import

  • Npm npm install @cosmic-plus/base
  • Yarn yarn add @cosmic-plus/base

Then: const { $module, ... } = require("@cosmic-plus/base")

To pick a module: const $module = require("@cosmic-plus/base/es5/$module")

Modules

Configuration
  • wallets: A list of wallets that accept arbitrary Stellar transactions as input.
Utils
  • friendbot: A function that fund a wallet on testnet: frienbot(publicKey).
Dispatchers

Dispatchers implements different way to load modules depending on whether the environment is Node.js or browser.

  • axios Get Axios from StellarSdk when using browser environment to save loading time.
  • buffer Get Buffer from StellarSdk when using browser environment to save loading time.
  • stellar-sdk Get StellarSdk from global environment when using browser environment.

Additional Resources

Organization: Cosmic.plus | @GitHub | @NPM

Follow: Reddit | Twitter | Medium | Codepen

Talk: Telegram | Keybase