NEM python command line tool
Switch branches/tags
Nothing to show
Clone or download
Latest commit a42cd20 Oct 24, 2015


NEM-py is collection of useful python scripts, that may be used to create and send transactions in nem network.

As of now, the tools require trusted/local NIS server, but it might change if binary serialization will be added to the tools.

Most important elements are:

  • - that wraps (private, public, address) triplet, and that is able to sign binary data
  • - connector to nem network, that wraps data needed to send to nis server in a more convenient api
  • - command line testing tool using the two above


Tools provided in this package should be considered TEST ONLY.

We've spared no effort to make nickel compatible with NEM software, nevertheles nickel might produce incorrect results, NEM development team does NOT take ANY responsibility for any damages.

That being said, nickel passes all the tests from nem-test-vectors (, see for details.

Keep in mind ed25519 implementation used is sample only and must NOT be used in security-related applications.

nickel example usage (node must be BOOTED to execute any nickel commands):

# node info info

# start harvesting harvest --unlock PRIVKEY

# send 123 NEMs to gimre
# (private key, recipient address, amount) transfer 3029c55412442244defb01deef360db9b6ddf4779479e1436e67028dc44ca5f7 \

# associate delegated harvesting account
# (private key, delegated harvesting account public key) remote 3029c55412442244defb01deef360db9b6ddf4779479e1436e67028dc44ca5f7 \

# create multisig account
# (multisig priv key, cosigners public keys....) multisig-create e8da26bf835b3caca4712b8ca7cf893dce6e1cd1e00fe8601a392fea043f69df \
  --add d034e5ce0a58c0dbf6c2e4d353e08c6b41e35fc5f60d65983969210d66a3620c \

# create multisig transfer
# (--multisig multisig public key, cosigner priv key, recipient address, amount) transfer --multisig 2bc0a27779d30862e0ec54de2951a6506ca913165a1bc28f3ce51c7fecfe443f \
  3029c55412442244defb01deef360db9b6ddf4779479e1436e67028dc44ca5f7 \

# co-sign multisig transaction
# (cosigners priv key, inner transaction hash) multisig-signature 823541e7e0a9e61387bcc66dabf3e0b9257ca168437a01907f82c6012ecc896f \
# testing vectors --test-sha3-256-file ..\nem-test-vectors\0.test-sha3-256.dat
test: 1984
2000 PASSED --test-keys-file ..\nem-test-vectors\1.test-keys.dat
test: 9982
10000 PASSED --test-sign-file ..\nem-test-vectors\2.test-sign.dat
test: 9982
10000 PASSED


# create namespace fizz namespace <PRIVATE-KEY> fizz

# create sub-namespace buzz inside fizz namespace <PRIVATE-KEY>

# create mosaic Fizzier inside owned namespace with description
# created mosaic has following 'default' properties:
#   {'divisibility':2, 'initialSupply':1000000, 'supplyMutable':True, 'transferable':True} mosaic <PRIVATE-KEY> "Fizzier is very advanced fizz buzz implementation"

# add or remove some mosaics: mosaic-supply --create <PRIVATE-KEY> 1000 mosaic-supply --destroy <PRIVATE-KEY> 2000

# transfer mosaics transfer --mosaic <PRIVATE-KEY> TBLOODPLWOWMZ2TARX4RFPOSOWLULHXMROBN2WXI 1000000

# this requires some explanation, this will send 10 mosaics (cause divisibility == 2), to bloody rookie,
# the third argument is additional transfer fee, unfortunatelly nickel right now is unable to calculate
# that fee, so if too small fee will be passed, error will be returned, i.e
# transfer --mosaic games.pong.Paddles:1000:50 <PRIV KEY> TBLOODPLWOWMZ2TARX4RFPOSOWLULHXMROBN2WXI 1000000
Attached mosaic: [{'quantity': 1000, 'mosaicId': {'namespaceId': 'games.pong', 'name': 'Paddles'}}]
 [!] prepare failed:
  "status": 400,
  "timeStamp": 11964270,
  "error": "Bad Request"

# last argument in transfer is amount, and it specifies how many "parts" should be send, (it must be multiple of 1 XEM == 1000000 uXem)