Download the PHP package psychicat/monero-php without Composer
On this page you can find all versions of the php package psychicat/monero-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download psychicat/monero-php
More information about psychicat/monero-php
Files in psychicat/monero-php
Package monero-php
Short Description A PHP library for the Monero simplewallet JSON-RPC interface.
License MIT
Homepage https://github.com/PsychicCat/monero-php
Informations about the package monero-php
Monero-PHP
A PHP library for the Monero simplewallet
JSON-RPC interface.
For more information about Monero, please visit https://getmonero.org/home.
If you found this useful, feel free to donate!
XMR: 47Vmj6BXSRPax69cVdqVP5APVLkcxxjjXdcP9fJWZdNc5mEpn3fXQY1CFmJDvyUXzj2Fy9XafvUgMbW91ZoqwqmQ6RjbVtp
Installation
Install the library using Composer.
composer require psychicat/monero-php
Create an Instance of the Wallet
Default hostname and port connects to http://127.0.0.1:18082.
To connect to an external IP or different port:
Wallet Methods
getBalance
Responds with the current balance and unlocked (spendable) balance of the wallet in atomic units. Divide by 1e12 to convert.
Example response:
getAddress
Responds with the Monero address of the wallet.
Example response:
transfer
Transfers Monero to a single recipient OR a group of recipients in a single transaction. Responds with the transaction hash of the payment.
Parameters:
options
- an array containingdestinations
(object OR array of objects),mixin
(int),unlock_time
(int),payment_id
(string). Onlydestinations
is required. Default mixin value is 4.
Example response:
transferSplit
Same as transfer()
, but can split into more than one transaction if necessary. Responds with a list of transaction hashes.
Additional property available for the options
array:
new_algorithm
-true
to use the new transaction construction algorithm. defaults tofalse
. (boolean)
Example response:
sweepDust
Sends all dust outputs back to the wallet, to make funds easier to spend and mix. Responds with a list of the corresponding transaction hashes.
Example response:
getPayments
Returns a list of incoming payments using a given payment ID.
Parameters:
paymentID
- the payment ID to scan wallet for included transactions (string)
getBulkPayments
Returns a list of incoming payments using a single payment ID or a list of payment IDs from a given height.
Parameters:
paymentIDs
- the payment ID or list of IDs to scan wallet for (array)minHeight
- the minimum block height to begin scanning from (example: 800000) (int)
incomingTransfers
Returns a list of incoming transfers to the wallet.
Parameters:
type
- accepts"all"
: all the transfers,"available"
: only transfers that are not yet spent, or"unavailable"
: only transfers which have been spent (string)
queryKey
Returns the wallet's spend key (mnemonic seed) or view private key.
Parameters:
type
- accepts"mnemonic"
: the mnemonic seed for restoring the wallet, or"view_key"
: the wallet's view key (string)
integratedAddress
Make and return a new integrated address from your wallet address and a given payment ID, or generate a random payment ID if none is given.
Parameters:
payment_id
- a 64 character hexadecimal string. If not provided, a random payment ID is automatically generated. (string, optional)
Example response:
splitIntegrated
Returns the standard address and payment ID corresponding for a given integrated address.
Parameters:
integrated_address
- an Monero integrated address (string)
Example response:
getHeight
Usage:
Returns the current block height of the daemon.
Example response:
stopWallet
Cleanly shuts down the current simplewallet process.