This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* eslint-disable max-lines-per-function */ | |
| /* eslint-disable no-sync */ | |
| const solanaWeb3 = require('@solana/web3.js'); | |
| const { Connection, Keypair, PublicKey, sendAndConfirmTransaction, LAMPORTS_PER_SOL, SystemProgram, Transaction, VersionedMessage, VersionedTransaction } = solanaWeb3 | |
| const { sign } = require('tweetnacl'); | |
| const { decodeUTF8 } = require('tweetnacl-util'); | |
| const bs58 = require('bs58'); | |
| const bip39 = require('bip39'); | |
| const { derivePath } = require('ed25519-hd-key') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fetch = require('node-fetch'); | |
| const rpcNodes = [ | |
| '***.***.***.***', | |
| '***.***.***.***', | |
| ]; | |
| async function getReferenceBlock() { | |
| try { | |
| const res = await fetch('https://bsc-mainnet.public.blastapi.io', { |
OlderNewer