Skip to content

Commit

Permalink
fix api
Browse files Browse the repository at this point in the history
  • Loading branch information
grkamil committed Oct 19, 2020
1 parent 38c6108 commit 81ab037
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions src/Minter/MinterAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function createDefaultHttpClient(string $baseUri): Client
*/
public function getStatus(): \stdClass
{
return $this->get('/status');
return $this->get('status');
}

/**
Expand All @@ -79,7 +79,7 @@ public function getCandidate(string $publicKey, ?int $height = null): \stdClass
$params = ['height' => $height];
}

return $this->get('/candidate/' . $publicKey, $params ?? null);
return $this->get('candidate/' . $publicKey, $params ?? null);
}

/**
Expand All @@ -103,7 +103,7 @@ public function getValidators(?int $height = null, ?int $page = 1, ?int $perPage
$params['per_page'] = $perPage;
}

return $this->get('/validators', $params);
return $this->get('validators', $params);
}

/**
Expand Down Expand Up @@ -142,7 +142,7 @@ public function getAddresses(array $addresses, ?int $height = null, bool $delega
$params['height'] = $height;
}

return $this->get('/addresses', $params);
return $this->get('addresses', $params);
}

/**
Expand All @@ -168,7 +168,7 @@ public function getNonce(string $address): int
*/
public function send(string $tx): \stdClass
{
return $this->post('/send_transaction', ['tx' => $tx]);
return $this->post('send_transaction', ['tx' => $tx]);
}

/**
Expand All @@ -181,7 +181,7 @@ public function send(string $tx): \stdClass
*/
public function getTransaction(string $hash): \stdClass
{
return $this->get('/transaction/' . $hash);
return $this->get('transaction/' . $hash);
}

/**
Expand All @@ -194,7 +194,7 @@ public function getTransaction(string $hash): \stdClass
*/
public function getBlock(int $height): \stdClass
{
return $this->get('/block/' . $height);
return $this->get('block/' . $height);
}

/**
Expand All @@ -207,7 +207,7 @@ public function getBlock(int $height): \stdClass
*/
public function getEvents(int $height): \stdClass
{
return $this->get('/events/' . $height);
return $this->get('events/' . $height);
}

/**
Expand All @@ -231,7 +231,7 @@ public function getCandidates(?int $height = null, ?bool $includeStakes = false,
$params['height'] = $height;
}

return $this->get('/candidates', $params);
return $this->get('candidates', $params);
}

/**
Expand All @@ -250,7 +250,7 @@ public function getCoinInfo(string $symbol, ?int $height = null): \stdClass
$params['height'] = $height;
}

return $this->get('/coin_info/' . $symbol, $params ?? null);
return $this->get('coin_info/' . $symbol, $params ?? null);
}

/**
Expand Down Expand Up @@ -280,7 +280,7 @@ public function estimateCoinSell(
$params['height'] = $height;
}

return $this->get('/estimate_coin_sell', $params);
return $this->get('estimate_coin_sell', $params);
}

/**
Expand Down Expand Up @@ -309,7 +309,7 @@ public function estimateCoinSellAll(
$params['height'] = $height;
}

return $this->get('/estimate_coin_sell_all', $params);
return $this->get('estimate_coin_sell_all', $params);
}

/**
Expand Down Expand Up @@ -339,7 +339,7 @@ public function estimateCoinBuy(
$params['height'] = $height;
}

return $this->get('/estimate_coin_buy', $params);
return $this->get('estimate_coin_buy', $params);
}

/**
Expand All @@ -358,7 +358,7 @@ public function estimateTxCommission(string $tx, ?int $height = null): \stdClass
$params['height'] = $height;
}

return $this->get('/estimate_tx_commission', $params);
return $this->get('estimate_tx_commission', $params);
}

/**
Expand All @@ -384,7 +384,7 @@ public function getTransactions(string $query, ?int $page = null, ?int $perPage
}


return $this->get('/transactions', $params);
return $this->get('transactions', $params);
}

/**
Expand All @@ -397,7 +397,7 @@ public function getTransactions(string $query, ?int $page = null, ?int $perPage
*/
public function getUnconfirmedTxs(?int $limit = null): \stdClass
{
return $this->get('/unconfirmed_txs', ($limit ? ['limit' => $limit] : null));
return $this->get('unconfirmed_txs', ($limit ? ['limit' => $limit] : null));
}

/**
Expand All @@ -410,7 +410,7 @@ public function getUnconfirmedTxs(?int $limit = null): \stdClass
*/
public function getMaxGasPrice(?int $height = null): \stdClass
{
return $this->get('/max_gas', ($height ? ['height' => $height] : null));
return $this->get('max_gas', ($height ? ['height' => $height] : null));
}

/**
Expand All @@ -422,7 +422,7 @@ public function getMaxGasPrice(?int $height = null): \stdClass
*/
public function getMinGasPrice(): \stdClass
{
return $this->get('/min_gas_price');
return $this->get('min_gas_price');
}

/**
Expand All @@ -436,7 +436,7 @@ public function getMinGasPrice(): \stdClass
*/
public function getMissedBlocks(string $pubKey, ?int $height = null): \stdClass
{
return $this->get('/missed_blocks/' . $pubKey, ($height ? ['height' => $height] : null));
return $this->get('missed_blocks/' . $pubKey, ($height ? ['height' => $height] : null));
}

/**
Expand All @@ -447,7 +447,7 @@ public function getMissedBlocks(string $pubKey, ?int $height = null): \stdClass
*/
public function getGenesis(): \stdClass
{
return $this->get('/genesis');
return $this->get('genesis');
}

/**
Expand All @@ -458,7 +458,7 @@ public function getGenesis(): \stdClass
*/
public function getNetworkInfo(): \stdClass
{
return $this->get('/net_info');
return $this->get('net_info');
}

/**
Expand All @@ -469,7 +469,7 @@ public function getNetworkInfo(): \stdClass
*/
public function getCoinInfoByID(int $id, ?int $height = null):\ stdClass
{
return $this->get('/coin_info_by_id/' . $id, ($height ? ['height' => $height] : null));
return $this->get('coin_info_by_id/' . $id, ($height ? ['height' => $height] : null));
}

/**
Expand All @@ -479,7 +479,7 @@ public function getCoinInfoByID(int $id, ?int $height = null):\ stdClass
*/
public function getHalts(?int $height = null): \stdClass
{
return $this->get('/halts', ($height ? ['height' => $height] : null));
return $this->get('halts', ($height ? ['height' => $height] : null));
}

/**
Expand All @@ -499,7 +499,7 @@ public function getFrozen(?string $address = null, ?string $coin = null): \stdCl
$params['coin'] = $coin;
}

return $this->get('/frozen', $params);
return $this->get('frozen', $params);
}

/**
Expand All @@ -510,6 +510,6 @@ public function getFrozen(?string $address = null, ?string $coin = null): \stdCl
*/
public function getWaitlist(string $publicKey, string $address, ?int $height = null): \stdClass
{
return $this->get('/waitlist/' . $publicKey . '/' . $address, ($height ? ['height' => $height] : null));
return $this->get('waitlist/' . $publicKey . '/' . $address, ($height ? ['height' => $height] : null));
}
}

0 comments on commit 81ab037

Please sign in to comment.