General structure (as in getData and putData DHT commands):
Each resource in the following list defines what goes to the “v” field above.
"p" : {
"height" : number of blocks at time it was created,
"seq" : update sequence (for single type values),
"target" : {
"n" : user name or hashtag name etc,
"r" : name of the resource,
"t" : either "s" (single) or "m" (multi)
},
"time" : unix utc timestamp in seconds,
"v" : this is the actual value (string, dict etc)
},
"sig_p" : signature of "p" contents (bencoded),
"sig_user" : user signing this
}
"fullname" : presentation name,
"bio" : short bio,
"location" : location,
"url" : user home page url,
"background" : background img url
}
Embedded image (up to 4kB):
Or link to external image:
This is the list of following for a given username. Because size limitations in DHT storage the list may be split in several pages with increasing N values (starts with “1″). N is concatenated as string to the “r” field.
There must be a last page N+1 with an empty list.
This is the K-th (public) post of user “n”, as defined in “userpost”.
This resource contains a copy of the last post by user. Because this same resource is updated several times it is important that the “seq” field is increased, in fact, “seq” = K.
This is the list of replies to the K-th post of user “n”. It contains the posts themselves. Because it is a “m” type, a new post may be added to this resource by any valid user.
This is the list of RTs (retransmissions) to the K-th post of user “n”. It contains the posts themselves. Because it is a “m” type, a new post may be added to this resource by any valid user.
This is the list of posts including the hashtag “n”. It contains the posts themselves. Because it is a “m” type, a new post may be added to this resource by any valid user.
This is the list of posts mentioning @username. It contains the posts themselves. Because it is a “m” type, a new post may be added to this resource by any valid user.
This is a special read-only resource used to obtain the nodes of the user swarm for post distribution.
Leave a Reply