@hexon-studio/atom-core
v2.9.5
Published
A powerful TypeScript-based SDK and CLI tool for interacting with Star Atlas blockchain operations.
Readme
@hexon-studio/atom-core 🚀
A powerful TypeScript-based SDK and CLI tool for interacting with Star Atlas blockchain operations.
Overview 📋
@hexon-studio/atom-core provides both a command-line interface (CLI) and a software development kit (SDK) for interacting with various Star Atlas blockchain operations. Built with TypeScript, it offers a robust set of features for blockchain interactions, whether you're building applications or using the command line.
Features ✨
- 🖥️ Command-line interface for blockchain operations
- 🛠️ TypeScript SDK for programmatic blockchain interactions
- 🔒 Full type safety and TypeScript support
- 🏗️ Modular architecture with separate error handling and utilities
- ⛓️ Integration with various Star Atlas blockchain components
- 📝 Built-in logging and error tracking
Installation 📦
pnpm add @hexon-studio/atom-coreUsage 🚀
CLI Usage 💻
atom [command] [options]SDK Usage ⚙️
import { createAtom } from "@hexon-studio/atom-core";
import { PublicKey } from "@solana/web3.js";
// Initialize SDK
const api = createAtom({
rpcUrl: "https://api.mainnet-beta.solana.com",
playerProfile: new PublicKey("your_profile_address"),
owner: new PublicKey("your_wallet_address"),
keypair: "your_keypair"
});
// Initialize the API
await api.init();
// Example: Dock a Fleet
const { status, data, error } = await api.fleet.dock("FleetName123");
if (status === "error") {
console.error("Failed to dock:", error);
return;
}
console.log("Fleet docked successfully:", data);
// Clean up when done
await api.dispose();For more examples and detailed documentation, check out our SDK Examples.
Development 🛠️
Prerequisites ⚡
- Node.js (version specified in .nvmrc)
- pnpm (version specified in package.json)
Setup 🔧
- Clone the repository:
git clone https://github.com/yourusername/atom-core.git
cd atom-core- Install dependencies:
pnpm install- Build the project:
pnpm buildAvailable Scripts 📜
pnpm build- Build the projectpnpm dev- Run the CLI in development modepnpm test- Run testspnpm test:watch- Run tests in watch modepnpm typecheck- Run TypeScript type checkingpnpm lint- Run lintingpnpm release- Create a new release
Project Structure 📁
src/- Source codedist/- Compiled outputdocs/- Documentationatom-docs/- Documentation website (submodule)
Documentation 📚
For detailed documentation, visit the documentation website or check the atom-docs submodule.
License 📄
ISC
Contributing 🤝
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
Support 💬
For support, please open an issue in the GitHub repository.
