Giter VIP home page Giter VIP logo

teapartycrypto / tea Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 3.0 430.02 MB

The Frontend Of TeaParty

Home Page: https://teaparty7.godaddysites.com/

License: MIT License

Shell 0.04% Makefile 0.05% Dockerfile 0.01% CSS 93.90% HTML 0.28% Go 0.68% JavaScript 4.92% Solidity 0.07% Less 0.03% TypeScript 0.03%
bitcoin blockchain celo crypto crypto-exchange digital-asset-management digital-assets ergo ethereum exchange

tea's Introduction

tea

Material Bread logo

The application interface for `TeaParty`

## Design / Overview

TeaParty consists of two core parts tea & party, as illustrated by the diagram below.

  • party - A suite of services and logic that support the platform. This is where all the magic happens ๐Ÿช„ ( If this sounds complicated, just think of party as the ๐Ÿง  "brains" ๐Ÿง  of the project .)

  • tea - A suite of services and logic to make it easy for users to interact with party

Material Bread logo

tea was elected to be designed as a desktop application over a hosted web service in order to provide users with the most control, safety, privacy, and security, while interacting with the marketplace. (Note Although tea is packaged as a desktop application, it does not have to run on your local desktop! In fact it is quite happy living on a remote server.)

tea works by first checking for a local NKN wallet, wallet, file and begins listing to this address. If this file does not exist, a new account is created for the user. (NOTE This file, wallet, is very imporant and should be treated as any other wallet or private key. Do not delete, move, or alter this file while you have open or pending trades as your NKN public address is how party talks to your tea client.)

After starting the NKN connection, tea also begins serving the static assets located at kodata (our React application) while exposing several API endpoints for the user to interact with Party

tea is now at your disposal to interact with ๐ŸŽ‰Party๐ŸŽ‰

Current Supported Assets

TeaParty currently supports the trade of the following assets:

  • PartyChain
  • Ethereum
  • EthOne
  • Octa
  • Polygon
  • Celo
  • Solana
  • ANY - ( Users are able to list trades for ANY of the supported assets by defining a USD value for the trade)

Asset Support Comming Soon

I am currently in the process of introducing the following assets into TeaParty

  • NFT's (on all supported chains)
  • Kaspa
  • Radiant
  • Bitcoin
  • Raven
  • Ergo
  • .... Want TeaParty to support something not on the roadmap? submit an issue and let me know!

Getting Started

NOTE Tea is currently in BETA and the only server avalible is the staging enviorment. In the staging environment there are several IMPORTANT differences from the production environment:

  1. All of the RPC's are pointing to the following networks

