Git Product home page Git Product logo

hungry-donut's Introduction

hungry-donut

A storage service geared toward small files with ECDSA signature auth that works with the 21 Bitcoin Computer

This project is for a server that will store and return data for a certain amount of time and accept updates if they are signed by a user's payment address.


Design goals, none of the below is implemented yet.

  • All storage expires after one year. Extended by uploading the same data.
  • Data is kept if bandwidth is exceeded just no longer served until balance is increased.

REST API

  • All requests via HTTP GET except where noted.
  • Data returned as JSON.

status

Parameters
    None

Returns
    uptime - time in seconds that the service has been running
    stored - bytes stored
    free - bytes free
    price - satoshis for 1 MB storage + 50 MB transfer

price

Parameters
    None
    
Returns
    price - satoshis for 1 MB storage + 50 MB transfer

address

Parameters
    contact - email or Bitmessage address to contact on expiration
    address - account this will be used to fund
    signature - signature for concatenation of contact and address by
        private key for address
    
Returns
    address - a new, unused Bitcoin address

nonce

Parameters
    address - account requesting a nonce
    
Returns
    nonce - random 32-byte string

Note: nonce is stored until used or next nonce generated for address

balance

Parameters
    address - account on which to report balance
    nonce - latest unused 32-byte string retrieved via /nonce
    signature - signature over concat(address and last nonce received via /nonce call)
    
Returns
    balance - satoshis worth of value left on account

get

Parameters
    key - used to retrieve value
    
Returns
    key - the key that was requested
    value - the last value stored for the key

Note: Charges bandwidth against key/value submitter's account.

put (POST)

Parameters
    key - string
    value - string
    address - account to charge for this data
    nonce - latest unused 32-byte string retrieved via /nonce
    signature - signature over concat(key + value + address + nonce) by 
        private key for address

Returns
    status - "success" or "error: " + error reason
        Possible error reasons

hungry-donut's People

Contributors

weex avatar

Stargazers

Jason Niebauer avatar

Watchers

 avatar James Cloos 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.