Package Exports
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 (@elizaos/plugin-spheron) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Spheron Protocol Plugin for Eliza
This plugin integrates the Spheron Protocol SDK into the Eliza ecosystem, providing functionality for managing deployments, escrow operations, and lease management.
Features
- Escrow Operations: Manage token deposits, withdrawals, and balance checks
- Deployment Management: Create, update, and manage deployments using ICL YAML
Installation
npm install @elizaos/plugin-spheronConfiguration
The plugin requires the following environment variables:
PRIVATE_KEY=your_private_key
PROVIDER_PROXY_URL=your_provider_proxy_url
WALLET_ADDRESS=your_wallet_addressUsage
- Import and register the plugin:
import { spheronPlugin } from "@elizaos/plugin-spheron";
// Register with Eliza
eliza.registerPlugin(spheronPlugin);- Available Actions:
ESCROW_OPERATION: Handle token deposits and withdrawalsDEPLOYMENT_OPERATION: Manage service deployments
Examples
Escrow Operations
// Deposit tokens
await runtime.executeAction("ESCROW_OPERATION", {
token: "USDT",
amount: 100,
operation: "deposit",
});
// Withdraw tokens
await runtime.executeAction("ESCROW_OPERATION", {
token: "USDC",
amount: 50,
operation: "withdraw",
});Deployment Operations
// Create deployment
await runtime.executeAction("DEPLOYMENT_OPERATION", {
operation: "create",
template: "jupyter-notebook",
customizations: {
cpu: false,
resources: {
cpu: "4",
memory: "8Gi",
storage: "10Gi",
gpu: "1",
gpu_model: "rtx4090",
},
duration: "1h",
token: "USDT",
},
});
// Update deployment
await runtime.executeAction("DEPLOYMENT_OPERATION", {
operation: "update",
leaseId: "your_lease_id",
template: "jupyter-notebook",
customizations: {
cpu: false,
resources: {
cpu: "4",
memory: "8Gi",
storage: "10Gi",
gpu: "1",
gpu_model: "rtx4090",
},
duration: "1h",
token: "USDT",
},
});
// Close deployment
await runtime.executeAction("DEPLOYMENT_OPERATION", {
operation: "close",
leaseId: "your_lease_id",
});Supported Templates
- jupyter-notebook: Jupyter Notebook with or without Pytorch
- vscode: VSCode with or without Pytorch
- ollama: Ollama WebUI and API
- heurist-miner: Heurist Miner for mining heurist network
How it Works
- You can ask the eliza to deploy a template like
jupyter-notebook,vscode,ollama, orheurist-minerfor you with just natural language. - You can also customize the deployment with natural language.
- You can also ask the eliza to close the deployment.
- You can also ask the eliza to check the balance of your account.
- You can also ask the eliza to deposit or withdraw tokens from your account.
Development
- Install dependencies:
npm install- Build the plugin:
npm run build- Run tests:
npm testLicense
This plugin is part of the Eliza project. See the main project repository for license information.