Shipl JS SDK
Browser and NodeJS web3 provider for the Shipl API
Integrate Shipl in your Dapp
See the API documentation
You can install the library via
npm i shipl
The package need to be configured with an ethereum private key or a web3 wallet instance (eg. Metamask)
;const shipl =appId: 'YOUR_SHIPL_APP_ID' // This is the appID created in your Shipl Account at console.shipl.co
Then login into shipl. You have to pass an input callback to make the shipl SDK capable to ask for the phone number and then for the code verifcation send by SMS. For example on node you can use readline-sync.
const identity deviceKey = await shipl
Then pass you can pass the shipl sdk into any web3 compatible library. Don't forget to execute the start function to launch the web3 provider.
const web3 = shipl;
Then you can call a contract in the regular web3 way
const targetContract = abi contractAddress;targetContractmethods;
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 minified version --><!-- You can also fetch specific versions by specifying the version, files names may differ for past versions -->
To see all available dist files on unpkg, vist unpkg.com/shipl/dist
Then to instantiate the shipl object from the browser window object:
const Shipl = windowshiplconst shipl = appId: 'YOUR_SHIPL_APP_ID'
For a more in depth guide, check out our documentation site or clone this
poke shipl repository.