Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ark-iot/ark-cpp
Ark: Cpp || a C++ Ark Ecosystem Wrapper for Machines ||
https://github.com/ark-iot/ark-cpp
arduino ark ark-blockchain arkecosystem blockchain cpp cryptocurrency devnet mcu
Last synced: 3 months ago
JSON representation
Ark: Cpp || a C++ Ark Ecosystem Wrapper for Machines ||
- Host: GitHub
- URL: https://github.com/ark-iot/ark-cpp
- Owner: ARK-IoT
- Archived: true
- Created: 2018-02-01T18:18:03.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-28T00:31:11.000Z (about 6 years ago)
- Last Synced: 2024-08-03T18:20:22.214Z (7 months ago)
- Topics: arduino, ark, ark-blockchain, arkecosystem, blockchain, cpp, cryptocurrency, devnet, mcu
- Language: C++
- Homepage:
- Size: 8.06 MB
- Stars: 5
- Watchers: 5
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-ark - Ark-Cpp - API Wrapper in Arduino/C++. (Libraries)
README
![]()
## THIS LIBRARY IS DEPRECATED AND IS NO LONGER MAINTAINED
**This Repo is archived for historical reference****You can find the current Ark Cpp SDK's at the following links:**
https://github.com/ArkEcosystem/cpp-client
https://github.com/ArkEcosystem/cpp-crypto# Ark for Machines v0.8






[](https://travis-ci.org/Ark-IoT/Ark-Cpp)
[](https://ci.appveyor.com/project/Ark-IoT/ark-cpp)
Not production ready.
# Supported Boards
- [X] ESP8266 https://www.adafruit.com/product/2821 // Development board
- [X] ESP32 https://www.adafruit.com/product/3405#### What can this do?
GET information from the Ark Blockchain using Arduino boards.
Create models of basic Ark "types." (e.g. Accounts, Blocks, Delegates, Peers, etc)#### What CAN'T this do (yet)?
Generate Ark Addresses & Signatures.
Create Signed transaction for broadcast to the Ark Ecosystem.# How to use this
1) Define the network
> ARK::Network devnet = ARK::Constants::Networks::Devnet::model;or
> ARK::Network devnet {
"578e820911f24e039733b45e4882b73e301f813a0d2c31330dafda84534ffa23",
"DARK",
"DѦ",
"https://dexplorer.ark.io/",
30
};2) Create the manager instance
> ARK::API::Manager arkManager(devnet)3) Use manager to get info from the Ark Blockchain
> auto status = arkManager.loaderStatus()
> Serial.print(status)
> prints {
"success":true,
"loaded":false,
"now":2348744,
"blocksCount":0
}## Examples
Get VendorField of a given Transaction ID using the ESP8266
```cpp
/*
* demo_sketch.ino
*/#include
const char* ssid = "yourSSID";
const char* password = "yourWiFiPassword";void testVendorField()
{
Network devnet = Constants::Networks::Model::Devnet;
ARK::API::Manager arkManager(devnet);Hash txID = "4e68a917d06382ce335656eef5560a537fc806ecadf3972c5221b86babecc63e";
auto vendorField = arkManager.getVendorField(txID);
Serial.print("\nvendorField: ");
Serial.println(vendorField);
}void setup()
{
Serial.begin(115200);
reportFreeHeap();
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println();testVendorField();
}void loop(){}
```
> vendorField: 1ARK-GOLang is saying whoop whooop#
Get Ark Account from a given Ark Address
```cpp
Address darkAddress("DHQ4Fjsyiop3qBR4otAjAu6cBHkgRELqGA");
auto account = arkManager.account(darkAddress);
Serial.print("\naccount: ");
Serial.println(account);
```
> account:
> address: DHQ4Fjsyiop3qBR4otAjAu6cBHkgRELqGA
> unconfirmedBalance: 106914.85341862
> balance: 106914.85341862
> publicKey: 0275776018638e5c40f1b922901e96cac2caa734585ef302b4a2801ee9a338a456
> unconfirmedSignature: 1
> secondSignature: 1
> secondPublicKey: 03ad2a481719c80571061f0c941d57e91c928700d8dd132726edfc0bf9c4cb2869
> multisignatures:
> u_multisignatures:## todo
- [ ] API
- [x] add models & constants
- [x] add static endpoints
- [x] Network manager
- [X] Network Client
- [X] API Gets
- [ ] API Posts
- [ ] test api posts
- [ ] finish api posts
- [ ] Error Handling
- [X] test error handling
- [ ] finish error handling- [ ] Crypto
- [ ] Test Crypto
- [X] test sha256
- [X] test bigint
- [X] test secp256k1 ECDSA
- [X] test ripemd160
- [X] test base58
- [X] test Address generation
- [ ] test Signing/Signature Generation
- [ ] Add Crypto
- [X] add sha256
- [X] add bigint
- [X] add secp256k1 ECDSA
- [X] add ripemd160
- [X] add base58
- [X] add Address generation
- [ ] add Signing/Signature Generation- [ ] TODO
- [ ] Documentation
- [ ] Handle Large Callbacks