|
| 1 | +--- |
| 2 | +title: 'Wallet Support' |
| 3 | +description: 'Compatibility information for different wallet providers' |
| 4 | +--- |
| 5 | + |
| 6 | +import { |
| 7 | + Table, |
| 8 | + TableBody, |
| 9 | + TableCell, |
| 10 | + TableHead, |
| 11 | + TableHeader, |
| 12 | + TableRow |
| 13 | +} from "@/components/ui/table"; |
| 14 | + |
| 15 | +This page provides detailed information about which methods and events are supported by different wallet providers in the Stacks ecosystem. |
| 16 | + |
| 17 | +## Method Compatibility |
| 18 | + |
| 19 | +<Table> |
| 20 | + <TableHeader> |
| 21 | + <TableRow> |
| 22 | + <TableHead>Method</TableHead> |
| 23 | + <TableHead>Leather</TableHead> |
| 24 | + <TableHead>Xverse-like</TableHead> |
| 25 | + </TableRow> |
| 26 | + </TableHeader> |
| 27 | + <TableBody> |
| 28 | + <TableRow> |
| 29 | + <TableCell><code>getAddresses</code></TableCell> |
| 30 | + <TableCell>π‘ No support for experimental purposes</TableCell> |
| 31 | + <TableCell>π‘ Use <code>wallet_connect</code> instead</TableCell> |
| 32 | + </TableRow> |
| 33 | + <TableRow> |
| 34 | + <TableCell><code>sendTransfer</code></TableCell> |
| 35 | + <TableCell>π‘ Expects <code>amount</code> as string</TableCell> |
| 36 | + <TableCell>π‘ Expects <code>amount</code> as number</TableCell> |
| 37 | + </TableRow> |
| 38 | + <TableRow> |
| 39 | + <TableCell><code>signPsbt</code></TableCell> |
| 40 | + <TableCell>π‘ Uses signing index array only</TableCell> |
| 41 | + <TableCell>π‘ Uses <code>signInputs</code> record instead of array</TableCell> |
| 42 | + </TableRow> |
| 43 | + <TableRow> |
| 44 | + <TableCell><code>stx_getAddresses</code></TableCell> |
| 45 | + <TableCell>π’</TableCell> |
| 46 | + <TableCell>π΄</TableCell> |
| 47 | + </TableRow> |
| 48 | + <TableRow> |
| 49 | + <TableCell><code>stx_getAccounts</code></TableCell> |
| 50 | + <TableCell>π΄</TableCell> |
| 51 | + <TableCell>π’</TableCell> |
| 52 | + </TableRow> |
| 53 | + <TableRow> |
| 54 | + <TableCell><code>stx_getNetworks</code></TableCell> |
| 55 | + <TableCell>π΄</TableCell> |
| 56 | + <TableCell>π΄</TableCell> |
| 57 | + </TableRow> |
| 58 | + <TableRow> |
| 59 | + <TableCell><code>stx_transferStx</code></TableCell> |
| 60 | + <TableCell>π’</TableCell> |
| 61 | + <TableCell>π’</TableCell> |
| 62 | + </TableRow> |
| 63 | + <TableRow> |
| 64 | + <TableCell><code>stx_transferSip10Ft</code></TableCell> |
| 65 | + <TableCell>π’</TableCell> |
| 66 | + <TableCell>π΄</TableCell> |
| 67 | + </TableRow> |
| 68 | + <TableRow> |
| 69 | + <TableCell><code>stx_transferSip9Nft</code></TableCell> |
| 70 | + <TableCell>π’</TableCell> |
| 71 | + <TableCell>π΄</TableCell> |
| 72 | + </TableRow> |
| 73 | + <TableRow> |
| 74 | + <TableCell><code>stx_callContract</code></TableCell> |
| 75 | + <TableCell>π‘ Hex-encoded Clarity values only</TableCell> |
| 76 | + <TableCell>π‘ Hex-encoded Clarity values only, no support for <code>postConditions</code></TableCell> |
| 77 | + </TableRow> |
| 78 | + <TableRow> |
| 79 | + <TableCell><code>stx_deployContract</code></TableCell> |
| 80 | + <TableCell>π‘ Hex-encoded Clarity values only</TableCell> |
| 81 | + <TableCell>π‘ Hex-encoded Clarity values only, no support for <code>postConditions</code></TableCell> |
| 82 | + </TableRow> |
| 83 | + <TableRow> |
| 84 | + <TableCell><code>stx_signTransaction</code></TableCell> |
| 85 | + <TableCell>π‘ Hex-encoded Clarity values only</TableCell> |
| 86 | + <TableCell>π‘ Hex-encoded Clarity values only</TableCell> |
| 87 | + </TableRow> |
| 88 | + <TableRow> |
| 89 | + <TableCell><code>stx_signMessage</code></TableCell> |
| 90 | + <TableCell>π‘ Hex-encoded Clarity values only</TableCell> |
| 91 | + <TableCell>π‘ Hex-encoded Clarity values only</TableCell> |
| 92 | + </TableRow> |
| 93 | + <TableRow> |
| 94 | + <TableCell><code>stx_signStructuredMessage</code></TableCell> |
| 95 | + <TableCell>π‘ Hex-encoded Clarity values only</TableCell> |
| 96 | + <TableCell>π‘ Hex-encoded Clarity values only</TableCell> |
| 97 | + </TableRow> |
| 98 | + <TableRow> |
| 99 | + <TableCell><code>stx_updateProfile</code></TableCell> |
| 100 | + <TableCell>π΄</TableCell> |
| 101 | + <TableCell>π΄</TableCell> |
| 102 | + </TableRow> |
| 103 | + </TableBody> |
| 104 | +</Table> |
| 105 | + |
| 106 | +## Event Compatibility |
| 107 | + |
| 108 | +<Table> |
| 109 | + <TableHeader> |
| 110 | + <TableRow> |
| 111 | + <TableHead>Event</TableHead> |
| 112 | + <TableHead>Leather</TableHead> |
| 113 | + <TableHead>Xverse</TableHead> |
| 114 | + </TableRow> |
| 115 | + </TableHeader> |
| 116 | + <TableBody> |
| 117 | + <TableRow> |
| 118 | + <TableCell><code>stx_accountChange</code></TableCell> |
| 119 | + <TableCell>π΄</TableCell> |
| 120 | + <TableCell>π΄</TableCell> |
| 121 | + </TableRow> |
| 122 | + <TableRow> |
| 123 | + <TableCell><code>stx_networkChange</code></TableCell> |
| 124 | + <TableCell>π΄</TableCell> |
| 125 | + <TableCell>π΄</TableCell> |
| 126 | + </TableRow> |
| 127 | + </TableBody> |
| 128 | +</Table> |
| 129 | + |
| 130 | +**Legend** |
| 131 | + |
| 132 | +- π΄ No support (yet) |
| 133 | +- π‘ Partial support |
| 134 | +- π’ Supported |
| 135 | + |
| 136 | +## Compatibility Layer |
| 137 | + |
| 138 | +The `request` method in `@stacks/connect` adds a layer of auto-compatibility for different wallet providers. This helps unify the interface where wallet providers may implement methods and results differently. |
| 139 | + |
| 140 | +| Method | Status | Notes | |
| 141 | +| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------- | |
| 142 | +| `getAddresses` | π΅ | Maps to `wallet_connect` for Xverse-like wallets | |
| 143 | +| `sendTransfer` | π΅ | Converts `amount` to number for Xverse, string for Leather | |
| 144 | +| `signPsbt` | π‘ | Transforms PSBT format for Leather (base64 to hex) with lossy restructure of `signInputs` | |
| 145 | +| `stx_getAddresses` | π΅ | Maps to `wallet_connect` for Xverse-like wallets | |
| 146 | +| `stx_callContract` | π΅ | Transforms Clarity values to hex-encoded format for compatibility | |
| 147 | +| `stx_deployContract` | π΅ | Transforms Clarity values to hex-encoded format for compatibility | |
| 148 | +| `stx_signTransaction` | π΅ | Transforms Clarity values to hex-encoded format for compatibility | |
| 149 | +| `stx_signMessage` | π΅ | Transforms Clarity values to hex-encoded format for compatibility | |
| 150 | +| `stx_signStructuredMessage` | π΅ | Transforms Clarity values to hex-encoded format for compatibility | |
| 151 | + |
| 152 | +- π’ No overrides needed for any wallet |
| 153 | +- π΅ Has compatibility overrides that maintain functionality |
| 154 | +- π‘ Has breaking overrides that may lose some information |
0 commit comments