@medialane/sdk 0.198.0 → 0.200.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 +86 -41
- package/dist/chains-CmwjZVU7.d.cts +85 -0
- package/dist/chains-CmwjZVU7.d.ts +85 -0
- package/dist/chunk-3HPMEDYH.cjs +967 -0
- package/dist/chunk-3HPMEDYH.cjs.map +1 -0
- package/dist/{chunk-3ME5YKTW.js → chunk-5KY6P434.js} +2 -2
- package/dist/chunk-5KY6P434.js.map +1 -0
- package/dist/chunk-F7W6IWTL.js +660 -0
- package/dist/chunk-F7W6IWTL.js.map +1 -0
- package/dist/chunk-GIBIHGSV.js +916 -0
- package/dist/chunk-GIBIHGSV.js.map +1 -0
- package/dist/chunk-GV4A2WNO.js +444 -0
- package/dist/chunk-GV4A2WNO.js.map +1 -0
- package/dist/{chunk-7EYJC5CB.cjs → chunk-H2NJB3AK.cjs} +2 -2
- package/dist/chunk-H2NJB3AK.cjs.map +1 -0
- package/dist/chunk-KGAGWULG.js +932 -0
- package/dist/chunk-KGAGWULG.js.map +1 -0
- package/dist/chunk-MEJ47LC3.cjs +463 -0
- package/dist/chunk-MEJ47LC3.cjs.map +1 -0
- package/dist/chunk-W76AZ5WC.cjs +376 -0
- package/dist/chunk-W76AZ5WC.cjs.map +1 -0
- package/dist/chunk-WRBXQPRL.js +323 -0
- package/dist/chunk-WRBXQPRL.js.map +1 -0
- package/dist/chunk-ZLMIHQWM.cjs +975 -0
- package/dist/chunk-ZLMIHQWM.cjs.map +1 -0
- package/dist/chunk-ZVANOWIB.cjs +688 -0
- package/dist/chunk-ZVANOWIB.cjs.map +1 -0
- package/dist/contract/index.cjs +88 -261
- package/dist/contract/index.cjs.map +1 -1
- package/dist/contract/index.d.cts +139 -4
- package/dist/contract/index.d.ts +139 -4
- package/dist/contract/index.js +4 -220
- package/dist/contract/index.js.map +1 -1
- package/dist/evm/index.cjs +3 -3
- package/dist/evm/index.d.cts +2 -1
- package/dist/evm/index.d.ts +2 -1
- package/dist/evm/index.js +1 -1
- package/dist/fetch-Cx9Pr7-B.d.cts +3 -0
- package/dist/fetch-Cx9Pr7-B.d.ts +3 -0
- package/dist/index.cjs +177 -833
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +54 -132
- package/dist/index.d.ts +54 -132
- package/dist/index.js +6 -659
- package/dist/index.js.map +1 -1
- package/dist/passkey-errors-B0HGcjPc.d.ts +981 -0
- package/dist/passkey-errors-yndCFeHv.d.cts +981 -0
- package/dist/provisioning-CwRkCN8D.d.cts +14 -0
- package/dist/provisioning-CwRkCN8D.d.ts +14 -0
- package/dist/{provisioning-BUYiU8Tr.d.ts → responses-D3nBY71f.d.cts} +40 -48
- package/dist/{provisioning-BUYiU8Tr.d.cts → responses-D3nBY71f.d.ts} +40 -48
- package/dist/server/index.cjs +117 -0
- package/dist/server/index.cjs.map +1 -0
- package/dist/server/index.d.cts +98 -0
- package/dist/server/index.d.ts +98 -0
- package/dist/server/index.js +4 -0
- package/dist/server/index.js.map +1 -0
- package/dist/services-B15RJBSW.d.cts +728 -0
- package/dist/services-BAnTJhwt.d.ts +728 -0
- package/dist/solana/index.cjs +2 -2
- package/dist/solana/index.d.cts +2 -1
- package/dist/solana/index.d.ts +2 -1
- package/dist/solana/index.js +1 -1
- package/dist/starknet/index.cjs +898 -1729
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +98 -467
- package/dist/starknet/index.d.ts +98 -467
- package/dist/starknet/index.js +704 -1680
- package/dist/starknet/index.js.map +1 -1
- package/dist/stellar/index.cjs +2 -2
- package/dist/stellar/index.d.cts +2 -1
- package/dist/stellar/index.d.ts +2 -1
- package/dist/stellar/index.js +1 -1
- package/dist/types-BW6ktwcT.d.ts +71 -0
- package/dist/types-BftPOVEJ.d.cts +71 -0
- package/dist/wallet/index.cjs +240 -0
- package/dist/wallet/index.cjs.map +1 -0
- package/dist/wallet/index.d.cts +319 -0
- package/dist/wallet/index.d.ts +319 -0
- package/dist/wallet/index.js +7 -0
- package/dist/wallet/index.js.map +1 -0
- package/package.json +13 -2
- package/dist/chunk-2R7XBA34.cjs +0 -1938
- package/dist/chunk-2R7XBA34.cjs.map +0 -1
- package/dist/chunk-3ME5YKTW.js.map +0 -1
- package/dist/chunk-6WVUUBFI.js +0 -1853
- package/dist/chunk-6WVUUBFI.js.map +0 -1
- package/dist/chunk-7EYJC5CB.cjs.map +0 -1
- package/dist/errors-CZm-NZK0.d.cts +0 -1754
- package/dist/errors-h6H6cj3Q.d.ts +0 -1754
- package/dist/types-DC4jNPAF.d.cts +0 -153
- package/dist/types-DC4jNPAF.d.ts +0 -153
package/README.md
CHANGED
|
@@ -90,7 +90,7 @@ const signer = {
|
|
|
90
90
|
execute: async (calls) => ({ txHash: (await account.execute(calls)).transaction_hash }),
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
const
|
|
93
|
+
const intent = await client.api.intents.create("listing", {
|
|
94
94
|
offerer: account.address,
|
|
95
95
|
nftContract: "0x...",
|
|
96
96
|
tokenId: "42",
|
|
@@ -102,30 +102,61 @@ const { data: intent } = await client.api.createListingIntent({
|
|
|
102
102
|
const { txHash } = await executeIntent(signer, client, intent);
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
The same
|
|
105
|
+
The same call takes every other kind: `"offer"`, `"fulfill"`, `"cancel"`, `"mint"`, `"create-collection"`, `"create-coin"`, the sponsorship kinds and the rest of `INTENT_KINDS` from `@medialane/sdk/contract`. The params are typed by kind. `client.api.intents.checkout(...)` prepares several purchases at once.
|
|
106
106
|
|
|
107
|
-
###
|
|
107
|
+
### Calls without the backend
|
|
108
108
|
|
|
109
|
-
Launchpad
|
|
109
|
+
The calls each Launchpad service sends are plain functions that return `Call` values, so any account or agent can run them directly, with no backend in between:
|
|
110
110
|
|
|
111
|
-
|
|
|
111
|
+
| Builder | What it builds |
|
|
112
112
|
|---|---|
|
|
113
|
-
| `
|
|
114
|
-
| `
|
|
115
|
-
| `
|
|
116
|
-
| `
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
113
|
+
| `popCalls`, `popFactoryCalls` | Proof of participation badges: create, claim, issue, burn |
|
|
114
|
+
| `dropCalls`, `buildDropClaimCalls` | Timed collection drops, including the priced claim with the platform fee |
|
|
115
|
+
| `editionCalls` | Limited editions collections |
|
|
116
|
+
| `buildCreateCreatorCoinCall`, `buildLaunchOnEkuboCalls` | Creator coins with a public trading pool |
|
|
117
|
+
| `ticketCalls` | IP Tickets |
|
|
118
|
+
| `clubCalls` | IP Club memberships |
|
|
119
|
+
| `sponsorshipCalls` | IP Sponsorship |
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
import { ticketCalls, getStarknetCoordinates } from "@medialane/sdk/starknet";
|
|
123
|
+
|
|
124
|
+
const call = ticketCalls.deployCollection(getStarknetCoordinates("STARKNET").ipTicketsFactory, {
|
|
125
|
+
name: "Launch party", symbol: "LP", baseUri: "ipfs://...",
|
|
126
|
+
});
|
|
127
|
+
await account.execute([call]);
|
|
128
|
+
```
|
|
120
129
|
|
|
121
130
|
---
|
|
122
131
|
|
|
123
132
|
## REST API
|
|
124
133
|
|
|
134
|
+
`client.api` is grouped by domain: `orders`, `tokens`, `collections`, `activity`, `search`, `intents`, `metadata`, `creators`, `account`, `portal` (with `portal.funding`), `business`, `remix`, `coins`, `drops`, `sponsorship`, `rewards`, `platform` and `chainReads`.
|
|
135
|
+
|
|
136
|
+
The domain methods follow one set of rules:
|
|
137
|
+
|
|
138
|
+
- A single resource comes back as the resource itself. A list comes back as `{ data, meta }`, with `meta` carrying the page.
|
|
139
|
+
- `get` throws `MedialaneApiError` when the resource is missing. `find` returns `null`.
|
|
140
|
+
- Authentication belongs to the client, not to each call: `client.api.withBearer(token)` returns a client that sends `Authorization: Bearer <token>` (a function is read on every request).
|
|
141
|
+
- Every intent goes through one call, typed by kind: `client.api.intents.create("listing", params)`. The kinds, and the path each one posts to, are `INTENT_KINDS` and `intentPath` in `@medialane/sdk/contract`.
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
const page = await client.api.orders.list({ status: "ACTIVE" });
|
|
145
|
+
const order = await client.api.orders.get("0x...");
|
|
146
|
+
const drop = await client.api.drops.find(contract);
|
|
147
|
+
|
|
148
|
+
const account = client.api.withBearer(siwsToken);
|
|
149
|
+
await account.creators.updateProfile(address, { displayName: "Ada" });
|
|
150
|
+
|
|
151
|
+
const intent = await client.api.intents.create("pop-claim", { claimer, collection, proof });
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
`ApiClient` takes an options object: `new ApiClient({ baseUrl, apiKey, bearer, retry, chain, fetch })`.
|
|
155
|
+
|
|
125
156
|
### Query Orders
|
|
126
157
|
|
|
127
158
|
```typescript
|
|
128
|
-
const orders = await client.api.
|
|
159
|
+
const orders = await client.api.orders.list({
|
|
129
160
|
status: "ACTIVE",
|
|
130
161
|
sort: "price_asc",
|
|
131
162
|
currency: "0x033068...", // USDC address
|
|
@@ -133,17 +164,17 @@ const orders = await client.api.getOrders({
|
|
|
133
164
|
limit: 20,
|
|
134
165
|
});
|
|
135
166
|
|
|
136
|
-
const order = await client.api.
|
|
137
|
-
const tokenOrders = await client.api.
|
|
138
|
-
const userOrders = await client.api.
|
|
167
|
+
const order = await client.api.orders.get("0x...");
|
|
168
|
+
const tokenOrders = await client.api.orders.forToken(contract, tokenId);
|
|
169
|
+
const userOrders = await client.api.orders.byUser(address);
|
|
139
170
|
```
|
|
140
171
|
|
|
141
172
|
### Query Tokens
|
|
142
173
|
|
|
143
174
|
```typescript
|
|
144
|
-
const token = await client.api.
|
|
145
|
-
const tokens = await client.api.
|
|
146
|
-
const history = await client.api.
|
|
175
|
+
const token = await client.api.tokens.get(contract, tokenId);
|
|
176
|
+
const tokens = await client.api.tokens.ownedBy(address);
|
|
177
|
+
const history = await client.api.tokens.history(contract, tokenId);
|
|
147
178
|
```
|
|
148
179
|
|
|
149
180
|
### ERC-1155 Ownership
|
|
@@ -153,7 +184,7 @@ For ERC-1155 tokens, a single token ID can be held by many wallets simultaneousl
|
|
|
153
184
|
```typescript
|
|
154
185
|
import type { ApiTokenBalance } from "@medialane/sdk";
|
|
155
186
|
|
|
156
|
-
const
|
|
187
|
+
const token = await client.api.tokens.get(contract, tokenId);
|
|
157
188
|
|
|
158
189
|
// Check if a wallet owns any quantity of this token
|
|
159
190
|
const isOwner = token.balances?.some(
|
|
@@ -176,16 +207,16 @@ token.balances?.forEach((b: ApiTokenBalance) => {
|
|
|
176
207
|
|
|
177
208
|
```typescript
|
|
178
209
|
// All collections: newest first by default
|
|
179
|
-
const collections = await client.api.
|
|
210
|
+
const collections = await client.api.collections.list();
|
|
180
211
|
|
|
181
212
|
// Filter, sort and paginate in one query
|
|
182
|
-
const byVolume = await client.api.
|
|
183
|
-
const featured = await client.api.
|
|
184
|
-
const myDrops = await client.api.
|
|
213
|
+
const byVolume = await client.api.collections.list({ page: 1, limit: 20, sort: "volume" });
|
|
214
|
+
const featured = await client.api.collections.list({ limit: 18, isFeatured: true, sort: "recent" });
|
|
215
|
+
const myDrops = await client.api.drops.list({ organizer: "0x..." });
|
|
185
216
|
|
|
186
217
|
// Sort options: "recent" | "supply" | "floor" | "volume" | "name"
|
|
187
|
-
const collection = await client.api.
|
|
188
|
-
const tokens = await client.api.
|
|
218
|
+
const collection = await client.api.collections.get(contract);
|
|
219
|
+
const tokens = await client.api.collections.tokens(contract);
|
|
189
220
|
```
|
|
190
221
|
|
|
191
222
|
### Search
|
|
@@ -200,19 +231,19 @@ const results = await client.api.search("landscape painting", 10);
|
|
|
200
231
|
### Activities
|
|
201
232
|
|
|
202
233
|
```typescript
|
|
203
|
-
const feed = await client.api.
|
|
204
|
-
const userFeed = await client.api.
|
|
234
|
+
const feed = await client.api.activity.list({ type: "sale", page: 1 });
|
|
235
|
+
const userFeed = await client.api.activity.byAddress(address);
|
|
205
236
|
```
|
|
206
237
|
|
|
207
238
|
### Upload Metadata to IPFS
|
|
208
239
|
|
|
209
240
|
```typescript
|
|
210
241
|
// Upload a file
|
|
211
|
-
const fileResult = await client.api.uploadFile(imageFile);
|
|
242
|
+
const fileResult = await client.api.metadata.uploadFile(imageFile);
|
|
212
243
|
// fileResult.data.url → "ipfs://..."
|
|
213
244
|
|
|
214
245
|
// Upload metadata JSON
|
|
215
|
-
const metaResult = await client.api.
|
|
246
|
+
const metaResult = await client.api.metadata.upload({
|
|
216
247
|
name: "My Work",
|
|
217
248
|
description: "...",
|
|
218
249
|
image: "ipfs://...",
|
|
@@ -233,7 +264,7 @@ const metaResult = await client.api.uploadMetadata({
|
|
|
233
264
|
```typescript
|
|
234
265
|
import type { IpAttribute, IpNftMetadata, ApiTokenMetadata } from "@medialane/sdk";
|
|
235
266
|
|
|
236
|
-
// Single OpenSea
|
|
267
|
+
// Single OpenSea attribute (the value is a string, number or boolean)
|
|
237
268
|
const attr: IpAttribute = { trait_type: "License", value: "CC BY-NC-SA" };
|
|
238
269
|
|
|
239
270
|
// Full IPFS metadata shape for a Medialane IP NFT
|
|
@@ -256,12 +287,11 @@ const metadata: IpNftMetadata = {
|
|
|
256
287
|
],
|
|
257
288
|
};
|
|
258
289
|
|
|
259
|
-
// Token from the API:
|
|
260
|
-
const token = await client.api.
|
|
261
|
-
token.
|
|
262
|
-
token.
|
|
263
|
-
token.
|
|
264
|
-
token.data.metadata.attributes; // IpAttribute[] | null
|
|
290
|
+
// Token from the API: the indexed fields, and every attribute as the creator set it
|
|
291
|
+
const token = await client.api.tokens.get(contract, tokenId);
|
|
292
|
+
token.metadata.licenseType; // "CC BY-NC-SA" | null
|
|
293
|
+
token.metadata.commercialUse; // boolean | null
|
|
294
|
+
token.metadata.attributes; // IpAttribute[] | null, the rest of the license terms are here
|
|
265
295
|
```
|
|
266
296
|
|
|
267
297
|
---
|
|
@@ -321,14 +351,16 @@ try {
|
|
|
321
351
|
|
|
322
352
|
// REST API errors
|
|
323
353
|
try {
|
|
324
|
-
await client.api.
|
|
354
|
+
await client.api.orders.list();
|
|
325
355
|
} catch (err) {
|
|
326
356
|
if (err instanceof MedialaneApiError) {
|
|
327
|
-
console.error(`API ${err.status}:`, err.message);
|
|
357
|
+
console.error(`API ${err.status} ${err.code}:`, err.message, err.serverCode);
|
|
328
358
|
}
|
|
329
359
|
}
|
|
330
360
|
```
|
|
331
361
|
|
|
362
|
+
`MedialaneApiError` extends `MedialaneError`, so one `instanceof MedialaneError` check covers both. `err.code` comes from the status (a 404 names the resource: `ORDER_NOT_FOUND`, `TOKEN_NOT_FOUND`, `COLLECTION_NOT_FOUND`, `INTENT_NOT_FOUND`, otherwise `NOT_FOUND`). `err.serverCode` is the machine code the API put in the response body, when it sent one.
|
|
363
|
+
|
|
332
364
|
### Showing an error to a user
|
|
333
365
|
|
|
334
366
|
Three types carry text written for someone to read. Everything else is machinery, and the
|
|
@@ -374,10 +406,8 @@ without reaching a reader.
|
|
|
374
406
|
| `backendUrl` | `string` | (none) | Medialane API base URL (required for `.api.*`) |
|
|
375
407
|
| `apiKey` | `string` | (none) | API key from [Medialane Portal](https://portal.medialane.io) |
|
|
376
408
|
| `marketplace721Contract` | `string` | Mainnet default | ERC-721 marketplace protocol override |
|
|
377
|
-
| `marketplaceContract` | `string` | Mainnet default | Legacy alias for `marketplace721Contract` |
|
|
378
409
|
| `marketplace1155Contract` | `string` | Mainnet default | ERC-1155 marketplace protocol override |
|
|
379
410
|
| `collection721Contract` | `string` | Mainnet default | ERC-721 mint / collection registry override |
|
|
380
|
-
| `collectionContract` | `string` | Mainnet default | Legacy alias for `collection721Contract` |
|
|
381
411
|
| `collection1155Contract` | `string` | Mainnet default | ERC-1155 mint / collection factory override |
|
|
382
412
|
|
|
383
413
|
---
|
|
@@ -411,6 +441,21 @@ Built with:
|
|
|
411
441
|
- **Zod**: runtime config validation
|
|
412
442
|
- Peer dep: `starknet >= 6.0.0`
|
|
413
443
|
|
|
444
|
+
`bun run typecheck` checks the sources and the test files.
|
|
445
|
+
|
|
446
|
+
### Entry points
|
|
447
|
+
|
|
448
|
+
| Import | Contents | Loads a chain library |
|
|
449
|
+
|---|---|---|
|
|
450
|
+
| `@medialane/sdk` | client, config, registry, routes, uploads, types | no |
|
|
451
|
+
| `@medialane/sdk/contract` | request and response schemas shared with the API | no |
|
|
452
|
+
| `@medialane/sdk/server` | gateway, image proxy, SSRF guard, session tokens | no |
|
|
453
|
+
| `@medialane/sdk/starknet` | call builders, signing, readers, ABIs, services | `starknet` |
|
|
454
|
+
| `@medialane/sdk/wallet` | passkey, media wallet, deployment, signers | `starknet` |
|
|
455
|
+
| `@medialane/sdk/evm`, `/solana`, `/stellar` | venue and issuance adapters | `viem`, `@solana/web3.js`, `@stellar/stellar-sdk` |
|
|
456
|
+
|
|
457
|
+
The server exports are still re-exported from `@medialane/sdk`, and the wallet exports from `@medialane/sdk/starknet`.
|
|
458
|
+
|
|
414
459
|
---
|
|
415
460
|
|
|
416
461
|
## Changelog
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
declare const CHAINS: readonly ["STARKNET", "ETHEREUM", "SOLANA", "BASE", "STELLAR", "BITCOIN"];
|
|
2
|
+
type Chain = (typeof CHAINS)[number];
|
|
3
|
+
interface StarknetCoordinates {
|
|
4
|
+
marketplace721: `0x${string}`;
|
|
5
|
+
marketplace721ClassHash: `0x${string}`;
|
|
6
|
+
marketplace721StartBlock: number;
|
|
7
|
+
marketplace1155: `0x${string}`;
|
|
8
|
+
marketplace1155ClassHash: `0x${string}`;
|
|
9
|
+
marketplace1155StartBlock: number;
|
|
10
|
+
collection721: `0x${string}`;
|
|
11
|
+
collection721StartBlock: number;
|
|
12
|
+
dataTokenization721: `0x${string}`;
|
|
13
|
+
dataTokenization721StartBlock: number;
|
|
14
|
+
ipNftClassHash: `0x${string}`;
|
|
15
|
+
ipCollectionClassHash: `0x${string}`;
|
|
16
|
+
collection1155: `0x${string}`;
|
|
17
|
+
collection1155FactoryClassHash: `0x${string}`;
|
|
18
|
+
collection1155ClassHash: `0x${string}`;
|
|
19
|
+
collection1155StartBlock: number;
|
|
20
|
+
popFactory: `0x${string}`;
|
|
21
|
+
popCollectionClassHash: `0x${string}`;
|
|
22
|
+
popFactoryStartBlock: number;
|
|
23
|
+
dropFactory: `0x${string}`;
|
|
24
|
+
dropCollectionClassHash: `0x${string}`;
|
|
25
|
+
dropFactoryStartBlock: number;
|
|
26
|
+
nftComments: `0x${string}`;
|
|
27
|
+
creatorCoinFactory: `0x${string}`;
|
|
28
|
+
creatorCoinEkuboLauncher: `0x${string}`;
|
|
29
|
+
creatorCoinClassHash: `0x${string}`;
|
|
30
|
+
creatorCoinFactoryClassHash: `0x${string}`;
|
|
31
|
+
creatorCoinStartBlock: number;
|
|
32
|
+
ekuboCore: `0x${string}`;
|
|
33
|
+
ipTicketsFactory: `0x${string}`;
|
|
34
|
+
ipTicketCollectionClassHash: `0x${string}`;
|
|
35
|
+
ipTicketsFactoryClassHash: `0x${string}`;
|
|
36
|
+
ipTicketsStartBlock: number;
|
|
37
|
+
ipClubFactory: `0x${string}`;
|
|
38
|
+
ipClubFactoryClassHash: `0x${string}`;
|
|
39
|
+
ipClubCollectionClassHash: `0x${string}`;
|
|
40
|
+
ipClubFactoryStartBlock: number;
|
|
41
|
+
ipSponsorship: `0x${string}`;
|
|
42
|
+
ipSponsorshipClassHash: `0x${string}`;
|
|
43
|
+
ipSponsorshipStartBlock: number;
|
|
44
|
+
mediaWalletClassHash: `0x${string}`;
|
|
45
|
+
genesisMint: `0x${string}`;
|
|
46
|
+
}
|
|
47
|
+
interface EvmCoordinates {
|
|
48
|
+
marketplace721?: `0x${string}`;
|
|
49
|
+
marketplace721StartBlock?: number;
|
|
50
|
+
marketplace1155?: `0x${string}`;
|
|
51
|
+
marketplace1155StartBlock?: number;
|
|
52
|
+
mipRegistry?: `0x${string}`;
|
|
53
|
+
mipRegistryStartBlock?: number;
|
|
54
|
+
mipEditionsRegistry?: `0x${string}`;
|
|
55
|
+
mipEditionsRegistryStartBlock?: number;
|
|
56
|
+
}
|
|
57
|
+
interface SolanaCoordinates {
|
|
58
|
+
mipCollectionsProgram?: string;
|
|
59
|
+
marketplaceProgram?: string;
|
|
60
|
+
startSlot?: number;
|
|
61
|
+
}
|
|
62
|
+
interface StellarCoordinates {
|
|
63
|
+
mipRegistry?: string;
|
|
64
|
+
marketplace?: string;
|
|
65
|
+
collectionWasmHash?: string;
|
|
66
|
+
startLedger?: number;
|
|
67
|
+
}
|
|
68
|
+
interface CoordinatesByChain {
|
|
69
|
+
STARKNET?: StarknetCoordinates;
|
|
70
|
+
ETHEREUM?: EvmCoordinates;
|
|
71
|
+
BASE?: EvmCoordinates;
|
|
72
|
+
SOLANA?: SolanaCoordinates;
|
|
73
|
+
STELLAR?: StellarCoordinates;
|
|
74
|
+
BITCOIN?: never;
|
|
75
|
+
}
|
|
76
|
+
type ChainCoordinates = StarknetCoordinates;
|
|
77
|
+
declare function getCoordinates(chain: "STARKNET"): StarknetCoordinates;
|
|
78
|
+
declare function getCoordinates(chain: "ETHEREUM" | "BASE"): EvmCoordinates;
|
|
79
|
+
declare function getCoordinates(chain: "SOLANA"): SolanaCoordinates;
|
|
80
|
+
declare function getCoordinates(chain: "STELLAR"): StellarCoordinates;
|
|
81
|
+
declare function getCoordinates(chain: Chain): StarknetCoordinates | EvmCoordinates | SolanaCoordinates | StellarCoordinates;
|
|
82
|
+
declare const DEFAULT_CHAIN: Chain;
|
|
83
|
+
declare function getStarknetCoordinates(chain: Chain): StarknetCoordinates;
|
|
84
|
+
|
|
85
|
+
export { type Chain as C, DEFAULT_CHAIN as D, type EvmCoordinates as E, type SolanaCoordinates as S, CHAINS as a, type ChainCoordinates as b, type CoordinatesByChain as c, type StarknetCoordinates as d, type StellarCoordinates as e, getStarknetCoordinates as f, getCoordinates as g };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
declare const CHAINS: readonly ["STARKNET", "ETHEREUM", "SOLANA", "BASE", "STELLAR", "BITCOIN"];
|
|
2
|
+
type Chain = (typeof CHAINS)[number];
|
|
3
|
+
interface StarknetCoordinates {
|
|
4
|
+
marketplace721: `0x${string}`;
|
|
5
|
+
marketplace721ClassHash: `0x${string}`;
|
|
6
|
+
marketplace721StartBlock: number;
|
|
7
|
+
marketplace1155: `0x${string}`;
|
|
8
|
+
marketplace1155ClassHash: `0x${string}`;
|
|
9
|
+
marketplace1155StartBlock: number;
|
|
10
|
+
collection721: `0x${string}`;
|
|
11
|
+
collection721StartBlock: number;
|
|
12
|
+
dataTokenization721: `0x${string}`;
|
|
13
|
+
dataTokenization721StartBlock: number;
|
|
14
|
+
ipNftClassHash: `0x${string}`;
|
|
15
|
+
ipCollectionClassHash: `0x${string}`;
|
|
16
|
+
collection1155: `0x${string}`;
|
|
17
|
+
collection1155FactoryClassHash: `0x${string}`;
|
|
18
|
+
collection1155ClassHash: `0x${string}`;
|
|
19
|
+
collection1155StartBlock: number;
|
|
20
|
+
popFactory: `0x${string}`;
|
|
21
|
+
popCollectionClassHash: `0x${string}`;
|
|
22
|
+
popFactoryStartBlock: number;
|
|
23
|
+
dropFactory: `0x${string}`;
|
|
24
|
+
dropCollectionClassHash: `0x${string}`;
|
|
25
|
+
dropFactoryStartBlock: number;
|
|
26
|
+
nftComments: `0x${string}`;
|
|
27
|
+
creatorCoinFactory: `0x${string}`;
|
|
28
|
+
creatorCoinEkuboLauncher: `0x${string}`;
|
|
29
|
+
creatorCoinClassHash: `0x${string}`;
|
|
30
|
+
creatorCoinFactoryClassHash: `0x${string}`;
|
|
31
|
+
creatorCoinStartBlock: number;
|
|
32
|
+
ekuboCore: `0x${string}`;
|
|
33
|
+
ipTicketsFactory: `0x${string}`;
|
|
34
|
+
ipTicketCollectionClassHash: `0x${string}`;
|
|
35
|
+
ipTicketsFactoryClassHash: `0x${string}`;
|
|
36
|
+
ipTicketsStartBlock: number;
|
|
37
|
+
ipClubFactory: `0x${string}`;
|
|
38
|
+
ipClubFactoryClassHash: `0x${string}`;
|
|
39
|
+
ipClubCollectionClassHash: `0x${string}`;
|
|
40
|
+
ipClubFactoryStartBlock: number;
|
|
41
|
+
ipSponsorship: `0x${string}`;
|
|
42
|
+
ipSponsorshipClassHash: `0x${string}`;
|
|
43
|
+
ipSponsorshipStartBlock: number;
|
|
44
|
+
mediaWalletClassHash: `0x${string}`;
|
|
45
|
+
genesisMint: `0x${string}`;
|
|
46
|
+
}
|
|
47
|
+
interface EvmCoordinates {
|
|
48
|
+
marketplace721?: `0x${string}`;
|
|
49
|
+
marketplace721StartBlock?: number;
|
|
50
|
+
marketplace1155?: `0x${string}`;
|
|
51
|
+
marketplace1155StartBlock?: number;
|
|
52
|
+
mipRegistry?: `0x${string}`;
|
|
53
|
+
mipRegistryStartBlock?: number;
|
|
54
|
+
mipEditionsRegistry?: `0x${string}`;
|
|
55
|
+
mipEditionsRegistryStartBlock?: number;
|
|
56
|
+
}
|
|
57
|
+
interface SolanaCoordinates {
|
|
58
|
+
mipCollectionsProgram?: string;
|
|
59
|
+
marketplaceProgram?: string;
|
|
60
|
+
startSlot?: number;
|
|
61
|
+
}
|
|
62
|
+
interface StellarCoordinates {
|
|
63
|
+
mipRegistry?: string;
|
|
64
|
+
marketplace?: string;
|
|
65
|
+
collectionWasmHash?: string;
|
|
66
|
+
startLedger?: number;
|
|
67
|
+
}
|
|
68
|
+
interface CoordinatesByChain {
|
|
69
|
+
STARKNET?: StarknetCoordinates;
|
|
70
|
+
ETHEREUM?: EvmCoordinates;
|
|
71
|
+
BASE?: EvmCoordinates;
|
|
72
|
+
SOLANA?: SolanaCoordinates;
|
|
73
|
+
STELLAR?: StellarCoordinates;
|
|
74
|
+
BITCOIN?: never;
|
|
75
|
+
}
|
|
76
|
+
type ChainCoordinates = StarknetCoordinates;
|
|
77
|
+
declare function getCoordinates(chain: "STARKNET"): StarknetCoordinates;
|
|
78
|
+
declare function getCoordinates(chain: "ETHEREUM" | "BASE"): EvmCoordinates;
|
|
79
|
+
declare function getCoordinates(chain: "SOLANA"): SolanaCoordinates;
|
|
80
|
+
declare function getCoordinates(chain: "STELLAR"): StellarCoordinates;
|
|
81
|
+
declare function getCoordinates(chain: Chain): StarknetCoordinates | EvmCoordinates | SolanaCoordinates | StellarCoordinates;
|
|
82
|
+
declare const DEFAULT_CHAIN: Chain;
|
|
83
|
+
declare function getStarknetCoordinates(chain: Chain): StarknetCoordinates;
|
|
84
|
+
|
|
85
|
+
export { type Chain as C, DEFAULT_CHAIN as D, type EvmCoordinates as E, type SolanaCoordinates as S, CHAINS as a, type ChainCoordinates as b, type CoordinatesByChain as c, type StarknetCoordinates as d, type StellarCoordinates as e, getStarknetCoordinates as f, getCoordinates as g };
|