@fxhash/config 0.0.10 → 0.0.11

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/types.d.ts DELETED
@@ -1,166 +0,0 @@
1
- import { IBaseApis } from "./api/base.js";
2
- import { IEthApis } from "./api/eth.js";
3
- import { ITezosApis } from "./api/tezos.js";
4
- import { AlgoliaConfig } from "./config/algolia.js";
5
- import { GPURenderingConfig } from "./config/gpu.js";
6
- import { IBaseContracts } from "./contracts/base.js";
7
- import { IEthContracts } from "./contracts/eth.js";
8
- import { ITezosContracts } from "./contracts/tezos.js";
9
- export interface IFxhashApis {
10
- website: string;
11
- docs: string;
12
- main: string;
13
- hasura: string;
14
- hasuraGql: string;
15
- file: string;
16
- fileInternal: string;
17
- walletInternal: string;
18
- fsEmulator: string;
19
- extract: string;
20
- extractInternal: string;
21
- media: string;
22
- ethMetadata: string;
23
- ipfsInternal: string;
24
- ipfsGateway: string;
25
- ipfsGatewaySafe: string;
26
- ipfsGatewayInternal: string;
27
- onchfsProxy: string;
28
- opensea: string;
29
- authority: {
30
- api: string
31
- };
32
- capture: {
33
- lambdas: {
34
- small: string
35
- medium: string
36
- large: string
37
- }
38
- proxy: {
39
- ipfs: string
40
- onchfs: string
41
- }
42
- };
43
- events: {
44
- liveBackend: string
45
- };
46
- indexer: {
47
- tez: string
48
- eth: string
49
- base: string
50
- };
51
- }
52
- /**
53
- * A mapping of blockchains in their "human-readable" format with their proper
54
- * blockchain identifier.
55
- */
56
- export declare const BlockchainIdentifiers: {
57
- readonly TezosGhostnet: "tezos:NetXnHfVqm9iesp"
58
- readonly TezosMainnet: "tezos:NetXdQprcVkpaWU"
59
- readonly EthereumMainnet: "eip155:1"
60
- readonly EthereumGoerli: "eip155:5"
61
- readonly EthereumSepolia: "eip155:11155111"
62
- readonly BaseSepolia: "eip155:84532"
63
- readonly BaseMainnet: "eip155:8453"
64
- };
65
- /**
66
- * An union of all the blockchains supported by fxhash, defined by their chain
67
- * identifier. Can be used to facilitate typescript auto-completion with string
68
- * when enums aren't as good.
69
- */
70
- export type BlockchainIdentifier = (typeof BlockchainIdentifiers)[keyof typeof BlockchainIdentifiers];
71
- export type TBlockchain = "tez" | "eth" | "base";
72
- export type TBlockchainNetwork = "testnet" | "mainnet";
73
- export type TEnv = "dev" | "prd" | "local" | "localDocker";
74
- export type TEnvName = "development" | "production" | "local" | "localDocker";
75
- export interface IFxhashNetworkConfig {
76
- network: string;
77
- chainId: BlockchainIdentifier;
78
- ethFeeReceiver: `0x${string}`;
79
- wertRelayer: string;
80
- fxhashFees: {
81
- primary: number
82
- secondary: number
83
- };
84
- royaltyBasisPoint: number;
85
- splitBasisPoint: number;
86
- }
87
- /**
88
- * Meta info about the application. Can be used by wallets to scope the
89
- * application making requests for instance.
90
- */
91
- export interface IAppMetadata {
92
- /**
93
- * Application name. Will be displayed by wallets when a request is made
94
- * (signing a message, sending a transaction)
95
- */
96
- name: string;
97
- /**
98
- * A short sentence (<25 words) describing the app. Might be used by wallets
99
- * to display extra info about your app.
100
- */
101
- description: string;
102
- /**
103
- * **IMPORTANT**: This should match the URL in which the JS context making
104
- * requests to wallets will be executed. **If doesn't match execution
105
- * context domain, wallets may display a red warning.
106
- */
107
- url: string;
108
- /**
109
- * URL to your application icon. Recommended: PNG 256x256
110
- * May be used by wallet apps in their UI when users interact with your app.
111
- */
112
- icon?: string;
113
- }
114
- export interface IFxhashEnvConfig {
115
- envName: TEnvName;
116
- metadata: IAppMetadata;
117
- gtMinPrice: string;
118
- walletConnectId: string;
119
- splitsApiKey: string;
120
- projectLockTime: number;
121
- referrerShare: number;
122
- cloudflareTurnstileSiteKey: string;
123
- cloudflareTurnstileSiteKeyV2: string;
124
- syndicateProjectId: string;
125
- awsS3Bucket: string;
126
- awsS3Region: string;
127
- openTelemetryTarget: string;
128
- algolia: AlgoliaConfig;
129
- gpu: GPURenderingConfig;
130
- authJwtPublicKey: string;
131
- }
132
- type TBlockchainContacts = { [B in TBlockchain] : {
133
- tez: ITezosContracts
134
- eth: IEthContracts
135
- base: IBaseContracts
136
- }[B] };
137
- type TBlockchainApis = { [B in TBlockchain] : {
138
- tez: ITezosApis
139
- eth: IEthApis
140
- base: IBaseApis
141
- }[B] };
142
- type TNetworkBlockchainConfig = { [B in TBlockchain] : {
143
- tez: IFxhashNetworkConfig
144
- eth: IFxhashNetworkConfig
145
- base: IFxhashNetworkConfig
146
- }[B] };
147
- export type IFxhashConfig = {
148
- networks: { [N in TBlockchainNetwork] : { [B in TBlockchain] : {
149
- contracts: TBlockchainContacts[B]
150
- config: TNetworkBlockchainConfig[B]
151
- apis: TBlockchainApis[B]
152
- } } }
153
- envs: { [K in TEnv] : {
154
- apis: IFxhashApis
155
- config: IFxhashEnvConfig
156
- } }
157
- };
158
- export type IFxhashConfigSingleEnv = { [B in TBlockchain] : {
159
- contracts: TBlockchainContacts[B]
160
- config: TNetworkBlockchainConfig[B]
161
- apis: TBlockchainApis[B]
162
- } } & {
163
- apis: IFxhashApis
164
- config: IFxhashEnvConfig
165
- };
166
- export {};
@@ -1,2 +0,0 @@
1
- export declare const tezosContractPrefixesByContractAddress: Record<string, string>;
2
- export declare function getObjktIdFromContract(contract: string, id: string): string;
@@ -1,2 +0,0 @@
1
- export * from "./ipfs.js";
2
- export * from "./contracts.js";
@@ -1,25 +0,0 @@
1
- export declare enum EGatewayIpfs {
2
- FXHASH = "FXHASH",
3
- FXHASH_SAFE = "FXHASH_SAFE",
4
- IPFSIO = "IPFSIO",
5
- }
6
- /**
7
- * Given a gateway enum, outputs the http url root of the gateway
8
- */
9
- export declare function ipfsGatewayRoot(gateway: EGatewayIpfs): string;
10
- /**
11
- * Returns the CID or a resource, whether it's already a CID or an ipfs://<CID> resource
12
- * @param resource either a CID or a ipfs://<CID> string
13
- */
14
- export declare function ipfsCidFromUriOrCid(resource: string): string;
15
- /**
16
- * Given a CID or ipfs://<CID>, returns an URL to a gateway pointing to the resource
17
- * @param resource the resource input, either a CID or ipfs://<CID>
18
- * @param gateway the gateway URL to use for the resource
19
- */
20
- export declare function ipfsGatewayUrl(resource: string | null | undefined, gateway?: EGatewayIpfs): string;
21
- /**
22
- * given a URI (either ipfs://<CID>, onchfs://<CID> or temp://<CID>),
23
- * returns the URL to the resource
24
- */
25
- export declare function proxyUrl(uri: string): string;