Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turnkey/ethers

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turnkey/ethers - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0-beta.0

4

dist/index.d.ts

@@ -1,2 +0,2 @@

import { ethers } from "ethers";
import { ethers, type Bytes } from "ethers";
import { PublicApiService } from "@turnkey/http";

@@ -37,3 +37,3 @@ type TActivity = PublicApiService.TPostGetActivityResponse["activity"];

signTransaction(transaction: ethers.utils.Deferrable<ethers.providers.TransactionRequest>): Promise<string>;
signMessage(message: string): Promise<string>;
signMessage(message: string | Bytes): Promise<string>;
_signMessageWithErrorWrapping(message: string): Promise<string>;

@@ -40,0 +40,0 @@ _signMessageImpl(message: string): Promise<string>;

@@ -97,5 +97,9 @@ "use strict";

}
// Returns the signed prefixed-message. Per Ethers spec, this method treats:
// - Bytes as a binary message
// - string as a UTF8-message
// i.e. "0x1234" is a SIX (6) byte string, NOT 2 bytes of data
async signMessage(message) {
const nonHexPrefixedSerializedMessage = message.replace(/^0x/, "");
const signedMessage = await this._signMessageWithErrorWrapping(nonHexPrefixedSerializedMessage);
const hashedMessage = ethers_1.ethers.utils.hashMessage(message);
const signedMessage = await this._signMessageWithErrorWrapping(hashedMessage);
return `${signedMessage}`;

@@ -127,4 +131,4 @@ }

payload: message,
encoding: "PAYLOAD_ENCODING_TEXT_UTF8",
hashFunction: "HASH_FUNCTION_KECCAK256",
encoding: "PAYLOAD_ENCODING_HEXADECIMAL",
hashFunction: "HASH_FUNCTION_NO_OP",
},

@@ -131,0 +135,0 @@ timestampMs: String(Date.now()), // millisecond timestamp

{
"name": "@turnkey/ethers",
"version": "0.5.0",
"version": "0.6.0-beta.0",
"main": "./dist/index.js",

@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc