PHP code example of howrareis / helius-php-sdk
1. Go to this page and download the library: Download howrareis/helius-php-sdk library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
howrareis / helius-php-sdk example snippets
$webhook_data = [
'webhookURL' => 'https://example.com/webhook',
'accountAddresses' => [
Addresses::TENSOR,
'4B4a93ekt1fmXSVkTrULaxVFHkmME82TUi5Cyc5aF7K',
],
'transactionTypes' => [
TransactionTypes::NFT_LISTING,
TransactionTypes::NFT_CANCEL_LISTING,
],
'webhookType' => WebhookType::ENHANCED,
'authHeader' => 'someouthkey',
];
$webhook = $helius->createWebhook($webhook_data);
$webhooks = $helius->getAllWebhooks();
$webhook = $helius->getWebhookById('11111111-1111-1111-1111-111111111111'); // replace 11111111-1111-1111-1111-111111111111 with your webhook id
$update = [
'transactionTypes' => [
TransactionTypes::NFT_MINT,
TransactionTypes::NFT_BID,
],
];
$webhook = $helius->editWebhook($webhook_id, $update);
$webhook = $helius->appendAddressesToWebhook($webhook_id, [Addresses::HYPERSPACE]);
$helius->deleteWebhook($webhook_id);
$payload = [
'webhookURL' => 'https://example.com/webhook',
'transactionTypes' => [
TransactionTypes::NFT_SALE
],
'webhookType' => WebhookType::ENHANCED,
'authHeader' => 'someouthkey',
];
$webhook = $helius->createCollectionWebhook(Collections::ABC, $webhook_rules);
$mintlist = $helius->getMintlist(Collections::ABC);
$request = [
'verifiedCollectionAddresses' => ['SMBH3wF6baUj6JWtzYvqcKuj2XCKWDqQxzspY12xPND'],
];
$mintlist = $helius->getMintlist($request, true);
$mintlist = $helius->getMintlistByCollectionAddress($colllection_addrress);
$mintlist = $helius->getMintlistByCreatorAddress($creator_address, true);
$mintlist = $helius->getMintlistFromNft($nft_mint, true);
$fingerprints = $helius->getNftFingerprints($mint_hashes);
$active_listings = $helius->getNftFingerprints($mint_hashes, 'activeListings');
composer