Package detail

filsnap-adapter

filecoin-project1.1k(Apache-2.0 AND MIT)3.3.8

Adapter for installing Filsnap

filecoin, metamask, snap, dapp

readme

Filsnap adapter

NPM Version License: MIT License Adapter

Adapter for Filsnap

Installation

pnpm install filsnap-adapter

Usage

This adapter interacts directly with the snap, so Metamask with support for Snaps needs to be installed and unlocked in the browser.

import { FilsnapAdapter } from 'filsnap-adapter'

const snap = await FilsnapAdapter.connect({ network: 'testnet' }, 'npm:filsnap')

const { error, result } = await snap.getAddress()

if (error) {
  console.error(error)
} else {
  console.log(result)
  // t1d2xrzcslx7xlbbylc5c3d5lvandqw4iwl6epxba
}

Check out the demo for a working example and the API for more details.

Contributing

Read contributing guidelines.

Open in GitHub Codespaces

License

Dual-licensed: MIT, Apache Software License v2, by way of the Permissive License Stack.