2.4.13 • Published 2 years ago

@zippie/did-api v2.4.13

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

DID-API How to use

What is DID

Decentralized Identity (DID) leverages the decentralization of blockchain technology to enhance privacy and transparency and eliminate central authority. With DID, data and assets are stored in the user’s digital identity, placing the sole and full authority squarely in their hands. DID gives them more independence and frees them from invasive authentication and verification. Companies or organizations are also less vulnerable to cyberattacks such as data breaches as they store less user information in their databases.

To know more about Zippie DID, click here

Installing the npm package

The package can be installed with both yarn and npm

// Using NPM
npm install @zippie/did-api


// Using Yarn
yarn add @zippie/did-api

Import

import { IAppData, PlatformProvider, SignUpForm, SignInForm, RecoveryForm } from '@zippie/did-api'

React Example

Basic example on how to use it

User SignUp (ReactJS)

Sign up form is ready made sign up form using react.

import { PlatformProvider, SignUpForm, IAppData } from '@zippie/did-api'

export const MyApp: React.FC = () => {
  const [appInfo, setAppInfo] = useState<IAppData>()

  const onSignUpComplete = (response: IAppData) => {
    setAppInfo(response)
    localStorage.setItem('didData', JSON.stringify(response))
  }

  const onForgotPasswordClick = () => {
    console.log('Callback when user clicks on forgot password')
  }

  return (
    <PlatformProvider client="MyDidApp">
      <SignUpForm {...{ onSignUpComplete, onForgotPasswordClick }} />
    </PlatformProvider>
  )
}

Generate JSDoc documentation

JSDocs generates HTML documents that contain an in-depth explanation of how to set up DID and use its functions.

Before you can generate the documentation, you need to install yarn on your local machine.

  1. In the root folder, run the command below:

    yarn install
  2. Open the did-api folder after the successful yarn installation.

  3. To generate the HTML documents, run the following command:

    yarn run jsdoc

    This should generate a “docs” folder under did-api that contains four (4) HTML files:

    • DidApi.ts.html
    • global.html
    • index.html
    • ZippieDidAPI.html
  4. Open the generated “docs” folder.

  5. Open the index.html file in your browser. You should be redirected to the home page of the document.
1.0.2

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

2.0.3

2 years ago

2.2.0

2 years ago

2.0.2

2 years ago

2.4.1

2 years ago

2.0.5

2 years ago

2.4.0

2 years ago

2.0.4

2 years ago

2.0.7

2 years ago

2.4.2

2 years ago

2.0.6

2 years ago

2.4.5

2 years ago

2.0.9

2 years ago

2.4.4

2 years ago

2.0.8

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

2.3.0

2 years ago

2.0.15

2 years ago

2.1.1

2 years ago

2.0.16

2 years ago

2.0.13

2 years ago

2.0.14

2 years ago

2.0.11

2 years ago

2.4.13

2 years ago

2.0.12

2 years ago

2.0.10

2 years ago

2.4.10

2 years ago

2.4.12

2 years ago

2.4.11

2 years ago

2.1.0

2 years ago

2.4.7

2 years ago

2.4.6

2 years ago

2.4.9

2 years ago

2.4.8

2 years ago

2.0.19

2 years ago

2.0.17

2 years ago

2.0.18

2 years ago

2.0.20

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.10

2 years ago

0.0.20

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.15

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.1.0

2 years ago

0.1.2

2 years ago

0.0.3

2 years ago

0.1.1

2 years ago

0.0.2

2 years ago

0.1.8

2 years ago

0.0.9

2 years ago

0.1.7

2 years ago

0.0.8

2 years ago

0.1.9

2 years ago

0.1.4

2 years ago

0.0.5

2 years ago

0.1.3

2 years ago

0.0.4

2 years ago

0.1.6

2 years ago

0.0.7

2 years ago

0.1.5

2 years ago

0.0.6

2 years ago

0.0.1

3 years ago