# @tronweb3/tronwallet-adapter-guarda

> Wallet adapter for Guarda Extension.

Latest version **1.2.0** (published 2026-09-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tronweb3/tronwallet-adapter-guarda
pnpm add @tronweb3/tronwallet-adapter-guarda
yarn add @tronweb3/tronwallet-adapter-guarda
bun add @tronweb3/tronwallet-adapter-guarda
```

## Health

**Score 70/100 (B)** — status: active.

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2026-09-04 |
| First published | 2025-09-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 2 |
| Unpacked size | 211.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 80 |
| Author | tronweb3 |
| Maintainers | troncore, tronwallet-adapter |
| Keywords | TRON, TronWeb, Guarda |

## Links

- npm: https://www.npmjs.com/package/@tronweb3/tronwallet-adapter-guarda
- Repository: https://github.com/tronweb3/tronwallet-adapter
- Homepage: https://github.com/tronweb3/tronwallet-adapter#readme
- Issues: https://github.com/tronweb3/tronwallet-adapter/issues
- npm.io page: https://npm.io/package/@tronweb3/tronwallet-adapter-guarda

## Dependencies (2)

- [@tronweb3/tronwallet-abstract-adapter](https://npm.io/package/@tronweb3/tronwallet-abstract-adapter.md) ^1.3.0
- [@tronweb3/tronwallet-adapter-tronlink](https://npm.io/package/@tronweb3/tronwallet-adapter-tronlink.md) ^1.3.0

## Recent versions

- 1.2.0 (latest) — 2026-09-04
- 1.1.0 — 2026-06-11
- 1.0.0 — 2025-09-25

## README

# @tronweb3/tronwallet-adapter-guarda

Wallet adapter for Guarda Extension.

## Installation

```bash
npm install @tronweb3/tronwallet-adapter-guarda
```

## Usage

```typescript
import { GuardaAdapter } from '@tronweb3/tronwallet-adapter-guarda';

const adapter = new GuardaAdapter({
    checkTimeout: 2000,
    openUrlWhenWalletNotFound: true,
});

// Connect to wallet
await adapter.connect();

// Get address
console.log(adapter.address);

// Sign transaction
const signedTx = await adapter.signTransaction(transaction);

// Sign message
const signature = await adapter.signMessage('Hello World');

// Disconnect
await adapter.disconnect();
```

## Configuration

| Option                      | Type      | Default | Description                                             |
| --------------------------- | --------- | ------- | ------------------------------------------------------- |
| `checkTimeout`              | `number`  | `2000`  | Timeout in millisecond for checking if is in Guarda App |
| `openUrlWhenWalletNotFound` | `boolean` | `true`  | Set if open Guarda website when wallet not found        |

## Events

The adapter extends the base adapter and emits the following events:

-   `readyStateChanged`: When the wallet ready state changes
-   `connect`: When the wallet connects

## Security Check

`GuardaAdapter` supports an optional `securityOptions` field for detecting wallet risks before `connect()`. When enabled, the adapter fetches a remote risk configuration and calls `onRiskDetected` if the wallet is flagged.

```typescript
const adapter = new GuardaAdapter({
    securityOptions: {
        enabled: true,
        configUrls: ['https://your-server.com/security-config.json'],
        onRiskDetected: async ({ risks }) => {
            // Throw to block the connection, or log a warning
            throw new Error(`Wallet risk detected: ${risks[0].title}`);
        },
    },
});
```

For the full `SecurityOptions` API reference, see [walletadapter.org/docs](https://walletadapter.org/docs/index.html).

## Caveats

-   `multiSign()` and `switchChain(chainId: string)` are not supported.
-   Guarda does not support accounts switching and network switching.
-   Guarda does not support auto-reconnect after a page reload.

## License

MIT

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