@@ -120,6 +120,14 @@ def generate_addresses(self, chain_code: str, count: int) -> ApiResponse:
120
120
}
121
121
return self .request ("POST" , "/v1/custody/mpc/generate_addresses/" , params )
122
122
123
+ def generate_address_memo (self , chain_code : str , address : str , count : int ) -> ApiResponse :
124
+ params = {
125
+ "chain_code" : chain_code ,
126
+ "address" : address ,
127
+ "count" : count ,
128
+ }
129
+ return self .request ("POST" , "/v1/custody/mpc/generate_address_memo/" , params )
130
+
123
131
def update_address_description (self , coin : str , address : str , description : str ) -> ApiResponse :
124
132
params = {
125
133
"coin" : coin ,
@@ -168,7 +176,7 @@ def create_transaction(self, coin: str, request_id: str, amount: str, from_addr:
168
176
gas_price : int = None , gas_limit : int = None , operation : int = None ,
169
177
extra_parameters : str = None , max_fee : int = None ,
170
178
max_priority_fee : int = None , fee_amount : int = None , remark : str = None ,
171
- auto_fuel : int = 0 ) -> ApiResponse :
179
+ auto_fuel : int = 0 , memo : str = "" ) -> ApiResponse :
172
180
params = {
173
181
"coin" : coin ,
174
182
"request_id" : request_id ,
@@ -186,6 +194,7 @@ def create_transaction(self, coin: str, request_id: str, amount: str, from_addr:
186
194
"fee_amount" : fee_amount ,
187
195
"remark" : remark ,
188
196
"auto_fuel" : auto_fuel ,
197
+ "memo" : memo ,
189
198
}
190
199
return self .request ("POST" , "/v1/custody/mpc/create_transaction/" , params )
191
200
@@ -289,3 +298,15 @@ def get_max_send_amount(self, coin: str, fee_rate: float, to_address: str, from_
289
298
if from_address :
290
299
params ["from_address" ] = from_address
291
300
return self .request ("GET" , "/v1/custody/mpc/get_max_send_amount/" , params )
301
+
302
+ def lock_spendable (self , coin : str , tx_hash : str , vout_n : int ):
303
+ params = {"coin" : coin , "tx_hash" : tx_hash , "vout_n" : vout_n }
304
+ return self .request ("POST" , "/v1/custody/mpc/lock_spendable/" , params )
305
+
306
+ def unlock_spendable (self , coin : str , tx_hash : str , vout_n : int ):
307
+ params = {"coin" : coin , "tx_hash" : tx_hash , "vout_n" : vout_n }
308
+ return self .request ("POST" , "/v1/custody/mpc/unlock_spendable/" , params )
309
+
310
+ def get_rare_satoshis (self , coin : str , tx_hash : str , vout_n : int ):
311
+ params = {"coin" : coin , "tx_hash" : tx_hash , "vout_n" : vout_n }
312
+ return self .request ("GET" , "/v1/custody/mpc/get_rare_satoshis/" , params )
0 commit comments