This project was created using bun init
in bun v1.1.8. Bun is a fast all-in-one JavaScript runtime.
To install dependencies:
bun install
To install redis:
https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/
To run redis:
redis-server
To run:
Syntax: bun run runner.ts [role] [agent] [initial offer (buyer only)]
- seller:
bun run runner.ts seller ./example-agent.ts "" redis://default:***@***.upstash.io:6379
- buyer:
bun run runner.ts buyer ./example-agent.ts '{"pubkey": "0x123","offerId": "offer_0","initial": true,"data": {"_tag": "offer","query": "hello","price": ["0x100", 200]}}' redis://default:***@***.upstash.io:6379
Example run:
cd example-agent && bun run index.ts
redis-server
cd src && bun run runner.ts seller localhost:3000
redis-cli
, dopublish initial_offers '{"pubkey": "0x123","offerId": "offer_0","initial": true,"data": {"_tag": "offer","query": "hello","price": ["0x100", 200]}}'