Coder Social home page Coder Social logo

cpp-algorand-sdk's Introduction

This is an unofficial C++ library for calling v2 Algorand APIs. Inspired by Algoduino, but needed an implementation that was not tied to Arduino, and could use v2 APIs, which required msgpack of transactions, key handling, etc.

Getting started

  1. Install dependencies. Use make brew-deps if you use brew on a Mac. Otherwise, check that rule in the Makefile for hints on what your system might require. Feel free to send PRs for make ubuntu-deps or similar.

  2. Build. make should be sufficient

  3. Obtain access to an algod (and perhaps indexer) to make your API calls to. For testing, the Agorand Sandbox is excellent. After bringing up a sandbox using the defaults, the variables in .env.sandbox will allow testing algod and indexer APIs. The mnemonics and addresses in .env.sandbox are automatically setup by sandbox with plenty of algos.

  4. You can use ./example as a very simple exercise harness.

Complete

  1. algod APIs
  2. mnemonic/address/key handling
  3. All transaction types (provided as static functions on a unified Transaction class)
  4. Simple (single account) signatures
  5. Logicsigs, including delegated logisigs.
  6. Multisigs, contributed by @avislash

TODO

  1. indexer APIs
  2. kmd APIs
  3. msgpack responses (currently always uses JSON)

cpp-algorand-sdk's People

Contributors

jannotti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cpp-algorand-sdk's Issues

Add Multisig functionality

I'm still relatively new to the Algorand protocol/blockchain development, however, I'd like to help finish implementing the Multisig class definition.

I have a basic understanding from https://developer.algorand.org/docs/features/transactions/signatures/ and it looks like the portion for adding the public addresses and threshold is already taken care of in the constructor. It looks like what needs to be added is the ability to add the sub signatures to sign the transactions and then add those sub signtaures to msgpack.

Let me know if I'm on the right track and if there's anything you recommend I take a look t it.

Thanks!

Missing rapidjson dependency/directory

The README should be updated to include project dependencies so users know that they need to brew install

  • libsodium
  • msgpack
  • openssl v1.1
  • rapidjson
  • curl (currently missing from the Makefile but is needed).

Restructure Repo and Add CMake Build System

I want to propose that we restructure the repo so that all of the header files are contained within an include directory, source files are within a src directory and that tests are within a test directory.

After restructuring I propose that we swap out the current makefile for a CMake build system.

This change will allow the SDK to be presented as a cohesive library that can be checked out and easily integrated into any IDE or development environment and built with CMake. The CMake build system will take all of the files in this repo and produce a single library called libAlgo++ (I'm open to suggestions on the library name).

Add environment setup instructions to README

I recommend adding a section for environment setup to the README that explains the values in .env should be set in the environment the executable is running. I had mistakenly thought the .env file was where values should be set.

Add Unit Testing Framework

I'd like to incorporate the GTest Unit Testing Framework so we have repeatable and automated tests that can be used for regression testing and validation as updates to the SDK are made. My thought is to port the existing example.cpp file into a series of unit tests. that can be expanded upon later.

hmm...

int Transaction::key_count() const {

fixed type schema in an ancillary function will eventually fall out of sync with the real schema presumably defined somewhere else?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.