Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@terra-money/terra.js

Package Overview
Dependencies
Maintainers
4
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@terra-money/terra.js

 

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
decreased by-25.22%
Maintainers
4
Weekly downloads
 
Created
Source

 

The JavaScript SDK for Terra


diagram

API Docs | NPM Package | GitHub

Installation

Grab the latest version off NPM:

yarn add @terra-money/terra.js

Features

  • Written in TypeScript, includes type definitions for core data objects
  • Cosmos SDK compatible Int and Dec numeric types
  • Includes BIP39 mnemonic key, with support for custom key types
  • Interoperable: Supports JSON-format Terra objects and native JavaScript objects
  • Simple and consistent API for converting to/from blockchain data
  • Works in both Node.js and in the browser

Usage

We highly suggest using Terra.js with TypeScript, or JavaScript in a code editor that has support for type declarations, so you can take advantage of the helpful type hints that are included with the package. Terra.js can be use in Node.js, as well as inside the browser. Currently, React Native is not fully supported, however a version of Terra.js that supports it will soon be made available.

Example

The best way to learn how to use Terra.js is to get started with a quick example and then explore the documentation on your own. Let's create our first transaction by generating a mnemonic, acquiring some testnet tokens, signing a simple transaction, and broadcast it on the network by using just our browser.

You can play with the complete example on JSFiddle here.

Loading Terra.js in the browser

You can access all the objects of the @terra-money/terra.js from the global Terra object if you load Terra.js with a <script> tag.

Include the following in your browser:

<script
  crossorigin
  src="https://unpkg.com/@terra-money/terra.js/dist/bundle.js"
></script>

You can find a small JSFiddle example that refreshes current Oracle votes here.

License

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

© 2020 Terraform Labs, PTE.


 

Powering the innovation of money.

FAQs

Package last updated on 09 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc