Download the PHP package skopa/ethereum-rpc-wallet without Composer

On this page you can find all versions of the php package skopa/ethereum-rpc-wallet. 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 ethereum-rpc-wallet

Ethereum JSONRPC Wallet

This package provide quick and simple interface to interact with your deployed contracts. For now realized full compatibility with ERC20 tokens. Also you can interact with any other your contract by using ABI code.

Not all responses are realized for now! Only static types: string, address, uint

THIS PACKAGE IS PROVIDE "AS IS"

Be careful that your case of using are fully tested!

Examples

Only few steps to start interact with your contract. Before this your contract must be successfully deployed on the blockchain network.

1.Create your contract class:

For creating and interacting with contract you need to extend base class: \Skopa\EthereumWallet\Contracts\ERC20TokenContract

And define next methods:

2.Connect to JSON RPC Geth server:

Setup the connection to your Geth server. How to do it you can find at https://github.com/ethereum/go-ethereum/wiki.

First parameter is server address with port. Second is chain id.

3. Create wallet instance:

Using public address:

If in future you will need to do signed actions you can just 'unlock' your wallet. If private key will from other wallet you will receive exception.

Using private key:

In this case wallet will unlocked from start.

4.Interact with contract:

To interact with you ERC20 contract just pass previously created instance of ExampleContract to wallet method as on example:

The $contractManager is the instance of \Skopa\EthereumWallet\ERC20ContractManager that provide to you methods of interactions:

Each method has documentation so you can investigate it by you-self.

4.1 Interaction with custom contract:

You also can use this lib to interact with your custom contacts. You can create instance of your contract by extending class of Skopa\EthereumWallet\Contracts\Contract. In this case you can create you own contract non compatible with ERC20 and interact with it or event expand ERC20 contract with custom tokens. But you will must provide ABI code.

Get contract manager and interact with it:

The Skopa\EthereumWallet\ContractManager returned by customContract method has two methods to interact with contract:

Of course you can extend ERC20 contract too:

And interact with it in same way:

5. Transaction:

To do some transactions you just need to create transaction instance with recipient and amount. And send it by transfer method of $contractManager. This method will the return transaction hash.

Reminder: Transaction are not immediate action (by blockchain spec).

6. Get transaction data:

You can get next data of transaction of your ERC20 contracts:

To get this data you need call receipt on wallet instance:

7. Additionally

Also lib contains some helpers like converters from decimal to hex and other. You can to get acquainted with it in source code.

Summary

This lib is not finished and can contain some bugs and exceptions. So it is distributed 'AS IS'.

To say thanks send some coins here: 0xfd9c54573dd27f23d3c8df154bd550df4c44bd8a


All versions of ethereum-rpc-wallet with dependencies

PHP Build Version
Package Version
Requires php Version >7.1.0
ext-json Version *
ext-mbstring Version *
web3p/ethereum-util Version ^0.1.1
web3p/ethereum-tx Version ^0.3.4
guzzlehttp/guzzle Version ^6.4
brick/math Version ^0.8.8
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 skopa/ethereum-rpc-wallet contains the following files

Loading the files please wait ....