@medialane/sdk 0.171.0 → 0.173.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.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkBC2L2H6A_cjs = require('./chunk-BC2L2H6A.cjs');
3
+ var chunkAAH6ZM7O_cjs = require('./chunk-AAH6ZM7O.cjs');
4
4
  var chunkVJVBWHAD_cjs = require('./chunk-VJVBWHAD.cjs');
5
5
  var hmac_js = require('@noble/hashes/hmac.js');
6
6
  var sha2_js = require('@noble/hashes/sha2.js');
@@ -112,65 +112,144 @@ function isSameOrigin(req) {
112
112
  }
113
113
  }
114
114
 
115
- // src/server/backend-proxy.ts
116
- function proxyError(code, message, status) {
117
- return Response.json({ jsonrpc: "2.0", error: { code, message }, id: null }, { status });
118
- }
115
+ // src/server/app-gateway.ts
116
+ var ACCOUNT_SESSION_COOKIE = "ml_account_session";
117
+ var SESSION_MAX_AGE_SECONDS = 30 * 24 * 60 * 60;
118
+ var SIGN_IN_PATHS = /* @__PURE__ */ new Set(["auth/email/register-account", "auth/email/verify-code", "auth/siws/verify"]);
119
+ var EDGE_CACHE_CONTROL = "public, s-maxage=30, stale-while-revalidate=120";
120
+ var DROPPED_REQUEST_HEADERS = /* @__PURE__ */ new Set([
121
+ "connection",
122
+ "keep-alive",
123
+ "proxy-authenticate",
124
+ "proxy-authorization",
125
+ "te",
126
+ "trailers",
127
+ "transfer-encoding",
128
+ "upgrade",
129
+ "host",
130
+ "content-length",
131
+ "accept-encoding",
132
+ "cookie",
133
+ "x-api-key",
134
+ "x-app-id",
135
+ "x-account-session",
136
+ "authorization"
137
+ ]);
138
+ var DROPPED_RESPONSE_HEADERS = /* @__PURE__ */ new Set([
139
+ "connection",
140
+ "keep-alive",
141
+ "transfer-encoding",
142
+ "content-length",
143
+ "content-encoding",
144
+ "set-cookie"
145
+ ]);
119
146
  function readCookie(req, name) {
120
147
  const raw = req.headers.get("cookie");
121
148
  if (!raw) return null;
122
149
  for (const part of raw.split(";")) {
123
150
  const eq = part.indexOf("=");
124
- if (eq === -1) continue;
125
- if (part.slice(0, eq).trim() === name) return part.slice(eq + 1).trim();
151
+ if (eq !== -1 && part.slice(0, eq).trim() === name) return part.slice(eq + 1).trim() || null;
126
152
  }
127
153
  return null;
128
154
  }
