Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-kosu: add rpc methods names to documentation #236

Merged
merged 4 commits into from Aug 27, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

go-kosu: add rpc methods names to documentation

  • Loading branch information
gchaincl committed Aug 27, 2019
commit ac809c8f113b98bdd985ca03126e4b88850bffbc
@@ -47,6 +47,10 @@ To subscribe to the `newBlocks` events we should:

AddOrders adds an array of Kosu orders to the network.

_Method:_

- `kosu_addOrders`

_Parameters:_

- Order Transactions - `Array([order]())`
@@ -113,6 +117,10 @@ curl -X POST localhost:14341 \
LatestHeight returns the height of the best known block.
The `latestHeight` method will return the integer height of the latest block committed to the blockchain.

_Method:_

- `kosu_latestHeight`

_Parameters:_

_Returns:_
@@ -133,6 +141,10 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"kosu_latestHeight", "id": 1}' lo

NumberPosters returns the number of poster accounts

_Method:_

- `kosu_numberPosters`

_Parameters:_

_Returns:_
@@ -143,6 +155,10 @@ _Returns:_

QueryPoster returns a poster given its address.

_Method:_

- `kosu_queryPoster`

_Parameters:_

- `address` - _string_
@@ -175,6 +191,10 @@ curl -X POST localhost:14341 \
QueryValidator returns a validator given its address.
Validator's address is case insensitive.

_Method:_

- `kosu_queryValidator`

_Parameters:_

- `address` - _string_
@@ -213,6 +233,10 @@ curl -X POST localhost:14341 \

RemainingLimit returns the sum of all the poster's limit.

_Method:_

- `kosu_remainingLimit`

_Parameters:_

_Returns:_
@@ -226,6 +250,10 @@ The `RoundInfo` object tracks rebalance round information.
It is used to maintain sync with the Ethereum chain,
which is used to mark the beginning and end of each rebalance round.

_Method:_

- `kosu_roundInfo`

_Parameters:_

_Returns:_
@@ -249,6 +277,10 @@ curl -X POST localhost:14341 \
TotalOrders returns the total number of orders in the system.
This number is incremented each time one submits a new valid order

_Method:_

- `kosu_totalOrders`

_Parameters:_

_Returns:_
@@ -259,6 +291,10 @@ _Returns:_

Validators returns the full validator set

_Method:_

- `kosu_validators`

_Parameters:_

_Returns:_
@@ -325,6 +361,10 @@ _note_: `<<` and `>>` are not part of the response, instead it denotes the flow

NewBlocks subscribes to new blocks on the Kosu blockchain.

_Method:_

- `kosu_subscribe`

_Parameters:_

- `newBlocks` - _string_
@@ -447,6 +487,10 @@ for {

NewOrders subscribes to new Order Transactions.

_Method:_

- `kosu_subscribe`

_Parameters:_

_Returns:_
@@ -557,6 +601,10 @@ for {

NewRebalances subscribes to new Rebalance Transactions

_Method:_

- `kosu_subscribe`

_Parameters:_

- `newRebalances` - _string_
@@ -82,6 +82,10 @@ func (s *Service) subscribeTM(ctx context.Context, query string) (*rpc.Subscript
/*
NewBlocks subscribes to new blocks on the Kosu blockchain.
_Method:_
- `kosu_subscribe`
_Parameters:_
- `newBlocks` - _string_
@@ -208,6 +212,10 @@ func (s *Service) NewBlocks(ctx context.Context) (*rpc.Subscription, error) {
/*
NewOrders subscribes to new Order Transactions.
_Method:_
- `kosu_subscribe`
_Parameters:_
_Returns:_
@@ -322,6 +330,10 @@ func (s *Service) NewOrders(ctx context.Context) (*rpc.Subscription, error) {
/*
NewRebalances subscribes to new Rebalance Transactions
_Method:_
- `kosu_subscribe`
_Parameters:_
- `newRebalances` - _string_
@@ -405,6 +417,10 @@ func (s *Service) NewRebalances(ctx context.Context) (*rpc.Subscription, error)
LatestHeight returns the height of the best known block.
The `latestHeight` method will return the integer height of the latest block committed to the blockchain.
_Method:_
- `kosu_latestHeight`
_Parameters:_
_Returns:_
@@ -436,6 +452,10 @@ func (s *Service) LatestHeight() (int64, error) {
/*
AddOrders adds an array of Kosu orders to the network.
_Method:_
- `kosu_addOrders`
_Parameters:_
- Order Transactions - `Array([order]())`
@@ -536,6 +556,10 @@ The `RoundInfo` object tracks rebalance round information.
It is used to maintain sync with the Ethereum chain,
which is used to mark the beginning and end of each rebalance round.
_Method:_
- `kosu_roundInfo`
_Parameters:_
_Returns:_
@@ -563,6 +587,10 @@ func (s *Service) RoundInfo() (*types.RoundInfo, error) {
QueryValidator returns a validator given its address.
Validator's address is case insensitive.
_Method:_
- `kosu_queryValidator`
_Parameters:_
- `address` - _string_
@@ -605,6 +633,10 @@ func (s *Service) QueryValidator(addr string) (*types.Validator, error) {
/*
Validators returns the full validator set
_Method:_
- `kosu_validators`
_Parameters:_
_Returns:_
@@ -658,6 +690,10 @@ func (s *Service) Validators() ([]*types.Validator, error) {
/*
QueryPoster returns a poster given its address.
_Method:_
- `kosu_queryPoster`
_Parameters:_
- `address` - _string_
@@ -693,6 +729,10 @@ func (s *Service) QueryPoster(addr string) (*types.Poster, error) {
TotalOrders returns the total number of orders in the system.
This number is incremented each time one submits a new valid order
_Method:_
- `kosu_totalOrders`
_Parameters:_
_Returns:_
@@ -707,6 +747,10 @@ func (s *Service) TotalOrders() (uint64, error) {
/*
NumberPosters returns the number of poster accounts
_Method:_
- `kosu_numberPosters`
_Parameters:_
_Returns:_
@@ -727,6 +771,10 @@ func (s *Service) NumberPosters() (uint64, error) {
/*
RemainingLimit returns the sum of all the poster's limit.
_Method:_
- `kosu_remainingLimit`
_Parameters:_
_Returns:_
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.