Social Transactions API
Description of endpoints used to construct Social Transactions on the DeSo blockchain
Update Profile
POST
/api/v0/update-profile
Create an Update profile transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Update profile transactions creates a profile update such as changing a username, description, profile picture, or founder reward.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Update Profile - Using Update Profile on the Profile Update page
Request Body
UpdaterPublicKeyBase58Chck*
String
Public key of updater
ProfilePublicKeyBase58Check*
String
Public key of the profile if different from updater
NewUsername*
String
Username
NewDescription*
String
Description
NewProfilePic*
String
Base64 encoded profile picture
NewCreatorBasisPoints*
uint64
Founder reward in basis points - e.g. 1000 basis points = 10% founder reward
NewStakeMultipleBasisPoints
uint64
Deprecated
Staking Reward
IsHidden
boolean
Deprecated
ExtraData
map[string]string
extra data, values must be strings. This is an arbitrary json object that can be used to add extra metadata on a profile
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFees]
Array of
objects that define additional outputs that need to be added to this transaction
Submit Post
POST
/api/v0/submit-post
Create a submit post transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect. \
Submit post transactions handle all manipulation of posts. It can be used to create a post, update a post, hide a post, or repost a post. Endpoint implementation in backend. Example usages in frontend: - Make Request to Submit Post - Using SubmitPost function to create a new post
Request Body
UpdaterPulicKeyBase58Check*
String
Public key of the user who is making or updating the post
PostHashHexToModify
String
When provided, update the post that matches this hash instead of creating a new one
ParentStakeID
String
PostHashHex of the parent of this post if applicable. When set, it creates a comment on the parent
BodyObj*
{ Body: String, ImageURLs: String[], VideoURLs: String[]
The body of the post
RepostedPostHashHex
String
Hash of post that this post is reposting
PostExtraData
Map[String]String
extra data, values must be strings. This is an arbitrary json object that can be used to add extra metadata on a post
IsHidden
Boolean
When true, this post will be hidden
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFee]
Array of
objects that define additional outputs that need to be added to this transaction
InTutorial
Boolean
When true, perform additional checks to ensure user is at the correct point in the tutorial to execute a submit post transaction
Follow
POST
/api/v0/create-follow-txn-stateless
Create a follow/unfollow transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Follow transactions adds the creator to the list of creators followed by the follower. This creator will now appear on the creator's following feed.
Endpoint implementation in backend.
Example usages in frontend: - Make request to create follow txn stateless. - Use CreateFollowTxn to follow a creator
Request Body
FollowerPublicKeyBase58Check*
String
Public key of the follower
FollowedPublicKeyBase58Check*
String
Public key of creator being followed
IsUnfollow*
Boolean
false if follow. true if unfollow
MinFeeRateNanosPerKB*
Uint64
Rate per KB
TransactionFees
TransactionFees[]
Array of
objects that define additional outputs that need to be added to this transaction
Send Diamonds
POST
/api/v0/send-diamonds
Create a send diamond transaction. A send diamond transaction is a basic transfer transaction with some additional metadata. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Diamond transactions are a form of social tipping. A send diamond transaction will send DeSo from the sender the receiver as a reward for a certain post.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Send Diamonds - Use SendDiamonds to tip a creator for a post
Request Body
SenderPublicKeyBase58Check*
String
Public key of user sending diamonds
ReceiverPublicKeyBase58Check*
String
Public key of user receiving diamonds
DiamondPostHashHex*
String
Hash of post receiving diamond
DiamondLevel*
int64
Level of Diamond being given in this transaction
MinFeeRateNanosPerKB*
Uint64
Rate per KB
TransactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
Like
POST
/api/v0/create-like-stateless
Create a Like/Unlike transaction. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Like transactions increment the count of likes on a given post. Unlike transactions decrement the count of likes on a given post.
Endpoint implementation in backend.
Example usages in frontend: - Make request to Create Like Stateless - Use CreateLike to like a post
Request Body
ReaderPublicKeyBase58Check*
String
Public key of the liker
LikedPostHashHex*
String
PostHashHex of the post being liked
IsUnlike*
Boolean
If true, remove the like from ReaderPublicKeyBase58Check on this post. If false, add a like from ReaderPublicKeyBase58Check on this post
MinFeeRateNanosPerKB*
uint64
Rate per KB
TrasactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
Send Direct Message
POST
/api/v0/send-dm-message
Prepare a new message transaction to send a DM to another user. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Endpoint implementation in backend.
Request Body
SenderAccessGroupOwnerPublicKeyBase58Check*
String
Public key of the user sending message
SenderAccessGroupPublicKeyBase58Check*
String
Public key of the access group the sender is using for this message
SenderAccessGroupKeyName*
String
The name of the access group the sender is using for this message
RecipientAccessGroupOwnerPublicKeyBase58Check*
String
Public key of the user who is the recipient of the message
RecipientAccessGroupPublicKeyBase58Check*
String
Public key of the access group of the recipient of the message
RecipientAccessGroupKeyNameName*
String
The name of the access group of the recipient of the message
EncryptedMessageText*
String
The content of the message to be sent. It is recommended that this is encrypted, but it can also be provided unencrypted
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
ExtraData
map[String]String
arbitrary key value data
Update Direct Message
POST
/api/v0/update-dm-message
Prepare a new message transaction to update an existing DM. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Endpoint implementation in backend.
Request Body
SenderAccessGroupOwnerPublicKey*
String
Public key of the user updating a DM
SenderAccessGroupPublicKey*
String
Public key of the access group the sender used for the DM originally
SenderAccessGroupKeyName*
String
The name of the access group the sender used to originally send the DM
RecipientAccessGroupOwnerPublicKey*
String
Public key of the user who received the DM
RecipientAccessGroupPublicKey*
String
Public key of the access group to which this DM was originally sent
RecipientAccessGroupKeyName*
String
The name of the access group to which this DM was originally sent
EncryptedMessageText*
String
The updated content of the message. It is recommended that this is encrypted, but it can also be provided unencrypted.
TimestampNanosString*
String
String version of the timestamp nanos field of the original DM. This is used to uniquely identify a message.
MinFeeRateNanosPerKB
uint64
Rate per KB
TransactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
ExtraData
map[String]String
arbitrary key value data
Send Group Chat Message
POST
/api/v0/send-group-chat-message
Prepare a new message transaction to send a new message to a group chat. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Endpoint implementation in backend.
Request Body
SenderAccessGroupOwnerPublicKey*
String
Public key of the user sending the message
SenderAccessGroupPublicKeyBase58Check*
String
Public key of the access group the sender is using for this message
SenderAccessGroupKeyName*
String
The name of the access group the sender is using for this message
RecipientAccessGroupOwnerPublicKeyBase58Check*
String
Public key of the owner of the group chat to which this message is being sent
RecipientAccessGroupPublicKeyBase58Check*
String
Public key of the access group of the group to which this message is being sent
RecipientAccessGroupKeyName*
String
The name of the access group of the group to which this message is being sent
EncryptedMessageText*
String
The content of the message to be sent. It is recommended that this is encrypted, but it can also be provided unencrypted
MinFeeRateNanosPerKB
uint64
Rate per KB
TransactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
ExtraData
map[String]String
arbitrary key value data
Update Group Chat Message
POST
/api/v0/update-group-chat-message
Prepare a new message transaction to update an existing message to a group chat. Transaction needs to be signed and submitted through api/v0/submit-transaction
before changes come into effect.
Endpoint implementation in backend.
Request Body
SenderAccessGroupOwnerPublicKey*
String
Public key of the user updating the message to a group chat
SenderAccessGroupPublicKey*
String
Public key of the access group the sender originally used for the message to the group chat
SenderAccessGroupKeyName*
String
The name of the access group the sender originally used to send the message to the group chat
RecipientAccessGroupOwnerPublicKey*
String
Public key of the owner of the group to which this message was originally sent
RecipientAccessGroupPublicKey*
String
The name of the access group of the group to which this message was originally sent
RecipientAccessGroupKeyName*
String
The name of the access group of the group to which this message was originally sent
EncryptedMessageText*
String
The updated content of the message. It is recommended that this is encrypted, but it can also be provided unencrypted.
TimestampNanosString*
String
String version of the timestamp nanos field of the original message to the group chat. This is used to uniquely identify a message.
MinFeeRateNanosPerKB
uint64
Rate per KB
TransactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
ExtraData
map[String]String
arbitrary key value data
(DEPRECATED) Send Message
POST
/api/v0/send-message-stateless
Create a Send Message transaction.
Send Message Transactions sends an encrypted message from the sender to the receiver.
Endpoint implementation in backend.
Example usages in frontend: - Make Request to Send Message Stateless including encrypting message with identity - Use SendMessage to send a private message
Request Body
SenderPublicKeyBase58Check*
String
Public key of the user sending the message
RecipientPublicKeyBase58Check*
String
Public key of the recipient of the message
MessageText
String
Unencrypted text of the message. It is recommended to encrypt the text using a shared secret and supply it in the EncryptedMessageText field instead.
EncryptedMessageText*
String
Text of message encrypted with a shared secret
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
SenderMessagingGroupKeyName
String
SenderMessagingGroupKeyName is the messaging group key name of the sender. If left empty, this endpoint will replace it with the base messaging key. If both SenderMessagingGroupKeyName and RecipientMessagingGroupKeyName are left empty, a V2 message will be constructed
RecipientMessagingGroupKeyName
String
RecipientMessagingGroupKeyName is the messaging group key name of the recipient. If left empty, this endpoint will replace it with the base messaging key. If both SenderMessagingGroupKeyName and RecipientMessagingGroupKeyName are left empty, a V2 message will be constructed
ExtraData
map[string]string
extra data, values must be strings. This is an arbitrary json object that can be used to add extra metadata on a message
(DEPRECATED) Register Messaging Group Key
POST
/api/v0/register-messaging-group-key
Create a Group Messaging Key for V3 messages.
Group Messaging Keys are used to power v3 messages. More info to come.
Request Body
OwnerPublicKeyBase58Check*
String
Public key of the account for which we want to register a messaging key
MessagingPublicKeyBase58Check*
String
Public key of the messaging group we want to register
MessagingGroupKeyName*
String
Name of the group key
MessagingKeySignatureHex*
String
Signature of sha256x2(MessagingPublicKeyBase58Check + MessagingGroupKeyName). Currently, the signature is only needed to register the default key
ExtraData
map[string]string
extra data, values must be strings. This is an arbitrary json object that can be used to add extra metadata on a group messaging key
MinFeeRateNanosPerKB*
uint64
Rate per KB
TransactionFees
TransactionFee[]
Array of
objects that define additional outputs that need to be added to this transaction
Last updated