129
- function createBackendProxyHandler(config) {
155
+ function sessionCookie(value, maxAge = SESSION_MAX_AGE_SECONDS) {
156
+ const secure = process.env.NODE_ENV === "production" ? "; Secure" : "";
157
+ return `${ACCOUNT_SESSION_COOKIE}=${value}; Path=/; HttpOnly; SameSite=Lax; Max-Age=${maxAge}${secure}`;
158
+ }
159
+ function json(body, status) {
160
+ return Response.json(body, { status });
161
+ }
162
+ function createAppGateway(config) {
130
163
  const doFetch = config.fetchImpl ?? fetch;
131
- const endpoint2 = `${config.backendUrl.replace(/\/$/, "")}/${config.path.replace(/^\//, "")}`;
132
- return async function handleBackendProxy(req) {
133
- if (!isSameOrigin(req)) {
134
- return proxyError(-32600, "Cross-origin requests are not allowed", 403);
135
- }
136
- if (!config.apiKey) {
137
- return proxyError(-32003, "No API key configured \u2014 request not forwarded", 402);
138
- }
139
- let body;
140
- try {
141
- body = await req.json();
142
- } catch {
143
- return proxyError(-32700, "Parse error", 400);
144
- }
145
- const headers2 = { "Content-Type": "application/json", "x-api-key": config.apiKey };
146
- if (config.forwardCookie) {
147
- const value = readCookie(req, config.forwardCookie.name);
148
- if (value) headers2[config.forwardCookie.header] = value;
149
- }
150
- if (config.forwardAuthorization) {
151
- const authorization = req.headers.get("authorization");
152
- if (authorization) headers2.authorization = authorization;
164
+ const base = config.backendUrl.replace(/\/$/, "");
165
+ return async function appGateway(req, path) {
166
+ if (!isSameOrigin(req)) return json({ error: "Cross-origin requests are not allowed" }, 403);
167
+ if (!config.apiKey) return json({ error: "Service unavailable" }, 500);
168
+ if (path.some((s) => s === "." || s === ".." || s === "")) return json({ error: "Invalid path" }, 400);
169
+ const joined = path.join("/");
170
+ const method = req.method.toUpperCase();
171
+ if (!(config.allow[method] ?? []).some((re) => re.test(joined))) {
172
+ return json({ error: `Path not allowed: ${method} /v1/${joined}` }, 403);
153
173
  }
174
+ const headers2 = new Headers();
175
+ req.headers.forEach((v, k) => {
176
+ if (!DROPPED_REQUEST_HEADERS.has(k.toLowerCase())) headers2.set(k, v);
177
+ });
178
+ headers2.set("x-api-key", config.apiKey);
179
+ headers2.set("x-app-id", config.appId);
180
+ const session = readCookie(req, ACCOUNT_SESSION_COOKIE);
181
+ if (session) headers2.set("x-account-session", session);
182
+ const search = new URL(req.url).search;
183
+ const target = `${base}/v1/${path.map(encodeURIComponent).join("/")}${search}`;
184
+ const hasBody = method !== "GET" && method !== "HEAD";
185
+ let res;
154
186
  try {
155
- const upstream = await doFetch(endpoint2, {
156
- method: "POST",
187
+ res = await doFetch(target, {
188
+ method,
157
189
  headers: headers2,
158
- body: JSON.stringify(body)
190
+ body: hasBody ? await req.arrayBuffer() : void 0,
191
+ cache: "no-store",
192
+ redirect: "manual",
193
+ signal: AbortSignal.timeout(config.timeoutMs ?? 55e3)
159
194
  });
160
- const text = await upstream.text();
161
- return new Response(text, {
162
- status: upstream.status,
163
- headers: { "Content-Type": "application/json" }
164
- });
165
- } catch {
166
- return proxyError(-32603, "Backend unreachable", 502);
195
+ } catch (e) {
196
+ if (e instanceof DOMException && e.name === "TimeoutError") {
197
+ return json({ error: "The service took too long to respond" }, 504);
198
+ }
199
+ return json({ error: "Service unavailable" }, 502);
167
200
  }
201
+ const out = new Headers();
202
+ res.headers.forEach((v, k) => {
203
+ if (!DROPPED_RESPONSE_HEADERS.has(k.toLowerCase())) out.set(k, v);
204
+ });
205
+ if (method === "POST" && res.ok && SIGN_IN_PATHS.has(joined)) {
206
+ const text = await res.text();
207
+ let body = null;
208
+ try {
209
+ body = JSON.parse(text);
210
+ } catch {
211
+ body = null;
212
+ }
213
+ if (!body) return new Response(text, { status: res.status, headers: out });
214
+ const token = typeof body.accountToken === "string" ? body.accountToken : null;
215
+ delete body.accountToken;
216
+ delete body.token;
217
+ out.set("content-type", "application/json");
218
+ if (token) out.append("set-cookie", sessionCookie(token));
219
+ return new Response(JSON.stringify(body), { status: res.status, headers: out });
220
+ }
221
+ if (method === "GET" && res.ok && !session && (config.cacheableGets ?? []).some((re) => re.test(joined))) {
222
+ out.set("cache-control", EDGE_CACHE_CONTROL);
223
+ }
224
+ return new Response(res.body, { status: res.status, headers: out });
168
225
  };
169
226
  }
170
227
 
171
- // src/server/rpc-proxy.ts
172
- function createRpcProxyHandler(config) {
173
- return createBackendProxyHandler({ ...config, path: "/v1/rpc" });
228
+ // src/server/app-session.ts
229
+ function signedOut() {
230
+ const res = Response.json(null);
231
+ res.headers.append("set-cookie", sessionCookie("", 0));
232
+ return res;
233
+ }
234
+ function createAppSessionHandler(config) {
235
+ const doFetch = config.fetchImpl ?? fetch;
236
+ const base = config.backendUrl.replace(/\/$/, "");
237
+ return {
238
+ async GET(req) {
239
+ const session = readCookie(req, ACCOUNT_SESSION_COOKIE);
240
+ if (!session) return Response.json(null);
241
+ const res = await doFetch(`${base}/v1/users/me`, {
242
+ headers: { "x-api-key": config.apiKey ?? "", "x-app-id": config.appId, "x-account-session": session },
243
+ cache: "no-store"
244
+ });
245
+ if (res.status === 401 || res.status === 403) return signedOut();
246
+ if (!res.ok) return Response.json({ error: "Session check failed" }, { status: 502 });
247
+ return Response.json(await res.json());
248
+ },
249
+ async DELETE() {
250
+ return signedOut();
251
+ }
252
+ };
174
253
  }
175
254
 
176
255
  // src/server/ssrf-guard.ts
@@ -441,11 +520,11 @@ function endpoint(config, path) {
441
520
  function headers(config, extra) {
442
521
  return { "x-api-key": config.apiKey, ...extra };
443
522
  }
444
- async function uploadJsonToBackend(config, json) {
523
+ async function uploadJsonToBackend(config, json2) {
445
524
  const res = await (config.fetchImpl ?? fetch)(endpoint(config, "upload"), {
446
525
  method: "POST",
447
526
  headers: headers(config, { "Content-Type": "application/json" }),
448
- body: JSON.stringify(json)
527
+ body: JSON.stringify(json2)
449
528
  });
450
529
  const data = await res.json().catch(() => ({}));
451
530
  if (!res.ok || !data.data) throw new Error(data.error ?? "Metadata upload failed");
@@ -482,6 +561,73 @@ async function getBackendSignedUrl(config, kind = "image") {
482
561
  if (!res.ok || !data.data) throw new Error(data.error ?? "Failed to create upload URL");
483
562
  return data.data.url;
484
563
  }
564
+
565
+ // src/server/app-routes.ts
566
+ var SEG = "[^/]+";
567
+ var PUBLIC_ROUTES = {
568
+ GET: [
569
+ "orders",
570
+ `orders/${SEG}`,
571
+ `orders/token/${SEG}/${SEG}`,
572
+ `orders/user/${SEG}`,
573
+ `orders/received/${SEG}`,
574
+ "orders/counter-offers",
575
+ "tokens",
576
+ `tokens/owned/${SEG}`,
577
+ `tokens/${SEG}/${SEG}`,
578
+ `tokens/${SEG}/${SEG}/(history|comments|remixes)`,
579
+ "collections",
580
+ `collections/${SEG}`,
581
+ `collections/${SEG}/tokens`,
582
+ `collections/${SEG}/profile`,
583
+ "activities",
584
+ `activities/${SEG}`,
585
+ "search",
586
+ "metadata/resolve",
587
+ "creators",
588
+ `creators/${SEG}/profile`,
589
+ `creators/by-username/${SEG}`,
590
+ `creators/${SEG}/hidden`,
591
+ "coins",
592
+ "coins/prices",
593
+ "coins/claims",
594
+ `coins/${SEG}`,
595
+ `coins/${SEG}/guarantees`,
596
+ `pop/${SEG}/claim-info`,
597
+ "drops",
598
+ `drops/${SEG}`,
599
+ `drops/${SEG}/mints`,
600
+ "rewards",
601
+ "rewards/config",
602
+ "rewards/batch",
603
+ `rewards/${SEG}`,
604
+ `rewards/${SEG}/events`,
605
+ `club/${SEG}/${SEG}`,
606
+ `club/${SEG}/${SEG}/member/${SEG}`,
607
+ `tickets/${SEG}/${SEG}`,
608
+ `tickets/${SEG}/count`,
609
+ `ipnft/${SEG}/${SEG}`,
610
+ "stats",
611
+ "prices",
612
+ `remix-offers/${SEG}`,
613
+ "sponsorship/offers",
614
+ `sponsorship/offers/${SEG}`,
615
+ `sponsorship/offers/${SEG}/bids`,
616
+ "sponsorship/proposals",
617
+ `sponsorship/proposals/${SEG}`,
618
+ "sponsorship/licenses",
619
+ `sponsorship/licenses/${SEG}`,
620
+ "auth/email/exists"
621
+ ].map((p) => new RegExp(`^${p}$`)),
622
+ POST: [
623
+ "auth/email/(request-code|verify-code|register-account|confirm)",
624
+ "auth/siws/(nonce|verify)"
625
+ ].map((p) => new RegExp(`^${p}$`))
626
+ };
627
+ function isPublicAppRoute(method, path) {
628
+ if (path.split("/").some((s) => s === "." || s === ".." || s === "")) return false;
629
+ return (PUBLIC_ROUTES[method.toUpperCase()] ?? []).some((re) => re.test(path));
630
+ }
485
631
  var IDENTITY_PREFIX = "siws_";
486
632
  var ACCOUNT_SESSION_PREFIX = "account_session_";
487
633
  var IDENTITY_DOMAIN = "siws-identity-v1";
@@ -652,299 +798,299 @@ var MAX_IPFS_GATEWAY_RESPONSE_BYTES = 25 * 1024 * 1024;
652
798
 
653
799
  Object.defineProperty(exports, "ApiClient", {
654
800
  enumerable: true,
655
- get: function () { return chunkBC2L2H6A_cjs.ApiClient; }
801
+ get: function () { return chunkAAH6ZM7O_cjs.ApiClient; }
656
802
  });
657
803
  Object.defineProperty(exports, "DEFAULT_CURRENCY", {
658
804
  enumerable: true,
659
- get: function () { return chunkBC2L2H6A_cjs.DEFAULT_CURRENCY; }
805
+ get: function () { return chunkAAH6ZM7O_cjs.DEFAULT_CURRENCY; }
660
806
  });
661
807
  Object.defineProperty(exports, "FeeConfigSchema", {
662
808
  enumerable: true,
663
- get: function () { return chunkBC2L2H6A_cjs.FeeConfigSchema; }
809
+ get: function () { return chunkAAH6ZM7O_cjs.FeeConfigSchema; }
664
810
  });
665
811
  Object.defineProperty(exports, "MedialaneApiError", {
666
812
  enumerable: true,
667
- get: function () { return chunkBC2L2H6A_cjs.MedialaneApiError; }
813
+ get: function () { return chunkAAH6ZM7O_cjs.MedialaneApiError; }
668
814
  });
669
815
  Object.defineProperty(exports, "POLICY_REFUSAL_CODES", {
670
816
  enumerable: true,
671
- get: function () { return chunkBC2L2H6A_cjs.POLICY_REFUSAL_CODES; }
817
+ get: function () { return chunkAAH6ZM7O_cjs.POLICY_REFUSAL_CODES; }
672
818
  });
673
819
  Object.defineProperty(exports, "PasskeyCancelledError", {
674
820
  enumerable: true,
675
- get: function () { return chunkBC2L2H6A_cjs.PasskeyCancelledError; }
821
+ get: function () { return chunkAAH6ZM7O_cjs.PasskeyCancelledError; }
676
822
  });
677
823
  Object.defineProperty(exports, "PasskeyUnsupportedError", {
678
824
  enumerable: true,
679
- get: function () { return chunkBC2L2H6A_cjs.PasskeyUnsupportedError; }
825
+ get: function () { return chunkAAH6ZM7O_cjs.PasskeyUnsupportedError; }
680
826
  });
681
827
  Object.defineProperty(exports, "STARKNET_COLLECTION_1155_CLASS_HASH", {
682
828
  enumerable: true,
683
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_COLLECTION_1155_CLASS_HASH; }
829
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_COLLECTION_1155_CLASS_HASH; }
684
830
  });
685
831
  Object.defineProperty(exports, "STARKNET_COLLECTION_1155_CONTRACT", {
686
832
  enumerable: true,
687
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_COLLECTION_1155_CONTRACT; }
833
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_COLLECTION_1155_CONTRACT; }
688
834
  });
689
835
  Object.defineProperty(exports, "STARKNET_COLLECTION_1155_FACTORY_CLASS_HASH", {
690
836
  enumerable: true,
691
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_COLLECTION_1155_FACTORY_CLASS_HASH; }
837
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_COLLECTION_1155_FACTORY_CLASS_HASH; }
692
838
  });
693
839
  Object.defineProperty(exports, "STARKNET_COLLECTION_1155_START_BLOCK", {
694
840
  enumerable: true,
695
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_COLLECTION_1155_START_BLOCK; }
841
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_COLLECTION_1155_START_BLOCK; }
696
842
  });
697
843
  Object.defineProperty(exports, "STARKNET_COLLECTION_721_CONTRACT", {
698
844
  enumerable: true,
699
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_COLLECTION_721_CONTRACT; }
845
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_COLLECTION_721_CONTRACT; }
700
846
  });
