Pinata IPFS SDK
Config
Overview of the Pinata SDK Config
Usage
import { PinataSDK } from "pinata-web3";
const pinata = new PinataSDK({
pinataJwt: process.env.PINATA_JWT!,
pinataGateway: "example-gateway.mypinata.cloud",
});
Parameters
pinataJwt
- Type:
string
The Pinata API JWT key that authorizes the SDK. Read more about API Keys.
pinataGateway (Optional)
- Type:
string
The domain of the Dedicated Gateway included with your account. Read more about Dedicated Gateways.
pinataGatewayKey (Optional)
- Type:
string
If you are using a Gateway Access Control Key you can list it to be used automatically in any of the gateway methods.
import { PinataSDK } from "pinata-web3";
const pinata = new PinataSDK({
pinataJwt: process.env.PINATA_JWT!,
pinataGateway: "example-gateway.mypinata.cloud",
pinataGatewayKey: "<GATEWAY KEY>"
});