New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@foxone/mvm

Package Overview
Dependencies
Maintainers
4
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@foxone/mvm

FoxONE Mixin Virtual Network tools

latest
npmnpm
Version
0.1.37
Version published
Maintainers
4
Created
Source

Tools for Mixin Virtual Machine

Provider a tool for MVM connection, get assets, withdarw...

Usage

install from npm

yarn add @foxone/mvm

connect to MVM via metamask or walletconnect

import MVM from "@foxone/mvm";

const mvm = new MVM({
  infuraId: "..."
});

await mvm.connect("metamask");
// await mvm.connect("walletconnect")

after connected to MVM, interaction is avaliable.

withdraw to mixin:

// typeof payload
export interface WithdrawPayload {
  asset_id: string;
  amount: string | number;
  action: WithdrawAction;
}

export interface WithdrawAction {
  receivers: string[];
  threshold?: number;
  extra: string;
}

const payload: WithdrawPayload = "...";

mvm.withdraw(payload);

get asset balance:

// same struct as https://api.mixin.one/asset/:id
const asset = await mvm.getAsset("...asset id");

get wallet assets:

// same struct as https://api.mixin.one/assets
const assets = await mvm.getAssets();

get auth token:

// jwt token for https://api.mixin.one/me
const token = await mvm.getAuthToken();

FAQs

Package last updated on 14 Aug 2023

Did you know?

Socket

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.

Install

Related posts