Getting Started

Install Shipl-Wallet Package

Installation

You can install Shipl via npm or load it into the browser

You can also easily integrate Shipl-Wallet into your Javascript dApp written in frameworks such as React. Simply run the script below in your project directory to install the Shipl-Wallet Javascript package from NPM.

Recommended Node and NPM versions: Node version >= 6.9 and NPM version >= 3.4

Shipl-Wallet installation with NPM

npm install --save shipl-wallet

Web3 installation with NPM

If you are using web3 for your dApp, you can install either the latest stable web3 version or the 1.0 beta version with updated capabilities and syntax. If you are only using the Shipl-Wallet SDK without web3, you may skip this step.

# Install latest web3 1.0.0-beta.x version
npm install --save web3
# Or install stable web3 0.20.x version
npm install --save web3@0.20

Shipl-Wallet into Web3 dApp

Use the following code snippet to import Shipl-Wallet into your web3 dApp.

import Shipl from 'shipl';
import Web3 from 'web3';
const shiplwallet = await Shiplwallet.create({ appId: "YOUR_SHIPL_APP_ID" })
const web3 = new Web3(shiplwallet.getWeb3Provider());
// Send transactions the way your are used to
web3.eth.sendTransaction({/* ... */});

Browser Window Quick Start

For use directly in the browser you can reference the shipl distribution files from a number of places. They can be found in our npm package in the 'dist' folder or you can build them locally from this repo.

For a quick setup you may also request a remote copy from unpkg CDN as follows:

<!-- The most recent version -->
<script src="https://unpkg.com/shipl/dist/shipl.js"></script>
<!-- The most recent minified version -->
<script src="https://unpkg.com/shipl/dist/shipl.min.js"></script>
<!-- You can also fetch specific versions by specifying the version, files names may differ for past versions -->
<script src="https://unpkg.com/shipl@<version>/dist/shipl.js"></script>

To see all available dist files on unpkg, vist unpkg.com/shipl/dist