Documentation
    Preparing search index...

    Module filsnap-adapter - v3.1.2

    Filsnap adapter

    NPM Version License: MIT License Adapter

    Adapter for Filsnap

    pnpm install filsnap-adapter
    

    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.

    Read contributing guidelines here.

    Open in GitHub Codespaces

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

    Modules

    <internal>

    Classes

    FilsnapAdapter

    Interfaces

    AccountInfo
    EIP1193Provider
    EIP6963AnnounceProviderEvent
    EIP6963ProviderDetail
    EIP6963ProviderInfo
    EIP6963RequestProviderEvent

    Type Aliases

    CustomSnapsMethods
    EIP1193EventMap
    EIP1193Events
    Method
    ProviderConnectInfo
    ProviderMessage
    Rdns
    RequestWithFilSnap
    SnapConfig

    Functions

    chainIdtoNetwork
    checkPermissions
    createConnector
    getOrInstallSnap
    getProvider
    getSnap
    hasSnaps
    isConnected
    syncWithProvider