Own authenticated connection identity and reconciliation references in public protocol packages so relay hosts can implement contracts without internal imports.
- commit
- 56c5070c50fac6258b214c8e2812d4aa84dbcaa4
- parent
- d730679639bf491be790d6486cace935b188059a
- author
- Dami <dami.etoile@gmail.com>
| M | internal/ | 7 | +++---- |
| A | protocol/ | 10 | ++++++++++ |
| M | protocol/ | 2 | +- |
| A | protocol/ | 8 | ++++++++ |
@@ -3,16 +3,15 @@ package syncprotocol
33 import (44 "fmt"55 6+ wire "github.com/FelineStateMachine/tinyrelay/protocol/nostr"7+68 "fiatjaf.com/nostr"79 "fiatjaf.com/nostr/nip77/negentropy"810 "fiatjaf.com/nostr/nip77/negentropy/storage/vector"911 )1012 1113 // Item identifies one event in a reconciliation index.12-type Item struct {13- ID string14- Timestamp int6415-}14+type Item = wire.EventRef1615 1716 // Result contains one negentropy response and the IDs discovered by the1817 // initiator when reconciliation completes.@@ -0,0 +1,10 @@
1+package auth2+3+// Session carries the principals authenticated on a relay connection and the4+// relay identity against which their proofs were checked. RemoteIP is supplied5+// by the serving transport, not by signed event content.6+type Session struct {7+ PubKeys []string8+ RelayURL string9+ RemoteIP string10+}@@ -45,7 +45,7 @@ func TestPublicProtocolDependencyGraph(t *testing.T) {
4545 // kind constants, private-kind classification and room/job semantics belong4646 // to their owning packages, not the Nostr wire model.4747 func TestNostrPublicSurface(t *testing.T) {48- want := strings.Fields("Event Filter Validate Parse Canonical Tag TagValues Expiration Difficulty CommittedDifficulty Sign GenerateKey PublicKey IsEphemeral IsReplaceable IsAddressable ParseFilter Matches SearchTerms Filter.MarshalJSON")48+ want := strings.Fields("Event EventRef Filter Validate Parse Canonical Tag TagValues Expiration Difficulty CommittedDifficulty Sign GenerateKey PublicKey IsEphemeral IsReplaceable IsAddressable ParseFilter Matches SearchTerms Filter.MarshalJSON")4949 var got []string5050 files, err := filepath.Glob("nostr/*.go")5151 if err != nil {