{"id":19294564,"url":"https://github.com/web3-storage/sha256it","last_synced_at":"2026-05-30T16:31:31.745Z","repository":{"id":188508218,"uuid":"674713648","full_name":"web3-storage/sha256it","owner":"web3-storage","description":"Lambda that calculates sha256 of a key of a CAR file in S3.","archived":false,"fork":false,"pushed_at":"2023-09-12T16:18:15.000Z","size":487,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-05T21:10:03.495Z","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/web3-storage.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-04T15:28:40.000Z","updated_at":"2023-10-09T10:24:45.000Z","dependencies_parsed_at":"2024-11-09T22:38:53.283Z","dependency_job_id":"202400f6-43c6-41c6-8b7a-8113479ecc65","html_url":"https://github.com/web3-storage/sha256it","commit_stats":null,"previous_names":["web3-storage/sha256it"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fsha256it","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fsha256it/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fsha256it/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fsha256it/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web3-storage","download_url":"https://codeload.github.com/web3-storage/sha256it/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240397502,"owners_count":19794876,"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":"2024-11-09T22:38:43.846Z","updated_at":"2026-05-30T16:31:31.732Z","avatar_url":"https://github.com/web3-storage.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sha256it\n\nTools to calculates sha256 CAR CID for an object in S3 and copy it to R2 _(or other S3 compatible api)_\n\nLambdas to hash and copy CARS are deployed via SST and seed.run.\n\nThe `sha256it` cli uses those lambdas to do the work.\n\n## Getting started\n\nThe repo contains the infra deployment code and a cli to use it.\n\n```\n├── packages\n|   ├── cli        - sha256it cli to hash, copy, and verify cars\n|   └── functions  - lambdas for hashing and copying CARs\n└── stacks         - sst and aws cdk code to deploy the lambdas\n```\n\nTo work on this codebase **you need**:\n\n- Node.js \u003e= v18 (prod env is node v18)\n- Install the deps with `npm i`\n\nYou can then run the tests locally with `npm test`. \n\n## Usage\n\nCommands for the cli, defined in the `packages/cli` directory.\n\n### list\n\nFetch a list of keys, partitioned by starting key with the `--start-after` flag\n\n```shell\nsha256it list --region us-west-2 --bucket bucketname --prefix complete \\\n\u003e keys.ndjson\n```\n\n- `ACCESS_KEY_ID` and `SECRET_ACCESS_KEY` must be set in env\n\n**output**\n\n```json\n{\"region\":\"us-west-2\",\"bucket\":\"[bucket-name]\",\"key\":\"complete/[root cid].car\"}\n```\n\n### hash\n\nHash a list of keys. \n\n```shell\nsha256it hash --endpoint https://???.lambda-url.us-west-2.on.aws/ \\\n\u003c keys.ndjson \\\n\u003e hashed.ndjson\n```\n\n- `--endpoint` is the function url of the `hash` lambda\n\n**output**\n\n```json\n{\"bucket\":\"[bucket name]\",\"cid\":{\"/\":\"[car cid]\"},\"key\":\"complete/[root cid].car\",\"region\":\"us-west-2\"}\n```\n\n### copy\n\nCopy CARs from source to dest. \n_note: Get the function url of the copy lambda from aws console._\n\n```shell\nsha256it copy --endpoint https://!!!.lambda-url.us-west-2.on.aws/ \\\n\u003c hashed.ndjson \\\n\u003e copied.ndjson\n```\n\n- `--endpoint` is the function url of the `copy` lambda\n\n### head\n\nCheck the head response for a car cid at a bucket endpoint\n\n```shell\nsha256it head --region auto --bucket carpark --endpoint https://\u003cACCOUNT_ID\u003e.r2.cloudflarestorage.com \\\n\u003c copied.ndjson \\\n\u003e verified.ndjson\n```\n\n- `DEST_ACCESS_KEY_ID` and `DEST_SECRET_ACCESS_KEY` must be set in env\n- `--endpoint` is the s3 compatible api url\n\n\n**output**\n\n```json\n{\"bucket\":\"carpark\",\"cid\":{\"/\":\"[car cid]\"},\"key\":\"[car cid]/[car cid].car\",\"length\":10862134,\"region\":\"auto\",\"status\":200}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3-storage%2Fsha256it","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb3-storage%2Fsha256it","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3-storage%2Fsha256it/lists"}