Package Exports
- @overlay.fun/kit
- @overlay.fun/kit/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@overlay.fun/kit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
overlay-sdk
TypeScript SDK for the overlay.fun API.
API Documentation
Installation
npm install @overlay.fun/kit
Usage
Basic Setup
import { OverlayClient } from "@overlay.fun/kit";
// Initialize client with devnet
const client = new OverlayClient({
env: "devnet", // or "mainnet"
api_key: "your-wallet-api-key",
auth_key: "your-wallet-auth-key"
});
Wallet
// Create a new wallet
const wallet = await client.wallet.create({
network: "solana" // or "evm" "tron" "ton" "aptos"
});
console.log("Wallet address:", wallet.address);
// Get wallet information
const wallet = await client.wallet.get("wallet-address");
Token
// Create a new token
const token = await client.token.create({
network: "solana", // or "evm" "tron" "ton" "aptos"
name: "My Token",
symbol: "MTK",
description: "This is test token",
image: "image url"
supply: 1000000,
website: "https://example.com"
});
// Get token information
const token = await client.token.get("mint-address");
// Transfer tokens (corrected endpoint)
await client.token.transfer("mint-address", {
network: "solana", // or "evm" "tron" "ton" "aptos"
recipient: "recipient-address",
amount: 100
});
// Mint tokens
await client.token.mint("mint-address", {
network: "solana", // or "evm" "tron" "ton" "aptos"
amount: 100
});
// Burn tokens
await client.token.burn("mint-address", {
network: "solana", // or "evm" "tron" "ton" "aptos"
amount: 100
});
NFT
// Create a new NFT
const nft = await client.nft.create({
network: "solana", // or "bsc" "base" "polygon" "blast" etc
name: "My NFT",
image: "https://example.com/image.png",
images: ["https://example.com/image.png", "https://example.com/image.png"],
description: "TEST NFT",
attributes: [
{ trait_type: "Color", value: "Blue" },
{ trait_type: "Rarity", value: "Rare" }
]
});
// Get NFT information
const nft = await client.nft.get("mint-address");
// Transfer NFT(solana)
await client.nft.transfer("mint-address", {
network: "solana",
recipient: "wallet-address"
});
// Transfer NFT(evm)
await client.nft.transfer("mint-address", {
network: "bsc", // or "bsc" "base" "polygon" "blast" etc
recipient: "wallet-address",
token_id: "1"
});
// Burn NFT
await client.nft.burn("mint-address");
Launch token on meteora DBC
// Create a new NFT
const token = await client.launch.create({
network: "solana", // or "bsc" "base" "polygon" "blast" etc
name: "My Token",
symbol: "MTK",
description: "This is test token",
supply: 100000000,
image: "image url",
decimals: 9,
website: "https://example.com"
config_address: "config_address" //must setting your config_address
});
Configuration
Networks
- devnet:
https://devnet.overlay.fun
- mainnet:
https://mainnet.overlay.fun
Examples
Complete Example
import OverlayClient from "@overlay.fun/kit";
// initialize
const client = new OverlayClient({
env: "devnet",
api_key: "your-wallet-api-key",
auth_key: "your-wallet-auth-key"
});
// Create wallet
const wallet = await client.wallet.create({
network: "solana", // or "bsc" "base" "polygon" "blast" etc
});
// Fetch wallet
const wallet = await client.wallet.get("wallet-address");
// Create token
const token = await client.token.create({
network: "solana", // or "bsc" "base" "polygon" "blast" etc
name: "My Token",
symbol: "MTK",
description: "This is test token",
supply: 100000000,
image: "image url",
decimals: 9,
website: "https://example.com"
});
// Fetch token
const token = await client.token.get("mint-address");
// Transfer token
await client.token.transfer(token.mint, {
network: "solana", // or "bsc" "base" "polygon" "blast" etc
recipient: "wallet-address",
amount: 100
});
License
MIT