@temporalabs/treasury 0.1.2 → 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/README.md +44 -12
- package/THIRD_PARTY_NOTICES.connect-page.md +416 -0
- package/THIRD_PARTY_NOTICES.md +575 -2
- package/dist/cli.js +28 -5
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +149 -7
- package/dist/client.js +66 -11
- package/dist/client.js.map +1 -1
- package/dist/config/earn.d.ts +16 -1
- package/dist/config/earn.js +16 -1
- package/dist/config/earn.js.map +1 -1
- package/dist/connect/ack.d.ts +18 -1
- package/dist/connect/ack.js +42 -6
- package/dist/connect/ack.js.map +1 -1
- package/dist/connect/commands.d.ts +3 -0
- package/dist/connect/commands.js +168 -24
- package/dist/connect/commands.js.map +1 -1
- package/dist/connect/config.d.ts +7 -5
- package/dist/connect/config.js +8 -6
- package/dist/connect/config.js.map +1 -1
- 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/http.d.ts +7 -1
- package/dist/connect/http.js +41 -11
- package/dist/connect/http.js.map +1 -1
- package/dist/connect/page.d.ts +1 -1
- package/dist/connect/page.js +2 -2
- package/dist/connect/page.js.map +1 -1
- package/dist/connect/session.d.ts +23 -0
- package/dist/connect/session.js +126 -1
- package/dist/connect/session.js.map +1 -1
- 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-page.js +604 -602
- package/dist/disclosures.d.ts +5 -4
- package/dist/disclosures.js +5 -4
- package/dist/disclosures.js.map +1 -1
- package/dist/earn/commands.js +127 -54
- package/dist/earn/commands.js.map +1 -1
- 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.js +2 -0
- package/dist/links.js.map +1 -1
- package/dist/position.d.ts +3 -2
- package/dist/position.js +6 -3
- package/dist/position.js.map +1 -1
- package/dist/quote.js +2 -2
- package/dist/quote.js.map +1 -1
- package/dist/registry-schema.d.ts +79 -2
- package/dist/registry-schema.js +77 -1
- package/dist/registry-schema.js.map +1 -1
- package/dist/registry.d.ts +21 -1
- package/dist/registry.js +48 -10
- 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/treasury.mjs +8123 -1082
- package/dist/version.js +5 -10
- package/dist/version.js.map +1 -1
- package/llms.txt +621 -0
- package/package.json +9 -6
- package/registry/vaults.json +113 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporalabs/treasury",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"NOTICE",
|
|
12
12
|
"THIRD_PARTY_NOTICES.md",
|
|
13
13
|
"THIRD_PARTY_NOTICES.connect-page.md",
|
|
14
|
+
"llms.txt",
|
|
14
15
|
"dist",
|
|
15
16
|
"registry"
|
|
16
17
|
],
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
"access": "public",
|
|
19
20
|
"provenance": true
|
|
20
21
|
},
|
|
21
|
-
"description": "Agent Treasury by Tempora Labs — a depositor client for ERC-4626 vaults: registry, pre-flight, and unsigned deposit/withdraw builders. Never signs, never holds a key.",
|
|
22
|
+
"description": "Agent Treasury by Tempora Labs — a depositor client for ERC-4626 vaults and a Kamino vault on Solana: registry, pre-flight, and unsigned deposit/withdraw builders. Never signs, never holds a key.",
|
|
22
23
|
"type": "module",
|
|
23
24
|
"main": "./dist/index.js",
|
|
24
25
|
"types": "./dist/index.d.ts",
|
|
@@ -35,19 +36,21 @@
|
|
|
35
36
|
"node": ">=22"
|
|
36
37
|
},
|
|
37
38
|
"scripts": {
|
|
38
|
-
"prepack": "npm run build && git diff --exit-code -- dist/treasury.mjs THIRD_PARTY_NOTICES.md",
|
|
39
|
-
"build": "tsc -b && tsup && tsx scripts/third-party-notices.ts --write && bash scripts/sync-plugin.sh",
|
|
39
|
+
"prepack": "npm run build && git diff --exit-code -- dist/treasury.mjs THIRD_PARTY_NOTICES.md llms.txt",
|
|
40
|
+
"build": "tsc -b && tsup && tsx scripts/third-party-notices.ts --write && tsx scripts/llms-txt.ts --write && bash scripts/sync-plugin.sh",
|
|
40
41
|
"typecheck": "tsc -b && tsc -p tsconfig.scripts.json",
|
|
41
42
|
"test": "tsc -b && tsc -p tsconfig.scripts.json && vitest run",
|
|
42
|
-
"test:fork": "tsc -b && TREASURY_FORK=1 vitest run --testTimeout 300000 tests/fork.test.ts",
|
|
43
|
+
"test:fork": "tsc -b && TREASURY_FORK=1 vitest run --testTimeout 300000 tests/fork.test.ts tests/fork-solana.test.ts",
|
|
43
44
|
"cli": "tsx src/cli.ts",
|
|
44
45
|
"registry:check": "tsx scripts/registry-check.ts",
|
|
45
46
|
"notices:check": "tsx scripts/third-party-notices.ts",
|
|
47
|
+
"llms:check": "tsx scripts/llms-txt.ts",
|
|
46
48
|
"plugin:check": "bash scripts/sync-plugin.sh --check && bash scripts/check-versions.sh",
|
|
47
49
|
"lint:skill": "bash scripts/lint-skill.sh"
|
|
48
50
|
},
|
|
49
51
|
"dependencies": {
|
|
50
|
-
"
|
|
52
|
+
"@solana/kit": "^8.4.0",
|
|
53
|
+
"viem": "^2.57.3",
|
|
51
54
|
"zod": "^4.1.0"
|
|
52
55
|
},
|
|
53
56
|
"devDependencies": {
|
package/registry/vaults.json
CHANGED
|
@@ -164,6 +164,119 @@
|
|
|
164
164
|
"The public Robinhood Chain endpoint answered a single eth_getLogs over 674,901 blocks (79,300,000 to 79,974,900, on 2026-10-04), which covers this vault's whole history; it does not serve state at past blocks, which nothing in this client reads.",
|
|
165
165
|
"The default vault on Robinhood Chain, and open to any account: it is in depositable."
|
|
166
166
|
]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"symbol": "tlCashPlusUSDC2E",
|
|
170
|
+
"name": "Tempora Labs Cash Plus USDC (Test 2E)",
|
|
171
|
+
"warning": "TEST VAULT — unproven. It exists to exercise this product, not to hold savings. Deposit only an amount you are fully prepared to lose entirely, and do not move significant funds into it. Show this warning before preparing any deposit.",
|
|
172
|
+
"chainId": 1,
|
|
173
|
+
"address": "0x2AA9B1F12bbFE1E01dcb4DD52E6836d68416e3B6",
|
|
174
|
+
"chassis": "morpho-v2",
|
|
175
|
+
"backend": "tempora",
|
|
176
|
+
"isDefault": true,
|
|
177
|
+
"asset": {
|
|
178
|
+
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
179
|
+
"symbol": "USDC",
|
|
180
|
+
"decimals": 6
|
|
181
|
+
},
|
|
182
|
+
"shareDecimals": 18,
|
|
183
|
+
"depositOpen": {
|
|
184
|
+
"open": true,
|
|
185
|
+
"method": "simulated-deposit-from-stranger",
|
|
186
|
+
"measuredAtBlock": 26166799,
|
|
187
|
+
"measuredAtIso": "2026-10-11T04:24:35Z",
|
|
188
|
+
"detail": "deposit(1 USDC, 0x…dEaD) from 0x…dEaD reverted 0xe65b7a77 TransferFromReverted at block 26166799 — it reached the token pull, so access is open; maxDeposit() reads 0 to every caller on this chassis by design and is not consulted."
|
|
189
|
+
},
|
|
190
|
+
"deployedAtBlock": 26164268,
|
|
191
|
+
"notes": [
|
|
192
|
+
"On Ethereum (chain 1). Calls for this vault are sent on Ethereum, and its RPC is TREASURY_RPC_ETHEREUM.",
|
|
193
|
+
"Gas on Ethereum costs far more than on Base, Arbitrum One, Robinhood Chain or Monad: the approve, deposit and withdrawal each pay Ethereum gas in ETH, which can be a large share of a small deposit. Say so before preparing a small deposit here.",
|
|
194
|
+
"The asset is Circle's USDC on Ethereum (0xA0b8…eB48).",
|
|
195
|
+
"18-decimal shares against a 6-decimal asset — a share amount is never an asset amount here.",
|
|
196
|
+
"Morpho Vault V2. maxDeposit() and maxWithdraw() return 0 to every caller by protocol design; the pre-flight simulates the real call and earn_balance simulates the exit. Neither reads those views.",
|
|
197
|
+
"Withdrawals are served from idle USDC, then through the vault's liquidity adapter; a withdrawal larger than that reverts until positions are unwound. earn_balance reports exitableNow by simulating the withdrawal.",
|
|
198
|
+
"No fee is set: performanceFee() = 0 and managementFee() = 0 at block 26166799. The curator can introduce one, and the vault's fee timelocks are 0 (timelock(setPerformanceFee) = timelock(setManagementFee) = 0 at block 26166799), so a change needs no notice. Read both fees before depositing.",
|
|
199
|
+
"Three configured adapters (measured at block 26166799); Treasury does not model the fund's allocation across them — read the vault's positions on-chain before a first deposit.",
|
|
200
|
+
"The public Ethereum endpoint (ethereum.reth.rs) serves eth_getLogs over up to 100,000 blocks per request (measured 2026-10-11), so earn_balance reads this vault's whole history from it in a few requests.",
|
|
201
|
+
"The default vault on Ethereum, and open to any account: it is in depositable."
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"symbol": "tlCashPlusUSDC2F",
|
|
206
|
+
"name": "Tempora Labs Cash Plus USDC (Test 2F)",
|
|
207
|
+
"warning": "TEST VAULT — unproven. It exists to exercise this product, not to hold savings. Deposit only an amount you are fully prepared to lose entirely, and do not move significant funds into it. Show this warning before preparing any deposit.",
|
|
208
|
+
"chainId": 143,
|
|
209
|
+
"address": "0x163295A4d4381745A205DC5E9A436a3f51791593",
|
|
210
|
+
"chassis": "morpho-v2",
|
|
211
|
+
"backend": "tempora",
|
|
212
|
+
"isDefault": true,
|
|
213
|
+
"asset": {
|
|
214
|
+
"address": "0x754704Bc059F8C67012fEd69BC8A327a5aafb603",
|
|
215
|
+
"symbol": "USDC",
|
|
216
|
+
"decimals": 6
|
|
217
|
+
},
|
|
218
|
+
"shareDecimals": 18,
|
|
219
|
+
"depositOpen": {
|
|
220
|
+
"open": true,
|
|
221
|
+
"method": "simulated-deposit-from-stranger",
|
|
222
|
+
"measuredAtBlock": 112372495,
|
|
223
|
+
"measuredAtIso": "2026-10-11T04:24:45Z",
|
|
224
|
+
"detail": "deposit(1 USDC, 0x…dEaD) from 0x…dEaD reverted 0xe65b7a77 TransferFromReverted at block 112372495 — it reached the token pull, so access is open; maxDeposit() reads 0 to every caller on this chassis by design and is not consulted."
|
|
225
|
+
},
|
|
226
|
+
"deployedAtBlock": 112273210,
|
|
227
|
+
"notes": [
|
|
228
|
+
"On Monad (chain 143). Calls for this vault are sent on Monad, and its RPC is TREASURY_RPC_MONAD.",
|
|
229
|
+
"The asset is the USDC token at 0x7547…b603 on Monad (name and symbol USDC, 6 decimals, read on chain 2026-10-11).",
|
|
230
|
+
"18-decimal shares against a 6-decimal asset — a share amount is never an asset amount here.",
|
|
231
|
+
"Morpho Vault V2. maxDeposit() and maxWithdraw() return 0 to every caller by protocol design; the pre-flight simulates the real call and earn_balance simulates the exit. Neither reads those views.",
|
|
232
|
+
"Withdrawals are served from idle USDC, then through the vault's liquidity adapter; a withdrawal larger than that reverts until positions are unwound. earn_balance reports exitableNow by simulating the withdrawal.",
|
|
233
|
+
"No fee is set: performanceFee() = 0 and managementFee() = 0 at block 112372495. The curator can introduce one, and the vault's fee timelocks are 0 (timelock(setPerformanceFee) = timelock(setManagementFee) = 0 at block 112372495), so a change needs no notice. Read both fees before depositing.",
|
|
234
|
+
"Three configured adapters (measured at block 112372495); Treasury does not model the fund's allocation across them — read the vault's positions on-chain before a first deposit.",
|
|
235
|
+
"The public Monad endpoint (rpc.monad.xyz) serves eth_getLogs over at most 100 blocks per request (measured 2026-10-11), and Monad makes a block about every 0.3 seconds, so from it earn_balance's history scan covers under an hour and reports itself cut short. For entry basis and yield, set TREASURY_LOGS_RPC_MONAD to a provider with a wider eth_getLogs range.",
|
|
236
|
+
"The default vault on Monad, and open to any account: it is in depositable."
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"solanaVaults": [
|
|
241
|
+
{
|
|
242
|
+
"family": "solana",
|
|
243
|
+
"symbol": "tlCashPlusUSDC2G",
|
|
244
|
+
"name": "Tempora Labs Cash Plus USDC (Test 2G)",
|
|
245
|
+
"warning": "TEST VAULT — unproven. It exists to exercise this product, not to hold savings. Deposit only an amount you are fully prepared to lose entirely, and do not move significant funds into it. Show this warning before preparing any deposit.",
|
|
246
|
+
"chain": "solana",
|
|
247
|
+
"address": "8qV54zrW2piQgBbVaUUtGajf4KuVDKLUDquHv9VZBfS7",
|
|
248
|
+
"chassis": "kamino-vault",
|
|
249
|
+
"backend": "tempora",
|
|
250
|
+
"isDefault": true,
|
|
251
|
+
"asset": {
|
|
252
|
+
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
253
|
+
"symbol": "USDC",
|
|
254
|
+
"decimals": 6
|
|
255
|
+
},
|
|
256
|
+
"sharesMint": "pxUHrn6sFsnZiLToD9hQa5p6vXRFx7h8dCjZr7LXp7Z",
|
|
257
|
+
"shareDecimals": 6,
|
|
258
|
+
"depositOpen": {
|
|
259
|
+
"open": true,
|
|
260
|
+
"method": "simulated-deposit-from-stranger",
|
|
261
|
+
"measuredAtSlot": 455531367,
|
|
262
|
+
"measuredAtIso": "2026-10-11T05:12:46Z",
|
|
263
|
+
"detail": "a simulated 1 USDC deposit from an unrelated account holding USDC and SOL succeeded at slot 455531367 (0.999999 shares minted); the vault's permissioning authority is unset, so no account needs admission."
|
|
264
|
+
},
|
|
265
|
+
"deployedAtSlot": 455493127,
|
|
266
|
+
"notes": [
|
|
267
|
+
"On Solana mainnet-beta. Every call for this vault is a Solana transaction, signed by a Solana wallet; its RPC is TREASURY_RPC_SOLANA.",
|
|
268
|
+
"A Kamino vault (program KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd) over Kamino lending reserves. It is not an ERC-4626 vault: shares are an SPL token (6 decimals), and there is no approve step.",
|
|
269
|
+
"The ticker tlCashPlusUSDC2G is assigned by this registry: the share mint carries no token metadata, so there is no on-chain ticker to read. The name is read from the vault's own state.",
|
|
270
|
+
"Shares always land in the depositing account, and a withdrawal always pays the account that holds the shares: there is no separate receiver.",
|
|
271
|
+
"Each withdraw instruction keeps up to 0.001 USDC in the vault: Kamino's GLOBAL withdrawal penalty for every vault on its program (the program's global config holds withdrawalPenaltyLamports = 1000, read 2026-10-11), not this vault's own setting (0), and Kamino can change it at any time without notice. A withdrawal that needs more than one reserve is more than one instruction: measured by simulation 2026-10-11, 2,000,000 shares kept 1,000 as one instruction and 1,929 as two; a withdrawal worth 0.001 USDC or less is refused (program error 7049). Quotes and positions report the exact amount, net of it.",
|
|
272
|
+
"A first deposit creates the account's share token account, whose rent (about 0.002 SOL) the account pays and gets back if it ever closes that account. Every transaction also needs SOL for its fee.",
|
|
273
|
+
"A prepared transaction names a recent blockhash and lands only within about a minute of being prepared: prepare it when the operator is ready to sign.",
|
|
274
|
+
"No fee is set: performance and management fees read 0 at slot 455529733. The vault admin can set them, and this vault's own withdrawal penalty, with no timelock: a change takes effect in the transaction that makes it. The vault admin or Kamino's global admin can also set a per-reserve crank fee taken from each deposit and minimum deposit and withdrawal amounts (all 0, read 2026-10-11).",
|
|
275
|
+
"Kamino's program can require a co-signer (a permissioning authority) on every deposit AND every withdrawal of this vault; set by Kamino's global admin with no delay, that is a power to stop exits. It is unset (read 2026-10-11), and this client refuses to build while one is set.",
|
|
276
|
+
"Each withdrawal leg is limited by its reserve's available liquidity: while a reserve is highly utilised, a large withdrawal can be refused or need more than one transaction. earn_balance's exit simulates it.",
|
|
277
|
+
"Deposit cap: 1,000 USDC in total (read 2026-10-11). Two reserves are configured: Kamino's main-market USDC reserve and its OnRe-market USDC reserve; idle USDC is the rest.",
|
|
278
|
+
"The default vault on Solana, and open to any account: it is in depositable."
|
|
279
|
+
]
|
|
167
280
|
}
|
|
168
281
|
]
|
|
169
282
|
}
|