|
| 1 | +package hyperloop |
| 2 | + |
| 3 | +import ( |
| 4 | + "context" |
| 5 | + |
| 6 | + "github.com/lightninglabs/lndclient" |
| 7 | + "github.com/lightningnetwork/lnd/input" |
| 8 | + "github.com/lightningnetwork/lnd/keychain" |
| 9 | +) |
| 10 | + |
| 11 | +// Store is the interface that stores the hyperloop. |
| 12 | +type Store interface { |
| 13 | + // CreateHyperloop stores the hyperloop in the database. |
| 14 | + CreateHyperloop(ctx context.Context, hyperloop *HyperLoop) error |
| 15 | + |
| 16 | + // UpdateHyperloop updates the hyperloop in the database. |
| 17 | + UpdateHyperloop(ctx context.Context, hyperloop *HyperLoop) error |
| 18 | + |
| 19 | + // CreateHyperloopParticipant stores the hyperloop participant in the |
| 20 | + // database. |
| 21 | + CreateHyperloopParticipant(ctx context.Context, |
| 22 | + participant *HyperLoopParticipant) error |
| 23 | + |
| 24 | + // UpdateHyperloopParticipant updates the hyperloop participant in the |
| 25 | + // database. |
| 26 | + UpdateHyperloopParticipant(ctx context.Context, |
| 27 | + participant *HyperLoopParticipant) error |
| 28 | + |
| 29 | + // GetHyperloop retrieves the hyperloop from the database. |
| 30 | + GetHyperloop(ctx context.Context, id ID) (*HyperLoop, error) |
| 31 | + |
| 32 | + // ListHyperloops lists all existing hyperloops the client has ever |
| 33 | + // made. |
| 34 | + ListHyperloops(ctx context.Context) ([]*HyperLoop, error) |
| 35 | +} |
| 36 | + |
| 37 | +type Wallet interface { |
| 38 | + DeriveNextKey(ctx context.Context, family int32) ( |
| 39 | + *keychain.KeyDescriptor, error) |
| 40 | +} |
| 41 | +type Musig2Signer interface { |
| 42 | + MuSig2Sign(ctx context.Context, sessionID [32]byte, |
| 43 | + message [32]byte, cleanup bool) ([]byte, error) |
| 44 | + |
| 45 | + MuSig2CreateSession(ctx context.Context, version input.MuSig2Version, |
| 46 | + signerLoc *keychain.KeyLocator, signers [][]byte, |
| 47 | + opts ...lndclient.MuSig2SessionOpts) (*input.MuSig2SessionInfo, error) |
| 48 | + |
| 49 | + MuSig2RegisterNonces(ctx context.Context, sessionID [32]byte, |
| 50 | + nonces [][66]byte) (bool, error) |
| 51 | +} |
0 commit comments