Skip to main content

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.

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 schema-template tuple, an on the second place either hash of successful transaction or 'False' if transaction failed for some reason. For example:

[(('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


Download files

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

Source Distribution

waxnftdispatcher-0.2.4.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

waxnftdispatcher-0.2.4-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file waxnftdispatcher-0.2.4.tar.gz.

File metadata

  • Download URL: waxnftdispatcher-0.2.4.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.8.10 Windows/10

File hashes

Hashes for waxnftdispatcher-0.2.4.tar.gz
Algorithm Hash digest
SHA256 a0ac3a251cf7c50afabb4820a64d642a09d67d8b3572811a1f91a40eb67cde45
MD5 264583cc70373c618cb610db4a8da06b
BLAKE2b-256 a2d0436491ddb1e9da087fb16c060772c7c4dcf2554b94015311b9b46fd4af5e

See more details on using hashes here.

File details

Details for the file waxnftdispatcher-0.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for waxnftdispatcher-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4170c50ec0b9d172831816a8178b52c48bd0b469d18c6cb2683b0bd711346fc4
MD5 25e423be73a98c8eac669134ad060787
BLAKE2b-256 c52e4f81e6bacec5e8f1fc0d3e0bb6969bcc297c41afadb983181b421f4a9ed0

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