Skip to content

This is a simple repo that demonstrates bootstrapping the SDK in a NodeJS application

Notifications You must be signed in to change notification settings

anoma/namada-sdkjs-node-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@namada/sdk - NodeJS Example

This is an example repo that demonstrates loading @namada/sdk into a simple NodeJS app.

Usage

First, install dependencies:

yarn

Optionally, you can update the constants in src/config.js to your liking. This is currently configured for the Campfire Testnet.

Then, you can run the example as follows:

node src/index.js

Deriving Keys

There is an example which generates a mnemonic, and derives a transparent keypair using the SDK package:

node src/keygen.js

Broadcasting a Tx directly to an RPC endpoint

There is also an example that can be run which will properly protobuf-encode your Tx to be broadcasted directly to an RPC endpoint:

node src/protobuf.js

TODO

Upcoming improvements:

  • Update for TypeScript
  • Update to latest @namada/sdk when 0.15.0 is published.
  • When the @namada/sdk exports issue is fixed, it will be updated accordingly here.

About

This is a simple repo that demonstrates bootstrapping the SDK in a NodeJS application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published