@t2000/sdk 9.7.1 → 9.8.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 +13 -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 +13 -0
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +13 -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 +13 -0
- package/dist/index.js.map +1 -1
- package/dist/{job-CSq0DRsC.d.cts → job-Dg1-38yL.d.cts} +1 -1
- package/dist/{job-CSq0DRsC.d.ts → job-Dg1-38yL.d.ts} +1 -1
- package/package.json +2 -2
package/dist/browser.cjs
CHANGED
|
@@ -556,6 +556,19 @@ async function payWithMpp(args) {
|
|
|
556
556
|
}
|
|
557
557
|
const requirements = await pickSuiExactRequirements(probe, client.network);
|
|
558
558
|
if (requirements) {
|
|
559
|
+
const { isX402EscrowRequirements } = await import('@suimpp/mpp/x402');
|
|
560
|
+
if (isX402EscrowRequirements(requirements)) {
|
|
561
|
+
const escrow = requirements.extra.escrow;
|
|
562
|
+
const price = atomicToHuman(
|
|
563
|
+
BigInt(requirements.maxAmountRequired),
|
|
564
|
+
await assetDecimals(requirements.asset)
|
|
565
|
+
);
|
|
566
|
+
throw new exports.T2000Error(
|
|
567
|
+
"ESCROW_REQUIRED",
|
|
568
|
+
`This endpoint sells deliverable work through on-chain escrow, not an instant call. Create a job instead: t2 job create ${price} ${requirements.payTo} --spec <your-brief> \u2014 funds lock in a Job object and release on delivery. No payment was made.`,
|
|
569
|
+
{ payTo: requirements.payTo, priceUsdc: price, escrow }
|
|
570
|
+
);
|
|
571
|
+
}
|
|
559
572
|
const result = await payViaX402({ signer, client, options, reqInit, requirements });
|
|
560
573
|
await reportDirectPayment(result, options.url);
|
|
561
574
|
return result;
|