Thank you for your interest in contributing to the Jupiter Platform List! This guide will help you add new platforms, smart contracts, and services to the registry.
- Getting Started
- Adding a New Platform
- Platform Structure
- Services and Contracts
- Global Rules
- Testing
- Submitting Your Contribution
- Fork the repository
- Clone your fork locally
- Install dependencies:
npm install
- Create a new branch for your platform:
git checkout -b add-platform-yourplatform
To add a new platform to the registry, you need to:
- Create a platform file in src/platforms/
- Add a platform image in the img/ directory
- Define services and contracts (if applicable)
Create a new TypeScript file in src/platforms/ named after your platform ID (e.g., myplatform.ts):
import { PlatformRaw, ServiceRaw } from "../types";
import { NetworkId } from "@sonarwatch/portfolio-core";
export const platform: PlatformRaw = {
id: "myplatform",
name: "My Platform",
description: "A brief description of what your platform does",
defiLlamaId: "your-defillama-id", // Optional
links: {
website: "https://myplatform.io/",
twitter: "https://x.com/MyPlatform",
discord: "https://discord.gg/myplatform", // Optional
telegram: "https://t.me/myplatform", // Optional
github: "https://github.com/myplatform", // Optional
medium: "https://medium.com/@myplatform", // Optional
documentation: "https://docs.myplatform.io/", // Optional
},
tokens: ["TokenMintAddress1", "TokenMintAddress2"], // Optional
tags: ["dapp", "dex"], // See available tags below
addedAt: 1767268800000, // The timestamp of the day of addition to the list
};
export const services: ServiceRaw[] = [];
export default services;Add a logo image for your platform in the img/ directory:
- File name: Must match your platform ID exactly (e.g.,
myplatform.webp) - Format:
.webp - Dimensions: Exactly 64x64 pixels
You can convert images to WebP format using tools like:
- Online: Squoosh
- CLI:
cwebp input.png -o output.webp
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Unique identifier (lowercase, no spaces) |
name |
string | Yes | Display name of the platform |
description |
string | No | Brief neutral description of the platform |
defiLlamaId |
string | No | DefiLlama protocol ID |
isDeprecated |
boolean | No | Mark platform as deprecated (defaults to false) |
tokens |
string[] | No | Array of token mint addresses |
tags |
PlatformTag[] | Yes | Platform categories (see below) |
links |
object | Yes | Social links and resources |
addedAt |
number | No | The timestamp (in ms) of your PR |
Choose one or more tags that best describe your platform:
dapp- Decentralized applicationtool- Utility or infrastructure toolcex- Centralized exchangenft-collection- NFT collectionnft-marketplace- NFT marketplacelst- Liquid staking tokengaming- Gaming platformbridge- Cross-chain bridgedao- Decentralized autonomous organizationmemecoin- Memecoin projectstablecoin- Stablecoin issuerwallet- Wallet providerlaunchpad- Token launchpaddex- Decentralized exchangesocial- Social platformdepin- Decentralized physical infrastructuredesci- Decentralized sciencefitness- Fitness/health platformliquidity-provider- Liquidity providerlending- Lending and borrowing protocolrwa- Real world assetsinstitutional- Institutional-grade platformprediction- Prediction markettrading- Trading platforminfrastructure- Blockchain infrastructureamm- Automated market makervault- Vault or yield aggregatordefi- Decentralized financeai- AI-related platformrestaking- Restaking protocoloptions- Options tradingpayments- Payment solutionoracle- Oracle providernft- NFT-related protocolbitcoin- Bitcoin-related protocolcard- Card or spending solutionprivacy- Privacy-focused protocol
Services represent specific features or smart contracts of your platform (e.g., Swap, Lending, Staking).
import { NetworkId } from "@sonarwatch/portfolio-core";
const contract = {
name: "Swap",
address: "YourProgramPublicKeyHere",
};
const service: ServiceRaw = {
id: `${platform.id}-swap`,
name: "Swap",
platformId: platform.id,
networkId: NetworkId.solana,
contractsRaw: [contract],
};
export const services: ServiceRaw[] = [service];
export default services;const swapContract = {
name: "Swap",
address: "SwapProgramAddress",
};
const stakingContract = {
name: "Staking",
address: "StakingProgramAddress",
};
const swapService: ServiceRaw = {
id: `${platform.id}-swap`,
name: "Swap",
platformId: platform.id,
networkId: NetworkId.solana,
contractsRaw: [swapContract],
};
const stakingService: ServiceRaw = {
id: `${platform.id}-staking`,
name: "Staking",
platformId: platform.id,
networkId: NetworkId.solana,
contractsRaw: [stakingContract],
};
export const services: ServiceRaw[] = [swapService, stakingService];
export default services;Some services may use multiple contracts (for example, a Multiply service that uses both a lending contract and a swap contract):
const lendingContract = {
name: "Lending",
address: "LendingProgramAddress",
};
const swapingContract = {
name : "Swap"
address : "SwapProgramAddress"
}
const multiplyService: ServiceRaw = {
id: `${platform.id}-multiply`,
name: "Multiply",
platformId: platform.id,
networkId: NetworkId.solana,
contractsRaw: [lendingContract, swapingContract],
};
export const services: ServiceRaw[] = [multiplyService];
export default services;Please follow these rules when contributing:
- Format: All images MUST be in
.webpformat - Dimensions: All images MUST be exactly 64x64 pixels
- File name: Must match the platform ID exactly
- Location: Place in the
img/directory
- Platform IDs: Always in lowercase, use hyphens for spaces (e.g.,
my-platform) - File names: Match platform ID exactly (e.g.,
my-platform.ts,my-platform.webp) - Service IDs: Format as
{platform-id}-{service-name}(e.g.,jupiter-exchange-swap)
- Use TypeScript types provided by the library (
PlatformRaw,ServiceRaw,ContractRaw) - Follow the existing code structure and patterns
- Ensure all required fields are filled
- Validate contract addresses are correct
- Always export
servicesas both a named export and default export
Before submitting your contribution, run the test suite:
# Run tests
npm test
# Build the project
npm run build
# Generate platform index
npm run build:indexMake sure all tests pass and there are no TypeScript errors.
-
Commit your changes:
git add . git commit -m "feat: add [platform-name] platform"
-
Push to your fork:
git push origin add-platform-yourplatform
-
Create a Pull Request on GitHub with:
- Clear title: "Add [Platform Name] platform"
- Description including:
- Platform website
- What services/contracts you're adding
- Any special considerations
-
Wait for review and address any feedback
Here's a complete example of a platform file with all the elements:
import { PlatformRaw, ServiceRaw } from "../types";
import { NetworkId } from "@sonarwatch/portfolio-core";
// Platform definition
export const platform: PlatformRaw = {
id: "jupiter-governance",
name: "Jupiter DAO",
description: "The first voting platform for Cats in history.",
links: {
website: "https://vote.jup.ag/",
twitter: "https://x.com/jup_dao",
},
tokens: ["JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"],
tags: ["dao", "dapp"],
};
// Export contracts that might be used by other platforms
export const jupiterGovernanceContract = {
name: "Governance",
address: "GovaE4iu227srtG2s3tZzB4RmWBzw8sTwrCLZz7kN7rY",
};
export const jupiterVoteContract = {
name: "Locker Vote",
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj",
};
// Internal contract (not exported)
const asrContract = {
name: "ASR Distributor",
address: "Dis2TfkFnXFkrtvAktEkw37sdb7qwJgY6H7YZJwk51wK",
};
// Service definition
const asrService: ServiceRaw = {
id: `${platform.id}-asr`,
name: "ASR",
platformId: platform.id,
networkId: NetworkId.solana,
contractsRaw: [asrContract],
};
// Export services (both named export and default export)
export const services: ServiceRaw[] = [asrService];
export default services;Key points from this example:
- Platform ID is lowercase (
jupiter-governance) - Contracts that other platforms might use are exported (
jupiterGovernanceContract,jupiterVoteContract) - Internal contracts are not exported (
asrContract) - Service ID follows the pattern
{platform-id}-{service-name} - Services are exported both as a named export and default export
- Image file should be at
img/jupiter-governance.webp(64x64 pixels, .webp format)
If you have questions or need help:
- Open an issue on GitHub
- Check existing platforms for examples
- Review the TypeScript types in src/types.ts
Thank you for contributing to the Jupiter Platform List!