0.0.4 • Published 3 years ago

@snapwallet/init v0.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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