import type IpfsAdapter from './IpfsAdapter.js'; /** * A Colony SDK IPFS adapter for Pinata (https://pinata.cloud) * * In order to use this, sign up for Pinata (if you haven't already) and generate a token. Then either supply this token when instantiating the class (example below) or provide it via the environment variable `COLONY_IPFS_PINATA_TOKEN` (when using NodeJS). Then provide an instance of this class to the {@link ColonyNetwork} or {@link ColonyEventManager} classes (depending on your needs). * * :::danger Tokens are sensitive data * Do not check in your Pinata token into version control and **DO NOT EMBED IT INTO YOUR FRONTEND BUNDLE**. * ::: * * @example * ```typescript * import { ColonyNetwork, PinataAdapter } from '@colony/sdk'; * const pinataAdapter = new PinataAdapter('[YOUR_PINANTA_JWT_TOKEN]'); * // Immediately executing async function * (async function() { * const colonyNetwork = ColonyNetwork.init(signerOrProvider, { ipfsAdapter: pinataAdapter }); * })(); * ``` */ declare class PinataAdapter implements IpfsAdapter { private token; private PINATA_GATEWAY_ENDPOINT; name: string; constructor(pinataToken?: string); getIpfsUrl(cid: string): string; uploadJson(jsonString: string): Promise; } export default PinataAdapter;