Skip to content
Official Textile data wallet Javascript implementation
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github/ISSUE_TEMPLATE
docs
scripts
src
.eslintignore
.eslintrc.json
.gitignore
CODEOWNERS
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
jest.config.js
package.json
tsconfig.json
tsconfig.webpack.json
tslint.json
webpack.config.js
yarn.lock

README.md

Textile Data Wallet (js-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 Javascript implementation

Join us on our public Slack channel for news, discussions, and status updates. For current status, and where you can help, please see issue #1.

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 (see accounts) represent keys specific to a given application or use-case. Any given wallet may create an arbitrary number of accounts. For example, you may use a wallet to provision multiple Textile Photos 'accounts', each with a completely different persona if you so choose. This provides a powerful framework 'partitioning' use cases. It is also the backbone for enabling account backup and recovery. See https://docs.textile.io/concepts/the-wallet/ for more details.

The reference implementation of Textile is written in Go, and can be compiled to various platforms, including mobile (Android/iOS) and desktop/server (OSX, Windows, Linux, etc). This library provides a Javascript implementation of Textile's data wallet, to help support things like browser-based Textile apps, Node.js apps, and other use-cases.

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-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:

  • Check out issue 1 for an up-to-date list (maintained by carsonfarmer) of tasks that could use your help.
  • 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 (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 impmenentations. 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.

Contributors

Commits Contributor
1 carsonfarmer

License

MIT

You can’t perform that action at this time.