PHPackages                             mclever/larasui-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. mclever/larasui-sdk

ActiveLibrary[API Development](/categories/api)

mclever/larasui-sdk
===================

A Laravel SDK for interacting with the SUI blockchain.

v1.0.10(1y ago)112MITPHPPHP &gt;=8.0

Since Mar 1Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mclever7/larasui-sdk)[ Packagist](https://packagist.org/packages/mclever/larasui-sdk)[ RSS](/packages/mclever-larasui-sdk/feed)WikiDiscussions main Synced 1mo ago

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

Laravel SDK for SUI MOVE Blockchain (`mclever/larasui-sdk`)
===========================================================

[](#laravel-sdk-for-sui-move-blockchain-mcleverlarasui-sdk)

A comprehensive, Laravel-friendly SDK for interacting with the Sui blockchain using Move smart contracts. Built for developers to seamlessly integrate Sui’s features—token creation, NFT minting, staking, transaction batching, and more—into their Laravel applications.

[![License](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667) [![Latest Version on Packagist](https://camo.githubusercontent.com/1eff9440fe83d0f2efba4b25d230c70a1b5ed8fb2a1d4cabbb716ce86dc47268/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d636c657665722f6c6172617375692d73646b2e737667)](https://camo.githubusercontent.com/1eff9440fe83d0f2efba4b25d230c70a1b5ed8fb2a1d4cabbb716ce86dc47268/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d636c657665722f6c6172617375692d73646b2e737667)

Requirements
------------

[](#requirements)

- PHP: ^8.0
- Laravel: ^10.0
- Frontend wallet integration (e.g., @mysten/sui.js) for signing/executing transactions.

---

Table of Contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Configuration](#configuration)
3. [Usage](#usage)
    - [Connecting to a Wallet](#connecting-to-a-wallet)
    - [Fetching Balances](#fetching-balances)
    - [Creating Tokens](#creating-tokens)
    - [Creating NFTs](#creating-nfts)
    - [Executing Move Calls](#executing-move-calls)
    - [Transferring Assets](#transferring-assets)
    - [Staking SUI](#staking-sui)
    - [Fetching Transaction Details](#fetching-transaction-details)
    - [Fetching Events](#fetching-events)
4. [API Reference](#api-reference)
5. [Contributing](#contributing)
6. [License](#license)

---

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require mclever/larasui-sdk
```

Publish the configuration file:

```
php artisan vendor:publish --tag="config"
```

This will create a `sui.php` configuration file in your `config` directory.

---

Configuration
-------------

[](#configuration)

Update the `config/sui.php` file with your SUI RPC URL:

```
return [
    'rpc_url' => env('SUI_RPC_URL', 'https://fullnode.devnet.sui.io:443'),
];
```

You can also set the `SUI_RPC_URL` in your `.env` file:

```
SUI_RPC_URL=https://fullnode.devnet.sui.io:443
```

---

Usage
-----

[](#usage)

### Connecting to a Wallet

[](#connecting-to-a-wallet)

To connect to a wallet, use the `connectWallet` method. This method prepares the wallet connection, but the actual connection must be completed by the frontend (e.g., using `@mysten/sui.js`).

```
use Mclever\LarasuiSdk\Facades\Sui;

$walletAddress = Sui::connectWallet();
```

### Fetching Balances

[](#fetching-balances)

Fetch the balance of an address for a specific coin type (default is SUI):

```
$balance = Sui::getBalance('0xYourAddress');
echo "Balance: {$balance} SUI";
```

### Creating Tokens

[](#creating-tokens)

Create a new fungible token:

```
$txDigest = Sui::createToken(
    'MyToken',
    'MTK',
    6, // Decimals
    '0xYourAddress',
    1000000, // Initial supply
    10000 // Gas budget
);
echo "Token creation transaction digest: {$txDigest}";
```

### Creating NFTs

[](#creating-nfts)

Create a new NFT:

```
$txDigest = Sui::createNFT(
    'MyNFT',
    'A unique NFT',
    'https://example.com/nft-metadata.json',
    '0xYourAddress',
    10000 // Gas budget
);
echo "NFT creation transaction digest: {$txDigest}";
```

### Executing Move Calls

[](#executing-move-calls)

Execute a Move call:

```
$txDigest = Sui::executeMoveCall(
    '0xPackageId',
    'module_name',
    'function_name',
    [], // Type arguments
    ['arg1', 'arg2'], // Function arguments
    '0xYourAddress',
    10000 // Gas budget
);
echo "Move call transaction digest: {$txDigest}";
```

### Transferring Assets

[](#transferring-assets)

Transfer coins or objects to another address:

```
$txDigest = Sui::transfer(
    '0xYourAddress',
    '0xRecipientAddress',
    '0xObjectId',
    10000 // Gas budget
);
echo "Transfer transaction digest: {$txDigest}";
```

### Staking SUI

[](#staking-sui)

Stake SUI to a validator:

```
$txDigest = Sui::stakeSui(
    '0xYourAddress',
    '0xValidatorAddress',
    '0xCoinId',
    1000000000, // Amount to stake
    10000 // Gas budget
);
echo "Staking transaction digest: {$txDigest}";
```

### Fetching Transaction Details

[](#fetching-transaction-details)

Get details for a transaction by its digest:

```
$transaction = Sui::getTransaction('0xTransactionDigest');
print_r($transaction);
```

### Fetching Events

[](#fetching-events)

Fetch recent events of a specific type:

```
$events = Sui::getEvents('0xPackage::module::Event', 10);
print_r($events);
```

---

API Reference
-------------

[](#api-reference)

### `SuiClient` Methods

[](#suiclient-methods)

- **`connectWallet()`**: Prepares wallet connection.
- **`getBalance(string $address, ?string $coinType = '0x2::sui::SUI')`**: Fetches the balance of an address.
- **`createToken(string $name, string $symbol, int $decimals, string $sender, int $initialSupply, int $gasBudget = 10000)`**: Creates a new fungible token.
- **`createNFT(string $name, string $description, string $uri, string $sender, int $gasBudget = 10000)`**: Creates a new NFT.
- **`executeMoveCall(string $packageId, string $module, string $function, array $typeArgs, array $args, string $sender, ?int $gasBudget = null)`**: Executes a Move call.
- **`transfer(string $sender, string $recipient, string $objectId, int $gasBudget = 10000)`**: Transfers coins or objects.
- **`stakeSui(string $sender, string $validatorAddress, string $coinId, int $amount, ?int $gasBudget = null)`**: Stakes SUI to a validator.
- **`getTransaction(string $txDigest)`**: Fetches transaction details.
- **`getEvents(string $eventType, int $limit = 10)`**: Fetches recent events.
- **`getCoinMetadata(string $coinType)`**: Fetches metadata for a coin type.

For a full list of methods, refer to the [SuiClient class](#suiclient-class).

---

Contributing
------------

[](#contributing)

Contributions are welcome! Please follow these steps:

1. Fork the repository.
2. Create a new branch for your feature or bugfix.
3. Submit a pull request.

---

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

---

Acknowledgements
----------------

[](#acknowledgements)

Built by [Mr clever](https://x.com/mr_clever4) with for the Sui and Laravel communities.

---

Support
-------

[](#support)

For questions or issues, please open an issue on [GitHub](https://github.com/mclever7/larasui-sdk/issues).

---

Happy coding! 🚀

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance46

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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 ~0 days

Total

2

Last Release

434d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/096841a43936e35d7aa66ff4e3d513f1ffa1e133c51f231e02897d9619b861f5?d=identicon)[mclever](/maintainers/mclever)

---

Top Contributors

[![mclever7](https://avatars.githubusercontent.com/u/20617737?v=4)](https://github.com/mclever7 "mclever7 (8 commits)")

### Embed Badge

![Health badge](/badges/mclever-larasui-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/mclever-larasui-sdk/health.svg)](https://phpackages.com/packages/mclever-larasui-sdk)
```

###  Alternatives

[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)[mll-lab/laravel-graphiql

Easily integrate GraphiQL into your Laravel project

683.2M9](/packages/mll-lab-laravel-graphiql)[spatie/laravel-route-discovery

Auto register routes using PHP attributes

23645.0k2](/packages/spatie-laravel-route-discovery)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[didww/didww-api-3-php-sdk

PHP SDK for DIDWW API 3

1218.2k](/packages/didww-didww-api-3-php-sdk)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

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