This example demonstrates how to use the NeoFS TypeScript SDK in a Node.js environment.
The example provides an interactive CLI that demonstrates:
- Key Management: Load WIF keys, generate new keys, view public keys
- Connection: Connect to NeoFS endpoints, manage connections
- Network Operations: Get network info, check balance, get local node info
- Container Operations: List, create, get info, delete containers
- Object Operations: Upload, list, download, get info, delete objects
- Node.js >= 18
- pnpm (or npm/yarn)
- Install dependencies:
cd example
pnpm install- Build the SDK (if not already built):
cd ..
pnpm build
cd examplepnpm devpnpm startOr directly with tsx:
npx tsx src/index.ts- Start the application
- Load or generate a key (Menu option 1)
- Connect to a NeoFS endpoint (Menu option 2)
- Explore network, container, and object operations
- Testnet:
grpc://st1.t5.fs.neo.org:8080 - Mainnet:
grpc://st1.fs.neo.org:8080
- This example uses a simple CLI interface
- For production applications, you would typically use a proper UI framework
- The example demonstrates the core SDK functionality without EACL/BearerToken/Waiter (those would need to be implemented for Node.js separately)