0.1.33 • Published 2 years ago

@ceno-core/client v0.1.33

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Onec-SDK

v0.1

The highlight of the release is Onec.auth. It saves all the hassle to incorporate web 3.0 based wallet authentication with just a few lines of code. Not only that Onec SDK integrates the Onec User model into the application, thus you can save the hassle of maintaining user-DB. We can proudly say it as web3 version of Google's Firebase Auth.

Getting Started:

Install Onec-SDK from npm

npm i onec-sdk

Import in your client application code

 import Onec from "onec-sdk";

Authentication via metamask

Onec.auth.withMetamask().then((response) => {console.log(response)}).catch((error) => {console.log(error)});

Authentication via WalletConnect

Onec.auth.withWalletConnect().then((response) => {console.log(response)}).catch((error) => {console.log(error)});

Demystifying Response Object

Authentication functions return a promise which resolves to a User object or rejects with an error. The User Object has attributes like public address, username, email, createdAt, updatedAt, etc.

** User should sign the login message within 60 seconds otherwise the process will expire.

Next Release Features Announcement:

  • Improvements in auth object like mechanisms for interacting/updating the User object.
  • A new naas class which is a rest-client to connect the web apps with Onec's NaaS Suite.
0.1.33

2 years ago

0.1.32

2 years ago

0.1.31

2 years ago

0.1.30

2 years ago

0.1.29

2 years ago

0.1.28

2 years ago

0.1.27

2 years ago

0.1.26

2 years ago

0.1.25

2 years ago

0.1.24

2 years ago

0.1.23

2 years ago

0.1.22

2 years ago

0.1.21

2 years ago

0.1.20

2 years ago

0.1.19

2 years ago

0.1.18

2 years ago

0.1.16

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago