-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathexample.rkt
80 lines (67 loc) · 2.25 KB
/
example.rkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#lang racket
(require "stealc.rkt")
(require "examples/atomicswap.rkt")
(require "examples/feedynamic.rkt")
(require "examples/split.rkt")
(require "examples/feeproxy.rkt")
(require "examples/periodicpayment.rkt")
(require "examples/limitorder.rkt")
(define args
'((TMPL_FEE 100000)
(TMPL_AMT 1000000)
(TMPL_MINPAY 1000000)
(TMPL_MINTRD 1000000)
(TMPL_RATN 2)
(TMPL_RATD 5)
(TMPL_RCV "YC3XWSU3EUISB6N4EOGW5NYEMDSSWPGPMN3ZOKD33UDKPNK2HIXYPFLVXQ")
(TMPL_AUTH "YC3XWSU3EUISB6N4EOGW5NYEMDSSWPGPMN3ZOKD33UDKPNK2HIXYPFLVXQ")
(TMPL_OWN "CVMUT7RKA3XBHQVVTGBV5EKC7M7ZSCHZMHQQ3MCOCWSKWBH7PVIQ43YGGY")
(TMPL_CLS "CVMUT7RKA3XBHQVVTGBV5EKC7M7ZSCHZMHQQ3MCOCWSKWBH7PVIQ43YGGY")
(TMPL_RCV1 "YC3XWSU3EUISB6N4EOGW5NYEMDSSWPGPMN3ZOKD33UDKPNK2HIXYPFLVXQ")
(TMPL_RCV2 "CVMUT7RKA3XBHQVVTGBV5EKC7M7ZSCHZMHQQ3MCOCWSKWBH7PVIQ43YGGY")
(TMPL_FV 100000)
(TMPL_LV 100000)
(TMPL_DUR 500)
(TMPL_PERIOD 10000)
(TMPL_TIMEOUT 300000)
(TMPL_EXPIRE 300000)
(TMPL_HASHFN sha256)
(TMPL_X "uFVEhjBpkpKQ8sZaau0qsDsf0eW3oXFEn1Ar5o39vkk=")
(TMPL_HASHIMG "uFVEhjBpkpKQ8sZaau0qsDsf0eW3oXFEn1Ar5o39vkk=")
(TMPL_ASSET 42)))
(display "\n")
(display "atomic swap\n:::::\n\n")
(display (stealc (stealc-bind atomicswap args)))
(display "\n")
(display "\n")
(display "dynamic fee\n:::::\n\n")
(display (stealc (stealc-bind feedynamic args)))
(display "\n")
(display "\n")
(display "periodic payment\n:::::\n\n")
(display (stealc (stealc-bind periodicpayment args)))
(display "\n")
(display "\n")
(display "periodic payment (escrow)\n:::::\n\n")
(display (stealc (stealc-bind periodicpayment-escrow args)))
(display "\n")
(display "\n")
(display "split\n:::::\n\n")
(display (stealc (stealc-bind split args)))
(display "\n")
(display "\n")
(display "delegate keyreg\n:::::\n\n")
(display (stealc (stealc-bind feeproxykeyreg args)))
(display "\n")
;; (display "\n")
;; (display "delegate keyreg (revocable)\n:::::\n\n")
;; (display (stealc (stealc-bind feeproxykeyreg-revocable args)))
;; (display "\n")
(display "\n")
(display "limit order\n:::::\n\n")
(display (stealc (stealc-bind limitorder args)))
(display "\n")
;; (display "\n")
;; (display "limit order (fill)\n:::::\n\n")
;; (display (stealc (stealc-bind limitorder-fill args)))
;; (display "\n")