@snapwallet/init
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Snap Wallet Init

The Snap Wallet fiat to cryptocurrency widget init script.

Up and Running

import SnapWallet, { WidgetEnvironments } from '@snapwallet/init'

// Base configuration
const snap = new SnapWallet({
  environment: WidgetEnvironments.PRODUCTION,
  appName: 'Donate',
  intent: 'donate',
  payee: 'Snap Wallet',
  wallets: [
    { asset: 'btc', address: '1BpnDtnUJk24P6XKEVu7XaYx5qPZx9AyKg' },
    { asset: 'eth', address: '0x6d47da1135b13d0068bd38c7236fcb59838cbbdd' },
  ],
})

// Create a Snap Wallet URI for a React Native WebView
const uri = snap.generateURL()

// or open the iframe for web
snap.openWeb()

Donate to Snap Wallet

/@snapwallet/init/

    Package Sidebar

    Install

    npm i @snapwallet/init

    Weekly Downloads

    7

    Version

    0.0.4

    License

    ISC

    Unpacked Size

    682 kB

    Total Files

    5

    Last publish

    Collaborators

    • snapwallet