1.0.12 • Published 10 months ago

mona-js-sdk v1.0.12

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

Javascript Wrapper around the Monaverse API

A wrapper written in typescript that wraps around the Monaverse API;

How to use:

  1. Install with npm i mona-js-sdk
  2. Instance the Mona class and use it as you want;

Instancing:

const Mona = new MonaAPI({
  apiKey: api,
  autoLogin: {
    enabled: true,
    callbackOnLogin: setUser
  }
});
export default Mona;

Generate one time password:

await Mona.OTP_Generate('my@email.com');

Note that OTP_Generate will always resolve (unless the api key is wrong) for security reasons.

Verify One time password:

const p = await Mona.OTP_Verify('my@email.com', 123123);
if (p.success) {
        ...
}

Get User :

const user = await Mona.getUser();
console.log(user) 
> {
    wallets: ['0x0fa074262d6af...'],
    email: 'my@email.com',
    username: 'fayelure',
    name: 'Fayelure'
  };

Dev

  1. Git clone the repo;
  2. Run npm i

Contributing

Create a new branch and push your changes, make sure npm run build still works. Then make a PR;

1.0.12

10 months ago

1.0.11

10 months ago

1.0.10

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.3

11 months ago