Skip to Content
API ReferenceOrbiClient

OrbiClient

OrbiClient is the entry point to the SDK. Create one instance, scoped to a network, and reuse it across your app.

import { OrbiClient } from '@orbi-wallet/sdk' const orbi = new OrbiClient({ network: 'mainnet' })

Constructor

new OrbiClient(options: OrbiClientOptions)

Options

OptionTypeRequiredDescription
network'mainnet' | 'testnet'YesWhich Stellar network this client signs transactions for.

The client does not take an API key or backend URL — Orbi runs entirely on the client and never sponsors fees. See Core Concepts for why.

Methods

MethodReturnsDescription
connect()Promise<void>Run the passkey flow and connect a wallet.
getAddress()string | nullThe connected wallet’s G... address.
signTransaction()Promise<{ signedXdr }>Get a transaction approved and signed.
disconnect()voidForget the current connection.

Lifecycle

const orbi = new OrbiClient({ network: 'mainnet' }) await orbi.connect() // user signs in with passkey const address = orbi.getAddress() // "G..." const { signedXdr } = await orbi.signTransaction({ xdr, walletAddress: address }) orbi.disconnect() // when the user signs out
Last updated on