Skip to content

Commit

Permalink
Fix oracle parser
Browse files Browse the repository at this point in the history
  • Loading branch information
gitzhou committed Aug 22, 2023
1 parent 8a3fdfd commit 08ae8f5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/rabinSignature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
Utils,
slice,
toByteString,
byteString2Int,
} from 'scrypt-ts'

export type RabinPubKey = bigint
Expand Down Expand Up @@ -80,14 +79,14 @@ export class RabinVerifierWOC extends SmartContractLib {
static parsePubKey(response: {
signatures: { rabin: { public_key: string } }
}): RabinPubKey {
return byteString2Int(response.signatures.rabin.public_key + '00')
return Utils.fromLEUnsigned(response.signatures.rabin.public_key)
}

static parseSig(response: {
signatures: { rabin: { signature: string; padding: string } }
}): RabinSig {
return {
s: byteString2Int(response.signatures.rabin.signature + '00'),
s: Utils.fromLEUnsigned(response.signatures.rabin.signature),
padding: response.signatures.rabin.padding,
}
}
Expand Down

0 comments on commit 08ae8f5

Please sign in to comment.