TinyCloud SDK is a comprehensive toolkit for building decentralized applications with TinyCloud. It provides easy-to-use interfaces for storage, authentication, delegations, and sharing.
- Web3 Authentication - Sign-in with Ethereum (SIWE) using your wallet
- Space Management - Create and manage user-owned data spaces
- KV Storage - Content-addressed key-value store scoped to user spaces
- Delegation System - Cryptographic capability chains for fine-grained access control
- Sharing - Portable delegation bundles for cross-user data sharing
- Protocol Version Check - Automatic SDK-node compatibility verification during sign-in
- Wallet Integration - Seamless connection with popular Ethereum wallets (browser SDK)
- Server Support - Node.js SDK for server-side delegation chains and automation
- Type Safety - Written in TypeScript with comprehensive type definitions
This monorepo contains the following packages:
| Package | Description | Platform |
|---|---|---|
@tinycloud/web-sdk |
Browser SDK with wallet integration | Browser |
@tinycloud/node-sdk |
Node.js SDK for server-side applications | Node.js |
| Package | Description |
|---|---|
@tinycloud/web-core |
Shared types and utilities for browser SDK |
@tinycloud/sdk-core |
Core utilities and types shared across all SDKs |
@tinycloud/sdk-rs |
Rust implementation with cryptographic primitives |
| Package | Description |
|---|---|
@tinycloud/web-sdk-wasm |
WASM bindings for browser environments |
@tinycloud/node-sdk-wasm |
WASM bindings for Node.js environments |
npm install @tinycloud/web-sdkimport { TinyCloudWeb } from '@tinycloud/web-sdk';
const tc = new TinyCloudWeb();
await tc.signIn();
// KV storage
await tc.kv.put('myKey', { hello: 'world' });
const result = await tc.kv.get('myKey');npm install @tinycloud/node-sdkimport { TinyCloudNode } from '@tinycloud/node-sdk';
const tc = new TinyCloudNode({
privateKey: process.env.PRIVATE_KEY,
domain: 'api.myapp.com',
});
await tc.signIn();
// KV storage
await tc.kv.put('myKey', { hello: 'world' });
const result = await tc.kv.get('myKey');
// Delegations
const delegation = await tc.createDelegation({
delegateDID: 'did:pkh:eip155:1:0x...',
abilities: ['tinycloud.kv/get', 'tinycloud.kv/put'],
});For complete documentation, please visit:
Check out our examples directory for complete working examples of TinyCloud SDK integration.
- Bun (recommended) or Node.js v16+
- Rust for sdk-rs package
# Clone the repository
git clone https://github.com/TinyCloudLabs/web-sdk.git
cd web-sdk
# Install dependencies
bun install
# Build all packages
bun run buildbun run testContributions are welcome! Please feel free to submit a Pull Request.
The TinyCloud Web SDK is the spiritual successor to the SSX SDK. SSX was an open source project built at SpruceID, made to make it easier to build apps with Sign in with Ethereum. While SSX saw limited adoption, it was a great project that pioneered the use of Ethereum for authentication and authorization. TinyCloud Web takes some of its architectural shape from SSX, but is built to be a modern SDK for building applications with TinyCloud.
This project is licensed under the TinyCloud Ecosystem General Public License (EGPL) v1.5 - see the LICENSE.md file for details.
If you encounter any issues or have questions, please file an issue on our GitHub repository.
Join the TinyCloud community:
