Socket
Book a DemoInstallSign in
Socket

@bosonprotocol/eth-connect-sdk

Package Overview
Dependencies
Maintainers
3
Versions
588
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bosonprotocol/eth-connect-sdk - npm Package Compare versions

Comparing version

to
1.8.0-alpha.11

1

dist/cjs/eth-connect-adapter.d.ts

@@ -18,2 +18,3 @@ import { RequestManager } from "eth-connect";

constructor(requestManager: RequestManager, externalFeatures: ExternalFeatures, requestManagerSigner?: RequestManager);
getCurrentTimeMs(): Promise<number>;
getSignerAddress(): Promise<string>;

@@ -20,0 +21,0 @@ isSignerContract(): Promise<boolean>;

11

dist/cjs/eth-connect-adapter.js

@@ -25,2 +25,8 @@ "use strict";

}
getCurrentTimeMs() {
return __awaiter(this, void 0, void 0, function* () {
const { timestamp } = yield this._requestManager.eth_getBlockByNumber("latest", false);
return Number(timestamp.valueOf()) * 1000; // Convert seconds to milliseconds
});
}
getSignerAddress() {

@@ -86,6 +92,3 @@ return __awaiter(this, void 0, void 0, function* () {

const blockNumber = yield this._requestManager.eth_blockNumber();
return this._requestManager.eth_call({
data: transactionRequest.data,
to: transactionRequest.to
}, blockNumber);
return this._requestManager.eth_call({ data: transactionRequest.data, to: transactionRequest.to }, blockNumber);
});

@@ -92,0 +95,0 @@ }

@@ -18,2 +18,3 @@ import { RequestManager } from "eth-connect";

constructor(requestManager: RequestManager, externalFeatures: ExternalFeatures, requestManagerSigner?: RequestManager);
getCurrentTimeMs(): Promise<number>;
getSignerAddress(): Promise<string>;

@@ -20,0 +21,0 @@ isSignerContract(): Promise<boolean>;

@@ -18,2 +18,6 @@ const TX_POLLING_DELAY = 2000;

}
async getCurrentTimeMs() {
const { timestamp } = await this._requestManager.eth_getBlockByNumber("latest", false);
return Number(timestamp.valueOf()) * 1000; // Convert seconds to milliseconds
}
async getSignerAddress() {

@@ -66,6 +70,3 @@ if (this._externalFeatures?.getSignerAddress) {

const blockNumber = await this._requestManager.eth_blockNumber();
return this._requestManager.eth_call({
data: transactionRequest.data,
to: transactionRequest.to
}, blockNumber);
return this._requestManager.eth_call({ data: transactionRequest.data, to: transactionRequest.to }, blockNumber);
}

@@ -72,0 +73,0 @@ async estimateGas(transactionRequest) {

{
"name": "@bosonprotocol/eth-connect-sdk",
"version": "1.8.0-alpha.10",
"version": "1.8.0-alpha.11",
"description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.",

@@ -34,3 +34,3 @@ "main": "./dist/cjs/index.js",

"dependencies": {
"@bosonprotocol/common": "^1.31.0-alpha.10"
"@bosonprotocol/common": "^1.31.0-alpha.11"
},

@@ -51,3 +51,3 @@ "devDependencies": {

},
"gitHead": "40d4ae1898ec1eeda499376adb93246f9356552b"
"gitHead": "811cf4e62fa187e2092d4f6484b7929eb45547fd"
}

@@ -39,2 +39,10 @@ import { RequestManager } from "eth-connect";

async getCurrentTimeMs(): Promise<number> {
const { timestamp } = await this._requestManager.eth_getBlockByNumber(
"latest",
false
);
return Number(timestamp.valueOf()) * 1000; // Convert seconds to milliseconds
}
public async getSignerAddress() {

@@ -101,6 +109,3 @@ if (this._externalFeatures?.getSignerAddress) {

return this._requestManager.eth_call(
{
data: transactionRequest.data,
to: transactionRequest.to
},
{ data: transactionRequest.data, to: transactionRequest.to },
blockNumber

@@ -107,0 +112,0 @@ );

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet