summaryrefslogtreecommitdiff
path: root/pbt/ts/src/bank.ts
diff options
context:
space:
mode:
Diffstat (limited to 'pbt/ts/src/bank.ts')
-rw-r--r--pbt/ts/src/bank.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/pbt/ts/src/bank.ts b/pbt/ts/src/bank.ts
index bee9dfc..c5adc05 100644
--- a/pbt/ts/src/bank.ts
+++ b/pbt/ts/src/bank.ts
@@ -5,6 +5,16 @@ export type Account = string;
export interface Bank {
balance: (account: Account) => Option<number>;
+
+ /// Deposit amount into account
+ ///
+ /// This function increases the balance of the given account by the
+ /// specified amount. It's a `void` function hence implicitly
+ /// stateful: It's expected to change some internal state of the
+ /// implementing class.
+ ///
+ /// @param account The account to deposit into
+ /// @param amt The amount to deposit
deposit: (account: Account, amt: number) => void;
withdraw: (account: Account, amt: number) => void;
}