[![logo][]](https://xyo.network)

# @xyo-network/xl1-wrappers

[![npm-badge][]][npm-link]
[![license-badge][]][license-link]

> Object wrappers around raw XL1 protocol payloads — convenient accessors for transactions, chains, fees, and signatures.

## About

XL1 protocol data is stored as plain payloads and bound witnesses. This package gives you ergonomic wrapper classes around those raw shapes — typed accessors for fees, signatures, transaction fields, and chain context — so application code can read protocol data without manually walking nested object structures.

It's bundled into the [`@xyo-network/xl1-sdk`](https://www.npmjs.com/package/@xyo-network/xl1-sdk) aggregate. Install directly when you only need wrappers.

## Install

Using npm:

```sh
npm i --save @xyo-network/xl1-wrappers
```

Using yarn:

```sh
yarn add @xyo-network/xl1-wrappers
```

Using pnpm:

```sh
pnpm add @xyo-network/xl1-wrappers
```

Using bun:

```sh
bun add @xyo-network/xl1-wrappers
```

## What's Inside

- **`Base`** — base wrapper that other wrappers extend
- **`chain/`** — chain-context wrappers
- **`transaction/`** — transaction wrappers (signed/unsigned, fields, balances)
- **`Fees`** — typed fee accessors over raw transaction payloads
- **`Signature`** — signature inspection and validation helpers
- **`lib/`** — shared utilities used across the wrappers

## Building Locally

```sh
xy build @xyo-network/xl1-wrappers
xy test @xyo-network/xl1-wrappers
xy lint @xyo-network/xl1-wrappers
```

## Maintainers

<table>
  <tr>
    <td align="center" valign="top" width="120">
      <a href="https://github.com/arietrouw">
        <img src="https://github.com/arietrouw.png" width="80" height="80" alt="Arie Trouw" /><br />
        <sub><b>Arie Trouw</b></sub>
      </a>
      <br />
      <a href="https://arietrouw.com">arietrouw.com</a>
    </td>
    <td align="center" valign="top" width="120">
      <a href="https://github.com/jonesmac">
        <img src="https://github.com/jonesmac.png" width="80" height="80" alt="Matt Jones" /><br />
        <sub><b>Matt Jones</b></sub>
      </a>
    </td>
    <td align="center" valign="top" width="120">
      <a href="https://github.com/JoelBCarter">
        <img src="https://github.com/JoelBCarter.png" width="80" height="80" alt="Joel Carter" /><br />
        <sub><b>Joel Carter</b></sub>
      </a>
    </td>
  </tr>
</table>

## License

See the [LICENSE](./LICENSE) file (LGPL-3.0-only).

## Credits

[Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)

[npm-badge]: https://img.shields.io/npm/v/@xyo-network/xl1-wrappers.svg
[npm-link]: https://www.npmjs.com/package/@xyo-network/xl1-wrappers
[license-badge]: https://img.shields.io/npm/l/@xyo-network/xl1-wrappers.svg
[license-link]: ./LICENSE
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
