@moneytools-dev/ai-sdk 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +9 -0
- package/README.md +32 -2
- package/dist/index.d.ts +1546 -0
- package/dist/index.js +61 -0
- package/package.json +48 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MoneyTools
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @moneytools-dev/ai-sdk
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[Vercel AI SDK](https://ai-sdk.dev) tools for MoneyTools, paid per use with x402 USDC on Base. No API key, no account, no prepaid credits.
|
|
4
|
+
|
|
5
|
+
| Tool | Cost | What it does |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| `transcribeAudio` | 0.002 USDC / started minute | Speech-to-text for a public audio/video URL (up to 3 h) |
|
|
8
|
+
| `getTranscription` | free | Job status/result as JSON, SRT, VTT or text |
|
|
9
|
+
| `spendCheck` | 0.002 USDC | Allow/deny a planned x402 payment against this wallet's caps |
|
|
10
|
+
| `setSpendCap` | 0.002 USDC | Per-call / per-day caps and allowed hosts |
|
|
11
|
+
| `verifyPayment` | 0.003 USDC | Verify an x402 USDC payment on Base |
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @moneytools-dev/ai-sdk ai zod viem
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { generateText, isStepCount } from "ai";
|
|
19
|
+
import { privateKeyToAccount } from "viem/accounts";
|
|
20
|
+
import { moneytoolsTools } from "@moneytools-dev/ai-sdk";
|
|
21
|
+
|
|
22
|
+
const account = privateKeyToAccount(process.env.MONEYTOOLS_EVM_PRIVATE_KEY as `0x${string}`);
|
|
23
|
+
const { text } = await generateText({
|
|
24
|
+
model: "openai/gpt-5-mini",
|
|
25
|
+
prompt: "Transcribe https://example.com/standup.mp3 and list the action items.",
|
|
26
|
+
tools: moneytoolsTools({ account, maxUsdPerRequest: 0.5 }),
|
|
27
|
+
stopWhen: isStepCount(3),
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`maxUsdPerRequest` caps every signed payment; anything above it is refused before signing. The key stays in your process.
|
|
32
|
+
|
|
33
|
+
Docs: https://speech.moneytools.dev/docs/migrate-from-dtelecom · MIT
|