/
IFederatedPegSettings.cs
111 lines (92 loc) · 4.34 KB
/
IFederatedPegSettings.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
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
102
103
104
105
106
107
108
109
110
111
using System.Collections.Generic;
using System.Net;
using NBitcoin;
namespace Stratis.Features.FederatedPeg.Interfaces
{
/// <summary>
/// Configuration settings used to initialize a FederationGateway.
/// </summary>
public interface IFederatedPegSettings
{
/// <summary>
/// Indicates whether this is the main chain. Set if the "-mainchain" switch was used.
/// </summary>
bool IsMainChain { get; }
/// <summary>
/// Ip Endpoints for the other nodes in the federation. Useful for connecting to nodes but
/// not accurate for checking whether a node is a federation member.
/// </summary>
HashSet<IPEndPoint> FederationNodeIpEndPoints { get; }
/// <summary>
/// Ip addresses for the other nodes in the federation. Useful for checking whether a node is
/// a federation member.
/// </summary>
HashSet<IPAddress> FederationNodeIpAddresses { get; }
/// <summary>
/// Public keys of other federation members.
/// </summary>
PubKey[] FederationPublicKeys { get; }
/// <summary>
/// Public key of this federation member.
/// </summary>
string PublicKey { get; }
/// <summary>
/// The block number to start syncing the federation wallet from.
/// </summary>
int WalletSyncFromHeight { get; }
/// <summary>
/// For the M of N multisig, this is the number of signers required to reach a quorum.
/// </summary>
int MultiSigM { get; }
/// <summary>
/// For the M of N multisig, this is the number of members in the federation.
/// </summary>
int MultiSigN { get; }
/// <summary>
/// The block number on the other chain to start retrieving deposits from.
/// </summary>
int CounterChainDepositStartBlock { get; }
/// <summary> The maximum amount of partial transactions that can be processed in the <see cref="ICrossChainTransferStore"/>.</summary>
int MaximumPartialTransactionThreshold { get; }
/// <summary>
/// Similar to <see cref="MinimumConfirmationsNormalDeposits"/> and <see cref="MinimumConfirmationsLargeDeposits"/> but this settings allows us to specify
/// how mature small deposits needs to be in order to be considered for a cross chain transfer.
/// <para>
/// Transactions less than or equal to an amont of <see cref="SmallDepositThresholdAmount"/> will be processed.
/// </para>
/// </summary>
int MinimumConfirmationsSmallDeposits { get; }
/// <summary>
/// The amount of blocks under which multisig deposit transactions need to be buried before the cross chains transfer actually trigger.
/// <para>
/// Transactions with a value of more than <see cref="NormalDepositThresholdAmount"/> and less than or equal to an amont of <see cref="LargeDepositThresholdAmount"/> will be processed.
/// </para>
/// </summary>
int MinimumConfirmationsNormalDeposits { get; }
/// <summary>
/// The amount of blocks under which multisig deposit transactions need to be buried before the cross chains transfer actually trigger.
/// <para>
/// Transactions with a value of more than <see cref="NormalDepositThresholdAmount"/> will be processed.
/// </para>
/// </summary>
int MinimumConfirmationsLargeDeposits { get; }
int MinimumConfirmationsDistributionDeposits { get; }
int MinimumConfirmationsConversionDeposits { get; }
/// <summary>
/// Deposits under or equal to this value will be processed after <see cref="MinimumConfirmationsSmallDeposits"/> blocks on the counter-chain.
/// </summary>
Money SmallDepositThresholdAmount { get; }
/// <summary>
/// Deposits under or equal to this value will be processed after <see cref="MinimumConfirmationsNormalDeposits"/> blocks on the counter-chain.
/// </summary>
Money NormalDepositThresholdAmount { get; }
/// <summary>
/// Address for the MultiSig script.
/// </summary>
BitcoinAddress MultiSigAddress { get; }
/// <summary>
/// Pay2Multisig redeem script.
/// </summary>
Script MultiSigRedeemScript { get; }
}
}