@fxhash/config 0.0.10 → 0.0.12

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.js CHANGED
@@ -1,528 +1,519 @@
1
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
- }) : x)(function(x) {
4
- if (typeof require !== "undefined") return require.apply(this, arguments);
5
- throw Error('Dynamic require of "' + x + '" is not supported');
1
+ import { failure, success } from "@fxhash/utils";
2
+ import { RichError, isRichErrorMessages } from "@fxhash/errors";
3
+
4
+ //#region rolldown:runtime
5
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
6
+ if (typeof require !== "undefined") return require.apply(this, arguments);
7
+ throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function.");
6
8
  });
7
9
 
8
- // src/api/eth.ts
9
- var ethTestnetApis = {
10
- rpcs: [
11
- "https://eth-sepolia.g.alchemy.com/v2/fATxHNjMh0rR9DnHCtZKDpPPxkEY48Qb"
12
- ],
13
- reservoir: "https://api-sepolia.reservoir.tools",
14
- safe: "https://safe-transaction-sepolia.safe.global",
15
- whitelist: "http://localhost:9999/whitelist/new",
16
- alchemy: {
17
- rpc: "https://eth-sepolia.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9"
18
- }
19
- };
20
- var ethMainnetApis = {
21
- rpcs: [
22
- "https://eth-mainnet.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9"
23
- ],
24
- reservoir: "https://api.reservoir.tools",
25
- safe: "https://safe-transaction-mainnet.safe.global/",
26
- whitelist: "https://api.v2.dev.fxhash-dev.xyz/whitelist/new",
27
- alchemy: {
28
- rpc: "https://eth-mainnet.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9"
29
- }
10
+ //#endregion
11
+ //#region src/api/eth.ts
12
+ const ethTestnetApis = {
13
+ rpcs: ["https://eth-sepolia.g.alchemy.com/v2/fATxHNjMh0rR9DnHCtZKDpPPxkEY48Qb"],
14
+ reservoir: "https://api-sepolia.reservoir.tools",
15
+ safe: "https://safe-transaction-sepolia.safe.global",
16
+ whitelist: "http://localhost:9999/whitelist/new",
17
+ alchemy: { rpc: "https://eth-sepolia.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9" }
18
+ };
19
+ const ethMainnetApis = {
20
+ rpcs: ["https://eth-mainnet.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9"],
21
+ reservoir: "https://api.reservoir.tools",
22
+ safe: "https://safe-transaction-mainnet.safe.global/",
23
+ whitelist: "https://api.v2.dev.fxhash-dev.xyz/whitelist/new",
24
+ alchemy: { rpc: "https://eth-mainnet.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9" }
30
25
  };
31
26
 
32
- // src/api/tezos.ts
33
- var tezosTestnetApis = {
34
- tzkt: "https://api.ghostnet.tzkt.io/v1/",
35
- tzktPro: "https://api.ghostnet.tzkt.io/v1/",
36
- tzktWebsite: "https://ghostnet.tzkt.io/",
37
- rpcs: [
38
- "https://ghostnet.ecadinfra.com",
39
- "https://ghostnet.smartpy.io",
40
- "https://ghostnet.tezos.marigold.dev/"
41
- ]
42
- };
43
- var tezosMainnetApis = {
44
- tzkt: "https://api.tzkt.io/v1/",
45
- tzktPro: "https://pro.tzkt.io/v1/",
46
- tzktWebsite: "https://tzkt.io/",
47
- rpcs: [
48
- "https://rpc1.fxhash.xyz",
49
- "https://mainnet.smartpy.io",
50
- "https://mainnet.api.tez.ie",
51
- "https://teznode.letzbake.com"
52
- ]
27
+ //#endregion
28
+ //#region src/api/tezos.ts
29
+ const tezosTestnetApis = {
30
+ tzkt: "https://api.ghostnet.tzkt.io/v1/",
31
+ tzktPro: "https://api.ghostnet.tzkt.io/v1/",
32
+ tzktWebsite: "https://ghostnet.tzkt.io/",
33
+ rpcs: [
34
+ "https://ghostnet.ecadinfra.com",
35
+ "https://ghostnet.smartpy.io",
36
+ "https://ghostnet.tezos.marigold.dev/"
37
+ ]
38
+ };
39
+ const tezosMainnetApis = {
40
+ tzkt: "https://api.tzkt.io/v1/",
41
+ tzktPro: "https://pro.tzkt.io/v1/",
42
+ tzktWebsite: "https://tzkt.io/",
43
+ rpcs: [
44
+ "https://rpc1.fxhash.xyz",
45
+ "https://mainnet.smartpy.io",
46
+ "https://mainnet.api.tez.ie",
47
+ "https://teznode.letzbake.com"
48
+ ]
53
49
  };
54
50
 
55
- // src/helpers.ts
56
- var HOST_LOCAL = "localhost";
57
- var HOST_DOCKER_INTERNAL = "host.docker.internal";
51
+ //#endregion
52
+ //#region src/helpers.ts
53
+ const HOST_LOCAL = "localhost";
54
+ const HOST_DOCKER_INTERNAL = "host.docker.internal";
58
55
  function getDockerInternalUrl(url) {
59
- return url.replace(HOST_LOCAL, HOST_DOCKER_INTERNAL);
56
+ return url.replace(HOST_LOCAL, HOST_DOCKER_INTERNAL);
60
57
  }
61
- var isProd = (() => {
62
- return process.env.FXHASH_ENV === "prd" || process.env.FXHASH_ENV === "production" || process.env.NEXT_PUBLIC_FXHASH_ENV === "prd" || process.env.NEXT_PUBLIC_FXHASH_ENV === "production" || process.env.REACT_APP_FXHASH_ENV === "prd" || process.env.REACT_APP_FXHASH_ENV === "production" || process.env.VITE_FXHASH_ENV === "prd" || process.env.VITE_FXHASH_ENV === "production";
58
+ const isProd = (() => {
59
+ return process.env.FXHASH_ENV === "prd" || process.env.FXHASH_ENV === "production" || process.env.NEXT_PUBLIC_FXHASH_ENV === "prd" || process.env.NEXT_PUBLIC_FXHASH_ENV === "production" || process.env.REACT_APP_FXHASH_ENV === "prd" || process.env.REACT_APP_FXHASH_ENV === "production" || process.env.VITE_FXHASH_ENV === "prd" || process.env.VITE_FXHASH_ENV === "production";
63
60
  })();
64
- var isLocal = (() => {
65
- return process.env.FXHASH_ENV === "local" || process.env.NEXT_PUBLIC_FXHASH_ENV === "local" || process.env.REACT_APP_FXHASH_ENV === "local" || process.env.VITE_FXHASH_ENV === "local";
61
+ const isLocal = (() => {
62
+ return process.env.FXHASH_ENV === "local" || process.env.NEXT_PUBLIC_FXHASH_ENV === "local" || process.env.REACT_APP_FXHASH_ENV === "local" || process.env.VITE_FXHASH_ENV === "local";
66
63
  })();
67
- var isDockerLocal = (() => {
68
- const isBrowser = typeof window !== "undefined";
69
- if (isBrowser) return false;
70
- let fs;
71
- try {
72
- fs = __require("fs");
73
- } catch (e) {
74
- return false;
75
- }
76
- if (!fs) return false;
77
- return isLocal && fs.existsSync("/.dockerenv");
64
+ const isDockerLocal = (() => {
65
+ const isBrowser = typeof window !== "undefined";
66
+ if (isBrowser) return false;
67
+ let fs;
68
+ try {
69
+ fs = __require("fs");
70
+ } catch (e) {
71
+ return false;
72
+ }
73
+ if (!fs) return false;
74
+ return isLocal && fs.existsSync("/.dockerenv");
78
75
  })();
79
76
  function getEnv() {
80
- if (isProd) return "prd";
81
- if (isLocal) {
82
- return isDockerLocal ? "localDocker" : "local";
83
- }
84
- return "dev";
77
+ if (isProd) return "prd";
78
+ if (isLocal) return isDockerLocal ? "localDocker" : "local";
79
+ return "dev";
85
80
  }
86
81
 
87
- // src/api/fxhash.ts
88
- var fxhashDevApis = {
89
- website: "https://beta.fxhash-dev.xyz",
90
- docs: "https://docs.fxhash.xyz",
91
- main: "https://api.v2-temp.dev.fxhash-dev.xyz/graphql",
92
- hasura: "https://api.v2.dev.fxhash-dev.xyz",
93
- hasuraGql: "https://api.v2.dev.fxhash-dev.xyz/v1/graphql",
94
- file: "https://file-api.fxhash-dev.xyz",
95
- fileInternal: "http://fxhash-multichain-dev-testnet-file-api.fxhash-multichain-dev-testnet.svc.cluster.local:4004",
96
- walletInternal: "http://fxhash-multichain-dev-testnet-wallet-api.fxhash-multichain-dev-testnet.svc.cluster.local:3208",
97
- fsEmulator: "https://file-api.fxhash-dev.xyz/fs",
98
- extract: "https://extract.fxhash-dev.xyz",
99
- extractInternal: "http://fxhash-dev-testnet-extract-balancer.fxhash-dev-testnet.svc.cluster.local:4017",
100
- media: "https://media.dev.fxhash-dev.xyz",
101
- ethMetadata: "https://media.dev.fxhash-dev.xyz/metadata/ethereum/",
102
- ipfsInternal: "http://fxhash-dev-testnet-ipfs-cluster-api.fxhash-dev-testnet.svc.cluster.local:9094",
103
- ipfsGateway: "https://gateway.fxhash-dev.xyz",
104
- ipfsGatewaySafe: "https://gateway.fxhash-dev2.xyz",
105
- ipfsGatewayInternal: "http://fxhash-dev-testnet-ipfs-cluster-gateway.fxhash-dev-testnet.svc.cluster.local:8080",
106
- onchfsProxy: "https://onchfs.fxhash-dev2.xyz",
107
- opensea: "https://testnets-api.opensea.io/api/v2",
108
- authority: {
109
- api: "NONE"
110
- },
111
- capture: {
112
- lambdas: {
113
- small: "https://u5not5l323zczuwnrzxwkt34ra0eyidj.lambda-url.us-east-1.on.aws/",
114
- medium: "https://jgfz7a6km7fsqonej2sp3lqwvu0utnyy.lambda-url.us-east-1.on.aws/",
115
- large: "https://fzezvbp2f74yturkj4akjyrq3e0zswhb.lambda-url.us-east-1.on.aws/"
116
- },
117
- proxy: {
118
- ipfs: "ipfs://Qme6E5z1GDqrHyPomGEw5LChxmE9pdEYGWjwxrv6ZgwZRo",
119
- onchfs: "onchfs://4287364ed3219d3f2f77302a71eff0db49e971058ef87f163981ef89a445b143"
120
- }
121
- },
122
- events: {
123
- liveBackend: "_NONE"
124
- },
125
- indexer: {
126
- tez: "http://fxhash-multichain-dev-testnet-indexer-v2.fxhash-multichain-dev-testnet.svc.cluster.local:4001",
127
- eth: "http://fxhash-multichain-dev-testnet-eth-indexer.fxhash-multichain-dev-testnet.svc.cluster.local:3000",
128
- base: "http://fxhash-multichain-dev-testnet-base-indexer.fxhash-multichain-dev-testnet.svc.cluster.local:3000"
129
- }
130
- };
131
- var fxhashLocalApis = {
132
- ...fxhashDevApis,
133
- website: "http://localhost:3200",
134
- hasura: "http://localhost:8888",
135
- hasuraGql: "http://localhost:8888/v1/graphql",
136
- fileInternal: fxhashDevApis.file,
137
- ipfsGatewayInternal: fxhashDevApis.ipfsGateway,
138
- walletInternal: "http://host.docker.internal:3208"
139
- };
140
- var fxhashLocalDockerApis = {
141
- ...fxhashLocalApis,
142
- hasura: getDockerInternalUrl(fxhashLocalApis.hasura),
143
- hasuraGql: getDockerInternalUrl(fxhashLocalApis.hasuraGql)
144
- };
145
- var fxhashPrdApis = {
146
- website: "https://www.fxhash.xyz",
147
- docs: "https://docs.fxhash.xyz",
148
- main: "https://api.v2-temp.fxhash.xyz/graphql",
149
- hasura: "https://api.v2.fxhash.xyz",
150
- hasuraGql: "https://api.v2.fxhash.xyz/v1/graphql",
151
- file: "https://file-api.fxhash.xyz",
152
- fileInternal: "http://fxhash-multichain-prd-file-api.fxhash-multichain-prd.svc.cluster.local:4004",
153
- walletInternal: "http://fxhash-multichain-prd-wallet-api.fxhash-multichain-prd.svc.cluster.local:3208",
154
- fsEmulator: "https://file-api.fxhash.xyz/fs",
155
- extract: "https://extract.fxhash.xyz",
156
- extractInternal: "http://fxhash-prd-extract-balancer.fxhash-prd.svc.cluster.local:4017",
157
- media: "https://media.fxhash.xyz",
158
- ethMetadata: "https://media.fxhash.xyz/metadata/ethereum/",
159
- ipfsInternal: "http://fxhash-prd-ipfs-cluster-api.fxhash-prd.svc.cluster.local:9094",
160
- ipfsGateway: "https://gateway.fxhash.xyz",
161
- ipfsGatewaySafe: "https://gateway.fxhash2.xyz",
162
- ipfsGatewayInternal: "http://fxhash-prd-ipfs-cluster-gateway.fxhash-prd.svc.cluster.local:8080",
163
- onchfsProxy: "https://onchfs.fxhash2.xyz",
164
- opensea: "https://api.opensea.io/api/v2",
165
- authority: {
166
- api: "NONE"
167
- },
168
- capture: {
169
- lambdas: {
170
- small: "https://7sz7knaaw3obgqxjyv3m4e5myu0lsbdp.lambda-url.us-east-1.on.aws/",
171
- medium: "https://tuupcq6eesbfk4veuzdfrhu7zm0zwuqy.lambda-url.us-east-1.on.aws/",
172
- large: "https://bojj24y6ucxmsyfi4uccdmiliy0dzhji.lambda-url.us-east-1.on.aws/"
173
- },
174
- proxy: {
175
- ipfs: "ipfs://Qme6E5z1GDqrHyPomGEw5LChxmE9pdEYGWjwxrv6ZgwZRo",
176
- onchfs: "onchfs://4287364ed3219d3f2f77302a71eff0db49e971058ef87f163981ef89a445b143"
177
- }
178
- },
179
- events: {
180
- liveBackend: "_NONE"
181
- },
182
- indexer: {
183
- tez: "http://fxhash-multichain-prd-indexer-v2.fxhash-multichain-prd.svc.cluster.local:4001",
184
- eth: "http://fxhash-multichain-prd-eth-indexer.fxhash-multichain-prd.svc.cluster.local:3000",
185
- base: "http://fxhash-multichain-prd-base-indexer.fxhash-multichain-prd.svc.cluster.local:3000"
186
- }
187
- };
188
- var fxEnvToApisMap = {
189
- local: fxhashLocalApis,
190
- localDocker: fxhashLocalDockerApis,
191
- dev: fxhashDevApis,
192
- prd: fxhashPrdApis
193
- };
82
+ //#endregion
83
+ //#region src/api/fxhash.ts
84
+ const fxhashDevApis = {
85
+ website: "https://beta.fxhash-dev.xyz",
86
+ docs: "https://docs.fxhash.xyz",
87
+ main: "https://api.v2-temp.dev.fxhash-dev.xyz/graphql",
88
+ hasura: "https://api.v2.dev.fxhash-dev.xyz",
89
+ hasuraGql: "https://api.v2.dev.fxhash-dev.xyz/v1/graphql",
90
+ file: "https://file-api.fxhash-dev.xyz",
91
+ fileInternal: "http://fxhash-multichain-dev-testnet-file-api.fxhash-multichain-dev-testnet.svc.cluster.local:4004",
92
+ walletInternal: "http://fxhash-multichain-dev-testnet-wallet-api.fxhash-multichain-dev-testnet.svc.cluster.local:3208",
93
+ fsEmulator: "https://file-api.fxhash-dev.xyz/fs",
94
+ extract: "https://extract.fxhash-dev.xyz",
95
+ extractInternal: "http://fxhash-dev-testnet-extract-balancer.fxhash-dev-testnet.svc.cluster.local:4017",
96
+ media: "https://media.dev.fxhash-dev.xyz",
97
+ ethMetadata: "https://media.dev.fxhash-dev.xyz/metadata/ethereum/",
98
+ ipfsInternal: "http://fxhash-dev-testnet-ipfs-cluster-api.fxhash-dev-testnet.svc.cluster.local:9094",
99
+ ipfsGateway: "https://gateway.fxhash-dev.xyz",
100
+ ipfsGatewaySafe: "https://gateway.fxhash-dev2.xyz",
101
+ ipfsGatewayInternal: "http://fxhash-dev-testnet-ipfs-cluster-gateway.fxhash-dev-testnet.svc.cluster.local:8080",
102
+ onchfsProxy: "https://onchfs.fxhash-dev2.xyz",
103
+ opensea: "https://testnets-api.opensea.io/api/v2",
104
+ authority: { api: "NONE" },
105
+ capture: {
106
+ lambdas: {
107
+ small: "https://u5not5l323zczuwnrzxwkt34ra0eyidj.lambda-url.us-east-1.on.aws/",
108
+ medium: "https://jgfz7a6km7fsqonej2sp3lqwvu0utnyy.lambda-url.us-east-1.on.aws/",
109
+ large: "https://fzezvbp2f74yturkj4akjyrq3e0zswhb.lambda-url.us-east-1.on.aws/"
110
+ },
111
+ proxy: {
112
+ ipfs: "ipfs://Qme6E5z1GDqrHyPomGEw5LChxmE9pdEYGWjwxrv6ZgwZRo",
113
+ onchfs: "onchfs://4287364ed3219d3f2f77302a71eff0db49e971058ef87f163981ef89a445b143"
114
+ }
115
+ },
116
+ events: { liveBackend: "_NONE" },
117
+ indexer: {
118
+ tez: "http://fxhash-multichain-dev-testnet-indexer-v2.fxhash-multichain-dev-testnet.svc.cluster.local:4001",
119
+ eth: "http://fxhash-multichain-dev-testnet-eth-indexer.fxhash-multichain-dev-testnet.svc.cluster.local:3000",
120
+ base: "http://fxhash-multichain-dev-testnet-base-indexer.fxhash-multichain-dev-testnet.svc.cluster.local:3000"
121
+ }
122
+ };
123
+ const fxhashLocalApis = {
124
+ ...fxhashDevApis,
125
+ website: "http://localhost:3200",
126
+ hasura: "http://localhost:8888",
127
+ hasuraGql: "http://localhost:8888/v1/graphql",
128
+ fileInternal: fxhashDevApis.file,
129
+ ipfsGatewayInternal: fxhashDevApis.ipfsGateway,
130
+ walletInternal: "http://host.docker.internal:3208"
131
+ };
132
+ const fxhashLocalDockerApis = {
133
+ ...fxhashLocalApis,
134
+ hasura: getDockerInternalUrl(fxhashLocalApis.hasura),
135
+ hasuraGql: getDockerInternalUrl(fxhashLocalApis.hasuraGql)
136
+ };
137
+ const fxhashPrdApis = {
138
+ website: "https://www.fxhash.xyz",
139
+ docs: "https://docs.fxhash.xyz",
140
+ main: "https://api.v2-temp.fxhash.xyz/graphql",
141
+ hasura: "https://api.v2.fxhash.xyz",
142
+ hasuraGql: "https://api.v2.fxhash.xyz/v1/graphql",
143
+ file: "https://file-api.fxhash.xyz",
144
+ fileInternal: "http://fxhash-multichain-prd-file-api.fxhash-multichain-prd.svc.cluster.local:4004",
145
+ walletInternal: "http://fxhash-multichain-prd-wallet-api.fxhash-multichain-prd.svc.cluster.local:3208",
146
+ fsEmulator: "https://file-api.fxhash.xyz/fs",
147
+ extract: "https://extract.fxhash.xyz",
148
+ extractInternal: "http://fxhash-prd-extract-balancer.fxhash-prd.svc.cluster.local:4017",
149
+ media: "https://media.fxhash.xyz",
150
+ ethMetadata: "https://media.fxhash.xyz/metadata/ethereum/",
151
+ ipfsInternal: "http://fxhash-prd-ipfs-cluster-api.fxhash-prd.svc.cluster.local:9094",
152
+ ipfsGateway: "https://gateway.fxhash.xyz",
153
+ ipfsGatewaySafe: "https://gateway.fxhash2.xyz",
154
+ ipfsGatewayInternal: "http://fxhash-prd-ipfs-cluster-gateway.fxhash-prd.svc.cluster.local:8080",
155
+ onchfsProxy: "https://onchfs.fxhash2.xyz",
156
+ opensea: "https://api.opensea.io/api/v2",
157
+ authority: { api: "NONE" },
158
+ capture: {
159
+ lambdas: {
160
+ small: "https://7sz7knaaw3obgqxjyv3m4e5myu0lsbdp.lambda-url.us-east-1.on.aws/",
161
+ medium: "https://tuupcq6eesbfk4veuzdfrhu7zm0zwuqy.lambda-url.us-east-1.on.aws/",
162
+ large: "https://bojj24y6ucxmsyfi4uccdmiliy0dzhji.lambda-url.us-east-1.on.aws/"
163
+ },
164
+ proxy: {
165
+ ipfs: "ipfs://Qme6E5z1GDqrHyPomGEw5LChxmE9pdEYGWjwxrv6ZgwZRo",
166
+ onchfs: "onchfs://4287364ed3219d3f2f77302a71eff0db49e971058ef87f163981ef89a445b143"
167
+ }
168
+ },
169
+ events: { liveBackend: "_NONE" },
170
+ indexer: {
171
+ tez: "http://fxhash-multichain-prd-indexer-v2.fxhash-multichain-prd.svc.cluster.local:4001",
172
+ eth: "http://fxhash-multichain-prd-eth-indexer.fxhash-multichain-prd.svc.cluster.local:3000",
173
+ base: "http://fxhash-multichain-prd-base-indexer.fxhash-multichain-prd.svc.cluster.local:3000"
174
+ }
175
+ };
176
+ const fxEnvToApisMap = {
177
+ local: fxhashLocalApis,
178
+ localDocker: fxhashLocalDockerApis,
179
+ dev: fxhashDevApis,
180
+ prd: fxhashPrdApis
181
+ };
182
+ /**
183
+ * Given some env, returns the associated APIs config.
184
+ */
194
185
  function fxApisByEnv(env) {
195
- return fxEnvToApisMap[env];
186
+ return fxEnvToApisMap[env];
196
187
  }
197
188
 
198
- // src/contracts/tezos.ts
199
- var tezosTestnetContracts = {
200
- allowed_mint: "KT1QwfqMUDRYVyxo9KhunY5YCx9qQ9LWcswr",
201
- allowed_mint_issuer: "KT1WDByFKQmgVynxSr2rzdijs5aSs7mo7eBM",
202
- allowed_mint_issuer_v3: "KT1S3UqrLgMpVivNWWmBUnkPCaSFHDJ4HYvb",
203
- allowed_mint_v3: "KT1HUE2A6CHNw4NZZBWjJyG38nysWWfusagu",
204
- articles: "KT1HV8NXUCKWC1tWNHSD8LPPiKPshQuXvb8r",
205
- card_proxy: "KT1R6N27Qdw4RqeSUnYkw436uZrFSRWtxqbd",
206
- collaboration_factory: "KT1WFXts7jwxpD9uGDKzyqTUTFaG222xmjoZ",
207
- consumable_database: "KT1FP9y1PJpJkXhdJCgYZhVbj9UBpxnA57Bx",
208
- cycles: "KT1BJBcvtgZM2Kf4rUapmp4AhXtWCmznxd6F",
209
- gentk_v1: "KT1ExHjELnDuat9io3HkDcrBhHmek7h8EVXG",
210
- gentk_v1_data: "KT1SquPSN9oiMUWHG9coKRJAwz8Afe4c6izT",
211
- gentk_v2: "KT1NkZho1yRkDdQnN4Mz93sDYyY2pPrEHTNs",
212
- gentk_v3: "KT1TtVAyjh4Ahdm8sLZwFnL7tqoLf59XrK2h",
213
- issuer_tickets: "KT19PBsvmB2CwFqXftzb5gNJfxrEDFdSxGKZ",
214
- issuer_v0: "KT1PyfrDD85RxUWz8dMHoC92MxdPzecSQ5t9",
215
- issuer_v1: "KT1QwWVZogqPZZtGSVxGpLkEWar7LFvAsMdd",
216
- issuer_v2: "KT1Sy7X6TubmZ39G8CHVrUcxjc3jiF68P8oB",
217
- issuer_v3: "KT1DfymMp3qD5Pd5ujPjp7UsQbppY9yY1Hbf",
218
- marketplace_v1: "KT1DbivePcuUzCp5RaAQWxPSLV9G2Ys4faUR",
219
- marketplace_v2: "KT1HFYtf4vNCr4xRDZxLKc5asUdCsPUTTW9R",
220
- marketplace_v3: "KT1J6rt4d9U785DZWYEPvQ2fR1e71gxP42Lj",
221
- moderation_articles: "KT1Qg78fa81Xyjh65yNqUgVucubHUyq6VmgL",
222
- moderation_team: "KT1RsfyWzHs1EEWMzFLmKnJTQwPqRzsnF3Dp",
223
- moderation_token: "KT1PokFR36CcXKh3jUnjncabcuPWm5BMiqjt",
224
- moderation_token_v3: "KT1C1J38YR6eDvRBDEDaypptCFda9aH7FRbJ",
225
- moderation_user: "KT1Q3s7mYpscCnwsyndrVZg9WqBCmw99n37g",
226
- pricing_dutch_auction: "KT1BqikbUisiBBd9WvPiqnTwLY8Pm68p2Aua",
227
- pricing_dutch_auction_v3: "KT1QCboxZ28SqsfyZWTDrkSpZzU6xjZXBsFb",
228
- pricing_fixed: "KT1PAsf9Zc9FGJA9iLE1Ab2vPkMDsh4hyZVi",
229
- pricing_fixed_v3: "KT1Mqyy5JPknNzNJtgF93SHpFHv4VcYrNZry",
230
- randomizer: "KT1QmdsrJWJgK3VXid8q7D4sPipVoc9jh12x",
231
- randomizer_v2: "KT1Eow4nBY3B9EhWcX1aEXva67VkNFfP1Tq6",
232
- token_moderation: "KT1BHfPDMRp2q48ZkmmnK7TRzQRdFnp6XVKq",
233
- treasury: "KT1MbDbRhZPs5TzZEXkT142ePoccFHfohBoo",
234
- user_moderation: "KT1LmZjoitx2itnB1qCbHMrT3V64RbuSPf3a",
235
- user_register: "KT1XaikgmBDQANBvkFqyFhSpgAZJAXpiDFGE",
236
- onchfs_files: "KT1FA8AGGcJha6S6MqfBUiibwTaYhK8u7s9Q"
237
- };
238
- var tezosMainnetContracts = {
239
- allowed_mint: "KT1VDQwskdfHkSbA9W6CSEnxnh1u1XU8K8Gu",
240
- allowed_mint_issuer: "KT1Djz5ix2yEGmV7PMq3GYq17TvMMkd1anT2",
241
- allowed_mint_issuer_v3: "KT1LJ4R4xoEWMgTjrGrdHJAeHLYFaB4RsoVK",
242
- allowed_mint_v3: "KT1KgEjxqfRCMwtCGifT6fDPwC35RptTUEvE",
243
- articles: "KT1GtbuswcNMGhHF2TSuH1Yfaqn16do8Qtva",
244
- card_proxy: "KT1DQGSRsgHcf2TPdKGc4qm5AT9JprJCAo7j",
245
- collaboration_factory: "KT1JrUPSCt1r2MB2J7Lk2KwiWSYr3Mr414ck",
246
- consumable_database: "KT1Mbfkqh5EhebWuMvqAfUPTpgiBPwmQCDSD",
247
- cycles: "KT1BgD9SPfysnMz3vkfm6ZEaGFKCVcE5ay91",
248
- gentk_v1: "KT1KEa8z6vWXDJrVqtMrAeDVzsvxat3kHaCE",
249
- gentk_v1_data: "KT1WRpPyXHSCbTfDQFWVXbMpxxvf7Y7KChxc",
250
- gentk_v2: "KT1U6EHmNxJTkvaWJ4ThczG4FSDaHC21ssvi",
251
- gentk_v3: "KT1EfsNuqwLAWDd3o4pvfUx1CAh5GMdTrRvr",
252
- issuer_tickets: "KT19etLCjCCzTLFFAxsxLFsVYMRPetr2bTD5",
253
- issuer_v0: "KT1AEVuykWeuuFX7QkEAMNtffzwhe1Z98hJS",
254
- issuer_v1: "KT1XCoGnfupWk7Sp8536EfrxcP73LmT68Nyr",
255
- issuer_v2: "KT1BJC12dG17CVvPKJ1VYaNnaT5mzfnUTwXv",
256
- issuer_v3: "KT1Xpmp15KfqoePNW9HczFmqaGNHwadV2a3b",
257
- marketplace_v1: "KT1Xo5B7PNBAeynZPmca4bRh6LQow4og1Zb9",
258
- marketplace_v2: "KT1GbyoDi7H1sfXmimXpptZJuCdHMh66WS9u",
259
- marketplace_v3: "KT1M1NyU9X4usEimt2f3kDaijZnDMNBu42Ja",
260
- moderation_articles: "KT1A36z7nG4zPDbhjyrzhYf9SCn5ipPZeRMQ",
261
- moderation_team: "KT1FvGQcPxzuJkJsdWFQiGkueSNT5mqpFDrf",
262
- moderation_token: "KT18tPu7uXy9PJ97i3qCLsr7an4X6sQ5qxU7",
263
- moderation_token_v3: "KT1UBWXN1KxTh4eurrCTCH7aEjqdrM3HjP6R",
264
- moderation_user: "KT1Wn2kkKmdbyLWBiLXWCkE7fKj1LsLKar2A",
265
- pricing_dutch_auction: "KT1EzLrXRCXij42pKfbZPn48PuxrnVki1aYY",
266
- pricing_dutch_auction_v3: "KT1MFgHKorMWXeVL6qrpgjZmemirafppSg9q",
267
- pricing_fixed: "KT1FHzHxuMaNLYG8LdniY45M6RCfkF3AoXFh",
268
- pricing_fixed_v3: "KT1V24J6FVuKPU3xy6gVF6wJ3zdRXBheQhaV",
269
- randomizer: "KT1XYgKrzBbzsckGvXTPgxFyN7KNZ9RPYVWf",
270
- randomizer_v2: "KT1CfmepqJkfZwqLPFVMKFoYUS7dPPZHyCTo",
271
- token_moderation: "KT1HgVuzNWVvnX16fahbV2LrnpwifYKoFMRd",
272
- treasury: "KT1P2BXYb894MekrCcSrnidzQYPVqitLoVLc",
273
- user_moderation: "KT1TWWQ6FtLoosVfZgTKV2q68TMZaENhGm54",
274
- user_register: "KT1Ezht4PDKZri7aVppVGT4Jkw39sesaFnww",
275
- onchfs_files: "KT1Ae7dT1gsLw2tRnUMXSCmEyF74KVkM6LUo"
189
+ //#endregion
190
+ //#region src/contracts/tezos.ts
191
+ const tezosTestnetContracts = {
192
+ allowed_mint: "KT1QwfqMUDRYVyxo9KhunY5YCx9qQ9LWcswr",
193
+ allowed_mint_issuer: "KT1WDByFKQmgVynxSr2rzdijs5aSs7mo7eBM",
194
+ allowed_mint_issuer_v3: "KT1S3UqrLgMpVivNWWmBUnkPCaSFHDJ4HYvb",
195
+ allowed_mint_v3: "KT1HUE2A6CHNw4NZZBWjJyG38nysWWfusagu",
196
+ articles: "KT1HV8NXUCKWC1tWNHSD8LPPiKPshQuXvb8r",
197
+ card_proxy: "KT1R6N27Qdw4RqeSUnYkw436uZrFSRWtxqbd",
198
+ collaboration_factory: "KT1WFXts7jwxpD9uGDKzyqTUTFaG222xmjoZ",
199
+ consumable_database: "KT1FP9y1PJpJkXhdJCgYZhVbj9UBpxnA57Bx",
200
+ cycles: "KT1BJBcvtgZM2Kf4rUapmp4AhXtWCmznxd6F",
201
+ gentk_v1: "KT1ExHjELnDuat9io3HkDcrBhHmek7h8EVXG",
202
+ gentk_v1_data: "KT1SquPSN9oiMUWHG9coKRJAwz8Afe4c6izT",
203
+ gentk_v2: "KT1NkZho1yRkDdQnN4Mz93sDYyY2pPrEHTNs",
204
+ gentk_v3: "KT1TtVAyjh4Ahdm8sLZwFnL7tqoLf59XrK2h",
205
+ issuer_tickets: "KT19PBsvmB2CwFqXftzb5gNJfxrEDFdSxGKZ",
206
+ issuer_v0: "KT1PyfrDD85RxUWz8dMHoC92MxdPzecSQ5t9",
207
+ issuer_v1: "KT1QwWVZogqPZZtGSVxGpLkEWar7LFvAsMdd",
208
+ issuer_v2: "KT1Sy7X6TubmZ39G8CHVrUcxjc3jiF68P8oB",
209
+ issuer_v3: "KT1DfymMp3qD5Pd5ujPjp7UsQbppY9yY1Hbf",
210
+ marketplace_v1: "KT1DbivePcuUzCp5RaAQWxPSLV9G2Ys4faUR",
211
+ marketplace_v2: "KT1HFYtf4vNCr4xRDZxLKc5asUdCsPUTTW9R",
212
+ marketplace_v3: "KT1J6rt4d9U785DZWYEPvQ2fR1e71gxP42Lj",
213
+ moderation_articles: "KT1Qg78fa81Xyjh65yNqUgVucubHUyq6VmgL",
214
+ moderation_team: "KT1RsfyWzHs1EEWMzFLmKnJTQwPqRzsnF3Dp",
215
+ moderation_token: "KT1PokFR36CcXKh3jUnjncabcuPWm5BMiqjt",
216
+ moderation_token_v3: "KT1C1J38YR6eDvRBDEDaypptCFda9aH7FRbJ",
217
+ moderation_user: "KT1Q3s7mYpscCnwsyndrVZg9WqBCmw99n37g",
218
+ pricing_dutch_auction: "KT1BqikbUisiBBd9WvPiqnTwLY8Pm68p2Aua",
219
+ pricing_dutch_auction_v3: "KT1QCboxZ28SqsfyZWTDrkSpZzU6xjZXBsFb",
220
+ pricing_fixed: "KT1PAsf9Zc9FGJA9iLE1Ab2vPkMDsh4hyZVi",
221
+ pricing_fixed_v3: "KT1Mqyy5JPknNzNJtgF93SHpFHv4VcYrNZry",
222
+ randomizer: "KT1QmdsrJWJgK3VXid8q7D4sPipVoc9jh12x",
223
+ randomizer_v2: "KT1Eow4nBY3B9EhWcX1aEXva67VkNFfP1Tq6",
224
+ token_moderation: "KT1BHfPDMRp2q48ZkmmnK7TRzQRdFnp6XVKq",
225
+ treasury: "KT1MbDbRhZPs5TzZEXkT142ePoccFHfohBoo",
226
+ user_moderation: "KT1LmZjoitx2itnB1qCbHMrT3V64RbuSPf3a",
227
+ user_register: "KT1XaikgmBDQANBvkFqyFhSpgAZJAXpiDFGE",
228
+ onchfs_files: "KT1FA8AGGcJha6S6MqfBUiibwTaYhK8u7s9Q"
229
+ };
230
+ const tezosMainnetContracts = {
231
+ allowed_mint: "KT1VDQwskdfHkSbA9W6CSEnxnh1u1XU8K8Gu",
232
+ allowed_mint_issuer: "KT1Djz5ix2yEGmV7PMq3GYq17TvMMkd1anT2",
233
+ allowed_mint_issuer_v3: "KT1LJ4R4xoEWMgTjrGrdHJAeHLYFaB4RsoVK",
234
+ allowed_mint_v3: "KT1KgEjxqfRCMwtCGifT6fDPwC35RptTUEvE",
235
+ articles: "KT1GtbuswcNMGhHF2TSuH1Yfaqn16do8Qtva",
236
+ card_proxy: "KT1DQGSRsgHcf2TPdKGc4qm5AT9JprJCAo7j",
237
+ collaboration_factory: "KT1JrUPSCt1r2MB2J7Lk2KwiWSYr3Mr414ck",
238
+ consumable_database: "KT1Mbfkqh5EhebWuMvqAfUPTpgiBPwmQCDSD",
239
+ cycles: "KT1BgD9SPfysnMz3vkfm6ZEaGFKCVcE5ay91",
240
+ gentk_v1: "KT1KEa8z6vWXDJrVqtMrAeDVzsvxat3kHaCE",
241
+ gentk_v1_data: "KT1WRpPyXHSCbTfDQFWVXbMpxxvf7Y7KChxc",
242
+ gentk_v2: "KT1U6EHmNxJTkvaWJ4ThczG4FSDaHC21ssvi",
243
+ gentk_v3: "KT1EfsNuqwLAWDd3o4pvfUx1CAh5GMdTrRvr",
244
+ issuer_tickets: "KT19etLCjCCzTLFFAxsxLFsVYMRPetr2bTD5",
245
+ issuer_v0: "KT1AEVuykWeuuFX7QkEAMNtffzwhe1Z98hJS",
246
+ issuer_v1: "KT1XCoGnfupWk7Sp8536EfrxcP73LmT68Nyr",
247
+ issuer_v2: "KT1BJC12dG17CVvPKJ1VYaNnaT5mzfnUTwXv",
248
+ issuer_v3: "KT1Xpmp15KfqoePNW9HczFmqaGNHwadV2a3b",
249
+ marketplace_v1: "KT1Xo5B7PNBAeynZPmca4bRh6LQow4og1Zb9",
250
+ marketplace_v2: "KT1GbyoDi7H1sfXmimXpptZJuCdHMh66WS9u",
251
+ marketplace_v3: "KT1M1NyU9X4usEimt2f3kDaijZnDMNBu42Ja",
252
+ moderation_articles: "KT1A36z7nG4zPDbhjyrzhYf9SCn5ipPZeRMQ",
253
+ moderation_team: "KT1FvGQcPxzuJkJsdWFQiGkueSNT5mqpFDrf",
254
+ moderation_token: "KT18tPu7uXy9PJ97i3qCLsr7an4X6sQ5qxU7",
255
+ moderation_token_v3: "KT1UBWXN1KxTh4eurrCTCH7aEjqdrM3HjP6R",
256
+ moderation_user: "KT1Wn2kkKmdbyLWBiLXWCkE7fKj1LsLKar2A",
257
+ pricing_dutch_auction: "KT1EzLrXRCXij42pKfbZPn48PuxrnVki1aYY",
258
+ pricing_dutch_auction_v3: "KT1MFgHKorMWXeVL6qrpgjZmemirafppSg9q",
259
+ pricing_fixed: "KT1FHzHxuMaNLYG8LdniY45M6RCfkF3AoXFh",
260
+ pricing_fixed_v3: "KT1V24J6FVuKPU3xy6gVF6wJ3zdRXBheQhaV",
261
+ randomizer: "KT1XYgKrzBbzsckGvXTPgxFyN7KNZ9RPYVWf",
262
+ randomizer_v2: "KT1CfmepqJkfZwqLPFVMKFoYUS7dPPZHyCTo",
263
+ token_moderation: "KT1HgVuzNWVvnX16fahbV2LrnpwifYKoFMRd",
264
+ treasury: "KT1P2BXYb894MekrCcSrnidzQYPVqitLoVLc",
265
+ user_moderation: "KT1TWWQ6FtLoosVfZgTKV2q68TMZaENhGm54",
266
+ user_register: "KT1Ezht4PDKZri7aVppVGT4Jkw39sesaFnww",
267
+ onchfs_files: "KT1Ae7dT1gsLw2tRnUMXSCmEyF74KVkM6LUo"
276
268
  };
277
269
 
278
- // src/contracts/eth.ts
279
- var ethTestnetContracts = {
280
- multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11",
281
- seaport_zone: "0x0000000006B429721d1F4c4cD256BF3A38c09Ac6",
282
- issuer_factory_v1: "0x4e9ef916F55B5d4a27E6406C7Ce8bcd29c2693d6",
283
- mint_ticket_factory_v1: "0xbaed21d8C57caf71578b9aE1E09a68721d0Dd02d",
284
- dutch_auction_minter_v1: "0x2F8ea350E7F29BCaC2AEE5889d64df07EE3Fa98d",
285
- fixed_price_minter_v1: "0xa6c9c758e80ec18e1a28d485b97400B11dCFCD64",
286
- ticket_redeemer_v1: "0xdd29eA613e0553fc03f5762Bf643710a7987A216",
287
- ipfs_renderer_v1: "0x17b9c8a7C6F9D3768D4DA75EBB6abDe9FBe900cf",
288
- onchfs_renderer_v1: "0x25B087D2c87a0b34188a530dC9cCfDa30822AA8e",
289
- randomizer_v1: "0x5962e4dEeDe2DB4A83259255D30c19F4397FD5A6",
290
- role_registry_v1: "0x92B70c5C6E676BdC395DfD911c07392fc7C36E4F",
291
- contract_registry_v1: "0xb7CFDcDb2c6a1D05D7b85FB4ae7B7bccd028010F",
292
- gen_art_token_impl_v1: "0x1feeb359e96E6Dd6F19F1FC98e8FffDdf5AeaD58",
293
- mint_ticket_impl_v1: "0x0303e3a5be6e9Fa21E72cE446a402a6AEec13c60",
294
- onchfs_file_system: "0x4f555d39e89f6d768f75831d610b3940fa94c6b1",
295
- onchfs_content_store: "0x070e5A608705aC4954eec054f9074eEe49bDcbfF",
296
- seaport: "0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0",
297
- fxhashTeamSafeAddress: "0x4F073947573FF44621cA25061Fb035c73a3014ab",
298
- signerSafe: "0x4F073947573FF44621cA25061Fb035c73a3014ab",
299
- moderationSafe: "0x4F073947573FF44621cA25061Fb035c73a3014ab",
300
- farcaster_frame_fixed_price_minter_v1: "0xB0905f81167bD90ABD5a583E029D27DA77568084",
301
- fx_token: "0xfa2e08ebfa6dae5ff68c3a0e2eb33a78f363f9fe"
302
- };
303
- var ethMainnetContracts = {
304
- multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11",
305
- seaport_zone: "0x0000000006B429721d1F4c4cD256BF3A38c09Ac6",
306
- issuer_factory_v1: "0x442295de8A31d65026dBc09c29d469F6854f188a",
307
- mint_ticket_factory_v1: "0xDB92ed0e6265d042F05E5C2f6D2F99496e87D706",
308
- dutch_auction_minter_v1: "0x1bC736a2b144096a4752534C557D7E6C311CcAF1",
309
- fixed_price_minter_v1: "0xB645cFfD9bFB93c2c181d5Be0D6a8C1d81C2aEf3",
310
- ticket_redeemer_v1: "0x3D72011b1bB52e33f9D81Fc5553FF4765e3f32c1",
311
- ipfs_renderer_v1: "0x48F00F8314920ca0cd763D74acFe8cFE4024a274",
312
- onchfs_renderer_v1: "0xe9fE6b2e494E40404AcB2b8B0a0Bc7b79FD03c83",
313
- randomizer_v1: "0xED32Ed47A75e298433cF822E10645C04a0B95075",
314
- role_registry_v1: "0x22b9Dd17BA1132C027d780bC0A784f08f244022B",
315
- contract_registry_v1: "0x4DAc308c686D747A804B7E95db606695a529A750",
316
- gen_art_token_impl_v1: "0x429AC1aA66220573Da6928bcce7384fe50e1284f",
317
- mint_ticket_impl_v1: "0xc2743B0B901eDAA8ccd1A09914449A797e1079F1",
318
- onchfs_file_system: "0x9e0f2864c6f125bbf599df6ca6e6c3774c5b2e04",
319
- onchfs_content_store: "0xC6806fd75745bB5F5B32ADa19963898155f9DB91",
320
- seaport: "0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0",
321
- fxhashTeamSafeAddress: "0xD8b1905022d70e74c6c8aaA2baaf275fBe1634f1",
322
- signerSafe: "0xB456aF77dEB65065462BD1f0D9098413E6CA4200",
323
- moderationSafe: "0x99CDaECbe1be4B7232a4f2c79EF76D403886FE1E",
324
- farcaster_frame_fixed_price_minter_v1: "0x6e625892C739bFD960671Db5544E260757480725",
325
- fx_token: "0xTODO"
270
+ //#endregion
271
+ //#region src/contracts/eth.ts
272
+ const ethTestnetContracts = {
273
+ multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11",
274
+ seaport_zone: "0x0000000006B429721d1F4c4cD256BF3A38c09Ac6",
275
+ issuer_factory_v1: "0x4e9ef916F55B5d4a27E6406C7Ce8bcd29c2693d6",
276
+ mint_ticket_factory_v1: "0xbaed21d8C57caf71578b9aE1E09a68721d0Dd02d",
277
+ dutch_auction_minter_v1: "0x2F8ea350E7F29BCaC2AEE5889d64df07EE3Fa98d",
278
+ fixed_price_minter_v1: "0xa6c9c758e80ec18e1a28d485b97400B11dCFCD64",
279
+ ticket_redeemer_v1: "0xdd29eA613e0553fc03f5762Bf643710a7987A216",
280
+ ipfs_renderer_v1: "0x17b9c8a7C6F9D3768D4DA75EBB6abDe9FBe900cf",
281
+ onchfs_renderer_v1: "0x25B087D2c87a0b34188a530dC9cCfDa30822AA8e",
282
+ randomizer_v1: "0x5962e4dEeDe2DB4A83259255D30c19F4397FD5A6",
283
+ role_registry_v1: "0x92B70c5C6E676BdC395DfD911c07392fc7C36E4F",
284
+ contract_registry_v1: "0xb7CFDcDb2c6a1D05D7b85FB4ae7B7bccd028010F",
285
+ gen_art_token_impl_v1: "0x1feeb359e96E6Dd6F19F1FC98e8FffDdf5AeaD58",
286
+ mint_ticket_impl_v1: "0x0303e3a5be6e9Fa21E72cE446a402a6AEec13c60",
287
+ onchfs_file_system: "0x4f555d39e89f6d768f75831d610b3940fa94c6b1",
288
+ onchfs_content_store: "0x070e5A608705aC4954eec054f9074eEe49bDcbfF",
289
+ seaport: "0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0",
290
+ fxhashTeamSafeAddress: "0x4F073947573FF44621cA25061Fb035c73a3014ab",
291
+ signerSafe: "0x4F073947573FF44621cA25061Fb035c73a3014ab",
292
+ moderationSafe: "0x4F073947573FF44621cA25061Fb035c73a3014ab",
293
+ farcaster_frame_fixed_price_minter_v1: "0xB0905f81167bD90ABD5a583E029D27DA77568084",
294
+ fx_token: "0xfa2e08ebfa6dae5ff68c3a0e2eb33a78f363f9fe"
295
+ };
296
+ /**
297
+ * TODO
298
+ * -----------------------------------------------------------------------------
299
+ * Put the actual addresses.
300
+ */
301
+ const ethMainnetContracts = {
302
+ multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11",
303
+ seaport_zone: "0x0000000006B429721d1F4c4cD256BF3A38c09Ac6",
304
+ issuer_factory_v1: "0x442295de8A31d65026dBc09c29d469F6854f188a",
305
+ mint_ticket_factory_v1: "0xDB92ed0e6265d042F05E5C2f6D2F99496e87D706",
306
+ dutch_auction_minter_v1: "0x1bC736a2b144096a4752534C557D7E6C311CcAF1",
307
+ fixed_price_minter_v1: "0xB645cFfD9bFB93c2c181d5Be0D6a8C1d81C2aEf3",
308
+ ticket_redeemer_v1: "0x3D72011b1bB52e33f9D81Fc5553FF4765e3f32c1",
309
+ ipfs_renderer_v1: "0x48F00F8314920ca0cd763D74acFe8cFE4024a274",
310
+ onchfs_renderer_v1: "0xe9fE6b2e494E40404AcB2b8B0a0Bc7b79FD03c83",
311
+ randomizer_v1: "0xED32Ed47A75e298433cF822E10645C04a0B95075",
312
+ role_registry_v1: "0x22b9Dd17BA1132C027d780bC0A784f08f244022B",
313
+ contract_registry_v1: "0x4DAc308c686D747A804B7E95db606695a529A750",
314
+ gen_art_token_impl_v1: "0x429AC1aA66220573Da6928bcce7384fe50e1284f",
315
+ mint_ticket_impl_v1: "0xc2743B0B901eDAA8ccd1A09914449A797e1079F1",
316
+ onchfs_file_system: "0x9e0f2864c6f125bbf599df6ca6e6c3774c5b2e04",
317
+ onchfs_content_store: "0xC6806fd75745bB5F5B32ADa19963898155f9DB91",
318
+ seaport: "0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0",
319
+ fxhashTeamSafeAddress: "0xD8b1905022d70e74c6c8aaA2baaf275fBe1634f1",
320
+ signerSafe: "0xB456aF77dEB65065462BD1f0D9098413E6CA4200",
321
+ moderationSafe: "0x99CDaECbe1be4B7232a4f2c79EF76D403886FE1E",
322
+ farcaster_frame_fixed_price_minter_v1: "0x6e625892C739bFD960671Db5544E260757480725",
323
+ fx_token: "0xTODO"
326
324
  };
327
325
 
328
- // src/api/base.ts
329
- var baseTestnetApis = {
330
- rpcs: ["https://sepolia.base.org"],
331
- reservoir: "https://api-base-sepolia.reservoir.tools",
332
- safe: "https://safe-transaction-base-sepolia.safe.global/",
333
- whitelist: "http://localhost:9999/whitelist/new",
334
- alchemy: {
335
- rpc: "https://base-sepolia.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9"
336
- }
337
- };
338
- var baseMainnetApis = {
339
- rpcs: ["https://mainnet.base.org"],
340
- reservoir: "https://api-base.reservoir.tools",
341
- safe: "https://safe-transaction-base.safe.global/",
342
- whitelist: "https://api.v2.dev.fxhash-dev.xyz/whitelist/new",
343
- alchemy: {
344
- rpc: "https://base-mainnet.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9"
345
- }
326
+ //#endregion
327
+ //#region src/api/base.ts
328
+ const baseTestnetApis = {
329
+ rpcs: ["https://sepolia.base.org"],
330
+ reservoir: "https://api-base-sepolia.reservoir.tools",
331
+ safe: "https://safe-transaction-base-sepolia.safe.global/",
332
+ whitelist: "http://localhost:9999/whitelist/new",
333
+ alchemy: { rpc: "https://base-sepolia.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9" }
334
+ };
335
+ const baseMainnetApis = {
336
+ rpcs: ["https://mainnet.base.org"],
337
+ reservoir: "https://api-base.reservoir.tools",
338
+ safe: "https://safe-transaction-base.safe.global/",
339
+ whitelist: "https://api.v2.dev.fxhash-dev.xyz/whitelist/new",
340
+ alchemy: { rpc: "https://base-mainnet.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9" }
346
341
  };
347
342
 
348
- // src/config/metadata.ts
349
- import { failure, success } from "@fxhash/utils";
350
-
351
- // src/errors/metadata.ts
352
- import {
353
- RichError,
354
- isRichErrorMessages
355
- } from "@fxhash/errors";
343
+ //#endregion
344
+ //#region src/errors/metadata.ts
356
345
  var AppMetadataInvalidTypeError = class extends RichError {
357
- constructor() {
358
- super(...arguments);
359
- this.name = "AppMetadataInvalidTypeError";
360
- this.messages = {
361
- dev: "App metadata should be an object."
362
- };
363
- }
346
+ name = "AppMetadataInvalidTypeError";
347
+ messages = { dev: "App metadata should be an object." };
364
348
  };
365
349
  var AppMetadataMissingPropertiesError = class extends RichError {
366
- constructor(par1) {
367
- super(
368
- isRichErrorMessages(par1) ? par1 : {
369
- dev: `App metadata is missing required properties ${par1.map((p) => `"${p}"`).join(", ")}`
370
- }
371
- );
372
- this.name = "AppMetadataMissingPropertiesError";
373
- }
350
+ name = "AppMetadataMissingPropertiesError";
351
+ constructor(par1) {
352
+ super(isRichErrorMessages(par1) ? par1 : { dev: `App metadata is missing required properties ${par1.map((p) => `"${p}"`).join(", ")}` });
353
+ }
374
354
  };
375
355
 
376
- // src/config/metadata.ts
377
- var crossEnvMetadata = {
378
- name: "FXHASH",
379
- description: "fxhash is a blockchain open platform for Generative Art",
380
- icon: "https://gateway.fxhash2.xyz/ipfs/QmUQUtCenBEYQLoHvfFCRxyHYDqBE49UGxtcp626FZnFDG"
381
- };
356
+ //#endregion
357
+ //#region src/config/metadata.ts
358
+ const crossEnvMetadata = {
359
+ name: "FXHASH",
360
+ description: "fxhash is a blockchain open platform for Generative Art",
361
+ icon: "https://gateway.fxhash2.xyz/ipfs/QmUQUtCenBEYQLoHvfFCRxyHYDqBE49UGxtcp626FZnFDG"
362
+ };
363
+ /**
364
+ * Get application metadata by merging some cross-env metadata with an
365
+ * environment-specific URL (application front-end).
366
+ */
382
367
  function fxAppEnvMetadata(env) {
383
- return {
384
- ...crossEnvMetadata,
385
- url: fxApisByEnv(env).website
386
- };
368
+ return {
369
+ ...crossEnvMetadata,
370
+ url: fxApisByEnv(env).website
371
+ };
387
372
  }
373
+ /**
374
+ * Test whether some value is a valid {@link IAppMetadata} interface. If not,
375
+ * the issue causing it to be invalid is returned as a failure.
376
+ * @param value Any value which should be tested for being valid App Metadata
377
+ * @returns A Result with void success or failure with the issue
378
+ */
388
379
  function isAppMetadataValid(value) {
389
- if (!(typeof value === "object"))
390
- return failure(new AppMetadataInvalidTypeError());
391
- const missingProperties = [];
392
- const requiredProperties = [
393
- "name",
394
- "description",
395
- "url"
396
- ];
397
- for (const prop of requiredProperties) {
398
- if (!value[prop]) missingProperties.push(prop);
399
- }
400
- if (missingProperties.length > 0)
401
- return failure(new AppMetadataMissingPropertiesError(missingProperties));
402
- return success();
380
+ if (!(typeof value === "object")) return failure(new AppMetadataInvalidTypeError());
381
+ const missingProperties = [];
382
+ const requiredProperties = [
383
+ "name",
384
+ "description",
385
+ "url"
386
+ ];
387
+ for (const prop of requiredProperties) if (!value[prop]) missingProperties.push(prop);
388
+ if (missingProperties.length > 0) return failure(new AppMetadataMissingPropertiesError(missingProperties));
389
+ return success();
403
390
  }
404
391
 
405
- // src/config/algolia.ts
406
- var algoliaConfig = {
407
- enabled: true,
408
- indexGenerativeTokens: "generative-tokens",
409
- indexOffers: "listings",
410
- indexUsers: "users",
411
- indexArticles: "articles",
412
- indexAccounts: "accounts"
413
- };
414
- var algoliaConfigDev = {
415
- appId: "T4XRS2LFQK",
416
- ...algoliaConfig
417
- };
418
- var algoliaConfigProd = {
419
- appId: "F7M6D8T095",
420
- ...algoliaConfig
392
+ //#endregion
393
+ //#region src/config/algolia.ts
394
+ const algoliaConfig = {
395
+ enabled: true,
396
+ indexGenerativeTokens: "generative-tokens",
397
+ indexOffers: "listings",
398
+ indexUsers: "users",
399
+ indexArticles: "articles",
400
+ indexAccounts: "accounts"
401
+ };
402
+ const algoliaConfigDev = {
403
+ appId: "T4XRS2LFQK",
404
+ ...algoliaConfig
405
+ };
406
+ const algoliaConfigProd = {
407
+ appId: "F7M6D8T095",
408
+ ...algoliaConfig
421
409
  };
422
410
 
423
- // src/config/gpu.ts
424
- var GPU_VERSIONS = ["v111", "v132"];
425
- var gpuRenderingConfigShared = {
426
- v111: {
427
- date: "2023-03-06",
428
- version: "111.0.5563.64"
429
- },
430
- v132: {
431
- date: "2025-01-14",
432
- version: "132.0.6834.110"
433
- }
434
- };
435
- var createEnvConfig = (batchArns) => {
436
- return Object.fromEntries(
437
- GPU_VERSIONS.map((version) => [
438
- version,
439
- {
440
- ...gpuRenderingConfigShared[version],
441
- batchArn: batchArns[version]
442
- }
443
- ])
444
- );
445
- };
446
- var gpuRenderingConfigDev = createEnvConfig({
447
- v111: "arn:aws:batch:us-east-1:409089350506:job-definition/fxhash-batch-dev-fxhash-extract-chrome-v111",
448
- v132: "arn:aws:batch:us-east-1:409089350506:job-definition/fxhash-batch-dev-fxhash-extract-chrome-v132"
411
+ //#endregion
412
+ //#region src/config/gpu.ts
413
+ const GPU_VERSIONS = ["v111", "v132"];
414
+ const gpuRenderingConfigShared = {
415
+ v111: {
416
+ date: "2023-03-06",
417
+ version: "111.0.5563.64"
418
+ },
419
+ v132: {
420
+ date: "2025-01-14",
421
+ version: "132.0.6834.110"
422
+ }
423
+ };
424
+ const createEnvConfig = (batchArns) => {
425
+ return Object.fromEntries(GPU_VERSIONS.map((version) => [version, {
426
+ ...gpuRenderingConfigShared[version],
427
+ batchArn: batchArns[version]
428
+ }]));
429
+ };
430
+ const gpuRenderingConfigDev = createEnvConfig({
431
+ v111: "arn:aws:batch:us-east-1:409089350506:job-definition/fxhash-batch-dev-fxhash-extract-chrome-v111",
432
+ v132: "arn:aws:batch:us-east-1:409089350506:job-definition/fxhash-batch-dev-fxhash-extract-chrome-v132"
449
433
  });
450
- var gpuRenderingConfigProd = createEnvConfig({
451
- v111: "arn:aws:batch:us-east-1:759392670381:job-definition/fxhash-batch-prd-fxhash-extract-chrome-v111",
452
- v132: "arn:aws:batch:us-east-1:759392670381:job-definition/fxhash-batch-prd-fxhash-extract-chrome-v132"
434
+ const gpuRenderingConfigProd = createEnvConfig({
435
+ v111: "arn:aws:batch:us-east-1:759392670381:job-definition/fxhash-batch-prd-fxhash-extract-chrome-v111",
436
+ v132: "arn:aws:batch:us-east-1:759392670381:job-definition/fxhash-batch-prd-fxhash-extract-chrome-v132"
453
437
  });
454
438
 
455
- // src/contracts/base.ts
456
- var baseTestnetContracts = {
457
- multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11",
458
- seaport_zone: "0x0000000006B429721d1F4c4cD256BF3A38c09Ac6",
459
- issuer_factory_v1: "0x60cFDE3aaf6E938535767794088cf15EaaC50019",
460
- mint_ticket_factory_v1: "0x8A7e5eE0CeA42DBE1d2aAC4501262B0edC5B518B",
461
- dutch_auction_minter_v1: "0xeb5Cee0eD6A47BE2A463A0C9e83dA5DE6149d375",
462
- fixed_price_minter_v1: "0x29159d2DFbF93E991d39Dc080a5f8dcc5C90ebb8",
463
- ticket_redeemer_v1: "0xFfbC4F51AB33E14380893213d7C969e0626c4C43",
464
- ipfs_renderer_v1: "0x7657C31078d8bfB8d1BC127fC04dAd23B3f451ed",
465
- onchfs_renderer_v1: "0xf23C64BA846557c24E6F5086376047b0CE70d1cC",
466
- randomizer_v1: "0xCA6323f03B5113471BA3b7B2F4Ba0AA2D45aE257",
467
- role_registry_v1: "0x179f5B8FE1c270D7fC1807355F3fd981A30e21A6",
468
- contract_registry_v1: "0xd44B3b2Ee596613c1aFcF85c9b0E41A0ec8B79E2",
469
- gen_art_token_impl_v1: "0x06976f5C039497d8a79Cc0dCE7A95B3E9748164A",
470
- mint_ticket_impl_v1: "0xa71b5935366BA29332033217a9E83698acadfd2f",
471
- onchfs_file_system: "0x3fb48e03291b2490f939c961a1ad088437129f71",
472
- onchfs_content_store: "0x48AC7370df2d5982852172A4D857c29608AFa774",
473
- seaport: "0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0",
474
- fxhashTeamSafeAddress: "0x8a4f6e1ae6Bb77EFE7646f9649Bfd519fA638871",
475
- signerSafe: "0x8a4f6e1ae6Bb77EFE7646f9649Bfd519fA638871",
476
- moderationSafe: "0x8a4f6e1ae6Bb77EFE7646f9649Bfd519fA638871",
477
- farcaster_frame_fixed_price_minter_v1: "0xB0905f81167bD90ABD5a583E029D27DA77568084",
478
- fx_token: "0xd89fdcB6c8D107f27CEe4452Ccfb70Dc4F9768a7",
479
- fx_airdrop: "0x1e4e821216582f0771528b848b4a51c8474be2c7",
480
- fx_tez_airdrop: "0x3c2b4c38d37affb023a1d2327af428909eb8a134",
481
- fx_token_launchpad: "0xC8b352C819B57F0991fAFcEDFdEf241A1950d0E4",
482
- fx_project_factory: "0x7e535239AcE186c0d95e89F0c64f57481A987cE5"
483
- };
484
- var baseMainnetContracts = {
485
- multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11",
486
- seaport_zone: "0x0000000006B429721d1F4c4cD256BF3A38c09Ac6",
487
- issuer_factory_v1: "0xf05636d65c7a10dF989eC2411D4F3230d3A02f3D",
488
- mint_ticket_factory_v1: "0xe5832D3a3da179e818e9E3bFF7b96A928b29Eda2",
489
- dutch_auction_minter_v1: "0x9667a1Cf26223c9de22207DD93cfEEc9237b8f4E",
490
- fixed_price_minter_v1: "0x4bDcaC532143d8d35ed759189EE22E3704580b9D",
491
- ticket_redeemer_v1: "0x972502Bc75A780D76495Ffa84Cf8DA301F162Df6",
492
- ipfs_renderer_v1: "0x9c4cC8403bE33B89a46794Ae409ce634ca567956",
493
- onchfs_renderer_v1: "0x4180D747e984C9CFEEfaF23944AE0C20c0742341",
494
- randomizer_v1: "0x6754E97b8eaeC13Fa24480E9d1240176Dd0f2911",
495
- role_registry_v1: "0x8d3C748e99066e15425BA1620cdD066d85D6d918",
496
- contract_registry_v1: "0xCa6e30B1C7cBE7cF605cE30B334f968C5E2EA016",
497
- gen_art_token_impl_v1: "0xC5769428823C9a0393DC66855DD3817b2A85BEFD",
498
- mint_ticket_impl_v1: "0x3e9754Da0fb002Fa13D69B2f313d5CB441fC8ef5",
499
- onchfs_file_system: "0x2983008f292a43f208bba0275afd7e9b3d39af3b",
500
- onchfs_content_store: "0x070e5A608705aC4954eec054f9074eEe49bDcbfF",
501
- seaport: "0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0",
502
- fxhashTeamSafeAddress: "0x38D3a2F9c63D4a580f100B051ba137fa6d8e2560",
503
- signerSafe: "0x38D3a2F9c63D4a580f100B051ba137fa6d8e2560",
504
- moderationSafe: "0x38D3a2F9c63D4a580f100B051ba137fa6d8e2560",
505
- farcaster_frame_fixed_price_minter_v1: "0x6e625892C739bFD960671Db5544E260757480725",
506
- fx_token: "0xTODO",
507
- fx_airdrop: "0xTODO",
508
- fx_tez_airdrop: "0xTODO",
509
- fx_token_launchpad: "0xTODO",
510
- fx_project_factory: "0xTODO"
439
+ //#endregion
440
+ //#region src/contracts/base.ts
441
+ const baseTestnetContracts = {
442
+ multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11",
443
+ seaport_zone: "0x0000000006B429721d1F4c4cD256BF3A38c09Ac6",
444
+ issuer_factory_v1: "0x60cFDE3aaf6E938535767794088cf15EaaC50019",
445
+ mint_ticket_factory_v1: "0x8A7e5eE0CeA42DBE1d2aAC4501262B0edC5B518B",
446
+ dutch_auction_minter_v1: "0xeb5Cee0eD6A47BE2A463A0C9e83dA5DE6149d375",
447
+ fixed_price_minter_v1: "0x29159d2DFbF93E991d39Dc080a5f8dcc5C90ebb8",
448
+ ticket_redeemer_v1: "0xFfbC4F51AB33E14380893213d7C969e0626c4C43",
449
+ ipfs_renderer_v1: "0x7657C31078d8bfB8d1BC127fC04dAd23B3f451ed",
450
+ onchfs_renderer_v1: "0xf23C64BA846557c24E6F5086376047b0CE70d1cC",
451
+ randomizer_v1: "0xCA6323f03B5113471BA3b7B2F4Ba0AA2D45aE257",
452
+ role_registry_v1: "0x179f5B8FE1c270D7fC1807355F3fd981A30e21A6",
453
+ contract_registry_v1: "0xd44B3b2Ee596613c1aFcF85c9b0E41A0ec8B79E2",
454
+ gen_art_token_impl_v1: "0x06976f5C039497d8a79Cc0dCE7A95B3E9748164A",
455
+ mint_ticket_impl_v1: "0xa71b5935366BA29332033217a9E83698acadfd2f",
456
+ onchfs_file_system: "0x3fb48e03291b2490f939c961a1ad088437129f71",
457
+ onchfs_content_store: "0x48AC7370df2d5982852172A4D857c29608AFa774",
458
+ seaport: "0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0",
459
+ fxhashTeamSafeAddress: "0x8a4f6e1ae6Bb77EFE7646f9649Bfd519fA638871",
460
+ signerSafe: "0x8a4f6e1ae6Bb77EFE7646f9649Bfd519fA638871",
461
+ moderationSafe: "0x8a4f6e1ae6Bb77EFE7646f9649Bfd519fA638871",
462
+ farcaster_frame_fixed_price_minter_v1: "0xB0905f81167bD90ABD5a583E029D27DA77568084",
463
+ fx_token: "0xd89fdcB6c8D107f27CEe4452Ccfb70Dc4F9768a7",
464
+ fx_airdrop: "0x1e4e821216582f0771528b848b4a51c8474be2c7",
465
+ fx_tez_airdrop: "0x3c2b4c38d37affb023a1d2327af428909eb8a134",
466
+ fx_token_launchpad: "0x2f949f7cD46F4D79d4FD6b234DB302cAeEe552e2",
467
+ fx_project_factory: "0xcA9486e54FbBD6aCe6eB6AA0102ee97dd90A8a86"
468
+ };
469
+ const baseMainnetContracts = {
470
+ multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11",
471
+ seaport_zone: "0x0000000006B429721d1F4c4cD256BF3A38c09Ac6",
472
+ issuer_factory_v1: "0xf05636d65c7a10dF989eC2411D4F3230d3A02f3D",
473
+ mint_ticket_factory_v1: "0xe5832D3a3da179e818e9E3bFF7b96A928b29Eda2",
474
+ dutch_auction_minter_v1: "0x9667a1Cf26223c9de22207DD93cfEEc9237b8f4E",
475
+ fixed_price_minter_v1: "0x4bDcaC532143d8d35ed759189EE22E3704580b9D",
476
+ ticket_redeemer_v1: "0x972502Bc75A780D76495Ffa84Cf8DA301F162Df6",
477
+ ipfs_renderer_v1: "0x9c4cC8403bE33B89a46794Ae409ce634ca567956",
478
+ onchfs_renderer_v1: "0x4180D747e984C9CFEEfaF23944AE0C20c0742341",
479
+ randomizer_v1: "0x6754E97b8eaeC13Fa24480E9d1240176Dd0f2911",
480
+ role_registry_v1: "0x8d3C748e99066e15425BA1620cdD066d85D6d918",
481
+ contract_registry_v1: "0xCa6e30B1C7cBE7cF605cE30B334f968C5E2EA016",
482
+ gen_art_token_impl_v1: "0xC5769428823C9a0393DC66855DD3817b2A85BEFD",
483
+ mint_ticket_impl_v1: "0x3e9754Da0fb002Fa13D69B2f313d5CB441fC8ef5",
484
+ onchfs_file_system: "0x2983008f292a43f208bba0275afd7e9b3d39af3b",
485
+ onchfs_content_store: "0x070e5A608705aC4954eec054f9074eEe49bDcbfF",
486
+ seaport: "0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0",
487
+ fxhashTeamSafeAddress: "0x38D3a2F9c63D4a580f100B051ba137fa6d8e2560",
488
+ signerSafe: "0x38D3a2F9c63D4a580f100B051ba137fa6d8e2560",
489
+ moderationSafe: "0x38D3a2F9c63D4a580f100B051ba137fa6d8e2560",
490
+ farcaster_frame_fixed_price_minter_v1: "0x6e625892C739bFD960671Db5544E260757480725",
491
+ fx_token: "0x5Fc2843838e65eb0B5d33654628F446d54602791",
492
+ fx_airdrop: "0x45BB9DF166Fda4afD7e533DE42B11579a1F09d43",
493
+ fx_tez_airdrop: "0x5021910a5762F9C872Bf7D6CD5F09127aE8cCA84",
494
+ fx_token_launchpad: "0xTODO",
495
+ fx_project_factory: "0xTODO"
511
496
  };
512
497
 
513
- // src/types.ts
514
- var BlockchainIdentifiers = {
515
- TezosGhostnet: "tezos:NetXnHfVqm9iesp",
516
- TezosMainnet: "tezos:NetXdQprcVkpaWU",
517
- EthereumMainnet: "eip155:1",
518
- EthereumGoerli: "eip155:5",
519
- EthereumSepolia: "eip155:11155111",
520
- BaseSepolia: "eip155:84532",
521
- BaseMainnet: "eip155:8453"
498
+ //#endregion
499
+ //#region src/types.ts
500
+ /**
501
+ * A mapping of blockchains in their "human-readable" format with their proper
502
+ * blockchain identifier.
503
+ */
504
+ const BlockchainIdentifiers = {
505
+ TezosGhostnet: "tezos:NetXnHfVqm9iesp",
506
+ TezosMainnet: "tezos:NetXdQprcVkpaWU",
507
+ EthereumMainnet: "eip155:1",
508
+ EthereumGoerli: "eip155:5",
509
+ EthereumSepolia: "eip155:11155111",
510
+ BaseSepolia: "eip155:84532",
511
+ BaseMainnet: "eip155:8453"
522
512
  };
523
513
 
524
- // src/constants.ts
525
- var AUTH_JWT_PK_DEV = `-----BEGIN PUBLIC KEY-----
514
+ //#endregion
515
+ //#region src/constants.ts
516
+ const AUTH_JWT_PK_DEV = `-----BEGIN PUBLIC KEY-----
526
517
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1hF8JwAxIiFWzbXIgeOK
527
518
  Bzf6SZlT3S1YampzVgy4pw1G0aKwHnyvC+HrRfkEOCGxX24DqbEpZby2LjKF9bfa
528
519
  OLrERrNSNrDLXbf3ipKQrnEBu2UdT2pE5UF/SwJUTdGczb78EId0yIjuZ26qZcQg
@@ -531,7 +522,7 @@ UlsKGy4/jY2OIEKCravCoXmpeX9pxploED/DoJJI9FZXVB7/91iIb6MI0Ycby+xo
531
522
  GL/cF+ZYSVRoFexji4vpycJfltW5YJ8jHSveZWa6LXqM6LY7zRFmlxb3SF4tsDTT
532
523
  PQIDAQAB
533
524
  -----END PUBLIC KEY-----`;
534
- var AUTH_JWT_PK_PRD = `-----BEGIN PUBLIC KEY-----
525
+ const AUTH_JWT_PK_PRD = `-----BEGIN PUBLIC KEY-----
535
526
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtwl1CRvpN7MZeGGDTy8x
536
527
  +W3EkZfBzZqEp3vahCaqBdMkMhy7oB1pUU7pjb34tg9epnKdKo0cZn+Bw1LkSKWh
537
528
  Z1DSbgCdNR47qKb4xN8mZ5VvEw/64+nUXbCOikX+rMqSE2tNeNU3KOYr8VQYt9dv
@@ -541,299 +532,316 @@ NkT5zOaAJARzl69hEMQAv9qUkokwPSHlcG+LakhTGYAyMe3w/KHXVRkWjuCUgUJf
541
532
  JwIDAQAB
542
533
  -----END PUBLIC KEY-----`;
543
534
 
544
- // src/config.ts
545
- var tezosFees = {
546
- primary: 500,
547
- secondary: 250
548
- };
549
- var ethFees = {
550
- primary: 1e3,
551
- secondary: 2500
552
- };
553
- var baseFees = {
554
- primary: 1e3,
555
- secondary: 2500
556
- };
557
- var fxhashConfig = {
558
- networks: {
559
- testnet: {
560
- tez: {
561
- contracts: tezosTestnetContracts,
562
- config: {
563
- network: "ghostnet",
564
- chainId: BlockchainIdentifiers.TezosGhostnet,
565
- ethFeeReceiver: "0x",
566
- wertRelayer: "tz1T2uyYTshSGrEg13VGJFqsWwbi2H175hZb",
567
- fxhashFees: tezosFees,
568
- royaltyBasisPoint: 1e3,
569
- splitBasisPoint: 1e3
570
- },
571
- apis: tezosTestnetApis
572
- },
573
- eth: {
574
- contracts: ethTestnetContracts,
575
- config: {
576
- network: "Sepolia",
577
- chainId: BlockchainIdentifiers.EthereumSepolia,
578
- ethFeeReceiver: "0xe1f04609f7bC45e23a1BA4CD4a76f476755beBA6",
579
- wertRelayer: "0x2ff0ec69341f43cc462251bd49bb63681adafcb0",
580
- fxhashFees: ethFees,
581
- royaltyBasisPoint: 1e4,
582
- splitBasisPoint: 1e6
583
- },
584
- apis: ethTestnetApis
585
- },
586
- base: {
587
- contracts: baseTestnetContracts,
588
- config: {
589
- network: "Base Sepolia",
590
- chainId: BlockchainIdentifiers.BaseSepolia,
591
- ethFeeReceiver: "0xF70DF285Bc6941b4760BcC041B0cA1cc50E27F8d",
592
- wertRelayer: "0x2ff0ec69341f43cc462251bd49bb63681adafcb0",
593
- fxhashFees: baseFees,
594
- royaltyBasisPoint: 1e4,
595
- splitBasisPoint: 1e6
596
- },
597
- apis: baseTestnetApis
598
- }
599
- },
600
- mainnet: {
601
- tez: {
602
- contracts: tezosMainnetContracts,
603
- config: {
604
- network: "mainnet",
605
- chainId: BlockchainIdentifiers.TezosMainnet,
606
- ethFeeReceiver: "0x",
607
- wertRelayer: "tz1KkPS1TWFyDWfQwrdvmTmsCLUNMegDrrSi",
608
- fxhashFees: tezosFees,
609
- royaltyBasisPoint: 1e3,
610
- splitBasisPoint: 1e3
611
- },
612
- apis: tezosMainnetApis
613
- },
614
- eth: {
615
- contracts: ethMainnetContracts,
616
- config: {
617
- network: "Ethereum",
618
- chainId: BlockchainIdentifiers.EthereumMainnet,
619
- ethFeeReceiver: "0xed650E40F7bd3812152D4BFA6740662F50e178DF",
620
- wertRelayer: "0xc16157e00b1bff1522c6f01246b4fb621da048d0",
621
- fxhashFees: ethFees,
622
- royaltyBasisPoint: 1e4,
623
- splitBasisPoint: 1e6
624
- },
625
- apis: ethMainnetApis
626
- },
627
- base: {
628
- contracts: baseMainnetContracts,
629
- config: {
630
- network: "Base",
631
- chainId: BlockchainIdentifiers.BaseMainnet,
632
- ethFeeReceiver: "0xF70DF285Bc6941b4760BcC041B0cA1cc50E27F8d",
633
- wertRelayer: "0xc16157e00b1bff1522c6f01246b4fb621da048d0",
634
- fxhashFees: baseFees,
635
- royaltyBasisPoint: 1e4,
636
- splitBasisPoint: 1e6
637
- },
638
- apis: baseMainnetApis
639
- }
640
- }
641
- },
642
- envs: {
643
- local: {
644
- apis: fxhashLocalApis,
645
- config: {
646
- envName: "local",
647
- metadata: fxAppEnvMetadata("local"),
648
- gtMinPrice: "0",
649
- walletConnectId: "111994543d1b754bab82c368d0e61ae5",
650
- projectLockTime: 3600,
651
- referrerShare: 0,
652
- splitsApiKey: "75348d57d6cf60fa4551766c",
653
- cloudflareTurnstileSiteKey: "1x00000000000000000000AA",
654
- cloudflareTurnstileSiteKeyV2: "0x4AAAAAAAW-w_xThcj91jkA",
655
- syndicateProjectId: "9dd71e90-4605-45f4-94e0-4e533b01081d",
656
- awsS3Bucket: "fxh-media-assets-dev-testnet-us-east-1",
657
- awsS3Region: "us-east-1",
658
- openTelemetryTarget: "http://localhost:14268",
659
- algolia: algoliaConfigDev,
660
- gpu: gpuRenderingConfigDev,
661
- authJwtPublicKey: AUTH_JWT_PK_DEV
662
- }
663
- },
664
- localDocker: {
665
- apis: fxhashLocalDockerApis,
666
- config: {
667
- envName: "localDocker",
668
- metadata: fxAppEnvMetadata("localDocker"),
669
- gtMinPrice: "0",
670
- walletConnectId: "111994543d1b754bab82c368d0e61ae5",
671
- projectLockTime: 3600,
672
- referrerShare: 0,
673
- splitsApiKey: "75348d57d6cf60fa4551766c",
674
- cloudflareTurnstileSiteKey: "1x00000000000000000000AA",
675
- cloudflareTurnstileSiteKeyV2: "0x4AAAAAAAW-w_xThcj91jkA",
676
- syndicateProjectId: "9dd71e90-4605-45f4-94e0-4e533b01081d",
677
- awsS3Bucket: "fxh-media-assets-dev-testnet-us-east-1",
678
- awsS3Region: "us-east-1",
679
- openTelemetryTarget: "http://localhost:14268",
680
- algolia: algoliaConfigDev,
681
- gpu: gpuRenderingConfigDev,
682
- authJwtPublicKey: AUTH_JWT_PK_DEV
683
- }
684
- },
685
- dev: {
686
- apis: fxhashDevApis,
687
- config: {
688
- envName: "development",
689
- metadata: fxAppEnvMetadata("dev"),
690
- gtMinPrice: "0",
691
- walletConnectId: "111994543d1b754bab82c368d0e61ae5",
692
- projectLockTime: 3600,
693
- referrerShare: 0,
694
- splitsApiKey: "75348d57d6cf60fa4551766c",
695
- cloudflareTurnstileSiteKey: "0x4AAAAAAAVOb6invoeYS4EN",
696
- cloudflareTurnstileSiteKeyV2: "0x4AAAAAAAW-w_xThcj91jkA",
697
- syndicateProjectId: "9dd71e90-4605-45f4-94e0-4e533b01081d",
698
- awsS3Bucket: "fxh-media-assets-dev-testnet-us-east-1",
699
- awsS3Region: "us-east-1",
700
- openTelemetryTarget: "https://tempo.ss.fxhash2.xyz",
701
- algolia: algoliaConfigDev,
702
- gpu: gpuRenderingConfigDev,
703
- authJwtPublicKey: AUTH_JWT_PK_DEV
704
- }
705
- },
706
- prd: {
707
- apis: fxhashPrdApis,
708
- config: {
709
- envName: "production",
710
- metadata: fxAppEnvMetadata("prd"),
711
- gtMinPrice: "0",
712
- walletConnectId: "111994543d1b754bab82c368d0e61ae5",
713
- projectLockTime: 3600,
714
- referrerShare: 0,
715
- splitsApiKey: "75348d57d6cf60fa4551766c",
716
- cloudflareTurnstileSiteKey: "0x4AAAAAAAVObp1YeuhbqNKB",
717
- cloudflareTurnstileSiteKeyV2: "0x4AAAAAAAW-yE4Q6Wdz6SNb",
718
- syndicateProjectId: "398ad73d-341c-4861-a038-f0ae1ca58e07",
719
- awsS3Bucket: "fxh-media-assets-prd-mainnet-us-east-1",
720
- awsS3Region: "us-east-1",
721
- openTelemetryTarget: "https://tempo.ss.fxhash2.xyz",
722
- algolia: algoliaConfigProd,
723
- gpu: gpuRenderingConfigProd,
724
- authJwtPublicKey: AUTH_JWT_PK_PRD
725
- }
726
- }
727
- }
535
+ //#endregion
536
+ //#region src/config.ts
537
+ /**
538
+ * ! Beware ! Changing these values will result in current
539
+ * projects breaking.
540
+ * https://github.com/fxhash/monorepo/issues/701
541
+ */
542
+ const tezosFees = {
543
+ primary: 500,
544
+ secondary: 250
545
+ };
546
+ const ethFees = {
547
+ primary: 1e3,
548
+ secondary: 2500
549
+ };
550
+ const baseFees = {
551
+ primary: 1e3,
552
+ secondary: 2500
553
+ };
554
+ /**
555
+ * --------------------------------------------------------
556
+ */
557
+ const fxhashConfig = {
558
+ networks: {
559
+ testnet: {
560
+ tez: {
561
+ contracts: tezosTestnetContracts,
562
+ config: {
563
+ network: "ghostnet",
564
+ chainId: BlockchainIdentifiers.TezosGhostnet,
565
+ ethFeeReceiver: "0x",
566
+ wertRelayer: "tz1T2uyYTshSGrEg13VGJFqsWwbi2H175hZb",
567
+ fxhashFees: tezosFees,
568
+ royaltyBasisPoint: 1e3,
569
+ splitBasisPoint: 1e3
570
+ },
571
+ apis: tezosTestnetApis
572
+ },
573
+ eth: {
574
+ contracts: ethTestnetContracts,
575
+ config: {
576
+ network: "Sepolia",
577
+ chainId: BlockchainIdentifiers.EthereumSepolia,
578
+ ethFeeReceiver: "0xe1f04609f7bC45e23a1BA4CD4a76f476755beBA6",
579
+ wertRelayer: "0x2ff0ec69341f43cc462251bd49bb63681adafcb0",
580
+ fxhashFees: ethFees,
581
+ royaltyBasisPoint: 1e4,
582
+ splitBasisPoint: 1e6
583
+ },
584
+ apis: ethTestnetApis
585
+ },
586
+ base: {
587
+ contracts: baseTestnetContracts,
588
+ config: {
589
+ network: "Base Sepolia",
590
+ chainId: BlockchainIdentifiers.BaseSepolia,
591
+ ethFeeReceiver: "0xF70DF285Bc6941b4760BcC041B0cA1cc50E27F8d",
592
+ wertRelayer: "0x2ff0ec69341f43cc462251bd49bb63681adafcb0",
593
+ fxhashFees: baseFees,
594
+ royaltyBasisPoint: 1e4,
595
+ splitBasisPoint: 1e6
596
+ },
597
+ apis: baseTestnetApis
598
+ }
599
+ },
600
+ mainnet: {
601
+ tez: {
602
+ contracts: tezosMainnetContracts,
603
+ config: {
604
+ network: "mainnet",
605
+ chainId: BlockchainIdentifiers.TezosMainnet,
606
+ ethFeeReceiver: "0x",
607
+ wertRelayer: "tz1KkPS1TWFyDWfQwrdvmTmsCLUNMegDrrSi",
608
+ fxhashFees: tezosFees,
609
+ royaltyBasisPoint: 1e3,
610
+ splitBasisPoint: 1e3
611
+ },
612
+ apis: tezosMainnetApis
613
+ },
614
+ eth: {
615
+ contracts: ethMainnetContracts,
616
+ config: {
617
+ network: "Ethereum",
618
+ chainId: BlockchainIdentifiers.EthereumMainnet,
619
+ ethFeeReceiver: "0xed650E40F7bd3812152D4BFA6740662F50e178DF",
620
+ wertRelayer: "0xc16157e00b1bff1522c6f01246b4fb621da048d0",
621
+ fxhashFees: ethFees,
622
+ royaltyBasisPoint: 1e4,
623
+ splitBasisPoint: 1e6
624
+ },
625
+ apis: ethMainnetApis
626
+ },
627
+ base: {
628
+ contracts: baseMainnetContracts,
629
+ config: {
630
+ network: "Base",
631
+ chainId: BlockchainIdentifiers.BaseMainnet,
632
+ ethFeeReceiver: "0xF70DF285Bc6941b4760BcC041B0cA1cc50E27F8d",
633
+ wertRelayer: "0xc16157e00b1bff1522c6f01246b4fb621da048d0",
634
+ fxhashFees: baseFees,
635
+ royaltyBasisPoint: 1e4,
636
+ splitBasisPoint: 1e6
637
+ },
638
+ apis: baseMainnetApis
639
+ }
640
+ }
641
+ },
642
+ envs: {
643
+ local: {
644
+ apis: fxhashLocalApis,
645
+ config: {
646
+ envName: "local",
647
+ metadata: fxAppEnvMetadata("local"),
648
+ gtMinPrice: "0",
649
+ walletConnectId: "111994543d1b754bab82c368d0e61ae5",
650
+ projectLockTime: 3600,
651
+ referrerShare: 0,
652
+ splitsApiKey: "75348d57d6cf60fa4551766c",
653
+ cloudflareTurnstileSiteKey: "1x00000000000000000000AA",
654
+ cloudflareTurnstileSiteKeyV2: "0x4AAAAAAAW-w_xThcj91jkA",
655
+ syndicateProjectId: "9dd71e90-4605-45f4-94e0-4e533b01081d",
656
+ awsS3Bucket: "fxh-media-assets-dev-testnet-us-east-1",
657
+ awsS3Region: "us-east-1",
658
+ openTelemetryTarget: "http://localhost:14268",
659
+ algolia: algoliaConfigDev,
660
+ gpu: gpuRenderingConfigDev,
661
+ authJwtPublicKey: AUTH_JWT_PK_DEV
662
+ }
663
+ },
664
+ localDocker: {
665
+ apis: fxhashLocalDockerApis,
666
+ config: {
667
+ envName: "localDocker",
668
+ metadata: fxAppEnvMetadata("localDocker"),
669
+ gtMinPrice: "0",
670
+ walletConnectId: "111994543d1b754bab82c368d0e61ae5",
671
+ projectLockTime: 3600,
672
+ referrerShare: 0,
673
+ splitsApiKey: "75348d57d6cf60fa4551766c",
674
+ cloudflareTurnstileSiteKey: "1x00000000000000000000AA",
675
+ cloudflareTurnstileSiteKeyV2: "0x4AAAAAAAW-w_xThcj91jkA",
676
+ syndicateProjectId: "9dd71e90-4605-45f4-94e0-4e533b01081d",
677
+ awsS3Bucket: "fxh-media-assets-dev-testnet-us-east-1",
678
+ awsS3Region: "us-east-1",
679
+ openTelemetryTarget: "http://localhost:14268",
680
+ algolia: algoliaConfigDev,
681
+ gpu: gpuRenderingConfigDev,
682
+ authJwtPublicKey: AUTH_JWT_PK_DEV
683
+ }
684
+ },
685
+ dev: {
686
+ apis: fxhashDevApis,
687
+ config: {
688
+ envName: "development",
689
+ metadata: fxAppEnvMetadata("dev"),
690
+ gtMinPrice: "0",
691
+ walletConnectId: "111994543d1b754bab82c368d0e61ae5",
692
+ projectLockTime: 3600,
693
+ referrerShare: 0,
694
+ splitsApiKey: "75348d57d6cf60fa4551766c",
695
+ cloudflareTurnstileSiteKey: "0x4AAAAAAAVOb6invoeYS4EN",
696
+ cloudflareTurnstileSiteKeyV2: "0x4AAAAAAAW-w_xThcj91jkA",
697
+ syndicateProjectId: "9dd71e90-4605-45f4-94e0-4e533b01081d",
698
+ awsS3Bucket: "fxh-media-assets-dev-testnet-us-east-1",
699
+ awsS3Region: "us-east-1",
700
+ openTelemetryTarget: "https://tempo.ss.fxhash2.xyz",
701
+ algolia: algoliaConfigDev,
702
+ gpu: gpuRenderingConfigDev,
703
+ authJwtPublicKey: AUTH_JWT_PK_DEV
704
+ }
705
+ },
706
+ prd: {
707
+ apis: fxhashPrdApis,
708
+ config: {
709
+ envName: "production",
710
+ metadata: fxAppEnvMetadata("prd"),
711
+ gtMinPrice: "0",
712
+ walletConnectId: "111994543d1b754bab82c368d0e61ae5",
713
+ projectLockTime: 3600,
714
+ referrerShare: 0,
715
+ splitsApiKey: "75348d57d6cf60fa4551766c",
716
+ cloudflareTurnstileSiteKey: "0x4AAAAAAAVObp1YeuhbqNKB",
717
+ cloudflareTurnstileSiteKeyV2: "0x4AAAAAAAW-yE4Q6Wdz6SNb",
718
+ syndicateProjectId: "398ad73d-341c-4861-a038-f0ae1ca58e07",
719
+ awsS3Bucket: "fxh-media-assets-prd-mainnet-us-east-1",
720
+ awsS3Region: "us-east-1",
721
+ openTelemetryTarget: "https://tempo.ss.fxhash2.xyz",
722
+ algolia: algoliaConfigProd,
723
+ gpu: gpuRenderingConfigProd,
724
+ authJwtPublicKey: AUTH_JWT_PK_PRD
725
+ }
726
+ }
727
+ }
728
728
  };
729
729
  function getBlockchainNetworkForEnv(env) {
730
- return env === "prd" ? "mainnet" : "testnet";
730
+ return env === "prd" ? "mainnet" : "testnet";
731
731
  }
732
732
  function getConfigForEnv(env) {
733
- const blockchainNetwork = getBlockchainNetworkForEnv(env);
734
- return {
735
- ...fxhashConfig.networks[blockchainNetwork],
736
- ...fxhashConfig.envs[env]
737
- };
733
+ const blockchainNetwork = getBlockchainNetworkForEnv(env);
734
+ return {
735
+ ...fxhashConfig.networks[blockchainNetwork],
736
+ ...fxhashConfig.envs[env]
737
+ };
738
738
  }
739
- var localConfig = getConfigForEnv("local");
740
- var localDockerConfig = getConfigForEnv("localDocker");
741
- var devConfig = getConfigForEnv("dev");
742
- var prdConfig = getConfigForEnv("prd");
743
- var currentEnv = getEnv();
744
- var config = getConfigForEnv(currentEnv);
739
+ const localConfig = getConfigForEnv("local");
740
+ const localDockerConfig = getConfigForEnv("localDocker");
741
+ const devConfig = getConfigForEnv("dev");
742
+ const prdConfig = getConfigForEnv("prd");
743
+ const currentEnv = getEnv();
744
+ let config = getConfigForEnv(currentEnv);
745
745
  function setConfig(userConfig) {
746
- config = {
747
- ...config,
748
- ...userConfig
749
- };
750
- return config;
746
+ config = {
747
+ ...config,
748
+ ...userConfig
749
+ };
750
+ return config;
751
+ }
752
+
753
+ //#endregion
754
+ //#region src/utils/onchfs.ts
755
+ const onchfsRegex = new RegExp("^onchfs://");
756
+ /**
757
+ * Returns the CID or a resource, whether it's already a CID or an onchfs://<CID> resource
758
+ * @param resource either a CID or a onchfs://<CID> string
759
+ */
760
+ function onchfsCidFromUriOrCid(resource) {
761
+ if (!onchfsRegex.test(resource)) return resource;
762
+ return resource.slice(9);
751
763
  }
752
764
 
753
- // src/utils/ipfs.ts
754
- var EGatewayIpfs = /* @__PURE__ */ ((EGatewayIpfs2) => {
755
- EGatewayIpfs2["FXHASH"] = "FXHASH";
756
- EGatewayIpfs2["FXHASH_SAFE"] = "FXHASH_SAFE";
757
- EGatewayIpfs2["IPFSIO"] = "IPFSIO";
758
- return EGatewayIpfs2;
759
- })(EGatewayIpfs || {});
760
- var ipfsRegex = new RegExp("^ipfs://");
765
+ //#endregion
766
+ //#region src/utils/ipfs.ts
767
+ let EGatewayIpfs = /* @__PURE__ */ function(EGatewayIpfs$1) {
768
+ EGatewayIpfs$1["FXHASH"] = "FXHASH";
769
+ EGatewayIpfs$1["FXHASH_SAFE"] = "FXHASH_SAFE";
770
+ EGatewayIpfs$1["IPFSIO"] = "IPFSIO";
771
+ return EGatewayIpfs$1;
772
+ }({});
773
+ const ipfsRegex = new RegExp("^ipfs://");
774
+ /**
775
+ * Given a gateway enum, outputs the http url root of the gateway
776
+ */
761
777
  function ipfsGatewayRoot(gateway) {
762
- switch (gateway) {
763
- case "FXHASH" /* FXHASH */:
764
- return config.apis.ipfsGateway;
765
- case "FXHASH_SAFE" /* FXHASH_SAFE */:
766
- return config.apis.ipfsGatewaySafe;
767
- case "IPFSIO" /* IPFSIO */:
768
- default:
769
- return "https://ipfs.io";
770
- }
778
+ switch (gateway) {
779
+ case EGatewayIpfs.FXHASH: return config.apis.ipfsGateway;
780
+ case EGatewayIpfs.FXHASH_SAFE: return config.apis.ipfsGatewaySafe;
781
+ case EGatewayIpfs.IPFSIO:
782
+ default: return "https://ipfs.io";
783
+ }
771
784
  }
785
+ /**
786
+ * Returns the CID or a resource, whether it's already a CID or an ipfs://<CID> resource
787
+ * @param resource either a CID or a ipfs://<CID> string
788
+ */
772
789
  function ipfsCidFromUriOrCid(resource) {
773
- if (!ipfsRegex.test(resource)) return resource;
774
- return resource.slice(7);
790
+ if (!ipfsRegex.test(resource)) return resource;
791
+ return resource.slice(7);
775
792
  }
776
- function ipfsGatewayUrl(resource, gateway = "FXHASH_SAFE" /* FXHASH_SAFE */) {
777
- if (!resource) return "";
778
- const cid = ipfsCidFromUriOrCid(resource);
779
- return `${ipfsGatewayRoot(gateway)}/ipfs/${cid}`;
793
+ /**
794
+ * Given a CID or ipfs://<CID>, returns an URL to a gateway pointing to the resource
795
+ * @param resource the resource input, either a CID or ipfs://<CID>
796
+ * @param gateway the gateway URL to use for the resource
797
+ */
798
+ function ipfsGatewayUrl(resource, gateway = EGatewayIpfs.FXHASH_SAFE) {
799
+ if (!resource) return "";
800
+ const cid = ipfsCidFromUriOrCid(resource);
801
+ return `${ipfsGatewayRoot(gateway)}/ipfs/${cid}`;
780
802
  }
803
+ /**
804
+ * given a URI (either ipfs://<CID>, onchfs://<CID> or temp://<CID>),
805
+ * returns the URL to the resource
806
+ */
781
807
  function proxyUrl(uri) {
782
- if (uri.startsWith("blob:") || uri.startsWith("data:")) return uri;
783
- const [protocol, cid] = uri.split("://");
784
- switch (protocol) {
785
- case "https":
786
- return uri;
787
- case "temp":
788
- return `${config.apis.fsEmulator}/resolve/${cid}`;
789
- case "onchfs":
790
- return `${config.apis.onchfsProxy}/${cid}`;
791
- default:
792
- return ipfsGatewayUrl(uri);
793
- }
808
+ if (uri.startsWith("blob:") || uri.startsWith("data:")) return uri;
809
+ const [protocol, cid] = uri.split("://");
810
+ switch (protocol) {
811
+ case "https": return uri;
812
+ case "temp": return `${config.apis.fsEmulator}/resolve/${cid}`;
813
+ case "onchfs": return `${config.apis.onchfsProxy}/${cid}`;
814
+ default: return ipfsGatewayUrl(uri);
815
+ }
794
816
  }
795
817
 
796
- // src/utils/contracts.ts
797
- var tezosContractPrefixesByContractAddress = {
798
- [config.tez.contracts.gentk_v1]: "FX0",
799
- [config.tez.contracts.gentk_v2]: "FX0",
800
- [config.tez.contracts.gentk_v3]: "FX1"
818
+ //#endregion
819
+ //#region src/utils/cid.ts
820
+ /**
821
+ * Returns the CID or a resource, whether it's already a CID or an ipfs://<CID> or onchfs://<CID> resource
822
+ * @param resource either a CID or an ipfs://<CID> or onchfs://<CID> string
823
+ */
824
+ function cidFromUriOrCid(resource) {
825
+ if (ipfsRegex.test(resource)) return ipfsCidFromUriOrCid(resource);
826
+ else if (onchfsRegex.test(resource)) return onchfsCidFromUriOrCid(resource);
827
+ return resource;
828
+ }
829
+
830
+ //#endregion
831
+ //#region src/utils/contracts.ts
832
+ const tezosContractPrefixesByContractAddress = {
833
+ [config.tez.contracts.gentk_v1]: "FX0",
834
+ [config.tez.contracts.gentk_v2]: "FX0",
835
+ [config.tez.contracts.gentk_v3]: "FX1"
801
836
  };
802
837
  function getObjktIdFromContract(contract, id) {
803
- return `${tezosContractPrefixesByContractAddress[contract]}-${id}`;
838
+ return `${tezosContractPrefixesByContractAddress[contract]}-${id}`;
804
839
  }
805
840
 
806
- // src/index.ts
807
- var index_default = fxhashConfig;
808
- export {
809
- BlockchainIdentifiers,
810
- EGatewayIpfs,
811
- config,
812
- index_default as default,
813
- devConfig,
814
- ethTestnetApis,
815
- ethTestnetContracts,
816
- fxhashConfig,
817
- fxhashDevApis,
818
- fxhashPrdApis,
819
- getDockerInternalUrl,
820
- getEnv,
821
- getObjktIdFromContract,
822
- ipfsCidFromUriOrCid,
823
- ipfsGatewayRoot,
824
- ipfsGatewayUrl,
825
- isAppMetadataValid,
826
- isDockerLocal,
827
- isLocal,
828
- isProd,
829
- localConfig,
830
- prdConfig,
831
- proxyUrl,
832
- setConfig,
833
- tezosContractPrefixesByContractAddress,
834
- tezosMainnetApis,
835
- tezosMainnetContracts,
836
- tezosTestnetApis,
837
- tezosTestnetContracts
838
- };
841
+ //#endregion
842
+ //#region src/index.ts
843
+ var src_default = fxhashConfig;
844
+
845
+ //#endregion
846
+ export { BlockchainIdentifiers, EGatewayIpfs, cidFromUriOrCid, config, src_default as default, devConfig, ethTestnetApis, ethTestnetContracts, fxhashConfig, fxhashDevApis, fxhashPrdApis, getDockerInternalUrl, getEnv, getObjktIdFromContract, ipfsCidFromUriOrCid, ipfsGatewayRoot, ipfsGatewayUrl, ipfsRegex, isAppMetadataValid, isDockerLocal, isLocal, isProd, localConfig, onchfsCidFromUriOrCid, onchfsRegex, prdConfig, proxyUrl, setConfig, tezosContractPrefixesByContractAddress, tezosMainnetApis, tezosMainnetContracts, tezosTestnetApis, tezosTestnetContracts };
839
847
  //# sourceMappingURL=index.js.map