---
title: "@calamari-radix/gateway-ez-mode (Radix Gateway Library)"
url: "https://radix.wiki/developers/tools/gateway-ez-mode"
updated: 2026-11-24
license: CC-BY-4.0
license_url: "https://creativecommons.org/licenses/by/4.0/"
version: "1.0.0"
---

# @calamari-radix/gateway-ez-mode (Radix Gateway Library)

|  |  |
| --- | --- |
| **Type** | TypeScript library on npm |
| **Package** | [`@calamari-radix/gateway-ez-mode`](https://www.npmjs.com/package/@calamari-radix/gateway-ez-mode) |
| **Author** | [Daan](https://github.com/d4anvdh), under the [Calamari](https://github.com/CalamariRadix) GitHub organisation |
| **Wraps** | [`@radixdlt/babylon-gateway-api-sdk`](/developers/frontend/02-gateway-sdk) |
| **Latest version** | [1.6.2](https://registry.npmjs.org/@calamari-radix/gateway-ez-mode) |
| **Licence** | [MIT](https://github.com/CalamariRadix/gateway-ez-mode/blob/main/packages/gateway-ez-mode/LICENSE) |
| **Status** | Dormant; not deprecated |

## Introduction

[`@calamari-radix/gateway-ez-mode`](https://github.com/CalamariRadix/gateway-ez-mode) is a TypeScript library that wraps the official [Babylon Gateway SDK](/developers/frontend/02-gateway-sdk) in five services, so that a common question about the Radix ledger takes one call: what an account holds, what a token's metadata says, which .xrd names an account owns, what the current epoch is, and whether a transaction has finalized. Daan wrote it – [d4anvdh](https://github.com/d4anvdh) on GitHub, and credited as [@daan_xrd](https://t.me/daan_xrd) on Telegram by [radix-web3.js](https://github.com/xstelea/radix-web3.js#tribute) – and published it in February 2025 under the GitHub organisation of [Calamari](https://github.com/CalamariRadix), which describes itself as a DEX swap optimizer and aggregator for Radix.

The package is not deprecated, but nobody has released a new version since March 2025. It still works against mainnet: the example on this page ran on 24 November 2026.

## What does DomainService do in gateway-ez-mode?

`DomainService`, reached as `gateway.domains`, has one method, `getXrdDomainsForComponent(address)`, which returns the .xrd names an account or other component holds as an array of strings. It does not resolve a name to an address: it goes the other way, reading the component's NFT balances and keeping the names of one resource, the [Radix Name Service](https://github.com/CalamariRadix/gateway-ez-mode/blob/main/packages/gateway-ez-mode/README.md)'s "Domain" NFT, whose address the [source file](https://github.com/CalamariRadix/gateway-ez-mode/blob/main/packages/gateway-ez-mode/src/services/domain.ts) hard-codes.

A comment in the same file says the unwritten rule for showing one name per account is to take the first name in the list. Two limits apply. The method returns at most 100 names, because the balance helper it calls follows the Gateway's cursor across resources but reads only the first page of NFT IDs in each [vault](https://github.com/CalamariRadix/gateway-ez-mode/blob/main/packages/gateway-ez-mode/src/balance/nftBalances.ts); on 24 November 2026, three mainnet accounts holding 692, 729 and 803 domain NFTs each came back with exactly 100. And it reads only that one mainnet resource. radix.wiki records the Radix Name Service and [XRD Domains](/ecosystem/xrd-domains), the platform built on it for registering and managing .xrd names, as deprecated. [Radix Namespace](/ecosystem/radix-namespace), a separate namespace deployed so far on Stokenet, mints domain NFTs of its own, which `DomainService` does not read.

## The Services

A `GatewayEzMode` object carries five services. The method names below are those of version 1.6.2, read from the [source](https://github.com/CalamariRadix/gateway-ez-mode/tree/main/packages/gateway-ez-mode/src/services).

|  |  |  |
| --- | --- | --- |
| **Service** | **Methods** | **Returns** |
| `state` | `getComponentFungibleBalances`, `getComponentNonFungibleBalances` | Token and NFT balances with each [resource](/contents/tech/core-concepts/resources)'s metadata attached, and each NFT's name, description and key image URL |
| `state` | `getResourceInfo`, `getResourceInfoBatch` | A resource's type, divisibility, standard metadata and supply |
| `state` | `getComponentInfo`, `getComponentInfoBatch` | A component's package, blueprint version, metadata and state |
| `domains` | `getXrdDomainsForComponent` | The .xrd names a component holds |
| `status` | `getCurrentStateVersion`, `getCurrentEpoch`, `getWellKnownAddresses` | The network's state version, its epoch, and well-known addresses such as $XRD's |
| `transaction` | `pollTransactionStatus` | The status of a transaction once it commits or fails, with timeout and abort options |
| `stream` | `getTransactionStream` | A stream whose `next()` fetches the next batch of committed transactions from a given state version, up to 100 at a time |

The constructor takes an optional `GatewayApiClient`. Without one it builds a [mainnet client](https://github.com/CalamariRadix/gateway-ez-mode/blob/main/packages/gateway-ez-mode/src/gatewayClient.ts) with an empty application name, so a Stokenet app, or a dApp that wants to identify itself to the Gateway, passes its own. The client stays reachable as `gateway.gateway` for calls the services do not cover. The services throw error classes the package exports, such as `GatewayError` and `IncorrectAddressType`.

The [package README](https://github.com/CalamariRadix/gateway-ez-mode/blob/main/packages/gateway-ez-mode/README.md) still shows the calls from before version 1.6.0, which [moved the methods into services](https://github.com/CalamariRadix/gateway-ez-mode/blob/main/packages/gateway-ez-mode/CHANGELOG.md). In 1.6.2, `gateway.getFungibleBalancesForComponent` and `gateway.getTransactionStream` are undefined; the same work is done by `gateway.state.getComponentFungibleBalances` and `gateway.stream.getTransactionStream`.

## How do I use gateway-ez-mode?

Install it from npm and create a `GatewayEzMode` object, which connects to the public mainnet Gateway. The example below ran with version 1.6.2 under Node.js 24 on 24 November 2026, saved as an ES module (`.mjs`); replace `ACCOUNT` with any account address.

```
npm install @calamari-radix/gateway-ez-mode
```

```
import { GatewayEzMode } from '@calamari-radix/gateway-ez-mode';

const ACCOUNT = 'account_rdx1...'; // any mainnet account address

const gateway = new GatewayEzMode(); // the public mainnet Gateway

// .xrd names held by the account, in the order the Gateway returns them
const domains = await gateway.domains.getXrdDomainsForComponent(ACCOUNT);
console.log(domains);

// fungible balances with the resource metadata already attached
const balances = await gateway.state.getComponentFungibleBalances(ACCOUNT);
for (const b of balances) console.log(b.resourceInfo.metadata.symbol, b.balance);
```

## sbor-ez-mode, radix-web3.js and the Official SDK

The same repository publishes [sbor-ez-mode](https://github.com/CalamariRadix/gateway-ez-mode/tree/main/packages/sbor-ez-mode), a schema library modelled on Zod for turning Scrypto SBOR Programmatic JSON, the JSON form in which the Gateway returns [SBOR](/developers/transactions/06-sbor)-encoded ledger data, into plain JavaScript objects. It returns [neverthrow](https://github.com/supermacro/neverthrow) `Result` values rather than throwing. Version 1.5.0 split it out of gateway-ez-mode, which re-exports it as `s` and uses it to decode component state and NFT data.

xstelea, the author of [radix-web3.js](/developers/tools/radix-web3-js), contributed `pollTransactionStatus` in [February 2025](https://github.com/CalamariRadix/gateway-ez-mode/pull/4). radix-web3.js's [tribute note](https://github.com/xstelea/radix-web3.js#tribute) names @daan_xrd as the creator of both packages and describes its own `@radix-effects/sbor` as continuing the SBOR decoding API, rebuilt on the Effect library.

gateway-ez-mode installs the official [`@radixdlt/babylon-gateway-api-sdk`](/developers/frontend/02-gateway-sdk) as a dependency. A project that needs Gateway calls beyond these five services uses that SDK directly. Over the 30 days to 23 November 2026 the official SDK recorded [41,865 downloads](https://api.npmjs.org/downloads/point/last-month/@radixdlt/babylon-gateway-api-sdk) and gateway-ez-mode [119](https://api.npmjs.org/downloads/point/last-month/@calamari-radix/gateway-ez-mode).

## Is gateway-ez-mode maintained?

Not actively. Version 1.6.2, published on 29 March 2025, is the last of [13 releases](https://registry.npmjs.org/@calamari-radix/gateway-ez-mode) that began with 1.0.0 on 27 February 2025, and the [last commit](https://github.com/CalamariRadix/gateway-ez-mode/commits/main) landed on 11 April 2025.

Neither the npm package nor the GitHub repository is marked deprecated or archived, and both READMEs warn that the APIs may change at any time. Two pull requests have waited since April 2025: an automated [release](https://github.com/CalamariRadix/gateway-ez-mode/pull/28) that would publish a patch to sbor-ez-mode, and an outside contribution that adds Gateway opt-ins, such as balance changes and detailed events, to the transaction stream ([PR #30](https://github.com/CalamariRadix/gateway-ez-mode/pull/30)). Of the repository's [commits](https://github.com/CalamariRadix/gateway-ez-mode/graphs/contributors), 162 are Daan's, one is xstelea's and five are release automation. The package is MIT-licensed, with the [licence file](https://github.com/CalamariRadix/gateway-ez-mode/blob/main/packages/gateway-ez-mode/LICENSE), copyright Calamari, in its own directory.

## External Links

- [CalamariRadix/gateway-ez-mode – GitHub repository](https://github.com/CalamariRadix/gateway-ez-mode)
- [@calamari-radix/gateway-ez-mode on npm](https://www.npmjs.com/package/@calamari-radix/gateway-ez-mode)
- [@calamari-radix/sbor-ez-mode on npm](https://www.npmjs.com/package/@calamari-radix/sbor-ez-mode)
- [DomainService source](https://github.com/CalamariRadix/gateway-ez-mode/blob/main/packages/gateway-ez-mode/src/services/domain.ts)
- [Calamari – GitHub organisation](https://github.com/CalamariRadix)
- [radix-web3.js tribute note](https://github.com/xstelea/radix-web3.js#tribute)
