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 (...)

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/"

Commands

 dexie --help

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

╭─ Options ─────────────────────────────────────────────────────────────────────────────────────╮
│ --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 [required]  │
│    --json         -j           Displays offers as JSON                                        │
│    --help                      Show this message and exit.                                    │
╰───────────────────────────────────────────────────────────────────────────────────────────────╯


❯ dexie rewards list -f 2149823282 --json | jq
[
  {
    "id": "9D1P2oTKhLveYosRiksTczSjX9pW6okAvNL5XVQEwHsD",
    "status": 0,
    "date_found": "2023-04-22T03:38:50.363Z",
    "date_rewards_since": "2023-04-24T08:52:48.366Z",
    "maker_puzzle_hash": "0x1aa36967f74dfc0b85996e9adbe2e646c507b34644c1e17501d790b3838dbdd4",
    "claimable_rewards": 0.669
  },
  {
    "id": "BSqJs63Pf1DV4kBc2hTv8G9ZFgytMbWWtkoLnCmzu1LV",
    "status": 0,
    "date_found": "2023-04-22T03:38:19.712Z",
    "date_rewards_since": "2023-04-24T08:52:48.366Z",
    "maker_puzzle_hash": "0x1aa36967f74dfc0b85996e9adbe2e646c507b34644c1e17501d790b3838dbdd4",
    "claimable_rewards": 0.9
  }
] dexie rewards list -f 2149823282
╭──────────────────────────────────────────────┬───────────────╮
│                    Offer                      Rewards (DBX) │
├──────────────────────────────────────────────┼───────────────┤
│ 9D1P2oTKhLveYosRiksTczSjX9pW6okAvNL5XVQEwHsD          0.669 │
│ BSqJs63Pf1DV4kBc2hTv8G9ZFgytMbWWtkoLnCmzu1LV          0.900 │
╰──────────────────────────────────────────────┴───────────────╯

claim

 dexie rewards claim --help

 Usage: dexie rewards claim [OPTIONS]

╭─ Options ─────────────────────────────────────────────────────────────────────────────────────╮
│ *  --fingerprint  -f   INTEGER  Set the fingerprint to specify which wallet to use [required] │
│    --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 -f 2149823282 --verbose
╭──────────────────────────────────────────────┬───────────────╮
│                    Offer                      Rewards (DBX) │
├──────────────────────────────────────────────┼───────────────┤
│ 9D1P2oTKhLveYosRiksTczSjX9pW6okAvNL5XVQEwHsD          0.669 │
│ BSqJs63Pf1DV4kBc2hTv8G9ZFgytMbWWtkoLnCmzu1LV          0.900 │
╰──────────────────────────────────────────────┴───────────────╯
Total Rewards: 1.569 DBX
Claim all? [y/n]: y

claims request payload:
{
  "claims": [
    {
      "offer_id": "9D1P2oTKhLveYosRiksTczSjX9pW6okAvNL5XVQEwHsD",
      "signature": "a911020f0d60082bda371c0237f4d81797ac868ca8f6fcf71b5477857802543f9aba7b85f7a8240ba2afaf60c3449c66105f33b7a5511b3fb75296aa33f33c517aed9ce8544e513235745818597d10d8889b103307a5c507d1638e724bad0ce5",
      "public_key": "b9ea173a4a26f6bd5b372ac9a559ede742a44578d8f17a7ca631f1a9a1e5257b0ba4a78ec4edb65532b949c1a0d3866d"
    },
    {
      "offer_id": "BSqJs63Pf1DV4kBc2hTv8G9ZFgytMbWWtkoLnCmzu1LV",
      "signature": "80ef07c8156b07731bd4dd647b32de47ad0831581765963eaff619f5bdf7b2a05666db7d8da742c24b6d3055f9555f9f07ad51b4ac6ddc75d6644d4f5854195e7c45f0e42aba45033ea2257a528ed60e61084598e1513eba074c39e831832236",
      "public_key": "b9ea173a4a26f6bd5b372ac9a559ede742a44578d8f17a7ca631f1a9a1e5257b0ba4a78ec4edb65532b949c1a0d3866d"
    }
  ]
}

claims result:
{
  "success": true,
  "verified_amount": {
    "9D1P2oTKhLveYosRiksTczSjX9pW6okAvNL5XVQEwHsD": 0.669,
    "BSqJs63Pf1DV4kBc2hTv8G9ZFgytMbWWtkoLnCmzu1LV": 0.9
  }
}

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.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

dexie_rewards-0.0.1-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dexie_rewards-0.0.1.tar.gz
  • Upload date:
  • Size: 12.6 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.1.tar.gz
Algorithm Hash digest
SHA256 f0dfc77be3539e0ea7419dfe07581e23726ffd6029372291cf05f716f72dae9f
MD5 1589460d85a96cd5878f9c7d0a953ee6
BLAKE2b-256 eaa42d26a774509e15b632fdbe1e121e125f21da63db8e364f095ffa8c9617e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dexie_rewards-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c33b989194d1e440bd2da3b7902740dfadd66d6e296d40ccdb852b670e76ed5
MD5 03aa3649dbcd5c6783d64723a1e3d01a
BLAKE2b-256 b70f0e807f29ec9c29185718c22213f3cf788233758da25ffec870b44c078da5

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