@anima_protocol/personhood-sdk-vue
v0.1.0-rc0
Published
Anima Webcomponent VueJs
Downloads
3
Readme
personhood-sdk-vue
Personhood SDK Vue
Install
With npm
npm install @anima_protocol/personhood-sdk-vue
With yarn
yarn add @anima_protocol/personhood-sdk-vue
Import
import AnimaPersonhood from '@anima_protocol/personhood-sdk-vue'
Usage
<template>
<anima-personhood
v-if="connectedWallet?.accounts[0].address"
session-id="124b7409-62cb-418f-8d2d-444eabf6394f"
storj-url="https://link.storjshare.io/raw/jxufayhv2itczfzykdcc7t3tdxgq/anima2"
synaps-url="https://personhood-api-testnet-c2gchp5lzq-ez.a.run.app"
:address="connectedWallet?.accounts[0].address"
:sign="sign"
@shared="shared"
/>
</template>
<script lang="ts">
import AnimaPersonhood, {
SharedEvent
} from '@anima_protocol/personhood-sdk-vue'
export default {
name: 'App',
components: {
AnimaPersonhood
},
methods: {
async sign(payload: string) {
return await WALLET.sign(payload)
}
},
shared(payload: SharedEvent) {
console.log(payload)
}
}
}
</script>
Props list
| Prop name | Prop type | Default | Required | Description |
| ------------------ | --------------------------------------------------------------------------------------------------- | ------- | -------- | ----------------------------------------------------------------------------- |
| session-id
| string
| ''
| Y | Session can be referred as a customer verification session. More info |
| address
| string
| ''
| Y | Your user account Web3 wallet address |
| chain-id
| 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: SharedEvent) => void
| undefined
| Y | This event is triggered when the user has shared their proof. The function has one parameter a SharedEvent.verified
is True
when the user is successfull onboarded |
Examples
License
Apache 2.0 © Anima