@subly_fi/pay 0.7.0 → 0.7.1

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 CHANGED
@@ -9,12 +9,12 @@ Version 0.7 is beta software and has not had an external security audit. Vault o
9
9
  You need **Node.js 24+**, a Solana agent wallet with mainnet USDC, a trusted relayer URL, and a mainnet RPC endpoint that supports transaction simulation with inner instructions. Your wallet can be a local keypair or a supported custody signer. The owner who approves spending controls can use a passkey or a separate Solana wallet.
10
10
 
11
11
  ```bash
12
- npx -y @subly_fi/pay@0.7.0 --help
12
+ npx -y @subly_fi/pay@0.7.1 --help
13
13
  export SUBLY_RELAYER_URL=https://your-relayer.example.com
14
14
  export SOLANA_RPC_URL=https://your-mainnet-rpc.example.com
15
15
  export SUBLY_DEMO_AGENT_KEYPAIR_PATH=/absolute/path/to/agent.json
16
- npx -y @subly_fi/pay@0.7.0 doctor
17
- npx -y @subly_fi/pay@0.7.0 vaults
16
+ npx -y @subly_fi/pay@0.7.1 doctor
17
+ npx -y @subly_fi/pay@0.7.1 vaults
18
18
  ```
19
19
 
20
20
  Use an existing dedicated agent wallet, or create one with `solana-keygen new -o agent.json`. Keep its recovery material private and restrict the file to its owner (`chmod 600 agent.json`). Fund its public address with **USDC on Solana mainnet**. Subly does not create or fund wallets. Vault fees require a funded relayer sponsor; the final API payment requires the seller's facilitator fee payer.
@@ -23,28 +23,28 @@ Use an existing dedicated agent wallet, or create one with `solana-keygen new -o
23
23
  2. Create an owner setup link. This example pre-approves a **1.01 USDC** deposit; the selected vault's minimum can differ:
24
24
 
25
25
  ```bash
26
- npx -y @subly_fi/pay@0.7.0 setup-link --initial-deposit 1010000
26
+ npx -y @subly_fi/pay@0.7.1 setup-link --initial-deposit 1010000
27
27
  ```
28
28
 
29
29
  Open the returned `setupUrl`, review the wallet, vault and limits, then approve with your passkey or wallet. Links expire in 10 minutes. Treat setup and approval links as private capabilities. The first person completing an initial setup becomes the owner for that wallet/vault.
30
30
  3. Check completion and deposit promptly; initial deposit approval lasts about 15 minutes:
31
31
 
32
32
  ```bash
33
- npx -y @subly_fi/pay@0.7.0 setup-status <sessionId>
34
- npx -y @subly_fi/pay@0.7.0 deposit 1010000
35
- npx -y @subly_fi/pay@0.7.0 budget
33
+ npx -y @subly_fi/pay@0.7.1 setup-status <sessionId>
34
+ npx -y @subly_fi/pay@0.7.1 deposit 1010000
35
+ npx -y @subly_fi/pay@0.7.1 budget
36
36
  ```
37
37
 
38
38
  4. Wait until **spendable yield** covers the price and vault fees. A new deposit does not immediately provide a payment budget. Then request a compatible API:
39
39
 
40
40
  ```bash
41
- npx -y @subly_fi/pay@0.7.0 fetch https://seller.example.com/paid-resource
41
+ npx -y @subly_fi/pay@0.7.1 fetch https://seller.example.com/paid-resource
42
42
  ```
43
43
 
44
44
  5. Withdraw funds back to the same agent wallet when needed:
45
45
 
46
46
  ```bash