701
847
  Object.defineProperty(exports, "STARKNET_COLLECTION_721_START_BLOCK", {
702
848
  enumerable: true,
703
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_COLLECTION_721_START_BLOCK; }
849
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_COLLECTION_721_START_BLOCK; }
704
850
  });
705
851
  Object.defineProperty(exports, "STARKNET_CREATOR_COIN_CLASS_HASH", {
706
852
  enumerable: true,
707
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_CREATOR_COIN_CLASS_HASH; }
853
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_CREATOR_COIN_CLASS_HASH; }
708
854
  });
709
855
  Object.defineProperty(exports, "STARKNET_CREATOR_COIN_EKUBO_LAUNCHER", {
710
856
  enumerable: true,
711
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_CREATOR_COIN_EKUBO_LAUNCHER; }
857
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_CREATOR_COIN_EKUBO_LAUNCHER; }
712
858
  });
713
859
  Object.defineProperty(exports, "STARKNET_CREATOR_COIN_FACTORY_CLASS_HASH", {
714
860
  enumerable: true,
715
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_CREATOR_COIN_FACTORY_CLASS_HASH; }
861
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_CREATOR_COIN_FACTORY_CLASS_HASH; }
716
862
  });
717
863
  Object.defineProperty(exports, "STARKNET_CREATOR_COIN_FACTORY_CONTRACT", {
718
864
  enumerable: true,
719
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_CREATOR_COIN_FACTORY_CONTRACT; }
865
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_CREATOR_COIN_FACTORY_CONTRACT; }
720
866
  });
