All Projects → baking-bad → netezos

baking-bad / netezos

Licence: MIT license
Netezos is a cross-platform Tezos SDK for .NET developers, simplifying the access and interaction with the Tezos blockchain

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to netezos

tezart
Tezart helps to interact with ​Tezos blockchain.
Stars: ✭ 19 (-40.62%)
Mutual labels:  tezos, tezos-blockchain, tezos-client
pytezos
🐍 Python SDK & CLI for Tezos | Michelson REPL and testing framework
Stars: ✭ 93 (+190.63%)
Mutual labels:  tezos, tezos-blockchain
objkt-swap
Hic et Nunc smart contracts. FA2 multiassets: hDAO, OBJKTs, Marketplace, SUBJKTs and Unregistry.
Stars: ✭ 67 (+109.38%)
Mutual labels:  tezos, tezos-blockchain
granary
Tezos smart contract & dapp development toolkit
Stars: ✭ 67 (+109.38%)
Mutual labels:  tezos, tezos-blockchain
tezedge
Tezos node/shell in Rust. Unfortunately dev has ceased. If you are interested in resurrecting, please contact @drchrispinnock
Stars: ✭ 147 (+359.38%)
Mutual labels:  tezos, tezos-blockchain
harbinger
Harbinger is a decentralized price oracle solution for price feeds on the Tezos network. This repository contains top level documentation for the project.
Stars: ✭ 39 (+21.88%)
Mutual labels:  tezos, tezos-blockchain
tezedge-specification
TLA+ specs and models for the TezEdge node's p2p overlay network, shell, and consensus
Stars: ✭ 19 (-40.62%)
Mutual labels:  tezos, tezos-blockchain
ruby-to-michelson
(Secure) Ruby to Liquidity w/ ReasonML Syntax / Michelson (Source-to-Source) Cross-Compiler Cheat Sheet / White Paper
Stars: ✭ 16 (-50%)
Mutual labels:  tezos
tzscan
The TzScan block explorer for Tezos
Stars: ✭ 12 (-62.5%)
Mutual labels:  tezos
nft-tutorial
Tezos FA2 NFT CLI Tool And Tutorial
Stars: ✭ 81 (+153.13%)
Mutual labels:  tezos
techelson
A test execution engine for Michelson smart contracts.
Stars: ✭ 17 (-46.87%)
Mutual labels:  tezos
tzgo
Golang library for the Tezos blockchain
Stars: ✭ 40 (+25%)
Mutual labels:  tezos
hicetnunc
hicetnunc UI/UX
Stars: ✭ 802 (+2406.25%)
Mutual labels:  tezos
signatory
Signatory - A Tezos Remote Signer for signing block-chain operations with private keys using YubiHSM and Azure Key Vault
Stars: ✭ 35 (+9.38%)
Mutual labels:  tezos
lamtez
An ML-inspired smart contract language, compiling to Tezos' Michelson VM
Stars: ✭ 22 (-31.25%)
Mutual labels:  tezos
secp256k1-ml
Elliptic curve library secp256k1 wrapper for Ocaml
Stars: ✭ 18 (-43.75%)
Mutual labels:  tezos
homebase-app
Homebase is a web application that enables users to create and manage/use DAOs on the Tezos blockchain.
Stars: ✭ 42 (+31.25%)
Mutual labels:  tezos
quipuswap-webapp
🌐 🧙‍♂️ Decentralized application UI for Quipuswap protocol.
Stars: ✭ 21 (-34.37%)
Mutual labels:  tezos
Arronax
Blockchain data analytics tool
Stars: ✭ 30 (-6.25%)
Mutual labels:  tezos
dipdup-py
Modular framework for creating selective indexers and featureful backends for dapps
Stars: ✭ 49 (+53.13%)
Mutual labels:  tezos

Netezos

License: MIT

The first version of the library has been moved to the v1 branch for historical purposes.

Netezos is a cross-platform Tezos SDK for .NET developers, simplifying the access and interaction with the Tezos blockchain.

The following features have been implemented so far:

Namespace Description Status
Netezos.Contracts Interaction with Tezos smart contracts Ready to use. Dynamic wrapper: in progress...
Netezos.Forge Forging (encoding) operation bytes Ready to use
Netezos.Keys Working with keys, HD keys, signing, verifying signature, etc. Ready to use
Netezos.Ledger Interaction with Tezos Ledger App Ready to use (separate package)
Netezos.Rpc Tezos RPC wrapper Ready to use

For full documentation and API Reference, please refer to the Netezos website

Contribution

Netezos is an open development project so any contribution is highly appreciated, starting from documentation improvements, writing examples of usage, etc. and ending with adding new features (as long as these features do not break existing API or are only intended for one person and for very specific use case).

Do not hesitate to use GitHub issue tracker to report bugs or request features.

Support

Feel free to join our Discord server, Telegram chat, or find us in Tezos Dev Slack. We will be glad to hear any feedback and feature requests and will try to help you with general use cases of the Netezos library.

Getting started

Let's consider the most common use case - sending a transaction.

Installation

PM> Install-Package Netezos

Create private key

// generate new key
var key = new Key();

// or use existing one
var key = Key.FromBase58("edsk4ZkGeBwDyFVjZLL2neV5FUeWNN4NJntFNWmWyEBNbRwa2u3jh1");

// use this address to receive some tez
var address = key.PubKey.Address; // tz1SauKgPRsTSuQRWzJA262QR8cKdw1d9pyK

Get some data from RPC

using var rpc = new TezosRpc("https://mainnet-tezos.giganode.io/");

// get a head block
var head = await rpc.Blocks.Head.Hash.GetAsync<string>();

// get account's counter
var counter = await rpc.Blocks.Head.Context.Contracts[address].Counter.GetAsync<int>();

Forge an operation

Since our address has just been created, we need to reveal its public key before sending any operation, so that everyone can validate our signatures. Therefore, we need to send actually two operations: a reveal and then a transaction.

Netezos allows you to pack multiple operations into a group and forge/send it as a single batch.

var content = new ManagerOperationContent[]
{
    new RevealContent
    {
        Source = address,
        Counter = ++counter,
        PublicKey = key.PubKey.GetBase58(),
        GasLimit = 1500,
        Fee = 1000 // 0.001 tez
    },
    new TransactionContent
    {
        Source = address,
        Counter = ++counter,
        Amount = 1000000, // 1 tez
        Destination = "tz1KhnTgwoRRALBX6vRHRnydDGSBFsWtcJxc",
        GasLimit = 1500,
        Fee = 1000 // 0.001 tez
    }
};

var bytes = await new LocalForge().ForgeOperationGroupAsync(head, content);

Sign and send

// sign the operation bytes
byte[] signature = key.SignOperation(bytes);

// inject the operation and get its id (operation hash)
var result = await rpc.Inject.Operation.PostAsync(bytes.Concat(signature));

That is it. We have successfully injected our first operation into the Tezos blockchain.

Useful links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].