Skip to main content

Actions

Open Modal

// Open default view
AppKit.OpenModal();

// Open network selection view
AppKit.OpenModal(ViewType.NetworkSearch);

// Open account view
AppKit.OpenModal(ViewType.Account);

Close Modal

AppKit.CloseModal();

Chain Actions

Set active chain

Chain newChain = ChainConstants.Chains.Ethereum;
await AppKit.NetworkController.ChangeActiveChainAsync(newChain);

Get active chain

Chain activeChain = AppKit.NetworkController.ActiveChain;

Account Actions

Get active account

// Get active account in CAIP-10 format
Account account = AppKit.GetAccount();

Debug.Log(account.Address); // e.g. '0x12345...'
Debug.Log(account.ChainId); // e.g. 'eip155:1'
Debug.Log(account.AccountId); // e.g. 'eip155:1:0x12345...'

Disconnect

await AppKit.DisconnectAsync();