{"id":28513679,"url":"https://github.com/livepeer/merkle-earnings-cli","last_synced_at":"2025-07-04T07:31:49.022Z","repository":{"id":43859013,"uuid":"294823198","full_name":"livepeer/merkle-earnings-cli","owner":"livepeer","description":"CLI tool to generate, verify and claim snapshot earnings","archived":false,"fork":false,"pushed_at":"2022-02-15T20:16:02.000Z","size":1127,"stargazers_count":3,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"LIP-73","last_synced_at":"2025-06-30T02:49:04.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/livepeer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-11T22:21:46.000Z","updated_at":"2023-01-24T23:26:12.000Z","dependencies_parsed_at":"2022-09-06T10:10:20.034Z","dependency_job_id":null,"html_url":"https://github.com/livepeer/merkle-earnings-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/livepeer/merkle-earnings-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livepeer%2Fmerkle-earnings-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livepeer%2Fmerkle-earnings-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livepeer%2Fmerkle-earnings-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livepeer%2Fmerkle-earnings-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/livepeer","download_url":"https://codeload.github.com/livepeer/merkle-earnings-cli/tar.gz/refs/heads/LIP-73","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livepeer%2Fmerkle-earnings-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263467833,"owners_count":23471140,"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":[],"created_at":"2025-06-09T01:07:40.058Z","updated_at":"2025-07-04T07:31:49.013Z","avatar_url":"https://github.com/livepeer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Merkle Earnings CLI\n\n```\n _     _                                 ___  ___          _    _        _____                 _\n| |   (_)                                |  \\/  |         | |  | |      |  ___|               (_)\n| |    ___   _____ _ __   ___  ___ _ __  | .  . | ___ _ __| | _| | ___  | |__  __ _ _ __ _ __  _ _ __   __ _ ___\n| |   | \\ \\ / / _ \\ '_ \\ / _ \\/ _ \\ '__| | |\\/| |/ _ \\ '__| |/ / |/ _ \\ |  __|/ _` | '__| '_ \\| | '_ \\ / _` / __|\n| |___| |\\ V /  __/ |_) |  __/  __/ |    | |  | |  __/ |  |   \u003c| |  __/ | |__| (_| | |  | | | | | | | | (_| \\__ \\\n\\_____/_| \\_/ \\___| .__/ \\___|\\___|_|    \\_|  |_/\\___|_|  |_|\\_\\_|\\___| \\____/\\__,_|_|  |_| |_|_|_| |_|\\__, |___/\n                  | |                                                                                   __/ |\n                  |_|                                                                                  |___/\nUsage: mearnings [options]\n\nLivepeer Earnings Merkle Tree Tool\n\nOptions:\n  -V, --version                         output the version number\n  -g, --generate                        Generate a new Earnings Merkle Tree at the snapshot round\n  -e, --earnings \u003caddress\u003e              Get earnings for an address up until the snapshot round\n  -ve --verify \u003caddress\u003e                Verify the merkle tree for an address\n  -h, --help\n```\n\n## Install\n\n```\n$ npm install\n```\n\n## Build\n\n```\n$ npm run build \u0026\u0026 npm i -g\n```\n\nIf you run into permissioning errors using `sudo npm i -g` can provide a shortcut without having to alter npm permissioning.\n\n## Run \n\nYou will need to set the following environment variables in the `.env` file in this directory:\n\n- `L1_RPC_URL`: The URL for a L1 Ethereum Mainnet JSON-RPC provider.\n- `L2_RPC_URL`: THe URL for a L2 Arbitrum One Mainnet JSON-RPC provider.\n\n```\n$ mearnings [options]\n```\n\nTo list usage options:\n\n```\n$ mearnings --help\n```\n\n## Usage \n\nThere will be a prompt for a LIP number for the following commands. You can enter LIP-73.\n\n### Generate the snapshot Merkle Tree\n\n`mearnings -g`\n\nGenerates a new earnings Merkle Tree at the L1 snapshot round. The root of this snapshot Merkle Tree will be printed.\n\n### Fetch the earnings (pending stake and pending fees) of an address\n\n`mearnings -e \u003caddress\u003e`\n\n- `\u003caddress\u003e` is an ETH address that you want to fetch earnings for\n\nFetches the `pendingStake` (the stake of the address plus any rewards) and `pendingFees` (the fees of the address that have not been withdrawn) for an address at the L1 snapshot round. \n\n### Verify that an address is included in the snapshot Merkle Tree\n\n`mearnings -ve \u003caddress\u003e`\n\n- `\u003caddress\u003e` is an ETH address that you want to verify is included in the snapshot Merkle tree\n\nVerifies that an address and its earnings are included in the snapshot Merkle tree. This command will use the leaves of the snapshot Merkle Tree ( in `earningsTree.JSON`) to re-generate the snapshot Merkle Tree, check that the root matches the one included on-chain in the L2 MerkleSnapshot contract and that a proof of inclusion in the Merkle Tree can be computed for the address.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flivepeer%2Fmerkle-earnings-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flivepeer%2Fmerkle-earnings-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flivepeer%2Fmerkle-earnings-cli/lists"}