メインコンテンツまでスキップ

Meta

meta

meta is a required interface for all plugins and declares the display name, identifier, etc. of the plugin.

All values for meta are:

RequiredTypeDescription
idRequiredstringid is the identifier of the plugin and is different from the npm package name.
displayNameRequiredstringName of the plugin as it appears in the admin pages and marketplace.
categoryRequiredstring | ClubsPluginCategory(*)Category name on the sidebar of the admin pages.
tokenClubsPluginToken(*)For the tokenized plugin, you can export token to indicate its token address and chain.
offerClubsPluginOffer(*)Price (ETH or DEV) to use the paid features of the plugin. Membership staking is available as its payment method, and if you export offer, you must also export token.

Currently, there is no marketplace that refers to this offer, so the price must always be 0. Please check the marketplace roadmap on Discord, etc.

iconstring | ImageMetadataAvatar icon metadata/URL.
previewImagesarray includes string or ImageMetadataArray of preview image metadata/URLs used in marketplaces, etc.
descriptionstring1 line description.
readmeAstro componentFull description of the plugin.
clubsUrlstringURL of Clubs for the plugin.

Extension metas for theme plugins

The following meta interfaces are required if the plugin is to be published as a theme.

RequiredTypeDescription
theme.previewImageRequiredstringURL of the screenshot image of the theme.

The type of meta is ClubsPluginMeta (or if is's a theme, ClubsThemePluginMeta) and it is defined by clubs-core.

Examples

import {
type ClubsFunctionPlugin,
type ClubsPluginMeta,
ClubsPluginCategory,
} from '@devprotocol/clubs-core'
import image1 from './img/image1.png'
import image2 from './img/image2.png'
import image3 from './img/image3.png'
import { description } from '../package.json'
import readme from '../README.md'

const meta: ClubsPluginMeta = {
id: 'my:first:awesome-clubs-plugin',
displayName: 'My First Plugin',
category: ClubsPluginCategory.Growth,
token: {
propertyAddress: '0xA5577D1cec2583058A6Bd6d5DEAC44797c205701',
chainId: 137,
},
previewImages: [image1, image2, image3],
description,
readme,
}

export default { meta } as ClubsFunctionPlugin