https://github.com/edgeapp/edge-shitcoin-server
Pseudo crypto currency server to do fake transactions
https://github.com/edgeapp/edge-shitcoin-server
Last synced: about 1 year ago
JSON representation
Pseudo crypto currency server to do fake transactions
- Host: GitHub
- URL: https://github.com/edgeapp/edge-shitcoin-server
- Owner: EdgeApp
- Created: 2017-04-19T07:41:31.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-05T10:12:32.000Z (almost 9 years ago)
- Last Synced: 2025-02-14T14:55:08.187Z (over 1 year ago)
- Language: JavaScript
- Size: 29.3 KB
- Stars: 2
- Watchers: 17
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Airbitz Shitcoin Server for serving up all the coin are belong to us
`npm install`
## Install CouchDB
brew install couchdb
## Launch CouchDB
couchdb
## Build
npm run build
## Launch shitcoin API server
node lib/server.js
## Launch server using `forever-service`
sudo forever-service install shitcoin -r [username] --script lib/server.js --start
## Restart, stop, delete service
sudo service shitcoin restart
sudo service shitcoin stop
sudo forever-service delete shitcoin
# API calls
## GET
### Get Transaction
```
https://localhost:8080/api/transaction/[transaction_id]
{
"_id": "fdc5615a6658e1b5349b5b62",
"_rev": "1-d2907b1b6123d2bb18927580ab00eeb4",
"networkFee": "10",
"inputs": [
{
"address": "1oijaweoijg2aef__200",
"amount": "50"
},
{
"address": "2lkjaeoija209fa__150",
"amount": "70"
}
],
"outputs": [
{
"address": "3029g2o4tiawehawlkwjf",
"amount": "35"
},
{
"address": "4029g2o4tiuhagwlkawgw",
"amount": "75"
}
]
}
```
### Get Address
Calling get address with an address ending in "__[amount]" will autofund the address with [amount] of coins.
ie. `GET https://localhost:8080/api/address/1o3iuhgiuhawet34t__250` will create an address with 250 coins.
Get address must be called on an address before it can receive funds
```
https://localhost:8080/api/address/[address]
{
"_id": "3029g2o4tiawehawlkwjf",
"_rev": "2-16fe358fa8178118a0fa46e2eab1e603",
"balance": "35",
"txids": [
"223396f378f391f54ae81b51",
"fdc5615a6658e1b5349b5b62"
]
}
```
## POST
### Spend
Spend from multiple addresses to multiple addresses.
Send (application/json) MIME type body with following format
```
https://localhost:8080/api/spend
{
"inputs": [
{ "address": "1oijaweoijg2aef__200", "amount": "50" },
{ "address": "2lkjaeoija209fa__150", "amount": "70" }
],
"outputs": [
{ "address": "3029g2o4tiawehawlkwjf", "amount": "35" },
{ "address": "4029g2o4tiuhagwlkawgw", "amount": "75" }
]
}
```