TypeScript API client for Tlon's Urbit applications.
npm install @tloncorp/apiOr install from GitHub:
npm install github:tloncorp/api-beta#mainimport {
configureClient,
getGroups,
getContacts,
getCurrentUserId,
} from "@tloncorp/api";
// Configure the client
configureClient({
shipName: "your-ship-name",
shipUrl: "https://your-ship.tlon.network",
getCode: async () => "your-access-code",
});
// Make API calls
const groups = await getGroups();
const contacts = await getContacts();See the examples/cli directory for a working CLI example.
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Watch mode
npm run devMIT