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 -f 2149823282
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",
    "date_rewards_since": "2023-05-12T12:35:44.370Z",
    "maker_puzzle_hash": "0x1aa36967f74dfc0b85996e9adbe2e646c507b34644c1e17501d790b3838dbdd4",
    "claimable_rewards": 0.068
  },
  {
    "id": "2dUtWAAsEbyGEY8G5NtNBsXWNCkZTuyRNjiZxb64Pmzd",
    "status": 0,
    "date_found": "2023-05-12T08:31:17.874Z",
    "date_rewards_since": "2023-05-12T12:35:44.364Z",
    "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.4.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

dexie_rewards-0.0.4-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dexie_rewards-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 2ed6a48338862195ef74be4e6ac09487ddabef45f34e0f07f718c2ec4d86328b
MD5 ad633b39dcef76b84e4a5eb7eb2215ff
BLAKE2b-256 4466eaa1a8dbc503b61b0d3b06d8eb370974dad446c9db06a8a55038ceadd01d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dexie_rewards-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 18.4 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2b52e9a33d8655bd2f1f44617d9a81bc89b4df3c14469900b00279b90133451f
MD5 cc50391a21157436ae1df1af608b9d2b
BLAKE2b-256 df6e154625d8f28d720f9422d2107a133e8f7fa9d3c0aad3606a178a3d0e1d15

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