Source Code
;; Amanah Record - Book
;; Amanah record for book
(define-map book-89-amanah {owner: principal, keeper: principal} bool)
(define-public (record-book-89 (keeper principal))
(begin
(map-set book-89-amanah {owner: tx-sender, keeper: keeper} true)
(ok true)
)
)
(define-read-only (get-book-89-status (owner principal) (keeper principal))
(default-to false (map-get? book-89-amanah {owner: owner, keeper: keeper}))
)
Functions (2)
| Function | Access | Args |
|---|---|---|
| record-book-89 | public | keeper: principal |
| get-book-89-status | read-only | owner: principal, keeper: principal |