{"id":18645865,"url":"https://github.com/interledger/open-payments-cli","last_synced_at":"2025-11-05T04:30:32.613Z","repository":{"id":211162301,"uuid":"728371476","full_name":"interledger/open-payments-cli","owner":"interledger","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-29T21:44:39.000Z","size":56,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-27T11:44:09.634Z","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/interledger.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-12-06T19:53:48.000Z","updated_at":"2024-04-29T21:44:44.000Z","dependencies_parsed_at":"2023-12-06T21:26:20.948Z","dependency_job_id":"5b210752-23ea-4a45-b7c2-52bef201ed45","html_url":"https://github.com/interledger/open-payments-cli","commit_stats":null,"previous_names":["interledger/open-payments-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger%2Fopen-payments-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger%2Fopen-payments-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger%2Fopen-payments-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interledger%2Fopen-payments-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interledger","download_url":"https://codeload.github.com/interledger/open-payments-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239449593,"owners_count":19640535,"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-07T06:17:30.328Z","updated_at":"2025-11-05T04:30:32.583Z","avatar_url":"https://github.com/interledger.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open Payments CLI\n\nThis is an interactive command line tool that makes it easy to call the [Open Payments APIs](https://openpayments.guide/) in order to initiate payments between wallet addresses.\n\n## Prerequisites\n\nThe tool uses an authenticated [Open Payments SDK](https://github.com/interledger/open-payments/tree/main/packages/open-payments) to make the Open Payment requests. As a result, you will need to provide authentication information to get started, specifically, the `clientWalletAddress` (by which the client identifies itself by) a `privateKey` and its corresponding `keyId`. A guide on how to get these credentials can be found [here](https://openpayments.guide/snippets/before-you-begin/#obtain-a-public-private-key-pair-and-key-id).\n\nOnce `clientWalletAddress`, the `privateKey` and `keyId` are generated, you can begin using the tool.\n\n## Installation\n\n`pnpm i`\n\n## Usage\n\n#### `pnpm start`\n\nThis will prompt you to enter the information to create the client: `clientWalletAddress`, `privateKey` and `keyId`, as well as the sending and reciving wallet addresses.\n\n#### `pnpm start:config`\n\nThis will start up the session using values that are set in `.env`:\n\n```\nCLIENT_WALLET_ADDRESS=\nKEY_ID=\nPRIVATE_KEY=\nSENDING_WALLET_ADDRESS=\nRECEIVING_WALLET_ADDRESS=\n```\n\n## Wallet addresses\n\nWhen entering wallet addresses into the CLI (for initializing the client, or setting sending and receiving wallet addresses), you can use the `https://` prefix (`https://ilp.five.rafikilabs.com/alice`) or the `$` [payment pointer](https://paymentpointers.org) prefix (`$ilp.five.rafikilabs.com/alice`).\n\n## Commands\n\n| Command                                                                             | Description                                     |\n| ----------------------------------------------------------------------------------- | ----------------------------------------------- |\n| [`ip:create \u003cincomingAmount?\u003e`](#ipcreate-incomingamount)                           | Create an incoming payment                      |\n| [`ip:complete`](#ipcomplete)                                                        | Complete an incoming payment                    |\n| [`ip:get`](#ipget)                                                                  | Retrieve an incoming payment                    |\n| [`quote:create \u003cdebitAmount?\u003e`](#quotecreate-debitamount)                           | Create a quote                                  |\n| [`quote:get`](#quoteget)                                                            | Retrieve a quote                                |\n| [`op:create`](#opcreate)                                                            | Create an outgoing payment                      |\n| [`op:get`](#opget)                                                                  | Retrieve an outgoing payment                    |\n| [`grant:op \u003cdebitAmount?\u003e \u003creceiveAmount?\u003e` ](#grantop-debitamount-receiveamount)   | Request a grant for an outgoing payment         |\n| [`session:get`](#sessionget)                                                        | Displays the information of the current session |\n| [`session:wa:set-receiving \u003cwalletAddress\u003e`](#sessionwaset-receiving-walletaddress) | Set sending wallet address for the session      |\n| [`session:wa:set-sending \u003cwalletAddress\u003e`](#sessionwaset-receiving-walletaddress)   | Set receiving wallet address for the session    |\n| [`scenario \u003cfileName\u003e`](#scenario-filename)                                         | Run a list of commands from a file              |\n| [`exit`](#exit)                                                                     | Exits the application                           |\n\n### `ip:create \u003cincomingAmount?\u003e`\n\nCreates an incoming payment on the receiving wallet address for an optionally specified incoming amount.\nIf no saved grant in the session, requests a default grant before creating an incoming payment.\nThen, saves the incoming payment and possibly its corresponding grant in the session.\n\n### `ip:complete`\n\nCompletes the incoming payment previously created in the session.\n\n### `ip:get`\n\nFetches the incoming payment previously created in the session.\n\n### `quote:create \u003cdebitAmount?\u003e`\n\nCreates an quote on the sending wallet address for an optionally specified debit amount.\nIf there is no existing quote grant in the session, requests a default grant before creating a quote.\nThen, saves the quote and possibly its corresponding grant in the session.\n\n### `quote:get`\n\nFetches the quote previously created in the session.\n\n### `op:create`\n\nCreates an outgoing payment on the sending wallet address. If there is no existing saved grant in the session, requests a default grant, prompts to complete the interaction and creates the outgoing payment. Then, saves the outgoing payment and its corresponding grant in the session.\n\n### `op:get`\n\nFetches an outgoing payment previously created in the session.\n\n### `grant:op \u003cdebitAmount?\u003e \u003creceiveAmount?\u003e`\n\nInitiates an outgoing payment grant request. If no `debitAmount` or `receiveAmount` provided, uses the amounts from the created quote of the session. After the pending grant is requested, a prompt will apprear to enter the URL of the completed redirect site of the interaction. The URL must contain a `interact_ref`. Once entered, the grant will be finalized, and outgoing payments can now be created.\n\n### `session:get`\n\nDisplays the information of the current session.\n\n### `session:wa:set-receiving \u003cwalletAddress\u003e`\n\nSets the receiving wallet address for the session to be used in incoming payment requests going forward.\n\n### `session:wa:set-sending \u003cwalletAddress\u003e`\n\nSets the sending wallet address for the session to be used in requests for quotes and outgoing payments going forward.\n\n### `scenario \u003cfileName\u003e`\n\nRuns a list of commands in the provided file. For example, with a file named `scenario-1.txt`:\n\n```\nsession:wa:set-sending https://ilp.five.rafikilabs.com/ffc52473\nsession:wa:set-receiving https://ilp.five.rafikilabs.com/a76f14b7\nip:create\nquote:create 10\ngrant:op\nop:create\n```\n\ncalling `scenario scenario-1.txt` will run the given commands sequentially in the session.\n\nThe commands in the example scenario file will initiate a payment between `https://ilp.five.rafikilabs.com/ffc52473` and `https://ilp.five.rafikilabs.com/a76f14b7`. Like a normal session, `grant:op` will prompt you to enter the URL of the resulting redirect site of the interaction, after which it will run the final `op:create` command to create the outgoing payment.\n\n### `exit`\n\nExits the application.\n\n## Logging\n\nBy default, the application saves all of the logs for each session in `/logs`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledger%2Fopen-payments-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterledger%2Fopen-payments-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterledger%2Fopen-payments-cli/lists"}