Signature Standard
Pinata is using the EIP-712 signature standard for signing CIDs with the following domain and types.address
- Type:
address
cid
- Type:
string
date
- Type:
string
Creating a Signature
In order to sign a CID you can use any library that support EIP-712 signing, like the example below with viem.Adding Signature to CID
In order to attach a signature to a CID the following requirements must be met:- The CID being signed is owned by the signer
- The CID being signed was first uploaded by the signer
- The CID must not already have an existing signature with Pinata
Getting a Signature for a CID
There are two ways you can an existing signature for a CID: the get method in the SDK or the Content Addressable Gateway Plugin.Content Addressable Gateway Plugin
After installing the plugin you can simply request a CID through the Dedicated Gateway and get the signature in the headerpinata-signauture
.
SDK
You can also use the get method to get a signature for a given CID.This method will check all CIDs on Pinata and will return a signature if it exists