@medialane/sdk 0.36.0 → 0.38.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/README.md +18 -6
- package/dist/index.cjs +248 -133
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +207 -125
- package/dist/index.d.ts +207 -125
- package/dist/index.js +246 -132
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,82 +1,41 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Call, AccountInterface, constants, TypedData, ProviderInterface } from 'starknet';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
declare const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
readonly address: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7";
|
|
40
|
-
readonly decimals: 18;
|
|
41
|
-
readonly listable: true;
|
|
42
|
-
}, {
|
|
43
|
-
readonly symbol: "STRK";
|
|
44
|
-
readonly address: "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d";
|
|
45
|
-
readonly decimals: 18;
|
|
46
|
-
readonly listable: true;
|
|
47
|
-
}, {
|
|
48
|
-
readonly symbol: "WBTC";
|
|
49
|
-
readonly address: "0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac";
|
|
50
|
-
readonly decimals: 8;
|
|
51
|
-
readonly listable: true;
|
|
52
|
-
}];
|
|
53
|
-
type SupportedTokenSymbol = (typeof SUPPORTED_TOKENS)[number]["symbol"];
|
|
54
|
-
declare const SUPPORTED_NETWORKS: readonly ["mainnet"];
|
|
55
|
-
type Network = (typeof SUPPORTED_NETWORKS)[number];
|
|
56
|
-
declare const DEFAULT_RPC_URL = "https://rpc.starknet.lava.build";
|
|
57
|
-
declare const POP_COLLECTION_CLASS_HASH_MAINNET = "0x077c421686f10851872561953ea16898d933364b7f8937a5d7e2b1ba0a36263f";
|
|
58
|
-
declare const DROP_COLLECTION_CLASS_HASH_MAINNET = "0x00092e72cdb63067521e803aaf7d4101c3e3ce026ae6bc045ec4228027e58282";
|
|
59
|
-
/** IPCollectionFactory v0.3.0 (deployed mainnet 2026-06-10): sequential on-chain
|
|
60
|
-
* edition ids, ownerless/immutable. New collections deploy from here. */
|
|
61
|
-
declare const COLLECTION_1155_CONTRACT_MAINNET = "0x0083543c3ee15040a419fc539fa6889f5b956e7d071bcfa97842cb0ae42ad6cc";
|
|
62
|
-
/** Class hash of the IPCollectionFactory v0.3.0 implementation. */
|
|
63
|
-
declare const COLLECTION_1155_FACTORY_CLASS_HASH_MAINNET = "0x331a69da8655a882ba1fbcb55188b8fa09116521db901bbbaafc9fead0689f8";
|
|
64
|
-
/** Class hash of the IPCollection ERC-1155 v0.3.0 implementation. */
|
|
65
|
-
declare const COLLECTION_1155_CLASS_HASH_MAINNET = "0x4e110b59af240ae6c7742999964c4eae13fb2ed935c47fe97653ec017ebea34";
|
|
66
|
-
/** First mainnet block of the v0.3.0 ERC-1155 factory deployment. */
|
|
67
|
-
declare const COLLECTION_1155_START_BLOCK_MAINNET = 10665319;
|
|
68
|
-
/** Creator Coin Factory — entrypoint: create_creator_coin + launch_on_ekubo. */
|
|
69
|
-
declare const CREATOR_COIN_FACTORY_CONTRACT_MAINNET = "0x50fa807b5274079fb19374673d7bab6d2dc3af7e1032ea43eb6e44bcbde4c3c";
|
|
70
|
-
/** EkuboLauncher — permanently holds (locks) each Creator Coin's LP position. */
|
|
71
|
-
declare const CREATOR_COIN_EKUBO_LAUNCHER_MAINNET = "0x4f7fceb5ac10f12f9544a09580592e5bdf1b7f04f48765eecf12286d8ccb7b4";
|
|
72
|
-
/** Class hash of the per-coin CreatorCoin ERC-20 the Factory deploys. */
|
|
73
|
-
declare const CREATOR_COIN_CLASS_HASH_MAINNET = "0x743e4c8a5b96bb83bbf4af04edbbb482d5ece89eed9b729a79fb7df0cd0b6b6";
|
|
74
|
-
/** Class hash of the Creator Coin Factory. */
|
|
75
|
-
declare const CREATOR_COIN_FACTORY_CLASS_HASH_MAINNET = "0x51765926b1344c9a20b8cd4b5abe7b7d47375ae97cf6804db3ea5d4b05a9b55";
|
|
76
|
-
/** First mainnet block of the Factory deployment. */
|
|
77
|
-
declare const CREATOR_COIN_START_BLOCK_MAINNET = 10474544;
|
|
78
|
-
/** Ekubo Core (Starknet mainnet) — Creator Coin pools live here; read spot price via `get_pool_price`. */
|
|
79
|
-
declare const EKUBO_CORE_MAINNET = "0x00000005dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b";
|
|
4
|
+
/** Mirrors the backend Prisma `Chain` enum. */
|
|
5
|
+
declare const CHAINS: readonly ["STARKNET", "ETHEREUM", "SOLANA", "BASE", "BITCOIN"];
|
|
6
|
+
type Chain = (typeof CHAINS)[number];
|
|
7
|
+
/** Per-chain on-chain coordinates of Medialane services + venues. All fields
|
|
8
|
+
* optional because not every service exists on every chain. */
|
|
9
|
+
interface ChainCoordinates {
|
|
10
|
+
rpcUrl: string;
|
|
11
|
+
marketplace721?: string;
|
|
12
|
+
marketplace721ClassHash?: string;
|
|
13
|
+
marketplace721StartBlock?: number;
|
|
14
|
+
marketplace1155?: string;
|
|
15
|
+
marketplace1155ClassHash?: string;
|
|
16
|
+
marketplace1155StartBlock?: number;
|
|
17
|
+
collection721?: string;
|
|
18
|
+
collection721StartBlock?: number;
|
|
19
|
+
ipNftClassHash?: string;
|
|
20
|
+
ipCollectionClassHash?: string;
|
|
21
|
+
collection1155?: string;
|
|
22
|
+
collection1155FactoryClassHash?: string;
|
|
23
|
+
collection1155ClassHash?: string;
|
|
24
|
+
collection1155StartBlock?: number;
|
|
25
|
+
popFactory?: string;
|
|
26
|
+
popCollectionClassHash?: string;
|
|
27
|
+
dropFactory?: string;
|
|
28
|
+
dropCollectionClassHash?: string;
|
|
29
|
+
nftComments?: string;
|
|
30
|
+
creatorCoinFactory?: string;
|
|
31
|
+
creatorCoinEkuboLauncher?: string;
|
|
32
|
+
creatorCoinClassHash?: string;
|
|
33
|
+
creatorCoinFactoryClassHash?: string;
|
|
34
|
+
creatorCoinStartBlock?: number;
|
|
35
|
+
ekuboCore?: string;
|
|
36
|
+
}
|
|
37
|
+
declare function getCoordinates(chain: Chain): ChainCoordinates;
|
|
38
|
+
declare const DEFAULT_CHAIN: Chain;
|
|
80
39
|
|
|
81
40
|
interface RetryOptions {
|
|
82
41
|
maxAttempts?: number;
|
|
@@ -127,7 +86,7 @@ interface BuildFeeCallParams {
|
|
|
127
86
|
declare function buildFeeCall(p: BuildFeeCallParams, cfg: ResolvedFeeConfig): Call | null;
|
|
128
87
|
|
|
129
88
|
declare const MedialaneConfigSchema: z.ZodObject<{
|
|
130
|
-
|
|
89
|
+
chain: z.ZodDefault<z.ZodEnum<["STARKNET", "ETHEREUM", "SOLANA", "BASE", "BITCOIN"]>>;
|
|
131
90
|
rpcUrl: z.ZodOptional<z.ZodString>;
|
|
132
91
|
backendUrl: z.ZodOptional<z.ZodString>;
|
|
133
92
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
@@ -167,7 +126,7 @@ declare const MedialaneConfigSchema: z.ZodObject<{
|
|
|
167
126
|
launchpadBps?: number | undefined;
|
|
168
127
|
}>>;
|
|
169
128
|
}, "strip", z.ZodTypeAny, {
|
|
170
|
-
|
|
129
|
+
chain: "STARKNET" | "ETHEREUM" | "SOLANA" | "BASE" | "BITCOIN";
|
|
171
130
|
rpcUrl?: string | undefined;
|
|
172
131
|
backendUrl?: string | undefined;
|
|
173
132
|
apiKey?: string | undefined;
|
|
@@ -189,8 +148,8 @@ declare const MedialaneConfigSchema: z.ZodObject<{
|
|
|
189
148
|
fundAddress?: string | undefined;
|
|
190
149
|
} | undefined;
|
|
191
150
|
}, {
|
|
192
|
-
network?: "mainnet" | undefined;
|
|
193
151
|
rpcUrl?: string | undefined;
|
|
152
|
+
chain?: "STARKNET" | "ETHEREUM" | "SOLANA" | "BASE" | "BITCOIN" | undefined;
|
|
194
153
|
backendUrl?: string | undefined;
|
|
195
154
|
apiKey?: string | undefined;
|
|
196
155
|
marketplace721Contract?: string | undefined;
|
|
@@ -213,7 +172,7 @@ declare const MedialaneConfigSchema: z.ZodObject<{
|
|
|
213
172
|
}>;
|
|
214
173
|
type MedialaneConfig = z.input<typeof MedialaneConfigSchema>;
|
|
215
174
|
interface ResolvedConfig {
|
|
216
|
-
|
|
175
|
+
chain: Chain;
|
|
217
176
|
rpcUrl: string;
|
|
218
177
|
backendUrl: string | undefined;
|
|
219
178
|
apiKey: string | undefined;
|
|
@@ -487,11 +446,11 @@ interface ServiceDefinition {
|
|
|
487
446
|
description: string;
|
|
488
447
|
standard: "ERC721" | "ERC1155" | "ERC20" | "UNKNOWN";
|
|
489
448
|
provenance: "MEDIALANE" | "EXTERNAL";
|
|
490
|
-
onchain?: {
|
|
449
|
+
onchain?: Partial<Record<Chain, {
|
|
491
450
|
factoryAddress?: string;
|
|
492
451
|
classHash?: string;
|
|
493
452
|
startBlock?: number;
|
|
494
|
-
}
|
|
453
|
+
}>>;
|
|
495
454
|
/** Drives the dapp asset/collection page variant. */
|
|
496
455
|
uiVariant: string;
|
|
497
456
|
capabilities: ServiceCapability[];
|
|
@@ -707,8 +666,9 @@ interface ApiCollection {
|
|
|
707
666
|
owner: string | null;
|
|
708
667
|
startBlock: string;
|
|
709
668
|
metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
|
|
710
|
-
/** Token standard detected via ERC-165.
|
|
711
|
-
|
|
669
|
+
/** Token standard detected via ERC-165. Collection is NFT-only since the
|
|
670
|
+
* 2026-06-14 coin split — fungible coins are `ApiCoin`, served by getCoins(). */
|
|
671
|
+
standard: "ERC721" | "ERC1155";
|
|
712
672
|
isKnown: boolean;
|
|
713
673
|
/** Hidden by ops/admin (content moderation). When true, list endpoints
|
|
714
674
|
* already filter the row out; single-collection fetches still return
|
|
@@ -728,6 +688,35 @@ interface ApiCollection {
|
|
|
728
688
|
createdAt: string;
|
|
729
689
|
updatedAt: string;
|
|
730
690
|
}
|
|
691
|
+
/** A fungible coin (ERC-20 today; SPL/etc. later). Distinct from ApiCollection:
|
|
692
|
+
* a coin has a supply + decimals + a market price (read live from Ekubo), no
|
|
693
|
+
* tokens, no orders. Served by getCoins()/getCoin() (spec 2026-06-14). */
|
|
694
|
+
interface ApiCoin {
|
|
695
|
+
id: string;
|
|
696
|
+
chain: string;
|
|
697
|
+
contractAddress: string;
|
|
698
|
+
standard: "ERC20";
|
|
699
|
+
/** "creator-coin" | "external-erc20" */
|
|
700
|
+
service: string;
|
|
701
|
+
name: string | null;
|
|
702
|
+
symbol: string | null;
|
|
703
|
+
decimals: number;
|
|
704
|
+
/** Fungible supply as a decimal string — NOT an item count. */
|
|
705
|
+
totalSupply: string | null;
|
|
706
|
+
description: string | null;
|
|
707
|
+
image: string | null;
|
|
708
|
+
creator: string | null;
|
|
709
|
+
startBlock: string;
|
|
710
|
+
isHidden: boolean;
|
|
711
|
+
createdAt: string;
|
|
712
|
+
updatedAt: string;
|
|
713
|
+
}
|
|
714
|
+
interface ApiCoinsQuery {
|
|
715
|
+
page?: number;
|
|
716
|
+
limit?: number;
|
|
717
|
+
/** Filter by coin service id ("creator-coin" | "external-erc20"). */
|
|
718
|
+
service?: string;
|
|
719
|
+
}
|
|
731
720
|
interface ApiActivityPrice {
|
|
732
721
|
raw: string | null;
|
|
733
722
|
formatted: string | null;
|
|
@@ -1162,9 +1151,12 @@ declare class MedialaneApiError extends Error {
|
|
|
1162
1151
|
}
|
|
1163
1152
|
declare class ApiClient {
|
|
1164
1153
|
private readonly baseUrl;
|
|
1154
|
+
private readonly chain;
|
|
1165
1155
|
private readonly baseHeaders;
|
|
1166
1156
|
private readonly retryOptions;
|
|
1167
|
-
constructor(baseUrl: string, apiKey?: string, retryOptions?: RetryOptions);
|
|
1157
|
+
constructor(baseUrl: string, apiKey?: string, retryOptions?: RetryOptions, chain?: Chain);
|
|
1158
|
+
/** Normalize an address for this client's chain (chain-scoped — Decision B). */
|
|
1159
|
+
private addr;
|
|
1168
1160
|
private request;
|
|
1169
1161
|
private get;
|
|
1170
1162
|
private post;
|
|
@@ -1371,6 +1363,10 @@ declare class ApiClient {
|
|
|
1371
1363
|
}): Promise<ApiResponse<ApiCollection[]>>;
|
|
1372
1364
|
getPopEligibility(collection: string, wallet: string): Promise<PopClaimStatus>;
|
|
1373
1365
|
getPopEligibilityBatch(collection: string, wallets: string[]): Promise<PopBatchEligibilityItem[]>;
|
|
1366
|
+
getCoins(opts?: ApiCoinsQuery): Promise<ApiResponse<ApiCoin[]>>;
|
|
1367
|
+
getCoin(contract: string): Promise<{
|
|
1368
|
+
data: ApiCoin;
|
|
1369
|
+
}>;
|
|
1374
1370
|
getDropCollections(opts?: {
|
|
1375
1371
|
page?: number;
|
|
1376
1372
|
limit?: number;
|
|
@@ -1719,11 +1715,85 @@ declare class MedialaneClient {
|
|
|
1719
1715
|
};
|
|
1720
1716
|
private readonly config;
|
|
1721
1717
|
constructor(rawConfig?: MedialaneConfig);
|
|
1722
|
-
get
|
|
1718
|
+
get chain(): "STARKNET" | "ETHEREUM" | "SOLANA" | "BASE" | "BITCOIN";
|
|
1723
1719
|
get rpcUrl(): string;
|
|
1724
1720
|
get marketplaceContract(): string;
|
|
1725
1721
|
}
|
|
1726
1722
|
|
|
1723
|
+
/** Medialane721 marketplace venue — immutable, ownerless (redesign, deployed 2026-05-31). */
|
|
1724
|
+
declare const MARKETPLACE_721_CONTRACT_MAINNET: string;
|
|
1725
|
+
/** Class hash of the Medialane721 venue. */
|
|
1726
|
+
declare const MARKETPLACE_721_CLASS_HASH_MAINNET: string;
|
|
1727
|
+
/** First mainnet block for the Medialane721 venue deployment. */
|
|
1728
|
+
declare const MARKETPLACE_721_START_BLOCK_MAINNET: number;
|
|
1729
|
+
/** Medialane1155 marketplace venue — immutable, ownerless (redesign, deployed 2026-05-31). */
|
|
1730
|
+
declare const MARKETPLACE_1155_CONTRACT_MAINNET: string;
|
|
1731
|
+
/** Class hash of the Medialane1155 venue. */
|
|
1732
|
+
declare const MARKETPLACE_1155_CLASS_HASH_MAINNET: string;
|
|
1733
|
+
/** First mainnet block for the Medialane1155 venue deployment. */
|
|
1734
|
+
declare const MARKETPLACE_1155_START_BLOCK_MAINNET: number;
|
|
1735
|
+
declare const COLLECTION_721_CONTRACT_MAINNET: string;
|
|
1736
|
+
/** Class hash of the IPNft (per-collection ERC-721) implementation. */
|
|
1737
|
+
declare const IPNFT_CLASS_HASH_MAINNET: string;
|
|
1738
|
+
/** Class hash of the IPCollection registry. */
|
|
1739
|
+
declare const IPCOLLECTION_CLASS_HASH_MAINNET: string;
|
|
1740
|
+
/** First mainnet block for the current MIP IPCollection registry deployment. */
|
|
1741
|
+
declare const COLLECTION_721_START_BLOCK_MAINNET: number;
|
|
1742
|
+
declare const DROP_FACTORY_CONTRACT_MAINNET: string;
|
|
1743
|
+
declare const POP_FACTORY_CONTRACT_MAINNET: string;
|
|
1744
|
+
/** NFTComments on-chain comment system — immutable, no admin key. */
|
|
1745
|
+
declare const NFTCOMMENTS_CONTRACT_MAINNET: string;
|
|
1746
|
+
declare const SUPPORTED_TOKENS: readonly [{
|
|
1747
|
+
readonly symbol: "USDC";
|
|
1748
|
+
readonly address: "0x033068f6539f8e6e6b131e6b2b814e6c34a5224bc66947c47dab9dfee93b35fb";
|
|
1749
|
+
readonly decimals: 6;
|
|
1750
|
+
readonly listable: true;
|
|
1751
|
+
}, {
|
|
1752
|
+
readonly symbol: "USDT";
|
|
1753
|
+
readonly address: "0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8";
|
|
1754
|
+
readonly decimals: 6;
|
|
1755
|
+
readonly listable: true;
|
|
1756
|
+
}, {
|
|
1757
|
+
readonly symbol: "ETH";
|
|
1758
|
+
readonly address: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7";
|
|
1759
|
+
readonly decimals: 18;
|
|
1760
|
+
readonly listable: true;
|
|
1761
|
+
}, {
|
|
1762
|
+
readonly symbol: "STRK";
|
|
1763
|
+
readonly address: "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d";
|
|
1764
|
+
readonly decimals: 18;
|
|
1765
|
+
readonly listable: true;
|
|
1766
|
+
}, {
|
|
1767
|
+
readonly symbol: "WBTC";
|
|
1768
|
+
readonly address: "0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac";
|
|
1769
|
+
readonly decimals: 8;
|
|
1770
|
+
readonly listable: true;
|
|
1771
|
+
}];
|
|
1772
|
+
type SupportedTokenSymbol = (typeof SUPPORTED_TOKENS)[number]["symbol"];
|
|
1773
|
+
declare const POP_COLLECTION_CLASS_HASH_MAINNET: string;
|
|
1774
|
+
declare const DROP_COLLECTION_CLASS_HASH_MAINNET: string;
|
|
1775
|
+
/** IPCollectionFactory v0.3.0 (deployed mainnet 2026-06-10): sequential on-chain
|
|
1776
|
+
* edition ids, ownerless/immutable. New collections deploy from here. */
|
|
1777
|
+
declare const COLLECTION_1155_CONTRACT_MAINNET: string;
|
|
1778
|
+
/** Class hash of the IPCollectionFactory v0.3.0 implementation. */
|
|
1779
|
+
declare const COLLECTION_1155_FACTORY_CLASS_HASH_MAINNET: string;
|
|
1780
|
+
/** Class hash of the IPCollection ERC-1155 v0.3.0 implementation. */
|
|
1781
|
+
declare const COLLECTION_1155_CLASS_HASH_MAINNET: string;
|
|
1782
|
+
/** First mainnet block of the v0.3.0 ERC-1155 factory deployment. */
|
|
1783
|
+
declare const COLLECTION_1155_START_BLOCK_MAINNET: number;
|
|
1784
|
+
/** Creator Coin Factory — entrypoint: create_creator_coin + launch_on_ekubo. */
|
|
1785
|
+
declare const CREATOR_COIN_FACTORY_CONTRACT_MAINNET: string;
|
|
1786
|
+
/** EkuboLauncher — permanently holds (locks) each Creator Coin's LP position. */
|
|
1787
|
+
declare const CREATOR_COIN_EKUBO_LAUNCHER_MAINNET: string;
|
|
1788
|
+
/** Class hash of the per-coin CreatorCoin ERC-20 the Factory deploys. */
|
|
1789
|
+
declare const CREATOR_COIN_CLASS_HASH_MAINNET: string;
|
|
1790
|
+
/** Class hash of the Creator Coin Factory. */
|
|
1791
|
+
declare const CREATOR_COIN_FACTORY_CLASS_HASH_MAINNET: string;
|
|
1792
|
+
/** First mainnet block of the Factory deployment. */
|
|
1793
|
+
declare const CREATOR_COIN_START_BLOCK_MAINNET: number;
|
|
1794
|
+
/** Ekubo Core (Starknet mainnet) — Creator Coin pools live here; read spot price via `get_pool_price`. */
|
|
1795
|
+
declare const EKUBO_CORE_MAINNET: string;
|
|
1796
|
+
|
|
1727
1797
|
declare const IPMarketplaceABI: readonly [{
|
|
1728
1798
|
readonly type: "impl";
|
|
1729
1799
|
readonly name: "Medialane721Impl";
|
|
@@ -5531,10 +5601,11 @@ declare function fdvHuman(supplyHuman: number): number;
|
|
|
5531
5601
|
/**
|
|
5532
5602
|
* The Medialane service registry (05-service-model §II, §VI).
|
|
5533
5603
|
* Canonical long-form IDs (01-core-model §III). SDK-resident in v1;
|
|
5534
|
-
* on-chain registry
|
|
5604
|
+
* on-chain registry later (08-dao-governance §IV).
|
|
5535
5605
|
*
|
|
5536
|
-
*
|
|
5537
|
-
*
|
|
5606
|
+
* `onchain` is keyed per chain (spec 2026-06-13 §3.1, Decision A): the SDK
|
|
5607
|
+
* registry is the single source of a service's coordinates on each chain.
|
|
5608
|
+
* Only STARKNET is populated today; adding a chain adds a key here.
|
|
5538
5609
|
*
|
|
5539
5610
|
* Phase 2B.2 of the service-model refactor. `ip-erc721` has no dedicated
|
|
5540
5611
|
* on-chain constant in src/constants.ts, so its `onchain` is omitted rather
|
|
@@ -5548,8 +5619,10 @@ declare const SERVICES: {
|
|
|
5548
5619
|
readonly standard: "ERC721";
|
|
5549
5620
|
readonly provenance: "MEDIALANE";
|
|
5550
5621
|
readonly onchain: {
|
|
5551
|
-
readonly
|
|
5552
|
-
|
|
5622
|
+
readonly STARKNET: {
|
|
5623
|
+
readonly factoryAddress: string;
|
|
5624
|
+
readonly startBlock: number;
|
|
5625
|
+
};
|
|
5553
5626
|
};
|
|
5554
5627
|
readonly uiVariant: "standard";
|
|
5555
5628
|
readonly capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"];
|
|
@@ -5580,9 +5653,11 @@ declare const SERVICES: {
|
|
|
5580
5653
|
readonly standard: "ERC1155";
|
|
5581
5654
|
readonly provenance: "MEDIALANE";
|
|
5582
5655
|
readonly onchain: {
|
|
5583
|
-
readonly
|
|
5584
|
-
|
|
5585
|
-
|
|
5656
|
+
readonly STARKNET: {
|
|
5657
|
+
readonly factoryAddress: string;
|
|
5658
|
+
readonly classHash: string;
|
|
5659
|
+
readonly startBlock: number;
|
|
5660
|
+
};
|
|
5586
5661
|
};
|
|
5587
5662
|
readonly uiVariant: "edition";
|
|
5588
5663
|
readonly capabilities: ["list", "buy", "make_offer", "cancel", "transfer", "mint", "remix", "license"];
|
|
@@ -5601,8 +5676,10 @@ declare const SERVICES: {
|
|
|
5601
5676
|
readonly standard: "ERC721";
|
|
5602
5677
|
readonly provenance: "MEDIALANE";
|
|
5603
5678
|
readonly onchain: {
|
|
5604
|
-
readonly
|
|
5605
|
-
|
|
5679
|
+
readonly STARKNET: {
|
|
5680
|
+
readonly factoryAddress: string;
|
|
5681
|
+
readonly classHash: string;
|
|
5682
|
+
};
|
|
5606
5683
|
};
|
|
5607
5684
|
readonly uiVariant: "pop";
|
|
5608
5685
|
readonly capabilities: ["claim", "transfer"];
|
|
@@ -5625,8 +5702,10 @@ declare const SERVICES: {
|
|
|
5625
5702
|
readonly standard: "ERC721";
|
|
5626
5703
|
readonly provenance: "MEDIALANE";
|
|
5627
5704
|
readonly onchain: {
|
|
5628
|
-
readonly
|
|
5629
|
-
|
|
5705
|
+
readonly STARKNET: {
|
|
5706
|
+
readonly factoryAddress: string;
|
|
5707
|
+
readonly classHash: string;
|
|
5708
|
+
};
|
|
5630
5709
|
};
|
|
5631
5710
|
readonly uiVariant: "drop";
|
|
5632
5711
|
readonly capabilities: ["claim", "list", "buy", "make_offer", "cancel", "transfer"];
|
|
@@ -5649,9 +5728,11 @@ declare const SERVICES: {
|
|
|
5649
5728
|
readonly standard: "ERC20";
|
|
5650
5729
|
readonly provenance: "MEDIALANE";
|
|
5651
5730
|
readonly onchain: {
|
|
5652
|
-
readonly
|
|
5653
|
-
|
|
5654
|
-
|
|
5731
|
+
readonly STARKNET: {
|
|
5732
|
+
readonly factoryAddress: string;
|
|
5733
|
+
readonly classHash: string;
|
|
5734
|
+
readonly startBlock: number;
|
|
5735
|
+
};
|
|
5655
5736
|
};
|
|
5656
5737
|
readonly uiVariant: "coin";
|
|
5657
5738
|
readonly capabilities: ["launch", "swap", "transfer"];
|
|
@@ -5670,9 +5751,11 @@ declare const SERVICES: {
|
|
|
5670
5751
|
readonly standard: "ERC721";
|
|
5671
5752
|
readonly provenance: "MEDIALANE";
|
|
5672
5753
|
readonly onchain: {
|
|
5673
|
-
readonly
|
|
5674
|
-
|
|
5675
|
-
|
|
5754
|
+
readonly STARKNET: {
|
|
5755
|
+
readonly factoryAddress: string;
|
|
5756
|
+
readonly classHash: string;
|
|
5757
|
+
readonly startBlock: number;
|
|
5758
|
+
};
|
|
5676
5759
|
};
|
|
5677
5760
|
readonly uiVariant: "standard";
|
|
5678
5761
|
readonly capabilities: ["list", "buy", "make_offer", "cancel"];
|
|
@@ -5694,9 +5777,11 @@ declare const SERVICES: {
|
|
|
5694
5777
|
readonly standard: "ERC1155";
|
|
5695
5778
|
readonly provenance: "MEDIALANE";
|
|
5696
5779
|
readonly onchain: {
|
|
5697
|
-
readonly
|
|
5698
|
-
|
|
5699
|
-
|
|
5780
|
+
readonly STARKNET: {
|
|
5781
|
+
readonly factoryAddress: string;
|
|
5782
|
+
readonly classHash: string;
|
|
5783
|
+
readonly startBlock: number;
|
|
5784
|
+
};
|
|
5700
5785
|
};
|
|
5701
5786
|
readonly uiVariant: "edition";
|
|
5702
5787
|
readonly capabilities: ["list", "buy", "make_offer", "cancel"];
|
|
@@ -5760,28 +5845,25 @@ declare function listServices(): ServiceDefinition[];
|
|
|
5760
5845
|
declare function getServicesByCapability(cap: ServiceCapability): ServiceDefinition[];
|
|
5761
5846
|
|
|
5762
5847
|
/**
|
|
5763
|
-
* Normalize
|
|
5764
|
-
*
|
|
5765
|
-
* input throws `Invalid Starknet address: "<input>"`.
|
|
5766
|
-
*
|
|
5767
|
-
* The single source of truth for address normalization across Medialane.
|
|
5848
|
+
* Normalize an address to its chain's canonical form. The single source of
|
|
5849
|
+
* address normalization across Medialane (07-identity §I; spec 2026-06-13 §3.2).
|
|
5768
5850
|
* `medialane-backend` re-exports this; do not maintain a parallel copy.
|
|
5769
|
-
*/
|
|
5770
|
-
declare function normalizeAddress(address: string): string;
|
|
5771
|
-
/**
|
|
5772
|
-
* Normalize a Starknet felt/hash (tx hash, order hash, etc.) to a 0x-prefixed
|
|
5773
|
-
* 64-character lowercase hex string. Same shape as `normalizeAddress` — kept
|
|
5774
|
-
* as a separate name so the *intent* of each call site is explicit.
|
|
5775
5851
|
*
|
|
5776
|
-
*
|
|
5777
|
-
*
|
|
5778
|
-
*
|
|
5852
|
+
* - STARKNET: 0x-prefixed 64-char lowercase hex (felt, zero-padded).
|
|
5853
|
+
* - ETHEREUM / BASE: EIP-55 mixed-case checksum.
|
|
5854
|
+
* - SOLANA: base58, validated as a 32-byte public key, returned verbatim.
|
|
5855
|
+
* - BITCOIN: not implemented — a non-foreclosed seam, gated on a future
|
|
5856
|
+
* Bitcoin fork (chain-sovereignty §2); never a built path today.
|
|
5779
5857
|
*/
|
|
5780
|
-
declare function
|
|
5858
|
+
declare function normalizeAddress(chain: Chain, address: string): string;
|
|
5781
5859
|
/**
|
|
5782
|
-
*
|
|
5860
|
+
* Normalize a felt/hash (tx hash, order hash) to 0x-prefixed 64-char lowercase
|
|
5861
|
+
* hex. Starknet-shaped; chain-scoped at call sites that handle other chains'
|
|
5862
|
+
* hashes.
|
|
5783
5863
|
*/
|
|
5784
|
-
declare function
|
|
5864
|
+
declare function normalizeHash(hash: string): string;
|
|
5865
|
+
/** Shorten an address to "0x1234...abcd" form, normalized for its chain. */
|
|
5866
|
+
declare function shortenAddress(chain: Chain, address: string, chars?: number): string;
|
|
5785
5867
|
|
|
5786
5868
|
type SupportedToken = (typeof SUPPORTED_TOKENS)[number];
|
|
5787
5869
|
/**
|
|
@@ -5900,4 +5982,4 @@ declare function build1155OrderTypedData(message: Record<string, unknown>, chain
|
|
|
5900
5982
|
declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5901
5983
|
declare function build1155CancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
5902
5984
|
|
|
5903
|
-
export { type ActivityType, type AddSupplyParams, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, type ApiAppSource, type ApiChain, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionSlugClaim, type ApiCollectionsQuery, type ApiComment, type ApiCounterOffersQuery, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiPublicRemix, type ApiRemixOffer, type ApiRemixOfferPrice, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenBalance, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWalletType, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, COLLECTION_1155_CLASS_HASH_MAINNET, COLLECTION_1155_CONTRACT_MAINNET, COLLECTION_1155_FACTORY_CLASS_HASH_MAINNET, COLLECTION_1155_START_BLOCK_MAINNET, COLLECTION_721_CONTRACT_MAINNET, COLLECTION_721_START_BLOCK_MAINNET, CREATOR_COIN_CLASS_HASH_MAINNET, CREATOR_COIN_EKUBO_LAUNCHER_MAINNET, CREATOR_COIN_FACTORY_CLASS_HASH_MAINNET, CREATOR_COIN_FACTORY_CONTRACT_MAINNET, CREATOR_COIN_START_BLOCK_MAINNET, type CancelOrder1155Params, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type ClaimConditions, CollectionRegistryABI, type CollectionSort, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateCreatorCoinParams, type CreateDropParams, type CreateListing1155Params, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreatePopCollectionParams, type CreateRemixOfferParams, type CreateWebhookParams, CreatorCoinFactoryABI, type CreatorCoinPrice, type CreatorCoinReceiptLike, CreatorCoinService,
|
|
5985
|
+
export { type ActivityType, type AddSupplyParams, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, type ApiAppSource, type ApiChain, ApiClient, type ApiCoin, type ApiCoinsQuery, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionSlugClaim, type ApiCollectionsQuery, type ApiComment, type ApiCounterOffersQuery, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiPublicRemix, type ApiRemixOffer, type ApiRemixOfferPrice, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenBalance, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWalletType, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, type BatchMintEditionParams, type BuildFeeCallParams, CHAINS, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, COLLECTION_1155_CLASS_HASH_MAINNET, COLLECTION_1155_CONTRACT_MAINNET, COLLECTION_1155_FACTORY_CLASS_HASH_MAINNET, COLLECTION_1155_START_BLOCK_MAINNET, COLLECTION_721_CONTRACT_MAINNET, COLLECTION_721_START_BLOCK_MAINNET, CREATOR_COIN_CLASS_HASH_MAINNET, CREATOR_COIN_EKUBO_LAUNCHER_MAINNET, CREATOR_COIN_FACTORY_CLASS_HASH_MAINNET, CREATOR_COIN_FACTORY_CONTRACT_MAINNET, CREATOR_COIN_START_BLOCK_MAINNET, type CancelOrder1155Params, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type Chain, type ChainCoordinates, type ClaimConditions, CollectionRegistryABI, type CollectionSort, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateCreatorCoinParams, type CreateDropParams, type CreateListing1155Params, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreatePopCollectionParams, type CreateRemixOfferParams, type CreateWebhookParams, CreatorCoinFactoryABI, type CreatorCoinPrice, type CreatorCoinReceiptLike, CreatorCoinService, DEFAULT_CHAIN, DROP_COLLECTION_CLASS_HASH_MAINNET, DROP_FACTORY_CONTRACT_MAINNET, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, type DropMintStatus, DropService, EKUBO_CORE_MAINNET, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EnforcementDeclaration, type FailoverFetchOptions, type FeeConfig, FeeConfigSchema, type FeeSurface, type FulfillOrder1155Params, type FulfillOrderIntentParams, type FulfillOrderParams, IPCOLLECTION_CLASS_HASH_MAINNET, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPMarketplaceABI, IPNFT_CLASS_HASH_MAINNET, IPNftABI, type IPType, type IntentCall, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, LAUNCH_PRICE_QUOTE_PER_COIN, MARKETPLACE_1155_CLASS_HASH_MAINNET, MARKETPLACE_1155_CONTRACT_MAINNET, MARKETPLACE_1155_START_BLOCK_MAINNET, MARKETPLACE_721_CLASS_HASH_MAINNET, MARKETPLACE_721_CONTRACT_MAINNET, MARKETPLACE_721_START_BLOCK_MAINNET, type MakeOffer1155Params, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, Medialane1155ABI, Medialane1155Module, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintEditionParams, type MintParams, NFTCOMMENTS_CONTRACT_MAINNET, OPEN_LICENSES, type OfferItem, type OpenLicense, type Order, type OrderDetails, type OrderParameters, type OrderStatus, POPCollectionABI, POPFactoryABI, POP_COLLECTION_CLASS_HASH_MAINNET, POP_FACTORY_CONTRACT_MAINNET, PUBLIC_RPC_FALLBACKS, type PopBatchEligibilityItem, type PopClaimStatus, type PopEventType, PopService, type RemixOfferStatus, type ResolvedConfig, type ResolvedFeeConfig, type RetryOptions, SUPPORTED_TOKENS, type ServiceCapability, type ServiceDefinition, type ServiceEventDeclaration, type ServiceId, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, VALIDATED_EKUBO_PARAMS, type WebhookEventType, type WebhookStatus, build1155CancellationTypedData, build1155OrderTypedData, buildCancellationTypedData, buildCreateCreatorCoinCall, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, createFailoverFetch, encodeByteArray, fdvHuman, formatAmount, getCoordinates, getCreatorCoinPrice, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, isServiceId, isTransientRpcError, listServices, normalizeAddress, normalizeHash, parseAmount, parseCreatorCoinCreated, resolveConfig, resolveFeeConfig, shortenAddress, stringifyBigInts, teamCoinsRaw, u256ToBigInt, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol };
|