Package Exports
- @elizaos/plugin-stargaze
- @elizaos/plugin-stargaze/package.json
Readme
Plugin Stargaze
A plugin for fetching NFT data from the Stargaze API.
Overview
The Plugin Stargaze provides a simple interface to get NFT data from Stargaze collections. It integrates with Stargaze's GraphQL API to fetch the latest NFTs, collection statistics, and sales data from collections.
Installation
bun add @elizaos/plugin-stargazeConfiguration
Set up your environment with the required Stargaze API endpoint. If not specified, the plugin will use the default endpoint: https://graphql.stargaze.zone/graphql
| Variable Name | Description | Default |
|---|---|---|
STARGAZE_ENDPOINT |
Stargaze GraphQL API endpoint | https://graphql.stargaze.zone/graphql |
Usage
import { stargazePlugin } from "@elizaos/plugin-stargaze";
// Initialize the plugin
const plugin = stargazePlugin;
// The plugin provides three actions:
// 1. GET_LATEST_NFT - Fetches the latest NFT from a collection
// Example: "Show me the latest NFT from ammelia collection"
//
// 2. GET_COLLECTION_STATS - Fetches detailed statistics for a collection
// Example: "Show me stats for ammelia collection"
//
// 3. GET_TOKEN_SALES - Fetches recent sales data for a collection
// Example: "Show me recent sales from ammelia collection"Development
# Install dependencies
bun install
# Build the plugin
bun run build
# Run tests
bun test
# Run tests with coverage
bun test --coverageLicense
MIT