Add p2sh-p2wsh support, add Navcoin tests.

This commit is contained in:
tecnovert
2023-08-29 22:06:16 +02:00
parent 45e49848b1
commit 0b963bffde
23 changed files with 5703 additions and 192 deletions

View File

@@ -163,15 +163,15 @@ class FIROInterface(BTCInterface):
return CScript([OP_HASH160, script_hash_hash, OP_EQUAL])
def getSeedHash(self, seed) -> bytes:
def getSeedHash(self, seed: bytes) -> bytes:
return hash160(seed)[::-1]
def encodeScriptDest(self, script):
def encodeScriptDest(self, script_dest: bytes) -> str:
# Extract hash from script
script_hash = script[2:-1]
script_hash = script_dest[2:-1]
return self.sh_to_address(script_hash)
def getScriptScriptSig(self, script):
def getScriptScriptSig(self, script: bytes) -> bytearray:
return CScript([OP_0, hashlib.sha256(script).digest()])
def withdrawCoin(self, value, addr_to, subfee):