Skip to content

Instantly share code, notes, and snippets.

@Alexhuszagh
Last active June 2, 2018 20:15
Show Gist options
  • Save Alexhuszagh/7bd55cf542b033df10d7f897903696b5 to your computer and use it in GitHub Desktop.
Save Alexhuszagh/7bd55cf542b033df10d7f897903696b5 to your computer and use it in GitHub Desktop.
NEM NIS API Walkthrough

NEM NIS API Walkthrough

Table of Contents

/heartbeat

GET http://176.9.68.110:7890/heartbeat

/status

GET http://176.9.68.110:7890/status

/chain/height

GET http://176.9.68.110:7890/chain/height

/chain/score

GET http://176.9.68.110:7890/chain/score

/account/get

GET http://176.9.68.110:7890/account/get

Key Value
address NDY75BUUEB257O3NOUEIED4LJEGSISY5RG7NOZZI

/namespace

GET http://176.9.68.110:7890/namespace

Key Value
namespace root

/mosaic/definition/page

GET http://176.9.68.110:7890/mosaic/definition/page

Key Value
namespace root

Errors

GET http://176.9.68.110:7890/namespace

Key Value
namespace nem

Transaction

Warning: This exists solely for demonstration purposes to highlight the security risks of sending your private key to a remote node. None of the data here is real. Do not use this in a real application.

POST http://176.9.68.110:7890/transaction/prepare-announce

{ 
       "transaction": 
       { 
              "timeStamp": 100215108, 
              "amount": 1000000000, 
              "fee": 50000,
              "recipient": "TALICELCD3XPH4FFI5STGGNSNSWPOTG5E4DS2TOS", 
              "type": 257, 
              "deadline": 100218708, 
              "message": 
              { 
                     "payload": "Sample message.", 
                     "type": 1 
              }, 
              "version": -1744830463,
              "signer": "a1aaca6c17a24252e674d155713cdf55996ad00175be4af02a20c67b59f9fe8a" 
       }, 
       "privateKey": "68e4f79f886927de698df4f857de2aada41ccca6617e56bb0d61623b35b08cc0"
}

Signed Transaction

{
    "data": "01010000010000984429f90520000000a1aaca6c17a24252e674d155713cdf55996ad00175be4af02a20c67b59f9fe8a50c30000000000005437f9052800000054414c4943454c4344335850483446464935535447474e534e5357504f5447354534445332544f5300ca9a3b0000000017000000010000000f00000053616d706c65206d6573736167652e",
    "signature": "05b545856fb7c40231f9ecd3b980ce7f6f3fed45fc0eb3509d60cec94891610bf646b5da246bcb242d7f9ab504a1558d23d412b189fde30069ebbd58ab197c09"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment