# @energyweb/issuer

Latest version **7.0.1** (published 2022-03-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @energyweb/issuer
pnpm add @energyweb/issuer
yarn add @energyweb/issuer
bun add @energyweb/issuer
```

## Health

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

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support; large bundle.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 7.0.1 |
| Published | 2022-03-16 |
| First published | 2020-02-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 12 |
| Unpacked size | 17.1 MB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 110 |
| Maintainers | kyleiankian, energywebdev, aznagy, bagaric, pkosin, drgorb, kroy, manihagh |

## Links

- npm: https://www.npmjs.com/package/@energyweb/issuer
- Repository: https://github.com/energywebfoundation/origin
- Homepage: https://github.com/energywebfoundation/origin/tree/master/packages/issuer
- Issues: https://github.com/energywebfoundation/origin/issues
- npm.io page: https://npm.io/package/@energyweb/issuer

## Dependencies (12)

- [dotenv](https://npm.io/package/dotenv.md) 10.0.0
- [ethers](https://npm.io/package/ethers.md) 5.3.1
- [moment](https://npm.io/package/moment.md) 2.29.1
- [winston](https://npm.io/package/winston.md) 3.3.3
- [ganache-cli](https://npm.io/package/ganache-cli.md) 6.12.2
- [@ethersproject/abi](https://npm.io/package/@ethersproject/abi.md) 5.3.1
- [ew-precise-proofs-js](https://npm.io/package/ew-precise-proofs-js.md) 1.1.0
- [@ethersproject/wallet](https://npm.io/package/@ethersproject/wallet.md) 5.3.0
- [@energyweb/utils-general](https://npm.io/package/@energyweb/utils-general.md) 11.2.3
- [@ethersproject/contracts](https://npm.io/package/@ethersproject/contracts.md) 5.3.0
- [@ethersproject/providers](https://npm.io/package/@ethersproject/providers.md) 5.3.1
- [@ethersproject/abstract-signer](https://npm.io/package/@ethersproject/abstract-signer.md) 5.3.0

## Recent versions

- 7.0.1 (latest) — 2022-03-16
- 6.0.2-alpha.1658756736.0 (canary) — 2022-07-25
- 1.0.2-preview.4091.0 (preview) — 2020-03-16
- 6.0.2-alpha.1658745615.0 — 2022-07-25
- 6.0.2-alpha.1657642980.0 — 2022-07-12
- 6.0.2-alpha.1654697952.0 — 2022-06-08
- 6.0.2-alpha.1651489311.0 — 2022-05-02
- 6.0.2-alpha.1651149594.0 — 2022-04-28
- 7.0.2-alpha.1650636678.0 — 2022-04-22
- 7.0.0 — 2022-03-15
- 6.0.2-alpha.1646656455.0 — 2022-03-07
- 6.0.2-alpha.1646058469.0 — 2022-02-28
- 6.0.2-alpha.1646056819.0 — 2022-02-28
- 6.0.1 — 2022-01-18
- 6.0.1-alpha.1642431088.0 — 2022-01-17
- … 1379 more at https://npm.io/package/@energyweb/issuer/versions

## README

<p align="center">
  <a href="https://www.energyweb.org" target="blank"><img src="../../../docs/images/EW.png" width="120" alt="Energy Web Foundation Logo" /></a>
</p>

# Issuer

## Description

The Issuer package contains smart contracts and interfaces that handle the management of Energy Attribute Certificates on the blockchain.

It is a component of [Energy Web Origin's](https://energy-web-foundation-origin.readthedocs-hosted.com/en/latest/) Traceability SDK.

## Documentation

-   [Issuer](https://energy-web-foundation-origin.readthedocs-hosted.com/en/latest/traceability/packages/issuer/)
-   [Traceability SDK](https://energy-web-foundation-origin.readthedocs-hosted.com/en/latest/traceability/)

## Contributing Guidelines

See [contributing.md](../../../contributing.md)

# Energy Web Decentralized Operating System

EW-Origin is a component of the Energy Web Decentralized Operating System (EW-DOS).

The purpose of EW-DOS is to develop and deploy an open and decentralized digital operating system for the energy sector in support of a low-carbon, customer-centric energy future.

We develop blockchain technology, full-stack applications and middleware packages that facilitate participation of Distributed Energy Resources on the grid and create open market places for transparent and efficient renewable energy trading.

-   To learn about more about the EW-DOS tech stack, see our [documentation](https://app.gitbook.com/@energy-web-foundation/s/energy-web/)

For a deep-dive into the motivation and methodology behind our technical solutions, read our White Papers:

-   [Energy Web White Paper on Vision and Purpose](https://www.energyweb.org/reports/EWDOS-Vision-Purpose/)
-   [Energy Web White Paper on Technology Detail](https://www.energyweb.org/wp-content/uploads/2020/06/EnergyWeb-EWDOS-PART2-TechnologyDetail-202006-vFinal.pdf)

## Connect with Energy Web

-   [Twitter](https://twitter.com/energywebx)
-   [Discord](https://discord.com/channels/706103009205288990/843970822254362664)
-   [Telegram](https://t.me/energyweb)

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

## Notes:

`prevCommitment` is required to prevent state corruption, transition to new commitment based on other state that's currently on-chain will result in error.

Implementation:

-   Certificate owner A has 1000kWh of energy on certificate id = 1 (C1)
-   A requesting private transfer of 500kWh from C1 to B
    -   A calls API with (id, value, newOwner) in our case (1, 500000, B)
    -   if API approves the transfer (enough balance, maybe other API checks)
        -   API returns (updatedBalanceOfA, salt) in our case (500000, 'randomsalt')
        -   A creates onChain request where hash = hash(address, updatedBalanceOfA, salt) in our case hash(A, 5000000, salt)
        -   Issuer - approves by sending new commitment that is verified against the request.hash

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