{"id":18966151,"url":"https://github.com/aergoio/libaergo","last_synced_at":"2025-04-19T14:12:51.564Z","repository":{"id":41373246,"uuid":"263803259","full_name":"aergoio/libaergo","owner":"aergoio","description":"Native library to interface with Aergo","archived":false,"fork":false,"pushed_at":"2022-12-18T16:32:31.000Z","size":304,"stargazers_count":5,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T08:32:54.646Z","etag":null,"topics":["aergo","blockchain","c","c-plus-plus","c-sharp","ruby","swift","vb-net"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aergoio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-14T03:15:35.000Z","updated_at":"2023-10-21T12:30:33.000Z","dependencies_parsed_at":"2023-01-29T19:30:16.989Z","dependency_job_id":null,"html_url":"https://github.com/aergoio/libaergo","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aergoio%2Flibaergo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aergoio%2Flibaergo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aergoio%2Flibaergo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aergoio%2Flibaergo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aergoio","download_url":"https://codeload.github.com/aergoio/libaergo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249213732,"owners_count":21231096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aergo","blockchain","c","c-plus-plus","c-sharp","ruby","swift","vb-net"],"created_at":"2024-11-08T14:35:58.248Z","updated_at":"2025-04-16T07:32:59.276Z","avatar_url":"https://github.com/aergoio.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![C/C++ CI](https://github.com/aergoio/libaergo/workflows/C/C++%20CI/badge.svg)](https://github.com/aergoio/libaergo/actions)\n\n\u003cp align=\"center\"\u003e\u003cimg width=\"50%\" src=\"https://user-images.githubusercontent.com/7624275/92682929-eaede000-f307-11ea-9c08-7be9125795c5.png\" alt=\"libaergo\"\u003e\u003c/p\u003e\n\nThis library is used to interface with the Aergo blockchains from different programming languages:\n\n* C\n* C++\n* C#\n* VB.NET\n* Swift\n* Ruby\n\nOther languages can also use it via FFI.\n\n\n## Supported OS\n\n* Linux\n* Mac\n* Windows\n* iOS\n* Android\n\n\n## Pre-compiled binaries\n\nYou can download binaries for iOS and Windows in the [releases](https://github.com/aergoio/libaergo/releases)\n\n\n## Dependencies\n\nlibaergo depends on [secp256k1-vrf](https://github.com/aergoio/secp256k1-vrf) and [libcurl](https://github.com/curl/curl)\n\nUse the `http1` branch if you want a version that does not depend on libcurl. Subscriptions to events are not possible on that case.\n\nIt also depends on [hidapi](https://github.com/libusb/hidapi)\nwhen interfacing with a Ledger Nano S\n\n\n### Compiling the dependencies\n\nFirst install the tools required for compilation\n\nOn Linux:\n\n```\nsudo apt-get install gcc make automake libtool libcurl4-openssl-dev -y\n```\n\nOn Mac:\n\n```\nbrew install automake libtool\n```\n\nCompiling and installing `secp256k1-vrf`:\n\n```\ngit clone --depth=1 https://github.com/aergoio/secp256k1-vrf\ncd secp256k1-vrf\n./autogen.sh\n./configure\nmake\nsudo make install\ncd ..\n```\n\nCompiling and installing `hidapi` (only required if using a Ledger device):\n\n```\nsudo apt-get install libudev-dev libusb-1.0-0-dev\ngit clone --depth=1 https://github.com/libusb/hidapi\ncd hidapi\n./bootstrap\n./configure\nmake\nsudo make install\ncd ..\n```\n\n\n## Compiling libaergo\n\n```\nmake\nsudo make install\n```\n\nFor iOS:\n\n```\ncd ../secp256k1-vrf\n./makeios\ncd -\n./makeios\n```\n\n## Usage\n\nYou can link your application to the external dynamic library.\n\nOn some languages you can also include the static library in your project instead of linking to the dynamic library.\n\n\n## Supported Features\n\n* Get Account State\n* Smart Contract Call\n* Smart Contract Query\n* Smart Contract Events Notification\n* Transfer\n\n\n## API\n\n* [Documentation](https://github.com/aergoio/libaergo/wiki)\n* [Exported functions](https://github.com/aergoio/herac/blob/master/aergo.h)\n* [C++ class header](https://github.com/aergoio/herac/blob/master/aergo.hpp)\n\n\n## Examples\n\nThere are many [usage examples](https://github.com/aergoio/herac/tree/master/examples)\navailable for each supported language, for synchronous and asynchronous calls.\n\nCompiling an example code:\n\n### C\n\n```\ngcc examples/contract_call/contract_call.c -laergo -o contract_call\n```\n\n### C++\n\n```\ng++ examples/contract_call/contract_call.cpp -std=c++17 -laergo -o contract_call\n```\n\n### C# and VB.NET\n\nOpen the example in a new project, include the [.NET wrapper](https://github.com/aergoio/libaergo/blob/master/wrappers/dotNet/AergoClient.cs)\nin the project, then build and execute it.\n\nOr compile it via command line: (Windows)\n\n```\nPATH=c:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;%PATH%\ncsc examples\\contract_query\\contract_query.cs wrappers\\dotNet\\AergoClient.cs /r:System.Numerics.dll\n```\n\n### Swift\n\nOpen the example in a new project, include the [Swift wrapper](https://github.com/aergoio/libaergo/blob/master/wrappers/Swift/aergo.swift)\nand the [bridging header](https://github.com/aergoio/libaergo/blob/master/wrappers/Swift/libaergo-Bridging-Header.h)\non the project, then build and execute it.\n\nOr compile it via command line:\n\n```\nswiftc examples/contract_query/main.swift wrappers/Swift/aergo.swift -import-objc-header wrappers/Swift/libaergo-Bridging-Header.h -L/usr/local/lib -laergo\n```\n\n### Ruby\n\nInstall the ffi module:\n\n```\n[sudo] gem install ffi\n```\n\nTo run an example:\n\n```\nruby examples/contract_call/contract_call.rb\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faergoio%2Flibaergo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faergoio%2Flibaergo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faergoio%2Flibaergo/lists"}