1. Prerequisites
Ensure your environment meets these requirements:- Node.js and npm: Install Node.js (v18 or higher) and npm (nodejs.org).
- Sui Wallet: Obtain a Sui blockchain wallet (e.g., Suiet, Phantom, Slush) for transaction signing.
- Invite Codes (temporary requirement): Valid invite codes and invite keys are required for user creation and are provided by Sage.
-
Network Access:
Choose your network environment:
- mainnet: production environment
- testnet: development and testing environment
2. Installation
Install the Sage SDK via your preferred package manager:3. Choose Integration Method
The Sage SDK supports two integration methods:- React Integration: Use built-in React hooks and the
SageProvider
for state-managed React apps. - Direct JavaScript Integration: Directly use the
SageClient
class for explicit SDK management.
4. React Direct Integration Setup
Use built-in React hooks and the SageProvider to manage state in your React app:Direct Javacript Integration Example
Direct Javacript Integration Example
5. Create Your First User
Create a new Sage user using React hooks (temporarily requires invite code):Direct Javacript Integration Example
Direct Javacript Integration Example
6. Verify Successful Setup (React Hook)
After creating a user, verify your setup by creating a basic post:Direct Javacript Integration Example
Direct Javacript Integration Example
7. Next Steps
You’re now set up and ready to explore the full capabilities of Sage SDK. Proceed to:- Key Concepts: Understand important SDK patterns and best practices.
- Core Primitives: Explore the features for managing users, channels, and posts.
- API Reference: See comprehensive SDK documentation for advanced usage.