sqldb/sqlc: add graph channel schemas

In this commit, we define the SQL schemas for storing graph channel
data. This includes a new `channels` table and a new `channel_features`
table along with various indices.
This commit is contained in:
Elle Mouton
2025-05-24 14:20:28 +02:00
parent bff2f2440c
commit e5d099ef14
3 changed files with 151 additions and 2 deletions

View File

@@ -28,6 +28,33 @@ type AmpSubInvoiceHtlc struct {
Preimage []byte
}
type Channel struct {
ID int64
Version int16
Scid []byte
NodeID1 int64
NodeID2 int64
Outpoint string
Capacity sql.NullInt64
BitcoinKey1 []byte
BitcoinKey2 []byte
Node1Signature []byte
Node2Signature []byte
Bitcoin1Signature []byte
Bitcoin2Signature []byte
}
type ChannelExtraType struct {
ChannelID int64
Type int64
Value []byte
}
type ChannelFeature struct {
ChannelID int64
FeatureBit int32
}
type Invoice struct {
ID int64
Hash []byte