Skip to content
Proyek

Tentang

Steem.js adalah pustaka JavaScript resmi untuk blockchain Steem.

Bisnis dan keuangan

Cara angka ini diukur

Yang dapat Anda lakukan

  • ๐Ÿ”— Correct RPC routing - Legacy read APIs use condenser_api; chain/validation APIs use database_api (v1.0.16+, aligned with steem)
  • ๐Ÿ”’ Type Safety - Full TypeScript support with complete type definitions
  • โšก Modern - ES modules, async/await, modern cryptography libraries
  • ๐ŸŒ Universal - Works in Node.js, browsers, and bundlers

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
0
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

Steem.js

A modern JavaScript/TypeScript library for interacting with the Steem blockchain. Complete refactoring with TypeScript, modern tooling, and improved security.

npm version License: MIT

๐Ÿ“š Documentation

๐Ÿ‘‰ Complete API Documentation - Comprehensive guide with all methods, examples, and usage patterns

API routing (condenser_api vs database_api) - How RPC namespaces map to current Steem nodes (v1.0.16+)

๐Ÿ“‹ Changelog - Version history and breaking changes

๐Ÿ”ง Refactoring Details - Technical details about the 2025 modernization

๐Ÿš€ Quick Start

Requirements

  • Node.js: >= 22.23.4 (LTS recommended)
  • Browser: Modern browsers with Web Crypto API support

Installation

# npm
npm install @steemit/steem-js

# pnpm (recommended)
pnpm install @steemit/steem-js

# yarn
yarn add @steemit/steem-js

Basic Usage

import { steem } from '@steemit/steem-js';

// Configure API endpoint
steem.config.set({
  nodes: ['https://api.steemit.com'],
  address_prefix: 'STM'
});

// Get account information
const accounts = await steem.api.getAccountsAsync(['username']);
console.log(accounts[0]);

// Vote on a post
const postingWif = steem.auth.toWif('username', 'password', 'posting');
await steem.broadcast.voteAsync(postingWif, 'voter', 'author', 'permlink', 10000);

Browser Usage

<script src="https://cdn.jsdelivr.net/npm/@steemit/steem-js/dist/index.umd.min.js"></script>
<script>
  steem.config.set({ nodes: ['https://api.steemit.com'] });
  steem.api.getAccountsAsync(['username']).then(console.log);
</script>

โœจ Key Features

  • ๐Ÿ”— Correct RPC routing - Legacy read APIs use condenser_api; chain/validation APIs use database_api (v1.0.16+, aligned with steem)
  • ๐Ÿ”’ Type Safety - Full TypeScript support with complete type definitions
  • โšก Modern - ES modules, async/await, modern cryptography libraries
  • ๐ŸŒ Universal - Works in Node.js, browsers, and bundlers
  • ๐Ÿ” Secure - Proper cryptographic implementations, no key exposure
  • ๐Ÿ“– Well Documented - Comprehensive API documentation with examples

๐Ÿ—๏ธ Development

# Install dependencies
pnpm install

# Build the library
pnpm build

# Run tests
pnpm test

# Type checking
pnpm typecheck

๐Ÿ“ฆ What's New in 2025

This is a complete modernization of the original steem-js library:

  • โœ… TypeScript Migration - Full type safety and better developer experience
  • โœ… Modern Dependencies - Replaced outdated crypto libraries (bigi โ†’ bn.js, ecurve โ†’ elliptic)
  • โœ… Modern Crypto - Using @noble/hashes and @noble/ciphers for universal browser/Node.js compatibility
  • โœ… Build System - Migrated from Webpack to Rollup for better output
  • โœ… Testing - Migrated from Mocha to Vitest with 95.8% test coverage
  • โœ… Security - Fixed insecure random number generation and crypto implementations

๐Ÿ“‹ Project Structure

src/
โ”œโ”€โ”€ api/          # Blockchain API client (HTTP; methods.ts โ†’ condenser_api / database_api / โ€ฆ)
โ”œโ”€โ”€ auth/         # Authentication and key management
โ”œโ”€โ”€ broadcast/    # Transaction broadcasting
โ”œโ”€โ”€ crypto/       # Cryptographic utilities
โ”œโ”€โ”€ formatter/    # Data formatting helpers
โ”œโ”€โ”€ memo/         # Encrypted memo handling
โ”œโ”€โ”€ operations/   # Operation type definitions
โ”œโ”€โ”€ serializer/   # Transaction serialization
โ””โ”€โ”€ utils/        # Utility functions

๐Ÿ”— Links

๐Ÿ“„ License

MIT - see LICENSE file for details.


๐Ÿ’ก Need help? Check the complete documentation for detailed examples and API reference.

Jelajahi proyek terkait

Memuatโ€ฆ