Skip to content

Commit a75cd37

Browse files
committed
impove payments docs
Signed-off-by: Guillem Bonet <[email protected]>
1 parent 42ca246 commit a75cd37

File tree

11 files changed

+68
-5
lines changed

11 files changed

+68
-5
lines changed

README.md

+26-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,30 @@
1-
# Mysterium network payments related packages
1+
# Mysterium Network payments related packages
22

3-
[![Build Status](https://travis-ci.com/mysteriumnetwork/payments.svg?token=t9FwiYsxwDxkJWnSMpfr&branch=master)](https://travis-ci.com/mysteriumnetwork/payments)
3+
[![Go Report Card](https://goreportcard.com/badge/github.com/mysteriumnetwork/payments)](https://goreportcard.com/report/github.com/mysteriumnetwork/payments)
4+
[![pipeline status](https://gitlab.com/mysteriumnetwork/payments/badges/master/pipeline.svg)](https://gitlab.com/mysteriumnetwork/payments/pipelines)
5+
[![GoDoc](https://godoc.org/github.com/mysteriumnetwork/payments?status.svg)](http://godoc.org/github.com/mysteriumnetwork/payments)
46

57
In this repo you can find packages needed to work with Mysterium Network payments (see whitepaper [here](https://github.com/mysteriumnetwork/payments-smart-contracts/blob/master/docs/paper/accountant-pattern.pdf)).
68

7-
* **bingings** provides golang bindings for easy work with our [smart contracts](https://github.com/mysteriumnetwork/payments-smart-contracts)
8-
* **registration** crypto functions needed for identity registration
9-
* **crypto** has all needed functions to work with `Payment promises` and `Promise Exchange Message`.
9+
# Contents
10+
11+
## Smart contract interaction and clients
12+
13+
- [bindings](bindings/README.md)
14+
- [registration](registration/README.md)
15+
- [crypto](crypto/README.md)
16+
- [client](client/README.md)
17+
18+
## Gas stations and exchange rate providers
19+
20+
- [exchange](exchange/README.md)
21+
- [gas](transaction/gas/README.md)
22+
23+
## Transaction sending and watching
24+
25+
- [transfer](transfer/README.md) *[_deprecated_]*
26+
- [transaction](transaction/README.md)
27+
## Other utilities
28+
29+
- [units](units/README.md)
30+
- [merkle](merkle/README.md)

bindings/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Bindings
2+
3+
Provides golang bindings for calling our [payments smart contracts](https://github.com/mysteriumnetwork/payments-smart-contracts), [rewarder smart contracts](https://github.com/mysteriumnetwork/rewarder-smart-contracts), [topperupper smart contracts](https://github.com/mysteriumnetwork/topperupper-smart-contracts) and others that might be useful like uniswap v3.

client/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### Client
2+
3+
Wrappers for the client used for making RPC calls with useful funcionalities like nonce tracking, multichain clients, ...
4+
5+
With it we can wrap the contract calls that we might use often using bindings from the bindings folder and objects from the crypto folder and do things like getting the hermes id from the registry smart contract, create transactions that execute smart contract calls, etc.
6+
7+
It is worth mentioning that the client usually creates the transactions but doesn't send them to the blockchain.
8+
The sending is often managed by other packages (like `/transaction`) that also manage nonce and gas price.
9+
It is still able to send the transaction himself but it needs extra logic to handle gas prices and nonce.

crypto/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Crypto
2+
3+
Has objects and functions needed to work with `Payment promises`, `Promise Exchange Message`, and others.

exchange/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Exchange
2+
3+
Here you can find interfaces and objects that integrate with exchange rate provider API's (coingecko and coinranking). They provide a standard way to exchange rates for different coins and currencies.

merkle/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Merkle
2+
3+
Code used for merkle trees, it allows creating them, getting its proofs, and other useful functions.

registration/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Registration
2+
3+
Crypto functions needed for identity registration.

transaction/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Transaction
2+
3+
Everything that has to do with sending transactions successfully. Depot: It works in a similar fashion to a regular delivery depot in real life. It has Workers which check for incoming transactions, pack them and give them away to Couriers which try to deliver the transaction. Transaction state is tracked just like a regular package would be, trying to deliver it again if it was not accepted etc.It is composed of 2 main objects:
4+
5+
- Courier: which is in charge of signing and sending the transactions to the blockchain with the given parameters.
6+
- Depot: It works in a similar fashion to a regular delivery depot in real life. It has Workers which check for incoming transactions, pack them and give them away to Couriers which try to deliver the transaction. Transaction state is tracked just like a regular package would be, trying to deliver it again if it was not accepted etc.
7+
It does so by having a queue of transactions which need to be sent or have not yet been mined and keeps checking their status and doing the necessary actions (sending, increasing gas, waiting, ...) to make sure they get delievered and then can be removed from the queue.
8+
9+
Transactions delivered into the depot should always get mined if they are valid and the address has enough gas.

transaction/gas/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Gas
2+
3+
The gas package has a standard interface used for getting gas prices. It provides different integrations which implement the interface and can be used for getting gas prices from different APIs like matic gas station or etherscan.

transfer/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Transfer *[_deprecated_]*
2+
3+
Old version of `/transaction`. It sends transactions and watches them until they are completed. If they do not complete it keeps increasing its gas price until they do.

units/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Units
2+
3+
Provides useful and readable functions for working with units.

0 commit comments

Comments
 (0)