summaryrefslogtreecommitdiff
path: root/netzbon/transfer.sh
blob: 1b112c73ba26e06c932d61d65fbe76c86da86e06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# This file is in the public domain.

set -eu

source functions.sh

if test -z "${3:-}"; then
  say "This tool allows you to send funds from the 'admin' account"
  say "to a normal user's bank account within the system for testing."
  say " "
  say "Call with three arguments:"
  say "1) target bank account name to credit"
  say "2) amount to transfer (e.g. ${CURRENCY:-CURRENCY}:42.42)"
  say "3) wire transfer subject to use"
  say " "
  exit 1
fi

source /etc/libeufin/sandbox.env
export LIBEUFIN_SANDBOX_DB_CONNECTION

libeufin-sandbox make-transaction --credit-account "$1" --debit-account admin "$2" "$3"