
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@rsksmart/tokenbridge-sdk
Advanced tools
SDK that simplifies interaction between RSK TokenBridge and client applications
TokenBridge SDK simplifies the integration between client applications all the smart contracts that participate in the RSK token bridge.
npm install @rsksmart/tokenbridge-sdk
Create TokenBridge client instance
const tokenBridge = new TokenBridge({ network: 'Testnet', rskConnection: connection })
Set the RPC URLs of the Networks that you'll be crossing and configure the SDK with those networks
const networks = setNetworksRpcs({
Sepolia: config.otherNetworkRpc,
RskTestnet: config.rskRpc
})
tokenBridge.setCrossingNetworks(networks.RskTestnet, networks.Sepolia)
Then you can start doing operations with the client
const toAddress = '0x123...'
const pair = buildTokenPairs(networks.Sepolia.tokens, networks.RskTestnet.tokens)
.find(tokenPair => tokenPair.originToken.tokenInfo.symbol === 'LINK')
const crossTx = await tokenBridge.cross(pair, 20, toAddress)
You can read more about RSK TokenBridge here.
You will need to be connected to the blockchain to execute most of the operations, to do that you need to create a RSKConnection object and provide it during SDK construction Flyover object
const rsk = await BlockchainConnection.createUsingStandard(window.ethereum)
const tokenBridge = new TokenBridge({ network: 'Testnet', rskConnection: connection })
Notice that the connection class is called BlockchainConnection
. This will be renamed to BlockchainConnection
in future updates.
Also you can change SDK connection at any moment by doing the following
const sepolia = await BlockchainConnection.createUsingStandard(window.ethereum)
await tokenBridge.changeConnection(sepolia)
There are 3 ways to create an RSK connection, you can check them in BlockchainConnection
class documentation
To see the full API of this package please refer to the the docs folder of this project
FAQs
SDK that simplifies interaction between RSK TokenBridge and client applications
We found that @rsksmart/tokenbridge-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.