@medialane/sdk 0.7.5 → 0.7.6

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.d.cts CHANGED
@@ -211,8 +211,10 @@ interface FulfillOrder1155Params {
211
211
  orderHash: string;
212
212
  /** ERC-20 payment token address (from order details) */
213
213
  paymentToken: string;
214
- /** Total price in raw token units (pricePerUnit × amount, as string) */
214
+ /** Total price in raw token units (pricePerUnit × quantity, as string) */
215
215
  totalPrice: string;
216
+ /** Number of units to purchase (1 ≤ quantity ≤ remaining_amount). Defaults to 1. */
217
+ quantity?: string;
216
218
  }
217
219
  interface CancelOrder1155Params {
218
220
  /** On-chain order hash */
package/dist/index.d.ts CHANGED
@@ -211,8 +211,10 @@ interface FulfillOrder1155Params {
211
211
  orderHash: string;
212
212
  /** ERC-20 payment token address (from order details) */
213
213
  paymentToken: string;
214
- /** Total price in raw token units (pricePerUnit × amount, as string) */
214
+ /** Total price in raw token units (pricePerUnit × quantity, as string) */
215
215
  totalPrice: string;
216
+ /** Number of units to purchase (1 ≤ quantity ≤ remaining_amount). Defaults to 1. */
217
+ quantity?: string;
216
218
  }
217
219
  interface CancelOrder1155Params {
218
220
  /** On-chain order hash */
package/dist/index.js CHANGED
@@ -2402,6 +2402,7 @@ function build1155FulfillmentTypedData(message, chainId) {
2402
2402
  OrderFulfillment: [
2403
2403
  { name: "order_hash", type: "felt" },
2404
2404
  { name: "fulfiller", type: "ContractAddress" },
2405
+ { name: "quantity", type: "felt" },
2405
2406
  { name: "nonce", type: "felt" }
2406
2407
  ]
2407
2408
  },
@@ -2530,7 +2531,7 @@ async function createListing1155(account, params, config) {
2530
2531
  }
2531
2532
  }
2532
2533
  async function fulfillOrder1155(account, params, config) {
2533
- const { orderHash, paymentToken, totalPrice } = params;
2534
+ const { orderHash, paymentToken, totalPrice, quantity = "1" } = params;
2534
2535
  const contract = getContract(config);
2535
2536
  const provider = getProvider2(config);
2536
2537
  const chainId = getChainId2();
@@ -2538,6 +2539,7 @@ async function fulfillOrder1155(account, params, config) {
2538
2539
  const fulfillmentParams = {
2539
2540
  order_hash: orderHash,
2540
2541
  fulfiller: account.address,
2542
+ quantity,
2541
2543
  nonce: currentNonce.toString()
2542
2544
  };
2543
2545
  const typedData = stringifyBigInts(