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)
# Mint given number of same assets and then try to fetch their IDs
assetsender.mint_assets_and_get_ids("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.
Donation
If you feel like you can send any amount of WAX to the WAX address 24.gm
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.3.6.tar.gz
.
File metadata
- Download URL: waxnftdispatcher-0.3.6.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.9.2 Linux/6.6.13-00891-g1af58030b5c8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ee67a802c5665547d0699ebfc4a5f35c368ef8cc3d1052c64f9daf4e1b7a44c |
|
MD5 | 7736237de743ed250c48b58c1377f03b |
|
BLAKE2b-256 | e3cdd2020034820b5ca0e465762d7b84fa8233670b2145233add4844e1c1e663 |
File details
Details for the file waxnftdispatcher-0.3.6-py3-none-any.whl
.
File metadata
- Download URL: waxnftdispatcher-0.3.6-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.9.2 Linux/6.6.13-00891-g1af58030b5c8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34bd63593ccd31ee86d511873a73c18f98e12cb01cec3c1015ca725718bb718d |
|
MD5 | 42c292b7d81acdfc01857c87e2b9c8ae |
|
BLAKE2b-256 | 014bea8c28e48c76afde8975db7b6c5018b4a60e1f60c8e7a7aac9fc6e2933aa |