GithubHelp home page GithubHelp logo

gianlucamazza / algoduino Goto Github PK

View Code? Open in Web Editor NEW

This project forked from algoduino/algoduino

0.0 1.0 0.0 189 KB

An easy to use C++ Library to interact with the Algorand Blockchain.

Home Page: https://algoduino.com/

License: MIT License

C++ 86.34% C 13.66%

algoduino's Introduction

Algoduino

An easy to use Library to interact with the Algorand Blockchain.

Lead Maintainer: Ted Nivan

Documentation

You can find installation instructions and detailed instructions on how to use this package at the dedicated documentation site.

Example

Get the information of a single transaction.

#include <Algoduino.h>

Algoduino myAlgoduino = Algoduino("<ssid>", "<password>", "<apiKey>", <network>);

void setup()
{
  myAlgoduino.begin();
  Serial.begin(115200);
}

void loop()
{
  TransactionInformation transactionInformation = myAlgoduino.getTransactionInformation("<txid>");

  String type = transactionInformation.type;
  String tx = transactionInformation.tx;
  String from = transactionInformation.from;
  int fee = transactionInformation.fee;
  long first_round = transactionInformation.first_round;
  long last_round = transactionInformation.last_round;
  String noteb64 = transactionInformation.noteb64;
  long round = transactionInformation.round;
  long id = transactionInformation.curxfer.id;
  int amt = transactionInformation.curxfer.amt;
  String snd = transactionInformation.curxfer.snd;
  String rcv = transactionInformation.curxfer.rcv;
  String closeto = transactionInformation.curxfer.closeto;
  int fromrewards = transactionInformation.fromrewards;
  String genesisID = transactionInformation.genesisID;
  String genesishashb64 = transactionInformation.genesishashb64;

  Serial.println("type: " + type);
  Serial.println("txt: " + tx);
  Serial.println("from: " + from);
  Serial.println("fee: " + String(fee));
  Serial.println("first_round: " + String(first_round));
  Serial.println("last_round: " + String(last_round));
  Serial.println("noteb64: " + noteb64);
  Serial.println("round: " + String(round));
  Serial.println("id: " + String(id));
  Serial.println("amt: " + String(amt));
  Serial.println("snd: " + snd);
  Serial.println("rcv: " + rcv);
  Serial.println("closeto: " + closeto);
  Serial.println("fromrewards: " + String(fromrewards));
  Serial.println("genesisID: " + genesisID);
  Serial.println("genesishashb64: " + genesishashb64);
  Serial.println("");

  delay(500);
}

Output from Serial Monitor

type: pay
txt: BIZJ4NW67NRL7OCLCO4DJKURDEUH6MWMWNUCNMDBFVUOBLVHUQRQ
from: PRICEP3G2F5L6ZG5WTJIAKEQW4OJJ3FM4XVFQDZI7M2VBTFVUHTTR2AU2U
fee: 1000
first_round: 7051531
last_round: 7052031
noteb64: eyJwcmljZV9hbGdvX3VzZCI6MC4yNDM0NTczMjg1NTIyMzYzNywicHJpY2VfYWxnb19idGMiOjAuMDAwMDI1Mzc4MTM1NTAzNzEyNDQ4LCJsYXN0X3RyYWRlX2F0IjoiMjAyMC0wNi0wM1QyMTo0ODo0NC4yM1oiLCJ0aW1lc3RhbXAiOiIyMDIwLTA2LTAzVDIxOjQ4OjU4LjIzMFoifQ==
round: 7051533
id: 0
amt: 0
snd: null
rcv: null
closeto: null
fromrewards: 0
genesisID: null
genesishashb64: null

Security

If you discover a security vulnerability within this package, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.

License

MIT © Algoduino

algoduino's People

Contributors

tednivan avatar

Watchers

 avatar

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.