@t2000/sdk 9.5.0 → 9.6.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/dist/browser.cjs CHANGED
@@ -390,6 +390,7 @@ var KeypairSigner = class {
390
390
  constructor(keypair) {
391
391
  this.keypair = keypair;
392
392
  }
393
+ kind = "keypair";
393
394
  getAddress() {
394
395
  return this.keypair.getPublicKey().toSuiAddress();
395
396
  }
@@ -413,6 +414,7 @@ var ZkLoginSigner = class {
413
414
  this.userAddress = userAddress;
414
415
  this.maxEpoch = maxEpoch;
415
416
  }
417
+ kind = "zklogin";
416
418
  getAddress() {
417
419
  return this.userAddress;
418
420
  }
@@ -560,6 +562,13 @@ async function payWithMpp(args) {
560
562
  }
561
563
  const headerChallenge = await parseMppSuiChallenge(probe);
562
564
  if (headerChallenge) {
565
+ if (signer.kind === "zklogin") {
566
+ throw new exports.T2000Error(
567
+ "DIALECT_UNSUPPORTED",
568
+ "This seller only offers the MPP header dialect, which zkLogin (Passport) wallets cannot safely pay: the seller cannot verify zkLogin signatures, so the payment would settle on-chain without the service delivering. No payment was made. Use an x402-capable service, or pay from a keypair wallet (t2 CLI / MCP).",
569
+ { dialect: "mpp-header", signerKind: "zklogin" }
570
+ );
571
+ }
563
572
  const result = await payViaMppHeader({ signer, client, options });
564
573
  await reportDirectPayment(result, options.url);
565
574
  return result;