0.0.1 • Published 4 years ago

@wanderspeak/journey v0.0.1

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
4 years ago

Wanderspeak: Journey

This typescript library provides the core API for the wanderspeak decentralized social network.

Beginning a journey

const journey = Journey.begin();
journey.set({ name: "D'Artagnan" });
journey.post('Hello, World!');

Restoring a journey

// Definition for our hero, the current user
const hero = {
  id: '1234',
  name: "D'Artagnan",
  taverns: [
    {
      name: 'Wanderspeak Social',
      domain: 'social.wanderspeak.com'
    }
  ]
};

// Definition for the hero's adventure log (posts)
const log = {
  stories: [
    {
      content: 'Hello, World!',
      timestamp: 1580021475
    }
  ]
};

// User settings, keys, other confidential information
const secrets = {
  key: '45678'
}

const journey = new Journey(hero, log, secrets);