Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@glif/filsnap-adapter-test
Advanced tools
FilSnap adapter is used to install Filecoin snap and expose API toward snap.
For more details on Filecoin snap itself see snap repo or read full Filecoin snap documentation.
Adapter has only exposed function for installing Filecoin snap.
async function enableFilecoinSnap(
config: Partial<SnapConfig>,
snapOrigin?: string
): Promise<MetamaskFilecoinSnap>
On snap installation, it is possible to send full or partial configuration.
If you only provide network
property a predefined configuration for the specified network will be used.
Other properties are optional but will override default values if provided.
Below you can see structure of config object:
export interface SnapConfig {
derivationPath: string;
token: string;
network: FilecoinNetwork; // "f" || "t"
rpcUrl: string;
unit?: UnitConfiguration;
}
export interface UnitConfiguration {
symbol: string;
decimals: number;
image?: string;
customViewUrl?: string;
}
After snap installation, this function returns MetamaskFilecoinSnap
object that can be used to retrieve snap API.
An example of initializing Filecoin snap and invoking snap API is shown below.
// install snap and fetch API
const snap = await enableFilecoinSnap({network: "t"});
const api = await metamaskFilecoinSnap.getFilecoinSnapApi();
// invoke API
const address = await api.getAddress();
console.log(`Snap installed, account generated with address: ${address}`);
FAQs
Adapter for installing Filsnap
The npm package @glif/filsnap-adapter-test receives a total of 0 weekly downloads. As such, @glif/filsnap-adapter-test popularity was classified as not popular.
We found that @glif/filsnap-adapter-test demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.