
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@waves/provider-metamask
Advanced tools
* [Overview](#overview) * [Getting Started](#getting-started)
ProviderMetamask
To install Signer and ProviderMetamask libraries use
npm i @waves/signer @waves/provider-metamask
Add library initialization to your app.
For Stagenet:
import { Signer } from '@waves/signer';
import { ProviderMetamask } from '@waves/provider-metamask';
const signer = new Signer({
// Specify URL of the node on Stagenet
NODE_URL: 'https://nodes-stagenet.wavesnodes.com'
});
const provider = new ProviderMetamask({
wavesConfig: {
nodeUrl: 'https://nodes-stagenet.wavesnodes.com',
chainId: 'S'.charCodeAt(0)
}
});
signer.setProvider(provider);
For Mainnet:
import { Signer } from '@waves/signer';
import { ProviderMetamask } from '@waves/provider-metamask';
const signer = new Signer();
const provider = new ProviderMetamask();
signer.setProvider(provider);
Now your application is ready to work with Waves Platform. Let's test it by implementing basic functionality. For example, we could try to authenticate user and transfer funds.
const user = await signer.login();
const [transfer] = await signer
.transfer({
amount: 1,
recipient: 'alias:T:merry',
})
.broadcast();
const user = await signer.login();
const [invoke] = await signer
.invoke({
dApp: "3F4bY4PsS8E1tShx9ruSYthie3uzYiSffSv",
call:{
function: "deposit",
args:[{ type: "string", value: "string" }]
},
payment:[]
})
.broadcast();
For more information see Signer documentation.
Set the order parameters:
const orderData = {
orderType: 'sell',
version: 4,
assetPair: {
amountAsset: '8KTfWNoWYf9bP3hg1QYBLpkk9tgRb5wiUZnT1HUiNa9r',
priceAsset: 'WAVES',
},
price: 100000,
amount: 100000,
timestamp: 1634563969123,
expiration: 1637069590926,
matcherFee: 300000,
matcherFeeAssetId: null,
};
const provider = new ProviderMetamask();
const sign = await provider.signOrder(orderData);
import { ProviderMetamask } from '@waves/provider-metamask';
import { wavesAddress2eth } from '@waves/node-api-js';
const user = await signer.login();
const ethereumAddress = wavesAddress2eth(user.address);
const message = 'message text';
const provider = new ProviderMetamask();
const sign = await provider.signMessage(message);
FAQs
* [Overview](#overview) * [Getting Started](#getting-started)
We found that @waves/provider-metamask demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 16 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.