https://github.com/ipfs-shipyard/js-idm-client
The reference implementation of the IDM Client in JavaScript
https://github.com/ipfs-shipyard/js-idm-client
authenticate client dapps idm sign sso
Last synced: 3 months ago
JSON representation
The reference implementation of the IDM Client in JavaScript
- Host: GitHub
- URL: https://github.com/ipfs-shipyard/js-idm-client
- Owner: ipfs-shipyard
- License: mit
- Created: 2019-05-30T20:14:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T23:43:33.000Z (almost 3 years ago)
- Last Synced: 2025-03-10T14:17:36.127Z (7 months ago)
- Topics: authenticate, client, dapps, idm, sign, sso
- Language: JavaScript
- Homepage:
- Size: 2.53 MB
- Stars: 1
- Watchers: 12
- Forks: 1
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# idm-client
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]
[npm-url]:https://npmjs.org/package/idm-client
[downloads-image]:http://img.shields.io/npm/dm/idm-client.svg
[npm-image]:http://img.shields.io/npm/v/idm-client.svg
[travis-url]:https://travis-ci.org/ipfs-shipyard/js-idm-client
[travis-image]:http://img.shields.io/travis/ipfs-shipyard/js-idm-client/master.svg
[codecov-url]:https://codecov.io/gh/ipfs-shipyard/js-idm-client
[codecov-image]:https://img.shields.io/codecov/c/github/ipfs-shipyard/js-idm-client/master.svg
[david-dm-url]:https://david-dm.org/ipfs-shipyard/js-idm-client
[david-dm-image]:https://img.shields.io/david/ipfs-shipyard/js-idm-client.svg
[david-dm-dev-url]:https://david-dm.org/ipfs-shipyard/js-idm-client?type=dev
[david-dm-dev-image]:https://img.shields.io/david/dev/ipfs-shipyard/js-idm-client.svgThe reference implementation of the IDM Client in JavaScript. This library is intended to be used by DApps.
## Installation
```sh
$ npm install idm-client
```This library is written in modern JavaScript and is published in both CommonJS and ES module transpiled variants. If you target older browsers please make sure to transpile accordingly.
## Usage
```js
import createIdmClient from 'idm-client';
import { createClientSide } from 'idm-bridge-postmsg';const app = {
name: 'My app name',
iconUrl: 'https://my.app.com/favicon.png',
homepageUrl: 'https://my.app.com',
};const idmWalletUrl = 'https://nomios.io';
await (async () => {
const idmBridge = await createClientSide(idmWalletUrl);
const idmClient = await createIdmClient(app, bridge);
})();
```## API
This library is following closely the [IDM Wallet Specification](https://github.com/ipfs-shipyard/pm-idm/blob/master/docs/idm-spec.md).
We will be providing proper API documentation once the both this library and the specification mature.
## Tests
```sh
$ npm test
$ npm test -- --watch # during development
```## License
Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).