721
867
  Object.defineProperty(exports, "STARKNET_CREATOR_COIN_START_BLOCK", {
722
868
  enumerable: true,
723
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_CREATOR_COIN_START_BLOCK; }
869
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_CREATOR_COIN_START_BLOCK; }
724
870
  });
725
871
  Object.defineProperty(exports, "STARKNET_DATA_TOKENIZATION_721_CONTRACT", {
726
872
  enumerable: true,
727
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_DATA_TOKENIZATION_721_CONTRACT; }
873
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_DATA_TOKENIZATION_721_CONTRACT; }
728
874
  });
729
875
  Object.defineProperty(exports, "STARKNET_DROP_COLLECTION_CLASS_HASH", {
730
876
  enumerable: true,
731
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_DROP_COLLECTION_CLASS_HASH; }
877
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_DROP_COLLECTION_CLASS_HASH; }
732
878
  });
733
879
  Object.defineProperty(exports, "STARKNET_DROP_FACTORY_CONTRACT", {
734
880
  enumerable: true,
735
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_DROP_FACTORY_CONTRACT; }
881
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_DROP_FACTORY_CONTRACT; }
736
882
  });
737
883
  Object.defineProperty(exports, "STARKNET_DROP_FACTORY_START_BLOCK", {
738
884
  enumerable: true,
739
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_DROP_FACTORY_START_BLOCK; }
885
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_DROP_FACTORY_START_BLOCK; }
740
886
  });
