mirror of
https://github.com/aljazceru/ark.git
synced 2026-02-08 13:04:52 +01:00
* initial commit * wip * add bitcointree pkg in common * add bitcoin txbuilder * fix BuildPoolTx test * fix sweeper * v0 musig2 congestion tree * bitcointree: add signatures support * add Makefile in common * fix lint * fix go.mod and TxBuilder * go mod tidy * rename "pset" --> "psbt" * add GetSweepInput method in TxBuilder * fix extractSweepLeaf (bitcoin tx builder)
46 lines
907 B
Go
46 lines
907 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
|
|
UnsignedForfeitTxs []string
|
|
PoolTx string
|
|
}
|
|
|
|
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
|
|
}
|