GithubHelp home page GithubHelp logo

loremlabs / kudos Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 21.93 MB

Kudos: the protocol powering the Web's attribution economy

Home Page: https://www.kudos.community

License: MIT License

JavaScript 36.70% TypeScript 7.21% HTML 4.94% Svelte 28.29% CSS 6.35% Rust 0.71% SCSS 15.53% Mermaid 0.01% Shell 0.26%
identity-wallet kudos micropayments xrpl setler

kudos's Introduction

image

Kudos

Kudos is a new way for rewarding creation while keeping the best parts of the "free Internet". Kudos creates an attribution economy where end users record those who help them, and then later optionally fund their accounts with a monthly fee which will be proportionally distributed to all kudos attributions they generate for that month.

At its core, Kudos is two steps:

  1. Recording the identifiers of those that help you.
  2. Splitting a monthly budget between those identifiers.

Kudos is made possible because of a few key technologies:

  • XRPL - The XRPL is a decentralized, open-source, and permissionless ledger that allows for fast, cheap, and secure transactions. Crucially, XRPL makes micropayments and escrow possible.
  • Hierarchical Deterministic Wallets (HD Wallet) - HD Wallets allow for the creation of multiple accounts from a single seed. This allows for the creation of multiple accounts without the need to store multiple seeds.
  • Decentralized Identifiers (DIDs) - A DID is a decentralized identifier that can be used to identify a person, organization, or thing. It is used to associate a payment address with a person or organization.
  • Verifiable Credentials - Verifiable Credentials are a way to associate a DID with a payment address. They are signed by a trusted party (such as a bank) and can be verified by anyone.

Repo Structure

This repo contains several sub-components of the reference implementation of Kudos:

  • kudos-for-code - A reference implementation of Kudos to support open source code contributions
  • kudos-for-content - A reference implementation of Kudos to support content creators
  • ident-agency - Reference backend GraphQL and API services
  • identity-wallet - Examples of identity wallets that allows users to send and receive payments but also manager their Identities, and of course settle Kudos. Setler is available as both a CLI and GUI application.
  • rfcs - A collection of RFCs that describe the Kudos protocol and its components.

Overview Architecture

Overview Flow

Screenshot 2023-03-25 at 20 44 39

Further details on the motivation for Kudos can be found in the Kudos Sketch.

History

Kudos owes its start to the In-a-Moon project from 2009. In-a-Moon required websites to include an identifier which would be used to split up a monthly payment. For In-a-Moon to be successful required adding JavaScript to every website on the web, a task that became increasingly difficult as the web grew. Atri was the second attempt to solve the same problem but without the need to add JavaScript to every website. Atri was a browser extension that would record the social media handles already embedded in websites that a user visited. While Atri solved In-a-Moon's problem, it was difficult to split up the monthly payment between the social media handles as there wasn't a viable micropayment solution at the time. Kudos solves this problem by using the XRPL and its escrow capabilities which make delayed access micropayments possible.

License

Kudos is licensed under the MIT License. See LICENSE for the full license text.

Contributing

We welcome contributions from the community. Please see CONTRIBUTING for details on how to contribute.

Code of Conduct

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code.

kudos's People

Contributors

mankins avatar sangheestyle avatar sidvishnoi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

kudos's Issues

Publish core code as library

We have some code duplication that would be better to take care of sooner rather than later.

We want to, where possible, publish code as libraries so they can be re-used.

  • @kudos-protocol/logging - log as json
  • @kudos-protocol/keys - key management for kudos
  • @kudos-protocol/short-id

Skip address functionality

The config for setler (cli/gui) should maintain a "skip list" of dids that we will not process for various reasons.

  • Create an interface for adding / removing did addresses from the skip list, ex: setler config set ...
  • When settling a pool, obey the settings for these skip lists, setting the weight = 0 when the kudos address matches the skip did.
  • Document this interface.

Create Setler Ident command

This is an interface into the ident directory scheme.

In this scheme, a well-known address is the source of directory information. Users will send XRP to this address along with signed meta information that gets processed and added to external services.

  • setler ident email
  • like send social email auth flow
  • ident agency will vouch for successful completion of flow
  • transaction sent to directory address will include vouch in the meta info for the transaction
  • Repeat for setler ident {github,url,...}
  • Should implement in general, including other flows like kyc

