A Decentralized Social Protocol for Dolphin and Coral.
The Social process for the Quest Network Operating System orchestrates, stores and synchronizes configuration data, discovers and shares relevant information about dolphin peers. Uses IPFS DAGs for timelines.
See QD Social TS the Features & Roadmap
npm install @questnetwork/quest-social-js@0.9.4
Toggles your profile's visibility between private and public, not giving a pubKey will automatically select your first profile. In private mode you have to manually share your profile with everyone you want to see your details. In Public mode all the members of the channels you're in can see your profile.
<os>.social.profile.togglePrivacy();
Checks if a profile has public visibility, not giving a pubKey will automatically select your first profile.
if(<os>.social.profile.isPublic(socialPubKey)){
console.log("Hello Universe");
};
Checks if a profile is in our favorites, returns boolean true or false.
if(<os>.social.profile.isFavorite(socialPubKey)){
console.log("Hello Universe");
};
Checks if a profile is a requested favorite, returns boolean true or false.
if(<os>.social.profile.isRequestedFavorite(socialPubKey)){
console.log("Hello Universe");
};
Will automatically search for all social profiles in the peers network where alias, full name or about text match the phrase. This version of the methos is case sensitive by default, future versions will allow a config object.
Returns an array with the search results and adds the following fields:
isFavorite: boolean
isRequestedFavorite: boolean
let results = <os>.social.search('Bob');
Returns an array with the unresolved timeline of the requested peer.
let timeline = await <os>.social.timeline.get(socialPubKey)){
};
Returns an array with the resolved timeline of the requested peer.
let timeline = await <os>.social.timeline.get(socialPubKey)){
Deletes a post by its qHash.
async <os>.social.timeline.post.delete(qHash);
Creates a new post on the timeline of the owner of the socialPubKey.
<os>.social.timeline.post.new(postObj = { content: '', socialPubKey:'' })
Propagates the latest timeline ref across channels.
async <os>.social.timeline.post.propagate(latestRef, postObj)
async social.timeline.agent.sync(pubKey = "all", config = { limit: 5, storagePath: '/archive/social/timeline/transaction' })
Syncs the timeline for a given pubkey or all cached pubkeys.
async <os>.social.timeline.agent.sync(pubKey);
Creates a new post on the timeline of the owner of the socialPubKey.
<os>.social.timeline.agent.groupTimeline(timeline, limit = 0)
Please consider supporting us, so that we can build a non-profit for this project (ツ)
Ethereum | Bitcoin |
---|---|
0xBC2A050E7B87610Bc29657e7e7901DdBA6f2D34E |
bc1qujrqa3s34r5h0exgmmcuf8ejhyydm8wwja4fmq |
GNU AGPLv3