741
887
  Object.defineProperty(exports, "STARKNET_EKUBO_CORE", {
742
888
  enumerable: true,
743
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_EKUBO_CORE; }
889
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_EKUBO_CORE; }
744
890
  });
745
891
  Object.defineProperty(exports, "STARKNET_GENESIS_MINT_CONTRACT", {
746
892
  enumerable: true,
747
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_GENESIS_MINT_CONTRACT; }
893
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_GENESIS_MINT_CONTRACT; }
748
894
  });
749
895
  Object.defineProperty(exports, "STARKNET_GENESIS_NFT_URI", {
750
896
  enumerable: true,
751
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_GENESIS_NFT_URI; }
897
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_GENESIS_NFT_URI; }
752
898
  });
753
899
  Object.defineProperty(exports, "STARKNET_IPCOLLECTION_CLASS_HASH", {
754
900
  enumerable: true,
755
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_IPCOLLECTION_CLASS_HASH; }
901
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_IPCOLLECTION_CLASS_HASH; }
756
902
  });
757
903
  Object.defineProperty(exports, "STARKNET_IPNFT_CLASS_HASH", {
758
904
  enumerable: true,
759
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_IPNFT_CLASS_HASH; }
905
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_IPNFT_CLASS_HASH; }
760
906
  });
761
907
  Object.defineProperty(exports, "STARKNET_IP_CLUB_COLLECTION_CLASS_HASH", {
762
908
  enumerable: true,
763
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_IP_CLUB_COLLECTION_CLASS_HASH; }
909
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_IP_CLUB_COLLECTION_CLASS_HASH; }
764
910
  });
765
911
  Object.defineProperty(exports, "STARKNET_IP_CLUB_FACTORY_CONTRACT", {
766
912
  enumerable: true,
767
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_IP_CLUB_FACTORY_CONTRACT; }
913
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_IP_CLUB_FACTORY_CONTRACT; }
768
914
  });
769
915
  Object.defineProperty(exports, "STARKNET_IP_SPONSORSHIP_CLASS_HASH", {
770
916
  enumerable: true,
771
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_IP_SPONSORSHIP_CLASS_HASH; }
917
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_IP_SPONSORSHIP_CLASS_HASH; }
772
918
  });
773
919
  Object.defineProperty(exports, "STARKNET_IP_SPONSORSHIP_CONTRACT", {
774
920
  enumerable: true,
775
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_IP_SPONSORSHIP_CONTRACT; }
921
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_IP_SPONSORSHIP_CONTRACT; }
776
922
  });
777
923
  Object.defineProperty(exports, "STARKNET_IP_TICKETS_FACTORY_CONTRACT", {
778
924
  enumerable: true,
779
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_IP_TICKETS_FACTORY_CONTRACT; }
925
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_IP_TICKETS_FACTORY_CONTRACT; }
780
926
  });
781
927
  Object.defineProperty(exports, "STARKNET_IP_TICKET_COLLECTION_CLASS_HASH", {
782
928
  enumerable: true,
783
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_IP_TICKET_COLLECTION_CLASS_HASH; }
929
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_IP_TICKET_COLLECTION_CLASS_HASH; }
784
930
  });
785
931
  Object.defineProperty(exports, "STARKNET_MARKETPLACE_1155_CLASS_HASH", {
786
932
  enumerable: true,
787
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_MARKETPLACE_1155_CLASS_HASH; }
933
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_MARKETPLACE_1155_CLASS_HASH; }
788
934
  });
789
935
  Object.defineProperty(exports, "STARKNET_MARKETPLACE_1155_CONTRACT", {
790
936
  enumerable: true,
791
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_MARKETPLACE_1155_CONTRACT; }
937
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_MARKETPLACE_1155_CONTRACT; }
792
938
  });
