User
Auth
User Endpoints
Nonce ( get )
`https://api.unipos.org/users/nonce?address=${0x{string}}`Response
body: stringVerify ( post )
`https://api.unipos.org/users/verify`Request
import { SiweMessage } from 'siwe'
import { useSignMessage } from 'wagmi'
const { signMessageAsync } = useSignMessage()
const message = new SiweMessage({
address: `0x${string}`,
chainId: number,
domain: window.location.host,
nonce: string,
statement: 'Sign in with the Blockchain to Unipos.',
uri: window.location.origin,
version: '1',
})
const signature = await signMessageAsync({
message: message.prepareMessage()
})
body: { message, signature }Response
Identify ( get )
Request
Response
Logout ( get )
Request
Response
Last updated