Skip to content

Commit

Permalink
temp: put back signSwiftOrderParamsMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasDeco committed Nov 19, 2024
1 parent b5bab6b commit 3d12d7e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sdk/src/driftClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5701,13 +5701,20 @@ export class DriftClient {
return this.signMessage(swiftServerMessage);
}

public signSwiftOrderParamsMessage(
orderParamsMessage: SwiftOrderParamsMessage
): Buffer {
const takerOrderParamsMessage = this.encodeSwiftOrderParamsMessage(orderParamsMessage);
return this.signMessage(new TextEncoder().encode(takerOrderParamsMessage));
}

public encodeSwiftOrderParamsMessage(
orderParamsMessage: SwiftOrderParamsMessage
): string {
return digest(this.program.coder.types.encode(
'SwiftOrderParamsMessage',
orderParamsMessage
)).toString("utf-8");
)).toString("hex");
}

public decodeSwiftOrderParamsMessage(
Expand Down

0 comments on commit 3d12d7e

Please sign in to comment.