0.1.0 • Published 5 years ago
@neo-react/local-wallet v0.1.0
@neo-react/local-wallet
React component that helps to handle encrypting and decrypting NEO wallet keys.
Demo
Usage
import React from "react";
import LocalWallet from "@neo-react/local-wallet";
interface ConnectedWallet {
provider: string;
address: string;
encryptedKey?: string;
privateKey?: string;
}
const WalletModal = () => {
return(
<LocalWallet
onConnected={(connectedWallet: ConnectedWallet) => {
/* Handle data using your own state manager */
}}
/>
)
}
Api
Props | Type | Description |
---|---|---|
savedWallets | array | It passes encrypted key list. |
onConnected | func | It returns wallet data after it is connected. |