Git Product home page Git Product logo

gifty's Introduction

🎁 gifty

Send NFTs via a URL/SMS (API & bridge service)

A hosted instance is available on Heroku: https://token-tx.herokuapp.com.

Flow

Transaction Flow

  1. Transaction Sender creates a new session with its public key
  2. Bridge Server returns the URL for the session (data.href)
  3. Transaction Sender sends the session URL to the intended Transaction Receiver (such as via SMS)
  4. Transaction Receiver updates the session with its wallet address
  5. Transaction Sender polls the session for updates to the wallet address
  6. Transaction Sender receives the Transaction Receiver’s wallet address and signs a transaction to send the token

API

POST /sessions

Creates a new token transaction session.

Parameters

Name Type Description
publicKey string (optional) The public key to use for encrypting the receiver address

Response

A Session object.

GET /sessions/:session_id

Returns the current state of a token transaction session.

Response

A Session object.

POST /sessions/:session_id

Updates the receiver address of a token transaction session.

Parameters

Name Type Description
address string (required) The new receiver address to associate with the session

Response

A Session object.

Session Object

A token transfer session.

Fields

Name Type Description
_id string The session identifier
address string or null The current receiver address associated with the session
href string The canonical URL for the session
publicKey string or null The public key to use for encrypting the receiver address

Example

{
  "data": {
    "_id": "abcdefghijklm789",
    "address": null,
    "href": "https://.../sessions/abcdefghijklm789",
    "publicKey": "ABCDEF..."
  }
}

Development

$ yarn
$ yarn mongodb
$ yarn watch

The development server should now be listening on

License & Acknowledgements

Apache 2.0. Written by Alex Kern and Andrew Gold at ETHSanFrancisco 2018.

gifty's People

Contributors

kern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

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.