
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@maticnetwork/wallet-widget
Advanced tools
Wallet widget is a light wallet which can be embedded in any sites for executing transaction on Polygon.
Wallet widget is a javascript library for Polygon wallet. It can be embedded in any sites for executing transaction on Polygon.
Every widget is identified by an id which you can get from Widget dashboard
Widget can be created from the widget dashboard page in the wallet application. It allows the user to create a new widget with some customisable options.
Once the widget is created, You can copy code snippet and add it in your application or only get the id and configure by yourself.
npm i @maticnetwork/wallet-widget
All examples for different framework and tools are present in examples folder of this Repo.
// Create instance of widget with some configuration
var widget = new MaticWidget({
appId: "<your app id>", //appId from dashboard
target: '#btnMaticWidget', // element selector for showing widget on click
});
// Create widget whenever you are ready. It is best to call create function after document is loaded.
widget.create();
Configuration can be supplied in Widget constructor.
<button id="btnMaticWidget">Matic widget</button>
Widget emits some events which can be used to know what is happening inside the application.
widget.on('load',()=>{
console.log('widget is loaded');
})
widget.off('load',<callback>)
// note - callback should be same what was used to subscribe the event. So its better to store the callback in a variable.
load - Widget is loaded
close - Widget is closed
approveInit - Approval transaction is initialized
approveComplete - Approval transaction is completed
approveError - Approval transaction failed due to some error, or the user denied the transaction on Metamask
depositInit - Deposit transaction is initialized
depositComplete - Deposit transaction is completed
depositError - Deposit transaction failed due to some error, or the user denied the deposit complete transaction on Metamask
burnInit - Withdrawal burn transaction is initialized
burnComplete - Withdrawal burn transaction is completed
confirmWithdrawInit - Withdrawal is checkpointed and confirm transaction is initialized
confirmWithdrawComplete - Withdrawal confirm transaction in completed
confirmWithdrawError - Withdrawal confirm transaction failed due to some error, or the user denied the withdrawal confirm transaction on Metamask
exitInit - Withdrawal exit transaction is initialized
exitComplete - Withdrawal exit transaction is completed
exitError - Withdrawal exit transaction failed due to some error, or the user denied the withdrawal exit transaction on Metamask
show the widget
widget.show()
hide the widget
widget.hide()
Complete withdrawal confirm and exit transactions by passing the TX details as payload.
NOTE: withdrawConfirmTxHash is not required for PoS transaction.
payload = {
burnTxHash: '0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
withdrawConfirmTxHash: '0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
isPoS: true/false,
amount: 'XXXXX',
token: {
childAddress: '0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
},
}
widget.withdrawExit(payload)
FAQs
Wallet widget is a light wallet which can be embedded in any sites for executing transaction on Polygon.
The npm package @maticnetwork/wallet-widget receives a total of 0 weekly downloads. As such, @maticnetwork/wallet-widget popularity was classified as not popular.
We found that @maticnetwork/wallet-widget demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.