A command-line interface for interacting with RemitWise smart contracts on Soroban.
- Soroban CLI installed (
cargo install soroban-cli) - Contracts deployed on the network
- Environment variables set
Set the following environment variables:
SOROBAN_NETWORK: Network to use (localfor localnet,testnetfor testnet)REMITTANCE_SPLIT_CONTRACT_ID: Contract ID for remittance splitSAVINGS_GOALS_CONTRACT_ID: Contract ID for savings goalsBILL_PAYMENTS_CONTRACT_ID: Contract ID for bill paymentsINSURANCE_CONTRACT_ID: Contract ID for insuranceOWNER_ADDRESS: Your address for operations requiring authentication
cargo build --release --bin remitwise-cli./target/release/remitwise-cli --helpsplit get-config: Get the current split configuration
goals list: List all savings goals for the ownergoals create <name> <target_amount> <target_date>: Create a new savings goal
bills list: List unpaid bills for the ownerbills pay <bill_id>: Pay a specific bill
insurance list: List active insurance policies for the owner
Start local Soroban network:
soroban dev start
export SOROBAN_NETWORK=localDeploy contracts and note their IDs.
Use the public testnet:
export SOROBAN_NETWORK=testnetEnsure contracts are deployed on testnet and set the CONTRACT_ID variables.
# Set environment
export SOROBAN_NETWORK=local
export OWNER_ADDRESS=G...
export REMITTANCE_SPLIT_CONTRACT_ID=C...
# etc.
# Get split config
./target/release/remitwise-cli split get-config
# List goals
./target/release/remitwise-cli goals list
# Create a goal
./target/release/remitwise-cli goals create "Vacation Fund" 500000 1735689600
# List bills
./target/release/remitwise-cli bills list
# Pay bill
./target/release/remitwise-cli bills pay 1