# vuiet

> Minimal wallet manager on the Sui blockhain for Vue 3

Latest version **1.2.1** (published 2023-05-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install vuiet
pnpm add vuiet
yarn add vuiet
bun add vuiet
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2023-05-04 |
| First published | 2023-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 263.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | xrexy |
| Maintainers | xrexy |
| Keywords | vue, sui, blockchain, wallet, manager |

## Links

- npm: https://www.npmjs.com/package/vuiet
- Repository: https://github.com/xrexy/vuiet
- Homepage: https://github.com/xrexy/vuiet#readme
- Issues: https://github.com/xrexy/vuiet/issues
- npm.io page: https://npm.io/package/vuiet

## Dependencies (5)

- [vue](https://npm.io/package/vue.md) ^3.2.47
- [lodash-es](https://npm.io/package/lodash-es.md) ^4.17.21
- [@mysten/sui.js](https://npm.io/package/@mysten/sui.js.md) ^0.32.2
- [@wallet-standard/core](https://npm.io/package/@wallet-standard/core.md) ^1.0.3
- [@mysten/wallet-standard](https://npm.io/package/@mysten/wallet-standard.md) ^0.5.4

## Recent versions

- 1.2.1 (latest) — 2023-05-04
- 0.2.2 (experimental) — 2023-05-01
- 1.2.0 — 2023-05-04
- 1.1.0 — 2023-05-02
- 1.0.0 — 2023-05-01
- 0.2.4 — 2023-05-01
- 0.2.3 — 2023-05-01
- 0.2.1 — 2023-05-01
- 0.2.0 — 2023-05-01
- 0.1.6 — 2023-05-01
- 0.1.5 — 2023-05-01
- 0.1.4 — 2023-05-01
- 0.1.3 — 2023-04-30
- 0.1.2 — 2023-04-30
- 0.1.1 — 2023-04-30
- … 10 more at https://npm.io/package/vuiet/versions

## README

# Vuiet <a href="https://www.npmjs.com/package/vuiet" target="_blank">![](https://img.shields.io/npm/v/vuiet?color=blue)</a> <a href="https://www.npmjs.com/package/vuiet" target="_blank">![](https://img.shields.io/npm/dm/vuiet?color=blue)</a>

Vuiet is a minimal wallet manager built on the Sui blockchain for Vue 3.

## Demo

Basic code examples can be found on our demo page - [vuiet.dev](https://vuiet.dev)

## Getting Started

### Installation:

```
npm install -S vuiet
```

### Setup
```ts
// main.ts (App entry point)
import { createApp } from 'vue'
import Vuiet from 'vuiet'

// Needed to load tailwind classes for the components.
// If you're not planning on using the built-in components there's no need to import it.
import 'vuiet/dist/style.css'

const app = createApp(App)

app.use(SuiWallet, {
  autoConnect: true,
  chainOverwrite: {
    SUI_DEVNET: {
      faucetUrl: 'https://faucet.devnet.sui.io/gas'
    }
  }
})

app.mount('#app')
```

### Options
<b>autoConnect</b> (default true, optional)
> Whenever to connect to the previous wallet on page reload.

> When enabled the wallet name is store in local storage with key <b>VUIET__PREV_WALLET_NAME</b>. 
Deleting the entry will make the lib "forget" it, but will not auto-disconnect the user.

<br />

<b>chain</b> (default SUI_DEVNET)
> What chain to use - this option is subject to change.

<br />

<b>chainOverwrite</b> (optional)
> Overwrites the chain defaults. Can be useful to specify faucet urls since by default they're not specified.

> Values that can be overwritten: nodeUrl, displayName, key and faucetUrl

<br />

* Valid chains are SUI_DEVNET, SUI_TESTNET and SUI_MAINNET

## Basic Usage

```html
<template>
  <p @click="$wallet.disconnect()">Address: {{ $wallet.address }}</p>
  <p>Balance: {{ balance }}</p>
  <!-- Balance is by default SUI -->
  <!-- If you want to normalize it divide by 1e9 -->

  <button @click="$wallet.select('Suiet')">Connect (Suiet)</button>
</template>

<script setup>
  import { useWallet, useCoinBalance } from 'vuiet'
  const $wallet = useWallet()
  const { balance } = useCoinBalance()
</script>
```

## Component Usage

<sub>⚠️ Components aren't as tested and modular as I wanted them to be at the moment. If you have any suggestions or found a bug feel free to open an issue.</sub>

```html
<template>
  <p @click="$wallet.disconnect()">Address: {{ $wallet.address }}</p>

  <WalletMultiButton />
</template>

<script setup>
  import { useWallet, WalletMultiButton } from 'vuiet'
  const $wallet = useWallet()
</script>
```

---
_Source: https://npm.io/package/vuiet · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
