@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 +9 -0
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +9 -0
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/{send-DEK6aOGe.d.cts → send-YAYf0YR3.d.cts} +14 -1
- package/dist/{send-DEK6aOGe.d.ts → send-YAYf0YR3.d.ts} +14 -1
- package/package.json +1 -1
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
|
}
|