{"id":31580050,"url":"https://github.com/lit-protocol/dune-updater","last_synced_at":"2025-10-05T21:06:03.103Z","repository":{"id":281237068,"uuid":"881577661","full_name":"LIT-Protocol/dune-updater","owner":"LIT-Protocol","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-07T18:17:57.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-07T19:24:51.755Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/LIT-Protocol.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":"2024-10-31T21:07:16.000Z","updated_at":"2025-03-07T18:18:00.000Z","dependencies_parsed_at":"2025-03-07T19:35:08.129Z","dependency_job_id":null,"html_url":"https://github.com/LIT-Protocol/dune-updater","commit_stats":null,"previous_names":["lit-protocol/dune-updater"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LIT-Protocol/dune-updater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIT-Protocol%2Fdune-updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIT-Protocol%2Fdune-updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIT-Protocol%2Fdune-updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIT-Protocol%2Fdune-updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LIT-Protocol","download_url":"https://codeload.github.com/LIT-Protocol/dune-updater/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIT-Protocol%2Fdune-updater/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278518898,"owners_count":26000177,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-05T21:05:58.025Z","updated_at":"2025-10-05T21:06:03.098Z","avatar_url":"https://github.com/LIT-Protocol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Getting Started\n\nTo trigger the script\n\n```\nnpm run start\n```\n\n## Working\n\nIt works in two parts:\n\n- Fetches Genius API for their realtime wrapped keys data\n- Fetches Yellowstone Blockchain for new PKPs minted after last table update\n\n### Relies on 3 DBs\n\n- genius_wk_api\n- yellowstone_pkp_api\n- latest_blocks_api\n\n### Genius Wrapped Keys\n\n- Uses `/clear` endpoint to clear existing table from Dune\n- Fetches from API\n- Filters for keytype and appends to the object array\n- Converts to CSV\n- Uses `/insert` endpoint to push the csv to Dune\n- Uses `/execute` endpoint to refresh the query responsible for fetching from table\n\n### Yellowstone PKPs\n\n- Stores starting and end block for each scan on Blocks Table\n- Fetches Blocks Table for end block to use it as a starting block for next scan\n- Scans Yellowstone till the current block\n- Convert to results to csv, also creates a csv for start and block of this scan\n- Uses `/insert` and `/execute` to push and refresh Yellowstone table\n- Uses `/clear` endpoint to clear existing Blocks table from Dune\n- Uses `/insert` and `/execute` to push and refresh Blocks table\n\n# AWS Auth for Wrapped Keys\n\nThere's an account in IAM called `wrapped-keys-s3-export-reader` which has access to the `lit-wk-pubkeys-production` and `lit-wk-pubkeys-testnetworks` buckets.\n\nTo get the credentials, you can use the `aws.js` file.\n\n```\nconst assumedCredentials = await getAwsCredentials(\"WrappedKeysProduction\");\n```\n\nYou must supply the corresponding env vars for that IAM user, via `AWS_IAM_ACCESS_KEY` and `AWS_IAM_SECRET_KEY`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flit-protocol%2Fdune-updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flit-protocol%2Fdune-updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flit-protocol%2Fdune-updater/lists"}