# Changelog

All notable changes to `@ordanetwork/sdk` are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] — BREAKING — Core SDK

`@ordanetwork/sdk@2.0.0` is a slim, pure API wrapper. All React, wallet, and UI
surface has been removed. The SDK is now intended for backend and pure-data
integrations; React/widget consumers should install
[`@ordanetwork/widget`](https://www.npmjs.com/package/@ordanetwork/widget) instead.

### Added

- `OrdaSDK.prices` — `Prices` API for fetching USD token prices via `/v1/prices`.
- `OrdaSDK.balances` — `Balances` API for fetching wallet token balances across
  chains via `/v1/balances`.
- New exported types: `TokenPriceRequest`, `TokenPriceData`, `PricesFetchParams`,
  `PricesFetchResponse`, `TokenBalance`, `BalancesFetchOptions`,
  `BalancesFetchParams`, `BalancesSummary`, `ChainFailure`,
  `BalancesFetchResponse`.

### Changed

- `OrdaSDK.version` now returns `'2.0.0'`.

### Fixed

- `web-crypto` HMAC provider now compiles cleanly under stricter `BufferSource`
  typings shipped by recent `@types/node` / TypeScript releases.

### Removed

#### Removed exports

- `SmartWalletClient`
- `SmartWalletManager`
- `LocalSigner`
- `createSmartWallet`
- `SmartWalletError`
- `ConnectionError`
- `UserOperationError`
- `InsufficientFundsError`
- `AccountNotDeployedError`
- Type exports: `SmartWalletConfig`, `SmartWalletInterface`,
  `UserOperationRequest`, `TransactionResult`, `AccountType`, `SmartWalletState`
- Crypto helpers previously exposed via `SmartWalletManager`:
  `generatePrivateKey`, `validatePrivateKey`, `getAddressFromPrivateKey`.
  Modern integrators already have these via `viem`, `wagmi`, or `node:crypto`.

#### Removed instance members

- `OrdaSDK#smartWallets` (the `SmartWalletManager` instance).

#### Removed configuration

- `OrdaConfig.alchemyApiKey`
- `JWTAuthConfig.alchemyApiKey`

#### Dropped runtime dependencies

- `@aa-sdk/core`
- `@account-kit/core`
- `@account-kit/infra`
- `@account-kit/smart-contracts`
- `viem`

#### Dropped dev dependencies

- `viem`

### Migration notes

- **Recipient auto-generation is unaffected.** Smart wallets for recipients
  continue to be created server-side by the Orda API. Calling
  `sdk.recipients.create({...})` without `toAddress` still returns a recipient
  with an auto-generated smart wallet.
- **Existing smart wallets remain operable.** Deployed wallets are standard
  ERC-4337 accounts with no Orda lock-in. Any compatible account-abstraction
  SDK (Alchemy Account Kit, ZeroDev, Biconomy, etc.) can interact with them
  given the holder's private key.
- **No `/react` subpath in this line.** The widget product has moved to a
  separate package: install `@ordanetwork/widget` alongside
  `@ordanetwork/sdk@^2.0.0` to get the drop-in React widget, hooks, and
  `OrdaProvider`.
- **No deprecation shim.** Accessing `sdk.smartWallets` or any removed export
  throws at type-check / runtime. The final `1.x` release of
  `@ordanetwork/sdk` carries the deprecation warnings.

[2.0.0]: https://github.com/ordanetwork/orda-sdk/releases/tag/v2.0.0
