To determine if a user has StarKey installed, a web application should check for the presence of a starkey object. StarKey's browser extension automatically inject this object into the window of any web application that meets the following conditions: the site uses https://, is running on localhost, or is on 127.0.0.1. Note that StarKey does not inject the provider into iframes or sites using http://.
If the starkey object is present, Supra dApps can interact with StarKey through the API available at window.starkey. However, this Supra provider may experience namespace collisions with other injected wallets.
To confirm StarKey's installation, the application should also verify the presence of an isStarkey flag.
const isStarkeyInstalled = window?.starkey;If StarKey is not installed, we suggest redirecting your users to our website. The implementation might look something like this:
const getProvider = () => {
if ('starkey' in window) {
const provider = window.starkey?.supra;
if (provider) {
return provider;
}
}
window.open('https://starkey.app/', '_blank');
};The Starkey browser extension is designed to interact with web applications.
The most direct way to interact with StarKey is via the provider that StarKey injects into your web application. This provider is globally available at window.starkey and its methods will always include StarKey's most up-to-date functionality. This documentation is dedicated to covering all aspects of the provider.
Version 4.2.2
Added DXLYN coin image and paired-coin support in Manage Tokens.
Enhanced NFT list fetching performance for smoother handling of large collections.
Version 4.2.1
Bug fixes and UI enhancements.
Version 4.2.0
Resolved an issue causing the wallet popup to close unexpectedly when handling concurrent dApp requests.
Improved Supra simulation to display coin movement.
Version 4.1.1
Minor UI enhancements.
Version 4.1.0
Added Price Pair Feed for iAssets Tokens: Integrated a price feed to display token pair prices for all iAssets tokens.
Implemented Gas Tracker with Dynamic Gas Fee Support: Introduced a new Gas Tracker that automatically adjusts and displays real-time gas fees based on network conditions, ensuring optimized transaction costs.
Auto-Fetch Supra Legacy & FA Token Pairs: Automatically fetches and displays separate balances for Supra Legacy and FA token pairs on the Token Portfolio screen for better clarity.
Merged Transaction History for Supra Legacy & FA Tokens: Supra Legacy and FA tokens now share a unified transaction history, providing a simplified and consolidated view of all activities.
Version 4.0.0
Added full NFT support, allowing users to view, send, and manage Supra NFTs directly within the wallet.
Improved performance and stability for a smoother user experience.
Display a “new” badge when the extension is updated.
Version 3.3.0
Added browser notification control toggle in settings.
Updated ethers.js package to fix deprecated API calls and improve Ethereum transaction list performance.
Enabled resetting of default RPC endpoints when users manually modify default network RPCs.
Updated FAQ and Help links, and added a Changelog section in Settings.
Version 3.2.0
Bug fixes and enhancements
Version 3.1.2
Enabled displaying Supra FA Coin (0xa) price and image
Show a popup to connect the account to a dApp only when the wallet is opened on a connected dApp site and the account is not yet connected
Version 3.1.0
Add browser notifications for transaction success or failure
Update Citadel vaults list in Extension Wallet
Version 3.0.0
Support for dApp Transaction Request Queueing – Ensures smooth handling of multiple transaction requests
Multi-Chain Wallet Connect on a Unified dApp Page – Seamlessly connect wallets across multiple chains (Ethereum & Supra) using StarKey, all on the same page
Connected Apps in Settings – Easily view, manage, and disconnect dApps directly from the settings page.
Version 5.10.3
Bug fixes and enhancements.
Version 5.10.2
Minor UI enhancements.
Version 5.10.1
Version 5.10.3
Bug fixes and enhancements.
Version 5.10.2
Minor UI enhancements.
Version 5.10.1
Combined Display in Manage Tokens and Portfolio Screens: Supra Legacy and FA tokens are now displayed together across the Manage Tokens and Portfolio sections, ensuring a seamless user experience.
Auto-Fetch Supra Legacy & FA Token Pairs: Automatically fetches and displays separate balances for Supra Legacy and FA token pairs on the Token Portfolio screen for better clarity.
Merged Transaction History for Supra Legacy & FA Tokens: Supra Legacy and FA tokens now share a unified transaction history, providing a simplified and consolidated view of all activities.
Combined Display in Manage Tokens and Portfolio Screens: Supra Legacy and FA tokens are now displayed together across the Manage Tokens and Portfolio sections, ensuring a seamless user experience.
Haptic feedback added
Version 5.10.0
Added full NFT support, allowing users to view, send, and manage Supra NFTs directly within the wallet.
Version 5.9.0
Default RPC Reset Option: Users can now reset default RPC endpoints when modifying network RPC settings for easier configuration management.
Enhanced Help & Support: Updated FAQ and Help links, with a new Changelog section in Settings to keep you informed on the latest updates.
Secure Screenshot Handling: Added screenshot functionality for non-sensitive screens, allowing you to take snapshots without compromising security.
Gas Tracker Implementation: Introduced Gas Tracker for token transactions, enabling users to view and apply dynamic gas fees directly from the wallet.
Version 5.8.0
Bug fixes and enhancements.
Version 5.7.2
View Citadel vaults list in the wallet.
Transaction Transparency: Added Supra raw transaction simulation with detailed coin-movement display to help review transactions before sending.
Buy Token Shortcut: Added a Buy option on the token details page for faster access.
Auto-Fetch Supra Legacy & FA Token Pairs: Automatically fetches and displays separate balances for Supra Legacy and FA token pairs on the Token Portfolio screen for better clarity.
Merged Transaction History for Supra Legacy & FA Tokens: Supra Legacy and FA tokens now share a unified transaction history, providing a simplified and consolidated view of all activities.
Combined Display in Manage Tokens and Portfolio Screens: Supra Legacy and FA tokens are now displayed together across the Manage Tokens and Portfolio sections, ensuring a seamless user experience.
Haptic feedback added
Version 5.10.0
Added full NFT support, allowing users to view, send, and manage Supra NFTs directly within the wallet.
Version 5.9.0
Default RPC Reset Option: Users can now reset default RPC endpoints when modifying network RPC settings for easier configuration management.
Enhanced Help & Support: Updated FAQ and Help links, with a new Changelog section in Settings to keep you informed on the latest updates.
Secure Screenshot Handling: Added screenshot functionality for non-sensitive screens, allowing you to take snapshots without compromising security.
Keyboard Layout Update (iOS): Optimized keyboard layout on iOS devices to improve typing accuracy and user experience.
Gas Tracker Implementation: Introduced Gas Tracker for token transactions, enabling users to view and apply dynamic gas fees directly from the wallet.
Version 5.8.0
View Citadel vaults list in the wallet.
Transaction Transparency: Added Supra raw transaction simulation with detailed coin-movement display to help review transactions before sending.
Buy Token Shortcut: Added a Buy option on the token details page for faster access.
Once a web application is connected to StarKey, it can prompt the user for permission to send transactions on their behalf.
To send a transaction, you will need to have a valid transaction object. It should look a little like this:
// Example transaction object
const transaction = {
data: "", // optional
from: from_address,
to: to_address,
value: amount,
};However, this transaction object needs to be signed using the sender's private key. This ensures that only the person holding the private key can send transactions from the public address.
To prompt StarKey to send a transaction to the network, use the following code snippet:
const provider = getProvider();
const transaction = {
data: "",
from: from_address,
to: to_address,
value: amount,
};
const txHash = await provider.sendTransaction(transaction);
console.log("txHash :: ", txHash);Banxa is a trusted fiat-to-crypto payment gateway that lets users buy digital assets using traditional payment methods like credit cards, debit cards, Apple Pay, and more. It supports identity verification and fraud prevention while offering global coverage and compliance.
Buying $SUPRA is now easier than ever, with no centralized exchange, no external onboarding process, and no delays.
With Banxa now integrated directly into StarKey Wallet, users can:
Purchase $SUPRA using debit/credit cards
Skip the exchange sign-up process entirely
Enjoy a seamless, in-wallet experience
Access the service from over 150+ countries, including the United States
Download & open StarKey Wallet
Create your account
Navigate to the Buy tab
Enter the amount of $SUPRA you want to purchase
After detecting the provider, an application can request to connect to Starkey. This connection request will prompt the user to grant permission to share their public key, signaling their willingness to engage further. Users must approve the connection request before the app can proceed with additional actions, such as signing a message or sending a transaction.
Once permission is granted for the first time, the web application's domain will be whitelisted for future connection requests. After a connection is established, either the application or the user can choose to terminate the connection.
To connect to Starkey by default, you can call the window.starkey function.
connect method will return a Promise. If it resolves, it returns an array where the connected address is in the 0th index. If the user declines the request or closes the pop-up, it will reject (throw when awaited).Once the web application is connected to StarKey, it will be able to read the connected account's address and prompt the user for additional transactions. It also exposes a convenience account method.
Once a user has established a connection, StarKey will add the website they opened a connection with to a list of apps. The user can then revoke access through the UI at any time, and will need to reconnect.
To disconnect StarKey from dApp, you can call the disconnect method.
StarKey allows users to seamlessly manage multiple accounts (i.e., addresses) from within a single extension or mobile app. Whenever a user switches accounts, StarKey will emit an accountChanged event.
If a user changes accounts while already connected to an application, and the new account had already whitelisted that application, then the user will stay connected and StarKey will pass the public key of the new account.
const provider = getProvider(); // see "Detecting the Provider"
try {
const accounts = await provider.connect();
console.log(accounts[0]);
// 0x534583cd8cE0ac1af4Ce01Ae4f294d52b4Cd305F
} catch (err) {
// { code: 4001, message: 'User rejected the request.' }
}const accounts = await provider.account();
console.log(accounts[0]);
// 0x534583cd8cE0ac1af4Ce01Ae4f294d52b4Cd305Fconst provider = getProvider();
await provider.disconnect();provider.on('accountChanged', (accounts: string[]) => {
if (accounts.length > 0) {
// Set new public key and continue as usual
console.log(`Switched to account ${accounts[0]}`);
}
});Complete the KYC process (identity & payment verification)
Receive a confirmation email and track the order directly in the wallet