
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@nexeraid/web3-user-sdk
Advanced tools
## Usage To install the Web3 User SDK you need to navigate inside of your client-side application and run the following command:
To install the Web3 User SDK you need to navigate inside of your client-side application and run the following command:
yarn add @nexeraid/web3-user-sdk
import { Web3User } from "@nexeraid/web3-user-sdk";
const web3User = new Web3User({
chainId: 80001, // Mumbai
clientId, // PROVIDE THE CLIENT_ID RECEIVED FROM NEXERA TEAM
verifier, // PROVIDE THE VERIFIER RECEIVED FROM NEXERA TEAM
rpc: "https://rpc-mumbai.maticvigil.com" // Mumbai RPC (optional)
})
const web3auth = await web3User.getInstance()
Generates a new Private Key based on your JWT Token.
The jwtVerifierIdField
parameter is the Key of the unique identifier which publicly represents a user on a verifier. Possible values are sub
or email
, a variable which is unique accross users. This field should be included in the jwt token too.
Domain is the target domain for your proxy login provider like Auth0, such as 'example.auth0.com', 'example.eu.auth0.com', 'example.mycompany.com' or even 'http://localhost:3002/'.
const userProvider = await web3User.connect(jwtToken, jwtVerifierIdField, domain);
Allows the user to sign a message using their Private Key. The message must have the TypedDataInput
type. This type of signature can be used for signing meta transactions and similar formats.
export type TypedDataInput = {
domain: EIP712Domain,
message: MessageStruct,
types: { SponsoredCallERC2771?: BasicStruct[]; ForwardRequest?: BasicStruct[] },
}
export type EIP712Domain = {
name: string,
version: string,
chainId: number,
verifyingContract: string,
}
export type MessageStruct = {
// SponsoredCallERC2771
userNonce?: BigNumberish,
userDeadline?: BigNumberish,
chainId: BigNumberish,
target?: string,
user?: string,
// ForwardRequest
from?: string,
to?: string,
value?: number,
gas?: number,
nonce?: number,
data: BytesLike,
}
export type BasicStruct = {
name: string,
type: string,
}
const signature = await web3User.sign(msg);
This method reconstructs the Private Key from its Shares and allows the user to retrieve his private key.
const privateKey = await web3User.retrievePrivateKey();
This method allows the user to retrieve his public address.
const address = await web3User.getAddress();
Sign and send a transaction.
const txHash = await web3User.sendTransaction(to, data, gasLimit);
FAQs
## Usage To install the Web3 User SDK you need to navigate inside of your client-side application and run the following command:
We found that @nexeraid/web3-user-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.