[email protected]
package became a Private IPFS only SDK and the Public IPFS SDK was moved to pinata-web3
. This was also a result of our APIs being disconnected as well. Due to this problem we’ve unified our Public and Private IPFS APIs in our V3 API, and we have also unified them in our SDK in a new V2 release. This document will walk you through how to migrate from previous versions of either pinata
or pinata-web3
.
[email protected]
pinata
package was originally just for Private IPFS but now supports both Public and Private IPFS in [email protected]
.
pinFileToIPFS
or pinJSONToIPFS
then you will need to create a new API key for the V2 SDK which uses the new V3 endpoints. If you want to scope your endpoint for the new API you can use the API docs for key creation to do so.
[email protected]
all methods were direct. In V2 there are public and private methods for the following classes:
upload
files
groups
gateways
signatures
public
or private
after the main class to access those specific networks.
createSignedURL
for accessing files on Private IPFS has been renamed to createAccessLink
addMetadata()
method has been replaced with name()
and keyvalues()
to better match querying and listing files with those attributes.
[email protected]
pinata-web3
package previously was only supporting Public IPFS, and lacked some of the more natural organization that the pinata
package had. With [email protected]
the SDK supprts both Public and Private IPFS and is recommended that you migrate to pinata
instead of continuing to use pinata-web3
. This guide will walk through the changes that will need to be made.
pinFileToIPFS
or pinJSONToIPFS
then you will need to create a new API key for the V2 SDK which uses the new V3 endpoints. If you want to scope your endpoint for the new API you can use the API docs for key creation to do so.
pinata-web3
to pinata
.
[email protected]
all methods were direct. In V2 there are public and private methods for the following classes:
upload
files
groups
gateways
signatures
public
or private
after the main class to access those specific networks.
pinata-web3
the methods to listFiles()
, updateMetadata()
, unpin()
under the main PinataSDK class have been moved to a separate files
class for better organization.
listFiles()
-> files.<network>.list()
updateMetadata()
-> files.<network>.update()
unpin()
-> files.<network>.delete()
pinJobs()
-> files.public.queue()
queue()
method.
pinata-web3
the Hot Swap methods were under the gateways
class. These have been moved to the files
class instead. Some of the naming convention has been updated as well.
swapCid()
-> addSwap()
swapHistory()
-> getSwapHistory()
addCids()
-> addFiles()
pinata-web3
analytics was grouped under the gateways
class. In [email protected]
it has been moved into it’s own class. Additionally the methods inside have been completely rewired to fit needs better.
pinata.usage
class in the pinata-web3
package has been removed in [email protected]
.