# js-metamask-ii

> II 结合 MetaMask

Latest version **0.0.3** (published 2023-06-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install js-metamask-ii
pnpm add js-metamask-ii
yarn add js-metamask-ii
bun add js-metamask-ii
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2023-06-07 |
| First published | 2023-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 11 |
| Unpacked size | 93.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | piercedjh |
| Keywords | dfinity, DataBox, SDK, IC |

## Links

- npm: https://www.npmjs.com/package/js-metamask-ii
- npm.io page: https://npm.io/package/js-metamask-ii

## Dependencies (11)

- [tsup](https://npm.io/package/tsup.md) ^6.6.3
- [buffer](https://npm.io/package/buffer.md) ^6.0.3
- [nanoid](https://npm.io/package/nanoid.md) ^3.0.0
- [crypto-js](https://npm.io/package/crypto-js.md) ^4.0.0
- [string-random](https://npm.io/package/string-random.md) ^0.1.3
- [@dfinity/agent](https://npm.io/package/@dfinity/agent.md) ^0.13.0
- [@dfinity/candid](https://npm.io/package/@dfinity/candid.md) ^0.13.0
- [@types/crypto-js](https://npm.io/package/@types/crypto-js.md) ^4.1.1
- [@dfinity/identity](https://npm.io/package/@dfinity/identity.md) ^0.13.0
- [@dfinity/principal](https://npm.io/package/@dfinity/principal.md) ^0.13.0
- [@dfinity/authentication](https://npm.io/package/@dfinity/authentication.md) ^0.13.0

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2023-06-07
- 0.0.2 — 2023-06-06
- 0.0.1 — 2023-05-18

## README

## II js sdk

II 结合 MetaMask

## Get Start

### Install

`npm install js-metamask-ii`

### Usage

```js
(async () => {
  const authClient = await AuthClient.create();
  authClient.login({
    maxTimeToLive: BigInt(7) * BigInt(24) * BigInt(3_600_000_000_000), // 1 week
    onSuccess: () => {
      console.log('Login Successful!');
    },
    onError: (error) => {
      console.error('Login Failed: ', error);
    }
  });
})
```

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