PHPackages                             symbol-blockchain-community/symbol-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. symbol-blockchain-community/symbol-sdk

ActiveLibrary[API Development](/categories/api)

symbol-blockchain-community/symbol-sdk
======================================

symbol sdk for php

v1.1.0(7mo ago)12611MITPHPPHP ^7.4 || ^8.0

Since Jul 3Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/symbol-blockchain-community/symbol-sdk-php)[ Packagist](https://packagist.org/packages/symbol-blockchain-community/symbol-sdk)[ RSS](/packages/symbol-blockchain-community-symbol-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (11)Used By (0)

Symbol-SDK
==========

[](#symbol-sdk)

php 用の symbol-sdk です、NEM は使えません。

models や sign, 他 crypto 関連のテストは行っていますが sdk 自体の動作テストは行っていません。自己責任でご利用ください。

SymbolCommunity 管理（有志）のよる管理です、管理者、コントリビューターは常時募集しています。

Install
-------

[](#install)

```
composer require symbol-blockchain-community/symbol-sdk

```

また、Transaction のアナウンス、REST API からのデータ取得には以下ライブラリがおすすめです。

```
composer require symbol-blockchain-community/symbol-rest-client

```

TransferTransaction
-------------------

[](#transfertransaction)

```
use SymbolRestClient\Api\TransactionRoutesApi;
use SymbolRestClient\Configuration;

use SymbolSdk\Facade\SymbolFacade;
use SymbolSdk\CryptoTypes\PrivateKey;
use SymbolSdk\Symbol\Models\TransferTransactionV1;
use SymbolSdk\Symbol\Models\UnresolvedMosaic;
use SymbolSdk\Symbol\Models\UnresolvedMosaicId;
use SymbolSdk\Symbol\Models\PublicKey;
use SymbolSdk\Symbol\Models\Amount;
use SymbolSdk\Symbol\Models\NetworkType;
use SymbolSdk\Symbol\Models\Timestamp;

$facade = new SymbolFacade('testnet');
$alice = $facade->createAccount(new PrivateKey('5DB8324E7EB83E7665D500B014283260EF312139034E86DFB7EE736503EA****'));
$bob = $facade->createPublicAccount(new PublicKey('4C4BD7F8E1E1AC61DB817089F9416A7EDC18339F06CDC851495B271533FAD13B'));

$transferTransaction = new TransferTransactionV1(
  network: new NetworkType(NetworkType::TESTNET),
  signerPublicKey: $alice->publicKey,
	deadline: new Timestamp($facade->now()->addHours(2)),
  recipientAddress: $bob->address,
  mosaics: [
    new UnresolvedMosaic(
      mosaicId: new UnresolvedMosaicId('0x72C0212E67A08BCE'),
      amount: new Amount(1)
    )
  ],
  message: "hello, symbol!"
);

$facade->setMaxFee($transferTransaction, 100);
$signature = $alice->signTransaction($transferTransaction);
$payload = $facade->attachSignature($transferTransaction, $signature);

$config = new Configuration();
$config->setHost('https://NODE_URL:3001');
$client = new GuzzleHttp\Client();
$apiInstance = new TransactionRoutesApi($client, $config);

try {
  $result = $apiInstance->announceTransaction($payload);
  print_r($result);
} catch (Exception $e) {
  echo 'Exception when calling TransactionRoutesApi->announceTransaction: ', $e->getMessage(), PHP_EOL;
}
```

AggregateCompleteTransaction
----------------------------

[](#aggregatecompletetransaction)

モザイク作成を例にします AggregateTransaction の Inner Transaction クラスは全て Embedded がつきます `MosaicDefinitionTransactionV1` -&gt; `EmbeddedMosaicDefinitionTransactionV1`また、Inner Transaction もネットワークタイプの設定が必要です。

```
$mosaicId = IdGenerator::generateMosaicId($alice->address);
$mosaicDefinitisonTransaction = new EmbeddedMosaicDefinitionTransactionV1(
  network: new NetworkType(NetworkType::TESTNET),
  signerPublicKey: $alice->publicKey,
  nonce: new MosaicNonce($mosaicId['nonce']),
  id: new MosaicId($mosaicId['id']),
  duration: new BlockDuration(0),
  divisibility: 2,
  flags: new MosaicFlags(MosaicFlags::TRANSFERABLE)
);
$mosaicSupplyChangeTransaction = new EmbeddedMosaicSupplyChangeTransactionV1(
  network: new NetworkType(NetworkType::TESTNET),
  signerPublicKey: $alice->publicKey,
  mosaicId: new UnresolvedMosaicId($mosaicId['id']),
  action: new MosaicSupplyChangeAction(MosaicSupplyChangeAction::INCREASE),
  delta: new Amount(10000)
);
$inner = [$mosaicDefinitisonTransaction, $mosaicSupplyChangeTransaction];
$merkleHash = SymbolFacade::hashEmbeddedTransactions($inner);

$aggTransaction = new AggregateCompleteTransactionV2(
  network: new NetworkType(NetworkType::TESTNET),
  signerPublicKey: $alice->publicKey,
  deadline: new Timestamp($facade->now()->addHours(2)->timestamp),
  transactions: $inner,
  transactionsHash: $merkleHash
);

$facade->setMaxFee($aggTransaction, 100);
$signature = $alice->signTransaction($aggTransaction);
$payload = $facade->attachSignature($aggTransaction, $signature);
try {
  $result = $apiInstance->announceTransaction($payload);
  print_r($result);
} catch (Exception $e) {
  echo 'Exception when calling TransactionRoutesApi->announceTransaction: ', $e->getMessage(), PHP_EOL;
}
```

その他 Transaction についてはまだドキュメントがありません。いずれ速習 Symbol for PHP を作成したいとは思っています。

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance62

Regular maintenance activity

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~49 days

Recently: every ~107 days

Total

10

Last Release

232d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/05035d7841e7d0b515a9821e50a67a924b9f114b04991e4b48e7f71fd94556aa?d=identicon)[toshi](/maintainers/toshi)

---

Top Contributors

[![0x070696E65](https://avatars.githubusercontent.com/u/11351493?v=4)](https://github.com/0x070696E65 "0x070696E65 (23 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/symbol-blockchain-community-symbol-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/symbol-blockchain-community-symbol-sdk/health.svg)](https://phpackages.com/packages/symbol-blockchain-community-symbol-sdk)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
