The wallet (useWallet() function from solana wallet-adapter) or keypair of the user.
Optional
options: ProtocolOptionsOptions for the Protocol instance (optional).
Creates a new group.
A Promise that resolves with the newly created group.
The name of the group.
An optional description of the group.
An optional avatar for the group. Can be a FileData, FileUriData, or null.
An json object containing any relevant metadata to be associated with the group.
Deletes own user group.
A promise that resolves when the group has been successfully deleted.
Get all groups.
Maximum number of groups to return. (optional, requires useIndexer option to be enabled)
Offset to start returning groups from. (optional, requires useIndexer option to be enabled)
The order to return groups by timestamp. (optional, requires useIndexer option to be enabled)
Retrieves a group associated with the specified public key.
A Promise that resolves to the group associated with the specified public key, or null if no group was found.
The public key of the group to be retrieved.
Join group with the given group id.
A promise that resolves when the user has joined the group.
the id of the group.
Leave group with the given group id.
A promise that resolves when the user has left the group.
the id of the group.
Update a user group with the given parameters.
A promise that resolves to the newly created user.
The name of the group to be updated.
The avatar of the group to be updated. Can be a FileData object, a FileUriData object, or null.
The biography for the group to be updated. Can be a string or null.
An updated json object containing any relevant metadata to be associated with the group.
Creates a new post in the specific group with the given parameters.
The id of the group to post to.
The title of the post
The text (content) of the post
The file(s) to be posted (e.g. image / gif / video).
The tag to be associated with the post.
An json object containing any relevant metadata to be associated with the post.
Creates a reply to the given post.
The id of the post to reply to.
The content of the reply.
An json object containing any relevant metadata to be associated with the reply.
Delete a post by the given public key.
A promise that resolves when the post has been deleted.
The public key of the post to be deleted.
Deletes a post reply associated with the given public key.
The public key of the post reply to be deleted.
The post id where the post replies should be fetched.
Maximum number of replies to return. (optional, requires useIndexer option to be enabled)
Offset to start returning replies from. (optional, requires useIndexer option to be enabled)
The order to return replies by timestamp. (optional, requires useIndexer option to be enabled)
Get all posts for a group.
The group id where the posts should be fetched.
Maximum number of posts to return. (optional, requires useIndexer option to be enabled)
Offset to start returning posts from. (optional, requires useIndexer option to be enabled)
The order to return posts by timestamp. (optional, requires useIndexer option to be enabled)
Get all posts for a user.
The user id where the posts should be fetched.
Maximum number of posts to return. (optional, requires useIndexer option to be enabled)
Offset to start returning posts from. (optional, requires useIndexer option to be enabled)
The order to return posts by timestamp. (optional, requires useIndexer option to be enabled)
The public key of the post.
Creates a user with the given parameters.
A promise that resolves to the newly created user.
The nickname of the user to be created.
An avatar for the new user. Can be a FileData object, a FileUriData object, or null.
A biography for the new user. Can be a string or null.
An json object containing any relevant metadata to be associated with the user.
Deletes a user.
A promise that resolves when the user was successfully deleted.
Follows a user with the given user id.
The id of the user to follow.
Unfollows the user specified by the given user id.
The id of the user to unfollow.
Update a user with the given parameters.
A promise that resolves to the newly created user.
The nickname of the user to be updated.
The avatar of the user to be updated. Can be a FileData object, a FileUriData object, or null.
The biography for the user to be updated. Can be a string or null.
An updated json object containing any relevant metadata to be associated with the user.
Generated using TypeDoc
Constructor for Protocol class.