Skip to content

Dev fix interface#2

Open
henriqueaklein wants to merge 5 commits into
developfrom
dev_fix_interface
Open

Dev fix interface#2
henriqueaklein wants to merge 5 commits into
developfrom
dev_fix_interface

Conversation

@henriqueaklein

Copy link
Copy Markdown

SDK Wrapper Foundation
P/Invoke layer rewritten (GeniusSDKWrapper.cs)

  • Added 6 new DllImport declarations: GeniusSDKInit, GeniusSDKInitWithKey, GeniusSDKInitWithMnemonic, GeniusSDKGetInitializationStatus, GeniusSDKFree, GeniusSDKLoadLogConfig
  • Added 3 new struct types: GeniusStatusInfo, GeniusMnemonic, GeniusMnemonicAndStatus
  • Removed 3 deprecated init DllImports (old multi-param GeniusSDKInit, GeniusSDKInitSecure, GeniusSDKInitMinimal)
    Init coroutine rewritten
  • Init deferred — Awake no longer auto-inits; triggered via BeginInitialize(basePath) or BeginInitializeWithMnemonic(basePath, mnemonic)
  • Async readiness polling via GetInitializationStatus() — isReady set only at 100%
  • Config generation restructured: added BuildSgnsConfigJson() (is_processor, node_type, authorized_full_node, bootstrap_fullnodes), simplified BuildNetworkConfigJson() (port_seed: 42001, auto_dht: true + preserved pubsub/bootstraps/upnp fields), removed dev_config.json disk write (now inline), removed RNGCryptoServiceProvider key generation
  • BuildCrdtConfigJson and BuildLogConfigJson preserved unchanged

Native binaries

  • macOS bundle replaced with Release build (131 MB, x86_64+arm64) + 67 MB dSYM
  • git-lfs configured for large file tracking
  • iOS, Android, Linux, Windows pending builds
    Phase 2 — Account Wrappers
    4 account management P/Invoke declarations added
  • GeniusSDKGetAvailableAccounts() → public GetAvailableAccounts()
  • GeniusSDKAddAccountWithMnemonic(mnemonic) → public AddAccountWithMnemonic()
  • GeniusSDKSelectGeniusAccount(publicAddress) → public SelectGeniusAccount()
  • GeniusSDKSetPayoutAddress(publicAddress) → public SetPayoutAddress()
  • Public GetInitializationStatus() and Free(IntPtr) wrappers exposed

All existing public API preserved (GetBalance, GetGNUSPrice, PayDev, GetProcessingStatus, TokenID, Transfer, Mint, etc.)
Phase 3 — UI Scripts (code only, unwired)

  • GeniusSDKConnectScreen.cs — startup popup: Skip (basic init) vs Connect (mnemonic), DOTween + EscapeManager
  • GeniusSDKWalletPanel.cs — Settings popup section: address display, set payout, add account from mnemonic
  • SettingManager.cs — integrated wallet panel show/hide
  • WIRING-SPEC.md — step-by-step for Unity dev to wire the UI

What's not included

  • Unity scene wiring
  • iOS / Android / Linux / Windows native binaries
  • UnityGeniusSDK sibling synced with same code on dev_fix_interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant