Download the PHP package infinitysoftwareltd/walletlibrary without Composer
On this page you can find all versions of the php package infinitysoftwareltd/walletlibrary. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download infinitysoftwareltd/walletlibrary
More information about infinitysoftwareltd/walletlibrary
Files in infinitysoftwareltd/walletlibrary
Package walletlibrary
Short Description Custom Package for creating infi/hedge wallet
License MIT
Informations about the package walletlibrary
Wallet Library
Wallet library that handles on creating paper wallet that supports Infinity and Hedge coins.
Features
- Allows to generate paper wallet
- Allows to choose network
- Allows to sign a transaction
- Allows to send a transaction
- Allows to create webhooks
Installation
Usage
Networks
- Mainnet
- Testnet
- Devnet
Coins Blockchains
- infinity
- hedge
Generate wallet
Generating wallet have different networks which are Mainnet
, Devnet
and Testnet
.
Each networks has their own wallet prefix.
Add InfinitySolution\Wallet\Wallet
into your class
Testnet
To create wallet for this network. Add this into your class.
Invoke the Testnet
into wallet constructor.
Response:
Devnet
To create wallet for this network. Add this into your class.
Invoke the Devnet
into wallet constructor.
Response:
Mainnet
To create wallet for this network. Add this into your class.
Invoke the Mainnet
into wallet constructor.
Response:
Generate QRcode for the Costumers
Your exchange is probably generating QRcode wallet address for your costumers. The format expected by mobile App Infinity to reconize the network and the wallet is {network}:{address}
Example QRcode Data
for Blockchain Infinity
infi:GWHtg6SufVqKx539msjMoZZqa89g9Z4tg8
for Blockchain Hedge
edge:GWHtg6SufVqKx539msjMoZZqa89g9Z4tg8
Sign a transaction
To sign a transaction, you need to follow the data structure. It should be an array with fee, amount, passphrase and recipient. Example:
You can change the server and the network. We have listed the available servers and networks above.
Add InfinitySolution\Wallet\Transaction
into your class.
Testnet
For the Testnet
you need to set the network and server once you instantiate the Transaction
class.
Response:
Devnet
For the Devnet
you need to set the network and server once you instantiate the Transaction
class.
Response:
Mainnet
For the Mainnet
you need to set the network and server once you instantiate the Transaction
class.
Response:
Send the transaction into blockchain
Send transaction into node with custom peer.
Webhook
You can create webhook event, delete and update. You can setup your own protocol, IP address and port. Just follow these code once you instantiate the Webhook
event class.
First setup the webhook to your node
Example
Create Webhook Event
Follow the data structure to create an event
To create webhook event, invoke this into your class
And in your controller or PHP class, pass the array of events and it will return boolean
.
Create multiple conditions of webhook
You can make multiple conditions per webhook event by adding additional conditions in the array
Get all webhooks
You can get the list of your webhooks created.
If you have your own node server you can set that to get your latest weebhooks by doing this.
Example
Delete Webhook
You can delete your own webhook by using this code. If the deletion was successful it should return a boolean
.
Example
And if you have your own node, you can add your own protocol, IP and port by using this.
Example
Fees
You can get your own fees from your node. Add this into your php file or class.
You can also set your own protocol, peer, and URL fee by adding this command once you instantiate the new Fee();
class.
Example
Response
Peers
You can get your list of peers by invoking this into your class or php file.
You can set your own node by using this:
Example
Response