47
- npx -y @subly_fi/pay@0.7.0 withdraw 1000000
47
+ npx -y @subly_fi/pay@0.7.1 withdraw 1000000
48
48
  ```
49
49
 
50
50
  All amounts are raw USDC integers: `1000000` = 1 USDC. `fetch` defaults to a **0.01 USDC cap**, configurable with `SUBLY_MCP_MAX_AMOUNT_RAW_USDC` or `fetch <URL> <capRawUSDC>`. The owner mandate may set stricter limits. `setup-link --help` lists policy options. A withdrawal can include principal and is subject to liquidity, fees and the owner's policy. A revoked mandate also blocks relayer withdrawals.
@@ -60,7 +60,7 @@ Add this to the MCP configuration of your editor or agent host. Replace all exam
60
60
  "mcpServers": {
61
61
  "subly": {
62
62
  "command": "npx",
63
- "args": ["-y", "@subly_fi/pay@0.7.0", "mcp"],
63
+ "args": ["-y", "@subly_fi/pay@0.7.1", "mcp"],
64
64
  "env": {
65
65
  "SUBLY_RELAYER_URL": "https://your-relayer.example.com",
66
66
  "SOLANA_RPC_URL": "https://your-mainnet-rpc.example.com",
package/dist/deposit.js CHANGED
File without changes
package/dist/doctor.js CHANGED
@@ -169,18 +169,18 @@ await check("relayer and vault", async () => {
169
169
  if (url.protocol !== "https:" && !(url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname))) throw new Error("Use HTTPS (HTTP is allowed only for local development)");
170
170
  const catalog = vaultCatalogFromEnv();
171
171
  const local = defaultCatalogVault(catalog);
172
- const health = await fetch(`${url.toString().replace(/\/$/, "")}/healthz`, { signal: AbortSignal.timeout(1e4) });
173
- if (!health.ok || (await health.json()).ok !== true) throw new Error("Relayer health check failed");
172
+ const health = await fetch(`${url.toString().replace(/\/$/, "")}/readyz`, { signal: AbortSignal.timeout(1e4) });
173
+ if (!health.ok || (await health.json()).ok !== true) throw new Error("Relayer readiness check failed");
174
174
  const response = await fetch(`${url.toString().replace(/\/$/, "")}/v1/vaults`, { signal: AbortSignal.timeout(1e4) });
175
175
  if (!response.ok) throw new Error("Relayer vault catalogue unavailable");
176
176
  const remote = (await response.json()).vaults?.find((v) => v.address === local.address);
177
177
  if (!remote || ["programId", "usdcMint", "shareMint", "farm"].some((key) => remote[key] !== local[key])) throw new Error("Selected local vault trust anchors differ from the relayer; review the operator catalogue before changing configuration");
178
- return `Healthy; selected vault ${local.address} matches local trust anchors`;
178
+ return `Ready; selected vault ${local.address} matches local trust anchors`;
179
179
  });
180
180
  await check("Solana RPC", async () => {
181
181
  const response = await fetch(env.SOLANA_RPC_URL ?? "https://api.mainnet-beta.solana.com", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "getGenesisHash" }), signal: AbortSignal.timeout(1e4) });
182
182
  const body = await response.json();
183
- if (!response.ok || body.result !== "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp") throw new Error("RPC is unavailable or is not Solana mainnet-beta");
183
+ if (!response.ok || body.result !== "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d") throw new Error("RPC is unavailable or is not Solana mainnet-beta");
184
184
  return "Mainnet-beta RPC reachable";
185
185
  });
186
186
  var ok = checks.every((c) => c.ok);
File without changes
package/dist/pay.js CHANGED
File without changes
package/dist/withdraw.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@subly_fi/pay",
3
- "version": "0.7.0",
4
- "description": "Subly client: pay compatible standard x402 Solana USDC exact APIs from Kamino vault yield \u2014 the seller needs no Subly integration. Ships an MCP server and a one-shot pay/deposit CLI; non-custodial (signs locally with your own key).",
3
+ "version": "0.7.1",
4
+ "description": "Subly client: pay compatible standard x402 Solana USDC exact APIs from Kamino vault yield the seller needs no Subly integration. Ships an MCP server and a one-shot pay/deposit CLI; non-custodial (signs locally with your own key).",
5
5
  "keywords": [
6
6
  "x402",
7
7
  "solana",