This package has been deprecated

Author message:

no longer required

@textile/wallet
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Textile Wallet in Javascript (js-textile-wallet)

Made by Textile Chat on Slack Keywords

GitHub package.json version npm (scoped) node (scoped) GitHub license David CircleCI branch standard-readme compliant docs

Official Textile data wallet implemented in Javascript

Join us on our public Slack channel for news, discussions, and status updates.

Table of Contents

Background

Textile provides encrypted, recoverable, schema-based, and cross-application data storage built on IPFS and libp2p. We like to think of it as a decentralized data wallet with built-in protocols for sharing and recovery, or more simply, an open and programmable iCloud.

A Textile 'wallet' is a core component of the Textile system. A wallet is represented by mnemonic phrase, and in practice is a BIP32 Hierarchical Deterministic Wallet based on Stellar's implementation of SLIP-0010. You can learn more about BIP39 mnemonics and more in this really nice interactive webpage.

You can think of a wallet as a master key, and the account represents keys specific to a given application or use-case. Every account seed "inside" the wallet can be derived from the wallet's mnemonic phrase. Meaning that the wallet effectively is the mnemonic phrase. Any given wallet may create an arbitrary number of accounts. For example, a single wallet can be used to provision multiple Textile Photos "accounts", each with a completely different persona. This provides a powerful partitioning framework.

Textile account seeds (private keys) always starts with an "S" for "secret" and account addresses (public keys) always start with a "P" for "public". See https://docs.textile.io/concepts/the-wallet/ for more details.

Development

# Run all the unit tests
yarn test

# Lint everything
# NOTE: Linting uses `prettier` to auto-fix styling issues when possible
yarn lint

You can also compile the Typescript yourself with:

yarn build

And even build a nice browser-compatible bundle with:

yarn browser

These will both build and add the exported Javascript files to dist, ready to be used in your next NodeJS, browser, React, Vue, or whatever app!

Browser

Running yarn browser will produce a minified bundle.js in dist. This can be included in your browser app using something like:

<!DOCTYPE html>
<html>
...
<script src="./dist/bundle.js"></script>
...
</html>

You'll have a global var wallet variable which gives you access to the Textile Wallet and other exported objects.

Documentation

The auto-generated documentation can be found at https://textileio.github.io/js-textile-wallet/.

# Re-build the documentation
yarn docs

Maintainer

Carson Farmer

Contributing

This library is a work in progress. As such, there's a few things you can do right now to help out:

  • Ask questions! We'll try to help. Be sure to drop a note (on the above issue) if there is anything you'd like to work on and we'll update the issue to let others know. Also get in touch on Slack.
  • Log bugs, file issues, submit pull requests!
  • Perform code reviews. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
  • Take a look at go-textile-wallet (which we intend to follow to a point). Contributions here that would be most helpful are top-level comments about how it should look based on our understanding. Again, the more eyes the better.
  • Add tests. There can never be enough tests.
  • Contribute to the Textile docs with any additions or questions you have about Textile and its various implementations. A good example would be asking, "What is an Account". If you don't know a term, odds are someone else doesn't either. Eventually, we should have a good understanding of where we need to improve communications and teaching together to make Textile even better.

Before you get started, be sure to read our contributors guide and our contributor covenant code of conduct.

License

MIT

Package Sidebar

Install

npm i @textile/wallet

Weekly Downloads

2

Version

0.3.0

License

MIT

Unpacked Size

538 kB

Total Files

55

Last publish

Collaborators

  • joewagner
  • awmuncy
  • sanderpick
  • textileio
  • andrewxhill
  • carsonfarmer
  • asutula