Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[crypto_hash] add Package Hasher #57

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/crypto_hash/index.ts
Expand Up @@ -52,3 +52,7 @@ export function createRawUserTransactionHasher(): CryptoHash {
export function createSigningMessageHasher(): CryptoHash {
return createHash("SigningMessage");
}

export function createPackageHasher(): CryptoHash {
return createHash("Package")
}
2 changes: 1 addition & 1 deletion src/utils/signed-message.ts
Expand Up @@ -93,7 +93,7 @@ export async function recoverSignedMessageAddress(signedMessageHex: string): Pro
// const rawMessageHex = hexlify(rawMessageBytes)
// const rawMessage = Buffer.from(stripHexPrefix(rawMessageHex), 'hex').toString('utf8')

let address
let address: string

if (signedMessage.authenticator instanceof TransactionAuthenticatorVariantEd25519) {
const signatureBytes = signedMessage.authenticator.signature.value;
Expand Down