(DO NOT SEND MAINNET CURRENCY)

   * Ethereum: Goerli ([faucet](https://www.alchemy.com/overviews/goerli-faucet))

   * Polygon: Mumbai ([faucet](https://faucet.polygon.technology/))

   * Solana: Testnet ([faucet](https://solfaucet.com/))

   * Celo: Alfajores ([faucet](https://celo.org/developers/faucet))

   * GRAMS: Mainnet
  
   * OCTA: Mainnet

   * ETHONE: Mainnet
  1. The watch timeout has been taken down to 300 secconds from 2 hours ( After 300 secconds any pending transaction will fail)

  2. Currently, users still have to pay for the transaction fees ( I will personally reimburse any and all GRAMS costs incurred while playing on testnet untill the faucet is setup.

System Prerequisites for Running tea

tea is currently distribuited as both a container image and a Linux binary. This path was taken to support a maximum number of runtime environments at launch, however, the packaging will change over time to make it accessable to non Linux/Docker users.

Please download and configure Docker for your system. (GUI - download CLI - download)

If you need help getting started, feel free to join us in the MineOnlium Discord! or PM me directly on Discord @ Filth#5858 (439229993625714688)

You can also post in the Github Discussions

Here are a few things you can currently do with tea:

  • Browse the marketplace.
  • Create new orders.
  • View acquired Private Keys.
  • Remove acquired Private Keys from the local filesystem.
  • Interact with the TeaParty smart contract to pay for transaction fees, currently set @ 1 GRAMS/ Transaction.

Quickstart tea

The quickest way to get going with tea is by executing one of the following commands (Only OSX and Linux is supported at the moment and require git)

!!NOTE!! the quickstart method will point you to a production release of tea I.E. Mainnet RPC's are used here, unlike the rest of the methods below that are on testnet.

OSX (amd64):

git clone https://github.com/TeaPartyCrypto/Tea.git && cd Tea && cd release && open http://localhost:8081 && ./mac 

Linux:

git clone https://github.com/TeaPartyCrypto/Tea.git && cd Tea && cd release && xdg-open http://localhost:8081 && ./linux

Windows:

git clone https://github.com/TeaPartyCrypto/Tea.git && cd Tea && cd release && start http://localhost:8081 && windows.exe

Start tea from a release

Releases can be downloaded from the releases on the right side of the homepage of this repository on github. Or the most current build is always avalible in the release directory.

Start a release by navigating into the /release folder (either within this repo. or via download) and executing the proper binary for your system.

Build an run tea from source for LOCAL testing

To start tea pointing to a local instance of Party:

make run

You can now visit http://localhost:8081 to view the interface.

Build an run tea from source for STAGING testing

To start tea pointing to the STAGING instance of Party:

make staging

You can now visit http://localhost:8081 to view the interface.

Build an run tea from source for PRODUCTION testing

To start tea pointing to the production instance of Party:

make prod

You can now visit http://localhost:8081 to view the interface.

Build and Bundle from Source

Execute the following to build and bundle the application from source:

make build

Note That make debug is also avalible, this will build the project and then imediatly start serving a local revision.

Developer

Contributing

Currently teaparty is being devloped solo. So I am more than happy to accept any and all contributions/issues/requests/input from the community!

Interested? Try:

Backend Interactions

/sell

/sell provides an interface for creating new sell requests. It expects an HTTP Post request containing the following JSON schema:

Key Description
currency The asset the seller wishes to post for trade
amount The quantity of currency the seller wishes to trade
tradeAsset The asset the seller wishes to obtain
price The quantity of tradeAsset the seller wishes to obtain
sellerShippingAddress An address on the tradeAsset network that the seller wishes to recieve payment on
paymentTransactionID The Users Address on the PartyChain that has paid for a TeaParty transaction via the smart contract.

Example curl request:

curl -v "http://0.0.0.0:8081/sell" \
       -X POST \
       -H "Content-Type: application/json" \
       -d '{"currency":"kaspa","amount": 10000 ,"tradeAsset":"kaspa","price":10000, "sellerShippingAddress": "kaspa:qqttgqrl38an9r543qnn0g3lywuhsp8cy5e04lfrfsgadnjcdgmsg8zvmjgrj", "paymentTransactionID":"0x5bbfa5724260Cb175cB39b24802A04c3bfe72eb3"}'

/list

/listorders provides an interface for listing the avalible orders. It expects an HTTP GET request.

Example curl request:

curl -v "http://localhost:8081/list" 

/buy

/buy provides an interface for purchasing an open order. It expects an HTTP Post request containing the following JSON schema:

Key Description
txid A Transaction ID for the order in question.
buyerShippingAddress An address on the tradeAsset network that the buyer wishes to recieve payment on.
paymentTransactionID The Users Address on the PartyChain that has paid for a TeaParty transaction via the smart contract.

Example curl request:

curl -v "http://localhost:8081/buy" \
       -X POST \
       -H "Content-Type: application/json" \
       -d '{"txid":"30e16ef3-8ada-453d-adee-bafd242cb91", "buyerShippingAddress":"0x5bbfa5724260Cb175cB39b24802A04c3bfe72eb3","paymentTransactionID":"0x5bbfa5724260Cb175cB39b24802A04c3bfe72eb3"}'

/getPrivateKeys

/getPrivateKeys provides an interface for retreving the locally stored Private keys. It expects an HTTP Get request.

Example curl request:

curl -v "http://localhost:8081/getPrivateKeys" \

/deletePK

/deletePK provides an interface for deleting the locally stored keys. It expects an HTTP Post request containing the following JSON schema:

Key Description
address The public address of the key to delete.

Example curl request:

curl -v "http://localhost:8081/buy" \
       -X POST \
       -H "Content-Type: application/json" \
       -d '{"address":"0x5bbfa5724260Cb175cB39b24802A04c3bfe72eb3"}'

tea's People

Contributors

jeffneff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tea's Issues

I get an error - code 400

I pay a commission of 0.1 GRAMS >>>> Browse >>>> buy >>>> I get an error
Error Buying Order.. Dont forget to pay your transaction fees: Error: Request failed with status code 400
Offered Currency:
1.2 Tea Party Logo NFT ID: 4
I tried to pay from two addresses
0xDffDf81a03A073332239A92a7BE02F9887Ae6d97
0x671865C6175025723E22169fdb7133e71A2833bf

the problem with trading the ETHONE/MO pair

  1. I have two metamask accounts that are on different machines.

  2. I am creating a MO/ETHONE pair. sell MO for ETH
    0x671865C6175025723E22169fdb7133e71A2833bf - buyer
    0x2B12ed8A31244e50457818FC695a4FF43D245997 - seller

  3. I connect accounts to the application and pay a commission of 1 MO with each account.

  4. I waited until the transaction for the commission passes through both wallets

  5. the seller creates an order of 0.1MO for 0.1ETH.
    Shipping Addresses and Return Shipping Address I specify the address of the seller's metamask

  6. the buyer sees in his application an order to sell MO for ETH (Order: ed640e20-8fce-4c81-9e3e-bae6644ad2a1)

  7. The buyer enters into his address in 2 fields, presses the buy button

  8. The escrow addresses for the buyer and seller have been received
    !!!! I got to this part. it confuses me that the sell order was in MO/ETHONE. but both the seller and the buyer receive an intermediate wallet in the MO network

  9. The seller sends MO to the middle address 0xb9b9E09eCDdf8721d6941171037B11bBf6FC6642
    The buyer sends ETHONE to the middle address 0x5b4526E78bcCd34e246c0cBF6fE38021daA69920
    Private keys do not appear.... I try to send MO instead of ETHONE at the buyer's place

  10. After sending the MO, there were also no private keys from escrow wallets

Test fail cases

[ ]-Buyer pays / Seller does not
[ ]-Seller pays / Buyer does not

`Pending Pay Orders` Persistence Issue

Currently, a user will loose &| miss a Pending Pay Order if any of the following conditions are met:

  • The Browser window is refreshed.
  • The Browser window is not open.
  • The WS connection is not open.

Tea & Party should be updated to allow users to fetch the Open Pay Orders at any time, and not require the client window open .

Teapot UI suggestion for sell

when making sell and has sent to escrow address it needs a user prompt showing something just happened with either a auto refresh and display that the coin the seller sent has been sent and received by the escrow address or a link to explorer to show a confirm.

When transaction is complete the app needs to show this, or link to explorer of buy completion. Watching the coins arrive in your wallet is fine but a prompt on the app would help avoid confusions.

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.