Skip to content

Ultra Wallet SDK ​

@ultraos/wallet-sdk is the official JavaScript/TypeScript client that dApps use to talk to an Ultra wallet. It gives you one API that works with both of Ultra's wallets:

  • Ultra Wallet Browser Extension — a self-custody wallet installed in Chrome. It supports multiple accounts, custom networks and live events.
  • Ultra Web Wallet — a popup wallet for Easy Blockchain Account (EBA) users that needs no installation.

The SDK decides which wallet to use when it is created. You write your integration once: connect, sign, and listen for changes, and the SDK routes each call to the wallet the user has.

ts
import { UltraWalletSDK } from '@ultraos/wallet-sdk';

const wallet = new UltraWalletSDK({ environment: 'mainnet' });

connectButton.addEventListener('click', async () => {
    const { data } = await wallet.connect();
    console.log('Connected account:', data.blockchainid);
});

What you can do ​

CapabilityMethod(s)
Connect / disconnect a dAppconnect(), disconnect()
Prove account ownership (login challenge)connect({ nonce }), signMessage()
Sign and broadcast transactions, or sign onlysignTransaction()
Read the user's accounts and signing authoritiesgetAccounts(), getSelectedAccount(), getAvailableAuthorizations()
Read and switch the active networkgetChainId(), getNetwork(), getNetworks(), switchNetwork()
React to account, network and disconnect changeson(), off(), dispose()

Provider support ​

Not every method is available with both wallets. Web Wallet requests travel through a popup window, one request at a time, so that transport cannot support long-lived features such as events and network switching.

MethodBrowser ExtensionWeb Wallet
NetworksMainnet, Testnet, customMainnet only
connect() / disconnect()✅✅
signMessage()✅✅
signTransaction() (incl. signOnly)✅✅
getChainId()✅✅ (resolved from environment, no popup)
getAccounts() / getSelectedAccount()✅❌
getAvailableAuthorizations()✅❌
getNetwork() / getNetworks() / switchNetwork()✅❌
on() / off() events✅❌ (no-op)
connect() result: accounts, selectedAccount, network✅❌ (legacy fields only)

See Getting Started → Choosing a provider to learn how to detect which wallet is active.

Versions ​

This documentation covers @ultraos/wallet-sdk 0.6.1. Install it with npm install @ultraos/wallet-sdk@^0.6.1.

SDK versionHighlights
0.6.1Web Wallet on testnet rejects with 4302; Web Wallet JSON-RPC errors reject with their code instead of undefined; types resolve under nodenext
0.6.0Removed the purchaseItem() and addNetwork() methods, which no wallet serves (users still add networks in the extension); nonce / signedNonce typed on the connect result
0.3.xMulti-account results, structured authorization, getAvailableAuthorizations(), network API, events, dispose(); bundled ES module with an exports map (0.3.2)
0.2.0provider option to force the extension or the Web Wallet
0.1.xnonce on connect()

Where to go next ​