mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-23 14:50:42 +01:00
Use specific functions for Oracle Signing version (#2659)
This commit is contained in:
parent
d1cc5e0ade
commit
e68ffb49da
1 changed files with 2 additions and 6 deletions
|
@ -84,9 +84,7 @@ object SigningVersion extends StringFactory[SigningVersion] {
|
|||
}
|
||||
|
||||
override def calcAnnouncementHash(eventTLV: OracleEventTLV): ByteVector =
|
||||
CryptoUtil
|
||||
.taggedSha256(eventTLV.bytes, "DLC/oracle/announcement/v0")
|
||||
.bytes
|
||||
CryptoUtil.sha256DLCAnnouncement(eventTLV.bytes).bytes
|
||||
|
||||
override def calcOutcomeHash(
|
||||
descriptor: EventDescriptorTLV,
|
||||
|
@ -94,9 +92,7 @@ object SigningVersion extends StringFactory[SigningVersion] {
|
|||
descriptor match {
|
||||
case _: EnumEventDescriptorV0TLV | _: RangeEventDescriptorV0TLV |
|
||||
_: DigitDecompositionEventDescriptorV0TLV =>
|
||||
CryptoUtil
|
||||
.taggedSha256(byteVector, "DLC/oracle/attestation/v0")
|
||||
.bytes
|
||||
CryptoUtil.sha256DLCAttestation(byteVector).bytes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue