# @aeternity-snap/sdk

> Aeternity metamask snap.

Latest version **0.0.5** (published 2024-03-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install @aeternity-snap/sdk
pnpm add @aeternity-snap/sdk
yarn add @aeternity-snap/sdk
bun add @aeternity-snap/sdk
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2024-03-21 |
| First published | 2023-11-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 25.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | 4pto Developers |
| Maintainers | asaric, 4pto-admin |

## Links

- npm: https://www.npmjs.com/package/@aeternity-snap/sdk
- Repository: https://github.com/4-point-0/aeternity-snap
- Issues: https://github.com/4-point-0/aeternity-snap/issues
- npm.io page: https://npm.io/package/@aeternity-snap/sdk

## Dependencies (2)

- [@aeternity/aepp-sdk](https://npm.io/package/@aeternity/aepp-sdk.md) ^13.2.2
- [@metamask/providers](https://npm.io/package/@metamask/providers.md) ^13.1.0

## Recent versions

- 0.0.5 (latest) — 2024-03-21
- 0.0.4 — 2024-02-06
- 0.0.3 — 2024-02-06
- 0.0.2 — 2024-02-06
- 0.0.1 — 2023-11-21

## README

### @aeternity-snap/sdk

Interact with Aeternity Snap using the SDK, it's the easiest way to give Metamask users access to the world of Aeternity Protocol

```ts
import { AESnap, NetworkId } from "@aeternity-snap/sdk";
import { Encoding, Tag, encode } from "@aeternity/aepp-sdk";
import { TxParamsAsync } from "@aeternity/aepp-sdk/es/tx/builder/schema";

// Install snap and connect wallet
const snap = await AESnap.connect(NetworkId.testnet, {
  id: "local:http://localhost:8080",
});

// Get public key
const response = await snap?.getPublicKey();
console.log(response.publicKey ?? "No public key");

// Send transaction
const results = await snap.signAndSendTransaction({
  tag: Tag.SpendTx,
  senderId: "",
  recipientId: "",
  amount: 0.1 * 10 ** 18,
  payload: encode(new TextEncoder().encode(""), Encoding.Bytearray),
} as TxParamsAsync);
```

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