BlockApps-Rest is a Node.js server-side SDK (v8.4.0) for interacting with BlockApps STRATO blockchain platform. It provides abstractions for creating and managing keys, transactions, private chains, querying contract state, and OAuth integration. The library requires a configuration file and a third-party OAuth provider. It is maintained by BlockApps and mirrors their internal development repository. Key differentiators: purpose-built for STRATO, includes utilities for contract lifecycle, and enforces OAuth-based authentication.
npm install blockapps-restNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a user from OAuth token, deploys a simple contract, queries state, and calls a contract method.
Set up an OAuth provider and configure clientId, clientSecret, openIdDiscoveryUrl in config.yaml.
Use the exact template and only replace placeholder values.
Use Node.js 14+ for security and performance, though library may still work on 10.1.
Explicitly pass config object instead of relying on file auto-discovery.
Ensure blockapps-rest is installed and import is correct: `import { rest } from 'blockapps-rest';`Place config.yaml in project root or provide full path: `fsUtil.getYaml(path.join(__dirname, 'config.yaml'))`
Check OAuth token validity, ensure user has sufficient balance (faucet), and increase timeout if transaction not finalized.