sui-grpc
>-
Works with
---
name: sui-grpc
description: >-
license: MIT
---
# Sui: Read the chain over gRPC
## Purpose
The canonical way to read Sui in 2026. One client covers balances, objects, transactions, metadata, and name service.
> **JSON-RPC is being retired (mainnet: July 31, 2026).** `SuiClient` / `suix_*` / `sui_*` HTTP methods stop working on public fullnodes. Everything below is the replacement surface, verified against mainnet.
## Setup
```js
import { SuiGrpcClient } from '@mysten/sui/grpc';
const client = new SuiGrpcClient({
baseUrl: 'https://fullnode.mainnet.sui.io',
network: 'mainnet',
});
```
## The reads
```js
// One coin balance (owner + coinType)
const { balance } = await client.core.getBalance({
owner: '0x…',
coinType: '0x2::sui::SUI',
});
// balance.balance = total, split into coinBalance + addressBalance (SIP-58)
// Every balance an address holds
const { balances } = await client.core.listBalances({ owner: '0x…' });
// Coin metadata (decimals, symbol) — never hardcode decimals
const { coinMetadata } = await client.core.getCoinMetadata({
coinType: '0xdba3…::usdc::USDC',
});
// Objects an address owns
const { objects, hasNextPage, cursor } = await client.core.listOwnedObjects({
owner: '0x…',
limit: 50,
});
// each: { objectId, version, digest, type, owner, content }
// One object / one transaction
const obj = await client.core.getObject({ objectId: '0x…' });
const tx = await client.core.getTransaction({ digest: '…' });
// SuiNS
const { record } = await client.nameService.lookupName({ name: 'audric.sui' });
```
## Rules
1. **Amounts are strings/bigints in base units.** Scale by `coinMetadata.decimals` for display; never `parseFloat` raw chain values into math you'll transact on.
2. **A balance has two pots (SIP-58).** `coinBalance` (coin objects) + `addressBalance` (address-balance accumulator) sum to `balance` — report the total unless debugging transfers.
3. **Paginate.** `listOwnedObjects` / `listCoins` return `cursor` + `hasNextPage`; loop until done for full inventories.
4. **Don't write from this skill.** Building + signing transactions is wallet territory — use the t2000 Agent Wallet (`t2 send · swap · pay`) or `@t2000/sdk`, which run on this same gRPC surface.
## Field-masked reads (advanced)
Large objects/transactions support read masks to fetch only what you need:
```js
const tx = await client.ledgerService.getTransaction({
digest: '…',
readMask: { paths: ['effects', 'events'] },
});
```
## Gotchas
- The gRPC client returns **BigInt** for u64s — `JSON.stringify` throws on them; convert with a replacer: `(k, v) => typeof v === 'bigint' ? v.toString() : v`.
- `getBalance` takes `owner`, not `address` — a wrong key name errors as `missing owner`.
- Public fullnode gRPC is rate-limited like RPC was; batch via list endpoints instead of hammering singles.More API Design skills
lark-event
larksuite/cli
Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via `lark-cli event consume <EventKey>` (covers IM messages/reactions/chat changes, Approval status changes, Task updates, VC meeting started/joined/ended, Minutes generated, Whiteboard updated, etc.). Use for Lark bots, real-time message processing, long-running subscribers, streaming webhook/push handlers. Supports `--max-events` / `--timeout` bounded runs and a stderr ready-marker contract — designed for AI agents running as subprocesses.
lark-contact
larksuite/cli
飞书 / Lark 通讯录:按姓名 / 邮箱解析成 open_id,或按 open_id 反查姓名 / 部门 / 邮箱 / 联系方式 / 个人状态 / 签名,以及按关键词搜索当前用户可见的机器人 / 智能体(agent)。当用户提到一个名字要下一步发消息 / 排日程,或拿到 open_id 想查具体信息时使用。不负责部门树遍历、按部门列员工、组织架构图,这类需求走原生 OpenAPI。
lark-openapi-explorer
larksuite/cli
飞书/Lark 原生 OpenAPI 探索:从官方文档库中挖掘未经 CLI 封装的原生 OpenAPI 接口。当用户的需求无法被现有 lark-* skill 或 lark-cli 已注册命令满足,需要查找并调用原生飞书 OpenAPI 时使用。

