@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/index.cjs CHANGED
@@ -1051,6 +1051,7 @@ var KeypairSigner = class {
1051
1051
  constructor(keypair) {
1052
1052
  this.keypair = keypair;
1053
1053
  }
1054
+ kind = "keypair";
1054
1055
  getAddress() {
1055
1056
  return this.keypair.getPublicKey().toSuiAddress();
1056
1057
  }
@@ -1157,6 +1158,13 @@ async function payWithMpp(args) {
1157
1158
  }
1158
1159
  const headerChallenge = await parseMppSuiChallenge(probe);
1159
1160
  if (headerChallenge) {
1161
+ if (signer.kind === "zklogin") {
1162
+ throw new exports.T2000Error(
1163
+ "DIALECT_UNSUPPORTED",
1164
+ "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).",
1165
+ { dialect: "mpp-header", signerKind: "zklogin" }
1166
+ );
1167
+ }
1160
1168
  const result = await payViaMppHeader({ signer, client, options });
1161
1169
  await reportDirectPayment(result, options.url);
1162
1170
  return result;
@@ -1394,6 +1402,7 @@ var ZkLoginSigner = class {
1394
1402
  this.userAddress = userAddress;
1395
1403
  this.maxEpoch = maxEpoch;
1396
1404
  }
1405
+ kind = "zklogin";
1397
1406
  getAddress() {
1398
1407
  return this.userAddress;
1399
1408
  }