# @gemwallet/api

> GemWallet API Utility functions to interact with GemWallet extension

Latest version **3.8.0** (published 2024-10-02) · 0 weekly downloads

## Install

```sh
npm install @gemwallet/api
pnpm add @gemwallet/api
yarn add @gemwallet/api
bun add @gemwallet/api
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.8.0 |
| Published | 2024-10-02 |
| First published | 2022-03-27 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 275.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 68 |
| Author | GemWallet |
| Maintainers | florianbouron |

## Links

- npm: https://www.npmjs.com/package/@gemwallet/api
- Repository: https://github.com/GemWallet/gemwallet-extension
- Homepage: https://github.com/GemWallet/gemwallet-extension#readme
- Issues: https://github.com/GemWallet/gemwallet-extension/issues
- npm.io page: https://npm.io/package/@gemwallet/api

## Recent versions

- 3.8.0 (latest) — 2024-10-02
- 3.7.0 — 2024-02-14
- 3.6.0 — 2024-01-19
- 3.5.1 — 2023-10-11
- 3.5.0 — 2023-09-08
- 3.4.0 — 2023-07-31
- 3.3.0 — 2023-07-15
- 3.2.0 — 2023-07-06
- 3.1.0 — 2023-06-26
- 3.0.0 — 2023-06-15
- 2.2.1 — 2023-04-16
- 2.2.0 — 2023-02-27
- 2.1.0 — 2023-02-12
- 2.0.0 — 2022-10-30
- 1.0.2 — 2022-03-27

## README

# GemWallet API

## Introduction

This packages builds a wrapper around the messaging system used to interact with
the GemWallet extension. Client applications will be able to install this package
from npm or via CDN.
It also contains constants that may need to be imported into other repositories in the GemWallet project.

For instructions on how to integrate with GemWallet API, visit: https://gemwallet.app/docs/user-guide/introduction

## Architecture

The API and the extension are communicating via [Message events](https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent) via [cross-document messaging](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage).

### Architecture diagram

```mermaid
graph TD
    A[Browser event - Create a promise on the client] -->|Uses the GemWallet API| B[Browser Content Script]
    B --> |Uses the GemWallet API| C[Browser Background Script]
    C --> |Open GemWallet Extension with payload| D[Browser Background Script]
    D --> |Uses the GemWallet API| E[Browser Content Script]
    E[Browser Promise resolved]
```

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