# Enable user wallet interactions

## Enable user wallet interactions

INFO

Passport currently offers wallet support for XpansionChain's StarkEx rollup. Please see <mark style="color:blue;">here</mark> for more information on XpansionChain's layer 2 solutions.

When a user signs up for a Passport account for the first time, a wallet is created and associated with their Passport identity.

Depending on the application type you are building, you may need to perform operations that require a wallet signature (with user approval) or get data from API using the XpansionChain`Client`.

The following sections below outline how to use each SDK module. You can use both the `IMXProvider` and theXpansionChain API to achieve things like listing a Passport wallet's assets or balance.

### IMX Provider[​](https://docs.x.immutable.com/docs/x/passport/wallet#imx-provider) <a href="#imx-provider" id="imx-provider"></a>

A wallet in XpansionChain is represented by the <mark style="color:blue;">IMX Provider</mark> interface. You can create an instance of the object by invoking the following method when the user clicks on Sign in with Passport as explained in the <mark style="color:blue;">installation guide.</mark>

```
const provider: IMXProvider = await passport.connectImx();
```

#### Supported Functions[​](https://docs.x.immutable.com/docs/x/passport/wallet#supported-functions) <a href="#supported-functions" id="supported-functions"></a>

Passport supports the following <mark style="color:blue;">IMX Provider</mark> functions:

* <mark style="color:blue;">batchNftTransfer</mark>
* <mark style="color:blue;">cancelOrder</mark>
* <mark style="color:blue;">createOrder</mark>
* <mark style="color:blue;">createTrade</mark>
* <mark style="color:blue;">exchangeTransfer</mark>
* <mark style="color:blue;">getAddress</mark>
* <mark style="color:blue;">transfer - Example Transfer Guide</mark>

Please refer to the <mark style="color:blue;">IMX Provider</mark> documentation to get detailed usage instructions.

INFO

Passport users must explicitly approve a transaction in order to be processed by the XpansionChain API. You can learn more about this feature in <mark style="color:blue;">Transaction Confirmations.</mark>

#### Unsupported Functions[​](https://docs.x.immutable.com/docs/x/passport/wallet#unsupported-functions) <a href="#unsupported-functions" id="unsupported-functions"></a>

The following <mark style="color:blue;">IMX Provider</mark> functions are not supported by Passport:

* <mark style="color:blue;">registerOffchain</mark>: Not necessary, as this happens automatically during the connection process.
* <mark style="color:blue;">isRegisteredOnchain</mark>: Coming soon.
* <mark style="color:blue;">deposit</mark>: Coming soon.
* <mark style="color:blue;">prepareWithdrawal</mark>: Coming soon.
* <mark style="color:blue;">completeWithdrawal</mark>: Coming soon.

TIP

Learn more about how to <mark style="color:blue;">choose the right way to integrate</mark> with Passport's provider based on your application type.

### XpansionChain API[​](https://docs.x.immutable.com/docs/x/passport/wallet#immutable-x-api) <a href="#immutable-x-api" id="immutable-x-api"></a>

The XpansionChain`Client` allows you to create an XpansionChain API client instance to interact with the API. For example, you can list the balances for a user as follows:

```
import { Environment, XpansionChainClient } from '@imtbl/sdk';

const config = {
  baseConfig: { environment: Environment.PRODUCTION },
};
const client = new XpansionChainClient(config);

const response = await client.listBalances({
  owner: '0x0000000000000000000000000000000000000000',
});
```