793
939
  Object.defineProperty(exports, "STARKNET_MARKETPLACE_1155_START_BLOCK", {
794
940
  enumerable: true,
795
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_MARKETPLACE_1155_START_BLOCK; }
941
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_MARKETPLACE_1155_START_BLOCK; }
796
942
  });
797
943
  Object.defineProperty(exports, "STARKNET_MARKETPLACE_721_CLASS_HASH", {
798
944
  enumerable: true,
799
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_MARKETPLACE_721_CLASS_HASH; }
945
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_MARKETPLACE_721_CLASS_HASH; }
800
946
  });
801
947
  Object.defineProperty(exports, "STARKNET_MARKETPLACE_721_CONTRACT", {
802
948
  enumerable: true,
803
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_MARKETPLACE_721_CONTRACT; }
949
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_MARKETPLACE_721_CONTRACT; }
804
950
  });
805
951
  Object.defineProperty(exports, "STARKNET_MARKETPLACE_721_START_BLOCK", {
806
952
  enumerable: true,
807
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_MARKETPLACE_721_START_BLOCK; }
953
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_MARKETPLACE_721_START_BLOCK; }
808
954
  });
809
955
  Object.defineProperty(exports, "STARKNET_NFTCOMMENTS_CONTRACT", {
810
956
  enumerable: true,
811
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_NFTCOMMENTS_CONTRACT; }
957
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_NFTCOMMENTS_CONTRACT; }
812
958
  });
813
959
  Object.defineProperty(exports, "STARKNET_POP_COLLECTION_CLASS_HASH", {
814
960
  enumerable: true,
815
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_POP_COLLECTION_CLASS_HASH; }
961
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_POP_COLLECTION_CLASS_HASH; }
816
962
  });
817
963
  Object.defineProperty(exports, "STARKNET_POP_FACTORY_CONTRACT", {
818
964
  enumerable: true,
819
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_POP_FACTORY_CONTRACT; }
965
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_POP_FACTORY_CONTRACT; }
820
966
  });
821
967
  Object.defineProperty(exports, "STARKNET_POP_FACTORY_START_BLOCK", {
822
968
  enumerable: true,
823
- get: function () { return chunkBC2L2H6A_cjs.STARKNET_POP_FACTORY_START_BLOCK; }
969
+ get: function () { return chunkAAH6ZM7O_cjs.STARKNET_POP_FACTORY_START_BLOCK; }
824
970
  });
825
971
  Object.defineProperty(exports, "SUPPORTED_TOKENS", {
826
972
  enumerable: true,
827
- get: function () { return chunkBC2L2H6A_cjs.SUPPORTED_TOKENS; }
973
+ get: function () { return chunkAAH6ZM7O_cjs.SUPPORTED_TOKENS; }
828
974
  });
829
975
  Object.defineProperty(exports, "SUPPORTED_URL_CHAINS", {
830
976
  enumerable: true,
831
- get: function () { return chunkBC2L2H6A_cjs.SUPPORTED_URL_CHAINS; }
977
+ get: function () { return chunkAAH6ZM7O_cjs.SUPPORTED_URL_CHAINS; }
832
978
  });
833
979
  Object.defineProperty(exports, "UserFacingError", {
834
980
  enumerable: true,
835
- get: function () { return chunkBC2L2H6A_cjs.UserFacingError; }
981
+ get: function () { return chunkAAH6ZM7O_cjs.UserFacingError; }
836
982
  });
837
983
  Object.defineProperty(exports, "assetHref", {
838
984
  enumerable: true,
839
- get: function () { return chunkBC2L2H6A_cjs.assetHref; }
985
+ get: function () { return chunkAAH6ZM7O_cjs.assetHref; }
840
986
  });
841
987
  Object.defineProperty(exports, "chainFromSlug", {
842
988
  enumerable: true,
843
- get: function () { return chunkBC2L2H6A_cjs.chainFromSlug; }
989
+ get: function () { return chunkAAH6ZM7O_cjs.chainFromSlug; }
844
990
  });
845
991
  Object.defineProperty(exports, "chainSlug", {
846
992
  enumerable: true,
847
- get: function () { return chunkBC2L2H6A_cjs.chainSlug; }
993
+ get: function () { return chunkAAH6ZM7O_cjs.chainSlug; }
848
994
  });
849
995
  Object.defineProperty(exports, "coinHref", {
850
996
  enumerable: true,
851
- get: function () { return chunkBC2L2H6A_cjs.coinHref; }
997
+ get: function () { return chunkAAH6ZM7O_cjs.coinHref; }
852
998
  });
