Getting Started

In this guide we will show you prerequisite for Blocto Solana SDK.

A sample app is available at: https://github.com/blocto/blocto-unity-sdk

Requirements

  • .Net Core version >= 2.1

  • iOS version >= 13

  • Android version >= 7.1

Release Page

Portto.Blocto.Core and Portto.Blocto.Solana is available through github. You can download at github release page

Import .unitypackage

You can import Standard Asset Packages, which are asset collections pre-made and supplied with Unity, and Custom Packages, which are made by people using Unity. More description at unity document.

Choose Assets > Import Package > to import both types of package.

Wallet Provider

  1. Register app id (bloctoSDKAppId) in order to init BloctoWalletProvider

  2. Create BloctoWalletProvider instance.

using Blocto.Sdk.Core.Extension;
using Blocto.Sdk.Core.Utility;
using Blocto.Sdk.Solana;
        
var webRequestUtility = gameObject.AddComponent<WebRequestUtility>();
var bloctoWalletProvider = BloctoWalletProvider.CreateBloctoWalletProvider(
                                                    gameObject: gameObject,
                                                    env: EnvEnum.Devnet,
                                                    bloctoAppIdentifier:Guid.Parse("{your app id}")
                                                );

Solana Client

The Unity SDK integrates with Solnet and provides the solana client to interact with the Solana blockchain, and you can access account data through the Solana client. For more information on the solana client, we recommend checking out solnet

using Blocto.Sdk.Core.Extension;
using Blocto.Sdk.Core.Utility;
using Blocto.Sdk.Solana;
        
var account = bloctoWalletProvider.SolanaClient.GetAccountInfo({your account address});

Last updated

Change request #370: docs: add web sdk v0.5.0 ERC-4337 docs