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

Commit 29eb9a9

Browse files
authored
Revert "Updates to the adapter x chain accounts page" (#930)
Revert "Updates to the adapter x chain accounts page (#918)" This reverts commit a151629.
1 parent a151629 commit 29eb9a9

File tree

1 file changed

+7
-89
lines changed

1 file changed

+7
-89
lines changed

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

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

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

77
# X-Chain Accounts
88

@@ -21,7 +21,7 @@ This functionality enables a variety of use cases for dApps, enhancing user expe
2121
When a user enters a dApp that supports x-chain accounts, the interaction and experience feel the same as with any Aptos wallet.
2222
The user connects with a x-chain account (e.g., Phantom for Solana) and can view their Derivable Abstracted Account (DAA) details, sign messages, and submit transactions to the Aptos chain.
2323

24-
When a dapp submits a transaction using a x-chain account, the wallet adapter utilizes the `signIn` function (defined in the x-chain account standard) for domain verification and security. If a specific wallet does not support the `signIn` method, the adapter falls back to using the default `signMessage`.
24+
When a dapp submits a transaction using a x-chain account, the wallet adapter utilizes the `signIn` function (defined in the x-chain account standard) for domain verification and security.
2525
The wallet is requested to sign a message to submit a transaction on the Aptos network. Once the wallet approves the transaction, it is submitted to the Aptos chain, where it undergoes a signature verification process.
2626

2727
### How does DAA work in a x-chain account?
@@ -34,7 +34,7 @@ The computation of the DAA address is done using the `authenticationFunction` an
3434
- `authenticationFunction`: This is a function that exists on-chain and is used to verify the signature of the x-chain account.
3535
- `accountIdentity`: This represents the identity of the account used in the on-chain authentication function to verify the signature of the x-chain account.
3636
In the Wallet Adapter, the `accountIdentity` is based on the original x-chain account's public key and the dApp domain (e.g., mydomain.com). The format is:
37-
`${originWalletAddress}${domain}`
37+
`${originWallet.publicKey}${domain}`
3838

3939
<Callout>
4040
Since the account identity is based on the dApp domain, it is scoped to the dApp context. As a result, each account has a different DAA address on different dApps.
@@ -43,115 +43,32 @@ 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-
Currently, the adapter supports Solana and EVM chains
47-
48-
<Tabs items={['Solana', 'EVM']}>
49-
{/* Solana */}
50-
51-
52-
<Tabs.Tab>
53-
54-
The wallet adapter follows the [Solana Wallet Standard](https://github.com/wallet-standard/wallet-standard/blob/master/DESIGN.md) to discover wallets.
55-
Currently, the wallets that have been tested and support cross-chain accounts are:
56-
57-
| | Aptos Devnet | Aptos Testnet | Aptos Mainnet |
58-
|----------|--------------|---------------|---------------|
59-
| Phantom || |
60-
| Solflare || |
61-
| Backpack || |
62-
| OKX || |
63-
64-
6546
Make sure you integrate with the Aptos Wallet Adapter by following these [steps](./dapp.mdx)
6647

6748
Supporting x-chain accounts in a dApp requires only a 2-step installation process.
6849

69-
<Steps>
70-
71-
### Install the `@aptos-labs/derived-wallet-solana` package
72-
7350
```bash
7451
npm install @aptos-labs/derived-wallet-solana
7552
```
7653

77-
### Import the `setupAutomaticSolanaWalletDerivation` function
78-
7954
Once you have installed the `@aptos-labs/derived-wallet-solana` package, you can import and use it.
8055
In the same file where you import the other wallets, such as `WalletProvider.tsx`, you can add the following:
8156

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

85-
setupAutomaticSolanaWalletDerivation({ defaultNetwork: Network.DEVNET }); // this is the Aptos network your dapp is working with
86-
87-
.....
88-
89-
<AptosWalletAdapterProvider
90-
dappConfig={{
91-
network: Network.DEVNET,
92-
}}
93-
>
94-
{children}
95-
<AptosWalletAdapterProvider/>
96-
```
97-
</Steps>
98-
</Tabs.Tab>
99-
100-
{/* EVM */}
101-
<Tabs.Tab>
102-
103-
The wallet adapter follows the [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) to discover wallets.
104-
Currently, the wallets that have been tested and support cross-chain accounts are:
105-
106-
| | Aptos Devnet | Aptos Testnet | Aptos Mainnet |
107-
|----------|--------------|----------------|---------------|
108-
| Metamask | ✅ | |
109-
| Phantom | ✅ | |
110-
| Coinbase | ✅ | |
111-
| OKX | ✅ | |
112-
| Exodus | ✅ | |
113-
| Backpack | ✅ | |
114-
115-
116-
Make sure you integrate with the Aptos Wallet Adapter by following these [steps](./dapp.mdx)
117-
118-
Supporting x-chain accounts in a dApp requires only a 2-step installation process.
119-
120-
<Steps>
121-
122-
### Install the `@aptos-labs/derived-wallet-ethereum` package
123-
124-
```bash
125-
npm install @aptos-labs/derived-wallet-ethereum
126-
```
127-
128-
### Import the `setupAutomaticEthereumWalletDerivation` function
129-
130-
Once you have installed the `@aptos-labs/derived-wallet-ethereum` package, you can import and use it.
131-
In the same file where you import the other wallets, such as `WalletProvider.tsx`, you can add the following:
132-
133-
```tsx filename="WalletProvider.tsx"
134-
import { setupAutomaticEthereumWalletDerivation } from "@aptos-labs/derived-wallet-ethereum";
135-
136-
setupAutomaticEthereumWalletDerivation({ defaultNetwork: Network.DEVNET }); // this is the Aptos network your dapp is working with
60+
setupAutomaticSolanaWalletDerivation({ defaultNetwork: Network.TESTNET }); // this is the Aptos network your dapp is working with
13761

13862
.....
13963

14064
<AptosWalletAdapterProvider
14165
dappConfig={{
142-
network: Network.DEVNET,
66+
network: Network.TESTNET,
14367
}}
14468
>
14569
{children}
14670
<AptosWalletAdapterProvider/>
14771
```
148-
</Steps>
149-
</Tabs.Tab>
150-
151-
</Tabs>
152-
153-
154-
15572

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

@@ -241,6 +158,7 @@ export default SignAndSubmit;
241158

242159
### Considerations
243160
- Since the origin wallet creates an x-chain account and is most likely not integrated with Aptos, simulation is not available in the wallet.
161+
- Due to the use of the `signIn` standard available on other chains, wallets that have not implemented this flow are not supported.
244162
- While the x-chain account prioritizes DAA, each account also retains the origin wallet, so developers should be able to use it and interact with it
245163

246164

0 commit comments

Comments
 (0)