{"id":22243691,"url":"https://github.com/kompendium-ano/pegnetd-haskell-client","last_synced_at":"2025-12-11T23:27:13.701Z","repository":{"id":62435549,"uuid":"211528137","full_name":"kompendium-ano/pegnetd-haskell-client","owner":"kompendium-ano","description":"Haskell JSON-RPC client for PegNet","archived":false,"fork":false,"pushed_at":"2020-12-16T09:46:48.000Z","size":63,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-07T19:07:51.081Z","etag":null,"topics":["api","api-client","factom","haskell","pegnet","rpc-client"],"latest_commit_sha":null,"homepage":"https://github.com/pegnet/pegnetd/wiki/API","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kompendium-ano.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":"2019-09-28T16:18:32.000Z","updated_at":"2021-03-03T13:35:16.000Z","dependencies_parsed_at":"2022-11-01T21:32:33.295Z","dependency_job_id":null,"html_url":"https://github.com/kompendium-ano/pegnetd-haskell-client","commit_stats":null,"previous_names":["sigrlami/api-rpc-pegnet"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kompendium-ano/pegnetd-haskell-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kompendium-ano%2Fpegnetd-haskell-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kompendium-ano%2Fpegnetd-haskell-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kompendium-ano%2Fpegnetd-haskell-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kompendium-ano%2Fpegnetd-haskell-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kompendium-ano","download_url":"https://codeload.github.com/kompendium-ano/pegnetd-haskell-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kompendium-ano%2Fpegnetd-haskell-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27672064,"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","status":"online","status_checked_at":"2025-12-11T02:00:11.302Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","api-client","factom","haskell","pegnet","rpc-client"],"created_at":"2024-12-03T04:28:33.918Z","updated_at":"2025-12-11T23:27:13.672Z","avatar_url":"https://github.com/kompendium-ano.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haskell JSON-RPC client for PegNet daemon\n![build](https://github.com/kompendium-ano/pegnetd-haskell-client/workflows/build/badge.svg)\n![Hackage](https://img.shields.io/hackage/v/api-rpc-pegnet)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/kompendium-llc/api-rpc-factom/blob/master/LICENSE)\n\nA JSON-RPC Haskell client for the PegNet [API](https://github.com/pegnet/pegnetd/wiki/API) daemon. Allows retrieval of data from PegNet dApp. Each response has special ADT(algebraic data type) that automatically converted from JSON response. Using [Remote Monad](https://ku-fpg.github.io/files/Gill-15-RemoteMonad.pdf) pattern multiple request can be batched and executed simulatenously, following more robust approach and reducing usage of expensive RPC calls.\n\nChoosing a batching strategy. There are two strategies:\n- `Weak`   - a single command or a single procedure, or\n- `Strong` - a sequence of commands, optionally terminated by a procedure\n\n1. [Installation](#installation)\n2. [Usage](#usage)\n3. [Contributions](#contributions)\n\n## Installation\n\nYou can install package from [Hackage](https://hackage.haskell.org/package/api-rpc-pegnet) and build with Cabal, but we recommend to use [Stack](https://haskellstack.org) tool. Add to you dependencies in stack.yaml and cabal file dependency `- api-rpc-pegnet`.\n\nTo run and test from repository:\n\n1. Build with stack\n```bash\n$ stack build\n```\n\n2. Load REPL with stack for evaluation\n```\n$ stack repl\n```\n\n3. execute required methods\n\n## Usage\n\nfor basic daemon functionality\n\n1. import with\n\n```haskell\nimport PegNet.RPC.Api\n```\nor load in REPL.\n\n2. build communication session with\n```\nweakSession (traceSendAPI \"\" $ clientSendAPIWithAlt endpoint)\n```\n\n3. run required methods inside `RPC` monad\n\n## Usage\n\nYou can construct simple session with all methods available for further processings. Check following execution\n\n```haskell\nmain = do\n  -- build communication session\n  let s = weakSession $ traceSendAPI \"\" $ clientSendAPIWithAlt endpointRemote\n  (h, i) \u003c- send s $ do\n         h \u003c- reqGetSyncStatus\n         i \u003c- reqPegNetIssuance\n         b \u003c- reqPegNetBalances \"FA38cwer93mmPw1HxjScLmK1yF9iJTu5P87T2vdkbuLovm2YXyss\"\n         t \u003c- reqGetTransaction \"0-e4380e6334b0c42d4d6155fbd1378050b91c02a0df93d7fdfe6656f94c61e7eb\"\n         r \u003c- reqPegNetRates 213000\n         s \u003c- reqGetTransactionStatus \"a33d4f334a2658c17d3f44158af75f1c32cc6b2f3de9ddc337064c93043d8db0\"\n         rich \u003c- reqGetRichList (Just \"PEG\") 5\n\n         -- return values as N-ary tuple\n         return (h, i)\n  -- process resulted values\n  print h\n  -- or use for special business logic\n```\n\nVariables `h` and `i` mapped to exact data stucture. All types available for detailed overview in `Types` directory.\n\n## Contributions\n\nPlease, feel free to contribute, fork the repo and submit PR.\n\n\nSay thanks, send a tip:\n\n- `btc`: 39oVXpsgsyW8ZgzsnX3sV7HLdtXWfT96qN\n- `fct`: FA38cwer93mmPw1HxjScLmK1yF9iJTu5P87T2vdkbuLovm2YXyss\n- `eth`: 0x9cDBA6bb44772259B3A3fb89cf233A147a720f34\n- `xlm`: GD2FROTYXYSNOQQREYXHCXVOYWV556EM6PAHMVUHJNJEUYTUXUSNUZQ3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkompendium-ano%2Fpegnetd-haskell-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkompendium-ano%2Fpegnetd-haskell-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkompendium-ano%2Fpegnetd-haskell-client/lists"}