Skip to content

Releases: thirdweb-dev/js

@thirdweb-dev/nebula@0.2.98

04 Dec 01:54
e0ee69b

Choose a tag to compare

Patch Changes

thirdweb@5.115.0

03 Dec 09:19
1b3e938

Choose a tag to compare

Minor Changes

Patch Changes

@thirdweb-dev/wagmi-adapter@0.2.194

03 Dec 09:19
1b3e938

Choose a tag to compare

@thirdweb-dev/wagmi-adapter@0.2.194

@thirdweb-dev/nebula@0.2.97

03 Dec 09:19
1b3e938

Choose a tag to compare

Patch Changes

thirdweb@5.114.1

26 Nov 22:09
fda2284

Choose a tag to compare

Patch Changes

thirdweb@5.114.0

26 Nov 01:11
3ac8cba

Choose a tag to compare

Minor Changes

  • #8457 35aaf24 Thanks @joaquim-verges! - Add "upto" payment scheme option for x402 verify and settle

    const paymentArgs = {
      resourceUrl: "https://api.example.com/premium-content",
      method: "GET",
      paymentData,
      payTo: "0x1234567890123456789012345678901234567890",
      network: arbitrum,
      scheme: "upto", // enables dynamic pricing
      price: "$0.10", // max payable amount
      facilitator: thirdwebFacilitator,
    };
    
    // First verify the payment is valid for the max amount
    const verifyResult = await verifyPayment(paymentArgs);
    
    if (verifyResult.status !== 200) {
      return Response.json(verifyResult.responseBody, {
        status: verifyResult.status,
        headers: verifyResult.responseHeaders,
      });
    }
    
    // Do the expensive work that requires payment
    const { tokensUsed } = await doExpensiveWork();
    const pricePerTokenUsed = 0.00001;
    
    // Now settle the payment based on actual usage
    const settleResult = await settlePayment({
      ...paymentArgs,
      price: tokensUsed * pricePerTokenUsed, // adjust final price based on usage
    });

@thirdweb-dev/wagmi-adapter@0.2.193

26 Nov 22:09
fda2284

Choose a tag to compare

@thirdweb-dev/wagmi-adapter@0.2.193

@thirdweb-dev/wagmi-adapter@0.2.192

26 Nov 01:11
3ac8cba

Choose a tag to compare

@thirdweb-dev/wagmi-adapter@0.2.192

@thirdweb-dev/nebula@0.2.96

26 Nov 22:09
fda2284

Choose a tag to compare

Patch Changes

@thirdweb-dev/nebula@0.2.95

26 Nov 01:11
3ac8cba

Choose a tag to compare

Patch Changes

  • Updated dependencies [35aaf24]:
    • thirdweb@5.114.0