This library will help you to transfer or to mint NFTs on the WAX blockchain
Project description
waxNFTdispatcher
This library will help you to transfer or to mint NFTs on the WAX blockchain. It relies on the library pyntelope for blockchain interaction and on the library loguru for beautiful logs.
By default, the EOSUSA WAX API is used to post transactions to blockchain. It can be changed while creating an object. Due to some limitations only EOSUSA API can be used to get transaction info from blockchain.
Installation
poetry add waxNFTdispatcher
or
pip install waxNFTdispatcher
Usage
from waxNFTdispatcher import AssetSender
import os
private_key = os.environ["PRIVATE_KEY"]
collection_wallet = "mywallet.wam"
collection = "pixeltycoons"
recipient = "recipient.wam"
INPUT = (("rawmaterials", "318738"), ("magmaterials", "416529"))
# Create object
assetsender = AssetSender(collection, collection_wallet, private_key)
# Try to find assets in the collection wallet to send them.
# If not all needed assets were in the collection wallet, the script will mint the rest.
assetsender.send_or_mint_assets(INPUT, recipient)
# Send assets with given asset ID to the given wallet
assetsender.send_assets(("1099543811405", "1099543811406"), recipient)
# Mint given number of same assets
assetsender.mint_assets("rawmaterials", "318738", "recipient.wam", 5)
The methods return tuple or list of tuples where on the first place is the asset ID or id-schema-template tuple, and on the second place either hash of successful transaction or 'False' if transaction failed for some reason. For example:
[(('1099511811820', 'rawmaterials', '318738'), False),
(('1099511811819',), '6b80b145aa261736941583ed17802a8be0254cd21a78b6bb415c923ec64ad32c')]
Contribution
Contribution is highly welcome. Please send your pull requests or create issues with found bugs and suggestions. In your pull requests please use Black formatting.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file waxnftdispatcher-0.2.91.tar.gz
.
File metadata
- Download URL: waxnftdispatcher-0.2.91.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.9 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ba95f9e22b566b7adce0ae8c67083e53f4fda217038a3fe2f195edb639581e7 |
|
MD5 | 6d601a7b0051cf5b2cbac10c15aef7f1 |
|
BLAKE2b-256 | 377081d6ad055d7e49040c7157908801545ba7140253bb1a8b84cef7e22c6d17 |
File details
Details for the file waxnftdispatcher-0.2.91-py3-none-any.whl
.
File metadata
- Download URL: waxnftdispatcher-0.2.91-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.9 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49ed317c15946ad61b1a1ae63e85092f12a217b2808fd7c4ad49a2d9417d4c33 |
|
MD5 | 3d19dbc365bb3e16a5860a277ba19880 |
|
BLAKE2b-256 | 42342d19386b0057cb12e0e779db68eaa9ae67b724ce796c009a9a3e2e181a14 |