mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-18 20:54:20 +01:00
* [server] descriptor-based vtxo script * [server] fix unit tests * [sdk] descriptor based vtxo * empty config check & version flag support * fix: empty config check & version flag support (#309) * fix * [sdk] several fixes * [sdk][server] several fixes * [common][sdk] add reversible VtxoScript type, use it in async payment * [common] improve parser * [common] fix reversible vtxo parser * [sdk] remove logs * fix forfeit map * remove debug log * [sdk] do not allow reversible vtxo script in case of self-transfer * remove signing pubkey * remove signer public key, craft forfeit txs client side * go work sync * fix linter errors * rename MakeForfeitTxs to BuildForfeitTxs * fix conflicts * fix tests * comment VtxoScript type * revert ROUND_INTERVAL value --------- Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com> Co-authored-by: sekulicd <sekula87@gmail.com>
46 lines
892 B
Go
46 lines
892 B
Go
package domain
|
|
|
|
import "github.com/ark-network/ark/common/tree"
|
|
|
|
type RoundEvent interface {
|
|
IsEvent()
|
|
}
|
|
|
|
func (r RoundStarted) IsEvent() {}
|
|
func (r RoundFinalizationStarted) IsEvent() {}
|
|
func (r RoundFinalized) IsEvent() {}
|
|
func (r RoundFailed) IsEvent() {}
|
|
func (r PaymentsRegistered) IsEvent() {}
|
|
|
|
type RoundStarted struct {
|
|
Id string
|
|
Timestamp int64
|
|
}
|
|
|
|
type RoundFinalizationStarted struct {
|
|
Id string
|
|
CongestionTree tree.CongestionTree // BTC: signed
|
|
Connectors []string
|
|
ConnectorAddress string
|
|
PoolTx string
|
|
MinRelayFeeRate int64
|
|
}
|
|
|
|
type RoundFinalized struct {
|
|
Id string
|
|
Txid string
|
|
ForfeitTxs []string
|
|
Timestamp int64
|
|
}
|
|
|
|
type RoundFailed struct {
|
|
Id string
|
|
Err string
|
|
Timestamp int64
|
|
}
|
|
|
|
type PaymentsRegistered struct {
|
|
Id string
|
|
Payments []Payment
|
|
}
|