@medialane/sdk 0.7.4 → 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.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { AccountInterface, constants, TypedData } from 'starknet';
|
|
|
3
3
|
|
|
4
4
|
declare const MARKETPLACE_CONTRACT_MAINNET = "0x0234f4e8838801ebf01d7f4166d42aed9a55bc67c1301162decf9e2040e05f16";
|
|
5
5
|
/** Medialane1155 — dedicated ERC-1155 marketplace. Deployed 2026-04-15. */
|
|
6
|
-
declare const MARKETPLACE_1155_CONTRACT_MAINNET = "
|
|
6
|
+
declare const MARKETPLACE_1155_CONTRACT_MAINNET = "0x03aab04e806542cd88bfd0c5bb2a37334fd742d477a2e0f97af09aa4a36137ca";
|
|
7
7
|
declare const COLLECTION_CONTRACT_MAINNET = "0x05c49ee5d3208a2c2e150fdd0c247d1195ed9ab54fa2d5dea7a633f39e4b205b";
|
|
8
8
|
declare const DROP_FACTORY_CONTRACT_MAINNET = "0x03587f42e29daee1b193f6cf83bf8627908ed6632d0d83fcb26225c50547d800";
|
|
9
9
|
declare const POP_FACTORY_CONTRACT_MAINNET = "0x00b32c34b427d8f346b5843ada6a37bd3368d879fc752cd52b68a87287f60111";
|
|
@@ -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 ×
|
|
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 */
|
|
@@ -346,6 +348,8 @@ interface ApiOrder {
|
|
|
346
348
|
price: ApiOrderPrice;
|
|
347
349
|
txHash: ApiOrderTxHash;
|
|
348
350
|
createdBlockNumber: string;
|
|
351
|
+
/** ERC-1155 only: units still available after the last partial fill. Null for ERC-721 or unfilled orders. */
|
|
352
|
+
remainingAmount: string | null;
|
|
349
353
|
createdAt: string;
|
|
350
354
|
updatedAt: string;
|
|
351
355
|
/** Embedded token metadata (name/image/description). Null when not yet indexed. */
|
|
@@ -572,6 +576,8 @@ interface FulfillOrderIntentParams {
|
|
|
572
576
|
orderHash: string;
|
|
573
577
|
/** Caller hint — "ERC1155" forces 1155 routing even if the order isn't in the DB yet */
|
|
574
578
|
tokenStandard?: string;
|
|
579
|
+
/** ERC-1155 only: units to purchase (1 ≤ quantity ≤ remaining_amount). Defaults to 1. */
|
|
580
|
+
quantity?: string;
|
|
575
581
|
}
|
|
576
582
|
interface CancelOrderIntentParams {
|
|
577
583
|
offerer: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { AccountInterface, constants, TypedData } from 'starknet';
|
|
|
3
3
|
|
|
4
4
|
declare const MARKETPLACE_CONTRACT_MAINNET = "0x0234f4e8838801ebf01d7f4166d42aed9a55bc67c1301162decf9e2040e05f16";
|
|
5
5
|
/** Medialane1155 — dedicated ERC-1155 marketplace. Deployed 2026-04-15. */
|
|
6
|
-
declare const MARKETPLACE_1155_CONTRACT_MAINNET = "
|
|
6
|
+
declare const MARKETPLACE_1155_CONTRACT_MAINNET = "0x03aab04e806542cd88bfd0c5bb2a37334fd742d477a2e0f97af09aa4a36137ca";
|
|
7
7
|
declare const COLLECTION_CONTRACT_MAINNET = "0x05c49ee5d3208a2c2e150fdd0c247d1195ed9ab54fa2d5dea7a633f39e4b205b";
|
|
8
8
|
declare const DROP_FACTORY_CONTRACT_MAINNET = "0x03587f42e29daee1b193f6cf83bf8627908ed6632d0d83fcb26225c50547d800";
|
|
9
9
|
declare const POP_FACTORY_CONTRACT_MAINNET = "0x00b32c34b427d8f346b5843ada6a37bd3368d879fc752cd52b68a87287f60111";
|
|
@@ -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 ×
|
|
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 */
|
|
@@ -346,6 +348,8 @@ interface ApiOrder {
|
|
|
346
348
|
price: ApiOrderPrice;
|
|
347
349
|
txHash: ApiOrderTxHash;
|
|
348
350
|
createdBlockNumber: string;
|
|
351
|
+
/** ERC-1155 only: units still available after the last partial fill. Null for ERC-721 or unfilled orders. */
|
|
352
|
+
remainingAmount: string | null;
|
|
349
353
|
createdAt: string;
|
|
350
354
|
updatedAt: string;
|
|
351
355
|
/** Embedded token metadata (name/image/description). Null when not yet indexed. */
|
|
@@ -572,6 +576,8 @@ interface FulfillOrderIntentParams {
|
|
|
572
576
|
orderHash: string;
|
|
573
577
|
/** Caller hint — "ERC1155" forces 1155 routing even if the order isn't in the DB yet */
|
|
574
578
|
tokenStandard?: string;
|
|
579
|
+
/** ERC-1155 only: units to purchase (1 ≤ quantity ≤ remaining_amount). Defaults to 1. */
|
|
580
|
+
quantity?: string;
|
|
575
581
|
}
|
|
576
582
|
interface CancelOrderIntentParams {
|
|
577
583
|
offerer: string;
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { TypedDataRevision, Contract, shortString, cairo, constants, RpcProvider
|
|
|
5
5
|
|
|
6
6
|
// src/constants.ts
|
|
7
7
|
var MARKETPLACE_CONTRACT_MAINNET = "0x0234f4e8838801ebf01d7f4166d42aed9a55bc67c1301162decf9e2040e05f16";
|
|
8
|
-
var MARKETPLACE_1155_CONTRACT_MAINNET = "
|
|
8
|
+
var MARKETPLACE_1155_CONTRACT_MAINNET = "0x03aab04e806542cd88bfd0c5bb2a37334fd742d477a2e0f97af09aa4a36137ca";
|
|
9
9
|
var COLLECTION_CONTRACT_MAINNET = "0x05c49ee5d3208a2c2e150fdd0c247d1195ed9ab54fa2d5dea7a633f39e4b205b";
|
|
10
10
|
var DROP_FACTORY_CONTRACT_MAINNET = "0x03587f42e29daee1b193f6cf83bf8627908ed6632d0d83fcb26225c50547d800";
|
|
11
11
|
var POP_FACTORY_CONTRACT_MAINNET = "0x00b32c34b427d8f346b5843ada6a37bd3368d879fc752cd52b68a87287f60111";
|
|
@@ -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(
|