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 committed 2025-06-02 14:53:17 +02:00
1 parent bff2f2440c
commit e5d099ef14
3 files changed
+151 -2

No files matched your search

+27
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