open-index/open-npm huggingface dataset:
npm package: @platonnetwork/platon-wallet-sdk
Description: Integrate our SDK to your dApp/Wallet/swap UI.
Latest version: 1.4.0

# Wallet SDK

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

## Installation

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

# Using yarn

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

# Using pnpm

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

## Example usage

### CSR

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

// Definition PlatONWallet SDK
const walletSDK = new PlatONWallet({
  env: 'PROD', // optional, 'PROD' or 'TEST', default to 'PROD'
  theme: 'auto', // optional, 'auto', 'light' or 'dark', default to 'auto'
})

// Initialization PlatONWallet SDK
walletSDK.init({
  walletType: 'METAMASK', // 'METAMASK', 'PARTICLE', 'WALLETCONNECT', 'UNIPASS'
  walletProvider: window.ethereum, // eip1193 ethereum provider
})

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

// When you switch from the MetaMask wallet to connect to another wallet
// particle example, @particle-network/connect-react-ui, @wagmi/core and @particle-network/connect packages expose the provider in a different way, refer their docs for details
const pn = new ParticleNetwork({
  projectId: 'your project id',
  clientKey: 'your client key',
  appId: 'your app id',
  wallet: {
    displayWalletEntry: false,
  },
}) // import { ParticleNetwork } from '@particle-network/auth'
const particleProvider = new ParticleProvider(pn.auth) // import { ParticleProvider } from '@particle-network/provider'

walletSDK.setWalletOption({
  walletType: 'PARTICLE',
  walletProvider: particleProvider,
})

// walletconnect example, @wagmi/core and @web3modal/ethereum packages expose the provider in a different way, refer their docs for details
const supportedRpcMap = await wallet.getSupportedChainsMap() // walletconnect required
const wcProvider = await EthereumProvider.init({
  // import { EthereumProvider } from '@walletconnect/ethereum-provider'
  projectId: 'your project id',
  chains: [
    ...Object.keys(supportedRpcMap).map((item) => +item),
    // your own chains
  ],
  rpcMap: {
    ...supportedRpcMap,
    // your own rpc map
  },
  showQrModal: true,
  qrModalOptions: {
    themeVariables: {
      '--wcm-z-index': '9999',
    },
  },
})

walletSDK.setWalletOption({
  walletType: 'WALLETCONNECT',
  walletProvider: wcProvider,
})

// When you are not connected to any wallet
walletSDK.setWalletOption({
  walletType: '',
  walletProvider: null,
})
```

### next.js

```js
let walletSDK = null

import('@platonnetwork/platon-wallet-sdk').then((module) => {
  walletSDK = new module.default({ env: 'PROD' })
})
```
npm package: @platonnetwork/truffle
Description: Truffle - Simple development framework for Ethereum
Author: consensys.net
Latest version: 0.1.0

<img src="https://truffleframework.com/img/truffle-logo-dark.svg" width="200">

[![npm](https://img.shields.io/npm/v/truffle.svg)]()
[![npm](https://img.shields.io/npm/dm/truffle.svg)]()
[![Join the chat at https://gitter.im/consensys/truffle](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/consensys/truffle?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

-----------------------


Truffle is a development environment, testing framework and asset pipeline for Ethereum, aiming to make life as an Ethereum developer easier. With Truffle, you get:

* Built-in smart contract compilation, linking, deployment and binary management.
* Automated contract testing with Mocha and Chai.
* Configurable build pipeline with support for custom build processes.
* Scriptable deployment & migrations framework.
* Network management for deploying to many public & private networks.
* Interactive console for direct contract communication.
* Instant rebuilding of assets during development.
* External script runner that executes scripts within a Truffle environment.

### Install

```
$ npm install -g truffle
```

### Quick Usage

For a default set of contracts and tests, run the following within an empty project directory:

```
$ truffle init
```

From there, you can run `truffle compile`, `truffle migrate` and `truffle test` to compile your contracts, deploy those contracts to the network, and run their associated unit tests.

Truffle comes bundled with a local development blockchain server that launches automatically when you invoke the commands  above. If you'd like to [configure a more advanced development environment](http://truffleframework.com/docs/advanced/configuration) we recommend you install the blockchain server separately by running `npm install -g ganache-cli` at the command line.

+  [ganache-cli](https://github.com/trufflesuite/ganache-cli): a command-line version of Truffle's blockchain server.
+  [ganache](http://truffleframework.com/ganache/): A GUI for the server that displays your transaction history and chain state.


### Documentation

Please see the [Official Truffle Documentation](http://truffleframework.com/docs/) for guides, tips, and examples.

### Contributing

This package is a distribution package of the Truffle command line tool. Please see [@truffle/core](https://github.com/trufflesuite/truffle/tree/develop/packages/core) to contribute to the main core code.

### License

MIT
npm package: @platonnetwork/wallet-plugin-sdk
Description: Integrate our SDK to your dApp/Wallet/swap UI.
Latest version: 1.1.1

# 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' })
})
```