Create a Group

Usage

import { PinataSDK } from "pinata";

const pinata = new PinataSDK({
  pinataJwt: process.env.PINATA_JWT!,
  pinataGateway: "example-gateway.mypinata.cloud",
});

const group = await pinata.groups.create({
	name: "My New Group",
	isPublic: true
});

Returns

type GroupResponseItem = {
    id: string;
    is_public: boolean;
    name: string;
    created_at: string;
};

Parameters

name

  • Type: string

Requires a name for the group to be created

const group = await pinata.groups.create({
	name: "My New Group",
});

isPublic

-type: boolean

Determine whether or not a group is public upon creation. Default is false.

const group = await pinata.groups.create({
	name: "My New Group",
	isPublic: true
});