watchee-minikit
v0.1.0
Published
The official SDK for building mini-apps on Watchee TV
Maintainers
Readme
watchee-minikit
The official SDK for building mini-apps on Watchee TV.
Installation
npm install watchee-minikitQuick Start
import { minikit, Permission } from 'watchee-minikit';
// Connect user's wallet
const account = await minikit.walletAuth();
console.log('Connected:', account.address);
// Request a payment
await minikit.pay({
recipient: '0x...',
amount: 1.5,
token: 'APT',
});
// Trigger haptic feedback
await minikit.hapticFeedback('success');Features
- Wallet Integration - Connect Aptos wallets, sign transactions and messages
- Payments - Request payments in APT or other tokens
- User Data - Access user profiles and NFT ownership
- Device Features - Haptic feedback, permissions, native sharing
- Analytics - Track events within your mini-app
- Content Publishing - Publish content to the Watchee platform
API Reference
Wallet Methods
| Method | Description |
|--------|-------------|
| walletAuth() | Connect user's Aptos wallet |
| disconnect() | Disconnect wallet |
| sendTransaction(payload, options?) | Sign and submit a transaction |
| signMessage(message) | Sign a message |
| signTypedData(data) | Sign typed data (AIP-62) |
Payment Methods
| Method | Description |
|--------|-------------|
| pay(details) | Request payment from user |
User Methods
| Method | Description |
|--------|-------------|
| getProfile() | Get current user's profile |
| getOwnedNFTs(options?) | Get user's NFTs in current context |
| getAppMetadata() | Get current app/channel metadata |
Permission Methods
| Method | Description |
|--------|-------------|
| requestPermission(permission) | Request a device permission |
| checkPermission(permission) | Check permission status |
| getPermissions() | Get all permission statuses |
Device Methods
| Method | Description |
|--------|-------------|
| hapticFeedback(type) | Trigger haptic feedback |
| share(content) | Open native share sheet |
Content Methods
| Method | Description |
|--------|-------------|
| publishContent(data) | Publish content to Watchee |
Analytics Methods
| Method | Description |
|--------|-------------|
| trackEvent(event) | Track an analytics event |
Types
import {
Permission,
PermissionStatus,
PaymentDetails,
ShareContent,
HapticFeedbackType,
// ... and more
} from 'watchee-minikit';Documentation
For complete documentation, guides, and examples, visit: https://docs.watcheeos.com
Requirements
- Must be run within the Watchee TV app environment
- Node.js >= 18.0.0
License
MIT