853
999
  Object.defineProperty(exports, "collectionHref", {
854
1000
  enumerable: true,
855
- get: function () { return chunkBC2L2H6A_cjs.collectionHref; }
1001
+ get: function () { return chunkAAH6ZM7O_cjs.collectionHref; }
856
1002
  });
857
1003
  Object.defineProperty(exports, "createFailoverFetch", {
858
1004
  enumerable: true,
859
- get: function () { return chunkBC2L2H6A_cjs.createFailoverFetch; }
1005
+ get: function () { return chunkAAH6ZM7O_cjs.createFailoverFetch; }
860
1006
  });
861
1007
  Object.defineProperty(exports, "dropHref", {
862
1008
  enumerable: true,
863
- get: function () { return chunkBC2L2H6A_cjs.dropHref; }
1009
+ get: function () { return chunkAAH6ZM7O_cjs.dropHref; }
864
1010
  });
865
1011
  Object.defineProperty(exports, "encodeU256", {
866
1012
  enumerable: true,
867
- get: function () { return chunkBC2L2H6A_cjs.encodeU256; }
1013
+ get: function () { return chunkAAH6ZM7O_cjs.encodeU256; }
868
1014
  });
869
1015
  Object.defineProperty(exports, "formatAmount", {
870
1016
  enumerable: true,
871
- get: function () { return chunkBC2L2H6A_cjs.formatAmount; }
1017
+ get: function () { return chunkAAH6ZM7O_cjs.formatAmount; }
872
1018
  });
873
1019
  Object.defineProperty(exports, "getListableTokens", {
874
1020
  enumerable: true,
875
- get: function () { return chunkBC2L2H6A_cjs.getListableTokens; }
1021
+ get: function () { return chunkAAH6ZM7O_cjs.getListableTokens; }
876
1022
  });
877
1023
  Object.defineProperty(exports, "getService", {
878
1024
  enumerable: true,
879
- get: function () { return chunkBC2L2H6A_cjs.getService; }
1025
+ get: function () { return chunkAAH6ZM7O_cjs.getService; }
880
1026
  });
881
1027
  Object.defineProperty(exports, "getServicesByCapability", {
882
1028
  enumerable: true,
883
- get: function () { return chunkBC2L2H6A_cjs.getServicesByCapability; }
1029
+ get: function () { return chunkAAH6ZM7O_cjs.getServicesByCapability; }
884
1030
  });
885
1031
  Object.defineProperty(exports, "getTokenByAddress", {
886
1032
  enumerable: true,
887
- get: function () { return chunkBC2L2H6A_cjs.getTokenByAddress; }
1033
+ get: function () { return chunkAAH6ZM7O_cjs.getTokenByAddress; }
888
1034
  });
889
1035
  Object.defineProperty(exports, "getTokenBySymbol", {
890
1036
  enumerable: true,
891
- get: function () { return chunkBC2L2H6A_cjs.getTokenBySymbol; }
1037
+ get: function () { return chunkAAH6ZM7O_cjs.getTokenBySymbol; }
892
1038
  });
893
1039
  Object.defineProperty(exports, "hasCapability", {
894
1040
  enumerable: true,
895
- get: function () { return chunkBC2L2H6A_cjs.hasCapability; }
1041
+ get: function () { return chunkAAH6ZM7O_cjs.hasCapability; }
896
1042
  });
897
1043
  Object.defineProperty(exports, "isPolicyRefusal", {
898
1044
  enumerable: true,
899
- get: function () { return chunkBC2L2H6A_cjs.isPolicyRefusal; }
1045
+ get: function () { return chunkAAH6ZM7O_cjs.isPolicyRefusal; }
900
1046
  });
901
1047
  Object.defineProperty(exports, "isServiceId", {
902
1048
  enumerable: true,
903
- get: function () { return chunkBC2L2H6A_cjs.isServiceId; }
1049
+ get: function () { return chunkAAH6ZM7O_cjs.isServiceId; }
904
1050
  });
905
1051
  Object.defineProperty(exports, "isTransientRpcError", {
906
1052
  enumerable: true,
907
- get: function () { return chunkBC2L2H6A_cjs.isTransientRpcError; }
1053
+ get: function () { return chunkAAH6ZM7O_cjs.isTransientRpcError; }
908
1054
  });
909
1055
  Object.defineProperty(exports, "listServices", {
910
1056
  enumerable: true,
911
- get: function () { return chunkBC2L2H6A_cjs.listServices; }
1057
+ get: function () { return chunkAAH6ZM7O_cjs.listServices; }
912
1058
  });
913
1059
  Object.defineProperty(exports, "normalizeAddress", {
914
1060
  enumerable: true,
915
- get: function () { return chunkBC2L2H6A_cjs.normalizeAddress; }
1061
+ get: function () { return chunkAAH6ZM7O_cjs.normalizeAddress; }
916
1062
  });
