Created
August 25, 2023 08:04
-
-
Save pool2win/3c596ad7d9ed531d51652a2846e702ff to your computer and use it in GitHub Desktop.
Demo lisp for bitcoin miniscrpit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
;; define place holder functions for demo | |
(define (pk key) (eq? key #t)) | |
(define (older num) (> num 1000)) | |
(define (hash160 val) (val)) | |
(let ([key_revocation 'abc] | |
[key_local 'def] | |
[key_remote 'xyz] | |
[H 100]) | |
;; to_local policy | |
(or (pk key_revocation) | |
(and (pk key_local) (older 1008))) | |
;; offered HTLC policy | |
(or (pk key_revocation) | |
(and (pk key_remote) | |
(or (pk key_local) | |
(hash160(H)))))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment