A modern, maintained SDK for building applications on the Blurt blockchain.
@beblurt/dblurt gives JavaScript and TypeScript applications one practical entrypoint for:
Your app / bot / dApp / indexer
|
| @beblurt/dblurt
v
+-----------------------------+
| Typed helpers + crypto |
| Failover JSON-RPC client |
+-----------------------------+
| |
v v
Blurt Layer 1 Nexus Layer 2
chain + consensus social/indexed views
| You want to... | dblurt gives you... |
|---|---|
| Build a Blurt app quickly | Client, typed helpers and ready-to-use RPC examples |
| Read blockchain data | Condenser, Database, Account History and block iteration helpers |
| Build social/community views | Nexus / Bridge helpers for ranked posts, communities, profiles and notifications |
| Broadcast operations | transaction preparation, signing and broadcast helpers |
| Use TypeScript | declaration files shipped with the package |
| Support Node.js and browsers | CommonJS entrypoint plus browser bundle |
| Avoid single-node fragility | sticky RPC failover across an endpoint list |
npm install @beblurt/dblurt
Runtime support is defined by package metadata and generated artifacts, not by hand-maintained version claims. Read the complete compatibility guide: guide/runtime-compatibility.md
const { Client } = require('@beblurt/dblurt');
const rpcList = [
'https://rpc.blurt.blog',
'https://blurt-rpc.saboin.com',
'https://rpc.beblurt.com',
'https://blurtrpc.dagobert.uk',
'https://rpc.drakernoise.com'
];
const client = new Client(rpcList, {
timeout: 15_000,
failoverThreshold: 3
});
async function main() {
const props = await client.condenser.getDynamicGlobalProperties();
console.log('head block:', props.head_block_number);
console.log('last irreversible block:', props.last_irreversible_block_num);
}
main().catch(console.error);
Next step: guide/getting-started.md
| Area | Helper | Layer | What it is for |
|---|---|---|---|
| Condenser | client.condenser |
Blurt Layer 1 | accounts, blocks, witnesses, content, discussions, legacy-compatible calls |
| Database | client.database |
Blurt Layer 1 | appbase database calls such as config, version and account/witness lists |
| Account History | client.accountHistory |
Blurt Layer 1 | block operations and virtual operation queries |
| Broadcast | client.broadcast |
Blurt Layer 1 | prepare, sign and broadcast operations |
| Blockchain helpers | client.blockchain |
Blurt Layer 1 | current block, block ranges, async block/operation iteration |
| Nexus / Bridge | client.nexus |
Nexus Layer 2 | communities, ranked posts, profiles, notifications and referrals |
| Tools | client.tools |
Utility | voting mana, vote value, VESTS conversion and serialization helpers |
For unsupported or newly added RPC methods, use the generic caller:
const result = await client.call('database_api', 'get_dynamic_global_properties', []);
Read the API guide: guide/api-guide.md
Use the published browser bundle from UNPKG:
<script src="https://unpkg.com/@beblurt/dblurt@latest/dist/dblurt.js"></script>
<script>
const rpcList = [
'https://rpc.blurt.blog',
'https://blurt-rpc.saboin.com',
'https://rpc.beblurt.com',
'https://blurtrpc.dagobert.uk',
'https://rpc.drakernoise.com'
];
const client = new dblurt.Client(rpcList);
client.condenser.getDynamicGlobalProperties()
.then(props => console.log(props.head_block_number))
.catch(console.error);
</script>
For npm + bundlers, browser bundle details and security notes, read: guide/browser.md
import { Client, BlockchainMode, ExtendedAccount } from '@beblurt/dblurt';
const client = new Client(rpcList);
async function loadAccount(name: string): Promise<ExtendedAccount | undefined> {
const accounts = await client.condenser.getAccounts([name]);
return accounts[0];
}
async function latestIrreversibleBlock(): Promise<number> {
return client.blockchain.getCurrentBlockNum(BlockchainMode.Irreversible);
}
Read the TypeScript guide: guide/typescript.md
client.broadcast can prepare, sign and broadcast operations when an application supplies the required private key.
Broadcasting has irreversible side effects. The README intentionally keeps the first-run path read-only; read the complete broadcast guide before writing transaction code: guide/broadcast.md
Nexus / Bridge helpers are useful when building social interfaces on top of Blurt, such as ranked feeds, communities, profiles and notifications.
const posts = await client.nexus.getRankedPosts('trending', null, null, 10, 'blurt');
for (const post of posts) {
console.log(`${post.author}/${post.permlink}`);
}
Read the Nexus guide: guide/nexus.md
| Guide | Use it when... |
|---|---|
| Getting started | you want a guided first run |
| API guide | you need to choose the right helper/API |
| Examples | you want copy-paste starting points |
| Runtime compatibility | you need support tables and validation evidence |
| Browser | you use UNPKG, the browser bundle or a bundler |
| Failover | you want robust RPC behavior |
| Broadcast | you sign or broadcast transactions |
| Nexus | you build social/community views |
| Crypto | you handle keys, signatures, assets or memos |
| Security | you need the SDK trust model and application responsibilities |
| Platform parity gap analysis | you need evidence on how dblurt maps to canonical Layer 1 and Nexus |
| FAQ | you have practical integration questions |
| Maintainer workflows | you maintain docs, Makefile targets, TypeDoc or coverage |
| Generated API reference | open docs/index.html after running make docs when you need TypeDoc-generated classes, interfaces and method signatures |
| Resource | Link |
|---|---|
| Core Blurt repository | https://gitlab.com/blurt/blurt |
| dblurt GitLab repository | https://gitlab.com/beblurt/dblurt |
| npm package | https://www.npmjs.com/package/@beblurt/dblurt |
| APPBASE / dblurt documentation | https://dblurt.beblurt.com |
| Blurt Discord | https://discord.blurt.world/ |
| Dev on Blurt community | beblurt.com/community/blurt-101010 |
Share and Enjoy!
You can contact the maintainer in the dev channel of the Blurt Discord server: https://discord.blurt.world/.
Useful Blurt blockchain development posts can also be found in the Dev on Blurt community.
Pull requests for new features, bug fixes and documentation improvements are welcome.
Before opening a pull request, run:
npm ci
npm run build
npm test
npm run typecheck
npm run lint
@nalexadre (https://beblurt.com/@nalexadre) - Blurt blockchain Top 20 Witness.
This package currently declares BSD-3-Clause-No-Military-License in package.json.
See the LICENSE file for the full license text.