Typescript utilities for interacting with ArcSpec trading chat channels and marketplace listings.
Store and pass around user identity info.
Connect to nostr chat groups
Talk to nostr relays
Connect to a pool
Manage "maker" listings in group chat channels.
Get the current listing set
Manage "taker" offers in private chat channels.
Get the current list of offers sent to you
Get the set of outstanding offers sent to others
To build and watch, use:
npm start # or yarn start
This builds to /dist
and runs the project in watch mode so any edits you save inside src
causes a rebuild to /dist
.
To do a one-off build, use npm run build
or yarn build
.
To run tests, use npm test
or yarn test
.
Code quality uses prettier
, husky
, and lint-staged
.
Jest tests run with npm test
or yarn test
.
DTS uses Rollup as a bundler and generates multiple rollup configs for various module formats and build settings
Please see the main dts
optimizations docs. In particular, know that you can take advantage of development-only optimizations:
// ./types/index.d.ts
declare var __DEV__: boolean;
// inside your code...
if (__DEV__) {
console.log('foo');
}