{"id":13794259,"url":"https://github.com/textury/arlocal","last_synced_at":"2025-05-12T20:31:46.666Z","repository":{"id":38008011,"uuid":"355702313","full_name":"textury/arlocal","owner":"textury","description":"Local testnet for your Arweave products.","archived":false,"fork":false,"pushed_at":"2024-07-26T14:32:13.000Z","size":11074,"stargazers_count":105,"open_issues_count":1,"forks_count":35,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-08T05:04:20.773Z","etag":null,"topics":["arweave","blockchain","testnet"],"latest_commit_sha":null,"homepage":"","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/textury.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-07T22:51:58.000Z","updated_at":"2025-04-25T05:35:10.000Z","dependencies_parsed_at":"2024-08-03T23:03:19.430Z","dependency_job_id":"a7937127-1b83-46df-8c1e-4d530ef854de","html_url":"https://github.com/textury/arlocal","commit_stats":{"total_commits":343,"total_committers":14,"mean_commits":24.5,"dds":0.5072886297376094,"last_synced_commit":"bf63cd88342f9a802fdb21ed9057abc5e900a188"},"previous_names":[],"tags_count":110,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textury%2Farlocal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textury%2Farlocal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textury%2Farlocal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/textury%2Farlocal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/textury","download_url":"https://codeload.github.com/textury/arlocal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253816783,"owners_count":21968880,"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":["arweave","blockchain","testnet"],"created_at":"2024-08-03T23:00:37.840Z","updated_at":"2025-05-12T20:31:41.605Z","avatar_url":"https://github.com/textury.png","language":"TypeScript","readme":"# arlocal\nRun a local Arweave gateway-like server.\n\n## Usage\n#### CLI Tool\nMake sure you already have NodeJS + NPM installed.\nTo run `arlocal` it's as simple as doing an `npx` which means running the latest version available on `npmjs.com`.\n```\nnpx arlocal\n```\nThat's it! You are running a local slim gateway on `http://localhost:1984`\n\nHow about if I want to run it on another port?!\nIt's as simple as doing:\n```\nnpx arlocal 8080\n```\nThis will start arlocal on port `8080`.\n\nOther options:\n```\n--hidelogs = This will hide the logs from ArLocal.\n```\n\n#### NodeJS library\nYou can also use `arlocal` as a library on your own code. This is useful if you want to make sure everyone who tests your app has this instance installed.\n\n```\nyarn add arlocal -D\n```\n\nThen you can import it just like any other node module:\n```ts\nimport ArLocal from 'arlocal';\n\n(async () =\u003e {\n  const arLocal = new ArLocal();\n\n  // Start is a Promise, we need to start it inside an async function.\n  await arLocal.start();\n\n  // Your tests here...\n\n  // After we are done with our tests, let's close the connection.\n  await arLocal.stop();\n})();\n```\n\nThe `ArLocal` class has a few options, all of them are optional.\n```\nArLocal(port = 1984, showLogs = true, dbPath = '.db', persist = false)\n\nport = What port to use for ArLocal.\nshowLogs = Should we show logs.\ndbPath = folder where the db will be temporary stored.\npersist = Whether or not data stored should be persisted among server restarts.\n```\n\n#### Sending transactions\nBefore sending a transaction to ArLocal, make sure you mint new AR tokens for the wallet you'll be using. This is done using the endpoint `/mint/\u003caddress\u003e/\u003cbalance\u003e`.\n\nSending a new transaction is done just like with the default gateway, use ArweaveJS to create your transaction, sign and post it.\n\nAfter this transaction is sent, to confirm (`mine`) your transactions, you need to hit the `/mine` endpoint. You can do this programmatically or by simply going to `http://localhost:1984/mine`.\n\nYou can also mine more than one block at a time by hitting `/mine/{blocks}`, this will increase the current blocks to the set `blocks`.\n\n## Features\n- Extremely fast compared to other options out there.\n- Community built, open source and free.\n- No need of external resources, only NodeJS + NPM.\n- Test transactions, SmartWeave Contracts, GraphQL requests, NFT deployment and more.\n- Works on Windows, Mac, Linux, Raspberry Pi, and pretty much everywhere as long as NodeJS is installed.\n\n### Contributing\nPRs are greatly appreciated, help us build this hugely needed tool so anyone else can easily test their own transactions and SmartWeave contracts.\n\nBefore doing a PR, remember that if this is a route or an extisting feature of the gateway, you need to respect the same path/default of the existing mainnet gateway. Example: `/tx` should be kept as `/tx`, this is so the user doesn't have to do many changes for their unit tests, compared to normal transaction on mainnet.\n\n1.  Create a fork\n2.  Create your feature branch: `git checkout -b my-feature`\n3.  Commit your changes: `git commit -am 'Add some feature'`\n4.  Push to the branch: `git push origin my-new-feature`\n5.  Submit a pull request 🚀\n","funding_links":[],"categories":["Tools ⚙️"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextury%2Farlocal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftextury%2Farlocal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftextury%2Farlocal/lists"}