@parity/bulletin-sdk
v0.4.0
Published
TypeScript SDK for Polkadot Bulletin Chain
Downloads
5,347
Readme
Bulletin SDK for TypeScript
[!WARNING] This is a reference implementation provided for research, experimentation, and developer education. This code has not been fully audited. It is actively under development and may contain bugs, vulnerabilities, or incomplete features. It is not recommended for production use without independent review. Use at your own risk.
Part of the Polkadot Bulletin Chain.
Off-chain client SDK for Polkadot Bulletin Chain with PAPI integration.
Quick Start
import { AsyncBulletinClient } from '@parity/bulletin-sdk';
import { createClient } from 'polkadot-api';
import { getWsProvider } from 'polkadot-api/ws';
// Setup PAPI
const wsProvider = getWsProvider('ws://localhost:9944');
const papiClient = createClient(wsProvider);
const api = papiClient.getTypedApi(/* chain descriptors */);
// Create client
const client = new AsyncBulletinClient(api, signer);
// Store data using builder pattern
const result = await client.store(data).send();
console.log('Stored with CID:', result.cid.toString());See the examples directory for more usage patterns.
Installation
npm install @parity/bulletin-sdk
# or
yarn add @parity/bulletin-sdkBuild & Test
# Install dependencies
npm install
# Build
npm run build
# Unit tests
npm run test:unit
# Integration tests (requires running node)
npm run test:integrationDocumentation
Complete documentation: docs/book
The SDK book contains:
- Detailed API reference
- Concepts (authorization, chunking, manifests)
- Usage examples and best practices
- PAPI integration guide
- Browser & Node.js usage
Features
- CID calculation (Raw, DAG-PB, DAG-CBOR codecs)
- Automatic chunking (default 1 MiB, configurable)
- DAG-PB manifest generation (IPFS-compatible)
- Authorization management (
authorizeAccount,authorizePreimage) - Data renewal (
renew) - Progress tracking callbacks
- Builder pattern API
- Mock client for testing
- TypeScript types throughout
- Browser & Node.js compatible
Security
See the root README for security notices and responsible deployment guidance.
For Parity's security disclosure process and Bug Bounty program, visit: https://parity.io/bug-bounty
License
Apache-2.0
