Laravel Hashgraph API, create NFTs, permissioned marketplaces, or create a foundational L2 with base consensus.
Trust backed by Hedera Hashgraph using your own serverless REST client by Trust Enterprises.
The project manages any trust events and consensus responses, it is a full solution for managing webhook functionality after a client has received consensus.
We're open to ongoing financial support to help with the continuation of the development of these libraries and projects and help for integration for your current SaaS projects, if you are interested in sponsoring/working with us please get in contact.
You can install the package via composer:
composer require trustenterprises/hashgraph
You can publish and run the migrations with:
php artisan vendor:publish --provider="Trustenterprises\LaravelHashgraph\LaravelHashgraphServiceProvider" --tag="migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --provider="Trustenterprises\LaravelHashgraph\LaravelHashgraphServiceProvider" --tag="config"
This is the contents of the published config file:
<?php
return [
/***
* The URL of your serverless hashgraph client that has been configured through the serverless
* provider, likely to be vercel.
**/
'client_url' => env('HASHGRAPH_NODE_URL'),
/***
* The generated secret key that you have set for your serverless hashgraph client.
**/
'secret_key' => env('HASHGRAPH_SECRET_KEY'),
/***
* The webhook URL that can be configured to receive message events from your Serverless REST API.
**/
'webhook_route' => env('HASHGRAPH_WEBHOOK_ROUTE', '/hashgraph'),
];
This is a Laravel library and introduces a migration, listenable events and a new webhook route.
Set the WEBHOOK_URL in your serverless client to domain.com/hashgraph where domain is your URL. Read more about our usage of webhooks.
For local development you can use ngrok to expose your local server.
// Your Imports
use Trustenterprises\LaravelHashgraph\LaravelHashgraph;
use Trustenterprises\LaravelHashgraph\Models\ConsensusMessage;
// Code
$message = new ConsensusMessage('This is an event you wish to store');
$message->setReference('MattSmithies'); // optional
LaravelHashgraph::withTopic('Trust Enterprises')->sendMessage($message);
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The Apache 2.0 License. Please see License File for more information.