+# from flask_restplus import inputs
+from flask_restful import inputs
from flask_restful import Resource
from flask_restful import reqparse
from app.model.hello import get_hello_result
parser.add_argument('path_list', type=str, action='append')
parser.add_argument('account_index_int', type=int)
parser.add_argument('address_index_int', type=int)
-parser.add_argument('change_bool', type=bool)
+parser.add_argument('change_bool', type=inputs.boolean)
class Hello(Resource):
address_index = args.get('address_index_int')
change = args.get('change_bool')
xpub = args.get('xpub_str')
- P2WPKH_program = create_P2WPKH_program(account_index, address_index, change, xpub)
- return P2WPKH_program
\ No newline at end of file
+ control_program = create_P2WPKH_program(account_index, address_index, change, xpub)
+ return control_program
\ No newline at end of file
path_list = ['2c000000', '99000000']
account_index_str = (account_index_int).to_bytes(4, byteorder='little').hex()
path_list.append(account_index_str)
+ print("change_bool:", type(change_bool), change_bool)
if change_bool == True:
branch_str = (1).to_bytes(4, byteorder='little').hex()
print("true")
ripemd160 = hashlib.new('ripemd160')
ripemd160.update(child_public_key_byte)
public_key_hash_str = ripemd160.hexdigest()
- P2WPKH_program_str = '0014' + public_key_hash_str
+ control_program_str = '0014' + public_key_hash_str
- return P2WPKH_program_str
\ No newline at end of file
+ return control_program_str
\ No newline at end of file