@mysten-incubation/suipay-mcp 0.3.0-dev.24 → 0.3.0-dev.25

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.
@@ -3728,7 +3728,7 @@ type CodeFor<S extends Surface> = {
3728
3728
  * prior done result is never lost when capability is unavailable.
3729
3729
  * 5. Derive payment_id_hash / terms_hash.
3730
3730
  * 6. Build the full executable pay transaction (real shared-object versions).
3731
- * 7. Validate-before-sign (built tx encodes exactly the intended pay; gas may differ).
3731
+ * 7. Validate-before-sign (intended pay plus the caller's gas authority).
3732
3732
  * 8. Sign, 9. execute, 10. complete(ledger) with terminal ok/ambiguous, settle.
3733
3733
  * x402 refuses before 3 when its offer, gas pins or epoch are missing, skips
3734
3734
  * 4, builds 6 with the offer-pinned sponsor gas, and in place of 9-10
@@ -4144,14 +4144,16 @@ interface DelegatedPayerDeps {
4144
4144
  * Current Sui epoch from the agent's own chain client (see
4145
4145
  * {@link currentEpochReader}). The x402 dialect needs it to bound the
4146
4146
  * transaction's expiration; absent or failing, x402 is refused before
4147
- * anything is reserved. MPP never calls it.
4147
+ * anything is reserved. MPP also reads it when a sponsor returns an Epoch
4148
+ * or ValidDuring expiration; legacy coin-gas None needs no epoch read.
4148
4149
  */
4149
4150
  getCurrentEpoch?: () => Promise<bigint | number>;
4150
4151
  /**
4151
4152
  * Chain identifier from the agent's own chain client (see
4152
4153
  * {@link chainIdentifierReader}). Needed only for an x402 offer that pins
4153
4154
  * `address-balance` gas (ADR-0055); absent or failing, that offer is refused
4154
- * before anything is reserved.
4155
+ * before anything is reserved. MPP prepared address-balance gas uses this
4156
+ * same independent reader to bind its ValidDuring chain.
4155
4157
  */
4156
4158
  getChainIdentifier?: () => Promise<string>;
4157
4159
  /**
@@ -4968,7 +4970,7 @@ declare const TOOLS: readonly [{
4968
4970
  };
4969
4971
  }, {
4970
4972
  readonly name: "suipay_login";
4971
- readonly description: "Mint or reuse the local delegate key (version-2, mode 0600) and return a clickable console URL immediately so the owner can bind a spend-account grant. Does not wait for the wallet. Default target is Railway suipay-dev; pass target=\"local\" (or start the binary with --local) for the laptop stack. Stdio only; hosted /mcp never holds a spendable key.";
4973
+ readonly description: "Mint or reuse the local delegate key (version-2, mode 0600) and return a clickable console URL immediately so the owner can bind a spend-account grant. Does not wait for the wallet. Uses the process-configured target; start the binary with --local for the laptop stack. A target argument cannot change an existing key binding. Stdio only; hosted /mcp never holds a spendable key.";
4972
4974
  readonly inputSchema: {
4973
4975
  readonly type: "object";
4974
4976
  readonly properties: {
@@ -4979,7 +4981,7 @@ declare const TOOLS: readonly [{
4979
4981
  readonly target: {
4980
4982
  readonly type: "string";
4981
4983
  readonly enum: readonly ["dev", "local"];
4982
- readonly description: "Where to bind the grant. Default is Railway suipay-dev. Pass \"local\" for localhost:3000 / 127.0.0.1:4340.";
4984
+ readonly description: "Optional assertion of the process target (dev or local). It cannot change the configured or stored gateway.";
4983
4985
  };
4984
4986
  readonly gatewayResourceUrl: {
4985
4987
  readonly type: "string";
package/dist/http.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { I as handleSuipayMcpHttpRequest } from './http-BJFB-Yhm.js';
1
+ export { I as handleSuipayMcpHttpRequest } from './http-BfRuw7wl.js';
2
2
  import '@modelcontextprotocol/sdk/server/index.js';
3
3
  import '@mysten/sui/keypairs/ed25519';
4
4
  import 'node:crypto';
package/dist/http.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  handleSuipayMcpHttpRequest
3
- } from "./chunk-UWD4OSIC.js";
3
+ } from "./chunk-JSJV2KDA.js";
4
4
  export {
5
5
  handleSuipayMcpHttpRequest
6
6
  };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';
2
- import { S as SpendAccountSigningRequest, P as PaidHttpRequest, D as DelegatedKeySigner, G as GetObjectJson, a as DelegatedPayerSession, b as DelegatedPayerConfig, c as DelegatedPayerDeps, d as SpendIntent, e as DelegatedPayResult, f as DelegationScope, C as CodeFor, N as NextAction, g as GrantPolicyBinding, h as PaymentAttemptLedger, O as OfferPublicKeySource, i as DelegatedPayerLog, j as PreparedSettlementTerms, X as X402PayProgress, k as Offer, M as McpConfig, l as McpAuthContext, m as McpTraceHooks, n as SpendAccountPayDeps, o as createReader } from './http-BJFB-Yhm.js';
3
- export { A as AgentHeldResolver, p as AgentHeldSettlement, q as MCP_TARGET_PRESETS, r as McpEnvelope, s as McpEnvelopeEntry, t as McpServerOptions, u as McpTarget, v as McpTraceContext, w as McpTraceRuntime, x as PACKAGE_NAME, y as PreparedPayment, z as SpendAccountPrepareResult, B as SpendAccountPrepareSession, T as TOOLS, E as buildSpendAccountPayKind, F as canonicalMcpRequestId, H as createServer, I as handleSuipayMcpHttpRequest, J as inspectMcpEnvelope, K as loadMcpConfig, L as parseMcpTargetFlag, Q as prepareSpendAccountPayment, R as resetAgentHeldProcessLedger, U as resolveAgentHeldSettlement, V as resolveGrantTarget, W as resolveMcpTarget, Y as sameMcpGateway, Z as traceMcpHttpRequest, _ as verifySpendAccountPayReconstructs } from './http-BJFB-Yhm.js';
2
+ import { S as SpendAccountSigningRequest, P as PaidHttpRequest, D as DelegatedKeySigner, G as GetObjectJson, a as DelegatedPayerSession, b as DelegatedPayerConfig, c as DelegatedPayerDeps, d as SpendIntent, e as DelegatedPayResult, f as DelegationScope, C as CodeFor, N as NextAction, g as GrantPolicyBinding, h as PaymentAttemptLedger, O as OfferPublicKeySource, i as DelegatedPayerLog, j as PreparedSettlementTerms, X as X402PayProgress, k as Offer, M as McpConfig, l as McpAuthContext, m as McpTraceHooks, n as SpendAccountPayDeps, o as createReader } from './http-BfRuw7wl.js';
3
+ export { A as AgentHeldResolver, p as AgentHeldSettlement, q as MCP_TARGET_PRESETS, r as McpEnvelope, s as McpEnvelopeEntry, t as McpServerOptions, u as McpTarget, v as McpTraceContext, w as McpTraceRuntime, x as PACKAGE_NAME, y as PreparedPayment, z as SpendAccountPrepareResult, B as SpendAccountPrepareSession, T as TOOLS, E as buildSpendAccountPayKind, F as canonicalMcpRequestId, H as createServer, I as handleSuipayMcpHttpRequest, J as inspectMcpEnvelope, K as loadMcpConfig, L as parseMcpTargetFlag, Q as prepareSpendAccountPayment, R as resetAgentHeldProcessLedger, U as resolveAgentHeldSettlement, V as resolveGrantTarget, W as resolveMcpTarget, Y as sameMcpGateway, Z as traceMcpHttpRequest, _ as verifySpendAccountPayReconstructs } from './http-BfRuw7wl.js';
4
4
  import { SuiGrpcClient } from '@mysten/sui/grpc';
5
5
  import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
6
6
  import '@modelcontextprotocol/sdk/server/index.js';
@@ -532,7 +532,6 @@ interface StdioLoginOptions {
532
532
  signPersonalMessage?: (message: Uint8Array) => Promise<string>;
533
533
  label?: string;
534
534
  timeoutMs?: number;
535
- openBrowser?: boolean;
536
535
  onUrl?: (connectUrl: string) => void;
537
536
  }
538
537
  interface StartedStdioLogin {
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  loadBootProfile,
3
3
  main
4
- } from "./chunk-DEOKRJ4A.js";
4
+ } from "./chunk-CMHAJWEF.js";
5
5
  import {
6
6
  MCP_TARGET_PRESETS,
7
7
  PACKAGE_NAME,
@@ -26,7 +26,7 @@ import {
26
26
  settlePreparedMcpPayment,
27
27
  traceMcpHttpRequest,
28
28
  verifySpendAccountPayReconstructs
29
- } from "./chunk-UWD4OSIC.js";
29
+ } from "./chunk-JSJV2KDA.js";
30
30
  export {
31
31
  MCP_TARGET_PRESETS,
32
32
  PACKAGE_NAME,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten-incubation/suipay-mcp",
3
- "version": "0.3.0-dev.24",
3
+ "version": "0.3.0-dev.25",
4
4
  "type": "module",
5
5
  "description": "SuiPay MCP — pay MPP-gated APIs from a spend-account grant with an agent-held delegate key.",
6
6
  "repository": {
@@ -42,8 +42,8 @@
42
42
  "tsup": "^8.0.0",
43
43
  "typescript": "^6.0.3",
44
44
  "vitest": "^4.1.10",
45
- "@cmdoss/suipay-sdk": "0.1.0",
46
- "@cmdoss/suipay-core": "0.1.0"
45
+ "@cmdoss/suipay-core": "0.1.0",
46
+ "@cmdoss/suipay-sdk": "0.1.0"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "tsup",