Skip to content

Commit

Permalink
block number or latest for getNodePublicKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Lesther Caballero authored and Lesther Caballero committed May 17, 2024
1 parent 90219c4 commit 054959a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions packages/ethers/dist/ethers.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -38560,20 +38560,17 @@ const {
} = axios;

async function getNodePublicKey(rpcEndpoint, options) {
let blockNumOrHash = 'latest';
let blockNumber = 'latest';
if (options) {
if (options.blockHash) {
blockNumOrHash = options.blockHash;
}
if (options.blockNumber) {
blockNumOrHash = options.blockNumber;
blockNumber = options.blockNumber;
}
}
const requestData = {
id: 1,
jsonrpc: '2.0',
method: 'eth_getNodePublicKey',
params: [blockNumOrHash],
params: [blockNumber],
};
try {
const { data } = await axios.post(rpcEndpoint, requestData);
Expand Down
9 changes: 3 additions & 6 deletions packages/ethers/dist/ethers.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -28848,20 +28848,17 @@
exports.getNodePublicKey = void 0;
const axios_1 = __importDefault(require$$0$1);
async function getNodePublicKey(rpcEndpoint, options) {
let blockNumOrHash = 'latest';
let blockNumber = 'latest';
if (options) {
if (options.blockHash) {
blockNumOrHash = options.blockHash;
}
if (options.blockNumber) {
blockNumOrHash = options.blockNumber;
blockNumber = options.blockNumber;
}
}
const requestData = {
id: 1,
jsonrpc: '2.0',
method: 'eth_getNodePublicKey',
params: [blockNumOrHash],
params: [blockNumber],
};
try {
const { data } = await axios_1.default.post(rpcEndpoint, requestData);
Expand Down

0 comments on commit 054959a

Please sign in to comment.