@earnkit/earn
v0.1.4
Published
[](https://www.npmjs.com/package/@earnkit/earn)
Readme
EarnKit SDK
The official TypeScript SDK for EarnKit, the easiest way to monetize your AI agents with usage-based billing and a seamless credit system.
This SDK provides a simple, secure, and reliable way to integrate your application with the EarnKit platform, allowing you to charge users for API calls, feature usage, and more.
Features
- Simple Integration: Get up and running with just a few lines of code.
- Reliable Billing: A secure
track/capture/releasepattern ensures users are never charged for failed operations. - Flexible Fee Models: Configure free tiers and credit-based systems in the EarnKit dashboard without changing your code.
- Complete Wallet Management: Tools to fetch user balances and handle on-chain top-up transactions.
- Robust Error Handling: Custom error types for predictable error management.
- Fully Typed: Written in TypeScript for a great developer experience.
Documentation
For a complete API reference, tutorials, and best practices, visit our official documentation at docs.earnkit.com.
Installation
Install the package using your favorite package manager:
npm install @earnkit/earnyarn add @earnkit/earnpnpm add @earnkit/earn