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
| Option | Type | Required | Description |
|---|---|---|---|
network | 'mainnet' | 'testnet' | Yes | Which 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
| Method | Returns | Description |
|---|---|---|
connect() | Promise<void> | Run the passkey flow and connect a wallet. |
getAddress() | string | null | The connected wallet’s G... address. |
signTransaction() | Promise<{ signedXdr }> | Get a transaction approved and signed. |
disconnect() | void | Forget 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 outLast updated on