@anima_protocol/personhood-sdk-react
v0.1.0-rc6
Published
Synaps ReactJS SDK
Downloads
7
Readme
personhood-sdk-react
Personhood SDK
Visit anima.io | Read the Anima documentation
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 name | Attribute type | Default | Required | Description |
| ------------------ | --------------------------------------------------------------------------------------------------- | ------- | -------- | ----------------------------------------------------------------------------- |
| sessionId
| string
| ''
| Y | Session can be referred as a customer verification session. More info |
| address
| string
| ''
| Y | Your user account Web3 wallet address |
| chainId
| string
| '1'
| N | Your Web3 wallet chain id |
| sign
| (data: string) => void
| undefined
| Y | This event is triggered when the user wants to sign their proof to share it or create an anima |
| onShared
| (data: boolean) => void
| undefined
| Y | This 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
License
Apache 2.0 © Anima