Skip to main content

An open source Python tool which runs locally and will automatically claim rewards for all your created offers on dexie.

Reason this release was yanked:

private version

Project description

Overview

An open source Python CLI tool which runs locally and will automatically claim rewards for all your created offers on dexie.

Installing

Install via pip

pip install dexie-rewards

Install via the repository

  1. Clone the repository
git clone git@github.com:dexie-space/dexie-rewards.git
cd ./dexie-rewards/
  1. Activate Poetry Shell
 poetry shell
Spawning shell within ...

❯ emulate bash -c '.../bin/activate'
  1. Install Dexie CLI
 poetry install
Installing dependencies from lock file

Package operations: 54 installs, 1 update, 0 removals

  ...
   Installing chia-blockchain (...)
   Installing rich-click (...)

Installing the current project: dexie-rewards (...)

Configuration

Set CHIA_ROOT and dexie urls (optional)

Dexie CLI needs to know where to connect to the dexie-api and where to find the chia wallet.

 export CHIA_ROOT="~/.chia/testnet10" export DEXIE_URL="https://testnet.dexie.space" export DEXIE_API_URL="https://api-testnet.dexie.space/v1/"

Set DEXIE_DB_PATH (optional)

 export DEXIE_DB_PATH="/dexie_db"

Commands

 dexie --help

 Usage: dexie [OPTIONS] COMMAND [ARGS]...

╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────╮
│ --version      Show the version and exit.                                                               │
│ --help         Show this message and exit.                                                              │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────╮
│ rewards             Manage your dexie rewards for offers                                                │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Rewards

 dexie rewards --help

 Usage: dexie rewards [OPTIONS] COMMAND [ARGS]...

╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────╮
│ --help      Show this message and exit.                                                                 │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────╮
│ claim           Claim all offers with dexie rewards                                                     │
│ list            List all offers with dexie rewards                                                      │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯

list

 dexie rewards list --help

 Usage: dexie rewards list [OPTIONS]

╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────╮
│ --fingerprint  -f  INTEGER  Set the fingerprint to specify which wallet to use                          │
│ --json         -j           Displays offers as JSON                                                     │
│ --help                      Show this message and exit.                                                 │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯

❯ dexie rewards list --help

 Usage: dexie rewards list [OPTIONS]

╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────╮
│ --fingerprint  -f  INTEGER  Set the fingerprint to specify which wallet to use                         │
│ --json         -j           Displays offers as JSON                                                    │
│ --verbose      -v           Display verbose output                                                     │
│ --help                      Show this message and exit.                                                │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────╯


❯ dexie rewards list -f 2149823282 --verbose
24 new offers
0 updated offers
24 claimable offers
2 offers with rewards
╭──────────────────────────────────────────────┬───────────────╮
│                    Offer                      Rewards (DBX) │
├──────────────────────────────────────────────┼───────────────┤
│ Hj7KL4YjEyM8Sa4svzJe9SzunuGBT8wSUjDjXjPxoyDs          0.068 │
│ 2dUtWAAsEbyGEY8G5NtNBsXWNCkZTuyRNjiZxb64Pmzd          0.064 │
├──────────────────────────────────────────────┼───────────────┤
│      Found 2 offers with total rewards                0.132 │
╰──────────────────────────────────────────────┴───────────────╯

❯ dexie rewards list -f 2149823282 --json | jq
[
  {
    "id": "Hj7KL4YjEyM8Sa4svzJe9SzunuGBT8wSUjDjXjPxoyDs",
    "status": 0,
    "date_found": "2023-05-12T07:31:43.086Z",
    "maker_puzzle_hash": "0x1aa36967f74dfc0b85996e9adbe2e646c507b34644c1e17501d790b3838dbdd4",
    "claimable_rewards": 0.068
  },
  {
    "id": "2dUtWAAsEbyGEY8G5NtNBsXWNCkZTuyRNjiZxb64Pmzd",
    "status": 0,
    "date_found": "2023-05-12T08:31:17.874Z",
    "maker_puzzle_hash": "0x1aa36967f74dfc0b85996e9adbe2e646c507b34644c1e17501d790b3838dbdd4",
    "claimable_rewards": 0.064
  }
]

