@fxhash/config 0.0.11 → 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.d.ts +17 -1
- package/dist/index.js +27 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
@@ -354,12 +354,20 @@ declare const isLocal: boolean;
|
|
354
354
|
declare const isDockerLocal: boolean;
|
355
355
|
declare function getEnv(): TEnv;
|
356
356
|
//#endregion
|
357
|
+
//#region src/utils/cid.d.ts
|
358
|
+
/**
|
359
|
+
* Returns the CID or a resource, whether it's already a CID or an ipfs://<CID> or onchfs://<CID> resource
|
360
|
+
* @param resource either a CID or an ipfs://<CID> or onchfs://<CID> string
|
361
|
+
*/
|
362
|
+
declare function cidFromUriOrCid(resource: string): string;
|
363
|
+
//#endregion
|
357
364
|
//#region src/utils/ipfs.d.ts
|
358
365
|
declare enum EGatewayIpfs {
|
359
366
|
FXHASH = "FXHASH",
|
360
367
|
FXHASH_SAFE = "FXHASH_SAFE",
|
361
368
|
IPFSIO = "IPFSIO",
|
362
369
|
}
|
370
|
+
declare const ipfsRegex: RegExp;
|
363
371
|
/**
|
364
372
|
* Given a gateway enum, outputs the http url root of the gateway
|
365
373
|
*/
|
@@ -381,6 +389,14 @@ declare function ipfsGatewayUrl(resource: string | null | undefined, gateway?: E
|
|
381
389
|
*/
|
382
390
|
declare function proxyUrl(uri: string): string;
|
383
391
|
//#endregion
|
392
|
+
//#region src/utils/onchfs.d.ts
|
393
|
+
declare const onchfsRegex: RegExp;
|
394
|
+
/**
|
395
|
+
* Returns the CID or a resource, whether it's already a CID or an onchfs://<CID> resource
|
396
|
+
* @param resource either a CID or a onchfs://<CID> string
|
397
|
+
*/
|
398
|
+
declare function onchfsCidFromUriOrCid(resource: string): string;
|
399
|
+
//#endregion
|
384
400
|
//#region src/utils/contracts.d.ts
|
385
401
|
declare const tezosContractPrefixesByContractAddress: Record<string, string>;
|
386
402
|
declare function getObjktIdFromContract(contract: string, id: string): string;
|
@@ -409,5 +425,5 @@ type AppMetadataError = RichErrorUnion<typeof AppMetadataErrors>;
|
|
409
425
|
*/
|
410
426
|
declare function isAppMetadataValid(value: any): Result<void, AppMetadataError>;
|
411
427
|
//#endregion
|
412
|
-
export { BlockchainIdentifier, BlockchainIdentifiers, EGatewayIpfs, GPURenderingConfig, IAppMetadata, IEthApis, IEthContracts, IFxhashApis, IFxhashConfig, IFxhashConfigSingleEnv, IFxhashEnvConfig, IFxhashNetworkConfig, ITezosApis, ITezosContracts, TBlockchain, TBlockchainNetwork, TEnv, TEnvName, config, fxhashConfig as default, fxhashConfig, devConfig, ethTestnetApis, ethTestnetContracts, fxhashDevApis, fxhashPrdApis, getDockerInternalUrl, getEnv, getObjktIdFromContract, ipfsCidFromUriOrCid, ipfsGatewayRoot, ipfsGatewayUrl, isAppMetadataValid, isDockerLocal, isLocal, isProd, localConfig, prdConfig, proxyUrl, setConfig, tezosContractPrefixesByContractAddress, tezosMainnetApis, tezosMainnetContracts, tezosTestnetApis, tezosTestnetContracts };
|
428
|
+
export { BlockchainIdentifier, BlockchainIdentifiers, EGatewayIpfs, GPURenderingConfig, IAppMetadata, IEthApis, IEthContracts, IFxhashApis, IFxhashConfig, IFxhashConfigSingleEnv, IFxhashEnvConfig, IFxhashNetworkConfig, ITezosApis, ITezosContracts, TBlockchain, TBlockchainNetwork, TEnv, TEnvName, cidFromUriOrCid, config, fxhashConfig as default, fxhashConfig, devConfig, ethTestnetApis, ethTestnetContracts, fxhashDevApis, fxhashPrdApis, getDockerInternalUrl, getEnv, getObjktIdFromContract, ipfsCidFromUriOrCid, ipfsGatewayRoot, ipfsGatewayUrl, ipfsRegex, isAppMetadataValid, isDockerLocal, isLocal, isProd, localConfig, onchfsCidFromUriOrCid, onchfsRegex, prdConfig, proxyUrl, setConfig, tezosContractPrefixesByContractAddress, tezosMainnetApis, tezosMainnetContracts, tezosTestnetApis, tezosTestnetContracts };
|
413
429
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
@@ -463,8 +463,8 @@ const baseTestnetContracts = {
|
|
463
463
|
fx_token: "0xd89fdcB6c8D107f27CEe4452Ccfb70Dc4F9768a7",
|
464
464
|
fx_airdrop: "0x1e4e821216582f0771528b848b4a51c8474be2c7",
|
465
465
|
fx_tez_airdrop: "0x3c2b4c38d37affb023a1d2327af428909eb8a134",
|
466
|
-
fx_token_launchpad: "
|
467
|
-
fx_project_factory: "
|
466
|
+
fx_token_launchpad: "0x2f949f7cD46F4D79d4FD6b234DB302cAeEe552e2",
|
467
|
+
fx_project_factory: "0xcA9486e54FbBD6aCe6eB6AA0102ee97dd90A8a86"
|
468
468
|
};
|
469
469
|
const baseMainnetContracts = {
|
470
470
|
multicall3: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
@@ -750,6 +750,18 @@ function setConfig(userConfig) {
|
|
750
750
|
return config;
|
751
751
|
}
|
752
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);
|
763
|
+
}
|
764
|
+
|
753
765
|
//#endregion
|
754
766
|
//#region src/utils/ipfs.ts
|
755
767
|
let EGatewayIpfs = /* @__PURE__ */ function(EGatewayIpfs$1) {
|
@@ -803,6 +815,18 @@ function proxyUrl(uri) {
|
|
803
815
|
}
|
804
816
|
}
|
805
817
|
|
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
|
+
|
806
830
|
//#endregion
|
807
831
|
//#region src/utils/contracts.ts
|
808
832
|
const tezosContractPrefixesByContractAddress = {
|
@@ -819,5 +843,5 @@ function getObjktIdFromContract(contract, id) {
|
|
819
843
|
var src_default = fxhashConfig;
|
820
844
|
|
821
845
|
//#endregion
|
822
|
-
export { BlockchainIdentifiers, EGatewayIpfs, config, src_default as default, devConfig, ethTestnetApis, ethTestnetContracts, fxhashConfig, fxhashDevApis, fxhashPrdApis, getDockerInternalUrl, getEnv, getObjktIdFromContract, ipfsCidFromUriOrCid, ipfsGatewayRoot, ipfsGatewayUrl, isAppMetadataValid, isDockerLocal, isLocal, isProd, localConfig, prdConfig, proxyUrl, setConfig, tezosContractPrefixesByContractAddress, tezosMainnetApis, tezosMainnetContracts, tezosTestnetApis, tezosTestnetContracts };
|
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 };
|
823
847
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":["ethTestnetApis: IEthApis","ethMainnetApis: IEthApis","tezosTestnetApis: ITezosApis","tezosMainnetApis: ITezosApis","url: string","isProd: boolean","isLocal: boolean","isDockerLocal: boolean","fxhashDevApis: IFxhashApis","fxhashLocalApis: IFxhashApis","fxhashLocalDockerApis: IFxhashApis","fxhashPrdApis: IFxhashApis","fxEnvToApisMap: Record<TEnv, IFxhashApis>","env: TEnv","tezosTestnetContracts: ITezosContracts","tezosMainnetContracts: ITezosContracts","ethTestnetContracts: IEthContracts","ethMainnetContracts: IEthContracts","baseTestnetApis: IBaseApis","baseMainnetApis: IBaseApis","par1: IRichErrorMessages | string[]","crossEnvMetadata: Omit<IAppMetadata, \"url\">","env: TEnv","value: any","missingProperties: string[]","requiredProperties: (keyof Required<IAppMetadata>)[]","algoliaConfigDev: AlgoliaConfig","algoliaConfigProd: AlgoliaConfig","gpuRenderingConfigShared: GPURenderingConfigShared","batchArns: Record<GPUVersion, string>","gpuRenderingConfigDev: GPURenderingConfig","gpuRenderingConfigProd: GPURenderingConfig","baseTestnetContracts: IBaseContracts","baseMainnetContracts: IBaseContracts","fxhashConfig: IFxhashConfig","env: TEnv","localConfig: IFxhashConfigSingleEnv","localDockerConfig: IFxhashConfigSingleEnv","devConfig: IFxhashConfigSingleEnv","prdConfig: IFxhashConfigSingleEnv","config: IFxhashConfigSingleEnv","userConfig: Partial<IFxhashConfigSingleEnv>","gateway: EGatewayIpfs","resource: string","resource: string | null | undefined","uri: string","tezosContractPrefixesByContractAddress: Record<string, string>","contract: string","id: string"],"sources":["../src/api/eth.ts","../src/api/tezos.ts","../src/helpers.ts","../src/api/fxhash.ts","../src/contracts/tezos.ts","../src/contracts/eth.ts","../src/api/base.ts","../src/errors/metadata.ts","../src/config/metadata.ts","../src/config/algolia.ts","../src/config/gpu.ts","../src/contracts/base.ts","../src/types.ts","../src/constants.ts","../src/config.ts","../src/utils/ipfs.ts","../src/utils/contracts.ts","../src/index.ts"],"sourcesContent":["export interface IEthApis {\n rpcs: string[]\n reservoir: string\n safe: string\n whitelist: string\n alchemy: {\n rpc: string\n }\n}\n\nexport const ethTestnetApis: IEthApis = {\n rpcs: [\n \"https://eth-sepolia.g.alchemy.com/v2/fATxHNjMh0rR9DnHCtZKDpPPxkEY48Qb\",\n ],\n reservoir: \"https://api-sepolia.reservoir.tools\",\n safe: \"https://safe-transaction-sepolia.safe.global\",\n whitelist: \"http://localhost:9999/whitelist/new\",\n alchemy: {\n rpc: \"https://eth-sepolia.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9\",\n },\n}\n\nexport const ethMainnetApis: IEthApis = {\n rpcs: [\n \"https://eth-mainnet.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9\",\n ],\n reservoir: \"https://api.reservoir.tools\",\n safe: \"https://safe-transaction-mainnet.safe.global/\",\n whitelist: \"https://api.v2.dev.fxhash-dev.xyz/whitelist/new\",\n alchemy: {\n rpc: \"https://eth-mainnet.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9\",\n },\n}\n","export interface ITezosApis {\n tzktWebsite: string\n tzkt: string\n tzktPro: string\n rpcs: string[]\n}\n\nexport const tezosTestnetApis: ITezosApis = {\n tzkt: \"https://api.ghostnet.tzkt.io/v1/\",\n tzktPro: \"https://api.ghostnet.tzkt.io/v1/\",\n tzktWebsite: \"https://ghostnet.tzkt.io/\",\n rpcs: [\n \"https://ghostnet.ecadinfra.com\",\n \"https://ghostnet.smartpy.io\",\n \"https://ghostnet.tezos.marigold.dev/\",\n ],\n}\n\nexport const tezosMainnetApis: ITezosApis = {\n tzkt: \"https://api.tzkt.io/v1/\",\n tzktPro: \"https://pro.tzkt.io/v1/\",\n tzktWebsite: \"https://tzkt.io/\",\n rpcs: [\n \"https://rpc1.fxhash.xyz\",\n \"https://mainnet.smartpy.io\",\n \"https://mainnet.api.tez.ie\",\n \"https://teznode.letzbake.com\",\n ],\n}\n","import { TEnv } from \"./types.js\"\n\nconst HOST_LOCAL = \"localhost\"\nconst HOST_DOCKER_INTERNAL = \"host.docker.internal\"\n\nexport function getDockerInternalUrl(url: string): string {\n return url.replace(HOST_LOCAL, HOST_DOCKER_INTERNAL)\n}\n\nexport const isProd: boolean = (() => {\n // We can't destructure process.envs\n // https://nextjs.org/docs/pages/api-reference/next-config-js/env\n return (\n process.env.FXHASH_ENV === \"prd\" ||\n process.env.FXHASH_ENV === \"production\" ||\n process.env.NEXT_PUBLIC_FXHASH_ENV === \"prd\" ||\n process.env.NEXT_PUBLIC_FXHASH_ENV === \"production\" ||\n process.env.REACT_APP_FXHASH_ENV === \"prd\" ||\n process.env.REACT_APP_FXHASH_ENV === \"production\" ||\n process.env.VITE_FXHASH_ENV === \"prd\" ||\n process.env.VITE_FXHASH_ENV === \"production\"\n )\n})()\n\nexport const isLocal: boolean = (() => {\n // We can't destructure process.envs\n // https://nextjs.org/docs/pages/api-reference/next-config-js/env\n return (\n process.env.FXHASH_ENV === \"local\" ||\n process.env.NEXT_PUBLIC_FXHASH_ENV === \"local\" ||\n process.env.REACT_APP_FXHASH_ENV === \"local\" ||\n process.env.VITE_FXHASH_ENV === \"local\"\n )\n})()\n\nexport const isDockerLocal: boolean = (() => {\n const isBrowser = typeof window !== \"undefined\"\n if (isBrowser) return false\n let fs\n try {\n fs = require(\"fs\")\n } catch (e) {\n return false\n }\n if (!fs) return false\n return isLocal && fs.existsSync(\"/.dockerenv\")\n})()\n\nexport function getEnv(): TEnv {\n if (isProd) return \"prd\"\n if (isLocal) {\n return isDockerLocal ? \"localDocker\" : \"local\"\n }\n return \"dev\"\n}\n","import { getDockerInternalUrl } from \"../helpers.js\"\nimport { IFxhashApis, TEnv } from \"../types.js\"\n\n// list of APIs dev leverages\nexport const fxhashDevApis: IFxhashApis = {\n website: \"https://beta.fxhash-dev.xyz\",\n docs: \"https://docs.fxhash.xyz\",\n main: \"https://api.v2-temp.dev.fxhash-dev.xyz/graphql\",\n hasura: \"https://api.v2.dev.fxhash-dev.xyz\",\n hasuraGql: \"https://api.v2.dev.fxhash-dev.xyz/v1/graphql\",\n file: \"https://file-api.fxhash-dev.xyz\",\n fileInternal:\n \"http://fxhash-multichain-dev-testnet-file-api.fxhash-multichain-dev-testnet.svc.cluster.local:4004\",\n walletInternal:\n \"http://fxhash-multichain-dev-testnet-wallet-api.fxhash-multichain-dev-testnet.svc.cluster.local:3208\",\n fsEmulator: \"https://file-api.fxhash-dev.xyz/fs\",\n extract: \"https://extract.fxhash-dev.xyz\",\n extractInternal:\n \"http://fxhash-dev-testnet-extract-balancer.fxhash-dev-testnet.svc.cluster.local:4017\",\n media: \"https://media.dev.fxhash-dev.xyz\",\n ethMetadata: \"https://media.dev.fxhash-dev.xyz/metadata/ethereum/\",\n ipfsInternal:\n \"http://fxhash-dev-testnet-ipfs-cluster-api.fxhash-dev-testnet.svc.cluster.local:9094\",\n ipfsGateway: \"https://gateway.fxhash-dev.xyz\",\n ipfsGatewaySafe: \"https://gateway.fxhash-dev2.xyz\",\n ipfsGatewayInternal:\n \"http://fxhash-dev-testnet-ipfs-cluster-gateway.fxhash-dev-testnet.svc.cluster.local:8080\",\n onchfsProxy: \"https://onchfs.fxhash-dev2.xyz\",\n opensea: \"https://testnets-api.opensea.io/api/v2\",\n authority: {\n api: \"NONE\",\n },\n capture: {\n lambdas: {\n small:\n \"https://u5not5l323zczuwnrzxwkt34ra0eyidj.lambda-url.us-east-1.on.aws/\",\n medium:\n \"https://jgfz7a6km7fsqonej2sp3lqwvu0utnyy.lambda-url.us-east-1.on.aws/\",\n large:\n \"https://fzezvbp2f74yturkj4akjyrq3e0zswhb.lambda-url.us-east-1.on.aws/\",\n },\n proxy: {\n ipfs: \"ipfs://Qme6E5z1GDqrHyPomGEw5LChxmE9pdEYGWjwxrv6ZgwZRo\",\n onchfs:\n \"onchfs://4287364ed3219d3f2f77302a71eff0db49e971058ef87f163981ef89a445b143\",\n },\n },\n events: {\n liveBackend: \"_NONE\",\n },\n indexer: {\n tez: \"http://fxhash-multichain-dev-testnet-indexer-v2.fxhash-multichain-dev-testnet.svc.cluster.local:4001\",\n eth: \"http://fxhash-multichain-dev-testnet-eth-indexer.fxhash-multichain-dev-testnet.svc.cluster.local:3000\",\n base: \"http://fxhash-multichain-dev-testnet-base-indexer.fxhash-multichain-dev-testnet.svc.cluster.local:3000\",\n },\n}\n\n// list of APIs for when fxhash is ran locally\n// The ports must correspond to the ports the services are running on\n// defined in the root docker compose file of the monorepo\nexport const fxhashLocalApis: IFxhashApis = {\n ...fxhashDevApis,\n website: \"http://localhost:3200\",\n hasura: \"http://localhost:8888\",\n hasuraGql: \"http://localhost:8888/v1/graphql\",\n fileInternal: fxhashDevApis.file,\n ipfsGatewayInternal: fxhashDevApis.ipfsGateway,\n walletInternal: \"http://host.docker.internal:3208\",\n}\n\nexport const fxhashLocalDockerApis: IFxhashApis = {\n ...fxhashLocalApis,\n hasura: getDockerInternalUrl(fxhashLocalApis.hasura),\n hasuraGql: getDockerInternalUrl(fxhashLocalApis.hasuraGql),\n}\n\n// list of APIs prod leverages\nexport const fxhashPrdApis: IFxhashApis = {\n website: \"https://www.fxhash.xyz\",\n docs: \"https://docs.fxhash.xyz\",\n main: \"https://api.v2-temp.fxhash.xyz/graphql\",\n hasura: \"https://api.v2.fxhash.xyz\",\n hasuraGql: \"https://api.v2.fxhash.xyz/v1/graphql\",\n file: \"https://file-api.fxhash.xyz\",\n fileInternal:\n \"http://fxhash-multichain-prd-file-api.fxhash-multichain-prd.svc.cluster.local:4004\",\n walletInternal:\n \"http://fxhash-multichain-prd-wallet-api.fxhash-multichain-prd.svc.cluster.local:3208\",\n fsEmulator: \"https://file-api.fxhash.xyz/fs\",\n extract: \"https://extract.fxhash.xyz\",\n extractInternal:\n \"http://fxhash-prd-extract-balancer.fxhash-prd.svc.cluster.local:4017\",\n media: \"https://media.fxhash.xyz\",\n ethMetadata: \"https://media.fxhash.xyz/metadata/ethereum/\",\n ipfsInternal:\n \"http://fxhash-prd-ipfs-cluster-api.fxhash-prd.svc.cluster.local:9094\",\n ipfsGateway: \"https://gateway.fxhash.xyz\",\n ipfsGatewaySafe: \"https://gateway.fxhash2.xyz\",\n ipfsGatewayInternal:\n \"http://fxhash-prd-ipfs-cluster-gateway.fxhash-prd.svc.cluster.local:8080\",\n onchfsProxy: \"https://onchfs.fxhash2.xyz\",\n opensea: \"https://api.opensea.io/api/v2\",\n authority: {\n api: \"NONE\",\n },\n capture: {\n lambdas: {\n small:\n \"https://7sz7knaaw3obgqxjyv3m4e5myu0lsbdp.lambda-url.us-east-1.on.aws/\",\n medium:\n \"https://tuupcq6eesbfk4veuzdfrhu7zm0zwuqy.lambda-url.us-east-1.on.aws/\",\n large:\n \"https://bojj24y6ucxmsyfi4uccdmiliy0dzhji.lambda-url.us-east-1.on.aws/\",\n },\n proxy: {\n ipfs: \"ipfs://Qme6E5z1GDqrHyPomGEw5LChxmE9pdEYGWjwxrv6ZgwZRo\",\n onchfs:\n \"onchfs://4287364ed3219d3f2f77302a71eff0db49e971058ef87f163981ef89a445b143\",\n },\n },\n events: {\n liveBackend: \"_NONE\",\n },\n indexer: {\n tez: \"http://fxhash-multichain-prd-indexer-v2.fxhash-multichain-prd.svc.cluster.local:4001\",\n eth: \"http://fxhash-multichain-prd-eth-indexer.fxhash-multichain-prd.svc.cluster.local:3000\",\n base: \"http://fxhash-multichain-prd-base-indexer.fxhash-multichain-prd.svc.cluster.local:3000\",\n },\n}\n\nconst fxEnvToApisMap: Record<TEnv, IFxhashApis> = {\n local: fxhashLocalApis,\n localDocker: fxhashLocalDockerApis,\n dev: fxhashDevApis,\n prd: fxhashPrdApis,\n}\n\n/**\n * Given some env, returns the associated APIs config.\n */\nexport function fxApisByEnv(env: TEnv): IFxhashApis {\n return fxEnvToApisMap[env]\n}\n","export interface ITezosContracts {\n allowed_mint: string\n allowed_mint_issuer: string\n allowed_mint_issuer_v3: string\n allowed_mint_v3: string\n articles: string\n card_proxy: string\n collaboration_factory: string\n consumable_database: string\n cycles: string\n gentk_v1: string\n gentk_v1_data: string\n gentk_v2: string\n gentk_v3: string\n issuer_tickets: string\n issuer_v0: string\n issuer_v1: string\n issuer_v2: string\n issuer_v3: string\n marketplace_v1: string\n marketplace_v2: string\n marketplace_v3: string\n moderation_articles: string\n moderation_team: string\n moderation_token: string\n moderation_token_v3: string\n moderation_user: string\n pricing_dutch_auction: string\n pricing_dutch_auction_v3: string\n pricing_fixed: string\n pricing_fixed_v3: string\n randomizer: string\n randomizer_v2: string\n token_moderation: string\n treasury: string\n user_moderation: string\n user_register: string\n onchfs_files: string\n}\n// The Tezos Smart Contracts addresses on testnet\nexport const tezosTestnetContracts: ITezosContracts = {\n allowed_mint: \"KT1QwfqMUDRYVyxo9KhunY5YCx9qQ9LWcswr\",\n allowed_mint_issuer: \"KT1WDByFKQmgVynxSr2rzdijs5aSs7mo7eBM\",\n allowed_mint_issuer_v3: \"KT1S3UqrLgMpVivNWWmBUnkPCaSFHDJ4HYvb\",\n allowed_mint_v3: \"KT1HUE2A6CHNw4NZZBWjJyG38nysWWfusagu\",\n articles: \"KT1HV8NXUCKWC1tWNHSD8LPPiKPshQuXvb8r\",\n card_proxy: \"KT1R6N27Qdw4RqeSUnYkw436uZrFSRWtxqbd\",\n collaboration_factory: \"KT1WFXts7jwxpD9uGDKzyqTUTFaG222xmjoZ\",\n consumable_database: \"KT1FP9y1PJpJkXhdJCgYZhVbj9UBpxnA57Bx\",\n cycles: \"KT1BJBcvtgZM2Kf4rUapmp4AhXtWCmznxd6F\",\n gentk_v1: \"KT1ExHjELnDuat9io3HkDcrBhHmek7h8EVXG\",\n gentk_v1_data: \"KT1SquPSN9oiMUWHG9coKRJAwz8Afe4c6izT\",\n gentk_v2: \"KT1NkZho1yRkDdQnN4Mz93sDYyY2pPrEHTNs\",\n gentk_v3: \"KT1TtVAyjh4Ahdm8sLZwFnL7tqoLf59XrK2h\",\n issuer_tickets: \"KT19PBsvmB2CwFqXftzb5gNJfxrEDFdSxGKZ\",\n issuer_v0: \"KT1PyfrDD85RxUWz8dMHoC92MxdPzecSQ5t9\",\n issuer_v1: \"KT1QwWVZogqPZZtGSVxGpLkEWar7LFvAsMdd\",\n issuer_v2: \"KT1Sy7X6TubmZ39G8CHVrUcxjc3jiF68P8oB\",\n issuer_v3: \"KT1DfymMp3qD5Pd5ujPjp7UsQbppY9yY1Hbf\",\n marketplace_v1: \"KT1DbivePcuUzCp5RaAQWxPSLV9G2Ys4faUR\",\n marketplace_v2: \"KT1HFYtf4vNCr4xRDZxLKc5asUdCsPUTTW9R\",\n marketplace_v3: \"KT1J6rt4d9U785DZWYEPvQ2fR1e71gxP42Lj\",\n moderation_articles: \"KT1Qg78fa81Xyjh65yNqUgVucubHUyq6VmgL\",\n moderation_team: \"KT1RsfyWzHs1EEWMzFLmKnJTQwPqRzsnF3Dp\",\n moderation_token: \"KT1PokFR36CcXKh3jUnjncabcuPWm5BMiqjt\",\n moderation_token_v3: \"KT1C1J38YR6eDvRBDEDaypptCFda9aH7FRbJ\",\n moderation_user: \"KT1Q3s7mYpscCnwsyndrVZg9WqBCmw99n37g\",\n pricing_dutch_auction: \"KT1BqikbUisiBBd9WvPiqnTwLY8Pm68p2Aua\",\n pricing_dutch_auction_v3: \"KT1QCboxZ28SqsfyZWTDrkSpZzU6xjZXBsFb\",\n pricing_fixed: \"KT1PAsf9Zc9FGJA9iLE1Ab2vPkMDsh4hyZVi\",\n pricing_fixed_v3: \"KT1Mqyy5JPknNzNJtgF93SHpFHv4VcYrNZry\",\n randomizer: \"KT1QmdsrJWJgK3VXid8q7D4sPipVoc9jh12x\",\n randomizer_v2: \"KT1Eow4nBY3B9EhWcX1aEXva67VkNFfP1Tq6\",\n token_moderation: \"KT1BHfPDMRp2q48ZkmmnK7TRzQRdFnp6XVKq\",\n treasury: \"KT1MbDbRhZPs5TzZEXkT142ePoccFHfohBoo\",\n user_moderation: \"KT1LmZjoitx2itnB1qCbHMrT3V64RbuSPf3a\",\n user_register: \"KT1XaikgmBDQANBvkFqyFhSpgAZJAXpiDFGE\",\n onchfs_files: \"KT1FA8AGGcJha6S6MqfBUiibwTaYhK8u7s9Q\",\n}\n// The Tezos Smart Contracts on mainnet\nexport const tezosMainnetContracts: ITezosContracts = {\n allowed_mint: \"KT1VDQwskdfHkSbA9W6CSEnxnh1u1XU8K8Gu\",\n allowed_mint_issuer: \"KT1Djz5ix2yEGmV7PMq3GYq17TvMMkd1anT2\",\n allowed_mint_issuer_v3: \"KT1LJ4R4xoEWMgTjrGrdHJAeHLYFaB4RsoVK\",\n allowed_mint_v3: \"KT1KgEjxqfRCMwtCGifT6fDPwC35RptTUEvE\",\n articles: \"KT1GtbuswcNMGhHF2TSuH1Yfaqn16do8Qtva\",\n card_proxy: \"KT1DQGSRsgHcf2TPdKGc4qm5AT9JprJCAo7j\",\n collaboration_factory: \"KT1JrUPSCt1r2MB2J7Lk2KwiWSYr3Mr414ck\",\n consumable_database: \"KT1Mbfkqh5EhebWuMvqAfUPTpgiBPwmQCDSD\",\n cycles: \"KT1BgD9SPfysnMz3vkfm6ZEaGFKCVcE5ay91\",\n gentk_v1: \"KT1KEa8z6vWXDJrVqtMrAeDVzsvxat3kHaCE\",\n gentk_v1_data: \"KT1WRpPyXHSCbTfDQFWVXbMpxxvf7Y7KChxc\",\n gentk_v2: \"KT1U6EHmNxJTkvaWJ4ThczG4FSDaHC21ssvi\",\n gentk_v3: \"KT1EfsNuqwLAWDd3o4pvfUx1CAh5GMdTrRvr\",\n issuer_tickets: \"KT19etLCjCCzTLFFAxsxLFsVYMRPetr2bTD5\",\n issuer_v0: \"KT1AEVuykWeuuFX7QkEAMNtffzwhe1Z98hJS\",\n issuer_v1: \"KT1XCoGnfupWk7Sp8536EfrxcP73LmT68Nyr\",\n issuer_v2: \"KT1BJC12dG17CVvPKJ1VYaNnaT5mzfnUTwXv\",\n issuer_v3: \"KT1Xpmp15KfqoePNW9HczFmqaGNHwadV2a3b\",\n marketplace_v1: \"KT1Xo5B7PNBAeynZPmca4bRh6LQow4og1Zb9\",\n marketplace_v2: \"KT1GbyoDi7H1sfXmimXpptZJuCdHMh66WS9u\",\n marketplace_v3: \"KT1M1NyU9X4usEimt2f3kDaijZnDMNBu42Ja\",\n moderation_articles: \"KT1A36z7nG4zPDbhjyrzhYf9SCn5ipPZeRMQ\",\n moderation_team: \"KT1FvGQcPxzuJkJsdWFQiGkueSNT5mqpFDrf\",\n moderation_token: \"KT18tPu7uXy9PJ97i3qCLsr7an4X6sQ5qxU7\",\n moderation_token_v3: \"KT1UBWXN1KxTh4eurrCTCH7aEjqdrM3HjP6R\",\n moderation_user: \"KT1Wn2kkKmdbyLWBiLXWCkE7fKj1LsLKar2A\",\n pricing_dutch_auction: \"KT1EzLrXRCXij42pKfbZPn48PuxrnVki1aYY\",\n pricing_dutch_auction_v3: \"KT1MFgHKorMWXeVL6qrpgjZmemirafppSg9q\",\n pricing_fixed: \"KT1FHzHxuMaNLYG8LdniY45M6RCfkF3AoXFh\",\n pricing_fixed_v3: \"KT1V24J6FVuKPU3xy6gVF6wJ3zdRXBheQhaV\",\n randomizer: \"KT1XYgKrzBbzsckGvXTPgxFyN7KNZ9RPYVWf\",\n randomizer_v2: \"KT1CfmepqJkfZwqLPFVMKFoYUS7dPPZHyCTo\",\n token_moderation: \"KT1HgVuzNWVvnX16fahbV2LrnpwifYKoFMRd\",\n treasury: \"KT1P2BXYb894MekrCcSrnidzQYPVqitLoVLc\",\n user_moderation: \"KT1TWWQ6FtLoosVfZgTKV2q68TMZaENhGm54\",\n user_register: \"KT1Ezht4PDKZri7aVppVGT4Jkw39sesaFnww\",\n onchfs_files: \"KT1Ae7dT1gsLw2tRnUMXSCmEyF74KVkM6LUo\",\n}\n","export interface IEthContracts {\n multicall3: `0x${string}`\n seaport_zone: `0x${string}`\n issuer_factory_v1: `0x${string}`\n fixed_price_minter_v1: `0x${string}`\n dutch_auction_minter_v1: `0x${string}`\n mint_ticket_factory_v1: `0x${string}`\n ticket_redeemer_v1: `0x${string}`\n ipfs_renderer_v1: `0x${string}`\n onchfs_renderer_v1: `0x${string}`\n randomizer_v1: `0x${string}`\n role_registry_v1: `0x${string}`\n contract_registry_v1: `0x${string}`\n gen_art_token_impl_v1: `0x${string}`\n mint_ticket_impl_v1: `0x${string}`\n onchfs_file_system: `0x${string}`\n onchfs_content_store: `0x${string}`\n seaport: `0x${string}`\n fxhashTeamSafeAddress: `0x${string}`\n signerSafe: `0x${string}`\n moderationSafe: `0x${string}`\n farcaster_frame_fixed_price_minter_v1: `0x${string}`\n fx_token: `0x${string}`\n}\n\nexport const ethTestnetContracts: IEthContracts = {\n multicall3: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n seaport_zone: \"0x0000000006B429721d1F4c4cD256BF3A38c09Ac6\",\n issuer_factory_v1: \"0x4e9ef916F55B5d4a27E6406C7Ce8bcd29c2693d6\",\n mint_ticket_factory_v1: \"0xbaed21d8C57caf71578b9aE1E09a68721d0Dd02d\",\n dutch_auction_minter_v1: \"0x2F8ea350E7F29BCaC2AEE5889d64df07EE3Fa98d\",\n fixed_price_minter_v1: \"0xa6c9c758e80ec18e1a28d485b97400B11dCFCD64\",\n ticket_redeemer_v1: \"0xdd29eA613e0553fc03f5762Bf643710a7987A216\",\n ipfs_renderer_v1: \"0x17b9c8a7C6F9D3768D4DA75EBB6abDe9FBe900cf\",\n onchfs_renderer_v1: \"0x25B087D2c87a0b34188a530dC9cCfDa30822AA8e\",\n randomizer_v1: \"0x5962e4dEeDe2DB4A83259255D30c19F4397FD5A6\",\n role_registry_v1: \"0x92B70c5C6E676BdC395DfD911c07392fc7C36E4F\",\n contract_registry_v1: \"0xb7CFDcDb2c6a1D05D7b85FB4ae7B7bccd028010F\",\n gen_art_token_impl_v1: \"0x1feeb359e96E6Dd6F19F1FC98e8FffDdf5AeaD58\",\n mint_ticket_impl_v1: \"0x0303e3a5be6e9Fa21E72cE446a402a6AEec13c60\",\n onchfs_file_system: \"0x4f555d39e89f6d768f75831d610b3940fa94c6b1\",\n onchfs_content_store: \"0x070e5A608705aC4954eec054f9074eEe49bDcbfF\",\n seaport: \"0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0\",\n fxhashTeamSafeAddress: \"0x4F073947573FF44621cA25061Fb035c73a3014ab\",\n signerSafe: \"0x4F073947573FF44621cA25061Fb035c73a3014ab\",\n moderationSafe: \"0x4F073947573FF44621cA25061Fb035c73a3014ab\",\n farcaster_frame_fixed_price_minter_v1:\n \"0xB0905f81167bD90ABD5a583E029D27DA77568084\",\n fx_token: \"0xfa2e08ebfa6dae5ff68c3a0e2eb33a78f363f9fe\",\n}\n\n/**\n * TODO\n * -----------------------------------------------------------------------------\n * Put the actual addresses.\n */\nexport const ethMainnetContracts: IEthContracts = {\n multicall3: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n seaport_zone: \"0x0000000006B429721d1F4c4cD256BF3A38c09Ac6\",\n issuer_factory_v1: \"0x442295de8A31d65026dBc09c29d469F6854f188a\",\n mint_ticket_factory_v1: \"0xDB92ed0e6265d042F05E5C2f6D2F99496e87D706\",\n dutch_auction_minter_v1: \"0x1bC736a2b144096a4752534C557D7E6C311CcAF1\",\n fixed_price_minter_v1: \"0xB645cFfD9bFB93c2c181d5Be0D6a8C1d81C2aEf3\",\n ticket_redeemer_v1: \"0x3D72011b1bB52e33f9D81Fc5553FF4765e3f32c1\",\n ipfs_renderer_v1: \"0x48F00F8314920ca0cd763D74acFe8cFE4024a274\",\n onchfs_renderer_v1: \"0xe9fE6b2e494E40404AcB2b8B0a0Bc7b79FD03c83\",\n randomizer_v1: \"0xED32Ed47A75e298433cF822E10645C04a0B95075\",\n role_registry_v1: \"0x22b9Dd17BA1132C027d780bC0A784f08f244022B\",\n contract_registry_v1: \"0x4DAc308c686D747A804B7E95db606695a529A750\",\n gen_art_token_impl_v1: \"0x429AC1aA66220573Da6928bcce7384fe50e1284f\",\n mint_ticket_impl_v1: \"0xc2743B0B901eDAA8ccd1A09914449A797e1079F1\",\n onchfs_file_system: \"0x9e0f2864c6f125bbf599df6ca6e6c3774c5b2e04\",\n onchfs_content_store: \"0xC6806fd75745bB5F5B32ADa19963898155f9DB91\",\n seaport: \"0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0\",\n fxhashTeamSafeAddress: \"0xD8b1905022d70e74c6c8aaA2baaf275fBe1634f1\",\n signerSafe: \"0xB456aF77dEB65065462BD1f0D9098413E6CA4200\",\n moderationSafe: \"0x99CDaECbe1be4B7232a4f2c79EF76D403886FE1E\",\n farcaster_frame_fixed_price_minter_v1:\n \"0x6e625892C739bFD960671Db5544E260757480725\",\n fx_token: \"0xTODO\",\n}\n","export interface IBaseApis {\n rpcs: string[]\n reservoir: string\n safe: string\n whitelist: string\n alchemy: {\n rpc: string\n }\n}\n\nexport const baseTestnetApis: IBaseApis = {\n rpcs: [\"https://sepolia.base.org\"],\n reservoir: \"https://api-base-sepolia.reservoir.tools\",\n safe: \"https://safe-transaction-base-sepolia.safe.global/\",\n whitelist: \"http://localhost:9999/whitelist/new\",\n alchemy: {\n rpc: \"https://base-sepolia.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9\",\n },\n}\n\nexport const baseMainnetApis: IBaseApis = {\n rpcs: [\"https://mainnet.base.org\"],\n reservoir: \"https://api-base.reservoir.tools\",\n safe: \"https://safe-transaction-base.safe.global/\",\n whitelist: \"https://api.v2.dev.fxhash-dev.xyz/whitelist/new\",\n alchemy: {\n rpc: \"https://base-mainnet.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9\",\n },\n}\n","import {\n type IRichErrorMessages,\n RichError,\n type RichErrorUnion,\n isRichErrorMessages,\n} from \"@fxhash/errors\"\n\nexport class AppMetadataInvalidTypeError extends RichError {\n name = \"AppMetadataInvalidTypeError\" as const\n messages = {\n dev: \"App metadata should be an object.\",\n }\n}\n\nexport class AppMetadataMissingPropertiesError extends RichError {\n name = \"AppMetadataMissingPropertiesError\" as const\n\n constructor(messages: IRichErrorMessages)\n constructor(properties: string[])\n constructor(par1: IRichErrorMessages | string[]) {\n super(\n isRichErrorMessages(par1)\n ? par1\n : {\n dev: `App metadata is missing required properties ${par1.map(p => `\"${p}\"`).join(\", \")}`,\n }\n )\n }\n}\n\nexport const AppMetadataErrors: (\n | typeof AppMetadataInvalidTypeError\n | typeof AppMetadataMissingPropertiesError\n)[] = [AppMetadataInvalidTypeError, AppMetadataMissingPropertiesError]\nexport type AppMetadataError = RichErrorUnion<typeof AppMetadataErrors>\n","import { type Result, failure, success } from \"@fxhash/utils\"\nimport { fxApisByEnv } from \"../api/fxhash.js\"\nimport {\n type AppMetadataError,\n AppMetadataInvalidTypeError,\n AppMetadataMissingPropertiesError,\n} from \"../errors/metadata.js\"\nimport { IAppMetadata, TEnv } from \"../types.js\"\n\n// shared between all envs\nconst crossEnvMetadata: Omit<IAppMetadata, \"url\"> = {\n name: \"FXHASH\",\n description: \"fxhash is a blockchain open platform for Generative Art\",\n icon: \"https://gateway.fxhash2.xyz/ipfs/QmUQUtCenBEYQLoHvfFCRxyHYDqBE49UGxtcp626FZnFDG\",\n}\n\n/**\n * Get application metadata by merging some cross-env metadata with an\n * environment-specific URL (application front-end).\n */\nexport function fxAppEnvMetadata(env: TEnv): IAppMetadata {\n return {\n ...crossEnvMetadata,\n url: fxApisByEnv(env).website,\n }\n}\n\n/**\n * Test whether some value is a valid {@link IAppMetadata} interface. If not,\n * the issue causing it to be invalid is returned as a failure.\n * @param value Any value which should be tested for being valid App Metadata\n * @returns A Result with void success or failure with the issue\n */\nexport function isAppMetadataValid(value: any): Result<void, AppMetadataError> {\n if (!(typeof value === \"object\"))\n return failure(new AppMetadataInvalidTypeError())\n\n const missingProperties: string[] = []\n const requiredProperties: (keyof Required<IAppMetadata>)[] = [\n \"name\",\n \"description\",\n \"url\",\n ]\n for (const prop of requiredProperties) {\n if (!value[prop]) missingProperties.push(prop)\n }\n if (missingProperties.length > 0)\n return failure(new AppMetadataMissingPropertiesError(missingProperties))\n\n return success()\n}\n","export type AlgoliaConfig = {\n appId: string\n enabled: boolean\n indexGenerativeTokens: string\n indexOffers: string\n indexUsers: string\n indexArticles: string\n indexAccounts: string\n}\n\nconst algoliaConfig = {\n enabled: true,\n indexGenerativeTokens: \"generative-tokens\",\n indexOffers: \"listings\",\n indexUsers: \"users\",\n indexArticles: \"articles\",\n indexAccounts: \"accounts\",\n}\n\nexport const algoliaConfigDev: AlgoliaConfig = {\n appId: \"T4XRS2LFQK\",\n ...algoliaConfig,\n}\n\nexport const algoliaConfigProd: AlgoliaConfig = {\n appId: \"F7M6D8T095\",\n ...algoliaConfig,\n}\n","const GPU_VERSIONS = [\"v111\", \"v132\"] as const\ntype GPUVersion = (typeof GPU_VERSIONS)[number]\n\ninterface GPURenderingVersionConfig {\n date: string\n version: string\n batchArn: string\n}\n\nexport type GPURenderingConfig = Record<GPUVersion, GPURenderingVersionConfig>\ntype GPURenderingConfigShared = Record<\n GPUVersion,\n Omit<GPURenderingVersionConfig, \"batchArn\">\n>\n\n// Shared config\nconst gpuRenderingConfigShared: GPURenderingConfigShared = {\n v111: {\n date: \"2023-03-06\",\n version: \"111.0.5563.64\",\n },\n v132: {\n date: \"2025-01-14\",\n version: \"132.0.6834.110\",\n },\n}\n\n// Helper function to create environment configs\nconst createEnvConfig = (\n batchArns: Record<GPUVersion, string>\n): GPURenderingConfig => {\n return Object.fromEntries(\n GPU_VERSIONS.map(version => [\n version,\n {\n ...gpuRenderingConfigShared[version],\n batchArn: batchArns[version],\n },\n ])\n ) as GPURenderingConfig\n}\n\n// Environment configs\nexport const gpuRenderingConfigDev: GPURenderingConfig = createEnvConfig({\n v111: \"arn:aws:batch:us-east-1:409089350506:job-definition/fxhash-batch-dev-fxhash-extract-chrome-v111\",\n v132: \"arn:aws:batch:us-east-1:409089350506:job-definition/fxhash-batch-dev-fxhash-extract-chrome-v132\",\n})\n\nexport const gpuRenderingConfigProd: GPURenderingConfig = createEnvConfig({\n v111: \"arn:aws:batch:us-east-1:759392670381:job-definition/fxhash-batch-prd-fxhash-extract-chrome-v111\",\n v132: \"arn:aws:batch:us-east-1:759392670381:job-definition/fxhash-batch-prd-fxhash-extract-chrome-v132\",\n})\n","export interface IBaseContracts {\n multicall3: `0x${string}`\n seaport_zone: `0x${string}`\n issuer_factory_v1: `0x${string}`\n fixed_price_minter_v1: `0x${string}`\n dutch_auction_minter_v1: `0x${string}`\n mint_ticket_factory_v1: `0x${string}`\n ticket_redeemer_v1: `0x${string}`\n ipfs_renderer_v1: `0x${string}`\n onchfs_renderer_v1: `0x${string}`\n randomizer_v1: `0x${string}`\n role_registry_v1: `0x${string}`\n contract_registry_v1: `0x${string}`\n gen_art_token_impl_v1: `0x${string}`\n mint_ticket_impl_v1: `0x${string}`\n onchfs_file_system: `0x${string}`\n onchfs_content_store: `0x${string}`\n seaport: `0x${string}`\n fxhashTeamSafeAddress: `0x${string}`\n signerSafe: `0x${string}`\n moderationSafe: `0x${string}`\n farcaster_frame_fixed_price_minter_v1: `0x${string}`\n fx_token: `0x${string}`\n fx_airdrop: `0x${string}`\n fx_tez_airdrop: `0x${string}`\n fx_token_launchpad: `0x${string}`\n fx_project_factory: `0x${string}`\n}\n\nexport const baseTestnetContracts: IBaseContracts = {\n multicall3: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n seaport_zone: \"0x0000000006B429721d1F4c4cD256BF3A38c09Ac6\",\n issuer_factory_v1: \"0x60cFDE3aaf6E938535767794088cf15EaaC50019\",\n mint_ticket_factory_v1: \"0x8A7e5eE0CeA42DBE1d2aAC4501262B0edC5B518B\",\n dutch_auction_minter_v1: \"0xeb5Cee0eD6A47BE2A463A0C9e83dA5DE6149d375\",\n fixed_price_minter_v1: \"0x29159d2DFbF93E991d39Dc080a5f8dcc5C90ebb8\",\n ticket_redeemer_v1: \"0xFfbC4F51AB33E14380893213d7C969e0626c4C43\",\n ipfs_renderer_v1: \"0x7657C31078d8bfB8d1BC127fC04dAd23B3f451ed\",\n onchfs_renderer_v1: \"0xf23C64BA846557c24E6F5086376047b0CE70d1cC\",\n randomizer_v1: \"0xCA6323f03B5113471BA3b7B2F4Ba0AA2D45aE257\",\n role_registry_v1: \"0x179f5B8FE1c270D7fC1807355F3fd981A30e21A6\",\n contract_registry_v1: \"0xd44B3b2Ee596613c1aFcF85c9b0E41A0ec8B79E2\",\n gen_art_token_impl_v1: \"0x06976f5C039497d8a79Cc0dCE7A95B3E9748164A\",\n mint_ticket_impl_v1: \"0xa71b5935366BA29332033217a9E83698acadfd2f\",\n onchfs_file_system: \"0x3fb48e03291b2490f939c961a1ad088437129f71\",\n onchfs_content_store: \"0x48AC7370df2d5982852172A4D857c29608AFa774\",\n seaport: \"0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0\",\n fxhashTeamSafeAddress: \"0x8a4f6e1ae6Bb77EFE7646f9649Bfd519fA638871\",\n signerSafe: \"0x8a4f6e1ae6Bb77EFE7646f9649Bfd519fA638871\",\n moderationSafe: \"0x8a4f6e1ae6Bb77EFE7646f9649Bfd519fA638871\",\n farcaster_frame_fixed_price_minter_v1:\n \"0xB0905f81167bD90ABD5a583E029D27DA77568084\",\n fx_token: \"0xd89fdcB6c8D107f27CEe4452Ccfb70Dc4F9768a7\",\n fx_airdrop: \"0x1e4e821216582f0771528b848b4a51c8474be2c7\",\n fx_tez_airdrop: \"0x3c2b4c38d37affb023a1d2327af428909eb8a134\",\n fx_token_launchpad: \"0x0bfF434B9C7543546EFfa42f654bBbBdD0dCCff8\",\n fx_project_factory: \"0xD9F9e11D1C2bEa044562Ce9D2590AC032bA87FcF\",\n}\n\nexport const baseMainnetContracts: IBaseContracts = {\n multicall3: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n seaport_zone: \"0x0000000006B429721d1F4c4cD256BF3A38c09Ac6\",\n issuer_factory_v1: \"0xf05636d65c7a10dF989eC2411D4F3230d3A02f3D\",\n mint_ticket_factory_v1: \"0xe5832D3a3da179e818e9E3bFF7b96A928b29Eda2\",\n dutch_auction_minter_v1: \"0x9667a1Cf26223c9de22207DD93cfEEc9237b8f4E\",\n fixed_price_minter_v1: \"0x4bDcaC532143d8d35ed759189EE22E3704580b9D\",\n ticket_redeemer_v1: \"0x972502Bc75A780D76495Ffa84Cf8DA301F162Df6\",\n ipfs_renderer_v1: \"0x9c4cC8403bE33B89a46794Ae409ce634ca567956\",\n onchfs_renderer_v1: \"0x4180D747e984C9CFEEfaF23944AE0C20c0742341\",\n randomizer_v1: \"0x6754E97b8eaeC13Fa24480E9d1240176Dd0f2911\",\n role_registry_v1: \"0x8d3C748e99066e15425BA1620cdD066d85D6d918\",\n contract_registry_v1: \"0xCa6e30B1C7cBE7cF605cE30B334f968C5E2EA016\",\n gen_art_token_impl_v1: \"0xC5769428823C9a0393DC66855DD3817b2A85BEFD\",\n mint_ticket_impl_v1: \"0x3e9754Da0fb002Fa13D69B2f313d5CB441fC8ef5\",\n onchfs_file_system: \"0x2983008f292a43f208bba0275afd7e9b3d39af3b\",\n onchfs_content_store: \"0x070e5A608705aC4954eec054f9074eEe49bDcbfF\",\n seaport: \"0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0\",\n fxhashTeamSafeAddress: \"0x38D3a2F9c63D4a580f100B051ba137fa6d8e2560\",\n signerSafe: \"0x38D3a2F9c63D4a580f100B051ba137fa6d8e2560\",\n moderationSafe: \"0x38D3a2F9c63D4a580f100B051ba137fa6d8e2560\",\n farcaster_frame_fixed_price_minter_v1:\n \"0x6e625892C739bFD960671Db5544E260757480725\",\n fx_token: \"0x5Fc2843838e65eb0B5d33654628F446d54602791\",\n fx_airdrop: \"0x45BB9DF166Fda4afD7e533DE42B11579a1F09d43\",\n fx_tez_airdrop: \"0x5021910a5762F9C872Bf7D6CD5F09127aE8cCA84\",\n fx_token_launchpad: \"0xTODO\",\n fx_project_factory: \"0xTODO\",\n}\n","import { IBaseApis } from \"./api/base.js\"\nimport { IEthApis } from \"./api/eth.js\"\nimport { ITezosApis } from \"./api/tezos.js\"\nimport { AlgoliaConfig } from \"./config/algolia.js\"\nimport { GPURenderingConfig } from \"./config/gpu.js\"\nimport { IBaseContracts } from \"./contracts/base.js\"\nimport { IEthContracts } from \"./contracts/eth.js\"\nimport { ITezosContracts } from \"./contracts/tezos.js\"\n\nexport interface IFxhashApis {\n website: string\n docs: string\n main: string\n hasura: string\n hasuraGql: string\n file: string\n fileInternal: string\n walletInternal: string\n fsEmulator: string\n extract: string\n extractInternal: string\n media: string\n ethMetadata: string\n ipfsInternal: string\n ipfsGateway: string\n ipfsGatewaySafe: string\n ipfsGatewayInternal: string\n onchfsProxy: string\n opensea: string\n authority: {\n api: string\n }\n capture: {\n lambdas: {\n small: string\n medium: string\n large: string\n }\n proxy: {\n ipfs: string\n onchfs: string\n }\n }\n events: {\n liveBackend: string\n }\n indexer: {\n tez: string\n eth: string\n base: string\n }\n}\n\n/**\n * A mapping of blockchains in their \"human-readable\" format with their proper\n * blockchain identifier.\n */\nexport const BlockchainIdentifiers = {\n TezosGhostnet: \"tezos:NetXnHfVqm9iesp\",\n TezosMainnet: \"tezos:NetXdQprcVkpaWU\",\n EthereumMainnet: \"eip155:1\",\n EthereumGoerli: \"eip155:5\",\n EthereumSepolia: \"eip155:11155111\",\n BaseSepolia: \"eip155:84532\",\n BaseMainnet: \"eip155:8453\",\n} as const\n\n/**\n * An union of all the blockchains supported by fxhash, defined by their chain\n * identifier. Can be used to facilitate typescript auto-completion with string\n * when enums aren't as good.\n */\nexport type BlockchainIdentifier =\n (typeof BlockchainIdentifiers)[keyof typeof BlockchainIdentifiers]\n\n// the variations supported by the config\nexport type TBlockchain = \"tez\" | \"eth\" | \"base\"\nexport type TBlockchainNetwork = \"testnet\" | \"mainnet\"\nexport type TEnv = \"dev\" | \"prd\" | \"local\" | \"localDocker\"\nexport type TEnvName = \"development\" | \"production\" | \"local\" | \"localDocker\"\n\nexport interface IFxhashNetworkConfig {\n network: string\n chainId: BlockchainIdentifier\n ethFeeReceiver: `0x${string}`\n wertRelayer: string\n fxhashFees: {\n primary: number\n secondary: number\n }\n royaltyBasisPoint: number\n splitBasisPoint: number\n}\n\n/**\n * Meta info about the application. Can be used by wallets to scope the\n * application making requests for instance.\n */\nexport interface IAppMetadata {\n /**\n * Application name. Will be displayed by wallets when a request is made\n * (signing a message, sending a transaction)\n */\n name: string\n\n /**\n * A short sentence (<25 words) describing the app. Might be used by wallets\n * to display extra info about your app.\n */\n description: string\n\n /**\n * **IMPORTANT**: This should match the URL in which the JS context making\n * requests to wallets will be executed. **If doesn't match execution\n * context domain, wallets may display a red warning.\n */\n url: string\n\n /**\n * URL to your application icon. Recommended: PNG 256x256\n * May be used by wallet apps in their UI when users interact with your app.\n */\n icon?: string\n}\n\nexport interface IFxhashEnvConfig {\n envName: TEnvName\n metadata: IAppMetadata\n gtMinPrice: string\n walletConnectId: string\n splitsApiKey: string\n projectLockTime: number\n referrerShare: number\n cloudflareTurnstileSiteKey: string\n cloudflareTurnstileSiteKeyV2: string\n syndicateProjectId: string\n awsS3Bucket: string\n awsS3Region: string\n openTelemetryTarget: string\n algolia: AlgoliaConfig\n gpu: GPURenderingConfig\n authJwtPublicKey: string\n}\n\ntype TBlockchainContacts = {\n [B in TBlockchain]: {\n tez: ITezosContracts\n eth: IEthContracts\n base: IBaseContracts\n }[B]\n}\n\ntype TBlockchainApis = {\n [B in TBlockchain]: {\n tez: ITezosApis\n eth: IEthApis\n base: IBaseApis\n }[B]\n}\n\ntype TNetworkBlockchainConfig = {\n [B in TBlockchain]: {\n tez: IFxhashNetworkConfig\n eth: IFxhashNetworkConfig\n base: IFxhashNetworkConfig\n }[B]\n}\n\nexport type IFxhashConfig = {\n networks: {\n [N in TBlockchainNetwork]: {\n [B in TBlockchain]: {\n contracts: TBlockchainContacts[B]\n config: TNetworkBlockchainConfig[B]\n apis: TBlockchainApis[B]\n }\n }\n }\n envs: {\n [K in TEnv]: {\n apis: IFxhashApis\n config: IFxhashEnvConfig\n }\n }\n}\n\nexport type IFxhashConfigSingleEnv = {\n [B in TBlockchain]: {\n contracts: TBlockchainContacts[B]\n config: TNetworkBlockchainConfig[B]\n apis: TBlockchainApis[B]\n }\n} & {\n apis: IFxhashApis\n config: IFxhashEnvConfig\n}\n","export const AUTH_JWT_PK_DEV = `-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1hF8JwAxIiFWzbXIgeOK\nBzf6SZlT3S1YampzVgy4pw1G0aKwHnyvC+HrRfkEOCGxX24DqbEpZby2LjKF9bfa\nOLrERrNSNrDLXbf3ipKQrnEBu2UdT2pE5UF/SwJUTdGczb78EId0yIjuZ26qZcQg\nPr1ji6FgdOOdEwdphl4x1dlQzgMgjhRcPwf9NsBx3R6l/ut2o38Qa8azxM7XBg8F\nUlsKGy4/jY2OIEKCravCoXmpeX9pxploED/DoJJI9FZXVB7/91iIb6MI0Ycby+xo\nGL/cF+ZYSVRoFexji4vpycJfltW5YJ8jHSveZWa6LXqM6LY7zRFmlxb3SF4tsDTT\nPQIDAQAB\n-----END PUBLIC KEY-----`\n\nexport const AUTH_JWT_PK_PRD = `-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtwl1CRvpN7MZeGGDTy8x\n+W3EkZfBzZqEp3vahCaqBdMkMhy7oB1pUU7pjb34tg9epnKdKo0cZn+Bw1LkSKWh\nZ1DSbgCdNR47qKb4xN8mZ5VvEw/64+nUXbCOikX+rMqSE2tNeNU3KOYr8VQYt9dv\n/J0xFwsr0aa4m23dmJ/oPLA8eR8lZk++fEZsbezKH3i9zz73I0UAivijM0S9lYeB\nNkT5zOaAJARzl69hEMQAv9qUkokwPSHlcG+LakhTGYAyMe3w/KHXVRkWjuCUgUJf\n90oveckX4dhMbHbz9ba1p3hpmwdmlRzljIIE2GQYawA8eNLsOb/z6V8HGMbCL/N9\nJwIDAQAB\n-----END PUBLIC KEY-----`\n","import { baseMainnetApis, baseTestnetApis } from \"./api/base.js\"\nimport { ethMainnetApis, ethTestnetApis } from \"./api/eth.js\"\nimport { tezosMainnetApis, tezosTestnetApis } from \"./api/tezos.js\"\nimport {\n fxhashDevApis,\n fxhashLocalApis,\n fxhashLocalDockerApis,\n fxhashPrdApis,\n} from \"./api/fxhash.js\"\nimport { fxAppEnvMetadata } from \"./config/metadata.js\"\nimport { algoliaConfigDev, algoliaConfigProd } from \"./config/algolia.js\"\nimport { gpuRenderingConfigDev, gpuRenderingConfigProd } from \"./config/gpu.js\"\nimport {\n tezosMainnetContracts,\n tezosTestnetContracts,\n} from \"./contracts/tezos.js\"\nimport { ethMainnetContracts, ethTestnetContracts } from \"./contracts/eth.js\"\nimport { baseMainnetContracts, baseTestnetContracts } from \"./contracts/base.js\"\nimport { getEnv } from \"./helpers.js\"\nimport {\n BlockchainIdentifiers,\n type IFxhashConfig,\n type IFxhashConfigSingleEnv,\n type TBlockchainNetwork,\n type TEnv,\n} from \"./types.js\"\nimport { AUTH_JWT_PK_DEV, AUTH_JWT_PK_PRD } from \"./constants.js\"\n\n/**\n * ! Beware ! Changing these values will result in current\n * projects breaking.\n * https://github.com/fxhash/monorepo/issues/701\n */\nconst tezosFees = {\n primary: 500,\n secondary: 250,\n}\n\nconst ethFees = {\n primary: 1000,\n secondary: 2500,\n}\n\nconst baseFees = {\n primary: 1000,\n secondary: 2500,\n}\n/**\n * --------------------------------------------------------\n */\n\nconst fxhashConfig: IFxhashConfig = {\n networks: {\n testnet: {\n tez: {\n contracts: tezosTestnetContracts,\n config: {\n network: \"ghostnet\",\n chainId: BlockchainIdentifiers.TezosGhostnet,\n ethFeeReceiver: \"0x\",\n wertRelayer: \"tz1T2uyYTshSGrEg13VGJFqsWwbi2H175hZb\",\n fxhashFees: tezosFees,\n royaltyBasisPoint: 1000,\n splitBasisPoint: 1000,\n },\n apis: tezosTestnetApis,\n },\n eth: {\n contracts: ethTestnetContracts,\n config: {\n network: \"Sepolia\",\n chainId: BlockchainIdentifiers.EthereumSepolia,\n ethFeeReceiver: \"0xe1f04609f7bC45e23a1BA4CD4a76f476755beBA6\",\n wertRelayer: \"0x2ff0ec69341f43cc462251bd49bb63681adafcb0\",\n fxhashFees: ethFees,\n royaltyBasisPoint: 10_000,\n splitBasisPoint: 1_000_000,\n },\n apis: ethTestnetApis,\n },\n base: {\n contracts: baseTestnetContracts,\n config: {\n network: \"Base Sepolia\",\n chainId: BlockchainIdentifiers.BaseSepolia,\n ethFeeReceiver: \"0xF70DF285Bc6941b4760BcC041B0cA1cc50E27F8d\",\n wertRelayer: \"0x2ff0ec69341f43cc462251bd49bb63681adafcb0\",\n fxhashFees: baseFees,\n royaltyBasisPoint: 10_000,\n splitBasisPoint: 1_000_000,\n },\n apis: baseTestnetApis,\n },\n },\n mainnet: {\n tez: {\n contracts: tezosMainnetContracts,\n config: {\n network: \"mainnet\",\n chainId: BlockchainIdentifiers.TezosMainnet,\n ethFeeReceiver: \"0x\",\n wertRelayer: \"tz1KkPS1TWFyDWfQwrdvmTmsCLUNMegDrrSi\",\n fxhashFees: tezosFees,\n royaltyBasisPoint: 1000,\n splitBasisPoint: 1000,\n },\n apis: tezosMainnetApis,\n },\n eth: {\n contracts: ethMainnetContracts,\n config: {\n network: \"Ethereum\",\n chainId: BlockchainIdentifiers.EthereumMainnet,\n ethFeeReceiver: \"0xed650E40F7bd3812152D4BFA6740662F50e178DF\",\n wertRelayer: \"0xc16157e00b1bff1522c6f01246b4fb621da048d0\",\n fxhashFees: ethFees,\n royaltyBasisPoint: 10_000,\n splitBasisPoint: 1_000_000,\n },\n apis: ethMainnetApis,\n },\n base: {\n contracts: baseMainnetContracts,\n config: {\n network: \"Base\",\n chainId: BlockchainIdentifiers.BaseMainnet,\n ethFeeReceiver: \"0xF70DF285Bc6941b4760BcC041B0cA1cc50E27F8d\",\n wertRelayer: \"0xc16157e00b1bff1522c6f01246b4fb621da048d0\",\n fxhashFees: baseFees,\n royaltyBasisPoint: 10_000,\n splitBasisPoint: 1_000_000,\n },\n apis: baseMainnetApis,\n },\n },\n },\n envs: {\n local: {\n apis: fxhashLocalApis,\n config: {\n envName: \"local\",\n metadata: fxAppEnvMetadata(\"local\"),\n gtMinPrice: \"0\",\n walletConnectId: \"111994543d1b754bab82c368d0e61ae5\",\n projectLockTime: 3600,\n referrerShare: 0,\n splitsApiKey: \"75348d57d6cf60fa4551766c\",\n cloudflareTurnstileSiteKey: \"1x00000000000000000000AA\",\n cloudflareTurnstileSiteKeyV2: \"0x4AAAAAAAW-w_xThcj91jkA\",\n syndicateProjectId: \"9dd71e90-4605-45f4-94e0-4e533b01081d\",\n awsS3Bucket: \"fxh-media-assets-dev-testnet-us-east-1\",\n awsS3Region: \"us-east-1\",\n openTelemetryTarget: \"http://localhost:14268\",\n algolia: algoliaConfigDev,\n gpu: gpuRenderingConfigDev,\n authJwtPublicKey: AUTH_JWT_PK_DEV,\n },\n },\n localDocker: {\n apis: fxhashLocalDockerApis,\n config: {\n envName: \"localDocker\",\n metadata: fxAppEnvMetadata(\"localDocker\"),\n gtMinPrice: \"0\",\n walletConnectId: \"111994543d1b754bab82c368d0e61ae5\",\n projectLockTime: 3600,\n referrerShare: 0,\n splitsApiKey: \"75348d57d6cf60fa4551766c\",\n cloudflareTurnstileSiteKey: \"1x00000000000000000000AA\",\n cloudflareTurnstileSiteKeyV2: \"0x4AAAAAAAW-w_xThcj91jkA\",\n syndicateProjectId: \"9dd71e90-4605-45f4-94e0-4e533b01081d\",\n awsS3Bucket: \"fxh-media-assets-dev-testnet-us-east-1\",\n awsS3Region: \"us-east-1\",\n openTelemetryTarget: \"http://localhost:14268\",\n algolia: algoliaConfigDev,\n gpu: gpuRenderingConfigDev,\n authJwtPublicKey: AUTH_JWT_PK_DEV,\n },\n },\n dev: {\n apis: fxhashDevApis,\n config: {\n envName: \"development\",\n metadata: fxAppEnvMetadata(\"dev\"),\n gtMinPrice: \"0\",\n walletConnectId: \"111994543d1b754bab82c368d0e61ae5\",\n projectLockTime: 3600,\n referrerShare: 0,\n splitsApiKey: \"75348d57d6cf60fa4551766c\",\n cloudflareTurnstileSiteKey: \"0x4AAAAAAAVOb6invoeYS4EN\",\n cloudflareTurnstileSiteKeyV2: \"0x4AAAAAAAW-w_xThcj91jkA\",\n syndicateProjectId: \"9dd71e90-4605-45f4-94e0-4e533b01081d\",\n awsS3Bucket: \"fxh-media-assets-dev-testnet-us-east-1\",\n awsS3Region: \"us-east-1\",\n openTelemetryTarget: \"https://tempo.ss.fxhash2.xyz\",\n algolia: algoliaConfigDev,\n gpu: gpuRenderingConfigDev,\n authJwtPublicKey: AUTH_JWT_PK_DEV,\n },\n },\n prd: {\n apis: fxhashPrdApis,\n config: {\n envName: \"production\",\n metadata: fxAppEnvMetadata(\"prd\"),\n gtMinPrice: \"0\",\n walletConnectId: \"111994543d1b754bab82c368d0e61ae5\",\n projectLockTime: 3600,\n referrerShare: 0,\n splitsApiKey: \"75348d57d6cf60fa4551766c\",\n cloudflareTurnstileSiteKey: \"0x4AAAAAAAVObp1YeuhbqNKB\",\n cloudflareTurnstileSiteKeyV2: \"0x4AAAAAAAW-yE4Q6Wdz6SNb\",\n syndicateProjectId: \"398ad73d-341c-4861-a038-f0ae1ca58e07\",\n awsS3Bucket: \"fxh-media-assets-prd-mainnet-us-east-1\",\n awsS3Region: \"us-east-1\",\n openTelemetryTarget: \"https://tempo.ss.fxhash2.xyz\",\n algolia: algoliaConfigProd,\n gpu: gpuRenderingConfigProd,\n authJwtPublicKey: AUTH_JWT_PK_PRD,\n },\n },\n },\n}\n\nexport function getBlockchainNetworkForEnv(env: TEnv): TBlockchainNetwork {\n return env === \"prd\" ? \"mainnet\" : \"testnet\"\n}\n\nexport function getConfigForEnv(env: TEnv): IFxhashConfigSingleEnv {\n const blockchainNetwork = getBlockchainNetworkForEnv(env)\n return {\n ...fxhashConfig.networks[blockchainNetwork],\n ...fxhashConfig.envs[env],\n }\n}\n\nexport const localConfig: IFxhashConfigSingleEnv = getConfigForEnv(\"local\")\nexport const localDockerConfig: IFxhashConfigSingleEnv =\n getConfigForEnv(\"localDocker\")\nexport const devConfig: IFxhashConfigSingleEnv = getConfigForEnv(\"dev\")\nexport const prdConfig: IFxhashConfigSingleEnv = getConfigForEnv(\"prd\")\n\nconst currentEnv = getEnv()\nlet config: IFxhashConfigSingleEnv = getConfigForEnv(currentEnv)\n\nfunction setConfig(\n userConfig: Partial<IFxhashConfigSingleEnv>\n): IFxhashConfigSingleEnv {\n config = {\n ...config,\n ...userConfig,\n }\n return config\n}\n\nexport { fxhashConfig, config, setConfig }\n","import { config } from \"../config.js\"\n\nexport enum EGatewayIpfs {\n FXHASH = \"FXHASH\",\n FXHASH_SAFE = \"FXHASH_SAFE\",\n IPFSIO = \"IPFSIO\",\n}\n\nconst ipfsRegex = new RegExp(\"^ipfs://\")\n\n/**\n * Given a gateway enum, outputs the http url root of the gateway\n */\nexport function ipfsGatewayRoot(gateway: EGatewayIpfs): string {\n switch (gateway) {\n case EGatewayIpfs.FXHASH:\n return config.apis.ipfsGateway\n case EGatewayIpfs.FXHASH_SAFE:\n return config.apis.ipfsGatewaySafe\n case EGatewayIpfs.IPFSIO:\n default:\n return \"https://ipfs.io\"\n }\n}\n\n/**\n * Returns the CID or a resource, whether it's already a CID or an ipfs://<CID> resource\n * @param resource either a CID or a ipfs://<CID> string\n */\nexport function ipfsCidFromUriOrCid(resource: string): string {\n if (!ipfsRegex.test(resource)) return resource\n return resource.slice(7)\n}\n\n/**\n * Given a CID or ipfs://<CID>, returns an URL to a gateway pointing to the resource\n * @param resource the resource input, either a CID or ipfs://<CID>\n * @param gateway the gateway URL to use for the resource\n */\nexport function ipfsGatewayUrl(\n resource: string | null | undefined,\n gateway: EGatewayIpfs = EGatewayIpfs.FXHASH_SAFE\n): string {\n if (!resource) return \"\"\n const cid = ipfsCidFromUriOrCid(resource)\n return `${ipfsGatewayRoot(gateway)}/ipfs/${cid}`\n}\n\n/**\n * given a URI (either ipfs://<CID>, onchfs://<CID> or temp://<CID>),\n * returns the URL to the resource\n */\nexport function proxyUrl(uri: string): string {\n // let blobs be blobs\n if (uri.startsWith(\"blob:\") || uri.startsWith(\"data:\")) return uri\n\n const [protocol, cid] = uri.split(\"://\")\n switch (protocol) {\n case \"https\":\n return uri\n case \"temp\":\n return `${config.apis.fsEmulator}/resolve/${cid}`\n case \"onchfs\":\n return `${config.apis.onchfsProxy}/${cid}`\n default:\n return ipfsGatewayUrl(uri)\n }\n}\n","import { config } from \"../config.js\"\n\nexport const tezosContractPrefixesByContractAddress: Record<string, string> = {\n [config.tez.contracts.gentk_v1]: \"FX0\",\n [config.tez.contracts.gentk_v2]: \"FX0\",\n [config.tez.contracts.gentk_v3]: \"FX1\",\n}\nexport function getObjktIdFromContract(contract: string, id: string): string {\n return `${tezosContractPrefixesByContractAddress[contract]}-${id}`\n}\n","import { type IEthApis, ethTestnetApis } from \"./api/eth.js\"\nimport {\n type ITezosApis,\n tezosTestnetApis,\n tezosMainnetApis,\n} from \"./api/tezos.js\"\nimport { fxhashDevApis, fxhashPrdApis } from \"./api/fxhash.js\"\nimport {\n type ITezosContracts,\n tezosMainnetContracts,\n tezosTestnetContracts,\n} from \"./contracts/tezos.js\"\nimport { type IEthContracts, ethTestnetContracts } from \"./contracts/eth.js\"\nimport { type GPURenderingConfig } from \"./config/gpu.js\"\nimport {\n fxhashConfig,\n prdConfig,\n devConfig,\n localConfig,\n config,\n setConfig,\n} from \"./config.js\"\nimport {\n type IFxhashEnvConfig,\n type IFxhashNetworkConfig,\n type TBlockchain,\n type TBlockchainNetwork,\n type TEnv,\n type IFxhashConfig,\n} from \"./types.js\"\n\nexport {\n ethTestnetApis,\n tezosTestnetApis,\n tezosMainnetApis,\n fxhashDevApis,\n fxhashPrdApis,\n tezosTestnetContracts,\n tezosMainnetContracts,\n ethTestnetContracts,\n fxhashConfig,\n devConfig,\n prdConfig,\n localConfig,\n config,\n setConfig,\n type IEthApis,\n type ITezosApis,\n type ITezosContracts,\n type IEthContracts,\n type IFxhashEnvConfig,\n type IFxhashNetworkConfig,\n type TBlockchain,\n type TBlockchainNetwork,\n type TEnv,\n type IFxhashConfig,\n type GPURenderingConfig,\n}\n\nexport * from \"./types.js\"\nexport * from \"./helpers.js\"\nexport * from \"./utils/index.js\"\n\nexport {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AChB,QAAO,WAAW,GAAG,WAAW,cAAc;AAC/C,IAAG;AAEJ,SAAgB,SAAe;AAC7B,KAAI,OAAQ,QAAO;AACnB,KAAI,QACF,QAAO,gBAAgB,gBAAgB;AAEzC,QAAO;AACR;;;;AClDD,MAAaC,gBAA6B;CACxC,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;CACR,WAAW;CACX,MAAM;CACN,cACE;CACF,gBACE;CACF,YAAY;CACZ,SAAS;CACT,iBACE;CACF,OAAO;CACP,aAAa;CACb,cACE;CACF,aAAa;CACb,iBAAiB;CACjB,qBACE;CACF,aAAa;CACb,SAAS;CACT,WAAW,EACT,KAAK,OACN;CACD,SAAS;EACP,SAAS;GACP,OACE;GACF,QACE;GACF,OACE;EACH;EACD,OAAO;GACL,MAAM;GACN,QACE;EACH;CACF;CACD,QAAQ,EACN,aAAa,QACd;CACD,SAAS;EACP,KAAK;EACL,KAAK;EACL,MAAM;CACP;AACF;AAKD,MAAaC,kBAA+B;CAC1C,GAAG;CACH,SAAS;CACT,QAAQ;CACR,WAAW;CACX,cAAc,cAAc;CAC5B,qBAAqB,cAAc;CACnC,gBAAgB;AACjB;AAED,MAAaC,wBAAqC;CAChD,GAAG;CACH,QAAQ,qBAAqB,gBAAgB,OAAO;CACpD,WAAW,qBAAqB,gBAAgB,UAAU;AAC3D;AAGD,MAAaC,gBAA6B;CACxC,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;CACR,WAAW;CACX,MAAM;CACN,cACE;CACF,gBACE;CACF,YAAY;CACZ,SAAS;CACT,iBACE;CACF,OAAO;CACP,aAAa;CACb,cACE;CACF,aAAa;CACb,iBAAiB;CACjB,qBACE;CACF,aAAa;CACb,SAAS;CACT,WAAW,EACT,KAAK,OACN;CACD,SAAS;EACP,SAAS;GACP,OACE;GACF,QACE;GACF,OACE;EACH;EACD,OAAO;GACL,MAAM;GACN,QACE;EACH;CACF;CACD,QAAQ,EACN,aAAa,QACd;CACD,SAAS;EACP,KAAK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,MAAK,UAAU,KAAK,SAAS,CAAE,QAAO;AACtC,QAAO,SAAS,MAAM,EAAE;AACzB;;;;;;AAOD,SAAgB,eACdC,UACAF,UAAwB,aAAa,aAC7B;AACR,MAAK,SAAU,QAAO;CACtB,MAAM,MAAM,oBAAoB,SAAS;AACzC,SAAQ,EAAE,gBAAgB,QAAQ,CAAC,QAAQ,IAAI;AAChD;;;;;AAMD,SAAgB,SAASG,KAAqB;AAE5C,KAAI,IAAI,WAAW,QAAQ,IAAI,IAAI,WAAW,QAAQ,CAAE,QAAO;CAE/D,MAAM,CAAC,UAAU,IAAI,GAAG,IAAI,MAAM,MAAM;AACxC,SAAQ,UAAR;EACE,KAAK,QACH,QAAO;EACT,KAAK,OACH,SAAQ,EAAE,OAAO,KAAK,WAAW,WAAW,IAAI;EAClD,KAAK,SACH,SAAQ,EAAE,OAAO,KAAK,YAAY,GAAG,IAAI;EAC3C,QACE,QAAO,eAAe,IAAI;CAC7B;AACF;;;;ACjED,MAAaC,yCAAiE;EAC3E,OAAO,IAAI,UAAU,WAAW;EAChC,OAAO,IAAI,UAAU,WAAW;EAChC,OAAO,IAAI,UAAU,WAAW;AAClC;AACD,SAAgB,uBAAuBC,UAAkBC,IAAoB;AAC3E,SAAQ,EAAE,uCAAuC,UAAU,GAAG,GAAG;AAClE;;;;ACwDD,kBAAe"}
|
1
|
+
{"version":3,"file":"index.js","names":["ethTestnetApis: IEthApis","ethMainnetApis: IEthApis","tezosTestnetApis: ITezosApis","tezosMainnetApis: ITezosApis","url: string","isProd: boolean","isLocal: boolean","isDockerLocal: boolean","fxhashDevApis: IFxhashApis","fxhashLocalApis: IFxhashApis","fxhashLocalDockerApis: IFxhashApis","fxhashPrdApis: IFxhashApis","fxEnvToApisMap: Record<TEnv, IFxhashApis>","env: TEnv","tezosTestnetContracts: ITezosContracts","tezosMainnetContracts: ITezosContracts","ethTestnetContracts: IEthContracts","ethMainnetContracts: IEthContracts","baseTestnetApis: IBaseApis","baseMainnetApis: IBaseApis","par1: IRichErrorMessages | string[]","crossEnvMetadata: Omit<IAppMetadata, \"url\">","env: TEnv","value: any","missingProperties: string[]","requiredProperties: (keyof Required<IAppMetadata>)[]","algoliaConfigDev: AlgoliaConfig","algoliaConfigProd: AlgoliaConfig","gpuRenderingConfigShared: GPURenderingConfigShared","batchArns: Record<GPUVersion, string>","gpuRenderingConfigDev: GPURenderingConfig","gpuRenderingConfigProd: GPURenderingConfig","baseTestnetContracts: IBaseContracts","baseMainnetContracts: IBaseContracts","fxhashConfig: IFxhashConfig","env: TEnv","localConfig: IFxhashConfigSingleEnv","localDockerConfig: IFxhashConfigSingleEnv","devConfig: IFxhashConfigSingleEnv","prdConfig: IFxhashConfigSingleEnv","config: IFxhashConfigSingleEnv","userConfig: Partial<IFxhashConfigSingleEnv>","onchfsRegex: RegExp","resource: string","ipfsRegex: RegExp","gateway: EGatewayIpfs","resource: string","resource: string | null | undefined","uri: string","resource: string","tezosContractPrefixesByContractAddress: Record<string, string>","contract: string","id: string"],"sources":["../src/api/eth.ts","../src/api/tezos.ts","../src/helpers.ts","../src/api/fxhash.ts","../src/contracts/tezos.ts","../src/contracts/eth.ts","../src/api/base.ts","../src/errors/metadata.ts","../src/config/metadata.ts","../src/config/algolia.ts","../src/config/gpu.ts","../src/contracts/base.ts","../src/types.ts","../src/constants.ts","../src/config.ts","../src/utils/onchfs.ts","../src/utils/ipfs.ts","../src/utils/cid.ts","../src/utils/contracts.ts","../src/index.ts"],"sourcesContent":["export interface IEthApis {\n rpcs: string[]\n reservoir: string\n safe: string\n whitelist: string\n alchemy: {\n rpc: string\n }\n}\n\nexport const ethTestnetApis: IEthApis = {\n rpcs: [\n \"https://eth-sepolia.g.alchemy.com/v2/fATxHNjMh0rR9DnHCtZKDpPPxkEY48Qb\",\n ],\n reservoir: \"https://api-sepolia.reservoir.tools\",\n safe: \"https://safe-transaction-sepolia.safe.global\",\n whitelist: \"http://localhost:9999/whitelist/new\",\n alchemy: {\n rpc: \"https://eth-sepolia.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9\",\n },\n}\n\nexport const ethMainnetApis: IEthApis = {\n rpcs: [\n \"https://eth-mainnet.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9\",\n ],\n reservoir: \"https://api.reservoir.tools\",\n safe: \"https://safe-transaction-mainnet.safe.global/\",\n whitelist: \"https://api.v2.dev.fxhash-dev.xyz/whitelist/new\",\n alchemy: {\n rpc: \"https://eth-mainnet.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9\",\n },\n}\n","export interface ITezosApis {\n tzktWebsite: string\n tzkt: string\n tzktPro: string\n rpcs: string[]\n}\n\nexport const tezosTestnetApis: ITezosApis = {\n tzkt: \"https://api.ghostnet.tzkt.io/v1/\",\n tzktPro: \"https://api.ghostnet.tzkt.io/v1/\",\n tzktWebsite: \"https://ghostnet.tzkt.io/\",\n rpcs: [\n \"https://ghostnet.ecadinfra.com\",\n \"https://ghostnet.smartpy.io\",\n \"https://ghostnet.tezos.marigold.dev/\",\n ],\n}\n\nexport const tezosMainnetApis: ITezosApis = {\n tzkt: \"https://api.tzkt.io/v1/\",\n tzktPro: \"https://pro.tzkt.io/v1/\",\n tzktWebsite: \"https://tzkt.io/\",\n rpcs: [\n \"https://rpc1.fxhash.xyz\",\n \"https://mainnet.smartpy.io\",\n \"https://mainnet.api.tez.ie\",\n \"https://teznode.letzbake.com\",\n ],\n}\n","import { TEnv } from \"./types.js\"\n\nconst HOST_LOCAL = \"localhost\"\nconst HOST_DOCKER_INTERNAL = \"host.docker.internal\"\n\nexport function getDockerInternalUrl(url: string): string {\n return url.replace(HOST_LOCAL, HOST_DOCKER_INTERNAL)\n}\n\nexport const isProd: boolean = (() => {\n // We can't destructure process.envs\n // https://nextjs.org/docs/pages/api-reference/next-config-js/env\n return (\n process.env.FXHASH_ENV === \"prd\" ||\n process.env.FXHASH_ENV === \"production\" ||\n process.env.NEXT_PUBLIC_FXHASH_ENV === \"prd\" ||\n process.env.NEXT_PUBLIC_FXHASH_ENV === \"production\" ||\n process.env.REACT_APP_FXHASH_ENV === \"prd\" ||\n process.env.REACT_APP_FXHASH_ENV === \"production\" ||\n process.env.VITE_FXHASH_ENV === \"prd\" ||\n process.env.VITE_FXHASH_ENV === \"production\"\n )\n})()\n\nexport const isLocal: boolean = (() => {\n // We can't destructure process.envs\n // https://nextjs.org/docs/pages/api-reference/next-config-js/env\n return (\n process.env.FXHASH_ENV === \"local\" ||\n process.env.NEXT_PUBLIC_FXHASH_ENV === \"local\" ||\n process.env.REACT_APP_FXHASH_ENV === \"local\" ||\n process.env.VITE_FXHASH_ENV === \"local\"\n )\n})()\n\nexport const isDockerLocal: boolean = (() => {\n const isBrowser = typeof window !== \"undefined\"\n if (isBrowser) return false\n let fs\n try {\n fs = require(\"fs\")\n } catch (e) {\n return false\n }\n if (!fs) return false\n return isLocal && fs.existsSync(\"/.dockerenv\")\n})()\n\nexport function getEnv(): TEnv {\n if (isProd) return \"prd\"\n if (isLocal) {\n return isDockerLocal ? \"localDocker\" : \"local\"\n }\n return \"dev\"\n}\n","import { getDockerInternalUrl } from \"../helpers.js\"\nimport { IFxhashApis, TEnv } from \"../types.js\"\n\n// list of APIs dev leverages\nexport const fxhashDevApis: IFxhashApis = {\n website: \"https://beta.fxhash-dev.xyz\",\n docs: \"https://docs.fxhash.xyz\",\n main: \"https://api.v2-temp.dev.fxhash-dev.xyz/graphql\",\n hasura: \"https://api.v2.dev.fxhash-dev.xyz\",\n hasuraGql: \"https://api.v2.dev.fxhash-dev.xyz/v1/graphql\",\n file: \"https://file-api.fxhash-dev.xyz\",\n fileInternal:\n \"http://fxhash-multichain-dev-testnet-file-api.fxhash-multichain-dev-testnet.svc.cluster.local:4004\",\n walletInternal:\n \"http://fxhash-multichain-dev-testnet-wallet-api.fxhash-multichain-dev-testnet.svc.cluster.local:3208\",\n fsEmulator: \"https://file-api.fxhash-dev.xyz/fs\",\n extract: \"https://extract.fxhash-dev.xyz\",\n extractInternal:\n \"http://fxhash-dev-testnet-extract-balancer.fxhash-dev-testnet.svc.cluster.local:4017\",\n media: \"https://media.dev.fxhash-dev.xyz\",\n ethMetadata: \"https://media.dev.fxhash-dev.xyz/metadata/ethereum/\",\n ipfsInternal:\n \"http://fxhash-dev-testnet-ipfs-cluster-api.fxhash-dev-testnet.svc.cluster.local:9094\",\n ipfsGateway: \"https://gateway.fxhash-dev.xyz\",\n ipfsGatewaySafe: \"https://gateway.fxhash-dev2.xyz\",\n ipfsGatewayInternal:\n \"http://fxhash-dev-testnet-ipfs-cluster-gateway.fxhash-dev-testnet.svc.cluster.local:8080\",\n onchfsProxy: \"https://onchfs.fxhash-dev2.xyz\",\n opensea: \"https://testnets-api.opensea.io/api/v2\",\n authority: {\n api: \"NONE\",\n },\n capture: {\n lambdas: {\n small:\n \"https://u5not5l323zczuwnrzxwkt34ra0eyidj.lambda-url.us-east-1.on.aws/\",\n medium:\n \"https://jgfz7a6km7fsqonej2sp3lqwvu0utnyy.lambda-url.us-east-1.on.aws/\",\n large:\n \"https://fzezvbp2f74yturkj4akjyrq3e0zswhb.lambda-url.us-east-1.on.aws/\",\n },\n proxy: {\n ipfs: \"ipfs://Qme6E5z1GDqrHyPomGEw5LChxmE9pdEYGWjwxrv6ZgwZRo\",\n onchfs:\n \"onchfs://4287364ed3219d3f2f77302a71eff0db49e971058ef87f163981ef89a445b143\",\n },\n },\n events: {\n liveBackend: \"_NONE\",\n },\n indexer: {\n tez: \"http://fxhash-multichain-dev-testnet-indexer-v2.fxhash-multichain-dev-testnet.svc.cluster.local:4001\",\n eth: \"http://fxhash-multichain-dev-testnet-eth-indexer.fxhash-multichain-dev-testnet.svc.cluster.local:3000\",\n base: \"http://fxhash-multichain-dev-testnet-base-indexer.fxhash-multichain-dev-testnet.svc.cluster.local:3000\",\n },\n}\n\n// list of APIs for when fxhash is ran locally\n// The ports must correspond to the ports the services are running on\n// defined in the root docker compose file of the monorepo\nexport const fxhashLocalApis: IFxhashApis = {\n ...fxhashDevApis,\n website: \"http://localhost:3200\",\n hasura: \"http://localhost:8888\",\n hasuraGql: \"http://localhost:8888/v1/graphql\",\n fileInternal: fxhashDevApis.file,\n ipfsGatewayInternal: fxhashDevApis.ipfsGateway,\n walletInternal: \"http://host.docker.internal:3208\",\n}\n\nexport const fxhashLocalDockerApis: IFxhashApis = {\n ...fxhashLocalApis,\n hasura: getDockerInternalUrl(fxhashLocalApis.hasura),\n hasuraGql: getDockerInternalUrl(fxhashLocalApis.hasuraGql),\n}\n\n// list of APIs prod leverages\nexport const fxhashPrdApis: IFxhashApis = {\n website: \"https://www.fxhash.xyz\",\n docs: \"https://docs.fxhash.xyz\",\n main: \"https://api.v2-temp.fxhash.xyz/graphql\",\n hasura: \"https://api.v2.fxhash.xyz\",\n hasuraGql: \"https://api.v2.fxhash.xyz/v1/graphql\",\n file: \"https://file-api.fxhash.xyz\",\n fileInternal:\n \"http://fxhash-multichain-prd-file-api.fxhash-multichain-prd.svc.cluster.local:4004\",\n walletInternal:\n \"http://fxhash-multichain-prd-wallet-api.fxhash-multichain-prd.svc.cluster.local:3208\",\n fsEmulator: \"https://file-api.fxhash.xyz/fs\",\n extract: \"https://extract.fxhash.xyz\",\n extractInternal:\n \"http://fxhash-prd-extract-balancer.fxhash-prd.svc.cluster.local:4017\",\n media: \"https://media.fxhash.xyz\",\n ethMetadata: \"https://media.fxhash.xyz/metadata/ethereum/\",\n ipfsInternal:\n \"http://fxhash-prd-ipfs-cluster-api.fxhash-prd.svc.cluster.local:9094\",\n ipfsGateway: \"https://gateway.fxhash.xyz\",\n ipfsGatewaySafe: \"https://gateway.fxhash2.xyz\",\n ipfsGatewayInternal:\n \"http://fxhash-prd-ipfs-cluster-gateway.fxhash-prd.svc.cluster.local:8080\",\n onchfsProxy: \"https://onchfs.fxhash2.xyz\",\n opensea: \"https://api.opensea.io/api/v2\",\n authority: {\n api: \"NONE\",\n },\n capture: {\n lambdas: {\n small:\n \"https://7sz7knaaw3obgqxjyv3m4e5myu0lsbdp.lambda-url.us-east-1.on.aws/\",\n medium:\n \"https://tuupcq6eesbfk4veuzdfrhu7zm0zwuqy.lambda-url.us-east-1.on.aws/\",\n large:\n \"https://bojj24y6ucxmsyfi4uccdmiliy0dzhji.lambda-url.us-east-1.on.aws/\",\n },\n proxy: {\n ipfs: \"ipfs://Qme6E5z1GDqrHyPomGEw5LChxmE9pdEYGWjwxrv6ZgwZRo\",\n onchfs:\n \"onchfs://4287364ed3219d3f2f77302a71eff0db49e971058ef87f163981ef89a445b143\",\n },\n },\n events: {\n liveBackend: \"_NONE\",\n },\n indexer: {\n tez: \"http://fxhash-multichain-prd-indexer-v2.fxhash-multichain-prd.svc.cluster.local:4001\",\n eth: \"http://fxhash-multichain-prd-eth-indexer.fxhash-multichain-prd.svc.cluster.local:3000\",\n base: \"http://fxhash-multichain-prd-base-indexer.fxhash-multichain-prd.svc.cluster.local:3000\",\n },\n}\n\nconst fxEnvToApisMap: Record<TEnv, IFxhashApis> = {\n local: fxhashLocalApis,\n localDocker: fxhashLocalDockerApis,\n dev: fxhashDevApis,\n prd: fxhashPrdApis,\n}\n\n/**\n * Given some env, returns the associated APIs config.\n */\nexport function fxApisByEnv(env: TEnv): IFxhashApis {\n return fxEnvToApisMap[env]\n}\n","export interface ITezosContracts {\n allowed_mint: string\n allowed_mint_issuer: string\n allowed_mint_issuer_v3: string\n allowed_mint_v3: string\n articles: string\n card_proxy: string\n collaboration_factory: string\n consumable_database: string\n cycles: string\n gentk_v1: string\n gentk_v1_data: string\n gentk_v2: string\n gentk_v3: string\n issuer_tickets: string\n issuer_v0: string\n issuer_v1: string\n issuer_v2: string\n issuer_v3: string\n marketplace_v1: string\n marketplace_v2: string\n marketplace_v3: string\n moderation_articles: string\n moderation_team: string\n moderation_token: string\n moderation_token_v3: string\n moderation_user: string\n pricing_dutch_auction: string\n pricing_dutch_auction_v3: string\n pricing_fixed: string\n pricing_fixed_v3: string\n randomizer: string\n randomizer_v2: string\n token_moderation: string\n treasury: string\n user_moderation: string\n user_register: string\n onchfs_files: string\n}\n// The Tezos Smart Contracts addresses on testnet\nexport const tezosTestnetContracts: ITezosContracts = {\n allowed_mint: \"KT1QwfqMUDRYVyxo9KhunY5YCx9qQ9LWcswr\",\n allowed_mint_issuer: \"KT1WDByFKQmgVynxSr2rzdijs5aSs7mo7eBM\",\n allowed_mint_issuer_v3: \"KT1S3UqrLgMpVivNWWmBUnkPCaSFHDJ4HYvb\",\n allowed_mint_v3: \"KT1HUE2A6CHNw4NZZBWjJyG38nysWWfusagu\",\n articles: \"KT1HV8NXUCKWC1tWNHSD8LPPiKPshQuXvb8r\",\n card_proxy: \"KT1R6N27Qdw4RqeSUnYkw436uZrFSRWtxqbd\",\n collaboration_factory: \"KT1WFXts7jwxpD9uGDKzyqTUTFaG222xmjoZ\",\n consumable_database: \"KT1FP9y1PJpJkXhdJCgYZhVbj9UBpxnA57Bx\",\n cycles: \"KT1BJBcvtgZM2Kf4rUapmp4AhXtWCmznxd6F\",\n gentk_v1: \"KT1ExHjELnDuat9io3HkDcrBhHmek7h8EVXG\",\n gentk_v1_data: \"KT1SquPSN9oiMUWHG9coKRJAwz8Afe4c6izT\",\n gentk_v2: \"KT1NkZho1yRkDdQnN4Mz93sDYyY2pPrEHTNs\",\n gentk_v3: \"KT1TtVAyjh4Ahdm8sLZwFnL7tqoLf59XrK2h\",\n issuer_tickets: \"KT19PBsvmB2CwFqXftzb5gNJfxrEDFdSxGKZ\",\n issuer_v0: \"KT1PyfrDD85RxUWz8dMHoC92MxdPzecSQ5t9\",\n issuer_v1: \"KT1QwWVZogqPZZtGSVxGpLkEWar7LFvAsMdd\",\n issuer_v2: \"KT1Sy7X6TubmZ39G8CHVrUcxjc3jiF68P8oB\",\n issuer_v3: \"KT1DfymMp3qD5Pd5ujPjp7UsQbppY9yY1Hbf\",\n marketplace_v1: \"KT1DbivePcuUzCp5RaAQWxPSLV9G2Ys4faUR\",\n marketplace_v2: \"KT1HFYtf4vNCr4xRDZxLKc5asUdCsPUTTW9R\",\n marketplace_v3: \"KT1J6rt4d9U785DZWYEPvQ2fR1e71gxP42Lj\",\n moderation_articles: \"KT1Qg78fa81Xyjh65yNqUgVucubHUyq6VmgL\",\n moderation_team: \"KT1RsfyWzHs1EEWMzFLmKnJTQwPqRzsnF3Dp\",\n moderation_token: \"KT1PokFR36CcXKh3jUnjncabcuPWm5BMiqjt\",\n moderation_token_v3: \"KT1C1J38YR6eDvRBDEDaypptCFda9aH7FRbJ\",\n moderation_user: \"KT1Q3s7mYpscCnwsyndrVZg9WqBCmw99n37g\",\n pricing_dutch_auction: \"KT1BqikbUisiBBd9WvPiqnTwLY8Pm68p2Aua\",\n pricing_dutch_auction_v3: \"KT1QCboxZ28SqsfyZWTDrkSpZzU6xjZXBsFb\",\n pricing_fixed: \"KT1PAsf9Zc9FGJA9iLE1Ab2vPkMDsh4hyZVi\",\n pricing_fixed_v3: \"KT1Mqyy5JPknNzNJtgF93SHpFHv4VcYrNZry\",\n randomizer: \"KT1QmdsrJWJgK3VXid8q7D4sPipVoc9jh12x\",\n randomizer_v2: \"KT1Eow4nBY3B9EhWcX1aEXva67VkNFfP1Tq6\",\n token_moderation: \"KT1BHfPDMRp2q48ZkmmnK7TRzQRdFnp6XVKq\",\n treasury: \"KT1MbDbRhZPs5TzZEXkT142ePoccFHfohBoo\",\n user_moderation: \"KT1LmZjoitx2itnB1qCbHMrT3V64RbuSPf3a\",\n user_register: \"KT1XaikgmBDQANBvkFqyFhSpgAZJAXpiDFGE\",\n onchfs_files: \"KT1FA8AGGcJha6S6MqfBUiibwTaYhK8u7s9Q\",\n}\n// The Tezos Smart Contracts on mainnet\nexport const tezosMainnetContracts: ITezosContracts = {\n allowed_mint: \"KT1VDQwskdfHkSbA9W6CSEnxnh1u1XU8K8Gu\",\n allowed_mint_issuer: \"KT1Djz5ix2yEGmV7PMq3GYq17TvMMkd1anT2\",\n allowed_mint_issuer_v3: \"KT1LJ4R4xoEWMgTjrGrdHJAeHLYFaB4RsoVK\",\n allowed_mint_v3: \"KT1KgEjxqfRCMwtCGifT6fDPwC35RptTUEvE\",\n articles: \"KT1GtbuswcNMGhHF2TSuH1Yfaqn16do8Qtva\",\n card_proxy: \"KT1DQGSRsgHcf2TPdKGc4qm5AT9JprJCAo7j\",\n collaboration_factory: \"KT1JrUPSCt1r2MB2J7Lk2KwiWSYr3Mr414ck\",\n consumable_database: \"KT1Mbfkqh5EhebWuMvqAfUPTpgiBPwmQCDSD\",\n cycles: \"KT1BgD9SPfysnMz3vkfm6ZEaGFKCVcE5ay91\",\n gentk_v1: \"KT1KEa8z6vWXDJrVqtMrAeDVzsvxat3kHaCE\",\n gentk_v1_data: \"KT1WRpPyXHSCbTfDQFWVXbMpxxvf7Y7KChxc\",\n gentk_v2: \"KT1U6EHmNxJTkvaWJ4ThczG4FSDaHC21ssvi\",\n gentk_v3: \"KT1EfsNuqwLAWDd3o4pvfUx1CAh5GMdTrRvr\",\n issuer_tickets: \"KT19etLCjCCzTLFFAxsxLFsVYMRPetr2bTD5\",\n issuer_v0: \"KT1AEVuykWeuuFX7QkEAMNtffzwhe1Z98hJS\",\n issuer_v1: \"KT1XCoGnfupWk7Sp8536EfrxcP73LmT68Nyr\",\n issuer_v2: \"KT1BJC12dG17CVvPKJ1VYaNnaT5mzfnUTwXv\",\n issuer_v3: \"KT1Xpmp15KfqoePNW9HczFmqaGNHwadV2a3b\",\n marketplace_v1: \"KT1Xo5B7PNBAeynZPmca4bRh6LQow4og1Zb9\",\n marketplace_v2: \"KT1GbyoDi7H1sfXmimXpptZJuCdHMh66WS9u\",\n marketplace_v3: \"KT1M1NyU9X4usEimt2f3kDaijZnDMNBu42Ja\",\n moderation_articles: \"KT1A36z7nG4zPDbhjyrzhYf9SCn5ipPZeRMQ\",\n moderation_team: \"KT1FvGQcPxzuJkJsdWFQiGkueSNT5mqpFDrf\",\n moderation_token: \"KT18tPu7uXy9PJ97i3qCLsr7an4X6sQ5qxU7\",\n moderation_token_v3: \"KT1UBWXN1KxTh4eurrCTCH7aEjqdrM3HjP6R\",\n moderation_user: \"KT1Wn2kkKmdbyLWBiLXWCkE7fKj1LsLKar2A\",\n pricing_dutch_auction: \"KT1EzLrXRCXij42pKfbZPn48PuxrnVki1aYY\",\n pricing_dutch_auction_v3: \"KT1MFgHKorMWXeVL6qrpgjZmemirafppSg9q\",\n pricing_fixed: \"KT1FHzHxuMaNLYG8LdniY45M6RCfkF3AoXFh\",\n pricing_fixed_v3: \"KT1V24J6FVuKPU3xy6gVF6wJ3zdRXBheQhaV\",\n randomizer: \"KT1XYgKrzBbzsckGvXTPgxFyN7KNZ9RPYVWf\",\n randomizer_v2: \"KT1CfmepqJkfZwqLPFVMKFoYUS7dPPZHyCTo\",\n token_moderation: \"KT1HgVuzNWVvnX16fahbV2LrnpwifYKoFMRd\",\n treasury: \"KT1P2BXYb894MekrCcSrnidzQYPVqitLoVLc\",\n user_moderation: \"KT1TWWQ6FtLoosVfZgTKV2q68TMZaENhGm54\",\n user_register: \"KT1Ezht4PDKZri7aVppVGT4Jkw39sesaFnww\",\n onchfs_files: \"KT1Ae7dT1gsLw2tRnUMXSCmEyF74KVkM6LUo\",\n}\n","export interface IEthContracts {\n multicall3: `0x${string}`\n seaport_zone: `0x${string}`\n issuer_factory_v1: `0x${string}`\n fixed_price_minter_v1: `0x${string}`\n dutch_auction_minter_v1: `0x${string}`\n mint_ticket_factory_v1: `0x${string}`\n ticket_redeemer_v1: `0x${string}`\n ipfs_renderer_v1: `0x${string}`\n onchfs_renderer_v1: `0x${string}`\n randomizer_v1: `0x${string}`\n role_registry_v1: `0x${string}`\n contract_registry_v1: `0x${string}`\n gen_art_token_impl_v1: `0x${string}`\n mint_ticket_impl_v1: `0x${string}`\n onchfs_file_system: `0x${string}`\n onchfs_content_store: `0x${string}`\n seaport: `0x${string}`\n fxhashTeamSafeAddress: `0x${string}`\n signerSafe: `0x${string}`\n moderationSafe: `0x${string}`\n farcaster_frame_fixed_price_minter_v1: `0x${string}`\n fx_token: `0x${string}`\n}\n\nexport const ethTestnetContracts: IEthContracts = {\n multicall3: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n seaport_zone: \"0x0000000006B429721d1F4c4cD256BF3A38c09Ac6\",\n issuer_factory_v1: \"0x4e9ef916F55B5d4a27E6406C7Ce8bcd29c2693d6\",\n mint_ticket_factory_v1: \"0xbaed21d8C57caf71578b9aE1E09a68721d0Dd02d\",\n dutch_auction_minter_v1: \"0x2F8ea350E7F29BCaC2AEE5889d64df07EE3Fa98d\",\n fixed_price_minter_v1: \"0xa6c9c758e80ec18e1a28d485b97400B11dCFCD64\",\n ticket_redeemer_v1: \"0xdd29eA613e0553fc03f5762Bf643710a7987A216\",\n ipfs_renderer_v1: \"0x17b9c8a7C6F9D3768D4DA75EBB6abDe9FBe900cf\",\n onchfs_renderer_v1: \"0x25B087D2c87a0b34188a530dC9cCfDa30822AA8e\",\n randomizer_v1: \"0x5962e4dEeDe2DB4A83259255D30c19F4397FD5A6\",\n role_registry_v1: \"0x92B70c5C6E676BdC395DfD911c07392fc7C36E4F\",\n contract_registry_v1: \"0xb7CFDcDb2c6a1D05D7b85FB4ae7B7bccd028010F\",\n gen_art_token_impl_v1: \"0x1feeb359e96E6Dd6F19F1FC98e8FffDdf5AeaD58\",\n mint_ticket_impl_v1: \"0x0303e3a5be6e9Fa21E72cE446a402a6AEec13c60\",\n onchfs_file_system: \"0x4f555d39e89f6d768f75831d610b3940fa94c6b1\",\n onchfs_content_store: \"0x070e5A608705aC4954eec054f9074eEe49bDcbfF\",\n seaport: \"0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0\",\n fxhashTeamSafeAddress: \"0x4F073947573FF44621cA25061Fb035c73a3014ab\",\n signerSafe: \"0x4F073947573FF44621cA25061Fb035c73a3014ab\",\n moderationSafe: \"0x4F073947573FF44621cA25061Fb035c73a3014ab\",\n farcaster_frame_fixed_price_minter_v1:\n \"0xB0905f81167bD90ABD5a583E029D27DA77568084\",\n fx_token: \"0xfa2e08ebfa6dae5ff68c3a0e2eb33a78f363f9fe\",\n}\n\n/**\n * TODO\n * -----------------------------------------------------------------------------\n * Put the actual addresses.\n */\nexport const ethMainnetContracts: IEthContracts = {\n multicall3: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n seaport_zone: \"0x0000000006B429721d1F4c4cD256BF3A38c09Ac6\",\n issuer_factory_v1: \"0x442295de8A31d65026dBc09c29d469F6854f188a\",\n mint_ticket_factory_v1: \"0xDB92ed0e6265d042F05E5C2f6D2F99496e87D706\",\n dutch_auction_minter_v1: \"0x1bC736a2b144096a4752534C557D7E6C311CcAF1\",\n fixed_price_minter_v1: \"0xB645cFfD9bFB93c2c181d5Be0D6a8C1d81C2aEf3\",\n ticket_redeemer_v1: \"0x3D72011b1bB52e33f9D81Fc5553FF4765e3f32c1\",\n ipfs_renderer_v1: \"0x48F00F8314920ca0cd763D74acFe8cFE4024a274\",\n onchfs_renderer_v1: \"0xe9fE6b2e494E40404AcB2b8B0a0Bc7b79FD03c83\",\n randomizer_v1: \"0xED32Ed47A75e298433cF822E10645C04a0B95075\",\n role_registry_v1: \"0x22b9Dd17BA1132C027d780bC0A784f08f244022B\",\n contract_registry_v1: \"0x4DAc308c686D747A804B7E95db606695a529A750\",\n gen_art_token_impl_v1: \"0x429AC1aA66220573Da6928bcce7384fe50e1284f\",\n mint_ticket_impl_v1: \"0xc2743B0B901eDAA8ccd1A09914449A797e1079F1\",\n onchfs_file_system: \"0x9e0f2864c6f125bbf599df6ca6e6c3774c5b2e04\",\n onchfs_content_store: \"0xC6806fd75745bB5F5B32ADa19963898155f9DB91\",\n seaport: \"0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0\",\n fxhashTeamSafeAddress: \"0xD8b1905022d70e74c6c8aaA2baaf275fBe1634f1\",\n signerSafe: \"0xB456aF77dEB65065462BD1f0D9098413E6CA4200\",\n moderationSafe: \"0x99CDaECbe1be4B7232a4f2c79EF76D403886FE1E\",\n farcaster_frame_fixed_price_minter_v1:\n \"0x6e625892C739bFD960671Db5544E260757480725\",\n fx_token: \"0xTODO\",\n}\n","export interface IBaseApis {\n rpcs: string[]\n reservoir: string\n safe: string\n whitelist: string\n alchemy: {\n rpc: string\n }\n}\n\nexport const baseTestnetApis: IBaseApis = {\n rpcs: [\"https://sepolia.base.org\"],\n reservoir: \"https://api-base-sepolia.reservoir.tools\",\n safe: \"https://safe-transaction-base-sepolia.safe.global/\",\n whitelist: \"http://localhost:9999/whitelist/new\",\n alchemy: {\n rpc: \"https://base-sepolia.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9\",\n },\n}\n\nexport const baseMainnetApis: IBaseApis = {\n rpcs: [\"https://mainnet.base.org\"],\n reservoir: \"https://api-base.reservoir.tools\",\n safe: \"https://safe-transaction-base.safe.global/\",\n whitelist: \"https://api.v2.dev.fxhash-dev.xyz/whitelist/new\",\n alchemy: {\n rpc: \"https://base-mainnet.g.alchemy.com/v2/xTtlsglqRKcFwSkg2bilqp7U2smOt3g9\",\n },\n}\n","import {\n type IRichErrorMessages,\n RichError,\n type RichErrorUnion,\n isRichErrorMessages,\n} from \"@fxhash/errors\"\n\nexport class AppMetadataInvalidTypeError extends RichError {\n name = \"AppMetadataInvalidTypeError\" as const\n messages = {\n dev: \"App metadata should be an object.\",\n }\n}\n\nexport class AppMetadataMissingPropertiesError extends RichError {\n name = \"AppMetadataMissingPropertiesError\" as const\n\n constructor(messages: IRichErrorMessages)\n constructor(properties: string[])\n constructor(par1: IRichErrorMessages | string[]) {\n super(\n isRichErrorMessages(par1)\n ? par1\n : {\n dev: `App metadata is missing required properties ${par1.map(p => `\"${p}\"`).join(\", \")}`,\n }\n )\n }\n}\n\nexport const AppMetadataErrors: (\n | typeof AppMetadataInvalidTypeError\n | typeof AppMetadataMissingPropertiesError\n)[] = [AppMetadataInvalidTypeError, AppMetadataMissingPropertiesError]\nexport type AppMetadataError = RichErrorUnion<typeof AppMetadataErrors>\n","import { type Result, failure, success } from \"@fxhash/utils\"\nimport { fxApisByEnv } from \"../api/fxhash.js\"\nimport {\n type AppMetadataError,\n AppMetadataInvalidTypeError,\n AppMetadataMissingPropertiesError,\n} from \"../errors/metadata.js\"\nimport { IAppMetadata, TEnv } from \"../types.js\"\n\n// shared between all envs\nconst crossEnvMetadata: Omit<IAppMetadata, \"url\"> = {\n name: \"FXHASH\",\n description: \"fxhash is a blockchain open platform for Generative Art\",\n icon: \"https://gateway.fxhash2.xyz/ipfs/QmUQUtCenBEYQLoHvfFCRxyHYDqBE49UGxtcp626FZnFDG\",\n}\n\n/**\n * Get application metadata by merging some cross-env metadata with an\n * environment-specific URL (application front-end).\n */\nexport function fxAppEnvMetadata(env: TEnv): IAppMetadata {\n return {\n ...crossEnvMetadata,\n url: fxApisByEnv(env).website,\n }\n}\n\n/**\n * Test whether some value is a valid {@link IAppMetadata} interface. If not,\n * the issue causing it to be invalid is returned as a failure.\n * @param value Any value which should be tested for being valid App Metadata\n * @returns A Result with void success or failure with the issue\n */\nexport function isAppMetadataValid(value: any): Result<void, AppMetadataError> {\n if (!(typeof value === \"object\"))\n return failure(new AppMetadataInvalidTypeError())\n\n const missingProperties: string[] = []\n const requiredProperties: (keyof Required<IAppMetadata>)[] = [\n \"name\",\n \"description\",\n \"url\",\n ]\n for (const prop of requiredProperties) {\n if (!value[prop]) missingProperties.push(prop)\n }\n if (missingProperties.length > 0)\n return failure(new AppMetadataMissingPropertiesError(missingProperties))\n\n return success()\n}\n","export type AlgoliaConfig = {\n appId: string\n enabled: boolean\n indexGenerativeTokens: string\n indexOffers: string\n indexUsers: string\n indexArticles: string\n indexAccounts: string\n}\n\nconst algoliaConfig = {\n enabled: true,\n indexGenerativeTokens: \"generative-tokens\",\n indexOffers: \"listings\",\n indexUsers: \"users\",\n indexArticles: \"articles\",\n indexAccounts: \"accounts\",\n}\n\nexport const algoliaConfigDev: AlgoliaConfig = {\n appId: \"T4XRS2LFQK\",\n ...algoliaConfig,\n}\n\nexport const algoliaConfigProd: AlgoliaConfig = {\n appId: \"F7M6D8T095\",\n ...algoliaConfig,\n}\n","const GPU_VERSIONS = [\"v111\", \"v132\"] as const\ntype GPUVersion = (typeof GPU_VERSIONS)[number]\n\ninterface GPURenderingVersionConfig {\n date: string\n version: string\n batchArn: string\n}\n\nexport type GPURenderingConfig = Record<GPUVersion, GPURenderingVersionConfig>\ntype GPURenderingConfigShared = Record<\n GPUVersion,\n Omit<GPURenderingVersionConfig, \"batchArn\">\n>\n\n// Shared config\nconst gpuRenderingConfigShared: GPURenderingConfigShared = {\n v111: {\n date: \"2023-03-06\",\n version: \"111.0.5563.64\",\n },\n v132: {\n date: \"2025-01-14\",\n version: \"132.0.6834.110\",\n },\n}\n\n// Helper function to create environment configs\nconst createEnvConfig = (\n batchArns: Record<GPUVersion, string>\n): GPURenderingConfig => {\n return Object.fromEntries(\n GPU_VERSIONS.map(version => [\n version,\n {\n ...gpuRenderingConfigShared[version],\n batchArn: batchArns[version],\n },\n ])\n ) as GPURenderingConfig\n}\n\n// Environment configs\nexport const gpuRenderingConfigDev: GPURenderingConfig = createEnvConfig({\n v111: \"arn:aws:batch:us-east-1:409089350506:job-definition/fxhash-batch-dev-fxhash-extract-chrome-v111\",\n v132: \"arn:aws:batch:us-east-1:409089350506:job-definition/fxhash-batch-dev-fxhash-extract-chrome-v132\",\n})\n\nexport const gpuRenderingConfigProd: GPURenderingConfig = createEnvConfig({\n v111: \"arn:aws:batch:us-east-1:759392670381:job-definition/fxhash-batch-prd-fxhash-extract-chrome-v111\",\n v132: \"arn:aws:batch:us-east-1:759392670381:job-definition/fxhash-batch-prd-fxhash-extract-chrome-v132\",\n})\n","export interface IBaseContracts {\n multicall3: `0x${string}`\n seaport_zone: `0x${string}`\n issuer_factory_v1: `0x${string}`\n fixed_price_minter_v1: `0x${string}`\n dutch_auction_minter_v1: `0x${string}`\n mint_ticket_factory_v1: `0x${string}`\n ticket_redeemer_v1: `0x${string}`\n ipfs_renderer_v1: `0x${string}`\n onchfs_renderer_v1: `0x${string}`\n randomizer_v1: `0x${string}`\n role_registry_v1: `0x${string}`\n contract_registry_v1: `0x${string}`\n gen_art_token_impl_v1: `0x${string}`\n mint_ticket_impl_v1: `0x${string}`\n onchfs_file_system: `0x${string}`\n onchfs_content_store: `0x${string}`\n seaport: `0x${string}`\n fxhashTeamSafeAddress: `0x${string}`\n signerSafe: `0x${string}`\n moderationSafe: `0x${string}`\n farcaster_frame_fixed_price_minter_v1: `0x${string}`\n fx_token: `0x${string}`\n fx_airdrop: `0x${string}`\n fx_tez_airdrop: `0x${string}`\n fx_token_launchpad: `0x${string}`\n fx_project_factory: `0x${string}`\n}\n\nexport const baseTestnetContracts: IBaseContracts = {\n multicall3: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n seaport_zone: \"0x0000000006B429721d1F4c4cD256BF3A38c09Ac6\",\n issuer_factory_v1: \"0x60cFDE3aaf6E938535767794088cf15EaaC50019\",\n mint_ticket_factory_v1: \"0x8A7e5eE0CeA42DBE1d2aAC4501262B0edC5B518B\",\n dutch_auction_minter_v1: \"0xeb5Cee0eD6A47BE2A463A0C9e83dA5DE6149d375\",\n fixed_price_minter_v1: \"0x29159d2DFbF93E991d39Dc080a5f8dcc5C90ebb8\",\n ticket_redeemer_v1: \"0xFfbC4F51AB33E14380893213d7C969e0626c4C43\",\n ipfs_renderer_v1: \"0x7657C31078d8bfB8d1BC127fC04dAd23B3f451ed\",\n onchfs_renderer_v1: \"0xf23C64BA846557c24E6F5086376047b0CE70d1cC\",\n randomizer_v1: \"0xCA6323f03B5113471BA3b7B2F4Ba0AA2D45aE257\",\n role_registry_v1: \"0x179f5B8FE1c270D7fC1807355F3fd981A30e21A6\",\n contract_registry_v1: \"0xd44B3b2Ee596613c1aFcF85c9b0E41A0ec8B79E2\",\n gen_art_token_impl_v1: \"0x06976f5C039497d8a79Cc0dCE7A95B3E9748164A\",\n mint_ticket_impl_v1: \"0xa71b5935366BA29332033217a9E83698acadfd2f\",\n onchfs_file_system: \"0x3fb48e03291b2490f939c961a1ad088437129f71\",\n onchfs_content_store: \"0x48AC7370df2d5982852172A4D857c29608AFa774\",\n seaport: \"0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0\",\n fxhashTeamSafeAddress: \"0x8a4f6e1ae6Bb77EFE7646f9649Bfd519fA638871\",\n signerSafe: \"0x8a4f6e1ae6Bb77EFE7646f9649Bfd519fA638871\",\n moderationSafe: \"0x8a4f6e1ae6Bb77EFE7646f9649Bfd519fA638871\",\n farcaster_frame_fixed_price_minter_v1:\n \"0xB0905f81167bD90ABD5a583E029D27DA77568084\",\n fx_token: \"0xd89fdcB6c8D107f27CEe4452Ccfb70Dc4F9768a7\",\n fx_airdrop: \"0x1e4e821216582f0771528b848b4a51c8474be2c7\",\n fx_tez_airdrop: \"0x3c2b4c38d37affb023a1d2327af428909eb8a134\",\n fx_token_launchpad: \"0x2f949f7cD46F4D79d4FD6b234DB302cAeEe552e2\",\n fx_project_factory: \"0xcA9486e54FbBD6aCe6eB6AA0102ee97dd90A8a86\",\n}\n\nexport const baseMainnetContracts: IBaseContracts = {\n multicall3: \"0xcA11bde05977b3631167028862bE2a173976CA11\",\n seaport_zone: \"0x0000000006B429721d1F4c4cD256BF3A38c09Ac6\",\n issuer_factory_v1: \"0xf05636d65c7a10dF989eC2411D4F3230d3A02f3D\",\n mint_ticket_factory_v1: \"0xe5832D3a3da179e818e9E3bFF7b96A928b29Eda2\",\n dutch_auction_minter_v1: \"0x9667a1Cf26223c9de22207DD93cfEEc9237b8f4E\",\n fixed_price_minter_v1: \"0x4bDcaC532143d8d35ed759189EE22E3704580b9D\",\n ticket_redeemer_v1: \"0x972502Bc75A780D76495Ffa84Cf8DA301F162Df6\",\n ipfs_renderer_v1: \"0x9c4cC8403bE33B89a46794Ae409ce634ca567956\",\n onchfs_renderer_v1: \"0x4180D747e984C9CFEEfaF23944AE0C20c0742341\",\n randomizer_v1: \"0x6754E97b8eaeC13Fa24480E9d1240176Dd0f2911\",\n role_registry_v1: \"0x8d3C748e99066e15425BA1620cdD066d85D6d918\",\n contract_registry_v1: \"0xCa6e30B1C7cBE7cF605cE30B334f968C5E2EA016\",\n gen_art_token_impl_v1: \"0xC5769428823C9a0393DC66855DD3817b2A85BEFD\",\n mint_ticket_impl_v1: \"0x3e9754Da0fb002Fa13D69B2f313d5CB441fC8ef5\",\n onchfs_file_system: \"0x2983008f292a43f208bba0275afd7e9b3d39af3b\",\n onchfs_content_store: \"0x070e5A608705aC4954eec054f9074eEe49bDcbfF\",\n seaport: \"0x00cA04c45da318d5b7E7B14D5381Ca59F09C73f0\",\n fxhashTeamSafeAddress: \"0x38D3a2F9c63D4a580f100B051ba137fa6d8e2560\",\n signerSafe: \"0x38D3a2F9c63D4a580f100B051ba137fa6d8e2560\",\n moderationSafe: \"0x38D3a2F9c63D4a580f100B051ba137fa6d8e2560\",\n farcaster_frame_fixed_price_minter_v1:\n \"0x6e625892C739bFD960671Db5544E260757480725\",\n fx_token: \"0x5Fc2843838e65eb0B5d33654628F446d54602791\",\n fx_airdrop: \"0x45BB9DF166Fda4afD7e533DE42B11579a1F09d43\",\n fx_tez_airdrop: \"0x5021910a5762F9C872Bf7D6CD5F09127aE8cCA84\",\n fx_token_launchpad: \"0xTODO\",\n fx_project_factory: \"0xTODO\",\n}\n","import { IBaseApis } from \"./api/base.js\"\nimport { IEthApis } from \"./api/eth.js\"\nimport { ITezosApis } from \"./api/tezos.js\"\nimport { AlgoliaConfig } from \"./config/algolia.js\"\nimport { GPURenderingConfig } from \"./config/gpu.js\"\nimport { IBaseContracts } from \"./contracts/base.js\"\nimport { IEthContracts } from \"./contracts/eth.js\"\nimport { ITezosContracts } from \"./contracts/tezos.js\"\n\nexport interface IFxhashApis {\n website: string\n docs: string\n main: string\n hasura: string\n hasuraGql: string\n file: string\n fileInternal: string\n walletInternal: string\n fsEmulator: string\n extract: string\n extractInternal: string\n media: string\n ethMetadata: string\n ipfsInternal: string\n ipfsGateway: string\n ipfsGatewaySafe: string\n ipfsGatewayInternal: string\n onchfsProxy: string\n opensea: string\n authority: {\n api: string\n }\n capture: {\n lambdas: {\n small: string\n medium: string\n large: string\n }\n proxy: {\n ipfs: string\n onchfs: string\n }\n }\n events: {\n liveBackend: string\n }\n indexer: {\n tez: string\n eth: string\n base: string\n }\n}\n\n/**\n * A mapping of blockchains in their \"human-readable\" format with their proper\n * blockchain identifier.\n */\nexport const BlockchainIdentifiers = {\n TezosGhostnet: \"tezos:NetXnHfVqm9iesp\",\n TezosMainnet: \"tezos:NetXdQprcVkpaWU\",\n EthereumMainnet: \"eip155:1\",\n EthereumGoerli: \"eip155:5\",\n EthereumSepolia: \"eip155:11155111\",\n BaseSepolia: \"eip155:84532\",\n BaseMainnet: \"eip155:8453\",\n} as const\n\n/**\n * An union of all the blockchains supported by fxhash, defined by their chain\n * identifier. Can be used to facilitate typescript auto-completion with string\n * when enums aren't as good.\n */\nexport type BlockchainIdentifier =\n (typeof BlockchainIdentifiers)[keyof typeof BlockchainIdentifiers]\n\n// the variations supported by the config\nexport type TBlockchain = \"tez\" | \"eth\" | \"base\"\nexport type TBlockchainNetwork = \"testnet\" | \"mainnet\"\nexport type TEnv = \"dev\" | \"prd\" | \"local\" | \"localDocker\"\nexport type TEnvName = \"development\" | \"production\" | \"local\" | \"localDocker\"\n\nexport interface IFxhashNetworkConfig {\n network: string\n chainId: BlockchainIdentifier\n ethFeeReceiver: `0x${string}`\n wertRelayer: string\n fxhashFees: {\n primary: number\n secondary: number\n }\n royaltyBasisPoint: number\n splitBasisPoint: number\n}\n\n/**\n * Meta info about the application. Can be used by wallets to scope the\n * application making requests for instance.\n */\nexport interface IAppMetadata {\n /**\n * Application name. Will be displayed by wallets when a request is made\n * (signing a message, sending a transaction)\n */\n name: string\n\n /**\n * A short sentence (<25 words) describing the app. Might be used by wallets\n * to display extra info about your app.\n */\n description: string\n\n /**\n * **IMPORTANT**: This should match the URL in which the JS context making\n * requests to wallets will be executed. **If doesn't match execution\n * context domain, wallets may display a red warning.\n */\n url: string\n\n /**\n * URL to your application icon. Recommended: PNG 256x256\n * May be used by wallet apps in their UI when users interact with your app.\n */\n icon?: string\n}\n\nexport interface IFxhashEnvConfig {\n envName: TEnvName\n metadata: IAppMetadata\n gtMinPrice: string\n walletConnectId: string\n splitsApiKey: string\n projectLockTime: number\n referrerShare: number\n cloudflareTurnstileSiteKey: string\n cloudflareTurnstileSiteKeyV2: string\n syndicateProjectId: string\n awsS3Bucket: string\n awsS3Region: string\n openTelemetryTarget: string\n algolia: AlgoliaConfig\n gpu: GPURenderingConfig\n authJwtPublicKey: string\n}\n\ntype TBlockchainContacts = {\n [B in TBlockchain]: {\n tez: ITezosContracts\n eth: IEthContracts\n base: IBaseContracts\n }[B]\n}\n\ntype TBlockchainApis = {\n [B in TBlockchain]: {\n tez: ITezosApis\n eth: IEthApis\n base: IBaseApis\n }[B]\n}\n\ntype TNetworkBlockchainConfig = {\n [B in TBlockchain]: {\n tez: IFxhashNetworkConfig\n eth: IFxhashNetworkConfig\n base: IFxhashNetworkConfig\n }[B]\n}\n\nexport type IFxhashConfig = {\n networks: {\n [N in TBlockchainNetwork]: {\n [B in TBlockchain]: {\n contracts: TBlockchainContacts[B]\n config: TNetworkBlockchainConfig[B]\n apis: TBlockchainApis[B]\n }\n }\n }\n envs: {\n [K in TEnv]: {\n apis: IFxhashApis\n config: IFxhashEnvConfig\n }\n }\n}\n\nexport type IFxhashConfigSingleEnv = {\n [B in TBlockchain]: {\n contracts: TBlockchainContacts[B]\n config: TNetworkBlockchainConfig[B]\n apis: TBlockchainApis[B]\n }\n} & {\n apis: IFxhashApis\n config: IFxhashEnvConfig\n}\n","export const AUTH_JWT_PK_DEV = `-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1hF8JwAxIiFWzbXIgeOK\nBzf6SZlT3S1YampzVgy4pw1G0aKwHnyvC+HrRfkEOCGxX24DqbEpZby2LjKF9bfa\nOLrERrNSNrDLXbf3ipKQrnEBu2UdT2pE5UF/SwJUTdGczb78EId0yIjuZ26qZcQg\nPr1ji6FgdOOdEwdphl4x1dlQzgMgjhRcPwf9NsBx3R6l/ut2o38Qa8azxM7XBg8F\nUlsKGy4/jY2OIEKCravCoXmpeX9pxploED/DoJJI9FZXVB7/91iIb6MI0Ycby+xo\nGL/cF+ZYSVRoFexji4vpycJfltW5YJ8jHSveZWa6LXqM6LY7zRFmlxb3SF4tsDTT\nPQIDAQAB\n-----END PUBLIC KEY-----`\n\nexport const AUTH_JWT_PK_PRD = `-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtwl1CRvpN7MZeGGDTy8x\n+W3EkZfBzZqEp3vahCaqBdMkMhy7oB1pUU7pjb34tg9epnKdKo0cZn+Bw1LkSKWh\nZ1DSbgCdNR47qKb4xN8mZ5VvEw/64+nUXbCOikX+rMqSE2tNeNU3KOYr8VQYt9dv\n/J0xFwsr0aa4m23dmJ/oPLA8eR8lZk++fEZsbezKH3i9zz73I0UAivijM0S9lYeB\nNkT5zOaAJARzl69hEMQAv9qUkokwPSHlcG+LakhTGYAyMe3w/KHXVRkWjuCUgUJf\n90oveckX4dhMbHbz9ba1p3hpmwdmlRzljIIE2GQYawA8eNLsOb/z6V8HGMbCL/N9\nJwIDAQAB\n-----END PUBLIC KEY-----`\n","import { baseMainnetApis, baseTestnetApis } from \"./api/base.js\"\nimport { ethMainnetApis, ethTestnetApis } from \"./api/eth.js\"\nimport { tezosMainnetApis, tezosTestnetApis } from \"./api/tezos.js\"\nimport {\n fxhashDevApis,\n fxhashLocalApis,\n fxhashLocalDockerApis,\n fxhashPrdApis,\n} from \"./api/fxhash.js\"\nimport { fxAppEnvMetadata } from \"./config/metadata.js\"\nimport { algoliaConfigDev, algoliaConfigProd } from \"./config/algolia.js\"\nimport { gpuRenderingConfigDev, gpuRenderingConfigProd } from \"./config/gpu.js\"\nimport {\n tezosMainnetContracts,\n tezosTestnetContracts,\n} from \"./contracts/tezos.js\"\nimport { ethMainnetContracts, ethTestnetContracts } from \"./contracts/eth.js\"\nimport { baseMainnetContracts, baseTestnetContracts } from \"./contracts/base.js\"\nimport { getEnv } from \"./helpers.js\"\nimport {\n BlockchainIdentifiers,\n type IFxhashConfig,\n type IFxhashConfigSingleEnv,\n type TBlockchainNetwork,\n type TEnv,\n} from \"./types.js\"\nimport { AUTH_JWT_PK_DEV, AUTH_JWT_PK_PRD } from \"./constants.js\"\n\n/**\n * ! Beware ! Changing these values will result in current\n * projects breaking.\n * https://github.com/fxhash/monorepo/issues/701\n */\nconst tezosFees = {\n primary: 500,\n secondary: 250,\n}\n\nconst ethFees = {\n primary: 1000,\n secondary: 2500,\n}\n\nconst baseFees = {\n primary: 1000,\n secondary: 2500,\n}\n/**\n * --------------------------------------------------------\n */\n\nconst fxhashConfig: IFxhashConfig = {\n networks: {\n testnet: {\n tez: {\n contracts: tezosTestnetContracts,\n config: {\n network: \"ghostnet\",\n chainId: BlockchainIdentifiers.TezosGhostnet,\n ethFeeReceiver: \"0x\",\n wertRelayer: \"tz1T2uyYTshSGrEg13VGJFqsWwbi2H175hZb\",\n fxhashFees: tezosFees,\n royaltyBasisPoint: 1000,\n splitBasisPoint: 1000,\n },\n apis: tezosTestnetApis,\n },\n eth: {\n contracts: ethTestnetContracts,\n config: {\n network: \"Sepolia\",\n chainId: BlockchainIdentifiers.EthereumSepolia,\n ethFeeReceiver: \"0xe1f04609f7bC45e23a1BA4CD4a76f476755beBA6\",\n wertRelayer: \"0x2ff0ec69341f43cc462251bd49bb63681adafcb0\",\n fxhashFees: ethFees,\n royaltyBasisPoint: 10_000,\n splitBasisPoint: 1_000_000,\n },\n apis: ethTestnetApis,\n },\n base: {\n contracts: baseTestnetContracts,\n config: {\n network: \"Base Sepolia\",\n chainId: BlockchainIdentifiers.BaseSepolia,\n ethFeeReceiver: \"0xF70DF285Bc6941b4760BcC041B0cA1cc50E27F8d\",\n wertRelayer: \"0x2ff0ec69341f43cc462251bd49bb63681adafcb0\",\n fxhashFees: baseFees,\n royaltyBasisPoint: 10_000,\n splitBasisPoint: 1_000_000,\n },\n apis: baseTestnetApis,\n },\n },\n mainnet: {\n tez: {\n contracts: tezosMainnetContracts,\n config: {\n network: \"mainnet\",\n chainId: BlockchainIdentifiers.TezosMainnet,\n ethFeeReceiver: \"0x\",\n wertRelayer: \"tz1KkPS1TWFyDWfQwrdvmTmsCLUNMegDrrSi\",\n fxhashFees: tezosFees,\n royaltyBasisPoint: 1000,\n splitBasisPoint: 1000,\n },\n apis: tezosMainnetApis,\n },\n eth: {\n contracts: ethMainnetContracts,\n config: {\n network: \"Ethereum\",\n chainId: BlockchainIdentifiers.EthereumMainnet,\n ethFeeReceiver: \"0xed650E40F7bd3812152D4BFA6740662F50e178DF\",\n wertRelayer: \"0xc16157e00b1bff1522c6f01246b4fb621da048d0\",\n fxhashFees: ethFees,\n royaltyBasisPoint: 10_000,\n splitBasisPoint: 1_000_000,\n },\n apis: ethMainnetApis,\n },\n base: {\n contracts: baseMainnetContracts,\n config: {\n network: \"Base\",\n chainId: BlockchainIdentifiers.BaseMainnet,\n ethFeeReceiver: \"0xF70DF285Bc6941b4760BcC041B0cA1cc50E27F8d\",\n wertRelayer: \"0xc16157e00b1bff1522c6f01246b4fb621da048d0\",\n fxhashFees: baseFees,\n royaltyBasisPoint: 10_000,\n splitBasisPoint: 1_000_000,\n },\n apis: baseMainnetApis,\n },\n },\n },\n envs: {\n local: {\n apis: fxhashLocalApis,\n config: {\n envName: \"local\",\n metadata: fxAppEnvMetadata(\"local\"),\n gtMinPrice: \"0\",\n walletConnectId: \"111994543d1b754bab82c368d0e61ae5\",\n projectLockTime: 3600,\n referrerShare: 0,\n splitsApiKey: \"75348d57d6cf60fa4551766c\",\n cloudflareTurnstileSiteKey: \"1x00000000000000000000AA\",\n cloudflareTurnstileSiteKeyV2: \"0x4AAAAAAAW-w_xThcj91jkA\",\n syndicateProjectId: \"9dd71e90-4605-45f4-94e0-4e533b01081d\",\n awsS3Bucket: \"fxh-media-assets-dev-testnet-us-east-1\",\n awsS3Region: \"us-east-1\",\n openTelemetryTarget: \"http://localhost:14268\",\n algolia: algoliaConfigDev,\n gpu: gpuRenderingConfigDev,\n authJwtPublicKey: AUTH_JWT_PK_DEV,\n },\n },\n localDocker: {\n apis: fxhashLocalDockerApis,\n config: {\n envName: \"localDocker\",\n metadata: fxAppEnvMetadata(\"localDocker\"),\n gtMinPrice: \"0\",\n walletConnectId: \"111994543d1b754bab82c368d0e61ae5\",\n projectLockTime: 3600,\n referrerShare: 0,\n splitsApiKey: \"75348d57d6cf60fa4551766c\",\n cloudflareTurnstileSiteKey: \"1x00000000000000000000AA\",\n cloudflareTurnstileSiteKeyV2: \"0x4AAAAAAAW-w_xThcj91jkA\",\n syndicateProjectId: \"9dd71e90-4605-45f4-94e0-4e533b01081d\",\n awsS3Bucket: \"fxh-media-assets-dev-testnet-us-east-1\",\n awsS3Region: \"us-east-1\",\n openTelemetryTarget: \"http://localhost:14268\",\n algolia: algoliaConfigDev,\n gpu: gpuRenderingConfigDev,\n authJwtPublicKey: AUTH_JWT_PK_DEV,\n },\n },\n dev: {\n apis: fxhashDevApis,\n config: {\n envName: \"development\",\n metadata: fxAppEnvMetadata(\"dev\"),\n gtMinPrice: \"0\",\n walletConnectId: \"111994543d1b754bab82c368d0e61ae5\",\n projectLockTime: 3600,\n referrerShare: 0,\n splitsApiKey: \"75348d57d6cf60fa4551766c\",\n cloudflareTurnstileSiteKey: \"0x4AAAAAAAVOb6invoeYS4EN\",\n cloudflareTurnstileSiteKeyV2: \"0x4AAAAAAAW-w_xThcj91jkA\",\n syndicateProjectId: \"9dd71e90-4605-45f4-94e0-4e533b01081d\",\n awsS3Bucket: \"fxh-media-assets-dev-testnet-us-east-1\",\n awsS3Region: \"us-east-1\",\n openTelemetryTarget: \"https://tempo.ss.fxhash2.xyz\",\n algolia: algoliaConfigDev,\n gpu: gpuRenderingConfigDev,\n authJwtPublicKey: AUTH_JWT_PK_DEV,\n },\n },\n prd: {\n apis: fxhashPrdApis,\n config: {\n envName: \"production\",\n metadata: fxAppEnvMetadata(\"prd\"),\n gtMinPrice: \"0\",\n walletConnectId: \"111994543d1b754bab82c368d0e61ae5\",\n projectLockTime: 3600,\n referrerShare: 0,\n splitsApiKey: \"75348d57d6cf60fa4551766c\",\n cloudflareTurnstileSiteKey: \"0x4AAAAAAAVObp1YeuhbqNKB\",\n cloudflareTurnstileSiteKeyV2: \"0x4AAAAAAAW-yE4Q6Wdz6SNb\",\n syndicateProjectId: \"398ad73d-341c-4861-a038-f0ae1ca58e07\",\n awsS3Bucket: \"fxh-media-assets-prd-mainnet-us-east-1\",\n awsS3Region: \"us-east-1\",\n openTelemetryTarget: \"https://tempo.ss.fxhash2.xyz\",\n algolia: algoliaConfigProd,\n gpu: gpuRenderingConfigProd,\n authJwtPublicKey: AUTH_JWT_PK_PRD,\n },\n },\n },\n}\n\nexport function getBlockchainNetworkForEnv(env: TEnv): TBlockchainNetwork {\n return env === \"prd\" ? \"mainnet\" : \"testnet\"\n}\n\nexport function getConfigForEnv(env: TEnv): IFxhashConfigSingleEnv {\n const blockchainNetwork = getBlockchainNetworkForEnv(env)\n return {\n ...fxhashConfig.networks[blockchainNetwork],\n ...fxhashConfig.envs[env],\n }\n}\n\nexport const localConfig: IFxhashConfigSingleEnv = getConfigForEnv(\"local\")\nexport const localDockerConfig: IFxhashConfigSingleEnv =\n getConfigForEnv(\"localDocker\")\nexport const devConfig: IFxhashConfigSingleEnv = getConfigForEnv(\"dev\")\nexport const prdConfig: IFxhashConfigSingleEnv = getConfigForEnv(\"prd\")\n\nconst currentEnv = getEnv()\nlet config: IFxhashConfigSingleEnv = getConfigForEnv(currentEnv)\n\nfunction setConfig(\n userConfig: Partial<IFxhashConfigSingleEnv>\n): IFxhashConfigSingleEnv {\n config = {\n ...config,\n ...userConfig,\n }\n return config\n}\n\nexport { fxhashConfig, config, setConfig }\n","export const onchfsRegex: RegExp = new RegExp(\"^onchfs://\")\n\n/**\n * Returns the CID or a resource, whether it's already a CID or an onchfs://<CID> resource\n * @param resource either a CID or a onchfs://<CID> string\n */\nexport function onchfsCidFromUriOrCid(resource: string): string {\n if (!onchfsRegex.test(resource)) return resource\n return resource.slice(9)\n}\n","import { config } from \"../config.js\"\n\nexport enum EGatewayIpfs {\n FXHASH = \"FXHASH\",\n FXHASH_SAFE = \"FXHASH_SAFE\",\n IPFSIO = \"IPFSIO\",\n}\n\nexport const ipfsRegex: RegExp = new RegExp(\"^ipfs://\")\n\n/**\n * Given a gateway enum, outputs the http url root of the gateway\n */\nexport function ipfsGatewayRoot(gateway: EGatewayIpfs): string {\n switch (gateway) {\n case EGatewayIpfs.FXHASH:\n return config.apis.ipfsGateway\n case EGatewayIpfs.FXHASH_SAFE:\n return config.apis.ipfsGatewaySafe\n case EGatewayIpfs.IPFSIO:\n default:\n return \"https://ipfs.io\"\n }\n}\n\n/**\n * Returns the CID or a resource, whether it's already a CID or an ipfs://<CID> resource\n * @param resource either a CID or a ipfs://<CID> string\n */\nexport function ipfsCidFromUriOrCid(resource: string): string {\n if (!ipfsRegex.test(resource)) return resource\n return resource.slice(7)\n}\n\n/**\n * Given a CID or ipfs://<CID>, returns an URL to a gateway pointing to the resource\n * @param resource the resource input, either a CID or ipfs://<CID>\n * @param gateway the gateway URL to use for the resource\n */\nexport function ipfsGatewayUrl(\n resource: string | null | undefined,\n gateway: EGatewayIpfs = EGatewayIpfs.FXHASH_SAFE\n): string {\n if (!resource) return \"\"\n const cid = ipfsCidFromUriOrCid(resource)\n return `${ipfsGatewayRoot(gateway)}/ipfs/${cid}`\n}\n\n/**\n * given a URI (either ipfs://<CID>, onchfs://<CID> or temp://<CID>),\n * returns the URL to the resource\n */\nexport function proxyUrl(uri: string): string {\n // let blobs be blobs\n if (uri.startsWith(\"blob:\") || uri.startsWith(\"data:\")) return uri\n\n const [protocol, cid] = uri.split(\"://\")\n switch (protocol) {\n case \"https\":\n return uri\n case \"temp\":\n return `${config.apis.fsEmulator}/resolve/${cid}`\n case \"onchfs\":\n return `${config.apis.onchfsProxy}/${cid}`\n default:\n return ipfsGatewayUrl(uri)\n }\n}\n","import { onchfsCidFromUriOrCid, onchfsRegex } from \"./onchfs\"\nimport { ipfsCidFromUriOrCid, ipfsRegex } from \"./ipfs\"\n\n/**\n * Returns the CID or a resource, whether it's already a CID or an ipfs://<CID> or onchfs://<CID> resource\n * @param resource either a CID or an ipfs://<CID> or onchfs://<CID> string\n */\nexport function cidFromUriOrCid(resource: string): string {\n if (ipfsRegex.test(resource)) {\n return ipfsCidFromUriOrCid(resource)\n } else if (onchfsRegex.test(resource)) {\n return onchfsCidFromUriOrCid(resource)\n }\n return resource\n}\n","import { config } from \"../config.js\"\n\nexport const tezosContractPrefixesByContractAddress: Record<string, string> = {\n [config.tez.contracts.gentk_v1]: \"FX0\",\n [config.tez.contracts.gentk_v2]: \"FX0\",\n [config.tez.contracts.gentk_v3]: \"FX1\",\n}\nexport function getObjktIdFromContract(contract: string, id: string): string {\n return `${tezosContractPrefixesByContractAddress[contract]}-${id}`\n}\n","import { type IEthApis, ethTestnetApis } from \"./api/eth.js\"\nimport {\n type ITezosApis,\n tezosTestnetApis,\n tezosMainnetApis,\n} from \"./api/tezos.js\"\nimport { fxhashDevApis, fxhashPrdApis } from \"./api/fxhash.js\"\nimport {\n type ITezosContracts,\n tezosMainnetContracts,\n tezosTestnetContracts,\n} from \"./contracts/tezos.js\"\nimport { type IEthContracts, ethTestnetContracts } from \"./contracts/eth.js\"\nimport { type GPURenderingConfig } from \"./config/gpu.js\"\nimport {\n fxhashConfig,\n prdConfig,\n devConfig,\n localConfig,\n config,\n setConfig,\n} from \"./config.js\"\nimport {\n type IFxhashEnvConfig,\n type IFxhashNetworkConfig,\n type TBlockchain,\n type TBlockchainNetwork,\n type TEnv,\n type IFxhashConfig,\n} from \"./types.js\"\n\nexport {\n ethTestnetApis,\n tezosTestnetApis,\n tezosMainnetApis,\n fxhashDevApis,\n fxhashPrdApis,\n tezosTestnetContracts,\n tezosMainnetContracts,\n ethTestnetContracts,\n fxhashConfig,\n devConfig,\n prdConfig,\n localConfig,\n config,\n setConfig,\n type IEthApis,\n type ITezosApis,\n type ITezosContracts,\n type IEthContracts,\n type IFxhashEnvConfig,\n type IFxhashNetworkConfig,\n type TBlockchain,\n type TBlockchainNetwork,\n type TEnv,\n type IFxhashConfig,\n type GPURenderingConfig,\n}\n\nexport * from \"./types.js\"\nexport * from \"./helpers.js\"\nexport * from \"./utils/index.js\"\n\nexport { isAppMetadataValid } from \"./config/metadata.js\"\n\nexport default fxhashConfig\n"],"mappings":";;;;;;;;;;;AAUA,MAAaA,iBAA2B;CACtC,MAAM,CACJ,uEACD;CACD,WAAW;CACX,MAAM;CACN,WAAW;CACX,SAAS,EACP,KAAK,wEACN;AACF;AAED,MAAaC,iBAA2B;CACtC,MAAM,CACJ,uEACD;CACD,WAAW;CACX,MAAM;CACN,WAAW;CACX,SAAS,EACP,KAAK,wEACN;AACF;;;;ACzBD,MAAaC,mBAA+B;CAC1C,MAAM;CACN,SAAS;CACT,aAAa;CACb,MAAM;EACJ;EACA;EACA;CACD;AACF;AAED,MAAaC,mBAA+B;CAC1C,MAAM;CACN,SAAS;CACT,aAAa;CACb,MAAM;EACJ;EACA;EACA;EACA;CACD;AACF;;;;AC1BD,MAAM,aAAa;AACnB,MAAM,uBAAuB;AAE7B,SAAgB,qBAAqBC,KAAqB;AACxD,QAAO,IAAI,QAAQ,YAAY,qBAAqB;AACrD;AAED,MAAaC,SAAkB,CAAC,MAAM;AAGpC,QACE,QAAQ,IAAI,eAAe,SAC3B,QAAQ,IAAI,eAAe,gBAC3B,QAAQ,IAAI,2BAA2B,SACvC,QAAQ,IAAI,2BAA2B,gBACvC,QAAQ,IAAI,yBAAyB,SACrC,QAAQ,IAAI,yBAAyB,gBACrC,QAAQ,IAAI,oBAAoB,SAChC,QAAQ,IAAI,oBAAoB;AAEnC,IAAG;AAEJ,MAAaC,UAAmB,CAAC,MAAM;AAGrC,QACE,QA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ACE;CACF,gBACE;CACF,YAAY;CACZ,SAAS;CACT,iBACE;CACF,OAAO;CACP,aAAa;CACb,cACE;CACF,aAAa;CACb,iBAAiB;CACjB,qBACE;CACF,aAAa;CACb,SAAS;CACT,WAAW,EACT,KAAK,OACN;CACD,SAAS;EACP,SAAS;GACP,OACE;GACF,QACE;GACF,OACE;EACH;EACD,OAAO;GACL,MAAM;GACN,QACE;EACH;CACF;CACD,QAAQ,EACN,aAAa,QACd;CACD,SAAS;EACP,KAAK;EACL,KAAK;EACL,MAAM;CACP;AACF;AAED,MAAMC,iBAA4C;CAChD,OAAO;CACP,aAAa;CACb,KAAK;CACL,KAAK;AACN;;;;AAKD,SAAgB,YAAYC,KAAwB;AAClD,QAAO,eAAe;AACvB;;;;ACtGD,MAAaC,wBAAyC;CACpD,cAAc;CACd,qBAAqB;CACrB,wBAAwB;CACxB,iBAAiB;CACjB,UAAU;CACV,YAAY;CACZ,uBAAuB;CACvB,qBAAqB;CACrB,QAAQ;CACR,UAAU;CACV,eAAe;CACf,UAAU;CACV,UAAU;CACV,gBAAgB;CAChB,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,gBAAgB;CAChB,gBAAgB;CAChB,gBAAgB;CAChB,qBAAqB;CACrB,iBAAiB;CACjB,kBAAkB;CAClB,qBAAqB;CACrB,iBAAiB;CACjB,uBAAuB;CACvB,0BAA0B;CAC1B,eAAe;CACf,kBAAkB;CAClB,YAAY;CACZ,eAAe;CACf,kBAAkB;CAClB,UAAU;CACV,iBAAiB;CACjB,eAAe;CACf,cAAc;AACf;AAED,MAAaC,wBAAyC;CACpD,cAAc;CACd,qBAAqB;CACrB,wBAAwB;CACxB,iBAAiB;CACjB,UAAU;CACV,YAAY;CACZ,uBAAuB;CACvB,qBAAqB;CACrB,QAAQ;CACR,UAAU;CACV,eAAe;CACf,UAAU;CACV,UAAU;CACV,gBAAgB;CAChB,WAAW;CACX,WAAW;CACX,WAAW;CACX,WAAW;CACX,gBAAgB;CAChB,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ACZD,MAAaC,yCAAiE;EAC3E,OAAO,IAAI,UAAU,WAAW;EAChC,OAAO,IAAI,UAAU,WAAW;EAChC,OAAO,IAAI,UAAU,WAAW;AAClC;AACD,SAAgB,uBAAuBC,UAAkBC,IAAoB;AAC3E,SAAQ,EAAE,uCAAuC,UAAU,GAAG,GAAG;AAClE;;;;ACwDD,kBAAe"}
|
package/package.json
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fxhash/config",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.12",
|
4
4
|
"author": "fxhash",
|
5
5
|
"dependencies": {
|
6
|
-
"@fxhash/
|
7
|
-
"@fxhash/
|
6
|
+
"@fxhash/utils": "0.0.5",
|
7
|
+
"@fxhash/errors": "0.0.12"
|
8
8
|
},
|
9
9
|
"devDependencies": {
|
10
10
|
"@types/node": "18.7.13",
|
11
11
|
"tsdown": "0.12.2",
|
12
12
|
"typescript": "5.8.2",
|
13
13
|
"unplugin-isolated-decl": "0.13.6",
|
14
|
-
"@fxhash/tsconfig": "0.0.
|
14
|
+
"@fxhash/tsconfig": "0.0.3"
|
15
15
|
},
|
16
16
|
"exports": {
|
17
17
|
".": {
|