testnet-laconicd-stack/scripts
Prathamesh Musale 5ce343566e Add a script to get subscribed and onboarded laconicd accounts (#22)
Part of [laconicd testnet validator enrollment](cerc-io/testnet-laconicd-stack#19)

The script:
- Fetches onboarded participants using the configured laconicd GQL endpoint
- Reads a given CSV file with subscribers data
- Fetches all the onboarding txs using given laconicd RPC endpoint
- For each subscriber registered as a participant, maps the laconic pubkey and latest onboarding tx height
- Outputs the result in a CSV

Co-authored-by: Nabarun <nabarun@deepstacksoft.com>
Reviewed-on: cerc-io/testnet-laconicd-stack#22
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
2024-08-16 04:11:54 +00:00
..
src Add a script to get subscribed and onboarded laconicd accounts (#22) 2024-08-16 04:11:54 +00:00
.env.example Add a script to get subscribed and onboarded laconicd accounts (#22) 2024-08-16 04:11:54 +00:00
.gitignore Add a script to get subscribed and onboarded laconicd accounts (#22) 2024-08-16 04:11:54 +00:00
.npmrc Add a script to get subscribed and onboarded laconicd accounts (#22) 2024-08-16 04:11:54 +00:00
package.json Add a script to get subscribed and onboarded laconicd accounts (#22) 2024-08-16 04:11:54 +00:00
README.md Add a script to get subscribed and onboarded laconicd accounts (#22) 2024-08-16 04:11:54 +00:00
tsconfig.json Add a script to get subscribed and onboarded laconicd accounts (#22) 2024-08-16 04:11:54 +00:00
yarn.lock Add a script to get subscribed and onboarded laconicd accounts (#22) 2024-08-16 04:11:54 +00:00

cli

Prerequisites

  • NodeJS >= v18.17.x

Instructions

  • Change to scripts dir:

    cd scripts
    
  • Install dependencies and build:

    yarn && yarn build
    
  • Create required env configuration:

    # Update the values as required
    # By default, live laconicd testnet (laconicd.laconic.com) endpoint is configured
    cp .env.example .env
    
  • Map subscribers to onboarded participants:

    yarn map-subscribers-to-participants --subscribers-csv <subscribers-csv-file> --output <output-csv-file>
    
    # Example:
    # yarn map-subscribers-to-participants --subscribers-csv subscribers.csv --output result-$(date +"%Y-%m-%d%Y%m%d").csv