Download the PHP package arweave/arweave-sdk without Composer

On this page you can find all versions of the php package arweave/arweave-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 arweave-sdk

Arweave PHP SDK

This package allows us to interact with the Arweave network, we can use it to read and write transactions and data to the network.

Installation

We strongly recommend using composer for installation.

composer require arweave/arweave-sdk

Or add the following to your project composer.json file.

Quick Examples

Sending data to the network

Getting data from the network

Usage

Instantiation

Start by creating a Arweave object, this is the primary SDK class your application should use, it contains the public methods for creating, sending and getting transactions.

Provide any valid Arweave node hostname or IP address

Getting a Transaction

Once we have our Arweave object we can now get transactions from the network using a valid transaction ID.

For example:

The above will return the following Transaction object:

Getting data from a Transaction

There are two methods for getting data from a transaction, we can either:

This method returns the original and decoded data from a transaction. This is the simplest method and probably the one you'll need most often.

Alternatively, if we need the encoded data or need other transaction attributes we can do the following:

ArQL

Loading a Wallet

To load a wallet you need a Key file. Arweave uses JSON Web Keys (JWK) as the key file format, a JWK is simply a JSON representation of a public/private key pair and they look something like this:

We first need to decode our JWK file to a PHP array, then we can simply pass that array into a new Wallet object.

You should treat your JWK as you would treat an API key or a password. You should never expose them or place them in any publicly accessible location and never commit them to any version control system, doing so will compromise your wallet and its contents.

This is just one suggested method of storing your JWK but there's no requirement that you store in as a JSON file, you could also store it in an environment variable, a database, a PHP file, or anywhere else. As long as it ends up as a PHP array it should work just fine.

Creating a Transaction

Transactions need to be signed for them to be accepted by the network, so this step requires a wallet.


All versions of arweave-sdk with dependencies

PHP Build Version
Package Version
Requires phpseclib/phpseclib Version ^2.0
php Version ^7.0
ext-curl Version *
ext-mbstring Version *
ext-gmp Version *
web-token/jwt-framework Version ^1.3
web-token/jwt-core Version ^1.3
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 arweave/arweave-sdk contains the following files

Loading the files please wait ....