# Wallet SDK

Integrate our SDK to your dApp/Wallet/swap UI.

## Installation

```sh
# Using npm
$ npm install '@platonnetwork/wallet-plugin-sdk'

# Using yarn

$ yarn add '@platonnetwork/wallet-plugin-sdk'

# Using pnpm

$ pnpm add '@platonnetwork/wallet-plugin-sdk'
```

## Example usage

### CSR

```js
import PlatONWallet from '@platonnetwork/wallet-plugin-sdk'

// Definition PlatONWallet SDK
const walletSDK = new PlatONWallet({
  env: 'TEST' // 'TEST' or 'PROD'
})

// Initialization PlatONWallet SDK
walletSDK.init()

// other methods
walletSDK.hide()
walletSDK.show()
walletSDK.destroy()
```

### next.js

```js
let walletSDK = null

import('@platonnetwork/wallet-plugin-sdk').then(module => {
  walletSDK = new module.default({ env: 'TEST' })
})
```
