-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathMakefile_watch_op.mk
132 lines (110 loc) · 4 KB
/
Makefile_watch_op.mk
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
###############################################################################
# Watch Only Wallet
###############################################################################
###############################################################################
# import address
###############################################################################
# import public addresses exported by keygen wallet
#make filepath=./data/pubkey/client_1535423628425011000.csv import-pubkey
.PHONY: import-address
import-address:
watch import address -file ${filepath}
###############################################################################
# create unsigned transaction
###############################################################################
# detect deposit addresses and create unsigned transaction for client
#make fee=0.5 create-deposit-tx
.PHONY: create-deposit-tx
create-deposit-tx:
watch create deposit -fee ${fee}
# Note: debug use
# WIP: execute series of flows from creation of a receiving transaction to sending of a transaction
.PHONY: create-deposit-all
create-deposit-all:
watch create deposit -debug
# create payment request from payment table
#make fee=0.5 create-payment-tx
.PHONY: create-payment-tx
create-payment-tx:
watch create payment -fee ${fee}
# Note: debug use
# WIP: execute series of flows from creation of payment transaction to sending of a transaction
.PHONY: create-payment-all
create-payment-all:
watch create payment -debug
# create transfer unsigned transaction among accounts
.PHONY: create-transfer-tx
create-transfer-tx:
watch create transfer -account1 ${acnt1} -account2 ${acnt2} -amount ${amount}
###############################################################################
# send transaction
###############################################################################
# send signed transaction (deposit/payment/transfer)
#make filepath=./data/tx/deposit/deposit_8_signed_1534832879778945174 send-tx
.PHONY: send-tx
send-tx:
watch send -file ${filepath}
###############################################################################
# monitor transaction
###############################################################################
# check status of sent tx until 6 confirmations then update status
#make acnt=client monitor-tx
.PHONY: monitor-tx
monitor-tx:
watch monitor senttx -account ${acnt}
# WIP: monitor account balance
#make acnt=client monitor-balance
.PHONY: monitor-balance
monitor-balance:
watch monitor balance -account ${acnt}
###############################################################################
# operation for debug / creating test data on database
###############################################################################
# create payment data on database
# Note: available after generated pub keys are imported on wallet
.PHONY: create-testdata
create-testdata:
watch create db
# reset payment testdata
.PHONY: reset-testdata
reset-testdata:
watch db reset
###############################################################################
# Bitcoin API
###############################################################################
#balance get balance for account
#estimatefee estimate fee
#getnetworkinfo call getnetworkinfo
#listunspent call listunspent
#logging logging
#unlocktx unlock locked transaction for unspent transaction
#validateaddress validate address
# get balance for account
.PHONY: api-balance
api-balance:
watch api balance
# estimate fee
.PHONY: api-estimatefee
api-estimatefee:
watch api estimatefee
# call getnetworkinfo
.PHONY: api-getnetworkinfo
api-getnetworkinfo:
watch api getnetworkinfo
# call listunspent
.PHONY: api-listunspent
api-listunspent:
watch api listunspent
# logging
.PHONY: api-logging
api-logging:
watch api logging
# unlock locked transaction for unspent transaction
.PHONY: api-unlocktx
api-unlocktx:
watch api unlocktx
# validateaddress
#make addr=xxxxx api-validateaddress
.PHONY: api-validateaddress
api-validateaddress:
watch api validateaddress -address ${addr}