streembit-bc-types
v1.0.1
Published
Streembit Blockchain Types
Readme
streembit-bc-types
Purpose
The shared TypeScript types, enums, constants and a few helper functions of the Streembit blockchain.
Requirements
- Node >=26.0.0
- The package has no runtime dependencies.
Install
npm install streembit-bc-typesImport from the package root:
import { TxType, NSkey } from 'streembit-bc-types';Modules
Every module below is re-exported from the package root.
account: address prefix constants,AccountType,AccountMeta,AccountState.asset:AssetId(SBRIT),AssetMeta,SBRITConfig,AssetConfig.block: block and header types,SetAttestation,CreatorApproval, genesis constants and genesis block types,BlockIndex, state diff types.consensus: Proof of Collaboration types — node and peer identity, bootstrap policy,POC_CONSTANTS, validator, deposit, whitelist/blacklist, fraud, engine and protocol message types, Accountable Node types and enums, governance and mint rule sets, mint constants.errors:ErrorCodeenum andErrorContext.routes: REST route path constants (PEER,CHAIN,BLOCK,TX,VALIDATOR,P2P_ROUTES) and their route types,PEER_AUTH_HEADERS,MAX_BLOCK_COUNT,buildBlockByHashRoute,buildTxByIdRoute.transaction:TxType, the transaction interfaces and theTransactionunion, genesis, fee and mint constants, contract metadata and version types, pending multisig record and multisig route messages.namespaces:BatchOp, theNSkeystorage key builders,NamespaceKey,NamespaceValue.contract:ContractFiles, contract execution result types, external payment sale types, contract statement types,SALE_ACCEPTANCE_KIND,IdentityRecord,LookupRequest.blocktransport: theBlockTransportinterface.p2p: signed peer protocol messages —BlockCursor,BlockEnvelope,LatestResponse,BlockRangeRequest,BlockRangeResponse,StateDiffRangeResponse.
Build and test
npm install
npm run build
npm testnpm install also builds the package into dist.
Licence
MIT. See LICENSE.
