-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.ts
More file actions
70 lines (59 loc) · 1.48 KB
/
constants.ts
File metadata and controls
70 lines (59 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { ChainNames } from 'modules/blockchain/constants';
/**
* Default chain for minting agents
*/
export const DEFAULT_CHAIN = ChainNames.CYPHER;
/**
* Default contract addresses per chain
* These should be set in environment variables
*/
export const DEFAULT_CONTRACT_ADDRESSES: Record<string, string> = {
[ChainNames.CYPHER]: process.env.MINTABLE_AI_AGENT_CONTRACT_CYPHER || '',
[ChainNames.BASE]: process.env.MINTABLE_AI_AGENT_CONTRACT_BASE || '',
[ChainNames.SONIC]: process.env.MINTABLE_AI_AGENT_CONTRACT_SONIC || '',
};
/**
* Default version for new agents
*/
export const DEFAULT_VERSION = '1.0.0';
/**
* Max file size for metadata fetch (5MB)
*/
export const MAX_METADATA_SIZE = 5 * 1024 * 1024;
/**
* Supported metadata URL protocols
*/
export const SUPPORTED_PROTOCOLS = ['https:', 'http:', 'ipfs:', 'ar:'];
/**
* Trusted metadata hosting domains (for validation)
* Empty array means accept all HTTPS URLs
*/
export const TRUSTED_DOMAINS = [
// IPFS gateways
'ipfs.io',
'gateway.pinata.cloud',
'cloudflare-ipfs.com',
'dweb.link',
'nft.storage',
'w3s.link',
// Arweave
'arweave.net',
// General hosting
'github.com',
'githubusercontent.com',
'gist.github.com',
'raw.githubusercontent.com',
// Temporary hosting (for testing)
'tmpfiles.org',
'jsonblob.com',
'pastebin.com',
'hastebin.com',
// Any other HTTPS is acceptable
];
/**
* Rate limiting
*/
export const RATE_LIMIT = {
MAX_MINTS_PER_DAY: 10,
MAX_FETCHES_PER_MINUTE: 30,
};