1use crate::state::{Namespace, ReactionType};
2use anchor_lang::prelude::*;
3
4#[event]
10pub struct UserNew {
11 pub user: Pubkey,
12 pub random_hash: [u8; 32],
13 pub authority: Pubkey,
14 pub timestamp: i64,
15}
16
17#[event]
19pub struct UserAuthorityChanged {
20 pub user: Pubkey,
21 pub new_authority: Pubkey,
22 pub old_authority: Pubkey,
23 pub timestamp: i64,
24}
25
26#[event]
28pub struct UserDeleted {
29 pub user: Pubkey,
30 pub authority: Pubkey,
31 pub timestamp: i64,
32}
33
34#[event]
36pub struct ProfileNew {
37 pub profile: Pubkey,
38 pub user: Pubkey,
39 pub namespace: Namespace,
40 pub timestamp: i64,
41}
42
43#[event]
45pub struct ProfileDeleted {
46 pub profile: Pubkey,
47 pub user: Pubkey,
48 pub namespace: Namespace,
49 pub timestamp: i64,
50}
51
52#[event]
54pub struct PostNew {
55 pub post: Pubkey,
56 pub profile: Pubkey,
57 pub user: Pubkey,
58 pub random_hash: [u8; 32],
59 pub metadata_uri: String,
60 pub timestamp: i64,
61}
62
63#[event]
65pub struct PostUpdated {
66 pub post: Pubkey,
67 pub profile: Pubkey,
68 pub user: Pubkey,
69 pub metadata_uri: String,
70 pub timestamp: i64,
71}
72
73#[event]
75pub struct PostDeleted {
76 pub post: Pubkey,
77 pub profile: Pubkey,
78 pub user: Pubkey,
79 pub timestamp: i64,
80}
81
82#[event]
84pub struct PostCommentNew {
85 pub post: Pubkey,
86 pub profile: Pubkey,
87 pub user: Pubkey,
88 pub random_hash: [u8; 32],
89 pub metadata_uri: String,
90 pub reply_to: Pubkey,
91 pub timestamp: i64,
92}
93
94#[event]
96pub struct ConnectionNew {
97 pub connection: Pubkey,
98 pub user: Pubkey,
99 pub from_profile: Pubkey,
100 pub to_profile: Pubkey,
101 pub timestamp: i64,
102}
103
104#[event]
106pub struct ConnectionDeleted {
107 pub connection: Pubkey,
108 pub user: Pubkey,
109 pub from_profile: Pubkey,
110 pub to_profile: Pubkey,
111 pub timestamp: i64,
112}
113
114#[event]
116pub struct ReactionNew {
117 pub reaction: Pubkey,
118 pub reaction_type: ReactionType,
119 pub user: Pubkey,
120 pub from_profile: Pubkey,
121 pub to_post: Pubkey,
122 pub timestamp: i64,
123}
124
125#[event]
127pub struct ReactionDeleted {
128 pub reaction: Pubkey,
129 pub reaction_type: ReactionType,
130 pub user: Pubkey,
131 pub from_profile: Pubkey,
132 pub to_post: Pubkey,
133 pub timestamp: i64,
134}
135
136#[event]
138pub struct ProfileMetadataNew {
139 pub profile_metadata: Pubkey,
140 pub profile: Pubkey,
141 pub user: Pubkey,
142 pub metadata_uri: String,
143 pub timestamp: i64,
144}
145
146#[event]
148pub struct ProfileMetadataUpdated {
149 pub profile_metadata: Pubkey,
150 pub profile: Pubkey,
151 pub user: Pubkey,
152 pub metadata_uri: String,
153 pub timestamp: i64,
154}
155
156#[event]
158pub struct ProfileMetadataDeleted {
159 pub profile_metadata: Pubkey,
160 pub profile: Pubkey,
161 pub user: Pubkey,
162 pub timestamp: i64,
163}