Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 436e3f9

Browse files
authored
Add steps and wallets table (#938)
add steps and wallets table
1 parent 5402d78 commit 436e3f9

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

apps/nextra/pages/en/build/sdks/wallet-adapter/x-chain-accounts.mdx

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "X-Chain Accounts"
33
---
44

5-
import { Callout } from "nextra/components";
5+
import { Callout, Steps } from "nextra/components";
66

77
# X-Chain Accounts
88

@@ -43,40 +43,55 @@ In the Wallet Adapter, the `accountIdentity` is based on the original x-chain ac
4343

4444
### How to integrate x-chain accounts in my dApp?
4545

46-
Make sure you integrate with the Aptos Wallet Adapter by following these [steps](./dapp.mdx)
46+
The wallet adapter follows the [Solana Wallet Standard](https://github.com/wallet-standard/wallet-standard/blob/master/DESIGN.md) to discover wallets.
47+
Currently, the wallets that have been tested and support cross-chain accounts are:
48+
49+
| | Aptos Devnet | Aptos Testnet | Aptos Mainnet |
50+
|----------|--------------|---------------|---------------|
51+
| Phantom || |
52+
| Solflare || |
53+
| Backpack || |
54+
| OKX || |
55+
56+
57+
<Callout>
58+
It is highly recommended to use the `@aptos-labs/wallet-adapter-react` package for the best experience. Make sure you integrate with the Aptos Wallet Adapter by following these [steps](./dapp.mdx)
59+
</Callout>
4760

4861
Supporting x-chain accounts in a dApp requires only a 2-step installation process.
4962

63+
<Steps>
64+
65+
### Install the `@aptos-labs/derived-wallet-solana` package
66+
5067
```bash
5168
npm install @aptos-labs/derived-wallet-solana
5269
```
5370

71+
### Import the `setupAutomaticSolanaWalletDerivation` function
72+
5473
Once you have installed the `@aptos-labs/derived-wallet-solana` package, you can import and use it.
5574
In the same file where you import the other wallets, such as `WalletProvider.tsx`, you can add the following:
5675

57-
```ts
76+
```tsx filename="WalletProvider.tsx"
5877
import { setupAutomaticSolanaWalletDerivation } from "@aptos-labs/derived-wallet-solana";
5978

60-
setupAutomaticSolanaWalletDerivation({ defaultNetwork: Network.TESTNET }); // this is the Aptos network your dapp is working with
79+
setupAutomaticSolanaWalletDerivation({ defaultNetwork: Network.DEVNET }); // this is the Aptos network your dapp is working with
6180

6281
.....
6382

6483
<AptosWalletAdapterProvider
6584
dappConfig={{
66-
network: Network.TESTNET,
85+
network: Network.DEVNET,
6786
}}
6887
>
6988
{children}
7089
<AptosWalletAdapterProvider/>
7190
```
91+
</Steps>
7292

7393
That will handle the logic and implementation to include the x-chain accounts as if they were Aptos wallets.
7494

75-
<Callout>
76-
It is highly recommended to use the `@aptos-labs/wallet-adapter-react` package for the best experience.
77-
</Callout>
78-
79-
8095
#### Submitting a transaction
8196

8297
In most cases, allowing users to submit a transaction with a x-chain account to the Aptos chain requires using a sponsor transaction. This is because the x-chain account might not have APT to pay for gas.

0 commit comments

Comments
 (0)