Skip to main content

Neo Toolbox

Small toolkit for interacting with the Neo N3 blockchain.

Available tools

  1. Data Transformation
  2. Create Owner Bytes
  3. Create Update Invocation File

Data Transformation

Lets you convert between wallet hashes and addresses.

Example
from neo_toolbox.data_transformation import encode_hash, decode_address

# Encode a wallet hash
original_hash_hex = 'a7271ccc82bb311db369719d1868e6ac19ece31f'
address = encode_hash(original_hash_hex)
print(address)
# Outputs: 'NNpbB25aNMY2pD5JkWeAEbsNfp7C3GoZF1'

# Decode a wallet address
original_address = 'NNpbB25aNMY2pD5JkWeAEbsNfp7C3GoZF1'
hash_hex = decode_address(original_address)
print(hash_hex)
# Outputs: 'a7271ccc82bb311db369719d1868e6ac19ece31f'

Create Owner Bytes

This helper function lets you convert a N3 wallet address to an python variable that can be used in your smart contract to verify the owner of the contract. This is very useful to add admin functionality to your smart contract.

Example
from neo_toolbox.create_owner_bytes import create_owner_bytes

original_address = 'NNpbB25aNMY2pD5JkWeAEbsNfp7C3GoZF1'
code_snippet = create_owner_bytes(original_address)
print(code_snippet)
# Outputs: 'OWNER = UInt160(b"\x1f\xe3\xec\x19\xac\xe6h\x18\x9dqi\xb3\x1d1\xbb\x82\xcc\x1c'\xa7")'

Create Update Invocation File

This helper function lets you create a Neo Express invocation file that can be used to update a smart contract.

Example
from neo_toolbox.create_update_invocation_file import create_update_invocation_file

nef_file = 'path/to/sample_contract.nef'
manifest_file = 'path/to/sample_contract.manifest.json'
template = create_update_invocation_file('your_contract_name', nef_file, manifest_file, operation='my_custom_update')
print(template)
# Outputs a JSON string: '[{"contract": ...'

Created and maintained by Adapted Consulting AS (Norway).

Metadata

Release files for neo-toolbox 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neo-toolbox 0.1.6
File Size Uploaded Provenance Actions
neo-toolbox-0.1.6.tar.gz 3.6 kB Without provenance Details for neo-toolbox-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for neo-toolbox 0.1.6
File Interpreter ABI Platform Actions
neo_toolbox-0.1.6-py3-none-any.whl Python 3 none any Details for neo_toolbox-0.1.6-py3-none-any.whl

Total release size: 7.6 kB

Release files / neo-toolbox-0.1.6.tar.gz

Download URL neo-toolbox-0.1.6.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
959d5bb2bfc0e419d0220ef770fa2c965a911d151347bb5c064ff4ba8a03eedc
BLAKE2b-256 checksum
How to use checksums
7271ede037632022f8871d37ef6e90fe56f001764cf5ebad64371bff0e6dfd3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.8.11 Linux/4.15.0-76-generic

Release files / neo_toolbox-0.1.6-py3-none-any.whl

Download URL neo_toolbox-0.1.6-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
49f0264c857c00629146585f81cb59dca216dffd32cccbae3ae9b05e1157d3c4
BLAKE2b-256 checksum
How to use checksums
f9e98696c80ec6013e5626a176f7a605368e8c5d389180a7778b6929ec3ea66c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.8.11 Linux/4.15.0-76-generic

Security for neo-toolbox 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page