Skip to content

cennznet/hackathon-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hackathon Setup

This is a simple repo that shows how to send a transaction to the TestNet (Nikau🌴, using the CENNZnet API.

index.js demonstrates how to:

  1. Connect an api session object with a CENNZnet node
  2. Load a keypair
  3. Send a transaction to say hi!

Install

  1. clone the repo
  2. yarn

Run it

Supply your message, path to keypair.json and the password

node index.js "hello CENNZnet!" ./myKeyPair.json  password

You can use the CENNZnet Portal to create an account. The keypair.json is downloaded to your machine when you create the account.

The user guide for the CENNZnet Portal can be found here.

Output

My CENNZnet address is: 5FWEHQqYMN8YCg8yJxKHnon7Dtx4Psp2xnjvKfQqGC6kUwgv
Connecting to CENNZnet...
Saying hello...

Said hello 🚀: 'hello world'
Tx hash: 0x0390f6ea97a38ef762db8c44b4e69c5d7ebf9fed9dd726ce6007162f2d3acef7

Go to UNcover to view the transaction! Screen Shot 2021-05-28 at 14 26 12

About

Example api script for hackathon setup

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •