All of the core logic is managed by the DynamicSDKManager.
To use it, either drag the DynamicSDKManager Prefab (located under /Runtime/Prefabs in the package) into your scene, or create an empty GameObject and add the DynamicSDKManager script manually.
Although the SDK is initialized automatically in Awake(), it is recommended that you explicitly call: DynamicSDKManager.Instance.Initialize(); If the SDK is already initialized, a warning message will be displayed instead of re-initializing.

Interaction with the SDK

The SDK communicates by sending messages to the WebView and then subscribing to messages sent back from the WebView.
The general flow is:
  1. You subscribe to an event representing an action of the SDK.
  2. You trigger an action by calling a method.

Connecting and Disconnecting the Wallet

To connect a wallet, call: DynamicSDKManager.Instance.ConnectWallet(); To disconnect the wallet, call: DynamicSDKManager.Instance.DisconnectWallet(); Before calling these, ensure that you subscribe to the following events:
  • DynamicSDKManager.OnWalletConnected — triggered after a successful wallet connection. Provides the wallet address as a string.
  • DynamicSDKManager.OnWalletDisconnected — triggered when the wallet is disconnected. This event provides no parameters.
You can find the full list of SDK events in the Events Overview.

Signing Messages

To sign a message, call: DynamicSDKManager.Instance.SignMessage(message, isSuiTransaction);
  • message — the string you want to sign
  • isSuiTransaction (optional) — set this to true if signing a base64-encoded SUI transaction.
    In SUI, signatures differ when signing plain strings versus base64-encoded transactions.
To receive the signature, subscribe to:
  • DynamicSDKManager.OnMessageSigned — returns the signature string for the provided message.

Sending Transactions

Currently, the SDK supports sending payable transactions for both the EVM and SUI ecosystems. To send a transaction, call: DynamicSDKManager.Instance.SendTransaction(to, value, data, network);
  • to — recipient address
  • value — amount of value to send
  • data (optional) — additional data for the transaction
  • network (optional) — choose mainnet or testnet. Defaults to mainnet.
To listen for completed transactions, subscribe to:
  • DynamicSDKManager.OnTransactionReceived — triggered when the transaction has been executed.
    It provides a TransactionReceipt object with the following fields:
    • TransactionHash — hash of the transaction
    • TransactionSignature — signature of the transaction (SUI only)
    • TransactionBytes — base64 representation of the transaction (SUI only)

Opening the Profile

To open the Dynamic Widget (where the user can view their private key, balances, network selection, and more), call: DynamicSDKManager.Instance.OpenProfile();