This is an example repo that demonstrates loading @namada/sdk
into a simple NodeJS app.
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
There is an example which generates a mnemonic, and derives a transparent keypair using the SDK package:
node src/keygen.js
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
Upcoming improvements:
- Update for TypeScript
- Update to latest
@namada/sdk
when0.15.0
is published. - When the
@namada/sdk
exports issue is fixed, it will be updated accordingly here.