Skip to content

Commit cca9264

Browse files
committed
mostly complete draft of all the things
1 parent a171761 commit cca9264

File tree

23 files changed

+1103
-510
lines changed

23 files changed

+1103
-510
lines changed

agent/agent.go

Lines changed: 0 additions & 318 deletions
This file was deleted.

canister/candid/nostr.go

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Package candid is a library defining data structures used with the Internet Computer Protocol
2+
// nostr event store canister.
3+
package candid
4+
5+
type (
6+
// Event is the go representation of a candid encoding of a nostr event.
7+
Event struct {
8+
ID string `ic:"id"`
9+
Pubkey string `ic:"pubkey"`
10+
CreatedAt int64 `ic:"created_at"`
11+
Kind uint16 `ic:"kind"`
12+
Tags [][]string `ic:"tags"`
13+
Content string `ic:"content"`
14+
Sig string `ic:"sig"`
15+
}
16+
17+
// Filter is the go representation of a candid encoding of a nostr filter.
18+
Filter struct {
19+
IDs []string `ic:"ids"`
20+
Kinds []uint16 `ic:"kinds"`
21+
Authors []string `ic:"authors"`
22+
Tags []KeyValuePair `ic:"tags"`
23+
Since int64 `ic:"since"`
24+
Until int64 `ic:"until"`
25+
Limit int64 `ic:"limit"`
26+
Search string `ic:"search"`
27+
}
28+
29+
// KeyValuePair is a simple struct representing a nostr filter tag item.
30+
KeyValuePair struct {
31+
Key string `ic:"key"`
32+
Value []string `ic:"value"`
33+
}
34+
)

0 commit comments

Comments
 (0)