Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
timurnkey committed Oct 20, 2023
1 parent e2f40dc commit 953ca5a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/cosmjs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ export class TurnkeyDirectWallet implements OfflineDirectSigner {
): Promise<ExtendedSecp256k1Signature> {
const { activity } = await TurnkeyApi.signRawPayload({
body: {
type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD",
type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2",
organizationId: this.organizationId,
timestampMs: String(Date.now()),
parameters: {
privateKeyId: this.privateKeyId,
signWith: this.privateKeyId,
payload: toHex(message),
encoding: "PAYLOAD_ENCODING_HEXADECIMAL",
hashFunction: "HASH_FUNCTION_SHA256",
Expand Down
8 changes: 4 additions & 4 deletions packages/ethers/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ export class TurnkeySigner extends ethers.Signer implements TypedDataSigner {

private async _signTransactionImpl(message: string): Promise<string> {
const { activity } = await this.client.signTransaction({
type: "ACTIVITY_TYPE_SIGN_TRANSACTION",
type: "ACTIVITY_TYPE_SIGN_TRANSACTION_V2",
organizationId: this.organizationId,
parameters: {
privateKeyId: this.privateKeyId,
signWith: this.privateKeyId,
type: "TRANSACTION_TYPE_ETHEREUM",
unsignedTransaction: message,
},
Expand Down Expand Up @@ -181,10 +181,10 @@ export class TurnkeySigner extends ethers.Signer implements TypedDataSigner {

async _signMessageImpl(message: string): Promise<string> {
const { activity } = await this.client.signRawPayload({
type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD",
type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2",
organizationId: this.organizationId,
parameters: {
privateKeyId: this.privateKeyId,
signWith: this.privateKeyId,
payload: message,
encoding: "PAYLOAD_ENCODING_HEXADECIMAL",
hashFunction: "HASH_FUNCTION_NO_OP",
Expand Down
8 changes: 4 additions & 4 deletions packages/viem/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ async function signTransactionImpl(
privateKeyId: string
): Promise<string> {
const { activity } = await client.signTransaction({
type: "ACTIVITY_TYPE_SIGN_TRANSACTION",
type: "ACTIVITY_TYPE_SIGN_TRANSACTION_V2",
organizationId: organizationId,
parameters: {
privateKeyId: privateKeyId,
signWith: privateKeyId,
type: "TRANSACTION_TYPE_ETHEREUM",
unsignedTransaction: unsignedTransaction,
},
Expand Down Expand Up @@ -329,10 +329,10 @@ async function signMessageImpl(
privateKeyId: string
): Promise<string> {
const { activity } = await client.signRawPayload({
type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD",
type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2",
organizationId: organizationId,
parameters: {
privateKeyId: privateKeyId,
signWith: privateKeyId,
payload: message,
encoding: "PAYLOAD_ENCODING_HEXADECIMAL",
hashFunction: "HASH_FUNCTION_NO_OP",
Expand Down

0 comments on commit 953ca5a

Please sign in to comment.