(define (^mint _bcom)
(define-values (decr-seal decr-unseal _decr-sealed?)
(make-sealer-triplet 'mint))
(define (^purse _bcom initial-balance)
(define-cell balance
initial-balance)
(define (<=-balance? amount)
(<= amount (#,($) balance)))
(define/contract (decr amount)
(-> (and/c integer? (>=/c 0) <=-balance?)
any/c)
(#,($) balance (- (#,($) balance) amount)))
(define/contract (deposit-method amount src)
(-> (and/c integer? (>=/c 0)) any/c any/c)
((decr-unseal (#,($) src 'get-decr)) amount)
(#,($) balance (+ (#,($) balance) amount)))
(methods
[(get-balance) (#,($) balance)]
[(sprout) (spawn ^purse 0)]
[deposit deposit-method]
[(get-decr) (decr-seal decr)]))
(define/contract (fiat-make-purse initial-balance)
(-> (and/c integer? (>=/c 0)) any/c)
(spawn ^purse initial-balance))
(methods [new-purse fiat-make-purse]))