This is an official integration repo for OTTP.
Run the following command:
npm -i @ottp/sdk
This method fetches attestations made using OTTP protocol for a given FID (Farcaster ID).
import { OttpClient } from '@ottp/sdk'
const main = async () => {
const ottp = new OttpClient()
const attestations = await ottp.getOttpAttestations('313600')
}
main()
This method fetches the ottp id from the chain for a given FID (Farcaster ID).
import { OttpClient } from '@ottp/sdk'
const main = async () => {
const ottp = new OttpClient()
ottp.getOttpId(313600)
}
main()
Refer the example repo.