avax-python is a Python library and utils for the exploration of the Avalanche AVAX network.
Includes an implementation of basic AVAX API calls.
Clone the git repo and run scripts within the downloaded
git clone https://github.com/ojrdevcom/avax-python.git cd avax-python
If you don't have a
git client available, you may download a ZIP archive instead.
python3 offline/wallet/generate_wallets.py gas ecology detail erase mandate legend fever chicken rule crop detect length shoot tattoo ozone elder present attend seven tonight wild spell dash hedgehog
You can generate several wallets at once by passing a number argument:
python3 offline/wallet/generate_wallets.py 3 orphan decline express slogan hub oven frequent must approve kitchen clarify cargo journey pony armor potato chase during uphold critic cover ankle club media clinic supply vault slice style news front casual predict vital depth among wolf diagram gas used dolphin peasant pact wrong chaos science mixture crowd drill abstract solar magic crash derive chief fish mention sausage tenant drum violin enroll excess wife capable special tent venue predict captain museum question
Given a mnemonic phrase, list AVAX addresses:
python3 offline/wallet/addresses_from_mnemonic.py drill abstract solar magic crash derive chief fish mention sausage tenant drum violin enroll excess wife capable special tent venue predict captain museum question X-avax1j666klq273q0k6h4z4r23hdlh26klkljtkcy78 X-avax1alcjha6py3cr8zgpfedgkx9m5ru8n7tcsftvpz X-avax1al9vxgnaa4wqrqcm0lp097rukkpxhcuhvvcjum X-avax1e8vncqlahdhe75dxrsrlquhpmad2n94ddwmcw4 X-avax1ajxa6v5fmwtcvyymdfkjjkt6hst3dner38fld9 X-avax124fed922xg32amzmg6f0t8e5n5nmf52kklfxns X-avax16kcyxum6vjcxd0gc0pr4rehvkrel7g8we9dtu4 X-avax1s5laylnj539yxvyukrugu55jvlzkcyu2sdun2s X-avax1ceaqyzc0n8379kvj0avanz02qff7ghsxq5hp9m X-avax1tu2m5nrjja2vgdrn49mnt6rn7yskqx5um6rdsc
First, generate user/password credentials for your node.
Then, enter your username and password on
python3 send-x-p.py <dest_P_addr> <amount_nAVA>
to send funds from X-Chain to P-Chain, then
If you update the
api.specification file, then you must regenerate the API metainformation file
To recreate it, run generate_api.py:
spec2py.py script reads the API specification in
api.specification, the grammar in
api.tatsu and generates an AST which can be used to implement the API in any language.
If you need to customize the API, the
api.specification file format is very simple.
api.specificationfile and follow the same syntax for function definitions.
To customize the generator grammar, see the Tatsu documentation
Note that changing the grammar will require changes to
spec2py.py. The generator uses hard coded offsets which will break if the grammar is modified.
If you plan on generating the python files from
sudo pip install TatSu
This software released under the MIT license.
See the LICENSE file in this distribution for details.
Avalanche and AVAX are registered trademarks of Ava Labs Inc.
This is not an official Ava Labs project. We are in no way affiliated with Ava Labs.
This free open source software provided for Avalanche AVAX learning and exploration purposes.