# Methods

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

## `openWidget`

The <mark style="color:blue;">`openWidget`</mark> method shows the widget window.

### Example

```csharp
_wepin.openWidget();
```

## `closeWidget`

The <mark style="color:blue;">`closeWidget`</mark> method closes the widget window.

### Example

```csharp
_wepin.closeWidget();
```

## `getAccounts`

The <mark style="color:blue;">`getAccounts`</mark> method returns user accounts of the networks available in the app. <mark style="color:blue;">`getAccounts`</mark> is a method available after widget login.

```csharp
AccountList accountList = _wepin.GetAccounts();
```

### \<WepinSDK.Types.AccountList>

It is the returned value of the <mark style="color:blue;">`getAccounts`</mark>. If a user is logged in, it returns a list of <mark style="color:blue;">`account`</mark>.

* **`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.

{% content-ref url="/pages/jNG611rZkq69C8zZKglh" %}
[Broken mention](broken://pages/jNG611rZkq69C8zZKglh)
{% endcontent-ref %}

### Example

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

## finalize

The <mark style="color:blue;">`finalize()`</mark> method finalizes the Wepin SDK.

### Example

```csharp
_wepin.finalize();
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wepin.io/en/deprecated/unity-sdk/method.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
