Download the PHP package minter/minter-php-sdk without Composer

On this page you can find all versions of the php package minter/minter-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package minter-php-sdk

About

This is a pure PHP SDK for working with Minter blockchain

Installing

Using MinterAPI

You can get all valid responses and full documentation at Minter Node Api

Create MinterAPI instance

getBalance

Returns coins list, balance and transaction count (for nonce) of an address.

getBalance(string $minterAddress, ?int $height = null): \stdClass

Example

getNonce

Returns next transaction number (nonce) of an address.

getNonce(string $minterAddress): int

Example

send

Returns the result of sending signed tx.

:warning: To ensure that transaction was successfully committed to the blockchain, you need to find the transaction by the hash and ensure that the status code equals to 0.

send(string $tx): \stdClass

Example

getAddresses

Returns addresses balances.

getAddresses(array $addresses, ?int $height = null): \stdClass

getStatus

Returns node status info.

getStatus(): \stdClass

getValidators

Returns list of active validators.

getValidators(?int $height = null, ?int $page = 1, ?int $perPage = null): \stdClass

estimateCoinBuy

Return estimate of buy coin transaction.

estimateCoinBuy(string $coinToSell, string $valueToBuy, string $coinToBuy, ?int $height = null, string $swapFrom): \stdClass

estimateCoinSell

Return estimate of sell coin transaction.

estimateCoinSell(string $coinToSell, string $valueToSell, string $coinToBuy, ?int $height = null, string $swapFrom): \stdClass

estimateCoinSellAll

Return estimate of sell coin all transaction.

estimateCoinSellAll(string $coinToSell, string $valueToSell, string $coinToBuy, ?int $height = null, string $swapFrom): \stdClass

getCoinInfo

Returns information about coin. Note: this method does not return information about base coins (MNT and BIP).

getCoinInfo(string $coin, ?int $height = null): \stdClass

getBlock

Returns block data at given height.

getBlock(int $height): \stdClass

getEvents

Returns events at given height.

getEvents(int $height): \stdClass

getTransaction

Returns transaction info.

getTransaction(string $hash): \stdClass

getCandidate

Returns candidate’s info by provided public_key. It will respond with 404 code if candidate is not found.

getCandidate(string $publicKey, ?int $height = null): \stdClass

getCandidates

Returns list of candidates.

$height is optional parameter.

getCandidates(?int $height = null, ?bool $includeStakes = false): \stdClass

estimateTxCommission

Returns estimate of transaction.

estimateTxCommission(string $tx, ?int $height = null): \stdClass

getTransactions

Returns transactions by query.

getTransactions(string $query, ?int $page = null, ?int $perPage = null): \stdClass

getUnconfirmedTxs

Returns unconfirmed transactions.

getUnconfirmedTxs(?int $limit = null): \stdClass

getMaxGasPrice

Returns current max gas price.

getMaxGasPrice(?int $height = null): \stdClass

getMinGasPrice

Returns current min gas price.

getMinGasPrice(): \stdClass

getMissedBlocks

Returns missed blocks by validator public key.

getMissedBlocks(string $pubKey, ?int $height = null): \stdClass

getGenesis

Returns network genesis.

getGenesis(): \stdClass

getNetworkInfo

Returns node network information.

getNetworkInfo(): \stdClass

getWaitlist

Returns waitlisted stakes by address

getWaitlist(string $address, ?string $publicKey = null, ?int $height = null): \stdClass

getWaitlist

Returns waitlisted stakes by address

getWaitlist(string $address, ?string $publicKey = null, ?int $height = null): \stdClass

getPriceCommissions

Returns the list of the commissions that are set up on the Minter Network

getPriceCommissions(?int $height = null): \stdClass

getPriceVotes

Returns the list of validators' votes for changing commissions on the network

getPriceVotes(int $height): \stdClass

getSwapPool

Returns entire liquidity volume of the swap pool

getSwapPool(string $coin0, string $coin1, ?int $height = null): \stdClass

getSwapPoolProvider

Returns liquidity volume of the swap pool provided by specified address

getSwapPoolProvider(string $coin0, string $coin1, string $provider, ?int $height = null): \stdClass

getLimitOrders

Returns list of limit orders by ids

getLimitOrders(array $ids, ?int $height = null): \stdClass

getLimitOrder

Returns limit order details by id

getLimitOrder(int $limitOrderId, ?int $height = null): \stdClass

getLimitOrdersByCoins

Returns limit orders related to sell and buy coins

getLimitOrdersByCoins(string $sellCoin, string $buyCoin, int $limit = null, ?int $height = null): \stdClass

Error handling

Example of how you can handle errors and get the response body.

Using MinterSDK

Sign transaction

Returns a signed tx.

Example

At all type of transactions you can also set optional fields: gas price, gas coin, payload, serviceData, chain id

Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example

Sign transaction with multisignatures

Returns a signed tx.

Example
Example
Example

Get fee of transaction

Decode transaction

Returns an array with transaction data.

Example

Create Minter Check

Example

Minter Wallet

Example

Minter Link

Example

Tests

To run unit tests:


All versions of minter-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3|^8.0
ext-bcmath Version *
ext-json Version *
ext-gmp Version *
kornrunner/keccak Version ^1.0
guzzlehttp/guzzle Version ^6.3|^7.3
minter/minter-php-bip-44 Version ^1.2
bitwasp/bitcoin-lib Version ^1.0
simplito/elliptic-php Version ^1.0
minter/php-rlp Version ^1.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package minter/minter-php-sdk contains the following files

Loading the files please wait ....