Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "@bosonprotocol/chat-sdk",
"version": "1.3.0",
"description": "Extension of @xmtp/xmtp-js with support for chat threads and further message types.",
"main": "dist/esm/index.js",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"types": "dist/cjs/index.d.ts",
"scripts": {
"build": "rimraf dist && tsc && tsc --build tsconfig.cjs.json",
"clean": "rimraf dist coverage node_modules",
Expand Down
2 changes: 2 additions & 0 deletions scripts/redemption-loop/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
build
35 changes: 35 additions & 0 deletions scripts/redemption-loop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Redemption Loop

This script allows to commit to an offer and redeem the exchange, passing a delivery info message through the chat layer

## How to build

Be sure you've build the chat-sdk package
```
# in the repo root folder
npm run build
```

## How to run

In the `./scripts/redemption-loop` directory
```
# in the `./scripts/redemption-loop` directory
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated? unnecessary

npm run start
```

By default the CoreSDK environment is "testing"

### Arguments:

- --offerId (required): the offerId to commit to
- --buyerPrivateKey (required): private key of the buyer wallet
- --nbCommits: Nb of times to commit (default: 30)
- --env "testing" (default) | "staging" | "production"
- --xmtpEnv "dev" | "production". Default value depends on the coreSDK env

For instance:
```
npm run start -- --offerId 12 --buyerPrivateKey 0x0132456789...0123456789 --env production --xmtpEnv dev --nbCommits 99
```

Loading