-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTonProofOptions.cs
48 lines (39 loc) · 1.71 KB
/
TonProofOptions.cs
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
using TonProof.Types.Wallets;
namespace TonProof;
/// <summary>
/// Provides configuration options for proof verification.
/// </summary>
public class TonProofOptions
{
/// <summary>
/// The prefix used in TonConnect for identification.
/// </summary>
public string TonConnectPrefix { get; set; } = "ton-connect";
/// <summary>
/// The prefix used for proof items in the system.
/// </summary>
public string TonProofPrefix { get; set; } = "ton-proof-item-v2/";
/// <summary>
/// Maximum allowed time (in seconds) for a proof to be considered valid.
/// Default is 15 minutes (900 seconds).
/// </summary>
public long ValidAuthTime { get; set; } = 15 * 60; // 15 minutes
/// <summary>
/// A collection of allowed domains that are considered valid for proof verification.
/// </summary>
public IEnumerable<string> AllowedDomains { get; set; } = Enumerable.Empty<string>();
/// <summary>
/// A dictionary mapping known wallet contract codes to their corresponding creation functions.
/// </summary>
public Dictionary<string, Func<IWalletContract>> KnownWallets { get; set; } = new()
{
{ WalletContractV1R1.CodeBase64, WalletContractV1R1.Create },
{ WalletContractV1R2.CodeBase64, WalletContractV1R2.Create },
{ WalletContractV1R3.CodeBase64, WalletContractV1R3.Create },
{ WalletContractV2R1.CodeBase64, WalletContractV2R1.Create },
{ WalletContractV2R2.CodeBase64, WalletContractV2R2.Create },
{ WalletContractV3R1.CodeBase64, WalletContractV3R1.Create },
{ WalletContractV3R2.CodeBase64, WalletContractV3R2.Create },
{ WalletContractV4R2.CodeBase64, WalletContractV4R2.Create }
};
}