@medialane/sdk 0.63.0 → 0.64.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/{index-7_t9LEnt.d.ts → index-DMNv-Oj0.d.ts} +14 -176
- package/dist/{index-C94WNlgk.d.cts → index-_q2B0g3M.d.cts} +14 -176
- package/dist/index.cjs +529 -1059
- 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 +527 -1059
- package/dist/index.js.map +1 -1
- package/dist/starknet/index.cjs +2277 -2811
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +1 -1
- package/dist/starknet/index.d.ts +1 -1
- package/dist/starknet/index.js +7234 -7770
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { C as Chain, V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, h as VenueSigner } from './types-Bx3ax9lW.js';
|
|
3
|
-
import { AccountInterface,
|
|
3
|
+
import { AccountInterface, Call, ProviderInterface, TypedData, constants } from 'starknet';
|
|
4
4
|
|
|
5
5
|
interface RetryOptions {
|
|
6
6
|
maxAttempts?: number;
|
|
@@ -1234,71 +1234,6 @@ interface Order {
|
|
|
1234
1234
|
parameters: OrderParameters;
|
|
1235
1235
|
signature: string[];
|
|
1236
1236
|
}
|
|
1237
|
-
interface Cancelation {
|
|
1238
|
-
order_hash: string;
|
|
1239
|
-
offerer: string;
|
|
1240
|
-
}
|
|
1241
|
-
interface CreateListingParams {
|
|
1242
|
-
nftContract: string;
|
|
1243
|
-
tokenId: string;
|
|
1244
|
-
price: string;
|
|
1245
|
-
/** Currency symbol or token address. Defaults to "USDC" (native). */
|
|
1246
|
-
currency?: string;
|
|
1247
|
-
durationSeconds: number;
|
|
1248
|
-
/** Signed EIP-2981 royalty cap in bps. Defaults to the NFT's live 2981 rate. */
|
|
1249
|
-
royaltyMaxBps?: string;
|
|
1250
|
-
}
|
|
1251
|
-
interface MakeOfferParams {
|
|
1252
|
-
nftContract: string;
|
|
1253
|
-
tokenId: string;
|
|
1254
|
-
price: string;
|
|
1255
|
-
/** Currency symbol or token address. Defaults to "USDC" (native). */
|
|
1256
|
-
currency?: string;
|
|
1257
|
-
durationSeconds: number;
|
|
1258
|
-
/** Signed EIP-2981 royalty cap in bps. Defaults to the NFT's live 2981 rate. */
|
|
1259
|
-
royaltyMaxBps?: string;
|
|
1260
|
-
}
|
|
1261
|
-
interface FulfillOrderParams {
|
|
1262
|
-
orderHash: string;
|
|
1263
|
-
/** ERC-20 payment token address — the consideration token on the listing. */
|
|
1264
|
-
paymentToken: string;
|
|
1265
|
-
/** Total price in raw token units as a string (e.g. "1000000" for 1 USDC). */
|
|
1266
|
-
totalPrice: string;
|
|
1267
|
-
}
|
|
1268
|
-
interface CancelOrderParams {
|
|
1269
|
-
orderHash: string;
|
|
1270
|
-
}
|
|
1271
|
-
interface CartItem {
|
|
1272
|
-
orderHash: string;
|
|
1273
|
-
/** ERC20 token address of the consideration */
|
|
1274
|
-
considerationToken: string;
|
|
1275
|
-
/** Raw consideration amount (string, e.g. "1000000") */
|
|
1276
|
-
considerationAmount: string;
|
|
1277
|
-
/** Human-readable identifier for the NFT (for logging) */
|
|
1278
|
-
offerIdentifier?: string;
|
|
1279
|
-
/** ERC-1155 only: number of units to purchase per item (defaults to "1") */
|
|
1280
|
-
quantity?: string;
|
|
1281
|
-
}
|
|
1282
|
-
interface MintParams {
|
|
1283
|
-
collectionId: string;
|
|
1284
|
-
recipient: string;
|
|
1285
|
-
tokenUri: string;
|
|
1286
|
-
/**
|
|
1287
|
-
* EIP-2981 secondary-sale royalty in basis points (0–10_000). Set once at mint;
|
|
1288
|
-
* the receiver is the immutable creator (the minting collection owner). Required
|
|
1289
|
-
* since MIP v0.4.0 — pass 0 for no royalty.
|
|
1290
|
-
*/
|
|
1291
|
-
royaltyBps: number;
|
|
1292
|
-
/** Optional: override the collection contract from config */
|
|
1293
|
-
collectionContract?: string;
|
|
1294
|
-
}
|
|
1295
|
-
interface CreateCollectionParams {
|
|
1296
|
-
name: string;
|
|
1297
|
-
symbol: string;
|
|
1298
|
-
baseUri: string;
|
|
1299
|
-
/** Optional: override the collection contract from config */
|
|
1300
|
-
collectionContract?: string;
|
|
1301
|
-
}
|
|
1302
1237
|
interface TxResult {
|
|
1303
1238
|
txHash: string;
|
|
1304
1239
|
}
|
|
@@ -1315,52 +1250,6 @@ interface OrderDetails {
|
|
|
1315
1250
|
/** ERC-1155 only — units still available. */
|
|
1316
1251
|
remaining_amount?: string;
|
|
1317
1252
|
}
|
|
1318
|
-
interface CreateListing1155Params {
|
|
1319
|
-
/** ERC-1155 contract address */
|
|
1320
|
-
nftContract: string;
|
|
1321
|
-
/** Token type ID */
|
|
1322
|
-
tokenId: string;
|
|
1323
|
-
/** Number of tokens to sell */
|
|
1324
|
-
amount: string;
|
|
1325
|
-
/** Human-readable price per token (e.g. "1.5") */
|
|
1326
|
-
pricePerUnit: string;
|
|
1327
|
-
/** Currency symbol or token address. Defaults to "USDC". */
|
|
1328
|
-
currency?: string;
|
|
1329
|
-
/** How long the listing is valid, in seconds */
|
|
1330
|
-
durationSeconds: number;
|
|
1331
|
-
/** Signed EIP-2981 royalty cap in bps. Defaults to the NFT's live 2981 rate. */
|
|
1332
|
-
royaltyMaxBps?: string;
|
|
1333
|
-
}
|
|
1334
|
-
interface FulfillOrder1155Params {
|
|
1335
|
-
/** On-chain order hash */
|
|
1336
|
-
orderHash: string;
|
|
1337
|
-
/** ERC-20 payment token address (from order details) */
|
|
1338
|
-
paymentToken: string;
|
|
1339
|
-
/** Total price in raw token units (pricePerUnit × quantity, as string) */
|
|
1340
|
-
totalPrice: string;
|
|
1341
|
-
/** Number of units to purchase (1 ≤ quantity ≤ remaining_amount). Defaults to 1. */
|
|
1342
|
-
quantity?: string;
|
|
1343
|
-
}
|
|
1344
|
-
interface CancelOrder1155Params {
|
|
1345
|
-
/** On-chain order hash */
|
|
1346
|
-
orderHash: string;
|
|
1347
|
-
}
|
|
1348
|
-
interface MakeOffer1155Params {
|
|
1349
|
-
/** ERC-1155 contract address */
|
|
1350
|
-
nftContract: string;
|
|
1351
|
-
/** Token type ID */
|
|
1352
|
-
tokenId: string;
|
|
1353
|
-
/** Number of tokens requested */
|
|
1354
|
-
amount: string;
|
|
1355
|
-
/** Total offer price in human-readable units (e.g. "1.5") */
|
|
1356
|
-
price: string;
|
|
1357
|
-
/** Currency symbol or token address. Defaults to "USDC". */
|
|
1358
|
-
currency?: string;
|
|
1359
|
-
/** How long the offer is valid, in seconds */
|
|
1360
|
-
durationSeconds: number;
|
|
1361
|
-
/** Signed EIP-2981 royalty cap in bps. Defaults to the NFT's live 2981 rate. */
|
|
1362
|
-
royaltyMaxBps?: string;
|
|
1363
|
-
}
|
|
1364
1253
|
|
|
1365
1254
|
interface CreatePopCollectionParams {
|
|
1366
1255
|
name: string;
|
|
@@ -1447,65 +1336,6 @@ interface CreateSponsorshipOfferParams {
|
|
|
1447
1336
|
specificSponsor?: string;
|
|
1448
1337
|
}
|
|
1449
1338
|
|
|
1450
|
-
declare class MedialaneError extends Error {
|
|
1451
|
-
readonly code: MedialaneErrorCode;
|
|
1452
|
-
readonly cause?: unknown | undefined;
|
|
1453
|
-
constructor(message: string, code?: MedialaneErrorCode, cause?: unknown | undefined);
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
declare class MarketplaceModule {
|
|
1457
|
-
private readonly config;
|
|
1458
|
-
constructor(config: ResolvedConfig);
|
|
1459
|
-
createListing(account: AccountInterface, params: CreateListingParams): Promise<TxResult>;
|
|
1460
|
-
makeOffer(account: AccountInterface, params: MakeOfferParams): Promise<TxResult>;
|
|
1461
|
-
fulfillOrder(account: AccountInterface, params: FulfillOrderParams): Promise<TxResult>;
|
|
1462
|
-
cancelOrder(account: AccountInterface, params: CancelOrderParams): Promise<TxResult>;
|
|
1463
|
-
checkoutCart(account: AccountInterface, items: CartItem[]): Promise<TxResult>;
|
|
1464
|
-
mint(account: AccountInterface, params: MintParams): Promise<TxResult>;
|
|
1465
|
-
createCollection(account: AccountInterface, params: CreateCollectionParams): Promise<TxResult>;
|
|
1466
|
-
/** Bulk-cancel: bump the caller's counter, invalidating all their open orders. */
|
|
1467
|
-
incrementCounter(account: AccountInterface): Promise<TxResult>;
|
|
1468
|
-
getOrderDetails(orderHash: string): Promise<OrderDetails>;
|
|
1469
|
-
getCounter(address: string): Promise<bigint>;
|
|
1470
|
-
buildListingTypedData(params: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
1471
|
-
buildCancellationTypedData(params: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
declare class Medialane1155Module {
|
|
1475
|
-
private readonly config;
|
|
1476
|
-
constructor(config: ResolvedConfig);
|
|
1477
|
-
/**
|
|
1478
|
-
* Create an ERC-1155 sell listing.
|
|
1479
|
-
* Optionally grants `set_approval_for_all` if not already approved.
|
|
1480
|
-
*/
|
|
1481
|
-
createListing(account: AccountInterface, params: CreateListing1155Params): Promise<TxResult>;
|
|
1482
|
-
/**
|
|
1483
|
-
* Make an offer (bid) on an ERC-1155 token.
|
|
1484
|
-
* Approves the ERC-20 spend then calls `register_order` atomically.
|
|
1485
|
-
*/
|
|
1486
|
-
makeOffer(account: AccountInterface, params: MakeOffer1155Params): Promise<TxResult>;
|
|
1487
|
-
/**
|
|
1488
|
-
* Fulfill (buy) an ERC-1155 listing.
|
|
1489
|
-
* Approves the payment token then calls `fulfill_order` atomically.
|
|
1490
|
-
*/
|
|
1491
|
-
fulfillOrder(account: AccountInterface, params: FulfillOrder1155Params): Promise<TxResult>;
|
|
1492
|
-
/**
|
|
1493
|
-
* Cancel an ERC-1155 listing (offerer only).
|
|
1494
|
-
*/
|
|
1495
|
-
cancelOrder(account: AccountInterface, params: CancelOrder1155Params): Promise<TxResult>;
|
|
1496
|
-
/**
|
|
1497
|
-
* Checkout a cart of ERC-1155 orders atomically.
|
|
1498
|
-
* Signs one fulfillment per item (with quantity), sums ERC-20 approvals by token.
|
|
1499
|
-
*/
|
|
1500
|
-
checkoutCart(account: AccountInterface, items: CartItem[]): Promise<TxResult>;
|
|
1501
|
-
/** Bulk-cancel on the 1155 venue: bump the caller's counter. */
|
|
1502
|
-
incrementCounter(account: AccountInterface): Promise<TxResult>;
|
|
1503
|
-
getOrderDetails(orderHash: string): Promise<OrderDetails>;
|
|
1504
|
-
getCounter(address: string): Promise<bigint>;
|
|
1505
|
-
buildListingTypedData(params: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
1506
|
-
buildCancellationTypedData(params: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
1339
|
declare class PopService {
|
|
1510
1340
|
private readonly factoryAddress;
|
|
1511
1341
|
constructor(config: ResolvedConfig);
|
|
@@ -1948,10 +1778,6 @@ declare class SponsorshipService {
|
|
|
1948
1778
|
}
|
|
1949
1779
|
|
|
1950
1780
|
declare class MedialaneClient {
|
|
1951
|
-
/** On-chain marketplace interactions for ERC-721 assets (create listing, fulfill order, etc.) */
|
|
1952
|
-
readonly marketplace: MarketplaceModule;
|
|
1953
|
-
/** On-chain marketplace interactions for ERC-1155 assets (Medialane1155 contract). */
|
|
1954
|
-
readonly marketplace1155: Medialane1155Module;
|
|
1955
1781
|
/**
|
|
1956
1782
|
* Off-chain API client — covers all /v1/* backend endpoints.
|
|
1957
1783
|
* Requires `backendUrl` in config; pass `apiKey` for authenticated routes.
|
|
@@ -1973,6 +1799,18 @@ declare class MedialaneClient {
|
|
|
1973
1799
|
get marketplaceContract(): string;
|
|
1974
1800
|
}
|
|
1975
1801
|
|
|
1802
|
+
declare class MedialaneError extends Error {
|
|
1803
|
+
readonly code: MedialaneErrorCode;
|
|
1804
|
+
readonly cause?: unknown | undefined;
|
|
1805
|
+
constructor(message: string, code?: MedialaneErrorCode, cause?: unknown | undefined);
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
declare function getOrderDetails(orderHash: string, config: ResolvedConfig): Promise<OrderDetails>;
|
|
1809
|
+
declare function getCounter(address: string, config: ResolvedConfig): Promise<bigint>;
|
|
1810
|
+
|
|
1811
|
+
declare function getOrderDetails1155(orderHash: string, config: ResolvedConfig): Promise<OrderDetails>;
|
|
1812
|
+
declare function getCounter1155(address: string, config: ResolvedConfig): Promise<bigint>;
|
|
1813
|
+
|
|
1976
1814
|
/** What a stored/registered order resolves to for fulfilment/cancellation. */
|
|
1977
1815
|
interface ResolvedOrder {
|
|
1978
1816
|
/** ERC-20 consideration token address. */
|
|
@@ -10299,4 +10137,4 @@ declare function build1155CancellationTypedData(message: Record<string, unknown>
|
|
|
10299
10137
|
|
|
10300
10138
|
type StarknetVenueSigner = VenueSigner<TypedData, Call>;
|
|
10301
10139
|
|
|
10302
|
-
export { type ApiRewardsConfig as $, ADMIN_HEADERS as A, type ApiCreatorProfile as B, type ApiIntent as C, type ApiIntentCreated as D, type ApiKeyStatus as E, type ApiMeta as F, type ApiMetadataSignedUrl as G, type ApiMetadataUpload as H, type ApiOrder as I, type ApiOrderConsideration as J, type ApiOrderOffer as K, type ApiOrderPrice as L, type ApiOrderTokenMeta as M, type ApiOrderTxHash as N, type ApiOrdersQuery as O, type ApiPointEvent as P, type ApiPortalKey as Q, type ApiPortalKeyCreated as R, type ServiceDefinition as S, type ApiPortalMe as T, type ApiPublicRemix as U, type ApiRemixOffer as V, type ApiRemixOfferPrice as W, type ApiRemixOffersQuery as X, type ApiResponse as Y, type ApiRewardsBadge as Z, type ApiRewardsBatchEntry as _, type ServiceCapability as a,
|
|
10140
|
+
export { type ApiRewardsConfig as $, ADMIN_HEADERS as A, type ApiCreatorProfile as B, type ApiIntent as C, type ApiIntentCreated as D, type ApiKeyStatus as E, type ApiMeta as F, type ApiMetadataSignedUrl as G, type ApiMetadataUpload as H, type ApiOrder as I, type ApiOrderConsideration as J, type ApiOrderOffer as K, type ApiOrderPrice as L, type ApiOrderTokenMeta as M, type ApiOrderTxHash as N, type ApiOrdersQuery as O, type ApiPointEvent as P, type ApiPortalKey as Q, type ApiPortalKeyCreated as R, type ServiceDefinition as S, type ApiPortalMe as T, type ApiPublicRemix as U, type ApiRemixOffer as V, type ApiRemixOfferPrice as W, type ApiRemixOffersQuery as X, type ApiResponse as Y, type ApiRewardsBadge as Z, type ApiRewardsBatchEntry as _, type ServiceCapability as a, IPCollection1155ABI as a$, type ApiRewardsLeaderboardEntry as a0, type ApiRewardsLevel as a1, type ApiSearchCollectionResult as a2, type ApiSearchCreatorResult as a3, type ApiSearchResult as a4, type ApiSearchTokenResult as a5, type ApiToken as a6, type ApiTokenBalance as a7, type ApiTokenMetadata as a8, type ApiUsageDay as a9, type CreateMintIntentParams as aA, type CreatePopCollectionParams as aB, type CreateRemixOfferParams as aC, type CreateSponsorshipOfferParams as aD, type CreateWebhookParams as aE, CreatorCoinFactoryABI as aF, type CreatorCoinPrice as aG, type CreatorCoinReceiptLike as aH, CreatorCoinService as aI, type DeployClubParams as aJ, type DeployCollectionParams as aK, DropCollectionABI as aL, DropFactoryABI as aM, type DropMintStatus as aN, DropService as aO, ERC1155CollectionService as aP, type EkuboLaunchParams as aQ, type EkuboPoolParams as aR, type EnforcementDeclaration as aS, type FeeConfig as aT, FeeConfigSchema as aU, type FeeSurface as aV, type FulfillOrderIntentParams as aW, IPClubABI as aX, IPClubCollectionABI as aY, IPClubFactoryABI as aZ, IPClubNFTABI as a_, type ApiUserRewards as aa, type ApiUserWallet as ab, type ApiWebhookCreated as ac, type ApiWebhookEndpoint as ad, type AutoRemixOfferParams as ae, type BatchMintEditionParams as af, type BuildFeeCallParams as ag, MAX_SUPPLY as ah, MIN_SUPPLY as ai, type CancelOrderIntentParams as aj, type ChainFilter as ak, type ClaimConditions as al, ClubService as am, type CollectionSort as an, type CollectionTokensSort as ao, type ConfirmRemixOfferParams as ap, type ConfirmSelfRemixParams as aq, type ConsiderationItem as ar, type CreateClubParams as as, type CreateCollectionIntentParams as at, type CreateCounterOfferIntentParams as au, type CreateCreatorCoinParams as av, type CreateDropParams as aw, type CreateEventParams as ax, type CreateGrantOpts as ay, type CreateListingIntentParams as az, ADMIN_SCOPE as b, buildCreateCreatorCoinCall as b$, IPCollection1155FactoryABI as b0, IPCollectionABI as b1, IPGenesisABI as b2, IPMarketplaceABI as b3, IPNftABI as b4, IPSponsorshipABI as b5, IPSponsorshipLicenseABI as b6, IPTicketCollectionABI as b7, IPTicketCollectionFactoryABI as b8, type IPType as b9, type PopClaimStatus as bA, type PopEventType as bB, PopService as bC, type RemixOfferStatus as bD, type RequestSiwsTokenArgs as bE, type ResolvedConfig as bF, type ResolvedFeeConfig as bG, type ResolvedOrder as bH, type RetryOptions as bI, type ServiceEventDeclaration as bJ, type SiwsSigner as bK, type SortOrder as bL, SponsorshipService as bM, StarknetVenue as bN, type StarknetVenueDeps as bO, type StarknetVenueSigner as bP, type TenantPlan as bQ, TicketService as bR, type TxResult as bS, VALIDATED_EKUBO_PARAMS as bT, type WebhookEventType as bU, type WebhookStatus as bV, adminRequestDigest as bW, build1155CancellationTypedData as bX, build1155OrderTypedData as bY, buildAdminSessionTypedData as bZ, buildCancellationTypedData as b_, type IntentCall as ba, type IntentStatus as bb, type IntentType as bc, type IpAttribute as bd, type IpNftMetadata as be, LAUNCH_PRICE_QUOTE_PER_COIN as bf, type MakeOfferIntentParams as bg, Medialane1155ABI as bh, MedialaneApiError as bi, MedialaneClient as bj, type MedialaneConfig as bk, MedialaneError as bl, type MedialaneErrorCode as bm, type MintEditionParams as bn, type MintTicketsParams as bo, OPEN_LICENSES as bp, type OfferItem as bq, type OpenLicense as br, type Order as bs, type OrderDetails as bt, type OrderParameters as bu, type OrderStatus as bv, POPCollectionABI as bw, POPFactoryABI as bx, type ParsedAdminHeaders as by, type PopBatchEligibilityItem as bz, type ActivityType as c, buildFeeCall as c0, buildLaunchOnEkuboCalls as c1, buildOrderTypedData as c2, buybackQuoteRaw as c3, toRaw as c4, createAdminSessionGrant as c5, encodeAdminHeaders as c6, encodeByteArray as c7, fdvHuman as c8, getCounter as c9, getCounter1155 as ca, getCreatorCoinPrice as cb, getOrderDetails as cc, getOrderDetails1155 as cd, getSiwsStorageKey as ce, getStoredSiwsToken as cf, isSiwsTokenValid as cg, normalizeSiwsSignature as ch, parseAdminHeaders as ci, parseCreatorCoinCreated as cj, randomNonce as ck, requestSiwsToken as cl, resolveConfig as cm, resolveFeeConfig as cn, sessionKeyHashOf as co, signAdminRequest as cp, storeSiwsToken as cq, teamCoinsRaw as cr, validateName as cs, validateSupply as ct, validateSymbol as cu, verifyAdminRequestSig as cv, type AddSupplyParams as d, type AdminGrant as e, type AdminRequest as f, type AdminRequestSig as g, type AdminSession as h, type AdminSessionTypedDataInput as i, type ApiActivitiesQuery as j, type ApiActivity as k, type ApiActivityPrice as l, type ApiAdminCollectionClaim as m, type ApiAppSource as n, type ApiChain as o, ApiClient as p, type ApiCoin as q, type ApiCoinsQuery as r, type ApiCollection as s, type ApiCollectionClaim as t, type ApiCollectionProfile as u, type ApiCollectionSlugClaim as v, type ApiCollectionsQuery as w, type ApiComment as x, type ApiCounterOffersQuery as y, type ApiCreatorListResult as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { C as Chain, V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, h as VenueSigner } from './types-Bx3ax9lW.cjs';
|
|
3
|
-
import { AccountInterface,
|
|
3
|
+
import { AccountInterface, Call, ProviderInterface, TypedData, constants } from 'starknet';
|
|
4
4
|
|
|
5
5
|
interface RetryOptions {
|
|
6
6
|
maxAttempts?: number;
|
|
@@ -1234,71 +1234,6 @@ interface Order {
|
|
|
1234
1234
|
parameters: OrderParameters;
|
|
1235
1235
|
signature: string[];
|
|
1236
1236
|
}
|
|
1237
|
-
interface Cancelation {
|
|
1238
|
-
order_hash: string;
|
|
1239
|
-
offerer: string;
|
|
1240
|
-
}
|
|
1241
|
-
interface CreateListingParams {
|
|
1242
|
-
nftContract: string;
|
|
1243
|
-
tokenId: string;
|
|
1244
|
-
price: string;
|
|
1245
|
-
/** Currency symbol or token address. Defaults to "USDC" (native). */
|
|
1246
|
-
currency?: string;
|
|
1247
|
-
durationSeconds: number;
|
|
1248
|
-
/** Signed EIP-2981 royalty cap in bps. Defaults to the NFT's live 2981 rate. */
|
|
1249
|
-
royaltyMaxBps?: string;
|
|
1250
|
-
}
|
|
1251
|
-
interface MakeOfferParams {
|
|
1252
|
-
nftContract: string;
|
|
1253
|
-
tokenId: string;
|
|
1254
|
-
price: string;
|
|
1255
|
-
/** Currency symbol or token address. Defaults to "USDC" (native). */
|
|
1256
|
-
currency?: string;
|
|
1257
|
-
durationSeconds: number;
|
|
1258
|
-
/** Signed EIP-2981 royalty cap in bps. Defaults to the NFT's live 2981 rate. */
|
|
1259
|
-
royaltyMaxBps?: string;
|
|
1260
|
-
}
|
|
1261
|
-
interface FulfillOrderParams {
|
|
1262
|
-
orderHash: string;
|
|
1263
|
-
/** ERC-20 payment token address — the consideration token on the listing. */
|
|
1264
|
-
paymentToken: string;
|
|
1265
|
-
/** Total price in raw token units as a string (e.g. "1000000" for 1 USDC). */
|
|
1266
|
-
totalPrice: string;
|
|
1267
|
-
}
|
|
1268
|
-
interface CancelOrderParams {
|
|
1269
|
-
orderHash: string;
|
|
1270
|
-
}
|
|
1271
|
-
interface CartItem {
|
|
1272
|
-
orderHash: string;
|
|
1273
|
-
/** ERC20 token address of the consideration */
|
|
1274
|
-
considerationToken: string;
|
|
1275
|
-
/** Raw consideration amount (string, e.g. "1000000") */
|
|
1276
|
-
considerationAmount: string;
|
|
1277
|
-
/** Human-readable identifier for the NFT (for logging) */
|
|
1278
|
-
offerIdentifier?: string;
|
|
1279
|
-
/** ERC-1155 only: number of units to purchase per item (defaults to "1") */
|
|
1280
|
-
quantity?: string;
|
|
1281
|
-
}
|
|
1282
|
-
interface MintParams {
|
|
1283
|
-
collectionId: string;
|
|
1284
|
-
recipient: string;
|
|
1285
|
-
tokenUri: string;
|
|
1286
|
-
/**
|
|
1287
|
-
* EIP-2981 secondary-sale royalty in basis points (0–10_000). Set once at mint;
|
|
1288
|
-
* the receiver is the immutable creator (the minting collection owner). Required
|
|
1289
|
-
* since MIP v0.4.0 — pass 0 for no royalty.
|
|
1290
|
-
*/
|
|
1291
|
-
royaltyBps: number;
|
|
1292
|
-
/** Optional: override the collection contract from config */
|
|
1293
|
-
collectionContract?: string;
|
|
1294
|
-
}
|
|
1295
|
-
interface CreateCollectionParams {
|
|
1296
|
-
name: string;
|
|
1297
|
-
symbol: string;
|
|
1298
|
-
baseUri: string;
|
|
1299
|
-
/** Optional: override the collection contract from config */
|
|
1300
|
-
collectionContract?: string;
|
|
1301
|
-
}
|
|
1302
1237
|
interface TxResult {
|
|
1303
1238
|
txHash: string;
|
|
1304
1239
|
}
|
|
@@ -1315,52 +1250,6 @@ interface OrderDetails {
|
|
|
1315
1250
|
/** ERC-1155 only — units still available. */
|
|
1316
1251
|
remaining_amount?: string;
|
|
1317
1252
|
}
|
|
1318
|
-
interface CreateListing1155Params {
|
|
1319
|
-
/** ERC-1155 contract address */
|
|
1320
|
-
nftContract: string;
|
|
1321
|
-
/** Token type ID */
|
|
1322
|
-
tokenId: string;
|
|
1323
|
-
/** Number of tokens to sell */
|
|
1324
|
-
amount: string;
|
|
1325
|
-
/** Human-readable price per token (e.g. "1.5") */
|
|
1326
|
-
pricePerUnit: string;
|
|
1327
|
-
/** Currency symbol or token address. Defaults to "USDC". */
|
|
1328
|
-
currency?: string;
|
|
1329
|
-
/** How long the listing is valid, in seconds */
|
|
1330
|
-
durationSeconds: number;
|
|
1331
|
-
/** Signed EIP-2981 royalty cap in bps. Defaults to the NFT's live 2981 rate. */
|
|
1332
|
-
royaltyMaxBps?: string;
|
|
1333
|
-
}
|
|
1334
|
-
interface FulfillOrder1155Params {
|
|
1335
|
-
/** On-chain order hash */
|
|
1336
|
-
orderHash: string;
|
|
1337
|
-
/** ERC-20 payment token address (from order details) */
|
|
1338
|
-
paymentToken: string;
|
|
1339
|
-
/** Total price in raw token units (pricePerUnit × quantity, as string) */
|
|
1340
|
-
totalPrice: string;
|
|
1341
|
-
/** Number of units to purchase (1 ≤ quantity ≤ remaining_amount). Defaults to 1. */
|
|
1342
|
-
quantity?: string;
|
|
1343
|
-
}
|
|
1344
|
-
interface CancelOrder1155Params {
|
|
1345
|
-
/** On-chain order hash */
|
|
1346
|
-
orderHash: string;
|
|
1347
|
-
}
|
|
1348
|
-
interface MakeOffer1155Params {
|
|
1349
|
-
/** ERC-1155 contract address */
|
|
1350
|
-
nftContract: string;
|
|
1351
|
-
/** Token type ID */
|
|
1352
|
-
tokenId: string;
|
|
1353
|
-
/** Number of tokens requested */
|
|
1354
|
-
amount: string;
|
|
1355
|
-
/** Total offer price in human-readable units (e.g. "1.5") */
|
|
1356
|
-
price: string;
|
|
1357
|
-
/** Currency symbol or token address. Defaults to "USDC". */
|
|
1358
|
-
currency?: string;
|
|
1359
|
-
/** How long the offer is valid, in seconds */
|
|
1360
|
-
durationSeconds: number;
|
|
1361
|
-
/** Signed EIP-2981 royalty cap in bps. Defaults to the NFT's live 2981 rate. */
|
|
1362
|
-
royaltyMaxBps?: string;
|
|
1363
|
-
}
|
|
1364
1253
|
|
|
1365
1254
|
interface CreatePopCollectionParams {
|
|
1366
1255
|
name: string;
|
|
@@ -1447,65 +1336,6 @@ interface CreateSponsorshipOfferParams {
|
|
|
1447
1336
|
specificSponsor?: string;
|
|
1448
1337
|
}
|
|
1449
1338
|
|
|
1450
|
-
declare class MedialaneError extends Error {
|
|
1451
|
-
readonly code: MedialaneErrorCode;
|
|
1452
|
-
readonly cause?: unknown | undefined;
|
|
1453
|
-
constructor(message: string, code?: MedialaneErrorCode, cause?: unknown | undefined);
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
declare class MarketplaceModule {
|
|
1457
|
-
private readonly config;
|
|
1458
|
-
constructor(config: ResolvedConfig);
|
|
1459
|
-
createListing(account: AccountInterface, params: CreateListingParams): Promise<TxResult>;
|
|
1460
|
-
makeOffer(account: AccountInterface, params: MakeOfferParams): Promise<TxResult>;
|
|
1461
|
-
fulfillOrder(account: AccountInterface, params: FulfillOrderParams): Promise<TxResult>;
|
|
1462
|
-
cancelOrder(account: AccountInterface, params: CancelOrderParams): Promise<TxResult>;
|
|
1463
|
-
checkoutCart(account: AccountInterface, items: CartItem[]): Promise<TxResult>;
|
|
1464
|
-
mint(account: AccountInterface, params: MintParams): Promise<TxResult>;
|
|
1465
|
-
createCollection(account: AccountInterface, params: CreateCollectionParams): Promise<TxResult>;
|
|
1466
|
-
/** Bulk-cancel: bump the caller's counter, invalidating all their open orders. */
|
|
1467
|
-
incrementCounter(account: AccountInterface): Promise<TxResult>;
|
|
1468
|
-
getOrderDetails(orderHash: string): Promise<OrderDetails>;
|
|
1469
|
-
getCounter(address: string): Promise<bigint>;
|
|
1470
|
-
buildListingTypedData(params: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
1471
|
-
buildCancellationTypedData(params: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
declare class Medialane1155Module {
|
|
1475
|
-
private readonly config;
|
|
1476
|
-
constructor(config: ResolvedConfig);
|
|
1477
|
-
/**
|
|
1478
|
-
* Create an ERC-1155 sell listing.
|
|
1479
|
-
* Optionally grants `set_approval_for_all` if not already approved.
|
|
1480
|
-
*/
|
|
1481
|
-
createListing(account: AccountInterface, params: CreateListing1155Params): Promise<TxResult>;
|
|
1482
|
-
/**
|
|
1483
|
-
* Make an offer (bid) on an ERC-1155 token.
|
|
1484
|
-
* Approves the ERC-20 spend then calls `register_order` atomically.
|
|
1485
|
-
*/
|
|
1486
|
-
makeOffer(account: AccountInterface, params: MakeOffer1155Params): Promise<TxResult>;
|
|
1487
|
-
/**
|
|
1488
|
-
* Fulfill (buy) an ERC-1155 listing.
|
|
1489
|
-
* Approves the payment token then calls `fulfill_order` atomically.
|
|
1490
|
-
*/
|
|
1491
|
-
fulfillOrder(account: AccountInterface, params: FulfillOrder1155Params): Promise<TxResult>;
|
|
1492
|
-
/**
|
|
1493
|
-
* Cancel an ERC-1155 listing (offerer only).
|
|
1494
|
-
*/
|
|
1495
|
-
cancelOrder(account: AccountInterface, params: CancelOrder1155Params): Promise<TxResult>;
|
|
1496
|
-
/**
|
|
1497
|
-
* Checkout a cart of ERC-1155 orders atomically.
|
|
1498
|
-
* Signs one fulfillment per item (with quantity), sums ERC-20 approvals by token.
|
|
1499
|
-
*/
|
|
1500
|
-
checkoutCart(account: AccountInterface, items: CartItem[]): Promise<TxResult>;
|
|
1501
|
-
/** Bulk-cancel on the 1155 venue: bump the caller's counter. */
|
|
1502
|
-
incrementCounter(account: AccountInterface): Promise<TxResult>;
|
|
1503
|
-
getOrderDetails(orderHash: string): Promise<OrderDetails>;
|
|
1504
|
-
getCounter(address: string): Promise<bigint>;
|
|
1505
|
-
buildListingTypedData(params: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
1506
|
-
buildCancellationTypedData(params: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
1339
|
declare class PopService {
|
|
1510
1340
|
private readonly factoryAddress;
|
|
1511
1341
|
constructor(config: ResolvedConfig);
|
|
@@ -1948,10 +1778,6 @@ declare class SponsorshipService {
|
|
|
1948
1778
|
}
|
|
1949
1779
|
|
|
1950
1780
|
declare class MedialaneClient {
|
|
1951
|
-
/** On-chain marketplace interactions for ERC-721 assets (create listing, fulfill order, etc.) */
|
|
1952
|
-
readonly marketplace: MarketplaceModule;
|
|
1953
|
-
/** On-chain marketplace interactions for ERC-1155 assets (Medialane1155 contract). */
|
|
1954
|
-
readonly marketplace1155: Medialane1155Module;
|
|
1955
1781
|
/**
|
|
1956
1782
|
* Off-chain API client — covers all /v1/* backend endpoints.
|
|
1957
1783
|
* Requires `backendUrl` in config; pass `apiKey` for authenticated routes.
|
|
@@ -1973,6 +1799,18 @@ declare class MedialaneClient {
|
|
|
1973
1799
|
get marketplaceContract(): string;
|
|
1974
1800
|
}
|
|
1975
1801
|
|
|
1802
|
+
declare class MedialaneError extends Error {
|
|
1803
|
+
readonly code: MedialaneErrorCode;
|
|
1804
|
+
readonly cause?: unknown | undefined;
|
|
1805
|
+
constructor(message: string, code?: MedialaneErrorCode, cause?: unknown | undefined);
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
declare function getOrderDetails(orderHash: string, config: ResolvedConfig): Promise<OrderDetails>;
|
|
1809
|
+
declare function getCounter(address: string, config: ResolvedConfig): Promise<bigint>;
|
|
1810
|
+
|
|
1811
|
+
declare function getOrderDetails1155(orderHash: string, config: ResolvedConfig): Promise<OrderDetails>;
|
|
1812
|
+
declare function getCounter1155(address: string, config: ResolvedConfig): Promise<bigint>;
|
|
1813
|
+
|
|
1976
1814
|
/** What a stored/registered order resolves to for fulfilment/cancellation. */
|
|
1977
1815
|
interface ResolvedOrder {
|
|
1978
1816
|
/** ERC-20 consideration token address. */
|
|
@@ -10299,4 +10137,4 @@ declare function build1155CancellationTypedData(message: Record<string, unknown>
|
|
|
10299
10137
|
|
|
10300
10138
|
type StarknetVenueSigner = VenueSigner<TypedData, Call>;
|
|
10301
10139
|
|
|
10302
|
-
export { type ApiRewardsConfig as $, ADMIN_HEADERS as A, type ApiCreatorProfile as B, type ApiIntent as C, type ApiIntentCreated as D, type ApiKeyStatus as E, type ApiMeta as F, type ApiMetadataSignedUrl as G, type ApiMetadataUpload as H, type ApiOrder as I, type ApiOrderConsideration as J, type ApiOrderOffer as K, type ApiOrderPrice as L, type ApiOrderTokenMeta as M, type ApiOrderTxHash as N, type ApiOrdersQuery as O, type ApiPointEvent as P, type ApiPortalKey as Q, type ApiPortalKeyCreated as R, type ServiceDefinition as S, type ApiPortalMe as T, type ApiPublicRemix as U, type ApiRemixOffer as V, type ApiRemixOfferPrice as W, type ApiRemixOffersQuery as X, type ApiResponse as Y, type ApiRewardsBadge as Z, type ApiRewardsBatchEntry as _, type ServiceCapability as a,
|
|
10140
|
+
export { type ApiRewardsConfig as $, ADMIN_HEADERS as A, type ApiCreatorProfile as B, type ApiIntent as C, type ApiIntentCreated as D, type ApiKeyStatus as E, type ApiMeta as F, type ApiMetadataSignedUrl as G, type ApiMetadataUpload as H, type ApiOrder as I, type ApiOrderConsideration as J, type ApiOrderOffer as K, type ApiOrderPrice as L, type ApiOrderTokenMeta as M, type ApiOrderTxHash as N, type ApiOrdersQuery as O, type ApiPointEvent as P, type ApiPortalKey as Q, type ApiPortalKeyCreated as R, type ServiceDefinition as S, type ApiPortalMe as T, type ApiPublicRemix as U, type ApiRemixOffer as V, type ApiRemixOfferPrice as W, type ApiRemixOffersQuery as X, type ApiResponse as Y, type ApiRewardsBadge as Z, type ApiRewardsBatchEntry as _, type ServiceCapability as a, IPCollection1155ABI as a$, type ApiRewardsLeaderboardEntry as a0, type ApiRewardsLevel as a1, type ApiSearchCollectionResult as a2, type ApiSearchCreatorResult as a3, type ApiSearchResult as a4, type ApiSearchTokenResult as a5, type ApiToken as a6, type ApiTokenBalance as a7, type ApiTokenMetadata as a8, type ApiUsageDay as a9, type CreateMintIntentParams as aA, type CreatePopCollectionParams as aB, type CreateRemixOfferParams as aC, type CreateSponsorshipOfferParams as aD, type CreateWebhookParams as aE, CreatorCoinFactoryABI as aF, type CreatorCoinPrice as aG, type CreatorCoinReceiptLike as aH, CreatorCoinService as aI, type DeployClubParams as aJ, type DeployCollectionParams as aK, DropCollectionABI as aL, DropFactoryABI as aM, type DropMintStatus as aN, DropService as aO, ERC1155CollectionService as aP, type EkuboLaunchParams as aQ, type EkuboPoolParams as aR, type EnforcementDeclaration as aS, type FeeConfig as aT, FeeConfigSchema as aU, type FeeSurface as aV, type FulfillOrderIntentParams as aW, IPClubABI as aX, IPClubCollectionABI as aY, IPClubFactoryABI as aZ, IPClubNFTABI as a_, type ApiUserRewards as aa, type ApiUserWallet as ab, type ApiWebhookCreated as ac, type ApiWebhookEndpoint as ad, type AutoRemixOfferParams as ae, type BatchMintEditionParams as af, type BuildFeeCallParams as ag, MAX_SUPPLY as ah, MIN_SUPPLY as ai, type CancelOrderIntentParams as aj, type ChainFilter as ak, type ClaimConditions as al, ClubService as am, type CollectionSort as an, type CollectionTokensSort as ao, type ConfirmRemixOfferParams as ap, type ConfirmSelfRemixParams as aq, type ConsiderationItem as ar, type CreateClubParams as as, type CreateCollectionIntentParams as at, type CreateCounterOfferIntentParams as au, type CreateCreatorCoinParams as av, type CreateDropParams as aw, type CreateEventParams as ax, type CreateGrantOpts as ay, type CreateListingIntentParams as az, ADMIN_SCOPE as b, buildCreateCreatorCoinCall as b$, IPCollection1155FactoryABI as b0, IPCollectionABI as b1, IPGenesisABI as b2, IPMarketplaceABI as b3, IPNftABI as b4, IPSponsorshipABI as b5, IPSponsorshipLicenseABI as b6, IPTicketCollectionABI as b7, IPTicketCollectionFactoryABI as b8, type IPType as b9, type PopClaimStatus as bA, type PopEventType as bB, PopService as bC, type RemixOfferStatus as bD, type RequestSiwsTokenArgs as bE, type ResolvedConfig as bF, type ResolvedFeeConfig as bG, type ResolvedOrder as bH, type RetryOptions as bI, type ServiceEventDeclaration as bJ, type SiwsSigner as bK, type SortOrder as bL, SponsorshipService as bM, StarknetVenue as bN, type StarknetVenueDeps as bO, type StarknetVenueSigner as bP, type TenantPlan as bQ, TicketService as bR, type TxResult as bS, VALIDATED_EKUBO_PARAMS as bT, type WebhookEventType as bU, type WebhookStatus as bV, adminRequestDigest as bW, build1155CancellationTypedData as bX, build1155OrderTypedData as bY, buildAdminSessionTypedData as bZ, buildCancellationTypedData as b_, type IntentCall as ba, type IntentStatus as bb, type IntentType as bc, type IpAttribute as bd, type IpNftMetadata as be, LAUNCH_PRICE_QUOTE_PER_COIN as bf, type MakeOfferIntentParams as bg, Medialane1155ABI as bh, MedialaneApiError as bi, MedialaneClient as bj, type MedialaneConfig as bk, MedialaneError as bl, type MedialaneErrorCode as bm, type MintEditionParams as bn, type MintTicketsParams as bo, OPEN_LICENSES as bp, type OfferItem as bq, type OpenLicense as br, type Order as bs, type OrderDetails as bt, type OrderParameters as bu, type OrderStatus as bv, POPCollectionABI as bw, POPFactoryABI as bx, type ParsedAdminHeaders as by, type PopBatchEligibilityItem as bz, type ActivityType as c, buildFeeCall as c0, buildLaunchOnEkuboCalls as c1, buildOrderTypedData as c2, buybackQuoteRaw as c3, toRaw as c4, createAdminSessionGrant as c5, encodeAdminHeaders as c6, encodeByteArray as c7, fdvHuman as c8, getCounter as c9, getCounter1155 as ca, getCreatorCoinPrice as cb, getOrderDetails as cc, getOrderDetails1155 as cd, getSiwsStorageKey as ce, getStoredSiwsToken as cf, isSiwsTokenValid as cg, normalizeSiwsSignature as ch, parseAdminHeaders as ci, parseCreatorCoinCreated as cj, randomNonce as ck, requestSiwsToken as cl, resolveConfig as cm, resolveFeeConfig as cn, sessionKeyHashOf as co, signAdminRequest as cp, storeSiwsToken as cq, teamCoinsRaw as cr, validateName as cs, validateSupply as ct, validateSymbol as cu, verifyAdminRequestSig as cv, type AddSupplyParams as d, type AdminGrant as e, type AdminRequest as f, type AdminRequestSig as g, type AdminSession as h, type AdminSessionTypedDataInput as i, type ApiActivitiesQuery as j, type ApiActivity as k, type ApiActivityPrice as l, type ApiAdminCollectionClaim as m, type ApiAppSource as n, type ApiChain as o, ApiClient as p, type ApiCoin as q, type ApiCoinsQuery as r, type ApiCollection as s, type ApiCollectionClaim as t, type ApiCollectionProfile as u, type ApiCollectionSlugClaim as v, type ApiCollectionsQuery as w, type ApiComment as x, type ApiCounterOffersQuery as y, type ApiCreatorListResult as z };
|