Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: create a script to commit/redeem + send delivery info message … #44

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
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 allow to commit to an offer and redeem the exchange, passing a delivery info message through the chat layer
levalleux-ludo marked this conversation as resolved.
Show resolved Hide resolved

## 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
levalleux-ludo marked this conversation as resolved.
Show resolved Hide resolved
```

Loading