Last month, we announced our collaboration with Chainlink aimed at bringing Arkham data on-chain. Today, we’ve gone live with the first implementation of this integration, starting with our labeling endpoint—the part of our API that takes a blockchain address as input, references our database, and then outputs any applicable intelligence from the Arkham database, namely, the real-world owner of the address.
With Chainlink Functions, you can now use these labels on-chain and easily incorporate Arkham data into your dApp to help enable a whole new set of use cases, such as:
Step 1: Sign up for Arkham API access here.
Step 2: Once you’ve received API access, you can try out using the labeling endpoint in a Chainlink Function using the Playground tool by inputting the following code:
Validate inputs to the Function -
Request Arkham’s /intelligence/address/:address/all endpoint -
Extract the entity from the response -
The response will be a map from chain ID (e.g. “ethereum”) to an address object. If Arkham has attributed that address to an entity, the address object will contain an arkhamEntity field. Iterate over the mapping to find the first chain-address combo with that field present. Return that entity ID.
Test the code is working properly -
You can test the code above by entering an address and verifying that the output entity ID is what we expect to see. For example, 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 belongs to Vitalik Buterin. When you use this as your input address, you should expect to see “vitalik-buterin” as the output.
How to call an API using Chainlink Functions -
To enable access to APIs that require authentication credentials, Chainlink Functions helps enable users to provide encrypted secret values, which can be used when making a Functions request. Please reference one of the following guides for approaches to securely encrypting your Arkham API key for use with Chainlink Functions:
Need more support with your Chainlink Function integration? Reach out to Chainlink Labs to speak to an expert: https://chain.link/contact
Bringing our data on-chain with Chainlink is an important step towards advancing transparency in crypto. Reach out to us on X (Twitter) at @ArkhamIntel if you have an idea for an implementation and we’d be happy to help you bring it to life. Or if you’ve already built one, we’d love to bring attention to it. We can’t wait to see the innovative ways you put our labels to work!