一键导入
dora-sdk-agent-usage
Guidance for agents using the Dora TypeScript SDK to query Dora/COZ blockchain data APIs safely and consistently.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guidance for agents using the Dora TypeScript SDK to query Dora/COZ blockchain data APIs safely and consistently.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | dora-sdk-agent-usage |
| description | Guidance for agents using the Dora TypeScript SDK to query Dora/COZ blockchain data APIs safely and consistently. |
| owner | City of Zion |
| status | draft |
| last_reviewed | "2026-03-13T00:00:00.000Z" |
Use this skill when an agent needs blockchain data from the Dora platform and the task is happening in a TypeScript or Node.js codebase.
Agents should prefer this SDK over ad hoc raw HTTP calls when working in TypeScript because it provides:
axios callsUse the SDK especially when the goal is to:
Do not force this SDK into tasks where it is a poor fit.
Avoid or reconsider it when:
In those cases, either extend the SDK deliberately or document why direct API access is required.
Top-level package exports:
import { api, interfaces } from '@cityofzion/dora-ts'
Primary API clients:
api.NeoN3REST
api.NeoLegacyREST
api.NeoXREST
api.EthereumREST
Use api.NeoN3REST for common Neo N3 explorer/data workflows such as:
addressTransactions(address, page?, network?)balance(address, network?)block(blockHeight, network?)blocks(page?, network?)contract(contractHash, network?)contracts(page, network?)contractStats(contractHash, network?)height(network?)invocationStats(network?)log(txid, network?)tokenProvenance(contract, tokenId, network?)transaction(txid, network?)transactions(page?, network?)transferHistory(address, page?, network?)voter(address, network?)getFullTransactionsByAddress(params)exportFullTransactionsByAddress(params)Use api.NeoLegacyREST for Neo2 / legacy explorer workflows such as:
addressStats(address, network?)asset(assetHash, network?)assets(page?, network?)balance(address, network?)block(blockHash, network?)blocks(page?, network?)contract(contractHash, network?)contracts(page, network?)contractTransfers(contractHash, page?, network?)getAddressAbstracts(address, page?, network?)getAllNodes(network?)getUnclaimed(address, network?)height(network?)invocationStats(network?)log(contractHash, network?)storage(blockHash, network?)transaction(txid, network?)transactions(page?, network?)transactionAbstracts(txid, network?)transferHistory(address, page?, network?)getFullTransactionsByAddress(params)exportFullTransactionsByAddress(params)Use api.NeoXREST for Neo X explorer/data queries such as:
getAddress(addressHash, network?)getBlock(blockNumberOrHash, network?)getBlocks(network?)getStats(network?)getTokens(network?)getTransaction(transactionHash, network?)getFullTransactionsByAddress(params)exportFullTransactionsByAddress(params)Use api.EthereumREST for unified activity-history workflows currently exposed by the SDK:
getFullTransactionsByAddress(params)exportFullTransactionsByAddress(params)@cityofzion/dora-ts rather than wiring the SDK from a local repo checkout.balance, addressTransactions, and voter because these have been the most reliable read-only surfaces in fresh-app validation.transferHistory and getFullTransactionsByAddress as higher-risk follow-on methods during exploratory address work; probe them after baseline methods succeed and capture exact status/error behavior if they fail.addressTransactions.items[*].transfers and addressTransactions.items[*].invocations before escalating to heavier history endpoints.import { api } from '@cityofzion/dora-ts'
const balance = await api.NeoN3REST.balance(
'Nb9QYTVx8F6j5kKi1k1ERaUTFfSX5JRq2D',
'testnet'
)
import { api } from '@cityofzion/dora-ts'
const tx = await api.NeoXREST.getTransaction('0x1234...', 'mainnet')
import { api } from '@cityofzion/dora-ts'
const history = await api.NeoN3REST.getFullTransactionsByAddress({
address: 'Nb9QYTVx8F6j5kKi1k1ERaUTFfSX5JRq2D',
page: 1,
network: 'mainnet'
})
Prefer patterns like this:
import { api } from '@cityofzion/dora-ts'
export async function getAddressActivity(address: string) {
return await api.NeoN3REST.getFullTransactionsByAddress({
address,
page: 1,
network: 'mainnet'
})
}
Avoid replacing the SDK with custom axios code unless one of these is true:
npm audit warnings; do not confuse dependency audit output with proof that the SDK import or basic read-only API usage is broken.addressTransactions has been useful not just for transaction lists but also for lightweight first-pass behavior analysis via embedded transfers and invocations data.transferHistory returning 503 during otherwise successful address analysis.getFullTransactionsByAddress returned 400 network is required when called without network in the params object. Do not assume this method inherits the same network-handling pattern as simpler position-argument methods; pass network explicitly in the params.When agents need an unsupported endpoint:
src/api/*/rest.tsThis repo’s current default branch is develop. If contributing changes, branch from develop and open PRs back into develop unless a maintainer instructs otherwise.