We advice anybody who is integrating to contact us in discord in the technical channel
In order to integrate with .find you have a couple of options.
- use flow-cadut with the .find plugin. Shout out to the amazing MaxStarka for this
- integrate using cadence scripts
- use the web2 serverless api
This api is published at https://lookup.find.xyz/api/lookup
It can be called either with a name or an address
- https://lookup.find.xyz/api/lookup?name=bjartek -> will resolve to my address
- https://lookup.find.xyz/api/lookup?address=0x886f3aeaf848c535-> will resolve to my primary name
The contract addreses for .find is:
- mainnet: 0x097bafa4e0b48eef
- testnet: 0x35717efbbce11c74
We have tried to make it easy to use .find in cadence so most functions are oneliners.
import FIND from 0x097bafa4e0b48eef
pub fun main(name: String) : Address? {
return FIND.lookupAddress(name)
}
If you want the read-only profile of a user for displaying in your solution you can use the lookup
function
import FIND, Profile from 0x097bafa4e0b48eef
pub fun main(name: String) : Profile.UserProfile? {
return FIND.lookup(name)?.asProfile()
}
import FIND, Profile from 0x097bafa4e0b48eef
pub fun main(address: Address) : String? {
return FIND.reverseLookup(address)
}
If you want to create Profiles in .find in your solution that is possible.
Contact us in discord if you want this so that we can discuss it further:
Please do not use any of these raw but as inspiration :)
- createProfile : create a profile with just a name. NB! this hard codes the 'createdAt' on line 22 to .find
- setPFP : sets the PFP profile picture
- editProfile : edit the profile
- getProfile from address : to get from name, if you have .find name ise lookup as explained above
We support all NFTs that are on NFT-Catalog which is proposed and maintained by Dapper Team.
To register on NFT Catalog, please follow the instructions provided by Dapper.
Implementing MetadataViews standards in the right way can help your NFTs display with a richer metadata. The doc to MetadataViews standard is linked here.
We have a demo of using a .find name to log in with here from a community member. Expect more to come here later
https://github.com/lightbeardao/find-auth-example
Using the Emerald bot it is possible to give users that have a valid .find name a role in your discord.
- invite Emerald#5944 into your discord
- Create a new role that is below the Emerald role in your discord
- as admin of discord run
!setup FIND <your role>
- This will give that channel an
Validate
button you can press that pops up a web page that logs you in to your account and verifies if you own atleast one active .find name