starpy.me Documentation
Welcome to the official documentation for starpy.me, your platform for creating decentralized anonymous file exchange shops on the Polygon network.
Getting Started
starpy.me allows you to create and manage decentralized file exchange shops on the Polygon network. This documentation will guide you through the process of setting up and using our SDK.
Installation
To get started with starpy.me, install our SDK using npm:
npm install starpy-polygon-sdk
Initialization
After installation, you need to initialize the SDK with your API key:
import { starpyPolygonSDK } from 'starpy-polygon-sdk';
const starpy = new starpyPolygonSDK({
apiKey: 'YOUR_API_KEY',
network: 'mainnet' // or 'testnet' for Mumbai
});
Creating Shops
To create a new file exchange shop:
const shop = await starpy.createShop({
name: 'My Polygon Shop',
description: 'Fast and efficient file exchanges on Polygon'
});
File Operations
Here are the basic file operations you can perform:
// Upload a file
const fileHash = await starpy.uploadFile(file);
// Download a file
const fileContent = await starpy.downloadFile(fileHash);
// List files in a shop
const files = await starpy.listFiles(shop.id);
HTML Templates
starpy.me provides pre-built HTML templates for quick integration:
<!-- Include the starpy.me Polygon script -->
<script src="https://cdn.starpy.me/polygon-sdk/v1/starpy-polygon.js"></script>
<!-- Use the starpy.me file upload component -->
<starpy-polygon-file-upload shop-id="YOUR_SHOP_ID"></starpy-polygon-file-upload>
<!-- Use the starpy.me file list component -->
<starpy-polygon-file-list shop-id="YOUR_SHOP_ID"></starpy-polygon-file-list>
API Reference
| Method | Description |
|---|---|
| createShop(options) | Creates a new file exchange shop |
| uploadFile(file) | Uploads a file to the Polygon network |
| downloadFile(fileHash) | Downloads a file from the Polygon network |
| listFiles(shopId) | Lists all files in a specific shop |
Troubleshooting
If you encounter any issues while using starpy.me, please check our troubleshooting guide or contact our support team.
Contact Support