Skip to content

Commit

Permalink
e2e pxe test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Jan 29, 2024
1 parent a197591 commit 6383c68
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions yarn-project/circuits.js/src/structs/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ export class Header {
);
}

/**
* Serializes this instance into a string.
* @returns Encoded string.
*/
public toString(): string {
return this.toBuffer().toString('hex');
}

static fromString(str: string): Header {
const buffer = Buffer.from(str.replace(/^0x/i, ''), 'hex');
return Header.fromBuffer(buffer);
Expand Down

0 comments on commit 6383c68

Please sign in to comment.