From ff2532908e2f051f33005ad3a8649422f09b2790 Mon Sep 17 00:00:00 2001 From: Cong Zhang Date: Mon, 17 Jun 2024 13:40:39 +0800 Subject: [PATCH] add babylon batch broadcast tx interface --- cobo_custody/client/mpc_client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cobo_custody/client/mpc_client.py b/cobo_custody/client/mpc_client.py index 65ff8bb..c6f2a8a 100644 --- a/cobo_custody/client/mpc_client.py +++ b/cobo_custody/client/mpc_client.py @@ -1,6 +1,6 @@ import json import time -from typing import Tuple +from typing import Tuple, List from urllib.parse import urlencode import requests @@ -337,6 +337,10 @@ def babylon_broadcast_staking_transaction(self, request_id: str): params = {"request_id": request_id} return self.request("POST", "/v1/custody/mpc/babylon/broadcast_staking_transaction/", params) + def babylon_batch_broadcast_staking_transaction(self, request_ids: List[str]): + params = {"request_ids": ','.join(request_ids)} + return self.request("POST", "/v1/custody/mpc/babylon/batch_broadcast_staking_transaction/", params) + def babylon_get_staking_info(self, request_id: str): params = {"request_id": request_id} return self.request("GET", "/v1/custody/mpc/babylon/get_staking_info/", params)