@temporalabs/treasury 0.1.1 → 0.1.3
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/NOTICE +4 -2
- package/README.md +100 -44
- package/THIRD_PARTY_NOTICES.connect-page.md +7836 -0
- package/THIRD_PARTY_NOTICES.md +543 -162
- package/dist/cli.d.ts +6 -0
- package/dist/cli.js +243 -0
- package/dist/cli.js.map +1 -0
- package/dist/client.d.ts +366 -239
- package/dist/client.js +202 -25
- package/dist/client.js.map +1 -1
- package/dist/config/earn.d.ts +48 -12
- package/dist/config/earn.js +48 -12
- package/dist/config/earn.js.map +1 -1
- package/dist/connect/ack.d.ts +76 -0
- package/dist/connect/ack.js +147 -0
- package/dist/connect/ack.js.map +1 -0
- package/dist/connect/commands.d.ts +81 -0
- package/dist/connect/commands.js +555 -0
- package/dist/connect/commands.js.map +1 -0
- package/dist/connect/config.d.ts +24 -0
- package/dist/connect/config.js +35 -0
- package/dist/connect/config.js.map +1 -0
- package/dist/connect/gate-solana.d.ts +8 -0
- package/dist/connect/gate-solana.js +147 -0
- package/dist/connect/gate-solana.js.map +1 -0
- package/dist/connect/gate.d.ts +37 -0
- package/dist/connect/gate.js +115 -0
- package/dist/connect/gate.js.map +1 -0
- package/dist/connect/http.d.ts +60 -0
- package/dist/connect/http.js +235 -0
- package/dist/connect/http.js.map +1 -0
- package/dist/connect/open.d.ts +2 -0
- package/dist/connect/open.js +35 -0
- package/dist/connect/open.js.map +1 -0
- package/dist/connect/page.d.ts +5 -0
- package/dist/connect/page.js +69 -0
- package/dist/connect/page.js.map +1 -0
- package/dist/connect/session.d.ts +39 -0
- package/dist/connect/session.js +198 -0
- package/dist/connect/session.js.map +1 -0
- package/dist/connect/solana.d.ts +73 -0
- package/dist/connect/solana.js +267 -0
- package/dist/connect/solana.js.map +1 -0
- package/dist/connect/verify.d.ts +37 -0
- package/dist/connect/verify.js +89 -0
- package/dist/connect/verify.js.map +1 -0
- package/dist/connect-page.js +5143 -0
- package/dist/disclosures.d.ts +22 -6
- package/dist/disclosures.js +34 -8
- package/dist/disclosures.js.map +1 -1
- package/dist/earn/commands.d.ts +46 -0
- package/dist/earn/commands.js +556 -0
- package/dist/earn/commands.js.map +1 -0
- package/dist/earn/solana.d.ts +278 -0
- package/dist/earn/solana.js +302 -0
- package/dist/earn/solana.js.map +1 -0
- package/dist/guide.d.ts +15 -0
- package/dist/guide.js +50 -0
- package/dist/guide.js.map +1 -0
- package/dist/links.d.ts +2 -0
- package/dist/links.js +40 -14
- package/dist/links.js.map +1 -1
- package/dist/position.d.ts +9 -6
- package/dist/position.js +39 -19
- package/dist/position.js.map +1 -1
- package/dist/preflight.d.ts +9 -0
- package/dist/preflight.js +14 -3
- package/dist/preflight.js.map +1 -1
- package/dist/quote.js +24 -7
- package/dist/quote.js.map +1 -1
- package/dist/redact.d.ts +3 -3
- package/dist/redact.js +3 -3
- package/dist/redact.js.map +1 -1
- package/dist/registry-schema.d.ts +82 -5
- package/dist/registry-schema.js +105 -15
- package/dist/registry-schema.js.map +1 -1
- package/dist/registry.d.ts +50 -7
- package/dist/registry.js +122 -21
- package/dist/registry.js.map +1 -1
- package/dist/solana/constants.d.ts +49 -0
- package/dist/solana/constants.js +50 -0
- package/dist/solana/constants.js.map +1 -0
- package/dist/solana/kvault.d.ts +99 -0
- package/dist/solana/kvault.js +192 -0
- package/dist/solana/kvault.js.map +1 -0
- package/dist/solana/layout.d.ts +143 -0
- package/dist/solana/layout.js +209 -0
- package/dist/solana/layout.js.map +1 -0
- package/dist/solana/rpc.d.ts +24 -0
- package/dist/solana/rpc.js +66 -0
- package/dist/solana/rpc.js.map +1 -0
- package/dist/solana/vault.d.ts +153 -0
- package/dist/solana/vault.js +324 -0
- package/dist/solana/vault.js.map +1 -0
- package/dist/{mcp-server.mjs → treasury.mjs} +41101 -49486
- package/dist/version.js +5 -10
- package/dist/version.js.map +1 -1
- package/llms.txt +621 -0
- package/package.json +12 -9
- package/registry/vaults.json +218 -4
- package/dist/mcp/server.d.ts +0 -8
- package/dist/mcp/server.js +0 -368
- package/dist/mcp/server.js.map +0 -1
package/NOTICE
CHANGED
|
@@ -3,8 +3,10 @@ Copyright 2026 Tempora Labs
|
|
|
3
3
|
|
|
4
4
|
This product includes software developed by Tempora Labs.
|
|
5
5
|
|
|
6
|
-
The third-party components bundled into dist/
|
|
7
|
-
reproduced in full, for the exact version bundled, in THIRD_PARTY_NOTICES.md.
|
|
6
|
+
The third-party components bundled into dist/treasury.mjs keep their own licences. Each is
|
|
7
|
+
reproduced in full, for the exact version bundled, in THIRD_PARTY_NOTICES.md. The same holds for
|
|
8
|
+
dist/connect-page.js, the page `treasury connect` serves, whose components are reproduced in
|
|
9
|
+
THIRD_PARTY_NOTICES.connect-page.md.
|
|
8
10
|
|
|
9
11
|
"Tempora", "Tempora Labs" and "Agent Treasury" are names of Tempora Labs. The Apache License
|
|
10
12
|
(section 6) does not grant permission to use them beyond describing where the work came from.
|
package/README.md
CHANGED
|
@@ -11,16 +11,28 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
Open Agent Treasury (OAT) helps agents manage on-chain capital. Its first skill, **Earn**, lets
|
|
14
|
-
agents inspect
|
|
15
|
-
withdrawals. It ships as an agent plugin,
|
|
14
|
+
agents inspect vaults curated by Tempora Labs on Base, Arbitrum One, Robinhood Chain, Ethereum, Monad and Solana, track positions, and prepare deposits and
|
|
15
|
+
withdrawals. It ships as an agent plugin, a command-line program, and a TypeScript/JavaScript library.
|
|
16
16
|
|
|
17
|
-
**OAT prepares transactions. Your
|
|
18
|
-
|
|
17
|
+
**OAT prepares transactions. Your wallet executes them.** It never holds private keys or signs: with
|
|
18
|
+
`treasury connect` your agent opens a page where you connect your own wallet — a browser wallet, or
|
|
19
|
+
an email or social login — and confirm each transaction; or it hands you unsigned calls for any signer.
|
|
20
|
+
A transaction goes out only from your own wallet, after you approve it there. You decide how much capital an agent may put to work.
|
|
19
21
|
|
|
20
22
|
> **Experimental — pre-1.0. Real funds, real risk.** Returns are variable, capital is at risk,
|
|
21
23
|
> and withdrawals depend on available liquidity. Review every transaction before signing and
|
|
22
24
|
> read the [risks](docs/risks.md) before depositing.
|
|
23
25
|
|
|
26
|
+
## Two ways to use the vaults
|
|
27
|
+
|
|
28
|
+
- **In a browser, at [app.temporalabs.com](https://app.temporalabs.com).** Connect a wallet, then deposit
|
|
29
|
+
and withdraw from the page. The app shows the Cash Plus vaults it currently supports, which can be fewer
|
|
30
|
+
than OAT offers.
|
|
31
|
+
- **With an agent, through OAT.** Your agent quotes, prepares and confirms deposits and withdrawals through
|
|
32
|
+
the plugin or the CLI, and you approve each transaction in your own wallet.
|
|
33
|
+
|
|
34
|
+
Either way the vaults are the same on-chain contracts.
|
|
35
|
+
|
|
24
36
|
## What you can do
|
|
25
37
|
|
|
26
38
|
- **Inspect vaults:** check assets, fees, and deposit access.
|
|
@@ -28,51 +40,50 @@ or sends transactions. You decide how much capital an agent may put to work.
|
|
|
28
40
|
- **Track a position:** see its value, deposits, and earnings from on-chain records.
|
|
29
41
|
- **Prepare a withdrawal:** check how much is withdrawable now and build unsigned calls.
|
|
30
42
|
|
|
31
|
-
Earn currently supports **USDC in, USDC out** through Tempora'
|
|
32
|
-
|
|
43
|
+
Earn currently supports **USDC in, USDC out** through Tempora Labs' ERC-4626 vaults on Base,
|
|
44
|
+
Arbitrum One, Ethereum and Monad, through a Kamino vault on Solana, and **USDG in, USDG out** on Robinhood Chain. Base is the default chain, and Test 2B its
|
|
45
|
+
default vault; the agent asks which chain when you have not said, and the funds have to be on that
|
|
46
|
+
chain already. See [Vaults](#vaults).
|
|
47
|
+
See the [command reference](docs/tools.md), the eight `earn` commands and the five `connect` commands, for inputs, outputs, and limits.
|
|
33
48
|
|
|
34
49
|
## Quick start
|
|
35
50
|
|
|
36
|
-
**Requires Node.js 22+ on your `PATH`.** Use a keyed
|
|
51
|
+
**Requires Node.js 22+ on your `PATH`.** Use a keyed RPC for each chain you use; the public fallbacks rate-limit quickly.
|
|
37
52
|
|
|
38
53
|
### Claude Code
|
|
39
54
|
|
|
40
55
|
```bash
|
|
41
|
-
export TREASURY_RPC_BASE=https://...
|
|
42
|
-
|
|
56
|
+
export TREASURY_RPC_BASE=https://... # replace with your Base RPC URL
|
|
57
|
+
export TREASURY_RPC_ARBITRUM=https://... # only if you will use a vault on Arbitrum One
|
|
58
|
+
export TREASURY_RPC_ROBINHOOD=https://... # only if you will use a vault on Robinhood Chain
|
|
59
|
+
export TREASURY_RPC_ETHEREUM=https://... # only if you will use a vault on Ethereum
|
|
60
|
+
export TREASURY_RPC_MONAD=https://... # only if you will use a vault on Monad
|
|
61
|
+
export TREASURY_RPC_SOLANA=https://... # only if you will use the vault on Solana
|
|
62
|
+
claude plugin marketplace add TemporaLabs/treasury@v0.1.3
|
|
43
63
|
claude plugin install treasury@treasury
|
|
44
64
|
```
|
|
45
65
|
|
|
46
|
-
|
|
66
|
+
Start a new Claude Code session after installing so the Earn skill loads. Keep the `TemporaLabs/treasury@v0.1.3` ref
|
|
47
67
|
explicit so the install stays on a release rather than tracking the default branch. Upgrading an
|
|
48
68
|
earlier install? Run `claude plugin marketplace remove treasury` first, then the two `claude plugin` lines above
|
|
49
69
|
([details](docs/install.md#upgrading-an-earlier-install)).
|
|
50
70
|
|
|
51
71
|
The plugin is the [`plugin/`](plugin/) folder of this repository: its manifests, the Earn skill, and a
|
|
52
|
-
copy of this repository's own
|
|
72
|
+
copy of this repository's own CLI bundle and the page `treasury connect` serves, made in the same commit. The skill runs it with `node`, one
|
|
73
|
+
command at a time; nothing stays running.
|
|
53
74
|
|
|
54
|
-
###
|
|
75
|
+
### Any agent with a shell
|
|
55
76
|
|
|
56
77
|
```bash
|
|
57
|
-
npm install @temporalabs/treasury@0.1.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Add the server to your host's MCP configuration, replacing the path and RPC URL:
|
|
61
|
-
|
|
62
|
-
```json
|
|
63
|
-
{
|
|
64
|
-
"mcpServers": {
|
|
65
|
-
"treasury": {
|
|
66
|
-
"command": "node",
|
|
67
|
-
"args": ["<absolute-project-path>/node_modules/@temporalabs/treasury/dist/mcp-server.mjs"],
|
|
68
|
-
"env": { "TREASURY_RPC_BASE": "https://..." }
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
78
|
+
npm install --save-exact @temporalabs/treasury@0.1.3
|
|
79
|
+
npx --no-install treasury earn --help # every command and flag, as JSON
|
|
72
80
|
```
|
|
73
81
|
|
|
74
|
-
|
|
75
|
-
|
|
82
|
+
Each command prints one JSON document; a refusal exits 1 with `{ "error": … }` on stderr.
|
|
83
|
+
`treasury --help` points to [`llms.txt`](llms.txt), the guide an agent without the plugin should read first: the rules the
|
|
84
|
+
plugin's Earn skill carries (which questions to ask the operator, what to show before a first deposit) and every command with its flags.
|
|
85
|
+
It is generated from that skill and the command descriptions, and CI fails when it drifts.
|
|
86
|
+
For library usage, other hosts, and troubleshooting, see [installation](docs/install.md).
|
|
76
87
|
|
|
77
88
|
### Try it
|
|
78
89
|
|
|
@@ -80,20 +91,64 @@ Ask your agent:
|
|
|
80
91
|
|
|
81
92
|
> Show me the available vaults and their risks. Then prepare a 25 USDC deposit into the default vault.
|
|
82
93
|
|
|
83
|
-
|
|
94
|
+
To try the demo vault or another chain, name it: *“…into the demo vault”*, or *“…on Arbitrum”*.
|
|
95
|
+
|
|
96
|
+
With a browser on the machine, you sign in once with `treasury connect`. For each deposit the agent first
|
|
97
|
+
shows you a fixed confirmation text, and only on your yes opens a page where you confirm each call in your
|
|
98
|
+
own wallet. Otherwise OAT returns unsigned calls for your signer. Preparing a deposit moves no money.
|
|
84
99
|
Later, ask: **“What is my position worth, and how much can I withdraw now?”**
|
|
85
100
|
|
|
86
101
|
## Vaults
|
|
87
102
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
103
|
+
A command that names no vault or chain uses **Cash Plus USDC (Test 2B)** on Base; the agent still asks
|
|
104
|
+
which chain first when you have not said. These are Tempora Labs' curated test vaults, on six chains: Base,
|
|
105
|
+
Arbitrum One, Robinhood Chain, Ethereum, Monad and Solana. There are other options, and a demo.
|
|
106
|
+
|
|
107
|
+
| | vault | chain | choose it by |
|
|
108
|
+
|---|---|---|---|
|
|
109
|
+
| **Default** | **Cash Plus USDC (Test 2B)** | <img src="docs/assets/chains/base.webp" alt="" width="20" height="20"> Base | naming nothing, or `--chain base` |
|
|
110
|
+
| **Demo** | **Cash Plus USDC (Test 2)** | <img src="docs/assets/chains/base.webp" alt="" width="20" height="20"> Base | `--vault tlCashPlusUSDC2` |
|
|
111
|
+
| Option | **Cash Plus USDC (Test 2C)** | <img src="docs/assets/chains/arbitrum.webp" alt="" width="20" height="20"> Arbitrum One | `--chain arbitrum` |
|
|
112
|
+
| Option | **Cash Plus USDG (Test 2D)** | <img src="docs/assets/chains/robinhood.webp" alt="" width="20" height="20"> Robinhood Chain | `--chain robinhood` |
|
|
113
|
+
| Option | **Cash Plus USDC (Test 2E)** | <img src="docs/assets/chains/ethereum.webp" alt="" width="20" height="20"> Ethereum | `--chain ethereum` |
|
|
114
|
+
| Option | **Cash Plus USDC (Test 2F)** | <img src="docs/assets/chains/monad.webp" alt="" width="20" height="20"> Monad | `--chain monad` |
|
|
115
|
+
| Option | **Cash Plus USDC (Test 2G)** | <img src="docs/assets/chains/solana.webp" alt="" width="20" height="20"> Solana | `--chain solana` |
|
|
116
|
+
| Option | **Cash Plus USDC (Test 2A)** | <img src="docs/assets/chains/base.webp" alt="" width="20" height="20"> Base | `--vault tlCashPlusUSDC2A` (whitelist only) |
|
|
117
|
+
|
|
118
|
+
Chain logos are the marks of their respective owners, shown only to identify the chains; the icons come from
|
|
119
|
+
[DefiLlama](https://defillama.com)'s chain icon set.
|
|
120
|
+
|
|
121
|
+
- **Test 2B, the default.** A Morpho Vault V2 on Base, open to any account. Its first position is a
|
|
122
|
+
savings-rate token rather than a lending vault, and its other two positions differ from Test 2's too
|
|
123
|
+
([how](docs/vaults.md#offered-today)). [BaseScan](https://basescan.org/address/0x91BcEbA5feCB9E92d80F1845B55cC56621E9352F);
|
|
124
|
+
Morpho's own app has no page for it.
|
|
125
|
+
- **Test 2, the demo.** The same kind of vault, and the one to show people: it has a page on Morpho's
|
|
126
|
+
app, [here](https://app.morpho.org/base/vault/0x040fCA12673778FEED5DA7b2ccFbbAb0cc0134Cf/tempora-labs-cash-plus-usdc-test-2#overview).
|
|
127
|
+
Its three positions are different vaults from Test 2B's, and the first is a lending vault. Open to any
|
|
128
|
+
account, but an agent uses it only when it is named.
|
|
129
|
+
- **Test 2C, Arbitrum One.** A Morpho Vault V2 over native USDC, open to any account.
|
|
130
|
+
[Arbiscan](https://arbiscan.io/address/0x4057a63953142Ac2b3E5dB1954Fc14d578662587). The USDC has to
|
|
131
|
+
be on Arbitrum already; OAT does not bridge.
|
|
132
|
+
- **Test 2D, Robinhood Chain.** A Morpho Vault V2 over **USDG**, not USDC, open to any account.
|
|
133
|
+
[Blockscout](https://robinhoodchain.blockscout.com/address/0x758f00731943aA88e8C7fB709e0B727903B4F833).
|
|
134
|
+
The USDG has to be on Robinhood Chain already.
|
|
135
|
+
- **Test 2E, Ethereum.** A Morpho Vault V2 over USDC, open to any account.
|
|
136
|
+
[Etherscan](https://etherscan.io/address/0x2AA9B1F12bbFE1E01dcb4DD52E6836d68416e3B6). Gas on
|
|
137
|
+
Ethereum costs far more than on the other chains, which matters for a small deposit.
|
|
138
|
+
- **Test 2F, Monad.** A Morpho Vault V2 over USDC, open to any account.
|
|
139
|
+
[MonadScan](https://monadscan.com/address/0x163295A4d4381745A205DC5E9A436a3f51791593).
|
|
140
|
+
- **Test 2G, Solana.** A Kamino vault over USDC, open to any account.
|
|
141
|
+
[Solscan](https://solscan.io/account/8qV54zrW2piQgBbVaUUtGajf4KuVDKLUDquHv9VZBfS7). It takes a Solana
|
|
142
|
+
wallet (`treasury connect wallet --chain solana`), the account needs a little SOL for fees, and every
|
|
143
|
+
withdrawal keeps up to 0.001 USDC in the vault per instruction (a charge Kamino sets for every vault on its program, and can change).
|
|
144
|
+
- **Test 2A.** IPOR Fusion, listed so an admitted account can read and exit its position.
|
|
145
|
+
|
|
146
|
+
When you have not said which chain, the agent shows these and asks before it prepares a deposit.
|
|
147
|
+
|
|
148
|
+
All of them are experimental vaults using real funds (USDC, or USDG on Robinhood Chain), not bank savings accounts. None currently has a
|
|
149
|
+
lock-up, but liquidity can limit withdrawals.
|
|
150
|
+
|
|
151
|
+
Tempora Labs curates these vaults and can set fees. OAT offers Tempora Labs' vaults; it does not compare
|
|
97
152
|
them against the market or promise the best yield. It reports your position's value and earnings,
|
|
98
153
|
not a quoted APY.
|
|
99
154
|
|
|
@@ -101,14 +156,15 @@ See [vault details](docs/vaults.md) for addresses, access rules, fees, and dated
|
|
|
101
156
|
|
|
102
157
|
## Security
|
|
103
158
|
|
|
104
|
-
- **No keys or custody:** your wallet holds the position;
|
|
105
|
-
- **Direct RPC access:** no Tempora service in the request path and no telemetry. Keyed RPC URLs are redacted.
|
|
159
|
+
- **No keys or custody:** your wallet holds the position; Treasury never holds a key. With an email or social login, that wallet's keys are managed by Privy; see [risks](docs/risks.md).
|
|
160
|
+
- **Direct RPC access:** the `earn` commands talk only to the chain's RPC (yours, or the chain's public endpoint when none is set or a history scan needs it; see [configuration](docs/configuration.md)), with no Tempora Labs service in the request path and no telemetry. Keyed RPC URLs are redacted.
|
|
161
|
+
- **Sign-in through Privy:** `treasury connect` signs you in through [Privy](https://privy.io), using Tempora Labs' Privy app unless you set `PRIVY_APP_ID`. Privy, and Tempora Labs as that app's owner, see your login and wallet address, and Privy's script on the page sends its own analytics. The page also loads Cloudflare's bot check (challenges.cloudflare.com) for Privy's sign-in.
|
|
106
162
|
- **Verifiable builds:** CI checks the committed bundle; [verify its provenance](docs/runbooks/verify_the_bundle.md).
|
|
107
163
|
- **Private vulnerability reporting:** follow [SECURITY.md](SECURITY.md), not a public issue.
|
|
108
164
|
|
|
109
165
|
## Documentation
|
|
110
166
|
|
|
111
|
-
- [
|
|
167
|
+
- [Command reference](docs/tools.md) · [Configuration](docs/configuration.md)
|
|
112
168
|
- [Risks](docs/risks.md) · [Security model](docs/security-model.md)
|
|
113
169
|
- [Signing and sending](docs/runbooks/sign_and_send.md) · [All docs](docs/README.md) · [Changelog](CHANGELOG.md)
|
|
114
170
|
|
|
@@ -121,6 +177,6 @@ certifying the [Developer Certificate of Origin](DCO.md).
|
|
|
121
177
|
## Licence
|
|
122
178
|
|
|
123
179
|
[Apache-2.0](LICENSE). Keep [LICENSE](LICENSE) and [NOTICE](NOTICE) when redistributing.
|
|
124
|
-
The licence does not grant rights to Tempora'
|
|
125
|
-
official distribution. Tempora'
|
|
180
|
+
The licence does not grant rights to Tempora Labs' names or marks ("Tempora", "Tempora Labs" and "Agent Treasury", as NOTICE lists them); forks must not claim to be the
|
|
181
|
+
official distribution. Tempora Labs' fund-operations infrastructure is separate from this repository.
|
|
126
182
|
See [licensing](docs/licensing.md) for details.
|