diff --git a/internal/keystore/keystore.go b/internal/keystore/keystore.go index 5e71dd7..16a4e90 100644 --- a/internal/keystore/keystore.go +++ b/internal/keystore/keystore.go @@ -3,13 +3,23 @@ // Future: add a DB-backed fallback that checks the channel_keys table. package keystore -import "encoding/hex" +import ( + "encoding/hex" + "maps" +) type MapKeyStore struct { keys map[string][]byte // channel hash hex string → key bytes } -func NewMapKeyStore(keys map[string][]byte) *MapKeyStore { +var defaultKeys = map[string][]byte{ + "11": {0x8b, 0x33, 0x87, 0xe9, 0xc5, 0xcd, 0xea, 0x6a, 0xc9, 0xe5, 0xed, 0xba, 0xa1, 0x15, 0xcd, 0x72}, // public channel +} + +func NewMapKeyStore(extra map[string][]byte) *MapKeyStore { + keys := make(map[string][]byte) + maps.Copy(keys, defaultKeys) + maps.Copy(keys, extra) return &MapKeyStore{keys} }