Skip to content

Commit 08c5571

Browse files
authored
Remove python-bitcoinlib dependency for ffi (payjoin#849)
We do not have a need for the python-bitcoinlib package as we use it for imports that we already have access to in our payjoin_ffi source.
2 parents dbdf25c + e385155 commit 08c5571

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
python-bitcoinlib==0.12.2
21
toml==0.10.2
32
yapf==0.43.0
43
httpx==0.28.1

payjoin-ffi/python/test/test_payjoin_integration_test.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@
1515

1616
import unittest
1717
from pprint import *
18-
from bitcoin import SelectParams
19-
from bitcoin.wallet import *
20-
from bitcoin.rpc import Proxy
21-
22-
SelectParams("regtest")
2318

2419
class InMemoryReceiverSessionEventLog(JsonReceiverSessionPersister):
2520
def __init__(self, id):
@@ -215,7 +210,7 @@ async def test_integration_v2_to_v2(self):
215210
print("Caught:", e)
216211
raise
217212

218-
def build_sweep_psbt(sender: Proxy, pj_uri: PjUri) -> bitcoinffi.Psbt:
213+
def build_sweep_psbt(sender: RpcClient, pj_uri: PjUri) -> bitcoinffi.Psbt:
219214
outputs = {}
220215
outputs[pj_uri.address()] = 50
221216
psbt = json.loads(sender.call(
@@ -227,7 +222,7 @@ def build_sweep_psbt(sender: Proxy, pj_uri: PjUri) -> bitcoinffi.Psbt:
227222
]))["psbt"]
228223
return json.loads(sender.call("walletprocesspsbt", [psbt, json.dumps(True), json.dumps("ALL"), json.dumps(False)]))["psbt"]
229224

230-
def get_inputs(rpc_connection: Proxy) -> list[InputPair]:
225+
def get_inputs(rpc_connection: RpcClient) -> list[InputPair]:
231226
utxos = json.loads(rpc_connection.call("listunspent", []))
232227
inputs = []
233228
for utxo in utxos[:1]:
@@ -248,7 +243,7 @@ def get_inputs(rpc_connection: Proxy) -> list[InputPair]:
248243
return inputs
249244

250245
class MempoolAcceptanceCallback(CanBroadcast):
251-
def __init__(self, connection: Proxy):
246+
def __init__(self, connection: RpcClient):
252247
self.connection = connection
253248

254249
def callback(self, tx):
@@ -262,7 +257,7 @@ def callback(self, tx):
262257
return None
263258

264259
class IsScriptOwnedCallback(IsScriptOwned):
265-
def __init__(self, connection: Proxy):
260+
def __init__(self, connection: RpcClient):
266261
self.connection = connection
267262

268263
def callback(self, script):
@@ -274,14 +269,14 @@ def callback(self, script):
274269
return None
275270

276271
class CheckInputsNotSeenCallback(IsOutputKnown):
277-
def __init__(self, connection: Proxy):
272+
def __init__(self, connection: RpcClient):
278273
self.connection = connection
279274

280275
def callback(self, _outpoint):
281276
return False
282277

283278
class ProcessPsbtCallback(ProcessPsbt):
284-
def __init__(self, connection: Proxy):
279+
def __init__(self, connection: RpcClient):
285280
self.connection = connection
286281

287282
def callback(self, psbt: str):

0 commit comments

Comments
 (0)