Vault Subscription - CLI Guide

1

Download The CLI File

  • Visit the Prodigy.Fi CLI repository: https://github.com/prodigyfi/dci-cli

  • Click the green Code button in the top-right corner.

  • Select Download ZIP and save the file to your computer (eg; in your Downloads folder).

  • Unzip the file to access the dci-cli-main folder.

2

Install A Code Editor

  • Download and install a code editor, such as Visual Studio Code, if you don’t have one.

  • Open the dci-cli-main folder in your code editor:

  • In Visual Studio Code, click File > Open Folder and select the dci-cli-main folder.

3

Rename Your Files

  • In the dci-cli-main folder, locate the files config.example.json and create-vaults.example.csv.

  • Create copies of these files and rename them:

    • config.example.jsonconfig.json

    • create-vaults.example.csvcreate-vaults.csv

  • To rename:

    • Alternatively, in Finder (Mac) or File Explorer (Windows), right-click, select Duplicate or Copy/Paste, and rename.

4

Configure The RPC Node URL

  • Open config.json in your code editor.

  • Fill in the rpcNode parameter with the RPC node URL for your chosen blockchain network. This connects the CLI tool to the network. You can find the list of RPC nodes available here.

  • Copy any one of the link shown on the website

5

Fill In The rpcNode Section

  • Input the copied link into the rpcNode section

Note: Fill the config file under the network that you are running your CLI tool on. For example, if you trying to run the CLI tool on Base testnet, fill up the file under "Base Testnet" as shown in the example below.

6

Configure Wallet

  • Add the account parameter with your wallet address.

  • Replace the placeholder, lp_account , with your wallet address.

7

Obtain Json Wallet & Passphrase

To obtain the JSON wallet and passphrase, follow these steps:

  • Open your folders, and go to the file you downloaded in Step 1.

  • Right-click on the folder (the unzipped version), and click Copy (Cmd + C or Ctrl + C).

  • Open your terminal (Mac) or command prompt (Windows), type cd, press the spacebar, and paste the folder path (Cmd + V or Ctrl + V).

  • It should look something like: cd /Users/username/Downloads/dci-cli-main.

    • “username” is your Mac username (type whoami in terminal to check).

    • “Downloads” is where your file is stored.

    • “dci-cli-main” is the name of your folder.

Note: If you stored or renamed your folder, the folder path may look different

  • Run this command:

    • npm i

  • If it shows an error, follow the instructions and run the fix command:

    • npm audit fix --force

  • Once all the issues are fixed, run this command:

    • npx ts-node src/encrypt_wallet.ts

  • Enter the private key of the wallet you are trying to create your vaults with.

  • Set your passphrase

  • After you have done so, a new keystore should be generated. It should look something like this: keystore/0xXXXXXXXXX.json. This will be your JSON wallet.

  • Copy the Json wallet and passphrase into the config.json file.

8

Obtain Vault Address

  • Head over to the Subscribe & Earn section on Prodigy.Fi

  • Select that vault you want to subscribe to by clicking on the "Subscribe" button

  • On the bottom right hand corner, you will find the vault's address. Copy the vault address

9

Configure The Vault Subscription Command

  • Now that you have copied the vault address, paste it in this programme:

npx ts-node ./src/main.ts "<Blockchain>" subscribeVault --vault <vault address> --amount <amount>.
  • Replace the <vault address> with the vault address you copied in step 8

  • Replace <amount> with your desired subscription amount (eg; 100).

  • Replace <Blockchain> with the network you are subscribing to vaults on via Prodigy.Fi, (eg; Base Mainnet, Base Testnet)

  • It should look something like this:

    npx ts-node ./src/main.ts "Base Mainnet" subscribeVault --vault 0x1a1f9604eab571b98adeb2c63fe11cc923c8f6d9 --amount 100.

The vault address varies depending on the specific vault you choose to subscribe to.

10

Run The Command

  • Run the command from step 9 in your terminal or command prompt.

  • Once the vault is created, you will see the message “Vault <vault address> subscribed successfully”.

Last updated