claim

 dexie rewards claim --help

 Usage: dexie rewards claim [OPTIONS]

╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────╮
│ --fingerprint  -f   INTEGER  Set the fingerprint to specify which wallet to use                         │
│ --verify-only  -vo           Only verify the claim, don't actually claim                                │
│ --yes          -y            Skip claim confirmation                                                    │
│ --verbose      -v            Display verbose output                                                     │
│ --help                       Show this message and exit.                                                │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯

❯ dexie rewards claim --verbose
Using wallet with fingerprint: 2149823282
0 new offers
0 updated offers
2 claimable offers
2 offers with rewards
╭──────────────────────────────────────────────┬───────────────╮
│                    Offer                      Rewards (DBX) │
├──────────────────────────────────────────────┼───────────────┤
│ Hj7KL4YjEyM8Sa4svzJe9SzunuGBT8wSUjDjXjPxoyDs          0.068 │
│ 2dUtWAAsEbyGEY8G5NtNBsXWNCkZTuyRNjiZxb64Pmzd          0.064 │
├──────────────────────────────────────────────┼───────────────┤
│      Found 2 offers with total rewards                0.132 │
╰──────────────────────────────────────────────┴───────────────╯
Claim all? [y/n]: y

claims request payload:
{
  "claims": [
    {
      "offer_id": "Hj7KL4YjEyM8Sa4svzJe9SzunuGBT8wSUjDjXjPxoyDs",
      "signature": "89e7e3850cb28968c8b762d4ca84b5f00ea85502b7356245eb8284edd9766344019b0aaf0a9e3298a471296bcc61c9d4017a52fc0151d7e64162d61208c5ed65abd025104915575f5f01307d95238a1a07672675c93b092da5da825eff1cc9af",
      "public_key": "b9ea173a4a26f6bd5b372ac9a559ede742a44578d8f17a7ca631f1a9a1e5257b0ba4a78ec4edb65532b949c1a0d3866d"
    },
    {
      "offer_id": "2dUtWAAsEbyGEY8G5NtNBsXWNCkZTuyRNjiZxb64Pmzd",
      "signature": "b019dc26dc04a5c82c2417b6cb08910897f5d61306bdb005c43595c52612b66c804b145286c9f0731ff773e2ba83142d0b16660e56229f70df1f1cc9aedd715160513f68365925d3c2e10b3b03ae60349092cde75c9284b174023586b4a78b65",
      "public_key": "b9ea173a4a26f6bd5b372ac9a559ede742a44578d8f17a7ca631f1a9a1e5257b0ba4a78ec4edb65532b949c1a0d3866d"
    }
  ]
}

claims result:
{
  "success": true,
  "verified_amount": {
    "Hj7KL4YjEyM8Sa4svzJe9SzunuGBT8wSUjDjXjPxoyDs": 0.068,
    "2dUtWAAsEbyGEY8G5NtNBsXWNCkZTuyRNjiZxb64Pmzd": 0.064
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dexie_rewards-0.0.7.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

dexie_rewards-0.0.7-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file dexie_rewards-0.0.7.tar.gz.

File metadata

  • Download URL: dexie_rewards-0.0.7.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Darwin/22.4.0

File hashes

Hashes for dexie_rewards-0.0.7.tar.gz
Algorithm Hash digest
SHA256 04a69ff2b019f5b1dd16f023191400530de9d0d4a4aa18e9dd8537ff921a4bf2
MD5 ccbb6811ea95a6bea2c264d7e6e3c2f3
BLAKE2b-256 14e56b361672663672cc4d189ad4d557ca369c3d290162710165b61025e60f93

See more details on using hashes here.

File details

Details for the file dexie_rewards-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: dexie_rewards-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Darwin/22.4.0

File hashes

Hashes for dexie_rewards-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3aaf127c85753ec9d2f213edb69acf4e84f1cc2181ddaf8f578e51d5cbe0e04a
MD5 f68db0bda8648cc892ed3e1a15f5823d
BLAKE2b-256 1b504341d3c0373ad3ce669c93e984e647cd3d89dd3976c441377412af377166

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page