Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blockfrost/blockfrost-php
PHP SDK for the Blockfrost.io API
https://github.com/blockfrost/blockfrost-php
api blockfrost cardano php sdk
Last synced: 17 days ago
JSON representation
PHP SDK for the Blockfrost.io API
- Host: GitHub
- URL: https://github.com/blockfrost/blockfrost-php
- Owner: blockfrost
- License: apache-2.0
- Created: 2022-05-30T12:34:55.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-30T14:24:07.000Z (almost 2 years ago)
- Last Synced: 2024-11-30T20:51:51.525Z (22 days ago)
- Topics: api, blockfrost, cardano, php, sdk
- Language: PHP
- Homepage:
- Size: 2.18 MB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build status](https://github.com/blockfrost/blockfrost-php/actions/workflows/php.yml/badge.svg)](https://github.com/blockfrost/blockfrost-php/actions/workflows/php.yml)
# blockfrost-php
PHP SDK for Blockfrost.io API.
Getting started •
Installation •
Usage
## Getting started
To use this SDK, you first need login into to [blockfrost.io](https://blockfrost.io) create your project to retrive your API token.
## Installation
### Composer
This SDK uses guzzlehttp for REST. [Composer](https://getcomposer.org/) is the preferred package manager to import this:
### composer.json
```json
{
"require" : {
"guzzlehttp/guzzle" : "^7.0"
},
"autoload" : {
"psr-4" : {
"Blockfrost\\" : "../blockfrost_api/"
}
},
"minimum-stability" : "dev",
"require-dev": {
"phpunit/phpunit": "^9.5"
}
}
``````console
$ php composer.phar update
```## Usage
Using the SDK is pretty straight-forward as you can see from the following example.
### Cardano
```php
getLatestBlock();echo $res->hash;
}catch(Exception $err)
{
echo $err->getMessage();
}?>
```