
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.
@projectlibertylabs/mock-siwf-embedded-wallet-sdk
Advanced tools
Mock SIWF SDK for Embedded Wallets
Find the real package version here: https://github.com/ProjectLibertyLabs/siwf-embedded-wallet-sdk
npm i @projectlibertylabs/mock-siwf-embedded-wallet-sdk
import { startSiwf } from "@projectlibertylabs/mock-siwf-embedded-wallet-sdk";
// ...
const startSiwfResponse = await startSiwf(
userAddress,
signatureFn,
gatewayFetchFn,
siwfSignedRequest,
userHandle,
email,
msaCreationCallback,
);
// ...
};
startSiwf
ParametersuserAddress
: The wallet address of the usersignatureFn
: Connect the specific embedded wallet to the SDK (see Signature Function below)gatewayFetchFn
: Connect the SDK to the Frequency Gateway Account Service (see Gateway Fetch Function below)userHandle
: (Optional, New User Only) The user supplied handle to registeremail
: (Optional, New User Only) The user's email address for generating the values for the Recovery SystemmsaCreationCallback
: (Optional) Will be called with the final MSA Id and Handle for the user (see MSA Callback Function below)This function connects your embedded wallet to the SIWF interface. It follows the same interface as the window.ethereum.request
method, although is reduced in scope.
There are only two methods requested: eth_signTypedData_v4
for EIP-712 signature requests and personal_sign
for CAIP-122 Sign In with X standard.
type SignatureFn = (request: WindowEthereumRequest) => Promise<string>;
This function connects the SDK to your instance of Frequency Gateway Account Service. Remember that Account Service is NOT a public facing service, so MUST be securely proxied. This function will only call two endpoints, but you must map those endpoints to your own endpoints.
authorizationPayload
versiontype Address = string;
type GatewayFetchFn = (
method: "GET" | "POST",
path: `/v1/accounts/account/${Address}` | "/v2/accounts/siwf",
body?: undefined | { authorizationPayload: string; },
) => Promise<Response>;
When a new user signs up, the allocation of the MSA Id on-chain can take some time. This callback will be called once the allocation is completed, or if the user already has an account, it will return the value without waiting.
interface AccountResponse {
msaId: string;
handle?: {
base_handle: string;
canonical_base: string;
suffix: number;
};
}
type MsaCreationCallbackFn = (account: AccountResponse) => void;
Examples and details for the Turnkey Embedded Wallet can be found Turnkey.md.
SignatureFn
and GatewayFetchFn
with the correct parameters.SignatureFn
or the GatewayFetchFn
.GatewayFetchFn
due to the static nature, but they do have the correct structure.FAQs
Mock SIWF SDK for Embedded Wallets
The npm package @projectlibertylabs/mock-siwf-embedded-wallet-sdk receives a total of 26 weekly downloads. As such, @projectlibertylabs/mock-siwf-embedded-wallet-sdk popularity was classified as not popular.
We found that @projectlibertylabs/mock-siwf-embedded-wallet-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.