917
1063
  Object.defineProperty(exports, "normalizeHash", {
918
1064
  enumerable: true,
919
- get: function () { return chunkBC2L2H6A_cjs.normalizeHash; }
1065
+ get: function () { return chunkAAH6ZM7O_cjs.normalizeHash; }
920
1066
  });
921
1067
  Object.defineProperty(exports, "parseAmount", {
922
1068
  enumerable: true,
923
- get: function () { return chunkBC2L2H6A_cjs.parseAmount; }
1069
+ get: function () { return chunkAAH6ZM7O_cjs.parseAmount; }
924
1070
  });
925
1071
  Object.defineProperty(exports, "resolveAppFeeConfig", {
926
1072
  enumerable: true,
927
- get: function () { return chunkBC2L2H6A_cjs.resolveAppFeeConfig; }
1073
+ get: function () { return chunkAAH6ZM7O_cjs.resolveAppFeeConfig; }
928
1074
  });
929
1075
  Object.defineProperty(exports, "resolveConfig", {
930
1076
  enumerable: true,
931
- get: function () { return chunkBC2L2H6A_cjs.resolveConfig; }
1077
+ get: function () { return chunkAAH6ZM7O_cjs.resolveConfig; }
932
1078
  });
933
1079
  Object.defineProperty(exports, "resolveFeeConfig", {
934
1080
  enumerable: true,
935
- get: function () { return chunkBC2L2H6A_cjs.resolveFeeConfig; }
1081
+ get: function () { return chunkAAH6ZM7O_cjs.resolveFeeConfig; }
936
1082
  });
937
1083
  Object.defineProperty(exports, "shortenAddress", {
938
1084
  enumerable: true,
939
- get: function () { return chunkBC2L2H6A_cjs.shortenAddress; }
1085
+ get: function () { return chunkAAH6ZM7O_cjs.shortenAddress; }
940
1086
  });
941
1087
  Object.defineProperty(exports, "stringifyBigInts", {
942
1088
  enumerable: true,
943
- get: function () { return chunkBC2L2H6A_cjs.stringifyBigInts; }
1089
+ get: function () { return chunkAAH6ZM7O_cjs.stringifyBigInts; }
944
1090
  });
945
1091
  Object.defineProperty(exports, "u256ToBigInt", {
946
1092
  enumerable: true,
947
- get: function () { return chunkBC2L2H6A_cjs.u256ToBigInt; }
1093
+ get: function () { return chunkAAH6ZM7O_cjs.u256ToBigInt; }
948
1094
  });
949
1095
  Object.defineProperty(exports, "CHAINS", {
950
1096
  enumerable: true,
@@ -962,6 +1108,7 @@ Object.defineProperty(exports, "getStarknetCoordinates", {
962
1108
  enumerable: true,
963
1109
  get: function () { return chunkVJVBWHAD_cjs.getStarknetCoordinates; }
964
1110
  });
1111
+ exports.ACCOUNT_SESSION_COOKIE = ACCOUNT_SESSION_COOKIE;
965
1112
  exports.ACCOUNT_SESSION_TTL_SECONDS = ACCOUNT_SESSION_TTL_SECONDS;
966
1113
  exports.ALLOWED_IMAGE_CONTENT_TYPES = ALLOWED_IMAGE_CONTENT_TYPES;
967
1114
  exports.IDENTITY_TTL_SECONDS = IDENTITY_TTL_SECONDS;
@@ -973,16 +1120,17 @@ exports.OPEN_LICENSES = OPEN_LICENSES;
973
1120
  exports.RESERVED_TRAITS = RESERVED_TRAITS;
974
1121
  exports.RunRequestError = RunRequestError;
975
1122
  exports.buildAssetMetadata = buildAssetMetadata;
976
- exports.createBackendProxyHandler = createBackendProxyHandler;
1123
+ exports.createAppGateway = createAppGateway;
1124
+ exports.createAppSessionHandler = createAppSessionHandler;
977
1125
  exports.createImageProxyHandler = createImageProxyHandler;
978
1126
  exports.createLaunchpadRunsClient = createLaunchpadRunsClient;
979
- exports.createRpcProxyHandler = createRpcProxyHandler;
980
1127
  exports.getBackendSignedUrl = getBackendSignedUrl;
981
1128
  exports.getDerivativesTerm = getDerivativesTerm;
982
1129
  exports.isCertificateEmissionRun = isCertificateEmissionRun;
983
1130
  exports.isDataTokenizationRun = isDataTokenizationRun;
984
1131
  exports.isPrivateHost = isPrivateHost;
985
1132
  exports.isPrivateOrInsecureUrl = isPrivateOrInsecureUrl;
1133
+ exports.isPublicAppRoute = isPublicAppRoute;
986
1134
  exports.isSameOrigin = isSameOrigin;
987
1135
  exports.isTicketingRun = isTicketingRun;
988
1136
  exports.isValidIpfsCidPath = isValidIpfsCidPath;