Netezos: forge an operation locally and sign it using Ledger

Baking Bad
Dec 30, 2019 · 2 min read

Netezos is a .NET Standard 2.0 library for working with Tezos. In this blog post, we’ll show you use cases of working with local forging and Tezos Ledger App.

Installation

Netezos.Forge and Netezos.Ledger packages are available on NuGet, a package manager for .NET developers. Thus, you can install the packages via the Nuget Package Manager GUI or the following commands:

PM> Install-Package Netezos.Forge
PM> Install-Package Netezos.Ledger

Or simply clone a project from the GitHub repository:

$ git clone https://github.com/baking-bad/netezos

Getting a public key from the ledger

First of all, we will connect to the ledger and get the address from it.

Let’s go to the Faucet Bot and get some test coins. You can use the 🤑 Get coins option to deposit 100 ꜩ to your tz address, or ➕ Add subscription and set Amount to ensure your balance is always non-zero.

Sending operations

Let’s create an RPC object and get the required data from the chain:

Then we can prepare list of operation content

And now the most interesting thing. Let’s make our transaction really safe. We’ll use a local forging because we don’t trust anyone:

Next, we make it even safer and send it to the ledger for signing:

And finally, we can send it to the node to inject an operation:

Here we go! Now we can check the hash of the operation: https://better-call.dev/babylon/oojc52Qhi7Bzr3fp9Xkb4DWs9jSZ5kFwkf518LYACwRNahmAgui

Automatic content filling is currently in work, also we will provide more documentation for Netezos, so stay with us!

We would also like to remind you that Netezos is an open-developing project, and any kind of contribution is highly appreciated!

Cheers!

Tezos Commons

Thanks to 257Byte

Baking Bad

Written by

Baking-bad.org, Audit & Rating of Tezos bakers. Active Tezos tools contributor. Author of better-call.dev, Pytezos, Netezos, TzKT.io, atomex.me

Tezos Commons

Updates and insights from the global Tezos community

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade