{"id":19294550,"url":"https://github.com/web3-storage/dealer","last_synced_at":"2025-04-22T08:30:32.158Z","repository":{"id":166422429,"uuid":"637806774","full_name":"web3-storage/dealer","owner":"web3-storage","description":null,"archived":true,"fork":false,"pushed_at":"2023-09-29T16:12:26.000Z","size":580,"stargazers_count":2,"open_issues_count":8,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-24T00:28:04.326Z","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":"other","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":"LICENSE.md","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-05-08T12:57:22.000Z","updated_at":"2023-11-01T19:02:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2d9f849-e3a1-4779-b9a4-234f3a39038f","html_url":"https://github.com/web3-storage/dealer","commit_stats":null,"previous_names":["web3-storage/dealer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fdealer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fdealer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fdealer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fdealer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web3-storage","download_url":"https://codeload.github.com/web3-storage/dealer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250205964,"owners_count":21392157,"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:41.991Z","updated_at":"2025-04-22T08:30:31.837Z","avatar_url":"https://github.com/web3-storage.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dealer\n\n\u003e Implementation of w3filecoin dealer service which will provide the UCAN server for receiving `dealer/*` invocations and other resources for Spade to scrape - a way to retrieve the list of aggregates ready for a deal.\n\n## Getting Started\n\nThe repo contains the infra deployment code and the api implementation.\n\nTo work on this codebase **you need**:\n\n- Node.js \u003e= 18 (prod env is node 18)\n- Install the deps with `pnpm i`\n\nYou can then run the tests locally with `pnpm test`. \n\nTo try out a change submit a PR and you'll get temporary infra rolled out for you automatically at `https://\u003cpr#\u003e.spade-proxy.web3.storage`.\n\n[`sst`](https://sst.dev) is the framework we use to define what to deploy. Read the docs! https://sst.dev\n\n## Deployment \n\nDeployments are managed by [seed.run]. \n\nThe `main` branch is deployed to https://staging.spade-proxy.web3.storage and staging builds are promoted to prod manually via the UI at https://console.seed.run\n\n### Local dev\n\nYou can use `sst` to create a custom dev deployment on aws, with a local dev console for debugging.\n\nTo do that **you need**\n\n- An AWS account with the AWS CLI configured locally\n- Copy `.env.tpl` to `.env.local`\n\nThen run `npm start` to deploy dev services to your aws account and start dev console\n\n```console\npnpm run start\n```\n\nSee: https://docs.sst.dev for more info on how things get deployed.\n\n## Package Tests\n\nTo run per-package tests, first install Docker Desktop (https://www.docker.com/) and ensure it is running.\n\nNext, ensure the `AWS_REGION`, `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables are set in your terminal. They do \nnot need to be set to real values - the following works in `bash`-like shells:\n\n```\nexport AWS_REGION='us-west-2'; export AWS_ACCESS_KEY_ID='NOSUCH'; export AWS_SECRET_ACCESS_KEY='NOSUCH'\n```\n\nFinally, to run the tests for all packages, run:\n\n```\npnpm test\n```\n\nOr to run the tests for a single package, run:\n\n```\npnpm --filter \u003cpackage-name\u003e test\n```\n\n### Environment Variables\n\nEnsure the following variables are set in the env when deploying\n\n#### `HOSTED_ZONE`\n\nThe root domain to deploy the API to. e.g `dealer.web3.storage`. The value should match a hosted zone configured in route53 that your aws account has access to.\n\n#### `DID`\n\n[DID](https://www.w3.org/TR/did-core/) of the ucanto server. e.g. `did:web:dealer.web3.storage`. Optional: if omitted, a `did:key` will be derrived from `PRIVATE_KEY`\n\n### Secrets\n\nSet production secrets in aws SSM via [`sst secrets`](https://docs.sst.dev/config#sst-secrets). The region must be set to the one you deploy that stage to\n\n```sh\n# set `PRIVATE_KEY` for prod\n$ npx sst secrets set --region us-west-2 --stage prod PRIVATE_KEY \"MgCblCY...=\"\n```\n\nTo set a fallback value for `staging` or an ephmeral PR build use [`sst secrets set-fallback`](https://docs.sst.dev/config#fallback-values)\n\n```sh\n# set `PRIVATE_KEY` for any stage in us-east-2\n$ npx sst secrets set --fallback --region us-east-2 PRIVATE_KEY \"MgCZG7...=\"\n```\n\n**note** The fallback value can only be inherited by stages deployed in the same AWS account and region.\n\nConfirm the secret value using [`sst secrets list`](https://docs.sst.dev/config#sst-secrets)\n\n```sh\n$ npx sst secrets list --region us-east-2\nPRIVATE_KEY MgCZG7...= (fallback)\n\n$ npx sst secrets list --region us-west-2 --stage prod\nPRIVATE_KEY M...=\n```\n\n#### `PRIVATE_KEY`\n\nThe [`multibase`](https://github.com/multiformats/multibase) encoded ED25519 keypair used as the signing key for the upload-api.\n\nGenerated by [@ucanto/principal `EdSigner`](https://github.com/web3-storage/ucanto) via [`ucan-key`](https://www.npmjs.com/package/ucan-key)\n\n_Example:_ `MgCZG7EvaA...1pX9as=`\n\n#### `UCAN_LOG_BASIC_AUTH`\n\nThe HTTP Basic auth token for the UCAN Invocation entrypoint, where UCAN invocations can be stored and proxied to the UCAN Stream.\n\n_Example:_ `MgCZG7EvaA...1pX9as=`\n\n## License\n\nDual-licensed under [MIT + Apache 2.0](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3-storage%2Fdealer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb3-storage%2Fdealer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3-storage%2Fdealer/lists"}