Skip to main content

Get Going

This walkthrough covers how to detect the UKey Wallet Stellar Provider, request the user's address, and read the current network information.

⚠️

Stellar signing relies on the correct network passphrase, such as Public or Testnet. Before initiating signing, please ensure that the incoming network inputs are consistent with the target network.


Find Provider

const stellar = window.$ukey?.stellar;

if (!stellar?.isUKey) {
throw new Error("UKey Wallet Stellar Provider not detected");
}

Get Addr

// Starts the authorization/connection flow and returns the address (G...)
const { address } = await stellar.getAddress();
console.log("Resolved address:", address);

Read network

const { network, networkPassphrase } = await stellar.getNetwork();
console.log({ network, networkPassphrase });