Methods

The following shows the methods provided by the Wepin Unity SDK.

openWidget

The openWidget method shows the widget window.

Example

_wepin.openWidget();

closeWidget

The closeWidget method closes the widget window.

Example

_wepin.closeWidget();

getAccounts

The getAccounts method returns user accounts of the networks available in the app. getAccounts is a method available after widget login.

AccountList accountList = _wepin.GetAccounts();

<WepinSDK.Types.AccountList>

It is the returned value of the getAccounts. If a user is logged in, it returns a list of account.

  • account <WepinSDK.Types.Accounts>

    • address <string> The account address

    • network <string>

      The blockchain network of the account. The name of each network can be found below.

Example

[
  {
    address: '0x0000001111112222223333334444445555556666',
    network: 'Ethereum',
  },
]

finalize

The finalize() method finalizes the Wepin SDK.

Example

_wepin.finalize();

Last updated