Getting Started
Learn how to detect OneKey’s Stellar provider and request a Stellar address.
Stellar signing typically depends on the correct network passphrase (e.g. Public or Testnet). Make sure you pass the right one when signing.
Provider Detection
const stellar = window.$onekey?.stellar
if (!stellar?.isOneKey) {
throw new Error('OneKey Stellar provider not detected')
}Get Address (Connect)
// Triggers wallet permission / connect flow and returns the address (G...)
const { address } = await stellar.getAddress()
console.log('Address:', address)Get Network
const { network, networkPassphrase } = await stellar.getNetwork()
console.log({ network, networkPassphrase })Last updated on