Command-line interface for common Invoice Liquidity Network contract operations on Stellar.
By participating in this project, you agree to abide by our Code of Conduct.
npm install -g @invoice-liquidity/cliThis publishes the iln binary.
Create a .iln.json file in your working directory:
{
"network": "testnet",
"contractId": "CD3TE3IAHM737P236XZL2OYU275ZKD6MN7YH7PYYAXYIGEH55OPEWYJC",
"tokenId": "CDUMMYYOURTOKENIDHERE",
"keypairPath": "~/.config/iln/freelancer.secret"
}Supported keys:
network:testnet,mainnet, orstandalonecontractId: ILN contract IDtokenId: default token contract to use forsubmitkeypairPath: path to a file containing a Stellar secret keyrpcUrl: optional RPC overridenetworkPassphrase: optional passphrase override
Environment fallbacks:
ILN_NETWORKILN_CONTRACT_IDILN_TOKEN_IDILN_KEYPAIR_PATHILN_RPC_URLILN_NETWORK_PASSPHRASE
iln dev start
iln dev status
iln dev stop
iln dev resetstartlaunches the local Stellar quickstart Docker container, registers the local network, creates/funds development keys, deploys a built ILN WASM when available, and writes.env.local.stopremoves the local quickstart container.resetremoves local generated state and starts fresh.statusprints node, RPC, contract, and token state.
Requires Docker to be installed and running. Contract deployment also requires the Stellar CLI and a built contract WASM.
iln submit --payer G... --amount 100 --due 2025-12-31 --rate 300--amountuses display units and is converted to Stellar stroops internally.--dueaccepts eitherYYYY-MM-DDor a Unix timestamp.--tokencan override the configuredtokenIdif needed.
iln fund --id 1By default this funds the remaining balance on the invoice. To partially fund:
iln fund --id 1 --amount 25iln pay --id 1iln status --id 1iln list --address G...This lists invoices where the address is the freelancer, payer, or recorded funder.
iln dev seedCreates and funds 3 development accounts (freelancer, payer, liquidity_provider) on testnet with USDC/EURC trustlines configured. Fully idempotent - running multiple times reuses existing accounts.
Output:
- Generates keypairs for 3 accounts
- Funds each via Friendbot with XLM
- Sets up USDC and EURC trustlines
- Saves account details to
.env.testnet.accounts(gitignored)
Requires: Active internet connection and testnet network configuration.
For detailed setup instructions, see SEEDER.md.
The integration suite is designed for the repository's standalone Soroban environment.
- Start the local network:
docker-compose up -d-
Deploy and seed the contract.
-
Export the local fixture values:
export ILN_CLI_LOCAL_CONTRACT_ID=...
export ILN_CLI_LOCAL_TOKEN_ID=...
export ILN_CLI_LOCAL_FREELANCER_SECRET=...
export ILN_CLI_LOCAL_FREELANCER_PUBLIC_KEY=...
export ILN_CLI_LOCAL_PAYER_SECRET=...
export ILN_CLI_LOCAL_PAYER_PUBLIC_KEY=...
export ILN_CLI_LOCAL_FUNDER_SECRET=...- Run the integration suite:
cd cli
npm run test:integration