Skip to content

Commit

Permalink
fix: properly print key class (#1684)
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <timo@animo.id>
  • Loading branch information
TimoGlastra committed Jan 9, 2024
1 parent 739b19b commit 99b801d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/core/src/crypto/Key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,13 @@ export class Key {
public get supportsSigning() {
return isSigningSupportedForKeyType(this.keyType)
}

// We return an object structure based on the key, so that when this object is
// serialized to JSON it will be nicely formatted instead of the bytes printed
private toJSON() {
return {
keyType: this.keyType,
publicKeyBase58: this.publicKeyBase58,
}
}
}

0 comments on commit 99b801d

Please sign in to comment.