{"id":22954681,"url":"https://github.com/mkosir/react-use-ark","last_synced_at":"2026-05-10T06:53:13.627Z","repository":{"id":36471699,"uuid":"226835356","full_name":"mkosir/react-use-ark","owner":"mkosir","description":"Hook to easily access ARK blockchain Ѧ API in React application","archived":false,"fork":false,"pushed_at":"2022-02-11T08:29:57.000Z","size":8520,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T15:45:12.615Z","etag":null,"topics":["api","ark","ark-io","blockchain","crypto","cryptocurrency","hook","hooks-api-react","react"],"latest_commit_sha":null,"homepage":"https://mkosir.github.io/react-use-ark","language":"TypeScript","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/mkosir.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-12-09T09:37:19.000Z","updated_at":"2021-01-06T12:56:28.000Z","dependencies_parsed_at":"2022-08-08T15:01:27.391Z","dependency_job_id":null,"html_url":"https://github.com/mkosir/react-use-ark","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkosir%2Freact-use-ark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkosir%2Freact-use-ark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkosir%2Freact-use-ark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkosir%2Freact-use-ark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkosir","download_url":"https://codeload.github.com/mkosir/react-use-ark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246732181,"owners_count":20824679,"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":["api","ark","ark-io","blockchain","crypto","cryptocurrency","hook","hooks-api-react","react"],"created_at":"2024-12-14T16:19:09.602Z","updated_at":"2026-05-10T06:53:08.586Z","avatar_url":"https://github.com/mkosir.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![ark logo](ark.png) react-use-ark\n\n[![Build Status][build-badge]][build-url]\n[![npm version][npm-badge]][npm-url]\n[![TypeScript][typescript-badge]][typescript-url]\n\n_React hook to easily access [ARK blockchain Ѧ](https://ark.io/) API._\n\n### Links\n\nARK API [documentation](https://api.ark.dev/).\n\nARK blockchain explorer [official website](https://explorer.ark.io/).\n\nOfficial ARK client SDK for [TypeScript](https://github.com/ArkEcosystem/typescript-client).\n\n## Demo\n\n**[Demos](https://mkosir.github.io/react-use-ark)** created with [React DemoTab 📑](https://github.com/mkosir/react-demo-tab)\n\n## Install\n\n```bash\nnpm install react-use-ark\n```\n\n## Usage\n\nSimply import ARK hooks that you wish to fetch data in your React application.  \nEach hook:\n\n- starts with a resource name as `'useTransactions...'`, `'useBlocks...'`, `'useDelegates...'`, `'useWallets...'`.\n- always returns the same state object `{ response, isLoading, error }` where `response` type is defined to easily access it's properties.\n- accepts `fetchOnMount` boolean argument, which can be used as an utility to cover common pattern of data fetching when component mounts.\n- accepts `network` argument which is an enumeration object `'DEVNET | MAINNET | TESTNET'` or user defined string (localhost). Set it appropriately to your needs, depending on running relay.\n\n```jsx\nimport React from 'react';\nimport { useTransactionsLatest } from 'react-use-ark';\n\nconst App = () =\u003e {\n  // Get 20 latest transactions when App component mounts.\n  const [{ response, isLoading, error }] = useTransactionsLatest(1, 20, true);\n  return (\n    \u003cdiv\u003e\n      {isLoading \u0026\u0026 \u003cdiv\u003eLoading...\u003c/div\u003e}\n      {error \u0026\u0026 \u003cdiv\u003eError fetching data: {error}\u003c/div\u003e}\n      {response \u0026\u0026 (\n        \u003cul\u003e\n          {response.data.map(transaction =\u003e (\n            \u003cli key={transaction.id}\u003e\n              \u003cdiv\u003eAmount: {transaction.amount}\u003c/div\u003e\n              \u003cdiv\u003eFee: {transaction.fee}\u003c/div\u003e\n              \u003cdiv\u003eSender: {transaction.sender}\u003c/div\u003e\n              \u003cdiv\u003eRecipient: {transaction.recipient}\u003c/div\u003e\n              \u003cdiv\u003eBlock ID: {transaction.blockId}\u003c/div\u003e\n              \u003cdiv\u003eConfirmations: {transaction.confirmations}\u003c/div\u003e\n            \u003c/li\u003e\n          ))}\n        \u003c/ul\u003e\n      )}\n    \u003c/div\u003e\n  );\n};\n\nReactDOM.render(\u003cApp /\u003e, document.getElementById('root'));\n```\n\n## Development\n\n_Easily set up a local development environment!_\n\nBuild all the examples and starts storybook server on [localhost:9009](http://localhost:9009):\n\n- clone\n- `npm install`\n- `npm start`\n\nOR\n\nClone this repo on your machine, navigate to its location in the terminal and run:\n\n```bash\nnpm install\nnpm link # link your local repo to your global packages\nnpm run build:watch # build the files and watch for changes\n```\n\nClone project repo that you wish to test with react-use-ark library and run:\n\n```bash\nnpm install\nnpm link react-use-ark # link your local copy into this project's node_modules\nnpm start\n```\n\n**Start coding!** 🎉\n\n## Contributing\n\nThere are many [endpoints](https://api.ark.dev/) to cover and hooks to be created, all contributions are welcome!\n\n[npm-url]: https://www.npmjs.com/package/react-use-ark\n[npm-badge]: https://img.shields.io/npm/v/react-use-ark.svg\n[build-badge]: https://travis-ci.com/mkosir/react-use-ark.svg\n[build-url]: https://travis-ci.com/mkosir/react-use-ark\n[typescript-badge]: https://badges.frapsoft.com/typescript/code/typescript.svg?v=101\n[typescript-url]: https://github.com/microsoft/TypeScript\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkosir%2Freact-use-ark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkosir%2Freact-use-ark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkosir%2Freact-use-ark/lists"}