0.0.3 • Published 5 years ago

magmo-wallet-client v0.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

magmo-wallet-client

A library for creating and interacting with a Magmo wallet.

Usage

Creating the Wallet iframe

The wallet iframe can be created by calling createWalletIFrame and then embedded anywhere in the page. The wallet handles stying and displaying itself!

const walletClient = require('magmo-wallet-client');
const walletIframe = walletClient.createWalletIFrame('magmo-wallet-00');

Listening for Wallet events

The WalletEventListener can be used to subscribe to WalletEvents.

const walletClient = require('magmo-wallet-client');
const walletListener = new walletClient.WalletEventListener();
walletListener.subscribeAll(yourHandler);

Wallet functions

The wallet exposes various functions to interact with the wallet.

const walletClient = require('magmo-wallet-client');
walletClient.initializeWallet('magmo-wallet-00','my-user-id');