-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.sample.jsonc
More file actions
101 lines (101 loc) · 2.84 KB
/
config.sample.jsonc
File metadata and controls
101 lines (101 loc) · 2.84 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{
// Server settings
"server": {
// HTTP port to listen on
"port": 3000
},
// Invoice lifecycle settings
"invoice": {
// Minutes before a new invoice expires
"ttlMinutes": 30,
// How many tail digits (base units) are used as the verification code
"verificationDigits": 3
},
// Background job polling settings
"scan": {
// How often the job loop runs (ms)
"intervalMs": 10000,
// Max block span per eth_getLogs request (Alchemy free tier requires <= 10)
"evmMaxBlockRange": 2000,
// Batch size for Solana getSignaturesForAddress
"solanaSignatureBatchSize": 100
},
// Supported chains and tokens
"chains": [
{
// Chain identifier referenced by products
"id": "eth-mainnet",
// "evm" or "solana"
"type": "evm",
// JSON-RPC endpoint
"rpcUrl": "https://eth-mainnet.g.alchemy.com/v2/REPLACE_ME",
// EVM: recipient address
"receiveAddress": "0x0000000000000000000000000000000000000000",
// Finality config
"finality": {
// EVM: confirmations required for finalized scanning
"confirmations": 12
},
"tokens": [
{
// Token ID referenced by products
"id": "usdc",
// Display symbol
"symbol": "USDC",
// Token decimals (display only, amounts stored in base units)
"decimals": 6,
// EVM: ERC-20 contract address
"contractAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
}
]
}
],
// Product catalog (static)
"products": [
{
// Product identifier for checkout
"id": "coffee",
// Display name
"name": "Coffee",
// Base-unit integer string (1.99 USDC => "1990000")
// Note: must be a multiple of 10^verificationDigits and >= 10 * 10^verificationDigits
"amount": "499000",
// References chains[].id
"chainId": "eth-mainnet",
// References chains[].tokens[].id
"tokenId": "usdc",
// Whether it can be sold/created
"active": true,
// Optional per-product fulfillment modules (defaults to enabled modules)
"fulfillments": ["media"]
}
],
// Webhook delivery config (external integrations only)
"webhooks": {
"endpoints": [
{
"id": "example-webhook",
"url": "https://example.com/webhooks/miupay",
"secret": "change-me",
"events": ["invoice.paid"]
}
// Add more external endpoints here.
]
},
// In-process fulfillment modules
"fulfillments": {
"media": {
"enabled": true,
"mediaRoot": "./media",
"publicBaseUrl": "https://<tenant_id>.cloud.miupay.xyz",
"tokenTtlMs": 900000,
"rateLimitMax": 120,
"rateLimitWindowMs": 60000
}
},
// Admin auth
"admin": {
// Bearer token for /admin/* endpoints
"bearerToken": "change-me"
}
}