Get started with Aptos
The StarKey browser extension and mobile in-app browser are both designed to interact with web applications.
StarKey implements the AIP-62 Wallet Standard. The Aptos Wallet Adapter is the only supported integration path — it gives you one standardized interface that works across every AIP-62 wallet, including StarKey, with no wallet-specific detection code required. StarKey self-registers as a standard wallet, so the adapter discovers it automatically once installed.
Install
npm i @aptos-labs/wallet-adapter-reactProvider setup
Wrap your app once with AptosWalletAdapterProvider:
import { AptosWalletAdapterProvider } from '@aptos-labs/wallet-adapter-react'
import { Network } from '@aptos-labs/ts-sdk'
function Providers({ children }) {
return (
<AptosWalletAdapterProvider
autoConnect={true}
dappConfig={{ network: Network.MAINNET, aptosApiKey: 'your-aptos-api-key' }}
onError={(error) => {
console.log('wallet adapter error', error)
}}
>
{children}
</AptosWalletAdapterProvider>
)
}| Prop | Description |
|---|---|
autoConnect | Reconnects to the previously connected wallet on load. |
dappConfig | Network and API key configuration. |
onError | Error callback for connection/signing failures. |
optInWallets | Restrict which AIP-62 standard wallets are shown, if you don’t want every detected wallet listed. |
This section covers connecting, sending transactions, signing messages, reactive state, account types, and error handling.
Last updated on