0.1.0-rc6 • Published 1 year ago

@anima_protocol/personhood-sdk-react v0.1.0-rc6

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

personhood-sdk-react

Personhood SDK

Visit anima.io | Read the Anima documentation

enter image description here

Install

With Yarn

yarn add @anima_protocol/personhood-sdk-react

With NPM

npm install @anima_protocol/personhood-sdk-react

Usage

import AnimaPersonHood from '@anima_protocol/personhood-sdk-react'

...
<AnimaPersonHood
    address={WALLET_ADDRESS}
    sessionId={SESSION_ID}
    onShared={(e) => { console.log(e) } }
    sign={async (data) =>  await YOUR_WALLET.sign(data)}      
/>
...

Attributes list

Attribute nameAttribute typeDefaultRequiredDescription
sessionIdstring''YSession can be referred as a customer verification session. More info
addressstring''YYour user account Web3 wallet address
chainIdstring'1'NYour Web3 wallet chain id
sign(data: string) => voidundefinedYThis event is triggered when the user wants to sign their proof to share it or create an anima
onShared(data: boolean) => voidundefinedYThis event is triggered when the user has shared their proof. The function has one parameter a boolean is True when the user is successfull onboarded

Examples

React

Edit react

License

Apache 2.0 © Anima