Add kudos commands to setler cli

  • setler kudos pool create {name} => returns poolId
  • setler kudos pool add {kudos file ndjson/sqlite, poolId}
  • setler kudos keys --scope=$poolId --scope=$poolId (limit key scope to a particular poolId
  • setler kudos pool list => List of poolIds / Names

Error: ENOENT: no such file or directory when create a mnemonic for Scope: 0

% npx @loremlabs/setler@latest pool get PSVWeCMhTfLkJ74r3k2K1L
✔ Setler Password:  … ****
✔ Would you like to create a mnemonic for Scope: 0? … yes
Error: ENOENT: no such file or directory, open '/Users/sanghee/Library/Application Support/setler/state/setlr-0.seed'
    at Object.openSync (node:fs:601:3)
    at Object.writeFileSync (node:fs:2249:35)
    at createSeed (file:///Users/sanghee/.npm/_npx/3fd0890560959e83/node_modules/@loremlabs/setler/src/lib/wallet/gatekeep.js:241:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async checkConfig (file:///Users/sanghee/.npm/_npx/3fd0890560959e83/node_modules/@loremlabs/setler/src/lib/wallet/gatekeep.js:268:18)
    at async gatekeep (file:///Users/sanghee/.npm/_npx/3fd0890560959e83/node_modules/@loremlabs/setler/src/lib/wallet/gatekeep.js:277:7)
    at async Module.exec (file:///Users/sanghee/.npm/_npx/3fd0890560959e83/node_modules/@loremlabs/setler/src/actions/pool.js:49:7)
% node --version                                    (issue/node16-compatibility)kudos
v18.16.1
%       

Tested on node 16, 18 and got errors.

Record Receipt for Dist List Settling

When Dist Lists get settled, the output of these transactions should be:

  • signed / saved to be used as "proof" that a payment happened
  • paid dids should have negative weights added to the pool to record that the new weight for this did is 0. This would allow the same pool to be re-used for future transactions.
  • (side effect of above) Any id that was below the minimum threshold would be carried-over to the next settlement period where it may have the opportunity to get paid again.

Make Setler CLI Send Money to a Pool

Right now distribution lists are manually uploaded. It would be better if setler connected to existing lists–pools–of kudos, as provided in #3

This should add commands to setle kudos for fame or fortune (xrp) via setler kudos send.

Simplify Kudos for Code Github Action

Right now the Github Action process is more complicated than it needs to be.

We want to use the simplified creation/inking process of #2 inside the Github Action script.

This will use the ident.agency pool server by default, but will allow enterprises to connect to their own server if desired.

(Depends on #2 and #3 )

Publish Setler-Cli to NPM

Publish setler-cli to npm as @loremlabs/setler-cli.

While we're doing this we should take down send-to-social as that functionality is now inside setler.

Dogfood Kudos

We should use kudos ourselves to get paid for our work on kudos. ♻

This PR adds support for adding our did to the distribution list when using setler.

It should be optional and easy to opt-out of this.

Add I18n support

We want to be able to support user interfaces in multiple languages. This work should implement the infrastructure for supporting multiple languages, yet not actually add a language.

Sub-tasks:

Future work will then implement:

  • Spanish
  • Korean

with other languages to follow based on demand.

Set default network via config

Right now the xrpl:testnet is the default network. We can create a config switch for activeNetwork which will be used to set the default network. It can always be overwritten (and should be) by command-line flags --network=xrpl:livenet etc.

support KUDOS: in-source

It's nice that we have a kudos.yaml file support, but it would also be great to be able to support in-line KUDOS: from source code.

For instance I just forked / copy-pasted something and would love to add a

// KUDOS: [identifier]

inline, similar to how we do:


TODO: this thing should be zero
FIXME: this thing is broken
REFACTOR: this is slow

etc...

Add detail to www.kudos.community website

We need more content on the main site so that people can understand:

  1. What kudos is
  2. How they can use it
  3. How they can join development
  4. Interact with others in the kudos community (websites, discord, etc?)

Use vercel/ncc to compile setler-cli

vercel/ncc

Currently some errors in the way:

  • qrcode-terminal throws an octal error, as mentioned here. I was able to get around this with:
    black = "\\033[40m  \\033[0m",
    white = "\\033[47m  \\033[0m",

(The double escape...) ... but it's not clear if this actually works as desired or prints the literal because I wasn't able to get the rest of the ncc compilation to execute. It's likely there's another/proper way to do the above.

  • Once compiled, executing node dist/index.js produces:
delete require.cache[__filename];
^

ReferenceError: require is not defined in ES module scope, you can use import instead

It does look this is similar to this issue: vercel/ncc#243 ...

Will keep this open hoping to get around these issues.

Pool Server to Store Kudos

Right now the storage of kudos ("inking") is up to the creator process. While this is general it means that implementing kudos requires more work.

This issue proposes the creation of a "pool server" that can be used to store kudos for a particular address.

It should:

  • use a signature scheme to prove that kudos are signed by the pool address
  • store the kudos raw, for future processing
  • expose an api to get summary data for a pool address (validating that the request is coming from a key-holder)

Implementing this can start by adding GQL methods to the ident-agency server enola, but may need to be able to run independently so that enterprises can run their own pool server if they don't wish to share potentially private kudos information with a kudos service provider.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.